@jyork0828/pi-pilot 0.0.1 → 0.0.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,228 @@
1
+ var p1=Object.defineProperty;var af=e=>{throw TypeError(e)};var h1=(e,t,n)=>t in e?p1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Wt=(e,t,n)=>h1(e,typeof t!="symbol"?t+"":t,n),oa=(e,t,n)=>t.has(e)||af("Cannot "+n);var C=(e,t,n)=>(oa(e,t,"read from private field"),n?n.call(e):t.get(e)),q=(e,t,n)=>t.has(e)?af("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),O=(e,t,n,r)=>(oa(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),J=(e,t,n)=>(oa(e,t,"access private method"),n);var fs=(e,t,n,r)=>({set _(i){O(e,t,i,n)},get _(){return C(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Js=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tm={exports:{}},Ll={},nm={exports:{}},ne={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ts=Symbol.for("react.element"),m1=Symbol.for("react.portal"),g1=Symbol.for("react.fragment"),x1=Symbol.for("react.strict_mode"),y1=Symbol.for("react.profiler"),v1=Symbol.for("react.provider"),b1=Symbol.for("react.context"),k1=Symbol.for("react.forward_ref"),w1=Symbol.for("react.suspense"),S1=Symbol.for("react.memo"),C1=Symbol.for("react.lazy"),uf=Symbol.iterator;function j1(e){return e===null||typeof e!="object"?null:(e=uf&&e[uf]||e["@@iterator"],typeof e=="function"?e:null)}var rm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},im=Object.assign,om={};function Mi(e,t,n){this.props=e,this.context=t,this.refs=om,this.updater=n||rm}Mi.prototype.isReactComponent={};Mi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Mi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sm(){}sm.prototype=Mi.prototype;function Ec(e,t,n){this.props=e,this.context=t,this.refs=om,this.updater=n||rm}var Pc=Ec.prototype=new sm;Pc.constructor=Ec;im(Pc,Mi.prototype);Pc.isPureReactComponent=!0;var cf=Array.isArray,lm=Object.prototype.hasOwnProperty,Tc={current:null},am={key:!0,ref:!0,__self:!0,__source:!0};function um(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)lm.call(t,r)&&!am.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),c=0;c<l;c++)a[c]=arguments[c+2];i.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:ts,type:e,key:o,ref:s,props:i,_owner:Tc.current}}function N1(e,t){return{$$typeof:ts,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ic(e){return typeof e=="object"&&e!==null&&e.$$typeof===ts}function E1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var df=/\/+/g;function sa(e,t){return typeof e=="object"&&e!==null&&e.key!=null?E1(""+e.key):t.toString(36)}function Fs(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case ts:case m1:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+sa(s,0):r,cf(i)?(n="",e!=null&&(n=e.replace(df,"$&/")+"/"),Fs(i,t,n,"",function(c){return c})):i!=null&&(Ic(i)&&(i=N1(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(df,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",cf(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+sa(o,l);s+=Fs(o,t,n,a,i)}else if(a=j1(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+sa(o,l++),s+=Fs(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ps(e,t,n){if(e==null)return e;var r=[],i=0;return Fs(e,r,"","",function(o){return t.call(n,o,i++)}),r}function P1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var rt={current:null},Ds={transition:null},T1={ReactCurrentDispatcher:rt,ReactCurrentBatchConfig:Ds,ReactCurrentOwner:Tc};function cm(){throw Error("act(...) is not supported in production builds of React.")}ne.Children={map:ps,forEach:function(e,t,n){ps(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ps(e,function(){t++}),t},toArray:function(e){return ps(e,function(t){return t})||[]},only:function(e){if(!Ic(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ne.Component=Mi;ne.Fragment=g1;ne.Profiler=y1;ne.PureComponent=Ec;ne.StrictMode=x1;ne.Suspense=w1;ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T1;ne.act=cm;ne.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=im({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Tc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)lm.call(t,a)&&!am.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:ts,type:e.type,key:i,ref:o,props:r,_owner:s}};ne.createContext=function(e){return e={$$typeof:b1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:v1,_context:e},e.Consumer=e};ne.createElement=um;ne.createFactory=function(e){var t=um.bind(null,e);return t.type=e,t};ne.createRef=function(){return{current:null}};ne.forwardRef=function(e){return{$$typeof:k1,render:e}};ne.isValidElement=Ic;ne.lazy=function(e){return{$$typeof:C1,_payload:{_status:-1,_result:e},_init:P1}};ne.memo=function(e,t){return{$$typeof:S1,type:e,compare:t===void 0?null:t}};ne.startTransition=function(e){var t=Ds.transition;Ds.transition={};try{e()}finally{Ds.transition=t}};ne.unstable_act=cm;ne.useCallback=function(e,t){return rt.current.useCallback(e,t)};ne.useContext=function(e){return rt.current.useContext(e)};ne.useDebugValue=function(){};ne.useDeferredValue=function(e){return rt.current.useDeferredValue(e)};ne.useEffect=function(e,t){return rt.current.useEffect(e,t)};ne.useId=function(){return rt.current.useId()};ne.useImperativeHandle=function(e,t,n){return rt.current.useImperativeHandle(e,t,n)};ne.useInsertionEffect=function(e,t){return rt.current.useInsertionEffect(e,t)};ne.useLayoutEffect=function(e,t){return rt.current.useLayoutEffect(e,t)};ne.useMemo=function(e,t){return rt.current.useMemo(e,t)};ne.useReducer=function(e,t,n){return rt.current.useReducer(e,t,n)};ne.useRef=function(e){return rt.current.useRef(e)};ne.useState=function(e){return rt.current.useState(e)};ne.useSyncExternalStore=function(e,t,n){return rt.current.useSyncExternalStore(e,t,n)};ne.useTransition=function(){return rt.current.useTransition()};ne.version="18.3.1";nm.exports=ne;var P=nm.exports;const hs=Nc(P);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var I1=P,_1=Symbol.for("react.element"),L1=Symbol.for("react.fragment"),R1=Object.prototype.hasOwnProperty,A1=I1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,z1={key:!0,ref:!0,__self:!0,__source:!0};function dm(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)R1.call(t,r)&&!z1.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:_1,type:e,key:o,ref:s,props:i,_owner:A1.current}}Ll.Fragment=L1;Ll.jsx=dm;Ll.jsxs=dm;tm.exports=Ll;var u=tm.exports,fm={exports:{}},jt={},pm={exports:{}},hm={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(z,B){var b=z.length;z.push(B);e:for(;0<b;){var K=b-1>>>1,le=z[K];if(0<i(le,B))z[K]=B,z[b]=le,b=K;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var B=z[0],b=z.pop();if(b!==B){z[0]=b;e:for(var K=0,le=z.length,N=le>>>1;K<N;){var ve=2*(K+1)-1,He=z[ve],V=ve+1,ze=z[V];if(0>i(He,b))V<le&&0>i(ze,He)?(z[K]=ze,z[V]=b,K=V):(z[K]=He,z[ve]=b,K=ve);else if(V<le&&0>i(ze,b))z[K]=ze,z[V]=b,K=V;else break e}}return B}function i(z,B){var b=z.sortIndex-B.sortIndex;return b!==0?b:z.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],c=[],f=1,d=null,p=3,h=!1,g=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(z){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=z)r(c),B.sortIndex=B.expirationTime,t(a,B);else break;B=n(c)}}function w(z){if(v=!1,y(z),!g)if(n(a)!==null)g=!0,re(E);else{var B=n(c);B!==null&&Q(w,B.startTime-z)}}function E(z,B){g=!1,v&&(v=!1,m(I),I=-1),h=!0;var b=p;try{for(y(B),d=n(a);d!==null&&(!(d.expirationTime>B)||z&&!_());){var K=d.callback;if(typeof K=="function"){d.callback=null,p=d.priorityLevel;var le=K(d.expirationTime<=B);B=e.unstable_now(),typeof le=="function"?d.callback=le:d===n(a)&&r(a),y(B)}else r(a);d=n(a)}if(d!==null)var N=!0;else{var ve=n(c);ve!==null&&Q(w,ve.startTime-B),N=!1}return N}finally{d=null,p=b,h=!1}}var S=!1,T=null,I=-1,R=5,j=-1;function _(){return!(e.unstable_now()-j<R)}function A(){if(T!==null){var z=e.unstable_now();j=z;var B=!0;try{B=T(!0,z)}finally{B?W():(S=!1,T=null)}}else S=!1}var W;if(typeof x=="function")W=function(){x(A)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,H=Y.port2;Y.port1.onmessage=A,W=function(){H.postMessage(null)}}else W=function(){k(A,0)};function re(z){T=z,S||(S=!0,W())}function Q(z,B){I=k(function(){z(e.unstable_now())},B)}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_continueExecution=function(){g||h||(g=!0,re(E))},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"):R=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(z){switch(p){case 1:case 2:case 3:var B=3;break;default:B=p}var b=p;p=B;try{return z()}finally{p=b}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,B){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var b=p;p=z;try{return B()}finally{p=b}},e.unstable_scheduleCallback=function(z,B,b){var K=e.unstable_now();switch(typeof b=="object"&&b!==null?(b=b.delay,b=typeof b=="number"&&0<b?K+b:K):b=K,z){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=b+le,z={id:f++,callback:B,priorityLevel:z,startTime:b,expirationTime:le,sortIndex:-1},b>K?(z.sortIndex=b,t(c,z),n(a)===null&&z===n(c)&&(v?(m(I),I=-1):v=!0,Q(w,b-K))):(z.sortIndex=le,t(a,z),g||h||(g=!0,re(E))),z},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(z){var B=p;return function(){var b=p;p=B;try{return z.apply(this,arguments)}finally{p=b}}}})(hm);pm.exports=hm;var F1=pm.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var D1=P,Ct=F1;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var mm=new Set,No={};function Br(e,t){Ii(e,t),Ii(e+"Capture",t)}function Ii(e,t){for(No[e]=t,e=0;e<t.length;e++)mm.add(t[e])}var kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=Object.prototype.hasOwnProperty,M1=/^[: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]*$/,ff={},pf={};function O1(e){return tu.call(pf,e)?!0:tu.call(ff,e)?!1:M1.test(e)?pf[e]=!0:(ff[e]=!0,!1)}function $1(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function B1(e,t,n,r){if(t===null||typeof t>"u"||$1(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function it(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ue[e]=new it(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ue[t]=new it(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ue[e]=new it(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ue[e]=new it(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ue[e]=new it(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ue[e]=new it(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ue[e]=new it(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ue[e]=new it(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ue[e]=new it(e,5,!1,e.toLowerCase(),null,!1,!1)});var _c=/[\-:]([a-z])/g;function Lc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_c,Lc);Ue[t]=new it(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_c,Lc);Ue[t]=new it(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_c,Lc);Ue[t]=new it(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ue[e]=new it(e,1,!1,e.toLowerCase(),null,!1,!1)});Ue.xlinkHref=new it("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ue[e]=new it(e,1,!1,e.toLowerCase(),null,!0,!0)});function Rc(e,t,n,r){var i=Ue.hasOwnProperty(t)?Ue[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(B1(t,n,i,r)&&(n=null),r||i===null?O1(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var jn=D1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ms=Symbol.for("react.element"),Xr=Symbol.for("react.portal"),Jr=Symbol.for("react.fragment"),Ac=Symbol.for("react.strict_mode"),nu=Symbol.for("react.profiler"),gm=Symbol.for("react.provider"),xm=Symbol.for("react.context"),zc=Symbol.for("react.forward_ref"),ru=Symbol.for("react.suspense"),iu=Symbol.for("react.suspense_list"),Fc=Symbol.for("react.memo"),Ln=Symbol.for("react.lazy"),ym=Symbol.for("react.offscreen"),hf=Symbol.iterator;function Yi(e){return e===null||typeof e!="object"?null:(e=hf&&e[hf]||e["@@iterator"],typeof e=="function"?e:null)}var Ce=Object.assign,la;function ao(e){if(la===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);la=t&&t[1]||""}return`
34
+ `+la+e}var aa=!1;function ua(e,t){if(!e||aa)return"";aa=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
+ `),o=r.stack.split(`
36
+ `),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var a=`
37
+ `+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{aa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ao(e):""}function U1(e){switch(e.tag){case 5:return ao(e.type);case 16:return ao("Lazy");case 13:return ao("Suspense");case 19:return ao("SuspenseList");case 0:case 2:case 15:return e=ua(e.type,!1),e;case 11:return e=ua(e.type.render,!1),e;case 1:return e=ua(e.type,!0),e;default:return""}}function ou(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Jr:return"Fragment";case Xr:return"Portal";case nu:return"Profiler";case Ac:return"StrictMode";case ru:return"Suspense";case iu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xm:return(e.displayName||"Context")+".Consumer";case gm:return(e._context.displayName||"Context")+".Provider";case zc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fc:return t=e.displayName||null,t!==null?t:ou(e.type)||"Memo";case Ln:t=e._payload,e=e._init;try{return ou(e(t))}catch{}}return null}function H1(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ou(t);case 8:return t===Ac?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function or(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function q1(e){var t=vm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gs(e){e._valueTracker||(e._valueTracker=q1(e))}function bm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function su(e,t){var n=t.checked;return Ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function mf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=or(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function km(e,t){t=t.checked,t!=null&&Rc(e,"checked",t,!1)}function lu(e,t){km(e,t);var n=or(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?au(e,t.type,n):t.hasOwnProperty("defaultValue")&&au(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function au(e,t,n){(t!=="number"||Zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var uo=Array.isArray;function ui(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+or(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function uu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(F(91));return Ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function xf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(F(92));if(uo(n)){if(1<n.length)throw Error(F(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:or(n)}}function wm(e,t){var n=or(t.value),r=or(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function yf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Sm(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function cu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Sm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xs,Cm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(xs=xs||document.createElement("div"),xs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Eo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ho={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Q1=["Webkit","ms","Moz","O"];Object.keys(ho).forEach(function(e){Q1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ho[t]=ho[e]})});function jm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ho.hasOwnProperty(e)&&ho[e]?(""+t).trim():t+"px"}function Nm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=jm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var V1=Ce({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function du(e,t){if(t){if(V1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function fu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pu=null;function Dc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hu=null,ci=null,di=null;function vf(e){if(e=is(e)){if(typeof hu!="function")throw Error(F(280));var t=e.stateNode;t&&(t=Dl(t),hu(e.stateNode,e.type,t))}}function Em(e){ci?di?di.push(e):di=[e]:ci=e}function Pm(){if(ci){var e=ci,t=di;if(di=ci=null,vf(e),t)for(e=0;e<t.length;e++)vf(t[e])}}function Tm(e,t){return e(t)}function Im(){}var ca=!1;function _m(e,t,n){if(ca)return e(t,n);ca=!0;try{return Tm(e,t,n)}finally{ca=!1,(ci!==null||di!==null)&&(Im(),Pm())}}function Po(e,t){var n=e.stateNode;if(n===null)return null;var r=Dl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(F(231,t,typeof n));return n}var mu=!1;if(kn)try{var Xi={};Object.defineProperty(Xi,"passive",{get:function(){mu=!0}}),window.addEventListener("test",Xi,Xi),window.removeEventListener("test",Xi,Xi)}catch{mu=!1}function W1(e,t,n,r,i,o,s,l,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var mo=!1,el=null,tl=!1,gu=null,K1={onError:function(e){mo=!0,el=e}};function G1(e,t,n,r,i,o,s,l,a){mo=!1,el=null,W1.apply(K1,arguments)}function Y1(e,t,n,r,i,o,s,l,a){if(G1.apply(this,arguments),mo){if(mo){var c=el;mo=!1,el=null}else throw Error(F(198));tl||(tl=!0,gu=c)}}function Ur(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Lm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function bf(e){if(Ur(e)!==e)throw Error(F(188))}function X1(e){var t=e.alternate;if(!t){if(t=Ur(e),t===null)throw Error(F(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return bf(i),e;if(o===r)return bf(i),t;o=o.sibling}throw Error(F(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?e:t}function Rm(e){return e=X1(e),e!==null?Am(e):null}function Am(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Am(e);if(t!==null)return t;e=e.sibling}return null}var zm=Ct.unstable_scheduleCallback,kf=Ct.unstable_cancelCallback,J1=Ct.unstable_shouldYield,Z1=Ct.unstable_requestPaint,Ee=Ct.unstable_now,ev=Ct.unstable_getCurrentPriorityLevel,Mc=Ct.unstable_ImmediatePriority,Fm=Ct.unstable_UserBlockingPriority,nl=Ct.unstable_NormalPriority,tv=Ct.unstable_LowPriority,Dm=Ct.unstable_IdlePriority,Rl=null,tn=null;function nv(e){if(tn&&typeof tn.onCommitFiberRoot=="function")try{tn.onCommitFiberRoot(Rl,e,void 0,(e.current.flags&128)===128)}catch{}}var Ut=Math.clz32?Math.clz32:ov,rv=Math.log,iv=Math.LN2;function ov(e){return e>>>=0,e===0?32:31-(rv(e)/iv|0)|0}var ys=64,vs=4194304;function co(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function rl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=co(l):(o&=s,o!==0&&(r=co(o)))}else s=n&~i,s!==0?r=co(s):o!==0&&(r=co(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ut(t),i=1<<n,r|=e[n],t&=~i;return r}function sv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function lv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Ut(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=sv(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function xu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Mm(){var e=ys;return ys<<=1,!(ys&4194240)&&(ys=64),e}function da(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ns(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ut(t),e[t]=n}function av(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ut(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Oc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ut(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ce=0;function Om(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var $m,$c,Bm,Um,Hm,yu=!1,bs=[],Gn=null,Yn=null,Xn=null,To=new Map,Io=new Map,An=[],uv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function wf(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Yn=null;break;case"mouseover":case"mouseout":Xn=null;break;case"pointerover":case"pointerout":To.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Io.delete(t.pointerId)}}function Ji(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=is(t),t!==null&&$c(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function cv(e,t,n,r,i){switch(t){case"focusin":return Gn=Ji(Gn,e,t,n,r,i),!0;case"dragenter":return Yn=Ji(Yn,e,t,n,r,i),!0;case"mouseover":return Xn=Ji(Xn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return To.set(o,Ji(To.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Io.set(o,Ji(Io.get(o)||null,e,t,n,r,i)),!0}return!1}function qm(e){var t=yr(e.target);if(t!==null){var n=Ur(t);if(n!==null){if(t=n.tag,t===13){if(t=Lm(n),t!==null){e.blockedOn=t,Hm(e.priority,function(){Bm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ms(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pu=r,n.target.dispatchEvent(r),pu=null}else return t=is(n),t!==null&&$c(t),e.blockedOn=n,!1;t.shift()}return!0}function Sf(e,t,n){Ms(e)&&n.delete(t)}function dv(){yu=!1,Gn!==null&&Ms(Gn)&&(Gn=null),Yn!==null&&Ms(Yn)&&(Yn=null),Xn!==null&&Ms(Xn)&&(Xn=null),To.forEach(Sf),Io.forEach(Sf)}function Zi(e,t){e.blockedOn===t&&(e.blockedOn=null,yu||(yu=!0,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,dv)))}function _o(e){function t(i){return Zi(i,e)}if(0<bs.length){Zi(bs[0],e);for(var n=1;n<bs.length;n++){var r=bs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gn!==null&&Zi(Gn,e),Yn!==null&&Zi(Yn,e),Xn!==null&&Zi(Xn,e),To.forEach(t),Io.forEach(t),n=0;n<An.length;n++)r=An[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<An.length&&(n=An[0],n.blockedOn===null);)qm(n),n.blockedOn===null&&An.shift()}var fi=jn.ReactCurrentBatchConfig,il=!0;function fv(e,t,n,r){var i=ce,o=fi.transition;fi.transition=null;try{ce=1,Bc(e,t,n,r)}finally{ce=i,fi.transition=o}}function pv(e,t,n,r){var i=ce,o=fi.transition;fi.transition=null;try{ce=4,Bc(e,t,n,r)}finally{ce=i,fi.transition=o}}function Bc(e,t,n,r){if(il){var i=vu(e,t,n,r);if(i===null)ka(e,t,r,ol,n),wf(e,r);else if(cv(i,e,t,n,r))r.stopPropagation();else if(wf(e,r),t&4&&-1<uv.indexOf(e)){for(;i!==null;){var o=is(i);if(o!==null&&$m(o),o=vu(e,t,n,r),o===null&&ka(e,t,r,ol,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else ka(e,t,r,null,n)}}var ol=null;function vu(e,t,n,r){if(ol=null,e=Dc(r),e=yr(e),e!==null)if(t=Ur(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Lm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ol=e,null}function Qm(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ev()){case Mc:return 1;case Fm:return 4;case nl:case tv:return 16;case Dm:return 536870912;default:return 16}default:return 16}}var Vn=null,Uc=null,Os=null;function Vm(){if(Os)return Os;var e,t=Uc,n=t.length,r,i="value"in Vn?Vn.value:Vn.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Os=i.slice(e,1<r?1-r:void 0)}function $s(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ks(){return!0}function Cf(){return!1}function Nt(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ks:Cf,this.isPropagationStopped=Cf,this}return Ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ks)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ks)},persist:function(){},isPersistent:ks}),t}var Oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hc=Nt(Oi),rs=Ce({},Oi,{view:0,detail:0}),hv=Nt(rs),fa,pa,eo,Al=Ce({},rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==eo&&(eo&&e.type==="mousemove"?(fa=e.screenX-eo.screenX,pa=e.screenY-eo.screenY):pa=fa=0,eo=e),fa)},movementY:function(e){return"movementY"in e?e.movementY:pa}}),jf=Nt(Al),mv=Ce({},Al,{dataTransfer:0}),gv=Nt(mv),xv=Ce({},rs,{relatedTarget:0}),ha=Nt(xv),yv=Ce({},Oi,{animationName:0,elapsedTime:0,pseudoElement:0}),vv=Nt(yv),bv=Ce({},Oi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kv=Nt(bv),wv=Ce({},Oi,{data:0}),Nf=Nt(wv),Sv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cv={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"},jv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jv[e])?!!t[e]:!1}function qc(){return Nv}var Ev=Ce({},rs,{key:function(e){if(e.key){var t=Sv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$s(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Cv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qc,charCode:function(e){return e.type==="keypress"?$s(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$s(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Pv=Nt(Ev),Tv=Ce({},Al,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ef=Nt(Tv),Iv=Ce({},rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qc}),_v=Nt(Iv),Lv=Ce({},Oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rv=Nt(Lv),Av=Ce({},Al,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zv=Nt(Av),Fv=[9,13,27,32],Qc=kn&&"CompositionEvent"in window,go=null;kn&&"documentMode"in document&&(go=document.documentMode);var Dv=kn&&"TextEvent"in window&&!go,Wm=kn&&(!Qc||go&&8<go&&11>=go),Pf=" ",Tf=!1;function Km(e,t){switch(e){case"keyup":return Fv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zr=!1;function Mv(e,t){switch(e){case"compositionend":return Gm(t);case"keypress":return t.which!==32?null:(Tf=!0,Pf);case"textInput":return e=t.data,e===Pf&&Tf?null:e;default:return null}}function Ov(e,t){if(Zr)return e==="compositionend"||!Qc&&Km(e,t)?(e=Vm(),Os=Uc=Vn=null,Zr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wm&&t.locale!=="ko"?null:t.data;default:return null}}var $v={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 If(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$v[e.type]:t==="textarea"}function Ym(e,t,n,r){Em(r),t=sl(t,"onChange"),0<t.length&&(n=new Hc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var xo=null,Lo=null;function Bv(e){lg(e,0)}function zl(e){var t=ni(e);if(bm(t))return e}function Uv(e,t){if(e==="change")return t}var Xm=!1;if(kn){var ma;if(kn){var ga="oninput"in document;if(!ga){var _f=document.createElement("div");_f.setAttribute("oninput","return;"),ga=typeof _f.oninput=="function"}ma=ga}else ma=!1;Xm=ma&&(!document.documentMode||9<document.documentMode)}function Lf(){xo&&(xo.detachEvent("onpropertychange",Jm),Lo=xo=null)}function Jm(e){if(e.propertyName==="value"&&zl(Lo)){var t=[];Ym(t,Lo,e,Dc(e)),_m(Bv,t)}}function Hv(e,t,n){e==="focusin"?(Lf(),xo=t,Lo=n,xo.attachEvent("onpropertychange",Jm)):e==="focusout"&&Lf()}function qv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zl(Lo)}function Qv(e,t){if(e==="click")return zl(t)}function Vv(e,t){if(e==="input"||e==="change")return zl(t)}function Wv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qt=typeof Object.is=="function"?Object.is:Wv;function Ro(e,t){if(Qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!tu.call(t,i)||!Qt(e[i],t[i]))return!1}return!0}function Rf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Af(e,t){var n=Rf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Rf(n)}}function Zm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eg(){for(var e=window,t=Zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zs(e.document)}return t}function Vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Kv(e){var t=eg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zm(n.ownerDocument.documentElement,n)){if(r!==null&&Vc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Af(n,o);var s=Af(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Gv=kn&&"documentMode"in document&&11>=document.documentMode,ei=null,bu=null,yo=null,ku=!1;function zf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ku||ei==null||ei!==Zs(r)||(r=ei,"selectionStart"in r&&Vc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yo&&Ro(yo,r)||(yo=r,r=sl(bu,"onSelect"),0<r.length&&(t=new Hc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ei)))}function ws(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ti={animationend:ws("Animation","AnimationEnd"),animationiteration:ws("Animation","AnimationIteration"),animationstart:ws("Animation","AnimationStart"),transitionend:ws("Transition","TransitionEnd")},xa={},tg={};kn&&(tg=document.createElement("div").style,"AnimationEvent"in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),"TransitionEvent"in window||delete ti.transitionend.transition);function Fl(e){if(xa[e])return xa[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in tg)return xa[e]=t[n];return e}var ng=Fl("animationend"),rg=Fl("animationiteration"),ig=Fl("animationstart"),og=Fl("transitionend"),sg=new Map,Ff="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function lr(e,t){sg.set(e,t),Br(t,[e])}for(var ya=0;ya<Ff.length;ya++){var va=Ff[ya],Yv=va.toLowerCase(),Xv=va[0].toUpperCase()+va.slice(1);lr(Yv,"on"+Xv)}lr(ng,"onAnimationEnd");lr(rg,"onAnimationIteration");lr(ig,"onAnimationStart");lr("dblclick","onDoubleClick");lr("focusin","onFocus");lr("focusout","onBlur");lr(og,"onTransitionEnd");Ii("onMouseEnter",["mouseout","mouseover"]);Ii("onMouseLeave",["mouseout","mouseover"]);Ii("onPointerEnter",["pointerout","pointerover"]);Ii("onPointerLeave",["pointerout","pointerover"]);Br("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Br("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Br("onBeforeInput",["compositionend","keypress","textInput","paste"]);Br("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Br("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Br("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fo="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(" "),Jv=new Set("cancel close invalid load scroll toggle".split(" ").concat(fo));function Df(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Y1(r,t,void 0,e),e.currentTarget=null}function lg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,c=l.currentTarget;if(l=l.listener,a!==o&&i.isPropagationStopped())break e;Df(i,l,c),o=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,c=l.currentTarget,l=l.listener,a!==o&&i.isPropagationStopped())break e;Df(i,l,c),o=a}}}if(tl)throw e=gu,tl=!1,gu=null,e}function xe(e,t){var n=t[Nu];n===void 0&&(n=t[Nu]=new Set);var r=e+"__bubble";n.has(r)||(ag(t,e,2,!1),n.add(r))}function ba(e,t,n){var r=0;t&&(r|=4),ag(n,e,r,t)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function Ao(e){if(!e[Ss]){e[Ss]=!0,mm.forEach(function(n){n!=="selectionchange"&&(Jv.has(n)||ba(n,!1,e),ba(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ss]||(t[Ss]=!0,ba("selectionchange",!1,t))}}function ag(e,t,n,r){switch(Qm(t)){case 1:var i=fv;break;case 4:i=pv;break;default:i=Bc}n=i.bind(null,t,n,e),i=void 0,!mu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ka(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;l!==null;){if(s=yr(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}_m(function(){var c=o,f=Dc(n),d=[];e:{var p=sg.get(e);if(p!==void 0){var h=Hc,g=e;switch(e){case"keypress":if($s(n)===0)break e;case"keydown":case"keyup":h=Pv;break;case"focusin":g="focus",h=ha;break;case"focusout":g="blur",h=ha;break;case"beforeblur":case"afterblur":h=ha;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=jf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=gv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=_v;break;case ng:case rg:case ig:h=vv;break;case og:h=Rv;break;case"scroll":h=hv;break;case"wheel":h=zv;break;case"copy":case"cut":case"paste":h=kv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ef}var v=(t&4)!==0,k=!v&&e==="scroll",m=v?p!==null?p+"Capture":null:p;v=[];for(var x=c,y;x!==null;){y=x;var w=y.stateNode;if(y.tag===5&&w!==null&&(y=w,m!==null&&(w=Po(x,m),w!=null&&v.push(zo(x,w,y)))),k)break;x=x.return}0<v.length&&(p=new h(p,g,null,n,f),d.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==pu&&(g=n.relatedTarget||n.fromElement)&&(yr(g)||g[wn]))break e;if((h||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=c,g=g?yr(g):null,g!==null&&(k=Ur(g),g!==k||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=c),h!==g)){if(v=jf,w="onMouseLeave",m="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(v=Ef,w="onPointerLeave",m="onPointerEnter",x="pointer"),k=h==null?p:ni(h),y=g==null?p:ni(g),p=new v(w,x+"leave",h,n,f),p.target=k,p.relatedTarget=y,w=null,yr(f)===c&&(v=new v(m,x+"enter",g,n,f),v.target=y,v.relatedTarget=k,w=v),k=w,h&&g)t:{for(v=h,m=g,x=0,y=v;y;y=Wr(y))x++;for(y=0,w=m;w;w=Wr(w))y++;for(;0<x-y;)v=Wr(v),x--;for(;0<y-x;)m=Wr(m),y--;for(;x--;){if(v===m||m!==null&&v===m.alternate)break t;v=Wr(v),m=Wr(m)}v=null}else v=null;h!==null&&Mf(d,p,h,v,!1),g!==null&&k!==null&&Mf(d,k,g,v,!0)}}e:{if(p=c?ni(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var E=Uv;else if(If(p))if(Xm)E=Vv;else{E=qv;var S=Hv}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=Qv);if(E&&(E=E(e,c))){Ym(d,E,n,f);break e}S&&S(e,p,c),e==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&au(p,"number",p.value)}switch(S=c?ni(c):window,e){case"focusin":(If(S)||S.contentEditable==="true")&&(ei=S,bu=c,yo=null);break;case"focusout":yo=bu=ei=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,zf(d,n,f);break;case"selectionchange":if(Gv)break;case"keydown":case"keyup":zf(d,n,f)}var T;if(Qc)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else Zr?Km(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(Wm&&n.locale!=="ko"&&(Zr||I!=="onCompositionStart"?I==="onCompositionEnd"&&Zr&&(T=Vm()):(Vn=f,Uc="value"in Vn?Vn.value:Vn.textContent,Zr=!0)),S=sl(c,I),0<S.length&&(I=new Nf(I,e,null,n,f),d.push({event:I,listeners:S}),T?I.data=T:(T=Gm(n),T!==null&&(I.data=T)))),(T=Dv?Mv(e,n):Ov(e,n))&&(c=sl(c,"onBeforeInput"),0<c.length&&(f=new Nf("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=T))}lg(d,t)})}function zo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function sl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Po(e,n),o!=null&&r.unshift(zo(e,o,i)),o=Po(e,t),o!=null&&r.push(zo(e,o,i))),e=e.return}return r}function Wr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Mf(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,c=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&c!==null&&(l=c,i?(a=Po(n,o),a!=null&&s.unshift(zo(n,a,l))):i||(a=Po(n,o),a!=null&&s.push(zo(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Zv=/\r\n?/g,e0=/\u0000|\uFFFD/g;function Of(e){return(typeof e=="string"?e:""+e).replace(Zv,`
38
+ `).replace(e0,"")}function Cs(e,t,n){if(t=Of(t),Of(e)!==t&&n)throw Error(F(425))}function ll(){}var wu=null,Su=null;function Cu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ju=typeof setTimeout=="function"?setTimeout:void 0,t0=typeof clearTimeout=="function"?clearTimeout:void 0,$f=typeof Promise=="function"?Promise:void 0,n0=typeof queueMicrotask=="function"?queueMicrotask:typeof $f<"u"?function(e){return $f.resolve(null).then(e).catch(r0)}:ju;function r0(e){setTimeout(function(){throw e})}function wa(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),_o(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);_o(t)}function Jn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Bf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var $i=Math.random().toString(36).slice(2),en="__reactFiber$"+$i,Fo="__reactProps$"+$i,wn="__reactContainer$"+$i,Nu="__reactEvents$"+$i,i0="__reactListeners$"+$i,o0="__reactHandles$"+$i;function yr(e){var t=e[en];if(t)return t;for(var n=e.parentNode;n;){if(t=n[wn]||n[en]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bf(e);e!==null;){if(n=e[en])return n;e=Bf(e)}return t}e=n,n=e.parentNode}return null}function is(e){return e=e[en]||e[wn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ni(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(F(33))}function Dl(e){return e[Fo]||null}var Eu=[],ri=-1;function ar(e){return{current:e}}function ye(e){0>ri||(e.current=Eu[ri],Eu[ri]=null,ri--)}function me(e,t){ri++,Eu[ri]=e.current,e.current=t}var sr={},Ge=ar(sr),dt=ar(!1),Rr=sr;function _i(e,t){var n=e.type.contextTypes;if(!n)return sr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ft(e){return e=e.childContextTypes,e!=null}function al(){ye(dt),ye(Ge)}function Uf(e,t,n){if(Ge.current!==sr)throw Error(F(168));me(Ge,t),me(dt,n)}function ug(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(F(108,H1(e)||"Unknown",i));return Ce({},n,r)}function ul(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,Rr=Ge.current,me(Ge,e),me(dt,dt.current),!0}function Hf(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=ug(e,t,Rr),r.__reactInternalMemoizedMergedChildContext=e,ye(dt),ye(Ge),me(Ge,e)):ye(dt),me(dt,n)}var fn=null,Ml=!1,Sa=!1;function cg(e){fn===null?fn=[e]:fn.push(e)}function s0(e){Ml=!0,cg(e)}function ur(){if(!Sa&&fn!==null){Sa=!0;var e=0,t=ce;try{var n=fn;for(ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}fn=null,Ml=!1}catch(i){throw fn!==null&&(fn=fn.slice(e+1)),zm(Mc,ur),i}finally{ce=t,Sa=!1}}return null}var ii=[],oi=0,cl=null,dl=0,Pt=[],Tt=0,Ar=null,xn=1,yn="";function mr(e,t){ii[oi++]=dl,ii[oi++]=cl,cl=e,dl=t}function dg(e,t,n){Pt[Tt++]=xn,Pt[Tt++]=yn,Pt[Tt++]=Ar,Ar=e;var r=xn;e=yn;var i=32-Ut(r)-1;r&=~(1<<i),n+=1;var o=32-Ut(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,xn=1<<32-Ut(t)+i|n<<i|r,yn=o+e}else xn=1<<o|n<<i|r,yn=e}function Wc(e){e.return!==null&&(mr(e,1),dg(e,1,0))}function Kc(e){for(;e===cl;)cl=ii[--oi],ii[oi]=null,dl=ii[--oi],ii[oi]=null;for(;e===Ar;)Ar=Pt[--Tt],Pt[Tt]=null,yn=Pt[--Tt],Pt[Tt]=null,xn=Pt[--Tt],Pt[Tt]=null}var wt=null,kt=null,be=!1,Bt=null;function fg(e,t){var n=_t(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function qf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,wt=e,kt=Jn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,wt=e,kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ar!==null?{id:xn,overflow:yn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=_t(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,wt=e,kt=null,!0):!1;default:return!1}}function Pu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Tu(e){if(be){var t=kt;if(t){var n=t;if(!qf(e,t)){if(Pu(e))throw Error(F(418));t=Jn(n.nextSibling);var r=wt;t&&qf(e,t)?fg(r,n):(e.flags=e.flags&-4097|2,be=!1,wt=e)}}else{if(Pu(e))throw Error(F(418));e.flags=e.flags&-4097|2,be=!1,wt=e}}}function Qf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;wt=e}function js(e){if(e!==wt)return!1;if(!be)return Qf(e),be=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Cu(e.type,e.memoizedProps)),t&&(t=kt)){if(Pu(e))throw pg(),Error(F(418));for(;t;)fg(e,t),t=Jn(t.nextSibling)}if(Qf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){kt=Jn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}kt=null}}else kt=wt?Jn(e.stateNode.nextSibling):null;return!0}function pg(){for(var e=kt;e;)e=Jn(e.nextSibling)}function Li(){kt=wt=null,be=!1}function Gc(e){Bt===null?Bt=[e]:Bt.push(e)}var l0=jn.ReactCurrentBatchConfig;function to(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(F(309));var r=n.stateNode}if(!r)throw Error(F(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(F(284));if(!n._owner)throw Error(F(290,e))}return e}function Ns(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Vf(e){var t=e._init;return t(e._payload)}function hg(e){function t(m,x){if(e){var y=m.deletions;y===null?(m.deletions=[x],m.flags|=16):y.push(x)}}function n(m,x){if(!e)return null;for(;x!==null;)t(m,x),x=x.sibling;return null}function r(m,x){for(m=new Map;x!==null;)x.key!==null?m.set(x.key,x):m.set(x.index,x),x=x.sibling;return m}function i(m,x){return m=nr(m,x),m.index=0,m.sibling=null,m}function o(m,x,y){return m.index=y,e?(y=m.alternate,y!==null?(y=y.index,y<x?(m.flags|=2,x):y):(m.flags|=2,x)):(m.flags|=1048576,x)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,x,y,w){return x===null||x.tag!==6?(x=Ia(y,m.mode,w),x.return=m,x):(x=i(x,y),x.return=m,x)}function a(m,x,y,w){var E=y.type;return E===Jr?f(m,x,y.props.children,w,y.key):x!==null&&(x.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ln&&Vf(E)===x.type)?(w=i(x,y.props),w.ref=to(m,x,y),w.return=m,w):(w=Ws(y.type,y.key,y.props,null,m.mode,w),w.ref=to(m,x,y),w.return=m,w)}function c(m,x,y,w){return x===null||x.tag!==4||x.stateNode.containerInfo!==y.containerInfo||x.stateNode.implementation!==y.implementation?(x=_a(y,m.mode,w),x.return=m,x):(x=i(x,y.children||[]),x.return=m,x)}function f(m,x,y,w,E){return x===null||x.tag!==7?(x=Lr(y,m.mode,w,E),x.return=m,x):(x=i(x,y),x.return=m,x)}function d(m,x,y){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Ia(""+x,m.mode,y),x.return=m,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ms:return y=Ws(x.type,x.key,x.props,null,m.mode,y),y.ref=to(m,null,x),y.return=m,y;case Xr:return x=_a(x,m.mode,y),x.return=m,x;case Ln:var w=x._init;return d(m,w(x._payload),y)}if(uo(x)||Yi(x))return x=Lr(x,m.mode,y,null),x.return=m,x;Ns(m,x)}return null}function p(m,x,y,w){var E=x!==null?x.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:l(m,x,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ms:return y.key===E?a(m,x,y,w):null;case Xr:return y.key===E?c(m,x,y,w):null;case Ln:return E=y._init,p(m,x,E(y._payload),w)}if(uo(y)||Yi(y))return E!==null?null:f(m,x,y,w,null);Ns(m,y)}return null}function h(m,x,y,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return m=m.get(y)||null,l(x,m,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ms:return m=m.get(w.key===null?y:w.key)||null,a(x,m,w,E);case Xr:return m=m.get(w.key===null?y:w.key)||null,c(x,m,w,E);case Ln:var S=w._init;return h(m,x,y,S(w._payload),E)}if(uo(w)||Yi(w))return m=m.get(y)||null,f(x,m,w,E,null);Ns(x,w)}return null}function g(m,x,y,w){for(var E=null,S=null,T=x,I=x=0,R=null;T!==null&&I<y.length;I++){T.index>I?(R=T,T=null):R=T.sibling;var j=p(m,T,y[I],w);if(j===null){T===null&&(T=R);break}e&&T&&j.alternate===null&&t(m,T),x=o(j,x,I),S===null?E=j:S.sibling=j,S=j,T=R}if(I===y.length)return n(m,T),be&&mr(m,I),E;if(T===null){for(;I<y.length;I++)T=d(m,y[I],w),T!==null&&(x=o(T,x,I),S===null?E=T:S.sibling=T,S=T);return be&&mr(m,I),E}for(T=r(m,T);I<y.length;I++)R=h(T,m,I,y[I],w),R!==null&&(e&&R.alternate!==null&&T.delete(R.key===null?I:R.key),x=o(R,x,I),S===null?E=R:S.sibling=R,S=R);return e&&T.forEach(function(_){return t(m,_)}),be&&mr(m,I),E}function v(m,x,y,w){var E=Yi(y);if(typeof E!="function")throw Error(F(150));if(y=E.call(y),y==null)throw Error(F(151));for(var S=E=null,T=x,I=x=0,R=null,j=y.next();T!==null&&!j.done;I++,j=y.next()){T.index>I?(R=T,T=null):R=T.sibling;var _=p(m,T,j.value,w);if(_===null){T===null&&(T=R);break}e&&T&&_.alternate===null&&t(m,T),x=o(_,x,I),S===null?E=_:S.sibling=_,S=_,T=R}if(j.done)return n(m,T),be&&mr(m,I),E;if(T===null){for(;!j.done;I++,j=y.next())j=d(m,j.value,w),j!==null&&(x=o(j,x,I),S===null?E=j:S.sibling=j,S=j);return be&&mr(m,I),E}for(T=r(m,T);!j.done;I++,j=y.next())j=h(T,m,I,j.value,w),j!==null&&(e&&j.alternate!==null&&T.delete(j.key===null?I:j.key),x=o(j,x,I),S===null?E=j:S.sibling=j,S=j);return e&&T.forEach(function(A){return t(m,A)}),be&&mr(m,I),E}function k(m,x,y,w){if(typeof y=="object"&&y!==null&&y.type===Jr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ms:e:{for(var E=y.key,S=x;S!==null;){if(S.key===E){if(E=y.type,E===Jr){if(S.tag===7){n(m,S.sibling),x=i(S,y.props.children),x.return=m,m=x;break e}}else if(S.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ln&&Vf(E)===S.type){n(m,S.sibling),x=i(S,y.props),x.ref=to(m,S,y),x.return=m,m=x;break e}n(m,S);break}else t(m,S);S=S.sibling}y.type===Jr?(x=Lr(y.props.children,m.mode,w,y.key),x.return=m,m=x):(w=Ws(y.type,y.key,y.props,null,m.mode,w),w.ref=to(m,x,y),w.return=m,m=w)}return s(m);case Xr:e:{for(S=y.key;x!==null;){if(x.key===S)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(m,x.sibling),x=i(x,y.children||[]),x.return=m,m=x;break e}else{n(m,x);break}else t(m,x);x=x.sibling}x=_a(y,m.mode,w),x.return=m,m=x}return s(m);case Ln:return S=y._init,k(m,x,S(y._payload),w)}if(uo(y))return g(m,x,y,w);if(Yi(y))return v(m,x,y,w);Ns(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(m,x.sibling),x=i(x,y),x.return=m,m=x):(n(m,x),x=Ia(y,m.mode,w),x.return=m,m=x),s(m)):n(m,x)}return k}var Ri=hg(!0),mg=hg(!1),fl=ar(null),pl=null,si=null,Yc=null;function Xc(){Yc=si=pl=null}function Jc(e){var t=fl.current;ye(fl),e._currentValue=t}function Iu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function pi(e,t){pl=e,Yc=si=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ct=!0),e.firstContext=null)}function Rt(e){var t=e._currentValue;if(Yc!==e)if(e={context:e,memoizedValue:t,next:null},si===null){if(pl===null)throw Error(F(308));si=e,pl.dependencies={lanes:0,firstContext:e}}else si=si.next=e;return t}var vr=null;function Zc(e){vr===null?vr=[e]:vr.push(e)}function gg(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Zc(t)):(n.next=i.next,i.next=n),t.interleaved=n,Sn(e,r)}function Sn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Rn=!1;function ed(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function vn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ae&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Sn(e,n)}return i=r.interleaved,i===null?(t.next=t,Zc(r)):(t.next=i.next,i.next=t),r.interleaved=t,Sn(e,n)}function Bs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Oc(e,n)}}function Wf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hl(e,t,n,r){var i=e.updateQueue;Rn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,c=a.next;a.next=null,s===null?o=c:s.next=c,s=a;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==s&&(l===null?f.firstBaseUpdate=c:l.next=c,f.lastBaseUpdate=a))}if(o!==null){var d=i.baseState;s=0,f=c=a=null,l=o;do{var p=l.lane,h=l.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,v=l;switch(p=t,h=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(h,d,p);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,p=typeof g=="function"?g.call(h,d,p):g,p==null)break e;d=Ce({},d,p);break e;case 2:Rn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else h={eventTime:h,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(c=f=h,a=d):f=f.next=h,s|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(a=d),i.baseState=a,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Fr|=s,e.lanes=s,e.memoizedState=d}}function Kf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(F(191,i));i.call(r)}}}var os={},nn=ar(os),Do=ar(os),Mo=ar(os);function br(e){if(e===os)throw Error(F(174));return e}function td(e,t){switch(me(Mo,t),me(Do,e),me(nn,os),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:cu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=cu(t,e)}ye(nn),me(nn,t)}function Ai(){ye(nn),ye(Do),ye(Mo)}function yg(e){br(Mo.current);var t=br(nn.current),n=cu(t,e.type);t!==n&&(me(Do,e),me(nn,n))}function nd(e){Do.current===e&&(ye(nn),ye(Do))}var we=ar(0);function ml(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ca=[];function rd(){for(var e=0;e<Ca.length;e++)Ca[e]._workInProgressVersionPrimary=null;Ca.length=0}var Us=jn.ReactCurrentDispatcher,ja=jn.ReactCurrentBatchConfig,zr=0,Se=null,_e=null,De=null,gl=!1,vo=!1,Oo=0,a0=0;function qe(){throw Error(F(321))}function id(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qt(e[n],t[n]))return!1;return!0}function od(e,t,n,r,i,o){if(zr=o,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Us.current=e===null||e.memoizedState===null?f0:p0,e=n(r,i),vo){o=0;do{if(vo=!1,Oo=0,25<=o)throw Error(F(301));o+=1,De=_e=null,t.updateQueue=null,Us.current=h0,e=n(r,i)}while(vo)}if(Us.current=xl,t=_e!==null&&_e.next!==null,zr=0,De=_e=Se=null,gl=!1,t)throw Error(F(300));return e}function sd(){var e=Oo!==0;return Oo=0,e}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?Se.memoizedState=De=e:De=De.next=e,De}function At(){if(_e===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=De===null?Se.memoizedState:De.next;if(t!==null)De=t,_e=e;else{if(e===null)throw Error(F(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},De===null?Se.memoizedState=De=e:De=De.next=e}return De}function $o(e,t){return typeof t=="function"?t(e):t}function Na(e){var t=At(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=_e,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,c=o;do{var f=c.lane;if((zr&f)===f)a!==null&&(a=a.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(l=a=d,s=r):a=a.next=d,Se.lanes|=f,Fr|=f}c=c.next}while(c!==null&&c!==o);a===null?s=r:a.next=l,Qt(r,t.memoizedState)||(ct=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Se.lanes|=o,Fr|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ea(e){var t=At(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Qt(o,t.memoizedState)||(ct=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function vg(){}function bg(e,t){var n=Se,r=At(),i=t(),o=!Qt(r.memoizedState,i);if(o&&(r.memoizedState=i,ct=!0),r=r.queue,ld(Sg.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||De!==null&&De.memoizedState.tag&1){if(n.flags|=2048,Bo(9,wg.bind(null,n,r,i,t),void 0,null),Me===null)throw Error(F(349));zr&30||kg(n,t,i)}return i}function kg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wg(e,t,n,r){t.value=n,t.getSnapshot=r,Cg(t)&&jg(e)}function Sg(e,t,n){return n(function(){Cg(t)&&jg(e)})}function Cg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qt(e,n)}catch{return!0}}function jg(e){var t=Sn(e,1);t!==null&&Ht(t,e,1,-1)}function Gf(e){var t=Gt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:e},t.queue=e,e=e.dispatch=d0.bind(null,Se,e),[t.memoizedState,e]}function Bo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Ng(){return At().memoizedState}function Hs(e,t,n,r){var i=Gt();Se.flags|=e,i.memoizedState=Bo(1|t,n,void 0,r===void 0?null:r)}function Ol(e,t,n,r){var i=At();r=r===void 0?null:r;var o=void 0;if(_e!==null){var s=_e.memoizedState;if(o=s.destroy,r!==null&&id(r,s.deps)){i.memoizedState=Bo(t,n,o,r);return}}Se.flags|=e,i.memoizedState=Bo(1|t,n,o,r)}function Yf(e,t){return Hs(8390656,8,e,t)}function ld(e,t){return Ol(2048,8,e,t)}function Eg(e,t){return Ol(4,2,e,t)}function Pg(e,t){return Ol(4,4,e,t)}function Tg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ig(e,t,n){return n=n!=null?n.concat([e]):null,Ol(4,4,Tg.bind(null,t,e),n)}function ad(){}function _g(e,t){var n=At();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&id(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Lg(e,t){var n=At();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&id(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Rg(e,t,n){return zr&21?(Qt(n,t)||(n=Mm(),Se.lanes|=n,Fr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ct=!0),e.memoizedState=n)}function u0(e,t){var n=ce;ce=n!==0&&4>n?n:4,e(!0);var r=ja.transition;ja.transition={};try{e(!1),t()}finally{ce=n,ja.transition=r}}function Ag(){return At().memoizedState}function c0(e,t,n){var r=tr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zg(e))Fg(t,n);else if(n=gg(e,t,n,r),n!==null){var i=nt();Ht(n,e,r,i),Dg(n,t,r)}}function d0(e,t,n){var r=tr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zg(e))Fg(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Qt(l,s)){var a=t.interleaved;a===null?(i.next=i,Zc(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=gg(e,t,i,r),n!==null&&(i=nt(),Ht(n,e,r,i),Dg(n,t,r))}}function zg(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Fg(e,t){vo=gl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Oc(e,n)}}var xl={readContext:Rt,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},f0={readContext:Rt,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Yf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hs(4194308,4,Tg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hs(4,2,e,t)},useMemo:function(e,t){var n=Gt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Gt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=c0.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:Gf,useDebugValue:ad,useDeferredValue:function(e){return Gt().memoizedState=e},useTransition:function(){var e=Gf(!1),t=e[0];return e=u0.bind(null,e[1]),Gt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=Gt();if(be){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),Me===null)throw Error(F(349));zr&30||kg(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Yf(Sg.bind(null,r,o,e),[e]),r.flags|=2048,Bo(9,wg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Gt(),t=Me.identifierPrefix;if(be){var n=yn,r=xn;n=(r&~(1<<32-Ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Oo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=a0++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},p0={readContext:Rt,useCallback:_g,useContext:Rt,useEffect:ld,useImperativeHandle:Ig,useInsertionEffect:Eg,useLayoutEffect:Pg,useMemo:Lg,useReducer:Na,useRef:Ng,useState:function(){return Na($o)},useDebugValue:ad,useDeferredValue:function(e){var t=At();return Rg(t,_e.memoizedState,e)},useTransition:function(){var e=Na($o)[0],t=At().memoizedState;return[e,t]},useMutableSource:vg,useSyncExternalStore:bg,useId:Ag,unstable_isNewReconciler:!1},h0={readContext:Rt,useCallback:_g,useContext:Rt,useEffect:ld,useImperativeHandle:Ig,useInsertionEffect:Eg,useLayoutEffect:Pg,useMemo:Lg,useReducer:Ea,useRef:Ng,useState:function(){return Ea($o)},useDebugValue:ad,useDeferredValue:function(e){var t=At();return _e===null?t.memoizedState=e:Rg(t,_e.memoizedState,e)},useTransition:function(){var e=Ea($o)[0],t=At().memoizedState;return[e,t]},useMutableSource:vg,useSyncExternalStore:bg,useId:Ag,unstable_isNewReconciler:!1};function Mt(e,t){if(e&&e.defaultProps){t=Ce({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function _u(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $l={isMounted:function(e){return(e=e._reactInternals)?Ur(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nt(),i=tr(e),o=vn(r,i);o.payload=t,n!=null&&(o.callback=n),t=Zn(e,o,i),t!==null&&(Ht(t,e,i,r),Bs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nt(),i=tr(e),o=vn(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Zn(e,o,i),t!==null&&(Ht(t,e,i,r),Bs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nt(),r=tr(e),i=vn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Zn(e,i,r),t!==null&&(Ht(t,e,r,n),Bs(t,e,r))}};function Xf(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Ro(n,r)||!Ro(i,o):!0}function Mg(e,t,n){var r=!1,i=sr,o=t.contextType;return typeof o=="object"&&o!==null?o=Rt(o):(i=ft(t)?Rr:Ge.current,r=t.contextTypes,o=(r=r!=null)?_i(e,i):sr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$l,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Jf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&$l.enqueueReplaceState(t,t.state,null)}function Lu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ed(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Rt(o):(o=ft(t)?Rr:Ge.current,i.context=_i(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(_u(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&$l.enqueueReplaceState(i,i.state,null),hl(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function zi(e,t){try{var n="",r=t;do n+=U1(r),r=r.return;while(r);var i=n}catch(o){i=`
39
+ Error generating stack: `+o.message+`
40
+ `+o.stack}return{value:e,source:t,stack:i,digest:null}}function Pa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ru(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var m0=typeof WeakMap=="function"?WeakMap:Map;function Og(e,t,n){n=vn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){vl||(vl=!0,Hu=r),Ru(e,t)},n}function $g(e,t,n){n=vn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ru(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Ru(e,t),typeof r!="function"&&(er===null?er=new Set([this]):er.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Zf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new m0;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=T0.bind(null,e,t,n),t.then(e,e))}function ep(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function tp(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=vn(-1,1),t.tag=2,Zn(n,t,1))),n.lanes|=1),e)}var g0=jn.ReactCurrentOwner,ct=!1;function Ze(e,t,n,r){t.child=e===null?mg(t,null,n,r):Ri(t,e.child,n,r)}function np(e,t,n,r,i){n=n.render;var o=t.ref;return pi(t,i),r=od(e,t,n,r,o,i),n=sd(),e!==null&&!ct?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Cn(e,t,i)):(be&&n&&Wc(t),t.flags|=1,Ze(e,t,r,i),t.child)}function rp(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!gd(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Bg(e,t,o,r,i)):(e=Ws(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ro,n(s,r)&&e.ref===t.ref)return Cn(e,t,i)}return t.flags|=1,e=nr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Bg(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ro(o,r)&&e.ref===t.ref)if(ct=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(ct=!0);else return t.lanes=e.lanes,Cn(e,t,i)}return Au(e,t,n,r,i)}function Ug(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(ai,xt),xt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,me(ai,xt),xt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,me(ai,xt),xt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,me(ai,xt),xt|=r;return Ze(e,t,i,n),t.child}function Hg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Au(e,t,n,r,i){var o=ft(n)?Rr:Ge.current;return o=_i(t,o),pi(t,i),n=od(e,t,n,r,o,i),r=sd(),e!==null&&!ct?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Cn(e,t,i)):(be&&r&&Wc(t),t.flags|=1,Ze(e,t,n,i),t.child)}function ip(e,t,n,r,i){if(ft(n)){var o=!0;ul(t)}else o=!1;if(pi(t,i),t.stateNode===null)qs(e,t),Mg(t,n,r),Lu(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Rt(c):(c=ft(n)?Rr:Ge.current,c=_i(t,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==c)&&Jf(t,s,r,c),Rn=!1;var p=t.memoizedState;s.state=p,hl(t,r,s,i),a=t.memoizedState,l!==r||p!==a||dt.current||Rn?(typeof f=="function"&&(_u(t,n,f,r),a=t.memoizedState),(l=Rn||Xf(t,n,l,r,p,a,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=c,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,xg(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:Mt(t.type,l),s.props=c,d=t.pendingProps,p=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Rt(a):(a=ft(n)?Rr:Ge.current,a=_i(t,a));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||p!==a)&&Jf(t,s,r,a),Rn=!1,p=t.memoizedState,s.state=p,hl(t,r,s,i);var g=t.memoizedState;l!==d||p!==g||dt.current||Rn?(typeof h=="function"&&(_u(t,n,h,r),g=t.memoizedState),(c=Rn||Xf(t,n,c,r,p,g,a)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),s.props=r,s.state=g,s.context=a,r=c):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return zu(e,t,n,r,o,i)}function zu(e,t,n,r,i,o){Hg(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Hf(t,n,!1),Cn(e,t,o);r=t.stateNode,g0.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ri(t,e.child,null,o),t.child=Ri(t,null,l,o)):Ze(e,t,l,o),t.memoizedState=r.state,i&&Hf(t,n,!0),t.child}function qg(e){var t=e.stateNode;t.pendingContext?Uf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Uf(e,t.context,!1),td(e,t.containerInfo)}function op(e,t,n,r,i){return Li(),Gc(i),t.flags|=256,Ze(e,t,n,r),t.child}var Fu={dehydrated:null,treeContext:null,retryLane:0};function Du(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qg(e,t,n){var r=t.pendingProps,i=we.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),me(we,i&1),e===null)return Tu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Hl(s,r,0,null),e=Lr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Du(n),t.memoizedState=Fu,e):ud(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return x0(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=nr(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=nr(l,o):(o=Lr(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Du(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Fu,r}return o=e.child,e=o.sibling,r=nr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ud(e,t){return t=Hl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Es(e,t,n,r){return r!==null&&Gc(r),Ri(t,e.child,null,n),e=ud(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function x0(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Pa(Error(F(422))),Es(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Hl({mode:"visible",children:r.children},i,0,null),o=Lr(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Ri(t,e.child,null,s),t.child.memoizedState=Du(s),t.memoizedState=Fu,o);if(!(t.mode&1))return Es(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(F(419)),r=Pa(o,r,void 0),Es(e,t,s,r)}if(l=(s&e.childLanes)!==0,ct||l){if(r=Me,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Sn(e,i),Ht(r,e,i,-1))}return md(),r=Pa(Error(F(421))),Es(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=I0.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,kt=Jn(i.nextSibling),wt=t,be=!0,Bt=null,e!==null&&(Pt[Tt++]=xn,Pt[Tt++]=yn,Pt[Tt++]=Ar,xn=e.id,yn=e.overflow,Ar=t),t=ud(t,r.children),t.flags|=4096,t)}function sp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Iu(e.return,t,n)}function Ta(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Vg(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ze(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sp(e,n,t);else if(e.tag===19)sp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(me(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ml(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ta(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ml(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ta(t,!0,n,null,o);break;case"together":Ta(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Cn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Fr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=nr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=nr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function y0(e,t,n){switch(t.tag){case 3:qg(t),Li();break;case 5:yg(t);break;case 1:ft(t.type)&&ul(t);break;case 4:td(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;me(fl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(me(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Qg(e,t,n):(me(we,we.current&1),e=Cn(e,t,n),e!==null?e.sibling:null);me(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Vg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),me(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Ug(e,t,n)}return Cn(e,t,n)}var Wg,Mu,Kg,Gg;Wg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Mu=function(){};Kg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,br(nn.current);var o=null;switch(n){case"input":i=su(e,i),r=su(e,r),o=[];break;case"select":i=Ce({},i,{value:void 0}),r=Ce({},r,{value:void 0}),o=[];break;case"textarea":i=uu(e,i),r=uu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ll)}du(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var l=i[c];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(No.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var a=r[c];if(l=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&a!==l&&(a!=null||l!=null))if(c==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(No.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&xe("scroll",e),o||l===a||(o=[])):(o=o||[]).push(c,a))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};Gg=function(e,t,n,r){n!==r&&(t.flags|=4)};function no(e,t){if(!be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function v0(e,t,n){var r=t.pendingProps;switch(Kc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return ft(t.type)&&al(),Qe(t),null;case 3:return r=t.stateNode,Ai(),ye(dt),ye(Ge),rd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(js(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bt!==null&&(Vu(Bt),Bt=null))),Mu(e,t),Qe(t),null;case 5:nd(t);var i=br(Mo.current);if(n=t.type,e!==null&&t.stateNode!=null)Kg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(F(166));return Qe(t),null}if(e=br(nn.current),js(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[en]=t,r[Fo]=o,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(i=0;i<fo.length;i++)xe(fo[i],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":mf(r,o),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},xe("invalid",r);break;case"textarea":xf(r,o),xe("invalid",r)}du(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&Cs(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Cs(r.textContent,l,e),i=["children",""+l]):No.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&xe("scroll",r)}switch(n){case"input":gs(r),gf(r,o,!0);break;case"textarea":gs(r),yf(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=ll)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Sm(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[en]=t,e[Fo]=r,Wg(e,t,!1,!1),t.stateNode=e;e:{switch(s=fu(n,r),n){case"dialog":xe("cancel",e),xe("close",e),i=r;break;case"iframe":case"object":case"embed":xe("load",e),i=r;break;case"video":case"audio":for(i=0;i<fo.length;i++)xe(fo[i],e);i=r;break;case"source":xe("error",e),i=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),i=r;break;case"details":xe("toggle",e),i=r;break;case"input":mf(e,r),i=su(e,r),xe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ce({},r,{value:void 0}),xe("invalid",e);break;case"textarea":xf(e,r),i=uu(e,r),xe("invalid",e);break;default:i=r}du(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?Nm(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Cm(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Eo(e,a):typeof a=="number"&&Eo(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(No.hasOwnProperty(o)?a!=null&&o==="onScroll"&&xe("scroll",e):a!=null&&Rc(e,o,a,s))}switch(n){case"input":gs(e),gf(e,r,!1);break;case"textarea":gs(e),yf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+or(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?ui(e,!!r.multiple,o,!1):r.defaultValue!=null&&ui(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ll)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Qe(t),null;case 6:if(e&&t.stateNode!=null)Gg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(166));if(n=br(Mo.current),br(nn.current),js(t)){if(r=t.stateNode,n=t.memoizedProps,r[en]=t,(o=r.nodeValue!==n)&&(e=wt,e!==null))switch(e.tag){case 3:Cs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cs(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[en]=t,t.stateNode=r}return Qe(t),null;case 13:if(ye(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(be&&kt!==null&&t.mode&1&&!(t.flags&128))pg(),Li(),t.flags|=98560,o=!1;else if(o=js(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(F(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(F(317));o[en]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qe(t),o=!1}else Bt!==null&&(Vu(Bt),Bt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Ae===0&&(Ae=3):md())),t.updateQueue!==null&&(t.flags|=4),Qe(t),null);case 4:return Ai(),Mu(e,t),e===null&&Ao(t.stateNode.containerInfo),Qe(t),null;case 10:return Jc(t.type._context),Qe(t),null;case 17:return ft(t.type)&&al(),Qe(t),null;case 19:if(ye(we),o=t.memoizedState,o===null)return Qe(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)no(o,!1);else{if(Ae!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ml(e),s!==null){for(t.flags|=128,no(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return me(we,we.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ee()>Fi&&(t.flags|=128,r=!0,no(o,!1),t.lanes=4194304)}else{if(!r)if(e=ml(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),no(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!be)return Qe(t),null}else 2*Ee()-o.renderingStartTime>Fi&&n!==1073741824&&(t.flags|=128,r=!0,no(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ee(),t.sibling=null,n=we.current,me(we,r?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return hd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xt&1073741824&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function b0(e,t){switch(Kc(t),t.tag){case 1:return ft(t.type)&&al(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(),ye(dt),ye(Ge),rd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nd(t),null;case 13:if(ye(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(we),null;case 4:return Ai(),null;case 10:return Jc(t.type._context),null;case 22:case 23:return hd(),null;case 24:return null;default:return null}}var Ps=!1,We=!1,k0=typeof WeakSet=="function"?WeakSet:Set,$=null;function li(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Ou(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var lp=!1;function w0(e,t){if(wu=il,e=eg(),Vc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(l=s+i),d!==o||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++c===i&&(l=s),p===o&&++f===r&&(a=s),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Su={focusedElem:e,selectionRange:n},il=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,k=g.memoizedState,m=t.stateNode,x=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:Mt(t.type,v),k);m.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(w){Ne(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return g=lp,lp=!1,g}function bo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ou(t,n,o)}i=i.next}while(i!==r)}}function Bl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function $u(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Yg(e){var t=e.alternate;t!==null&&(e.alternate=null,Yg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[en],delete t[Fo],delete t[Nu],delete t[i0],delete t[o0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Xg(e){return e.tag===5||e.tag===3||e.tag===4}function ap(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ll));else if(r!==4&&(e=e.child,e!==null))for(Bu(e,t,n),e=e.sibling;e!==null;)Bu(e,t,n),e=e.sibling}function Uu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Uu(e,t,n),e=e.sibling;e!==null;)Uu(e,t,n),e=e.sibling}var $e=null,$t=!1;function En(e,t,n){for(n=n.child;n!==null;)Jg(e,t,n),n=n.sibling}function Jg(e,t,n){if(tn&&typeof tn.onCommitFiberUnmount=="function")try{tn.onCommitFiberUnmount(Rl,n)}catch{}switch(n.tag){case 5:We||li(n,t);case 6:var r=$e,i=$t;$e=null,En(e,t,n),$e=r,$t=i,$e!==null&&($t?(e=$e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):$e.removeChild(n.stateNode));break;case 18:$e!==null&&($t?(e=$e,n=n.stateNode,e.nodeType===8?wa(e.parentNode,n):e.nodeType===1&&wa(e,n),_o(e)):wa($e,n.stateNode));break;case 4:r=$e,i=$t,$e=n.stateNode.containerInfo,$t=!0,En(e,t,n),$e=r,$t=i;break;case 0:case 11:case 14:case 15:if(!We&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Ou(n,t,s),i=i.next}while(i!==r)}En(e,t,n);break;case 1:if(!We&&(li(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ne(n,t,l)}En(e,t,n);break;case 21:En(e,t,n);break;case 22:n.mode&1?(We=(r=We)||n.memoizedState!==null,En(e,t,n),We=r):En(e,t,n);break;default:En(e,t,n)}}function up(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new k0),t.forEach(function(r){var i=_0.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Dt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:$e=l.stateNode,$t=!1;break e;case 3:$e=l.stateNode.containerInfo,$t=!0;break e;case 4:$e=l.stateNode.containerInfo,$t=!0;break e}l=l.return}if($e===null)throw Error(F(160));Jg(o,s,i),$e=null,$t=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(c){Ne(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zg(t,e),t=t.sibling}function Zg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Dt(t,e),Kt(e),r&4){try{bo(3,e,e.return),Bl(3,e)}catch(v){Ne(e,e.return,v)}try{bo(5,e,e.return)}catch(v){Ne(e,e.return,v)}}break;case 1:Dt(t,e),Kt(e),r&512&&n!==null&&li(n,n.return);break;case 5:if(Dt(t,e),Kt(e),r&512&&n!==null&&li(n,n.return),e.flags&32){var i=e.stateNode;try{Eo(i,"")}catch(v){Ne(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&km(i,o),fu(l,s);var c=fu(l,o);for(s=0;s<a.length;s+=2){var f=a[s],d=a[s+1];f==="style"?Nm(i,d):f==="dangerouslySetInnerHTML"?Cm(i,d):f==="children"?Eo(i,d):Rc(i,f,d,c)}switch(l){case"input":lu(i,o);break;case"textarea":wm(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?ui(i,!!o.multiple,h,!1):p!==!!o.multiple&&(o.defaultValue!=null?ui(i,!!o.multiple,o.defaultValue,!0):ui(i,!!o.multiple,o.multiple?[]:"",!1))}i[Fo]=o}catch(v){Ne(e,e.return,v)}}break;case 6:if(Dt(t,e),Kt(e),r&4){if(e.stateNode===null)throw Error(F(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){Ne(e,e.return,v)}}break;case 3:if(Dt(t,e),Kt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{_o(t.containerInfo)}catch(v){Ne(e,e.return,v)}break;case 4:Dt(t,e),Kt(e);break;case 13:Dt(t,e),Kt(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(fd=Ee())),r&4&&up(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(We=(c=We)||f,Dt(t,e),We=c):Dt(t,e),Kt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for($=e,f=e.child;f!==null;){for(d=$=f;$!==null;){switch(p=$,h=p.child,p.tag){case 0:case 11:case 14:case 15:bo(4,p,p.return);break;case 1:li(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){Ne(r,n,v)}}break;case 5:li(p,p.return);break;case 22:if(p.memoizedState!==null){dp(d);continue}}h!==null?(h.return=p,$=h):dp(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,a=d.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=jm("display",s))}catch(v){Ne(e,e.return,v)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){Ne(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Dt(t,e),Kt(e),r&4&&up(e);break;case 21:break;default:Dt(t,e),Kt(e)}}function Kt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Xg(n)){var r=n;break e}n=n.return}throw Error(F(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Eo(i,""),r.flags&=-33);var o=ap(e);Uu(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=ap(e);Bu(e,l,s);break;default:throw Error(F(161))}}catch(a){Ne(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function S0(e,t,n){$=e,ex(e)}function ex(e,t,n){for(var r=(e.mode&1)!==0;$!==null;){var i=$,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Ps;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||We;l=Ps;var c=We;if(Ps=s,(We=a)&&!c)for($=i;$!==null;)s=$,a=s.child,s.tag===22&&s.memoizedState!==null?fp(i):a!==null?(a.return=s,$=a):fp(i);for(;o!==null;)$=o,ex(o),o=o.sibling;$=i,Ps=l,We=c}cp(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,$=o):cp(e)}}function cp(e){for(;$!==null;){var t=$;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:We||Bl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!We)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Mt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Kf(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Kf(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&_o(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(F(163))}We||t.flags&512&&$u(t)}catch(p){Ne(t,t.return,p)}}if(t===e){$=null;break}if(n=t.sibling,n!==null){n.return=t.return,$=n;break}$=t.return}}function dp(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var n=t.sibling;if(n!==null){n.return=t.return,$=n;break}$=t.return}}function fp(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Bl(4,t)}catch(a){Ne(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){Ne(t,i,a)}}var o=t.return;try{$u(t)}catch(a){Ne(t,o,a)}break;case 5:var s=t.return;try{$u(t)}catch(a){Ne(t,s,a)}}}catch(a){Ne(t,t.return,a)}if(t===e){$=null;break}var l=t.sibling;if(l!==null){l.return=t.return,$=l;break}$=t.return}}var C0=Math.ceil,yl=jn.ReactCurrentDispatcher,cd=jn.ReactCurrentOwner,Lt=jn.ReactCurrentBatchConfig,ae=0,Me=null,Ie=null,Be=0,xt=0,ai=ar(0),Ae=0,Uo=null,Fr=0,Ul=0,dd=0,ko=null,ut=null,fd=0,Fi=1/0,dn=null,vl=!1,Hu=null,er=null,Ts=!1,Wn=null,bl=0,wo=0,qu=null,Qs=-1,Vs=0;function nt(){return ae&6?Ee():Qs!==-1?Qs:Qs=Ee()}function tr(e){return e.mode&1?ae&2&&Be!==0?Be&-Be:l0.transition!==null?(Vs===0&&(Vs=Mm()),Vs):(e=ce,e!==0||(e=window.event,e=e===void 0?16:Qm(e.type)),e):1}function Ht(e,t,n,r){if(50<wo)throw wo=0,qu=null,Error(F(185));ns(e,n,r),(!(ae&2)||e!==Me)&&(e===Me&&(!(ae&2)&&(Ul|=n),Ae===4&&zn(e,Be)),pt(e,r),n===1&&ae===0&&!(t.mode&1)&&(Fi=Ee()+500,Ml&&ur()))}function pt(e,t){var n=e.callbackNode;lv(e,t);var r=rl(e,e===Me?Be:0);if(r===0)n!==null&&kf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&kf(n),t===1)e.tag===0?s0(pp.bind(null,e)):cg(pp.bind(null,e)),n0(function(){!(ae&6)&&ur()}),n=null;else{switch(Om(r)){case 1:n=Mc;break;case 4:n=Fm;break;case 16:n=nl;break;case 536870912:n=Dm;break;default:n=nl}n=ax(n,tx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function tx(e,t){if(Qs=-1,Vs=0,ae&6)throw Error(F(327));var n=e.callbackNode;if(hi()&&e.callbackNode!==n)return null;var r=rl(e,e===Me?Be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=kl(e,r);else{t=r;var i=ae;ae|=2;var o=rx();(Me!==e||Be!==t)&&(dn=null,Fi=Ee()+500,_r(e,t));do try{E0();break}catch(l){nx(e,l)}while(!0);Xc(),yl.current=o,ae=i,Ie!==null?t=0:(Me=null,Be=0,t=Ae)}if(t!==0){if(t===2&&(i=xu(e),i!==0&&(r=i,t=Qu(e,i))),t===1)throw n=Uo,_r(e,0),zn(e,r),pt(e,Ee()),n;if(t===6)zn(e,r);else{if(i=e.current.alternate,!(r&30)&&!j0(i)&&(t=kl(e,r),t===2&&(o=xu(e),o!==0&&(r=o,t=Qu(e,o))),t===1))throw n=Uo,_r(e,0),zn(e,r),pt(e,Ee()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(F(345));case 2:gr(e,ut,dn);break;case 3:if(zn(e,r),(r&130023424)===r&&(t=fd+500-Ee(),10<t)){if(rl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){nt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ju(gr.bind(null,e,ut,dn),t);break}gr(e,ut,dn);break;case 4:if(zn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Ut(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*C0(r/1960))-r,10<r){e.timeoutHandle=ju(gr.bind(null,e,ut,dn),r);break}gr(e,ut,dn);break;case 5:gr(e,ut,dn);break;default:throw Error(F(329))}}}return pt(e,Ee()),e.callbackNode===n?tx.bind(null,e):null}function Qu(e,t){var n=ko;return e.current.memoizedState.isDehydrated&&(_r(e,t).flags|=256),e=kl(e,t),e!==2&&(t=ut,ut=n,t!==null&&Vu(t)),e}function Vu(e){ut===null?ut=e:ut.push.apply(ut,e)}function j0(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Qt(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zn(e,t){for(t&=~dd,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ut(t),r=1<<n;e[n]=-1,t&=~r}}function pp(e){if(ae&6)throw Error(F(327));hi();var t=rl(e,0);if(!(t&1))return pt(e,Ee()),null;var n=kl(e,t);if(e.tag!==0&&n===2){var r=xu(e);r!==0&&(t=r,n=Qu(e,r))}if(n===1)throw n=Uo,_r(e,0),zn(e,t),pt(e,Ee()),n;if(n===6)throw Error(F(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gr(e,ut,dn),pt(e,Ee()),null}function pd(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(Fi=Ee()+500,Ml&&ur())}}function Dr(e){Wn!==null&&Wn.tag===0&&!(ae&6)&&hi();var t=ae;ae|=1;var n=Lt.transition,r=ce;try{if(Lt.transition=null,ce=1,e)return e()}finally{ce=r,Lt.transition=n,ae=t,!(ae&6)&&ur()}}function hd(){xt=ai.current,ye(ai)}function _r(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,t0(n)),Ie!==null)for(n=Ie.return;n!==null;){var r=n;switch(Kc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&al();break;case 3:Ai(),ye(dt),ye(Ge),rd();break;case 5:nd(r);break;case 4:Ai();break;case 13:ye(we);break;case 19:ye(we);break;case 10:Jc(r.type._context);break;case 22:case 23:hd()}n=n.return}if(Me=e,Ie=e=nr(e.current,null),Be=xt=t,Ae=0,Uo=null,dd=Ul=Fr=0,ut=ko=null,vr!==null){for(t=0;t<vr.length;t++)if(n=vr[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}vr=null}return e}function nx(e,t){do{var n=Ie;try{if(Xc(),Us.current=xl,gl){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}gl=!1}if(zr=0,De=_e=Se=null,vo=!1,Oo=0,cd.current=null,n===null||n.return===null){Ae=1,Uo=t,Ie=null;break}e:{var o=e,s=n.return,l=n,a=t;if(t=Be,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,f=l,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=ep(s);if(h!==null){h.flags&=-257,tp(h,s,l,o,t),h.mode&1&&Zf(o,c,t),t=h,a=c;var g=t.updateQueue;if(g===null){var v=new Set;v.add(a),t.updateQueue=v}else g.add(a);break e}else{if(!(t&1)){Zf(o,c,t),md();break e}a=Error(F(426))}}else if(be&&l.mode&1){var k=ep(s);if(k!==null){!(k.flags&65536)&&(k.flags|=256),tp(k,s,l,o,t),Gc(zi(a,l));break e}}o=a=zi(a,l),Ae!==4&&(Ae=2),ko===null?ko=[o]:ko.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var m=Og(o,a,t);Wf(o,m);break e;case 1:l=a;var x=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof x.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(er===null||!er.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=$g(o,l,t);Wf(o,w);break e}}o=o.return}while(o!==null)}ox(n)}catch(E){t=E,Ie===n&&n!==null&&(Ie=n=n.return);continue}break}while(!0)}function rx(){var e=yl.current;return yl.current=xl,e===null?xl:e}function md(){(Ae===0||Ae===3||Ae===2)&&(Ae=4),Me===null||!(Fr&268435455)&&!(Ul&268435455)||zn(Me,Be)}function kl(e,t){var n=ae;ae|=2;var r=rx();(Me!==e||Be!==t)&&(dn=null,_r(e,t));do try{N0();break}catch(i){nx(e,i)}while(!0);if(Xc(),ae=n,yl.current=r,Ie!==null)throw Error(F(261));return Me=null,Be=0,Ae}function N0(){for(;Ie!==null;)ix(Ie)}function E0(){for(;Ie!==null&&!J1();)ix(Ie)}function ix(e){var t=lx(e.alternate,e,xt);e.memoizedProps=e.pendingProps,t===null?ox(e):Ie=t,cd.current=null}function ox(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=b0(n,t),n!==null){n.flags&=32767,Ie=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ae=6,Ie=null;return}}else if(n=v0(n,t,xt),n!==null){Ie=n;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);Ae===0&&(Ae=5)}function gr(e,t,n){var r=ce,i=Lt.transition;try{Lt.transition=null,ce=1,P0(e,t,n,r)}finally{Lt.transition=i,ce=r}return null}function P0(e,t,n,r){do hi();while(Wn!==null);if(ae&6)throw Error(F(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(F(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(av(e,o),e===Me&&(Ie=Me=null,Be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ts||(Ts=!0,ax(nl,function(){return hi(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Lt.transition,Lt.transition=null;var s=ce;ce=1;var l=ae;ae|=4,cd.current=null,w0(e,n),Zg(n,e),Kv(Su),il=!!wu,Su=wu=null,e.current=n,S0(n),Z1(),ae=l,ce=s,Lt.transition=o}else e.current=n;if(Ts&&(Ts=!1,Wn=e,bl=i),o=e.pendingLanes,o===0&&(er=null),nv(n.stateNode),pt(e,Ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(vl)throw vl=!1,e=Hu,Hu=null,e;return bl&1&&e.tag!==0&&hi(),o=e.pendingLanes,o&1?e===qu?wo++:(wo=0,qu=e):wo=0,ur(),null}function hi(){if(Wn!==null){var e=Om(bl),t=Lt.transition,n=ce;try{if(Lt.transition=null,ce=16>e?16:e,Wn===null)var r=!1;else{if(e=Wn,Wn=null,bl=0,ae&6)throw Error(F(331));var i=ae;for(ae|=4,$=e.current;$!==null;){var o=$,s=o.child;if($.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var c=l[a];for($=c;$!==null;){var f=$;switch(f.tag){case 0:case 11:case 15:bo(8,f,o)}var d=f.child;if(d!==null)d.return=f,$=d;else for(;$!==null;){f=$;var p=f.sibling,h=f.return;if(Yg(f),f===c){$=null;break}if(p!==null){p.return=h,$=p;break}$=h}}}var g=o.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var k=v.sibling;v.sibling=null,v=k}while(v!==null)}}$=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,$=s;else e:for(;$!==null;){if(o=$,o.flags&2048)switch(o.tag){case 0:case 11:case 15:bo(9,o,o.return)}var m=o.sibling;if(m!==null){m.return=o.return,$=m;break e}$=o.return}}var x=e.current;for($=x;$!==null;){s=$;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,$=y;else e:for(s=x;$!==null;){if(l=$,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Bl(9,l)}}catch(E){Ne(l,l.return,E)}if(l===s){$=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,$=w;break e}$=l.return}}if(ae=i,ur(),tn&&typeof tn.onPostCommitFiberRoot=="function")try{tn.onPostCommitFiberRoot(Rl,e)}catch{}r=!0}return r}finally{ce=n,Lt.transition=t}}return!1}function hp(e,t,n){t=zi(n,t),t=Og(e,t,1),e=Zn(e,t,1),t=nt(),e!==null&&(ns(e,1,t),pt(e,t))}function Ne(e,t,n){if(e.tag===3)hp(e,e,n);else for(;t!==null;){if(t.tag===3){hp(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(er===null||!er.has(r))){e=zi(n,e),e=$g(t,e,1),t=Zn(t,e,1),e=nt(),t!==null&&(ns(t,1,e),pt(t,e));break}}t=t.return}}function T0(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&n,Me===e&&(Be&n)===n&&(Ae===4||Ae===3&&(Be&130023424)===Be&&500>Ee()-fd?_r(e,0):dd|=n),pt(e,t)}function sx(e,t){t===0&&(e.mode&1?(t=vs,vs<<=1,!(vs&130023424)&&(vs=4194304)):t=1);var n=nt();e=Sn(e,t),e!==null&&(ns(e,t,n),pt(e,n))}function I0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sx(e,n)}function _0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),sx(e,n)}var lx;lx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||dt.current)ct=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ct=!1,y0(e,t,n);ct=!!(e.flags&131072)}else ct=!1,be&&t.flags&1048576&&dg(t,dl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qs(e,t),e=t.pendingProps;var i=_i(t,Ge.current);pi(t,n),i=od(null,t,r,e,i,n);var o=sd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ft(r)?(o=!0,ul(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ed(t),i.updater=$l,t.stateNode=i,i._reactInternals=t,Lu(t,r,e,n),t=zu(null,t,r,!0,o,n)):(t.tag=0,be&&o&&Wc(t),Ze(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=R0(r),e=Mt(r,e),i){case 0:t=Au(null,t,r,e,n);break e;case 1:t=ip(null,t,r,e,n);break e;case 11:t=np(null,t,r,e,n);break e;case 14:t=rp(null,t,r,Mt(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mt(r,i),Au(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mt(r,i),ip(e,t,r,i,n);case 3:e:{if(qg(t),e===null)throw Error(F(387));r=t.pendingProps,o=t.memoizedState,i=o.element,xg(e,t),hl(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=zi(Error(F(423)),t),t=op(e,t,r,n,i);break e}else if(r!==i){i=zi(Error(F(424)),t),t=op(e,t,r,n,i);break e}else for(kt=Jn(t.stateNode.containerInfo.firstChild),wt=t,be=!0,Bt=null,n=mg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Li(),r===i){t=Cn(e,t,n);break e}Ze(e,t,r,n)}t=t.child}return t;case 5:return yg(t),e===null&&Tu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Cu(r,i)?s=null:o!==null&&Cu(r,o)&&(t.flags|=32),Hg(e,t),Ze(e,t,s,n),t.child;case 6:return e===null&&Tu(t),null;case 13:return Qg(e,t,n);case 4:return td(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ri(t,null,r,n):Ze(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mt(r,i),np(e,t,r,i,n);case 7:return Ze(e,t,t.pendingProps,n),t.child;case 8:return Ze(e,t,t.pendingProps.children,n),t.child;case 12:return Ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,me(fl,r._currentValue),r._currentValue=s,o!==null)if(Qt(o.value,s)){if(o.children===i.children&&!dt.current){t=Cn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=vn(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?a.next=a:(a.next=f.next,f.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Iu(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(F(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Iu(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ze(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,pi(t,n),i=Rt(i),r=r(i),t.flags|=1,Ze(e,t,r,n),t.child;case 14:return r=t.type,i=Mt(r,t.pendingProps),i=Mt(r.type,i),rp(e,t,r,i,n);case 15:return Bg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mt(r,i),qs(e,t),t.tag=1,ft(r)?(e=!0,ul(t)):e=!1,pi(t,n),Mg(t,r,i),Lu(t,r,i,n),zu(null,t,r,!0,e,n);case 19:return Vg(e,t,n);case 22:return Ug(e,t,n)}throw Error(F(156,t.tag))};function ax(e,t){return zm(e,t)}function L0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _t(e,t,n,r){return new L0(e,t,n,r)}function gd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R0(e){if(typeof e=="function")return gd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zc)return 11;if(e===Fc)return 14}return 2}function nr(e,t){var n=e.alternate;return n===null?(n=_t(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ws(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")gd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Jr:return Lr(n.children,i,o,t);case Ac:s=8,i|=8;break;case nu:return e=_t(12,n,t,i|2),e.elementType=nu,e.lanes=o,e;case ru:return e=_t(13,n,t,i),e.elementType=ru,e.lanes=o,e;case iu:return e=_t(19,n,t,i),e.elementType=iu,e.lanes=o,e;case ym:return Hl(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gm:s=10;break e;case xm:s=9;break e;case zc:s=11;break e;case Fc:s=14;break e;case Ln:s=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=_t(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Lr(e,t,n,r){return e=_t(7,e,r,t),e.lanes=n,e}function Hl(e,t,n,r){return e=_t(22,e,r,t),e.elementType=ym,e.lanes=n,e.stateNode={isHidden:!1},e}function Ia(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function _a(e,t,n){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function A0(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=da(0),this.expirationTimes=da(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=da(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xd(e,t,n,r,i,o,s,l,a){return e=new A0(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=_t(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ed(o),e}function z0(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ux(e){if(!e)return sr;e=e._reactInternals;e:{if(Ur(e)!==e||e.tag!==1)throw Error(F(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(F(171))}if(e.tag===1){var n=e.type;if(ft(n))return ug(e,n,t)}return t}function cx(e,t,n,r,i,o,s,l,a){return e=xd(n,r,!0,e,i,o,s,l,a),e.context=ux(null),n=e.current,r=nt(),i=tr(n),o=vn(r,i),o.callback=t??null,Zn(n,o,i),e.current.lanes=i,ns(e,i,r),pt(e,r),e}function ql(e,t,n,r){var i=t.current,o=nt(),s=tr(i);return n=ux(n),t.context===null?t.context=n:t.pendingContext=n,t=vn(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Zn(i,t,s),e!==null&&(Ht(e,i,s,o),Bs(e,i,s)),s}function wl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yd(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function F0(){return null}var dx=typeof reportError=="function"?reportError:function(e){console.error(e)};function vd(e){this._internalRoot=e}Ql.prototype.render=vd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));ql(e,t,null,null)};Ql.prototype.unmount=vd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dr(function(){ql(null,e,null,null)}),t[wn]=null}};function Ql(e){this._internalRoot=e}Ql.prototype.unstable_scheduleHydration=function(e){if(e){var t=Um();e={blockedOn:null,target:e,priority:t};for(var n=0;n<An.length&&t!==0&&t<An[n].priority;n++);An.splice(n,0,e),n===0&&qm(e)}};function bd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function gp(){}function D0(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=wl(s);o.call(c)}}var s=cx(t,r,e,0,null,!1,!1,"",gp);return e._reactRootContainer=s,e[wn]=s.current,Ao(e.nodeType===8?e.parentNode:e),Dr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var c=wl(a);l.call(c)}}var a=xd(e,0,!1,null,null,!1,!1,"",gp);return e._reactRootContainer=a,e[wn]=a.current,Ao(e.nodeType===8?e.parentNode:e),Dr(function(){ql(t,a,n,r)}),a}function Wl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=wl(s);l.call(a)}}ql(t,s,e,i)}else s=D0(n,t,e,i,r);return wl(s)}$m=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=co(t.pendingLanes);n!==0&&(Oc(t,n|1),pt(t,Ee()),!(ae&6)&&(Fi=Ee()+500,ur()))}break;case 13:Dr(function(){var r=Sn(e,1);if(r!==null){var i=nt();Ht(r,e,1,i)}}),yd(e,1)}};$c=function(e){if(e.tag===13){var t=Sn(e,134217728);if(t!==null){var n=nt();Ht(t,e,134217728,n)}yd(e,134217728)}};Bm=function(e){if(e.tag===13){var t=tr(e),n=Sn(e,t);if(n!==null){var r=nt();Ht(n,e,t,r)}yd(e,t)}};Um=function(){return ce};Hm=function(e,t){var n=ce;try{return ce=e,t()}finally{ce=n}};hu=function(e,t,n){switch(t){case"input":if(lu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Dl(r);if(!i)throw Error(F(90));bm(r),lu(r,i)}}}break;case"textarea":wm(e,n);break;case"select":t=n.value,t!=null&&ui(e,!!n.multiple,t,!1)}};Tm=pd;Im=Dr;var M0={usingClientEntryPoint:!1,Events:[is,ni,Dl,Em,Pm,pd]},ro={findFiberByHostInstance:yr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},O0={bundleType:ro.bundleType,version:ro.version,rendererPackageName:ro.rendererPackageName,rendererConfig:ro.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:jn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Rm(e),e===null?null:e.stateNode},findFiberByHostInstance:ro.findFiberByHostInstance||F0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Is=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Is.isDisabled&&Is.supportsFiber)try{Rl=Is.inject(O0),tn=Is}catch{}}jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M0;jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bd(t))throw Error(F(200));return z0(e,t,null,n)};jt.createRoot=function(e,t){if(!bd(e))throw Error(F(299));var n=!1,r="",i=dx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=xd(e,1,!1,null,null,n,!1,r,i),e[wn]=t.current,Ao(e.nodeType===8?e.parentNode:e),new vd(t)};jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=Rm(t),e=e===null?null:e.stateNode,e};jt.flushSync=function(e){return Dr(e)};jt.hydrate=function(e,t,n){if(!Vl(t))throw Error(F(200));return Wl(null,e,t,!0,n)};jt.hydrateRoot=function(e,t,n){if(!bd(e))throw Error(F(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=dx;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=cx(t,null,e,1,n??null,i,!1,o,s),e[wn]=t.current,Ao(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ql(t)};jt.render=function(e,t,n){if(!Vl(t))throw Error(F(200));return Wl(null,e,t,!1,n)};jt.unmountComponentAtNode=function(e){if(!Vl(e))throw Error(F(40));return e._reactRootContainer?(Dr(function(){Wl(null,null,e,!1,function(){e._reactRootContainer=null,e[wn]=null})}),!0):!1};jt.unstable_batchedUpdates=pd;jt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vl(n))throw Error(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return Wl(e,t,n,!1,r)};jt.version="18.3.1-next-f1338f8080-20240426";function fx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fx)}catch(e){console.error(e)}}fx(),fm.exports=jt;var $0=fm.exports,px,xp=$0;px=xp.createRoot,xp.hydrateRoot;var Bi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wr,Dn,xi,qh,B0=(qh=class extends Bi{constructor(){super();q(this,wr);q(this,Dn);q(this,xi);O(this,xi,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Dn)||this.setEventListener(C(this,xi))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Dn))==null||t.call(this),O(this,Dn,void 0))}setEventListener(t){var n;O(this,xi,t),(n=C(this,Dn))==null||n.call(this),O(this,Dn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,wr)!==t&&(O(this,wr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,wr)=="boolean"?C(this,wr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},wr=new WeakMap,Dn=new WeakMap,xi=new WeakMap,qh),kd=new B0,U0={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Mn,jc,Qh,H0=(Qh=class{constructor(){q(this,Mn,U0);q(this,jc,!1)}setTimeoutProvider(e){O(this,Mn,e)}setTimeout(e,t){return C(this,Mn).setTimeout(e,t)}clearTimeout(e){C(this,Mn).clearTimeout(e)}setInterval(e,t){return C(this,Mn).setInterval(e,t)}clearInterval(e){C(this,Mn).clearInterval(e)}},Mn=new WeakMap,jc=new WeakMap,Qh),kr=new H0;function q0(e){setTimeout(e,0)}var Q0=typeof window>"u"||"Deno"in globalThis;function et(){}function V0(e,t){return typeof e=="function"?e(t):e}function Wu(e){return typeof e=="number"&&e>=0&&e!==1/0}function hx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rr(e,t){return typeof e=="function"?e(t):e}function vt(e,t){return typeof e=="function"?e(t):e}function yp(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:l}=e;if(s){if(r){if(t.queryHash!==wd(s,t.options))return!1}else if(!Ho(t.queryKey,s))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||o&&!o(t))}function vp(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Mr(t.options.mutationKey)!==Mr(o))return!1}else if(!Ho(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function wd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Mr)(e)}function Mr(e){return JSON.stringify(e,(t,n)=>Ku(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ho(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ho(e[n],t[n])):!1}var W0=Object.prototype.hasOwnProperty;function mx(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=bp(e)&&bp(t);if(!r&&!(Ku(e)&&Ku(t)))return t;const o=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),l=s.length,a=r?new Array(l):{};let c=0;for(let f=0;f<l;f++){const d=r?f:s[f],p=e[d],h=t[d];if(p===h){a[d]=p,(r?f<o:W0.call(e,d))&&c++;continue}if(p===null||h===null||typeof p!="object"||typeof h!="object"){a[d]=h;continue}const g=mx(p,h,n+1);a[d]=g,g===p&&c++}return o===l&&c===o?e:a}function Sl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function bp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ku(e){if(!kp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!kp(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function kp(e){return Object.prototype.toString.call(e)==="[object Object]"}function K0(e){return new Promise(t=>{kr.setTimeout(t,e)})}function Gu(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?mx(e,t):t}function G0(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Y0(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Sd=Symbol();function gx(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Sd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Cd(e,t){return typeof e=="function"?e(...t):!!e}function X0(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var qo=(()=>{let e=()=>Q0;return{isServer(){return e()},setIsServer(t){e=t}}})();function Yu(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var J0=q0;function Z0(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=J0;const o=l=>{t?e.push(l):i(()=>{n(l)})},s=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(a=>{n(a)})})})};return{batch:l=>{let a;t++;try{a=l()}finally{t--,t||s()}return a},batchCalls:l=>(...a)=>{o(()=>{l(...a)})},schedule:o,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var Re=Z0(),yi,On,vi,Vh,eb=(Vh=class extends Bi{constructor(){super();q(this,yi,!0);q(this,On);q(this,vi);O(this,vi,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,On)||this.setEventListener(C(this,vi))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,On))==null||t.call(this),O(this,On,void 0))}setEventListener(t){var n;O(this,vi,t),(n=C(this,On))==null||n.call(this),O(this,On,t(this.setOnline.bind(this)))}setOnline(t){C(this,yi)!==t&&(O(this,yi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,yi)}},yi=new WeakMap,On=new WeakMap,vi=new WeakMap,Vh),Cl=new eb;function tb(e){return Math.min(1e3*2**e,3e4)}function xx(e){return(e??"online")==="online"?Cl.isOnline():!0}var Xu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function yx(e){let t=!1,n=0,r;const i=Yu(),o=()=>i.status!=="pending",s=v=>{var k;if(!o()){const m=new Xu(v);p(m),(k=e.onCancel)==null||k.call(e,m)}},l=()=>{t=!0},a=()=>{t=!1},c=()=>kd.isFocused()&&(e.networkMode==="always"||Cl.isOnline())&&e.canRun(),f=()=>xx(e.networkMode)&&e.canRun(),d=v=>{o()||(r==null||r(),i.resolve(v))},p=v=>{o()||(r==null||r(),i.reject(v))},h=()=>new Promise(v=>{var k;r=m=>{(o()||c())&&v(m)},(k=e.onPause)==null||k.call(e)}).then(()=>{var v;r=void 0,o()||(v=e.onContinue)==null||v.call(e)}),g=()=>{if(o())return;let v;const k=n===0?e.initialPromise:void 0;try{v=k??e.fn()}catch(m){v=Promise.reject(m)}Promise.resolve(v).then(d).catch(m=>{var S;if(o())return;const x=e.retry??(qo.isServer()?0:3),y=e.retryDelay??tb,w=typeof y=="function"?y(n,m):y,E=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,m);if(t||!E){p(m);return}n++,(S=e.onFail)==null||S.call(e,n,m),K0(w).then(()=>c()?void 0:h()).then(()=>{t?p(m):g()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:a,canStart:f,start:()=>(f()?g():h().then(g),i)}}var Sr,Wh,vx=(Wh=class{constructor(){q(this,Sr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wu(this.gcTime)&&O(this,Sr,kr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qo.isServer()?1/0:5*60*1e3))}clearGcTimeout(){C(this,Sr)!==void 0&&(kr.clearTimeout(C(this,Sr)),O(this,Sr,void 0))}},Sr=new WeakMap,Wh);function nb(e){return{onFetch:(t,n)=>{var f,d,p,h,g;const r=t.options,i=(p=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],s=((g=t.state.data)==null?void 0:g.pageParams)||[];let l={pages:[],pageParams:[]},a=0;const c=async()=>{let v=!1;const k=y=>{X0(y,()=>t.signal,()=>v=!0)},m=gx(t.options,t.fetchOptions),x=async(y,w,E)=>{if(v)return Promise.reject(t.signal.reason);if(w==null&&y.pages.length)return Promise.resolve(y);const T=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:w,direction:E?"backward":"forward",meta:t.options.meta};return k(_),_})(),I=await m(T),{maxPages:R}=t.options,j=E?Y0:G0;return{pages:j(y.pages,I,R),pageParams:j(y.pageParams,w,R)}};if(i&&o.length){const y=i==="backward",w=y?rb:wp,E={pages:o,pageParams:s},S=w(r,E);l=await x(E,S,y)}else{const y=e??o.length;do{const w=a===0?s[0]??r.initialPageParam:wp(r,l);if(a>0&&w==null)break;l=await x(l,w),a++}while(a<y)}return l};t.options.persister?t.fetchFn=()=>{var v,k;return(k=(v=t.options).persister)==null?void 0:k.call(v,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function wp(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function rb(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var bi,Cr,ki,Et,jr,Fe,Yo,Nr,yt,bx,cn,Kh,ib=(Kh=class extends vx{constructor(t){super();q(this,yt);q(this,bi);q(this,Cr);q(this,ki);q(this,Et);q(this,jr);q(this,Fe);q(this,Yo);q(this,Nr);O(this,Nr,!1),O(this,Yo,t.defaultOptions),this.setOptions(t.options),this.observers=[],O(this,jr,t.client),O(this,Et,C(this,jr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,O(this,Cr,Cp(this.options)),this.state=t.state??C(this,Cr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return C(this,bi)}get promise(){var t;return(t=C(this,Fe))==null?void 0:t.promise}setOptions(t){if(this.options={...C(this,Yo),...t},t!=null&&t._type&&O(this,bi,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Cp(this.options);n.data!==void 0&&(this.setState(Sp(n.data,n.dataUpdatedAt)),O(this,Cr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,Et).remove(this)}setData(t,n){const r=Gu(this.state.data,t,this.options);return J(this,yt,cn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){J(this,yt,cn).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=C(this,Fe))==null?void 0:r.promise;return(i=C(this,Fe))==null||i.cancel(t),n?n.then(et).catch(et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return C(this,Cr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>vt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Sd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>rr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!hx(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Fe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Fe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,Et).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,Fe)&&(C(this,Nr)||J(this,yt,bx).call(this)?C(this,Fe).cancel({revert:!0}):C(this,Fe).cancelRetry()),this.scheduleGc()),C(this,Et).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||J(this,yt,cn).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,d,p,h,g,v,k,m,x,y;if(this.state.fetchStatus!=="idle"&&((c=C(this,Fe))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,Fe))return C(this,Fe).continueRetry(),C(this,Fe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(E=>E.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,i=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(O(this,Nr,!0),r.signal)})},o=()=>{const w=gx(this.options,n),S=(()=>{const T={client:C(this,jr),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return O(this,Nr,!1),this.options.persister?this.options.persister(w,S,this):w(S)},l=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,jr),state:this.state,fetchFn:o};return i(w),w})(),a=C(this,bi)==="infinite"?nb(this.options.pages):this.options.behavior;a==null||a.onFetch(l,this),O(this,ki,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&J(this,yt,cn).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta}),O(this,Fe,yx({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:w=>{w instanceof Xu&&w.revert&&this.setState({...C(this,ki),fetchStatus:"idle"}),r.abort()},onFail:(w,E)=>{J(this,yt,cn).call(this,{type:"failed",failureCount:w,error:E})},onPause:()=>{J(this,yt,cn).call(this,{type:"pause"})},onContinue:()=>{J(this,yt,cn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const w=await C(this,Fe).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(h=(p=C(this,Et).config).onSuccess)==null||h.call(p,w,this),(v=(g=C(this,Et).config).onSettled)==null||v.call(g,w,this.state.error,this),w}catch(w){if(w instanceof Xu){if(w.silent)return C(this,Fe).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw J(this,yt,cn).call(this,{type:"error",error:w}),(m=(k=C(this,Et).config).onError)==null||m.call(k,w,this),(y=(x=C(this,Et).config).onSettled)==null||y.call(x,this.state.data,w,this),w}finally{this.scheduleGc()}}},bi=new WeakMap,Cr=new WeakMap,ki=new WeakMap,Et=new WeakMap,jr=new WeakMap,Fe=new WeakMap,Yo=new WeakMap,Nr=new WeakMap,yt=new WeakSet,bx=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},cn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...kx(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...Sp(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return O(this,ki,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Re.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,Et).notify({query:this,type:"updated",action:t})})},Kh);function kx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xx(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Sp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Cp(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var lt,oe,Xo,Xe,Er,wi,pn,$n,Jo,Si,Ci,Pr,Tr,Bn,ji,ue,po,Ju,Zu,ec,tc,nc,rc,ic,wx,Gh,ob=(Gh=class extends Bi{constructor(t,n){super();q(this,ue);q(this,lt);q(this,oe);q(this,Xo);q(this,Xe);q(this,Er);q(this,wi);q(this,pn);q(this,$n);q(this,Jo);q(this,Si);q(this,Ci);q(this,Pr);q(this,Tr);q(this,Bn);q(this,ji,new Set);this.options=n,O(this,lt,t),O(this,$n,null),O(this,pn,Yu()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,oe).addObserver(this),jp(C(this,oe),this.options)?J(this,ue,po).call(this):this.updateResult(),J(this,ue,tc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return oc(C(this,oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return oc(C(this,oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,J(this,ue,nc).call(this),J(this,ue,rc).call(this),C(this,oe).removeObserver(this)}setOptions(t){const n=this.options,r=C(this,oe);if(this.options=C(this,lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vt(this.options.enabled,C(this,oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");J(this,ue,ic).call(this),C(this,oe).setOptions(this.options),n._defaulted&&!Sl(this.options,n)&&C(this,lt).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,oe),observer:this});const i=this.hasListeners();i&&Np(C(this,oe),r,this.options,n)&&J(this,ue,po).call(this),this.updateResult(),i&&(C(this,oe)!==r||vt(this.options.enabled,C(this,oe))!==vt(n.enabled,C(this,oe))||rr(this.options.staleTime,C(this,oe))!==rr(n.staleTime,C(this,oe)))&&J(this,ue,Ju).call(this);const o=J(this,ue,Zu).call(this);i&&(C(this,oe)!==r||vt(this.options.enabled,C(this,oe))!==vt(n.enabled,C(this,oe))||o!==C(this,Bn))&&J(this,ue,ec).call(this,o)}getOptimisticResult(t){const n=C(this,lt).getQueryCache().build(C(this,lt),t),r=this.createResult(n,t);return lb(this,r)&&(O(this,Xe,r),O(this,wi,this.options),O(this,Er,C(this,oe).state)),r}getCurrentResult(){return C(this,Xe)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&C(this,pn).status==="pending"&&C(this,pn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){C(this,ji).add(t)}getCurrentQuery(){return C(this,oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,lt).defaultQueryOptions(t),r=C(this,lt).getQueryCache().build(C(this,lt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return J(this,ue,po).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Xe)))}createResult(t,n){var R;const r=C(this,oe),i=this.options,o=C(this,Xe),s=C(this,Er),l=C(this,wi),c=t!==r?t.state:C(this,Xo),{state:f}=t;let d={...f},p=!1,h;if(n._optimisticResults){const j=this.hasListeners(),_=!j&&jp(t,n),A=j&&Np(t,r,n,i);(_||A)&&(d={...d,...kx(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:k}=d;h=d.data;let m=!1;if(n.placeholderData!==void 0&&h===void 0&&k==="pending"){let j;o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(j=o.data,m=!0):j=typeof n.placeholderData=="function"?n.placeholderData((R=C(this,Ci))==null?void 0:R.state.data,C(this,Ci)):n.placeholderData,j!==void 0&&(k="success",h=Gu(o==null?void 0:o.data,j,n),p=!0)}if(n.select&&h!==void 0&&!m)if(o&&h===(s==null?void 0:s.data)&&n.select===C(this,Jo))h=C(this,Si);else try{O(this,Jo,n.select),h=n.select(h),h=Gu(o==null?void 0:o.data,h,n),O(this,Si,h),O(this,$n,null)}catch(j){O(this,$n,j)}C(this,$n)&&(g=C(this,$n),h=C(this,Si),v=Date.now(),k="error");const x=d.fetchStatus==="fetching",y=k==="pending",w=k==="error",E=y&&x,S=h!==void 0,I={status:k,fetchStatus:d.fetchStatus,isPending:y,isSuccess:k==="success",isError:w,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!y,isLoadingError:w&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:w&&S,isStale:jd(t,n),refetch:this.refetch,promise:C(this,pn),isEnabled:vt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=I.data!==void 0,_=I.status==="error"&&!j,A=H=>{_?H.reject(I.error):j&&H.resolve(I.data)},W=()=>{const H=O(this,pn,I.promise=Yu());A(H)},Y=C(this,pn);switch(Y.status){case"pending":t.queryHash===r.queryHash&&A(Y);break;case"fulfilled":(_||I.data!==Y.value)&&W();break;case"rejected":(!_||I.error!==Y.reason)&&W();break}}return I}updateResult(){const t=C(this,Xe),n=this.createResult(C(this,oe),this.options);if(O(this,Er,C(this,oe).state),O(this,wi,this.options),C(this,Er).data!==void 0&&O(this,Ci,C(this,oe)),Sl(n,t))return;O(this,Xe,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!C(this,ji).size)return!0;const s=new Set(o??C(this,ji));return this.options.throwOnError&&s.add("error"),Object.keys(C(this,Xe)).some(l=>{const a=l;return C(this,Xe)[a]!==t[a]&&s.has(a)})};J(this,ue,wx).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&J(this,ue,tc).call(this)}},lt=new WeakMap,oe=new WeakMap,Xo=new WeakMap,Xe=new WeakMap,Er=new WeakMap,wi=new WeakMap,pn=new WeakMap,$n=new WeakMap,Jo=new WeakMap,Si=new WeakMap,Ci=new WeakMap,Pr=new WeakMap,Tr=new WeakMap,Bn=new WeakMap,ji=new WeakMap,ue=new WeakSet,po=function(t){J(this,ue,ic).call(this);let n=C(this,oe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(et)),n},Ju=function(){J(this,ue,nc).call(this);const t=rr(this.options.staleTime,C(this,oe));if(qo.isServer()||C(this,Xe).isStale||!Wu(t))return;const r=hx(C(this,Xe).dataUpdatedAt,t)+1;O(this,Pr,kr.setTimeout(()=>{C(this,Xe).isStale||this.updateResult()},r))},Zu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,oe)):this.options.refetchInterval)??!1},ec=function(t){J(this,ue,rc).call(this),O(this,Bn,t),!(qo.isServer()||vt(this.options.enabled,C(this,oe))===!1||!Wu(C(this,Bn))||C(this,Bn)===0)&&O(this,Tr,kr.setInterval(()=>{(this.options.refetchIntervalInBackground||kd.isFocused())&&J(this,ue,po).call(this)},C(this,Bn)))},tc=function(){J(this,ue,Ju).call(this),J(this,ue,ec).call(this,J(this,ue,Zu).call(this))},nc=function(){C(this,Pr)!==void 0&&(kr.clearTimeout(C(this,Pr)),O(this,Pr,void 0))},rc=function(){C(this,Tr)!==void 0&&(kr.clearInterval(C(this,Tr)),O(this,Tr,void 0))},ic=function(){const t=C(this,lt).getQueryCache().build(C(this,lt),this.options);if(t===C(this,oe))return;const n=C(this,oe);O(this,oe,t),O(this,Xo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},wx=function(t){Re.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,Xe))}),C(this,lt).getQueryCache().notify({query:C(this,oe),type:"observerResultsUpdated"})})},Gh);function sb(e,t){return vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&vt(t.retryOnMount,e)===!1)}function jp(e,t){return sb(e,t)||e.state.data!==void 0&&oc(e,t,t.refetchOnMount)}function oc(e,t,n){if(vt(t.enabled,e)!==!1&&rr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&jd(e,t)}return!1}function Np(e,t,n,r){return(e!==t||vt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&jd(e,n)}function jd(e,t){return vt(t.enabled,e)!==!1&&e.isStaleByTime(rr(t.staleTime,e))}function lb(e,t){return!Sl(e.getCurrentResult(),t)}var Zo,Xt,Ve,Ir,Jt,_n,Yh,ab=(Yh=class extends vx{constructor(t){super();q(this,Jt);q(this,Zo);q(this,Xt);q(this,Ve);q(this,Ir);O(this,Zo,t.client),this.mutationId=t.mutationId,O(this,Ve,t.mutationCache),O(this,Xt,[]),this.state=t.state||Sx(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Xt).includes(t)||(C(this,Xt).push(t),this.clearGcTimeout(),C(this,Ve).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){O(this,Xt,C(this,Xt).filter(n=>n!==t)),this.scheduleGc(),C(this,Ve).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Xt).length||(this.state.status==="pending"?this.scheduleGc():C(this,Ve).remove(this))}continue(){var t;return((t=C(this,Ir))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,l,a,c,f,d,p,h,g,v,k,m,x,y,w,E,S,T;const n=()=>{J(this,Jt,_n).call(this,{type:"continue"})},r={client:C(this,Zo),meta:this.options.meta,mutationKey:this.options.mutationKey};O(this,Ir,yx({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(I,R)=>{J(this,Jt,_n).call(this,{type:"failed",failureCount:I,error:R})},onPause:()=>{J(this,Jt,_n).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Ve).canRun(this)}));const i=this.state.status==="pending",o=!C(this,Ir).canStart();try{if(i)n();else{J(this,Jt,_n).call(this,{type:"pending",variables:t,isPaused:o}),C(this,Ve).config.onMutate&&await C(this,Ve).config.onMutate(t,this,r);const R=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t,r));R!==this.state.context&&J(this,Jt,_n).call(this,{type:"pending",context:R,variables:t,isPaused:o})}const I=await C(this,Ir).start();return await((c=(a=C(this,Ve).config).onSuccess)==null?void 0:c.call(a,I,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,I,t,this.state.context,r)),await((h=(p=C(this,Ve).config).onSettled)==null?void 0:h.call(p,I,null,this.state.variables,this.state.context,this,r)),await((v=(g=this.options).onSettled)==null?void 0:v.call(g,I,null,t,this.state.context,r)),J(this,Jt,_n).call(this,{type:"success",data:I}),I}catch(I){try{await((m=(k=C(this,Ve).config).onError)==null?void 0:m.call(k,I,t,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((y=(x=this.options).onError)==null?void 0:y.call(x,I,t,this.state.context,r))}catch(R){Promise.reject(R)}try{await((E=(w=C(this,Ve).config).onSettled)==null?void 0:E.call(w,void 0,I,this.state.variables,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((T=(S=this.options).onSettled)==null?void 0:T.call(S,void 0,I,t,this.state.context,r))}catch(R){Promise.reject(R)}throw J(this,Jt,_n).call(this,{type:"error",error:I}),I}finally{C(this,Ve).runNext(this)}}},Zo=new WeakMap,Xt=new WeakMap,Ve=new WeakMap,Ir=new WeakMap,Jt=new WeakSet,_n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Re.batch(()=>{C(this,Xt).forEach(r=>{r.onMutationUpdate(t)}),C(this,Ve).notify({mutation:this,type:"updated",action:t})})},Yh);function Sx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var hn,Ot,es,Xh,ub=(Xh=class extends Bi{constructor(t={}){super();q(this,hn);q(this,Ot);q(this,es);this.config=t,O(this,hn,new Set),O(this,Ot,new Map),O(this,es,0)}build(t,n,r){const i=new ab({client:t,mutationCache:this,mutationId:++fs(this,es)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){C(this,hn).add(t);const n=_s(t);if(typeof n=="string"){const r=C(this,Ot).get(n);r?r.push(t):C(this,Ot).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,hn).delete(t)){const n=_s(t);if(typeof n=="string"){const r=C(this,Ot).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&C(this,Ot).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=_s(t);if(typeof n=="string"){const r=C(this,Ot).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=_s(t);if(typeof n=="string"){const i=(r=C(this,Ot).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Re.batch(()=>{C(this,hn).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,hn).clear(),C(this,Ot).clear()})}getAll(){return Array.from(C(this,hn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>vp(n,r))}findAll(t={}){return this.getAll().filter(n=>vp(t,n))}notify(t){Re.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Re.batch(()=>Promise.all(t.map(n=>n.continue().catch(et))))}},hn=new WeakMap,Ot=new WeakMap,es=new WeakMap,Xh);function _s(e){var t;return(t=e.options.scope)==null?void 0:t.id}var mn,Un,at,gn,bn,Ks,sc,Jh,cb=(Jh=class extends Bi{constructor(n,r){super();q(this,bn);q(this,mn);q(this,Un);q(this,at);q(this,gn);O(this,mn,n),this.setOptions(r),this.bindMethods(),J(this,bn,Ks).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=C(this,mn).defaultMutationOptions(n),Sl(this.options,r)||C(this,mn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,at),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Mr(r.mutationKey)!==Mr(this.options.mutationKey)?this.reset():((i=C(this,at))==null?void 0:i.state.status)==="pending"&&C(this,at).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,at))==null||n.removeObserver(this)}onMutationUpdate(n){J(this,bn,Ks).call(this),J(this,bn,sc).call(this,n)}getCurrentResult(){return C(this,Un)}reset(){var n;(n=C(this,at))==null||n.removeObserver(this),O(this,at,void 0),J(this,bn,Ks).call(this),J(this,bn,sc).call(this)}mutate(n,r){var i;return O(this,gn,r),(i=C(this,at))==null||i.removeObserver(this),O(this,at,C(this,mn).getMutationCache().build(C(this,mn),this.options)),C(this,at).addObserver(this),C(this,at).execute(n)}},mn=new WeakMap,Un=new WeakMap,at=new WeakMap,gn=new WeakMap,bn=new WeakSet,Ks=function(){var r;const n=((r=C(this,at))==null?void 0:r.state)??Sx();O(this,Un,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},sc=function(n){Re.batch(()=>{var r,i,o,s,l,a,c,f;if(C(this,gn)&&this.hasListeners()){const d=C(this,Un).variables,p=C(this,Un).context,h={client:C(this,mn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=C(this,gn)).onSuccess)==null||i.call(r,n.data,d,p,h)}catch(g){Promise.reject(g)}try{(s=(o=C(this,gn)).onSettled)==null||s.call(o,n.data,null,d,p,h)}catch(g){Promise.reject(g)}}else if((n==null?void 0:n.type)==="error"){try{(a=(l=C(this,gn)).onError)==null||a.call(l,n.error,d,p,h)}catch(g){Promise.reject(g)}try{(f=(c=C(this,gn)).onSettled)==null||f.call(c,void 0,n.error,d,p,h)}catch(g){Promise.reject(g)}}}this.listeners.forEach(d=>{d(C(this,Un))})})},Jh),Zt,Zh,db=(Zh=class extends Bi{constructor(t={}){super();q(this,Zt);this.config=t,O(this,Zt,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??wd(i,n);let s=this.get(o);return s||(s=new ib({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){C(this,Zt).has(t.queryHash)||(C(this,Zt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,Zt).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,Zt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Re.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,Zt).get(t)}getAll(){return[...C(this,Zt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>yp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>yp(t,r)):n}notify(t){Re.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Re.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Re.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Zt=new WeakMap,Zh),je,Hn,qn,Ni,Ei,Qn,Pi,Ti,em,fb=(em=class{constructor(e={}){q(this,je);q(this,Hn);q(this,qn);q(this,Ni);q(this,Ei);q(this,Qn);q(this,Pi);q(this,Ti);O(this,je,e.queryCache||new db),O(this,Hn,e.mutationCache||new ub),O(this,qn,e.defaultOptions||{}),O(this,Ni,new Map),O(this,Ei,new Map),O(this,Qn,0)}mount(){fs(this,Qn)._++,C(this,Qn)===1&&(O(this,Pi,kd.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,je).onFocus())})),O(this,Ti,Cl.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,je).onOnline())})))}unmount(){var e,t;fs(this,Qn)._--,C(this,Qn)===0&&((e=C(this,Pi))==null||e.call(this),O(this,Pi,void 0),(t=C(this,Ti))==null||t.call(this),O(this,Ti,void 0))}isFetching(e){return C(this,je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Hn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,je).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(rr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,je).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=C(this,je).get(r.queryHash),o=i==null?void 0:i.state.data,s=V0(t,o);if(s!==void 0)return C(this,je).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Re.batch(()=>C(this,je).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,je);Re.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,je);return Re.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Re.batch(()=>C(this,je).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(et).catch(et)}invalidateQueries(e,t={}){return Re.batch(()=>(C(this,je).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Re.batch(()=>C(this,je).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(et)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(et)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,je).build(this,t);return n.isStaleByTime(rr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(et).catch(et)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(et).catch(et)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Cl.isOnline()?C(this,Hn).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,je)}getMutationCache(){return C(this,Hn)}getDefaultOptions(){return C(this,qn)}setDefaultOptions(e){O(this,qn,e)}setQueryDefaults(e,t){C(this,Ni).set(Mr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Ni).values()],n={};return t.forEach(r=>{Ho(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,Ei).set(Mr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Ei).values()],n={};return t.forEach(r=>{Ho(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,qn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Sd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,qn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,je).clear(),C(this,Hn).clear()}},je=new WeakMap,Hn=new WeakMap,qn=new WeakMap,Ni=new WeakMap,Ei=new WeakMap,Qn=new WeakMap,Pi=new WeakMap,Ti=new WeakMap,em),Cx=P.createContext(void 0),Pe=e=>{const t=P.useContext(Cx);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},pb=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Cx.Provider,{value:e,children:t})),jx=P.createContext(!1),hb=()=>P.useContext(jx);jx.Provider;function mb(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gb=P.createContext(mb()),xb=()=>P.useContext(gb),yb=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Cd(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},vb=e=>{P.useEffect(()=>{e.clearReset()},[e])},bb=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Cd(n,[e.error,r])),kb=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},wb=(e,t)=>e.isLoading&&e.isFetching&&!t,Sb=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ep=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Cb(e,t,n){var p,h,g,v;const r=hb(),i=xb(),o=Pe(),s=o.defaultQueryOptions(e);(h=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||h.call(p,s);const l=o.getQueryCache().get(s.queryHash);s._optimisticResults=r?"isRestoring":"optimistic",kb(s),yb(s,i,l),vb(i);const a=!o.getQueryCache().get(s.queryHash),[c]=P.useState(()=>new t(o,s)),f=c.getOptimisticResult(s),d=!r&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(k=>{const m=d?c.subscribe(Re.batchCalls(k)):et;return c.updateResult(),m},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),P.useEffect(()=>{c.setOptions(s)},[s,c]),Sb(s,f))throw Ep(s,c,i);if(bb({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:l,suspense:s.suspense}))throw f.error;if((v=(g=o.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||v.call(g,s,f),s.experimental_prefetchInRender&&!qo.isServer()&&wb(f,r)){const k=a?Ep(s,c,i):l==null?void 0:l.promise;k==null||k.catch(et).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?f:c.trackResult(f)}function rn(e,t){return Cb(e,ob)}function Oe(e,t){const n=Pe(),[r]=P.useState(()=>new cb(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);const i=P.useSyncExternalStore(P.useCallback(s=>r.subscribe(Re.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=P.useCallback((s,l)=>{r.mutate(s,l).catch(et)},[r]);if(i.error&&Cd(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}class jb{constructor(){Wt(this,"ws");Wt(this,"listeners",new Set);Wt(this,"reconnectListeners",new Set);Wt(this,"reconnectAttempt",0);Wt(this,"shouldRun",!1);Wt(this,"url");Wt(this,"outbox",[]);Wt(this,"lastSubscribe");Wt(this,"_connectionEpoch",0);const t=location.protocol==="https:"?"wss:":"ws:";this.url=`${t}//${location.host}/ws`}start(){this.shouldRun||(this.shouldRun=!0,this.connect())}stop(){var t;this.shouldRun=!1,this.outbox=[],this.lastSubscribe=void 0,this._connectionEpoch=0,(t=this.ws)==null||t.close(),this.ws=void 0}send(t){var n;if(t.type==="subscribe"&&(this.lastSubscribe=t),((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN){this.ws.send(JSON.stringify(t));return}this.outbox.push(t),this.shouldRun||this.start()}on(t){return this.listeners.add(t),()=>this.listeners.delete(t)}onReconnect(t){return this.reconnectListeners.add(t),()=>this.reconnectListeners.delete(t)}get readyState(){var t;return((t=this.ws)==null?void 0:t.readyState)??WebSocket.CLOSED}get connectionEpoch(){return this._connectionEpoch}connect(){const t=new WebSocket(this.url);this.ws=t,t.addEventListener("open",()=>{if(this.reconnectAttempt=0,this._connectionEpoch+=1,this._connectionEpoch>1&&this.lastSubscribe&&t.send(JSON.stringify(this.lastSubscribe)),this._connectionEpoch>1)for(const r of this.reconnectListeners)try{r()}catch{}const n=this.outbox;this.outbox=[];for(const r of n)t.send(JSON.stringify(r))}),t.addEventListener("message",n=>{let r;try{r=JSON.parse(n.data)}catch{return}for(const i of this.listeners)i(r)}),t.addEventListener("close",()=>{if(this.ws=void 0,!this.shouldRun)return;const n=Math.min(15e3,500*2**this.reconnectAttempt);this.reconnectAttempt+=1,setTimeout(()=>{this.shouldRun&&this.connect()},n)}),t.addEventListener("error",()=>{})}}const st=new jb;async function de(e,t){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!n.ok){const r=await n.text().catch(()=>"");throw new Error(Nb(r)??`${n.status} ${n.statusText}${r?`: ${r}`:""}`)}return await n.json()}function Nb(e){if(e)try{const t=JSON.parse(e);if(t&&typeof t.error=="string"&&t.error.length>0)return t.error}catch{}}const Kl=e=>["config",e],Eb=(e,t)=>["config",e,t??"__none__"];function Nx(e,t){return rn({queryKey:Eb(e,t),queryFn:()=>{if(!e)throw new Error("workspaceId required");return de(`/api/workspaces/${encodeURIComponent(e)}/config`)},enabled:!!e})}function Pb(e){const t=Pe();return Oe({mutationFn:n=>de(`/api/workspaces/${encodeURIComponent(e)}/config/model`,{method:"PUT",body:JSON.stringify(n)}),onSuccess:()=>t.invalidateQueries({queryKey:Kl(e)})})}function Tb(e){const t=Pe();return Oe({mutationFn:n=>de(`/api/workspaces/${encodeURIComponent(e)}/config/thinking-level`,{method:"PUT",body:JSON.stringify(n)}),onSuccess:()=>t.invalidateQueries({queryKey:Kl(e)})})}function Ib(e){const t=Pe();return Oe({mutationFn:n=>de(`/api/workspaces/${encodeURIComponent(e)}/config/tools`,{method:"PUT",body:JSON.stringify(n)}),onSuccess:()=>t.invalidateQueries({queryKey:Kl(e)})})}function _b(){const e=Pe();P.useEffect(()=>st.on(n=>{n.type==="event"&&(n.payload.kind!=="session_info_changed"&&n.payload.kind!=="thinking_level_changed"||e.invalidateQueries({queryKey:Kl(n.workspaceId)}))}),[e])}/**
41
+ * @license lucide-react v0.468.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const Lb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ex=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46
+ * @license lucide-react v0.468.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */var Rb={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"};/**
51
+ * @license lucide-react v0.468.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const Ab=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...l},a)=>P.createElement("svg",{ref:a,...Rb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ex("lucide",i),...l},[...s.map(([c,f])=>P.createElement(c,f)),...Array.isArray(o)?o:[o]]));/**
56
+ * @license lucide-react v0.468.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const ke=(e,t)=>{const n=P.forwardRef(({className:r,...i},o)=>P.createElement(Ab,{ref:o,iconNode:t,className:Ex(`lucide-${Lb(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
61
+ * @license lucide-react v0.468.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const Px=ke("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
66
+ * @license lucide-react v0.468.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const zb=ke("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
71
+ * @license lucide-react v0.468.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const ss=ke("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
76
+ * @license lucide-react v0.468.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const cr=ke("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
81
+ * @license lucide-react v0.468.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const Tx=ke("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
86
+ * @license lucide-react v0.468.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const Nd=ke("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
91
+ * @license lucide-react v0.468.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Fb=ke("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
96
+ * @license lucide-react v0.468.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const Db=ke("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
101
+ * @license lucide-react v0.468.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const Mb=ke("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
106
+ * @license lucide-react v0.468.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const Ix=ke("Copy",[["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"}]]);/**
111
+ * @license lucide-react v0.468.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const Ob=ke("FolderOpen",[["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"}]]);/**
116
+ * @license lucide-react v0.468.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const _x=ke("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
121
+ * @license lucide-react v0.468.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const $b=ke("GitFork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);/**
126
+ * @license lucide-react v0.468.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const Bb=ke("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
131
+ * @license lucide-react v0.468.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const Vt=ke("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
136
+ * @license lucide-react v0.468.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const lc=ke("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
141
+ * @license lucide-react v0.468.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const Gl=ke("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
146
+ * @license lucide-react v0.468.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const Ub=ke("RefreshCw",[["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"}]]);/**
151
+ * @license lucide-react v0.468.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const Hb=ke("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
156
+ * @license lucide-react v0.468.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const Lx=ke("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
161
+ * @license lucide-react v0.468.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const qb=ke("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
166
+ * @license lucide-react v0.468.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const Qo=ke("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
171
+ * @license lucide-react v0.468.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const ac=ke("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
176
+ * @license lucide-react v0.468.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const Ui=ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Qb(e,t,n=!0){return rn({queryKey:["fs","browse",e??"~",t],queryFn:()=>{const r=new URLSearchParams;e!==void 0&&r.set("path",e),t&&r.set("showHidden","1");const i=r.toString();return de(`/api/fs/browse${i?`?${i}`:""}`)},enabled:n,staleTime:3e4})}function Vb(e,t,n=!0){const r=t.toLowerCase();return rn({queryKey:["fs","search-files",e??"",r],queryFn:()=>{if(!e)throw new Error("workspaceId required");const i=new URLSearchParams;return r&&i.set("q",r),de(`/api/workspaces/${encodeURIComponent(e)}/files/search${i.toString()?`?${i.toString()}`:""}`)},enabled:n&&!!e,staleTime:5e3})}const dr=e=>["resources",e],Yl=e=>["resources",e,"skill-body"],Xl=e=>["resources",e,"prompt-body"];function on(e,t=""){return`/api/workspaces/${encodeURIComponent(e)}/resources${t}`}function Ed(e){return rn({queryKey:dr(e),queryFn:()=>{if(!e)throw new Error("workspaceId required");return de(on(e))},enabled:!!e})}function Wb(e){const t=Pe();return Oe({mutationFn:()=>de(on(e,"/reload"),{method:"POST"}),onSuccess:n=>{t.setQueryData(dr(e),n),t.invalidateQueries({queryKey:Yl(e)}),t.invalidateQueries({queryKey:Xl(e)})}})}function Kb(e,t){return rn({queryKey:[...Yl(e),t],queryFn:()=>{if(!t)throw new Error("filePath required");return de(`${on(e,"/skill")}?path=${encodeURIComponent(t)}`)},enabled:!!t,refetchOnWindowFocus:!1,staleTime:1/0})}function Gb(e){const t=Pe();return Oe({mutationFn:n=>de(on(e,"/skills"),{method:"POST",body:JSON.stringify(n)}),onSuccess:n=>t.setQueryData(dr(e),n)})}function Yb(e){const t=Pe();return Oe({mutationFn:n=>de(on(e,"/skills"),{method:"PUT",body:JSON.stringify(n)}),onSuccess:n=>{t.setQueryData(dr(e),n),t.invalidateQueries({queryKey:Yl(e)})}})}function Xb(e){const t=Pe();return Oe({mutationFn:({filePath:n})=>de(`${on(e,"/skills")}?path=${encodeURIComponent(n)}`,{method:"DELETE"}),onSuccess:n=>{t.setQueryData(dr(e),n),t.invalidateQueries({queryKey:Yl(e)})}})}function Jb(e,t){return rn({queryKey:[...Xl(e),t],queryFn:()=>{if(!t)throw new Error("filePath required");return de(`${on(e,"/prompt")}?path=${encodeURIComponent(t)}`)},enabled:!!t,refetchOnWindowFocus:!1,staleTime:1/0})}function Zb(e){const t=Pe();return Oe({mutationFn:n=>de(on(e,"/prompts"),{method:"POST",body:JSON.stringify(n)}),onSuccess:n=>t.setQueryData(dr(e),n)})}function ek(e){const t=Pe();return Oe({mutationFn:n=>de(on(e,"/prompts"),{method:"PUT",body:JSON.stringify(n)}),onSuccess:n=>{t.setQueryData(dr(e),n),t.invalidateQueries({queryKey:Xl(e)})}})}function tk(e){const t=Pe();return Oe({mutationFn:({filePath:n})=>de(`${on(e,"/prompts")}?path=${encodeURIComponent(n)}`,{method:"DELETE"}),onSuccess:n=>{t.setQueryData(dr(e),n),t.invalidateQueries({queryKey:Xl(e)})}})}function nk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const rk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ik=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ok={};function Pp(e,t){return(ok.jsx?ik:rk).test(e)}const sk=/[ \t\n\f\r]/g;function lk(e){return typeof e=="object"?e.type==="text"?Tp(e.value):!1:Tp(e)}function Tp(e){return e.replace(sk,"")===""}class ls{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ls.prototype.normal={};ls.prototype.property={};ls.prototype.space=void 0;function Rx(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ls(n,r,t)}function uc(e){return e.toLowerCase()}class ht{constructor(t,n){this.attribute=n,this.property=t}}ht.prototype.attribute="";ht.prototype.booleanish=!1;ht.prototype.boolean=!1;ht.prototype.commaOrSpaceSeparated=!1;ht.prototype.commaSeparated=!1;ht.prototype.defined=!1;ht.prototype.mustUseProperty=!1;ht.prototype.number=!1;ht.prototype.overloadedBoolean=!1;ht.prototype.property="";ht.prototype.spaceSeparated=!1;ht.prototype.space=void 0;let ak=0;const ee=Hr(),Te=Hr(),cc=Hr(),D=Hr(),he=Hr(),mi=Hr(),gt=Hr();function Hr(){return 2**++ak}const dc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Te,commaOrSpaceSeparated:gt,commaSeparated:mi,number:D,overloadedBoolean:cc,spaceSeparated:he},Symbol.toStringTag,{value:"Module"})),La=Object.keys(dc);class Pd extends ht{constructor(t,n,r,i){let o=-1;if(super(t,n),Ip(this,"space",i),typeof r=="number")for(;++o<La.length;){const s=La[o];Ip(this,La[o],(r&dc[s])===dc[s])}}}Pd.prototype.defined=!0;function Ip(e,t,n){n&&(e[t]=n)}function Hi(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Pd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[uc(r)]=r,n[uc(o.attribute)]=r}return new ls(t,n,e.space)}const Ax=Hi({properties:{ariaActiveDescendant:null,ariaAtomic:Te,ariaAutoComplete:null,ariaBusy:Te,ariaChecked:Te,ariaColCount:D,ariaColIndex:D,ariaColSpan:D,ariaControls:he,ariaCurrent:null,ariaDescribedBy:he,ariaDetails:null,ariaDisabled:Te,ariaDropEffect:he,ariaErrorMessage:null,ariaExpanded:Te,ariaFlowTo:he,ariaGrabbed:Te,ariaHasPopup:null,ariaHidden:Te,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:he,ariaLevel:D,ariaLive:null,ariaModal:Te,ariaMultiLine:Te,ariaMultiSelectable:Te,ariaOrientation:null,ariaOwns:he,ariaPlaceholder:null,ariaPosInSet:D,ariaPressed:Te,ariaReadOnly:Te,ariaRelevant:null,ariaRequired:Te,ariaRoleDescription:he,ariaRowCount:D,ariaRowIndex:D,ariaRowSpan:D,ariaSelected:Te,ariaSetSize:D,ariaSort:null,ariaValueMax:D,ariaValueMin:D,ariaValueNow:D,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function zx(e,t){return t in e?e[t]:t}function Fx(e,t){return zx(e,t.toLowerCase())}const uk=Hi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:mi,acceptCharset:he,accessKey:he,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:he,autoFocus:ee,autoPlay:ee,blocking:he,capture:null,charSet:null,checked:ee,cite:null,className:he,cols:D,colSpan:null,content:null,contentEditable:Te,controls:ee,controlsList:he,coords:D|mi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:cc,draggable:Te,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:he,height:D,hidden:cc,high:D,href:null,hrefLang:null,htmlFor:he,httpEquiv:he,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:he,itemRef:he,itemScope:ee,itemType:he,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:D,manifest:null,max:null,maxLength:D,media:null,method:null,min:null,minLength:D,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:D,pattern:null,ping:he,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:he,required:ee,reversed:ee,rows:D,rowSpan:D,sandbox:he,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:D,sizes:null,slot:null,span:D,spellCheck:Te,src:null,srcDoc:null,srcLang:null,srcSet:null,start:D,step:null,style:null,tabIndex:D,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Te,width:D,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:he,axis:null,background:null,bgColor:null,border:D,borderColor:null,bottomMargin:D,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:D,leftMargin:D,link:null,longDesc:null,lowSrc:null,marginHeight:D,marginWidth:D,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:D,rules:null,scheme:null,scrolling:Te,standby:null,summary:null,text:null,topMargin:D,valueType:null,version:null,vAlign:null,vLink:null,vSpace:D,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:D,security:null,unselectable:null},space:"html",transform:Fx}),ck=Hi({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:gt,accentHeight:D,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:D,amplitude:D,arabicForm:null,ascent:D,attributeName:null,attributeType:null,azimuth:D,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:D,by:null,calcMode:null,capHeight:D,className:he,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:D,diffuseConstant:D,direction:null,display:null,dur:null,divisor:D,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:D,enableBackground:null,end:null,event:null,exponent:D,externalResourcesRequired:null,fill:null,fillOpacity:D,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:mi,g2:mi,glyphName:mi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:D,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:D,horizOriginX:D,horizOriginY:D,id:null,ideographic:D,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:D,k:D,k1:D,k2:D,k3:D,k4:D,kernelMatrix:gt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:D,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:D,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:D,overlineThickness:D,paintOrder:null,panose1:null,path:null,pathLength:D,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:he,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:D,pointsAtY:D,pointsAtZ:D,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gt,rev:gt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gt,requiredFeatures:gt,requiredFonts:gt,requiredFormats:gt,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:D,specularExponent:D,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:D,strikethroughThickness:D,string:null,stroke:null,strokeDashArray:gt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:D,strokeOpacity:D,strokeWidth:null,style:null,surfaceScale:D,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gt,tabIndex:D,tableValues:null,target:null,targetX:D,targetY:D,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:D,underlineThickness:D,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:D,values:null,vAlphabetic:D,vMathematical:D,vectorEffect:null,vHanging:D,vIdeographic:D,version:null,vertAdvY:D,vertOriginX:D,vertOriginY:D,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:D,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:zx}),Dx=Hi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Mx=Hi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Fx}),Ox=Hi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dk={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"},fk=/[A-Z]/g,_p=/-[a-z]/g,pk=/^data[-\w.:]+$/i;function hk(e,t){const n=uc(t);let r=t,i=ht;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pk.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(_p,gk);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!_p.test(o)){let s=o.replace(fk,mk);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Pd}return new i(r,t)}function mk(e){return"-"+e.toLowerCase()}function gk(e){return e.charAt(1).toUpperCase()}const xk=Rx([Ax,uk,Dx,Mx,Ox],"html"),Td=Rx([Ax,ck,Dx,Mx,Ox],"svg");function yk(e){return e.join(" ").trim()}var Id={},Lp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vk=/\n/g,bk=/^\s*/,kk=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,wk=/^:\s*/,Sk=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ck=/^[;\s]*/,jk=/^\s+|\s+$/g,Nk=`
181
+ `,Rp="/",Ap="*",xr="",Ek="comment",Pk="declaration";function Tk(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var v=g.match(vk);v&&(n+=v.length);var k=g.lastIndexOf(Nk);r=~k?g.length-k:r+g.length}function o(){var g={line:n,column:r};return function(v){return v.position=new s(g),c(),v}}function s(g){this.start=g,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(g){var v=new Error(t.source+":"+n+":"+r+": "+g);if(v.reason=g,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function a(g){var v=g.exec(e);if(v){var k=v[0];return i(k),e=e.slice(k.length),v}}function c(){a(bk)}function f(g){var v;for(g=g||[];v=d();)v!==!1&&g.push(v);return g}function d(){var g=o();if(!(Rp!=e.charAt(0)||Ap!=e.charAt(1))){for(var v=2;xr!=e.charAt(v)&&(Ap!=e.charAt(v)||Rp!=e.charAt(v+1));)++v;if(v+=2,xr===e.charAt(v-1))return l("End of comment missing");var k=e.slice(2,v-2);return r+=2,i(k),e=e.slice(v),r+=2,g({type:Ek,comment:k})}}function p(){var g=o(),v=a(kk);if(v){if(d(),!a(wk))return l("property missing ':'");var k=a(Sk),m=g({type:Pk,property:zp(v[0].replace(Lp,xr)),value:k?zp(k[0].replace(Lp,xr)):xr});return a(Ck),m}}function h(){var g=[];f(g);for(var v;v=p();)v!==!1&&(g.push(v),f(g));return g}return c(),h()}function zp(e){return e?e.replace(jk,xr):xr}var Ik=Tk,_k=Js&&Js.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Id,"__esModule",{value:!0});Id.default=Rk;const Lk=_k(Ik);function Rk(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Lk.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n||{},n[s]=l)}),n}var Jl={};Object.defineProperty(Jl,"__esModule",{value:!0});Jl.camelCase=void 0;var Ak=/^--[a-zA-Z0-9_-]+$/,zk=/-([a-z])/g,Fk=/^[^-]+$/,Dk=/^-(webkit|moz|ms|o|khtml)-/,Mk=/^-(ms)-/,Ok=function(e){return!e||Fk.test(e)||Ak.test(e)},$k=function(e,t){return t.toUpperCase()},Fp=function(e,t){return"".concat(t,"-")},Bk=function(e,t){return t===void 0&&(t={}),Ok(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Mk,Fp):e=e.replace(Dk,Fp),e.replace(zk,$k))};Jl.camelCase=Bk;var Uk=Js&&Js.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Hk=Uk(Id),qk=Jl;function fc(e,t){var n={};return!e||typeof e!="string"||(0,Hk.default)(e,function(r,i){r&&i&&(n[(0,qk.camelCase)(r,t)]=i)}),n}fc.default=fc;var Qk=fc;const Vk=Nc(Qk),$x=Bx("end"),_d=Bx("start");function Bx(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Wk(e){const t=_d(e),n=$x(e);if(t&&n)return{start:t,end:n}}function So(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Dp(e.position):"start"in e||"end"in e?Dp(e):"line"in e||"column"in e?pc(e):""}function pc(e){return Mp(e&&e.line)+":"+Mp(e&&e.column)}function Dp(e){return pc(e&&e.start)+"-"+pc(e&&e.end)}function Mp(e){return e&&typeof e=="number"?e:1}class Ye extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=So(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ye.prototype.file="";Ye.prototype.name="";Ye.prototype.reason="";Ye.prototype.message="";Ye.prototype.stack="";Ye.prototype.column=void 0;Ye.prototype.line=void 0;Ye.prototype.ancestors=void 0;Ye.prototype.cause=void 0;Ye.prototype.fatal=void 0;Ye.prototype.place=void 0;Ye.prototype.ruleId=void 0;Ye.prototype.source=void 0;const Ld={}.hasOwnProperty,Kk=new Map,Gk=/[A-Z]/g,Yk=new Set(["table","tbody","thead","tfoot","tr"]),Xk=new Set(["td","th"]),Ux="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=sw(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ow(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Td:xk,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Hx(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Hx(e,t,n){if(t.type==="element")return Zk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ew(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nw(e,t,n);if(t.type==="mdxjsEsm")return tw(e,t);if(t.type==="root")return rw(e,t,n);if(t.type==="text")return iw(e,t)}function Zk(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Td,e.schema=i),e.ancestors.push(t);const o=Qx(e,t.tagName,!1),s=lw(e,t);let l=Ad(e,t);return Yk.has(t.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!lk(a):!0})),qx(e,s,o,t),Rd(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function ew(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Vo(e,t.position)}function tw(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Vo(e,t.position)}function nw(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Td,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Qx(e,t.name,!0),s=aw(e,t),l=Ad(e,t);return qx(e,s,o,t),Rd(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function rw(e,t,n){const r={};return Rd(r,Ad(e,t)),e.create(t,e.Fragment,r,n)}function iw(e,t){return t.value}function qx(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Rd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ow(e,t,n){return r;function r(i,o,s,l){const c=Array.isArray(s.children)?n:t;return l?c(o,s,l):c(o,s)}}function sw(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),a=_d(r);return t(i,o,s,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function lw(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ld.call(t.properties,i)){const o=uw(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&Xk.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function aw(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Vo(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Vo(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Ad(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Kk;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const a=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(a){const c=i.get(a)||0;s=a+"-"+c,i.set(a,c+1)}}const l=Hx(e,o,s);l!==void 0&&n.push(l)}return n}function uw(e,t,n){const r=hk(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?nk(n):yk(n)),r.property==="style"){let i=typeof n=="object"?n:cw(e,String(n));return e.stylePropertyNameCase==="css"&&(i=dw(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?dk[r.property]||r.property:r.attribute,n]}}function cw(e,t){try{return Vk(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ye("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ux+"#cannot-parse-style-attribute",i}}function Qx(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=Pp(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=Pp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ld.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Vo(e)}function Vo(e,t){const n=new Ye("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ux+"#cannot-handle-mdx-estrees-without-createevaluater",n}function dw(e){const t={};let n;for(n in e)Ld.call(e,n)&&(t[fw(n)]=e[n]);return t}function fw(e){let t=e.replace(Gk,pw);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pw(e){return"-"+e.toLowerCase()}const Ra={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"]},hw={};function zd(e,t){const n=hw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Vx(e,r,i)}function Vx(e,t,n){if(mw(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Op(e.children,t,n)}return Array.isArray(e)?Op(e,t,n):""}function Op(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Vx(e[i],t,n);return r.join("")}function mw(e){return!!(e&&typeof e=="object")}const $p=document.createElement("i");function Fd(e){const t="&"+e+";";$p.innerHTML=t;const n=$p.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function St(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function It(e,t){return e.length>0?(St(e,e.length,0,t),e):t}const Bp={}.hasOwnProperty;function Wx(e){const t={};let n=-1;for(;++n<e.length;)gw(t,e[n]);return t}function gw(e,t){let n;for(n in t){const i=(Bp.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){Bp.call(i,s)||(i[s]=[]);const l=o[s];xw(i[s],Array.isArray(l)?l:l?[l]:[])}}}function xw(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);St(e,0,0,r)}function Kx(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function qt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const tt=fr(/[A-Za-z]/),Ke=fr(/[\dA-Za-z]/),yw=fr(/[#-'*+\--9=?A-Z^-~]/);function jl(e){return e!==null&&(e<32||e===127)}const hc=fr(/\d/),vw=fr(/[\dA-Fa-f]/),bw=fr(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function pe(e){return e!==null&&(e<0||e===32)}function te(e){return e===-2||e===-1||e===32}const Zl=fr(new RegExp("\\p{P}|\\p{S}","u")),Or=fr(/\s/);function fr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qi(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&Ke(e.charCodeAt(n+1))&&Ke(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function se(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return te(a)?(e.enter(n),l(a)):t(a)}function l(a){return te(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}const kw={tokenize:ww};function ww(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),se(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return G(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const Sw={tokenize:Cw},Up={tokenize:jw};function Cw(e){const t=this,n=[];let r=0,i,o,s;return l;function l(y){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,a,c)(y)}return c(y)}function a(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const w=t.events.length;let E=w,S;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){S=t.events[E][1].end;break}m(r);let T=w;for(;T<t.events.length;)t.events[T][1].end={...S},T++;return St(t.events,E+1,0,t.events.slice(w)),t.events.length=T,c(y)}return l(y)}function c(y){if(r===n.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return g(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Up,f,d)(y)}function f(y){return i&&x(),m(r),p(y)}function d(y){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(y)}function p(y){return t.containerState={},e.attempt(Up,h,g)(y)}function h(y){return r++,n.push([t.currentConstruct,t.containerState]),p(y)}function g(y){if(y===null){i&&x(),m(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(y)}function v(y){if(y===null){k(e.exit("chunkFlow"),!0),m(0),e.consume(y);return}return G(y)?(e.consume(y),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(y),v)}function k(y,w){const E=t.sliceStream(y);if(w&&E.push(null),y.previous=o,o&&(o.next=y),o=y,i.defineSkip(y.start),i.write(E),t.parser.lazy[y.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;const T=t.events.length;let I=T,R,j;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(R){j=t.events[I][1].end;break}R=!0}for(m(r),S=T;S<t.events.length;)t.events[S][1].end={...j},S++;St(t.events,I+1,0,t.events.slice(T)),t.events.length=S}}function m(y){let w=n.length;for(;w-- >y;){const E=n[w];t.containerState=E[1],E[0].exit.call(t,e)}n.length=y}function x(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function jw(e,t,n){return se(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Di(e){if(e===null||pe(e)||Or(e))return 1;if(Zl(e))return 2}function ea(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const mc={name:"attention",resolveAll:Nw,tokenize:Ew};function Nw(e,t){let n=-1,r,i,o,s,l,a,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};Hp(d,-a),Hp(p,a),s={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=It(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=It(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),c=It(c,ea(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=It(c,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=It(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,St(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ew(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Di(r);let o;return s;function s(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const c=e.exit("attentionSequence"),f=Di(a),d=!f||f===2&&i||n.includes(a),p=!i||i===2&&f||n.includes(r);return c._open=!!(o===42?d:d&&(i||!p)),c._close=!!(o===42?p:p&&(f||!d)),t(a)}}function Hp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Pw={name:"autolink",tokenize:Tw};function Tw(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return tt(h)?(e.consume(h),s):h===64?n(h):c(h)}function s(h){return h===43||h===45||h===46||Ke(h)?(r=1,l(h)):c(h)}function l(h){return h===58?(e.consume(h),r=0,a):(h===43||h===45||h===46||Ke(h))&&r++<32?(e.consume(h),l):(r=0,c(h))}function a(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||jl(h)?n(h):(e.consume(h),a)}function c(h){return h===64?(e.consume(h),f):yw(h)?(e.consume(h),c):n(h)}function f(h){return Ke(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||Ke(h))&&r++<63){const g=h===45?p:d;return e.consume(h),g}return n(h)}}const as={partial:!0,tokenize:Iw};function Iw(e,t,n){return r;function r(o){return te(o)?se(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||G(o)?t(o):n(o)}}const Gx={continuation:{tokenize:Lw},exit:Rw,name:"blockQuote",tokenize:_w};function _w(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return te(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Lw(e,t,n){const r=this;return i;function i(s){return te(s)?se(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Gx,t,n)(s)}}function Rw(e){e.exit("blockQuote")}const Yx={name:"characterEscape",tokenize:Aw};function Aw(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return bw(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Xx={name:"characterReference",tokenize:zw};function zw(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,s=Ke,f(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=vw,f):(e.enter("characterReferenceValue"),o=7,s=hc,f(d))}function f(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===Ke&&!Fd(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),f):n(d)}}const qp={partial:!0,tokenize:Dw},Qp={concrete:!0,name:"codeFenced",tokenize:Fw};function Fw(e,t,n){const r=this,i={partial:!0,tokenize:E};let o=0,s=0,l;return a;function a(S){return c(S)}function c(S){const T=r.events[r.events.length-1];return o=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,l=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===l?(s++,e.consume(S),f):s<3?n(S):(e.exit("codeFencedFenceSequence"),te(S)?se(e,d,"whitespace")(S):d(S))}function d(S){return S===null||G(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(qp,v,w)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||G(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):te(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),se(e,h,"whitespace")(S)):S===96&&S===l?n(S):(e.consume(S),p)}function h(S){return S===null||G(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||G(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===l?n(S):(e.consume(S),g)}function v(S){return e.attempt(i,w,k)(S)}function k(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),m}function m(S){return o>0&&te(S)?se(e,x,"linePrefix",o+1)(S):x(S)}function x(S){return S===null||G(S)?e.check(qp,v,w)(S):(e.enter("codeFlowValue"),y(S))}function y(S){return S===null||G(S)?(e.exit("codeFlowValue"),x(S)):(e.consume(S),y)}function w(S){return e.exit("codeFenced"),t(S)}function E(S,T,I){let R=0;return j;function j(H){return S.enter("lineEnding"),S.consume(H),S.exit("lineEnding"),_}function _(H){return S.enter("codeFencedFence"),te(H)?se(S,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):A(H)}function A(H){return H===l?(S.enter("codeFencedFenceSequence"),W(H)):I(H)}function W(H){return H===l?(R++,S.consume(H),W):R>=s?(S.exit("codeFencedFenceSequence"),te(H)?se(S,Y,"whitespace")(H):Y(H)):I(H)}function Y(H){return H===null||G(H)?(S.exit("codeFencedFence"),T(H)):I(H)}}}function Dw(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Aa={name:"codeIndented",tokenize:Ow},Mw={partial:!0,tokenize:$w};function Ow(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),se(e,o,"linePrefix",5)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?a(c):G(c)?e.attempt(Mw,s,a)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||G(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),l)}function a(c){return e.exit("codeIndented"),t(c)}}function $w(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):se(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):G(s)?i(s):n(s)}}const Bw={name:"codeText",previous:Hw,resolve:Uw,tokenize:qw};function Uw(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Hw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qw(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(o=e.enter("codeTextSequence"),i=0,f(d)):G(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||G(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",c(d))}}class Qw{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&io(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),io(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),io(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);io(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);io(this.left,n.reverse())}}}function io(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Jx(e){const t={};let n=-1,r,i,o,s,l,a,c;const f=new Qw(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Vw(f,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=f.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,n),l.unshift(r),f.splice(i,n-i+1,l))}}return St(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function Vw(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,a=[],c={};let f,d,p=-1,h=n,g=0,v=0;const k=[v];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(v=p+1,k.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):k.pop(),p=k.length;p--;){const m=l.slice(k[p],k[p+1]),x=o.pop();a.push([x,x+m.length-1]),e.splice(x,2,m)}for(a.reverse(),p=-1;++p<a.length;)c[g+a[p][0]]=g+a[p][1],g+=a[p][1]-a[p][0]-1;return c}const Ww={resolve:Gw,tokenize:Yw},Kw={partial:!0,tokenize:Xw};function Gw(e){return Jx(e),e}function Yw(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):G(l)?e.check(Kw,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Xw(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),se(e,o,"linePrefix")}function o(s){if(s===null||G(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Zx(e,t,n,r,i,o,s,l,a){const c=a||Number.POSITIVE_INFINITY;let f=0;return d;function d(m){return m===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(m),e.exit(o),p):m===null||m===32||m===41||jl(m)?n(m):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(m))}function p(m){return m===62?(e.enter(o),e.consume(m),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===62?(e.exit("chunkString"),e.exit(l),p(m)):m===null||m===60||G(m)?n(m):(e.consume(m),m===92?g:h)}function g(m){return m===60||m===62||m===92?(e.consume(m),h):h(m)}function v(m){return!f&&(m===null||m===41||pe(m))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(m)):f<c&&m===40?(e.consume(m),f++,v):m===41?(e.consume(m),f--,v):m===null||m===32||m===40||jl(m)?n(m):(e.consume(m),m===92?k:v)}function k(m){return m===40||m===41||m===92?(e.consume(m),v):v(m)}}function ey(e,t,n,r,i,o){const s=this;let l=0,a;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return l>999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):G(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||G(h)||l++>999?(e.exit("chunkString"),f(h)):(e.consume(h),a||(a=!te(h)),h===92?p:d)}function p(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function ty(e,t,n,r,i,o){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,a):n(p)}function a(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),c(p))}function c(p){return p===s?(e.exit(o),a(s)):p===null?n(p):G(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),se(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||G(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:f)}function d(p){return p===s||p===92?(e.consume(p),f):f(p)}}function Co(e,t){let n;return r;function r(i){return G(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):te(i)?se(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Jw={name:"definition",tokenize:eS},Zw={partial:!0,tokenize:tS};function eS(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return ey.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return i=qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return pe(h)?Co(e,c)(h):c(h)}function c(h){return Zx(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Zw,d,d)(h)}function d(h){return te(h)?se(e,p,"whitespace")(h):p(h)}function p(h){return h===null||G(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function tS(e,t,n){return r;function r(l){return pe(l)?Co(e,i)(l):n(l)}function i(l){return ty(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return te(l)?se(e,s,"whitespace")(l):s(l)}function s(l){return l===null||G(l)?t(l):n(l)}}const nS={name:"hardBreakEscape",tokenize:rS};function rS(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return G(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const iS={name:"headingAtx",resolve:oS,tokenize:sS};function oS(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},St(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function sS(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||pe(f)?(e.exit("atxHeadingSequence"),l(f)):n(f)}function l(f){return f===35?(e.enter("atxHeadingSequence"),a(f)):f===null||G(f)?(e.exit("atxHeading"),t(f)):te(f)?se(e,l,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function a(f){return f===35?(e.consume(f),a):(e.exit("atxHeadingSequence"),l(f))}function c(f){return f===null||f===35||pe(f)?(e.exit("atxHeadingText"),l(f)):(e.consume(f),c)}}const lS=["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"],Vp=["pre","script","style","textarea"],aS={concrete:!0,name:"htmlFlow",resolveTo:dS,tokenize:fS},uS={partial:!0,tokenize:hS},cS={partial:!0,tokenize:pS};function dS(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function fS(e,t,n){const r=this;let i,o,s,l,a;return c;function c(N){return f(N)}function f(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),p):N===47?(e.consume(N),o=!0,v):N===63?(e.consume(N),i=3,r.interrupt?t:b):tt(N)?(e.consume(N),s=String.fromCharCode(N),k):n(N)}function p(N){return N===45?(e.consume(N),i=2,h):N===91?(e.consume(N),i=5,l=0,g):tt(N)?(e.consume(N),i=4,r.interrupt?t:b):n(N)}function h(N){return N===45?(e.consume(N),r.interrupt?t:b):n(N)}function g(N){const ve="CDATA[";return N===ve.charCodeAt(l++)?(e.consume(N),l===ve.length?r.interrupt?t:A:g):n(N)}function v(N){return tt(N)?(e.consume(N),s=String.fromCharCode(N),k):n(N)}function k(N){if(N===null||N===47||N===62||pe(N)){const ve=N===47,He=s.toLowerCase();return!ve&&!o&&Vp.includes(He)?(i=1,r.interrupt?t(N):A(N)):lS.includes(s.toLowerCase())?(i=6,ve?(e.consume(N),m):r.interrupt?t(N):A(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):o?x(N):y(N))}return N===45||Ke(N)?(e.consume(N),s+=String.fromCharCode(N),k):n(N)}function m(N){return N===62?(e.consume(N),r.interrupt?t:A):n(N)}function x(N){return te(N)?(e.consume(N),x):j(N)}function y(N){return N===47?(e.consume(N),j):N===58||N===95||tt(N)?(e.consume(N),w):te(N)?(e.consume(N),y):j(N)}function w(N){return N===45||N===46||N===58||N===95||Ke(N)?(e.consume(N),w):E(N)}function E(N){return N===61?(e.consume(N),S):te(N)?(e.consume(N),E):y(N)}function S(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),a=N,T):te(N)?(e.consume(N),S):I(N)}function T(N){return N===a?(e.consume(N),a=null,R):N===null||G(N)?n(N):(e.consume(N),T)}function I(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||pe(N)?E(N):(e.consume(N),I)}function R(N){return N===47||N===62||te(N)?y(N):n(N)}function j(N){return N===62?(e.consume(N),_):n(N)}function _(N){return N===null||G(N)?A(N):te(N)?(e.consume(N),_):n(N)}function A(N){return N===45&&i===2?(e.consume(N),re):N===60&&i===1?(e.consume(N),Q):N===62&&i===4?(e.consume(N),K):N===63&&i===3?(e.consume(N),b):N===93&&i===5?(e.consume(N),B):G(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(uS,le,W)(N)):N===null||G(N)?(e.exit("htmlFlowData"),W(N)):(e.consume(N),A)}function W(N){return e.check(cS,Y,le)(N)}function Y(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),H}function H(N){return N===null||G(N)?W(N):(e.enter("htmlFlowData"),A(N))}function re(N){return N===45?(e.consume(N),b):A(N)}function Q(N){return N===47?(e.consume(N),s="",z):A(N)}function z(N){if(N===62){const ve=s.toLowerCase();return Vp.includes(ve)?(e.consume(N),K):A(N)}return tt(N)&&s.length<8?(e.consume(N),s+=String.fromCharCode(N),z):A(N)}function B(N){return N===93?(e.consume(N),b):A(N)}function b(N){return N===62?(e.consume(N),K):N===45&&i===2?(e.consume(N),b):A(N)}function K(N){return N===null||G(N)?(e.exit("htmlFlowData"),le(N)):(e.consume(N),K)}function le(N){return e.exit("htmlFlow"),t(N)}}function pS(e,t,n){const r=this;return i;function i(s){return G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function hS(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(as,t,n)}}const mS={name:"htmlText",tokenize:gS};function gS(e,t,n){const r=this;let i,o,s;return l;function l(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),a}function a(b){return b===33?(e.consume(b),c):b===47?(e.consume(b),E):b===63?(e.consume(b),y):tt(b)?(e.consume(b),I):n(b)}function c(b){return b===45?(e.consume(b),f):b===91?(e.consume(b),o=0,g):tt(b)?(e.consume(b),x):n(b)}function f(b){return b===45?(e.consume(b),h):n(b)}function d(b){return b===null?n(b):b===45?(e.consume(b),p):G(b)?(s=d,Q(b)):(e.consume(b),d)}function p(b){return b===45?(e.consume(b),h):d(b)}function h(b){return b===62?re(b):b===45?p(b):d(b)}function g(b){const K="CDATA[";return b===K.charCodeAt(o++)?(e.consume(b),o===K.length?v:g):n(b)}function v(b){return b===null?n(b):b===93?(e.consume(b),k):G(b)?(s=v,Q(b)):(e.consume(b),v)}function k(b){return b===93?(e.consume(b),m):v(b)}function m(b){return b===62?re(b):b===93?(e.consume(b),m):v(b)}function x(b){return b===null||b===62?re(b):G(b)?(s=x,Q(b)):(e.consume(b),x)}function y(b){return b===null?n(b):b===63?(e.consume(b),w):G(b)?(s=y,Q(b)):(e.consume(b),y)}function w(b){return b===62?re(b):y(b)}function E(b){return tt(b)?(e.consume(b),S):n(b)}function S(b){return b===45||Ke(b)?(e.consume(b),S):T(b)}function T(b){return G(b)?(s=T,Q(b)):te(b)?(e.consume(b),T):re(b)}function I(b){return b===45||Ke(b)?(e.consume(b),I):b===47||b===62||pe(b)?R(b):n(b)}function R(b){return b===47?(e.consume(b),re):b===58||b===95||tt(b)?(e.consume(b),j):G(b)?(s=R,Q(b)):te(b)?(e.consume(b),R):re(b)}function j(b){return b===45||b===46||b===58||b===95||Ke(b)?(e.consume(b),j):_(b)}function _(b){return b===61?(e.consume(b),A):G(b)?(s=_,Q(b)):te(b)?(e.consume(b),_):R(b)}function A(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,W):G(b)?(s=A,Q(b)):te(b)?(e.consume(b),A):(e.consume(b),Y)}function W(b){return b===i?(e.consume(b),i=void 0,H):b===null?n(b):G(b)?(s=W,Q(b)):(e.consume(b),W)}function Y(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||pe(b)?R(b):(e.consume(b),Y)}function H(b){return b===47||b===62||pe(b)?R(b):n(b)}function re(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function Q(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),z}function z(b){return te(b)?se(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):B(b)}function B(b){return e.enter("htmlTextData"),s(b)}}const Dd={name:"labelEnd",resolveAll:bS,resolveTo:kS,tokenize:wS},xS={tokenize:SS},yS={tokenize:CS},vS={tokenize:jS};function bS(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&St(e,0,e.length,n),e}function kS(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const a={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",a,t],["enter",c,t]],l=It(l,e.slice(o+1,o+r+3)),l=It(l,[["enter",f,t]]),l=It(l,ea(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=It(l,[["exit",f,t],e[s-2],e[s-1],["exit",c,t]]),l=It(l,e.slice(s+1)),l=It(l,[["exit",a,t]]),St(e,o,e.length,l),e}function wS(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(p){return o?o._inactive?d(p):(s=r.parser.defined.includes(qt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),a):n(p)}function a(p){return p===40?e.attempt(xS,f,s?f:d)(p):p===91?e.attempt(yS,f,s?c:d)(p):s?f(p):d(p)}function c(p){return e.attempt(vS,f,d)(p)}function f(p){return t(p)}function d(p){return o._balanced=!0,n(p)}}function SS(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return pe(d)?Co(e,o)(d):o(d)}function o(d){return d===41?f(d):Zx(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return pe(d)?Co(e,a)(d):f(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?ty(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return pe(d)?Co(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function CS(e,t,n){const r=this;return i;function i(l){return ey.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function jS(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const NS={name:"labelStartImage",resolveAll:Dd.resolveAll,tokenize:ES};function ES(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const PS={name:"labelStartLink",resolveAll:Dd.resolveAll,tokenize:TS};function TS(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const za={name:"lineEnding",tokenize:IS};function IS(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),se(e,t,"linePrefix")}}const Gs={name:"thematicBreak",tokenize:_S};function _S(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,l(c)}function l(c){return c===i?(e.enter("thematicBreakSequence"),a(c)):r>=3&&(c===null||G(c))?(e.exit("thematicBreak"),t(c)):n(c)}function a(c){return c===i?(e.consume(c),r++,a):(e.exit("thematicBreakSequence"),te(c)?se(e,l,"whitespace")(c):l(c))}}const ot={continuation:{tokenize:zS},exit:DS,name:"list",tokenize:AS},LS={partial:!0,tokenize:MS},RS={partial:!0,tokenize:FS};function AS(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:hc(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Gs,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return hc(h)&&++s<10?(e.consume(h),a):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(as,r.interrupt?n:f,e.attempt(LS,p,d))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function d(h){return te(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function zS(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(as,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,se(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!te(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(RS,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,se(e,e.attempt(ot,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function FS(e,t,n){const r=this;return se(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function DS(e){e.exit(this.containerState.type)}function MS(e,t,n){const r=this;return se(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!te(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Wp={name:"setextUnderline",resolveTo:OS,tokenize:$S};function OS(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function $S(e,t,n){const r=this;let i;return o;function o(c){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),te(c)?se(e,a,"lineSuffix")(c):a(c))}function a(c){return c===null||G(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const BS={tokenize:US};function US(e){const t=this,n=e.attempt(as,r,e.attempt(this.parser.constructs.flowInitial,i,se(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ww,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const HS={resolveAll:ry()},qS=ny("string"),QS=ny("text");function ny(e){return{resolveAll:ry(e==="text"?VS:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(f){return c(f)?o(f):l(f)}function l(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),a}function a(f){return c(f)?(n.exit("data"),o(f)):(n.consume(f),a)}function c(f){if(f===null)return!0;const d=i[f];let p=-1;if(d)for(;++p<d.length;){const h=d[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ry(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function VS(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,a;for(;o--;){const c=i[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(c===-2)a=!0,l++;else if(c!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const c={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const WS={42:ot,43:ot,45:ot,48:ot,49:ot,50:ot,51:ot,52:ot,53:ot,54:ot,55:ot,56:ot,57:ot,62:Gx},KS={91:Jw},GS={[-2]:Aa,[-1]:Aa,32:Aa},YS={35:iS,42:Gs,45:[Wp,Gs],60:aS,61:Wp,95:Gs,96:Qp,126:Qp},XS={38:Xx,92:Yx},JS={[-5]:za,[-4]:za,[-3]:za,33:NS,38:Xx,42:mc,60:[Pw,mS],91:PS,92:[nS,Yx],93:Dd,95:mc,96:Bw},ZS={null:[mc,HS]},eC={null:[42,95]},tC={null:[]},nC=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eC,contentInitial:KS,disable:tC,document:WS,flow:YS,flowInitial:GS,insideSpan:ZS,string:XS,text:JS},Symbol.toStringTag,{value:"Module"}));function rC(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const a={attempt:T(E),check:T(S),consume:x,enter:y,exit:w,interrupt:T(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:v,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:d};let f=t.tokenize.call(c,a);return t.resolveAll&&o.push(t),c;function d(_){return s=It(s,_),k(),s[s.length-1]!==null?[]:(I(t,0),c.events=ea(o,c.events,c),c.events)}function p(_,A){return oC(h(_),A)}function h(_){return iC(s,_)}function g(){const{_bufferIndex:_,_index:A,line:W,column:Y,offset:H}=r;return{_bufferIndex:_,_index:A,line:W,column:Y,offset:H}}function v(_){i[_.line]=_.column,j()}function k(){let _;for(;r._index<s.length;){const A=s[r._index];if(typeof A=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<A.length;)m(A.charCodeAt(r._bufferIndex));else m(A)}}function m(_){f=f(_)}function x(_){G(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,j()):_!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=_}function y(_,A){const W=A||{};return W.type=_,W.start=g(),c.events.push(["enter",W,c]),l.push(W),W}function w(_){const A=l.pop();return A.end=g(),c.events.push(["exit",A,c]),A}function E(_,A){I(_,A.from)}function S(_,A){A.restore()}function T(_,A){return W;function W(Y,H,re){let Q,z,B,b;return Array.isArray(Y)?le(Y):"tokenize"in Y?le([Y]):K(Y);function K(V){return ze;function ze(zt){const qr=zt!==null&&V[zt],Qr=zt!==null&&V.null,ds=[...Array.isArray(qr)?qr:qr?[qr]:[],...Array.isArray(Qr)?Qr:Qr?[Qr]:[]];return le(ds)(zt)}}function le(V){return Q=V,z=0,V.length===0?re:N(V[z])}function N(V){return ze;function ze(zt){return b=R(),B=V,V.partial||(c.currentConstruct=V),V.name&&c.parser.constructs.disable.null.includes(V.name)?He():V.tokenize.call(A?Object.assign(Object.create(c),A):c,a,ve,He)(zt)}}function ve(V){return _(B,b),H}function He(V){return b.restore(),++z<Q.length?N(Q[z]):re}}}function I(_,A){_.resolveAll&&!o.includes(_)&&o.push(_),_.resolve&&St(c.events,A,c.events.length-A,_.resolve(c.events.slice(A),c)),_.resolveTo&&(c.events=_.resolveTo(c.events,c))}function R(){const _=g(),A=c.previous,W=c.currentConstruct,Y=c.events.length,H=Array.from(l);return{from:Y,restore:re};function re(){r=_,c.previous=A,c.currentConstruct=W,c.events.length=Y,l=H,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function iC(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function oC(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
182
+ `;break}case-3:{s=`\r
183
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function sC(e){const r={constructs:Wx([nC,...(e||{}).extensions||[]]),content:i(kw),defined:[],document:i(Sw),flow:i(BS),lazy:{},string:i(qS),text:i(QS)};return r;function i(o){return s;function s(l){return rC(r,o,l)}}}function lC(e){for(;!Jx(e););return e}const Kp=/[\0\t\n\r]/g;function aC(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const a=[];let c,f,d,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(Kp.lastIndex=d,c=Kp.exec(o),p=c&&c.index!==void 0?c.index:o.length,h=o.charCodeAt(p),!c){t=o.slice(d);break}if(h===10&&d===p&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),d<p&&(a.push(o.slice(d,p)),e+=p-d),h){case 0:{a.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,a.push(-2);e++<f;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return l&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const uC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cC(e){return e.replace(uC,dC)}function dC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Kx(n.slice(o?2:1),o?16:10)}return Fd(n)||e}const iy={}.hasOwnProperty;function fC(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),pC(n)(lC(sC(n).document().write(aC()(e,t,!0))))}function pC(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(sf),autolinkProtocol:R,autolinkEmail:R,atxHeading:o(nf),blockQuote:o(Qr),characterEscape:R,characterReference:R,codeFenced:o(ds),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ds,s),codeText:o(i1,s),codeTextData:R,data:R,codeFlowValue:R,definition:o(o1),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(s1),hardBreakEscape:o(rf),hardBreakTrailing:o(rf),htmlFlow:o(of,s),htmlFlowData:R,htmlText:o(of,s),htmlTextData:R,image:o(l1),label:s,link:o(sf),listItem:o(a1),listItemValue:p,listOrdered:o(lf,d),listUnordered:o(lf),paragraph:o(u1),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(nf),strong:o(c1),thematicBreak:o(f1)},exit:{atxHeading:a(),atxHeadingSequence:E,autolink:a(),autolinkEmail:qr,autolinkProtocol:zt,blockQuote:a(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:He,characterReferenceMarkerNumeric:He,characterReferenceValue:V,characterReference:ze,codeFenced:a(k),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:j,codeIndented:a(m),codeText:a(H),codeTextData:j,data:j,definition:a(),definitionDestinationString:w,definitionLabelString:x,definitionTitleString:y,emphasis:a(),hardBreakEscape:a(A),hardBreakTrailing:a(A),htmlFlow:a(W),htmlFlowData:j,htmlText:a(Y),htmlTextData:j,image:a(Q),label:B,labelText:z,lineEnding:_,link:a(re),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ve,resourceDestinationString:b,resourceTitleString:K,resource:le,setextHeading:a(I),setextHeadingLineSequence:T,setextHeadingText:S,strong:a(),thematicBreak:a()}};oy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let M={type:"root",children:[]};const X={stack:[M],tokenStack:[],config:t,enter:l,exit:c,buffer:s,resume:f,data:n},ie=[];let fe=-1;for(;++fe<L.length;)if(L[fe][1].type==="listOrdered"||L[fe][1].type==="listUnordered")if(L[fe][0]==="enter")ie.push(fe);else{const Ft=ie.pop();fe=i(L,Ft,fe)}for(fe=-1;++fe<L.length;){const Ft=t[L[fe][0]];iy.call(Ft,L[fe][1].type)&&Ft[L[fe][1].type].call(Object.assign({sliceSerialize:L[fe][2].sliceSerialize},X),L[fe][1])}if(X.tokenStack.length>0){const Ft=X.tokenStack[X.tokenStack.length-1];(Ft[1]||Gp).call(X,void 0,Ft[0])}for(M.position={start:Pn(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:Pn(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)M=t.transforms[fe](M)||M;return M}function i(L,M,X){let ie=M-1,fe=-1,Ft=!1,pr,ln,Ki,Gi;for(;++ie<=X;){const mt=L[ie];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?fe++:fe--,Gi=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(pr&&!Gi&&!fe&&!Ki&&(Ki=ie),Gi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gi=void 0}if(!fe&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||fe===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(pr){let Vr=ie;for(ln=void 0;Vr--;){const an=L[Vr];if(an[1].type==="lineEnding"||an[1].type==="lineEndingBlank"){if(an[0]==="exit")continue;ln&&(L[ln][1].type="lineEndingBlank",Ft=!0),an[1].type="lineEnding",ln=Vr}else if(!(an[1].type==="linePrefix"||an[1].type==="blockQuotePrefix"||an[1].type==="blockQuotePrefixWhitespace"||an[1].type==="blockQuoteMarker"||an[1].type==="listItemIndent"))break}Ki&&(!ln||Ki<ln)&&(pr._spread=!0),pr.end=Object.assign({},ln?L[ln][1].start:mt[1].end),L.splice(ln||ie,0,["exit",pr,mt[2]]),ie++,X++}if(mt[1].type==="listItemPrefix"){const Vr={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};pr=Vr,L.splice(ie,0,["enter",Vr,mt[2]]),ie++,X++,Ki=void 0,Gi=!0}}}return L[M][1]._spread=Ft,X}function o(L,M){return X;function X(ie){l.call(this,L(ie),ie),M&&M.call(this,ie)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(L,M,X){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([M,X||void 0]),L.position={start:Pn(M.start),end:void 0}}function a(L){return M;function M(X){L&&L.call(this,X),c.call(this,X)}}function c(L,M){const X=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==L.type&&(M?M.call(this,L,ie[0]):(ie[1]||Gp).call(this,L,ie[0]));else throw new Error("Cannot close `"+L.type+"` ("+So({start:L.start,end:L.end})+"): it’s not open");X.position.end=Pn(L.end)}function f(){return zd(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(L){if(this.data.expectingFirstListItemValue){const M=this.stack[this.stack.length-2];M.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function h(){const L=this.resume(),M=this.stack[this.stack.length-1];M.lang=L}function g(){const L=this.resume(),M=this.stack[this.stack.length-1];M.meta=L}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L.replace(/(\r?\n|\r)$/g,"")}function x(L){const M=this.resume(),X=this.stack[this.stack.length-1];X.label=M,X.identifier=qt(this.sliceSerialize(L)).toLowerCase()}function y(){const L=this.resume(),M=this.stack[this.stack.length-1];M.title=L}function w(){const L=this.resume(),M=this.stack[this.stack.length-1];M.url=L}function E(L){const M=this.stack[this.stack.length-1];if(!M.depth){const X=this.sliceSerialize(L).length;M.depth=X}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function T(L){const M=this.stack[this.stack.length-1];M.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function R(L){const X=this.stack[this.stack.length-1].children;let ie=X[X.length-1];(!ie||ie.type!=="text")&&(ie=d1(),ie.position={start:Pn(L.start),end:void 0},X.push(ie)),this.stack.push(ie)}function j(L){const M=this.stack.pop();M.value+=this.sliceSerialize(L),M.position.end=Pn(L.end)}function _(L){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=M.children[M.children.length-1];X.position.end=Pn(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(M.type)&&(R.call(this,L),j.call(this,L))}function A(){this.data.atHardBreak=!0}function W(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L}function Y(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L}function H(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L}function re(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=M,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function Q(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=M,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function z(L){const M=this.sliceSerialize(L),X=this.stack[this.stack.length-2];X.label=cC(M),X.identifier=qt(M).toLowerCase()}function B(){const L=this.stack[this.stack.length-1],M=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const ie=L.children;X.children=ie}else X.alt=M}function b(){const L=this.resume(),M=this.stack[this.stack.length-1];M.url=L}function K(){const L=this.resume(),M=this.stack[this.stack.length-1];M.title=L}function le(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ve(L){const M=this.resume(),X=this.stack[this.stack.length-1];X.label=M,X.identifier=qt(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function He(L){this.data.characterReferenceType=L.type}function V(L){const M=this.sliceSerialize(L),X=this.data.characterReferenceType;let ie;X?(ie=Kx(M,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=Fd(M);const fe=this.stack[this.stack.length-1];fe.value+=ie}function ze(L){const M=this.stack.pop();M.position.end=Pn(L.end)}function zt(L){j.call(this,L);const M=this.stack[this.stack.length-1];M.url=this.sliceSerialize(L)}function qr(L){j.call(this,L);const M=this.stack[this.stack.length-1];M.url="mailto:"+this.sliceSerialize(L)}function Qr(){return{type:"blockquote",children:[]}}function ds(){return{type:"code",lang:null,meta:null,value:""}}function i1(){return{type:"inlineCode",value:""}}function o1(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function s1(){return{type:"emphasis",children:[]}}function nf(){return{type:"heading",depth:0,children:[]}}function rf(){return{type:"break"}}function of(){return{type:"html",value:""}}function l1(){return{type:"image",title:null,url:"",alt:null}}function sf(){return{type:"link",title:null,url:"",children:[]}}function lf(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function a1(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function u1(){return{type:"paragraph",children:[]}}function c1(){return{type:"strong",children:[]}}function d1(){return{type:"text",value:""}}function f1(){return{type:"thematicBreak"}}}function Pn(e){return{line:e.line,column:e.column,offset:e.offset}}function oy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?oy(e,r):hC(e,r)}}function hC(e,t){let n;for(n in t)if(iy.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Gp(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+So({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+So({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+So({start:t.start,end:t.end})+") is still open")}function mC(e){const t=this;t.parser=n;function n(r){return fC(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gC(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function xC(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
184
+ `}]}function yC(e,t){const n=t.value?t.value+`
185
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function vC(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bC(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kC(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qi(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,a);const c={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,c),e.applyData(t,c)}function wC(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SC(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function sy(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function CC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sy(e,t);const i={src:qi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function jC(e,t){const n={src:qi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function NC(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function EC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return sy(e,t);const i={href:qi(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function PC(e,t){const n={href:qi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function TC(e,t,n){const r=e.all(t),i=n?IC(n):ly(t),o={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
186
+ `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&s.push({type:"text",value:`
187
+ `});const c={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,c),e.applyData(t,c)}function IC(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ly(n[r])}return t}function ly(e){const t=e.spread;return t??e.children.length>1}function _C(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function LC(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RC(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function AC(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zC(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=_d(t.children[1]),a=$x(t.children[t.children.length-1]);l&&a&&(s.position={start:l,end:a}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function FC(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let a=-1;const c=[];for(;++a<l;){const d=t.children[a],p={},h=s?s[a]:void 0;h&&(p.align=h);let g={type:"element",tagName:o,properties:p,children:[]};d&&(g.children=e.all(d),e.patch(d,g),g=e.applyData(d,g)),c.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function DC(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Yp=9,Xp=32;function MC(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Jp(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Jp(t.slice(i),i>0,!1)),o.join("")}function Jp(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Yp||o===Xp;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Yp||o===Xp;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function OC(e,t){const n={type:"text",value:MC(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function $C(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const BC={blockquote:gC,break:xC,code:yC,delete:vC,emphasis:bC,footnoteReference:kC,heading:wC,html:SC,imageReference:CC,image:jC,inlineCode:NC,linkReference:EC,link:PC,listItem:TC,list:_C,paragraph:LC,root:RC,strong:AC,table:zC,tableCell:DC,tableRow:FC,text:OC,thematicBreak:$C,toml:Ls,yaml:Ls,definition:Ls,footnoteDefinition:Ls};function Ls(){}const ay=-1,ta=0,jo=1,Nl=2,Md=3,Od=4,$d=5,Bd=6,uy=7,cy=8,UC=typeof self=="object"?self:globalThis,Zp=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new UC[e](t)},HC=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case ta:case ay:return n(s,i);case jo:{const l=n([],i);for(const a of s)l.push(r(a));return l}case Nl:{const l=n({},i);for(const[a,c]of s)l[r(a)]=r(c);return l}case Md:return n(new Date(s),i);case Od:{const{source:l,flags:a}=s;return n(new RegExp(l,a),i)}case $d:{const l=n(new Map,i);for(const[a,c]of s)l.set(r(a),r(c));return l}case Bd:{const l=n(new Set,i);for(const a of s)l.add(r(a));return l}case uy:{const{name:l,message:a}=s;return n(Zp(l,a),i)}case cy:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(Zp(o,s),i)};return r},eh=e=>HC(new Map,e)(0),Kr="",{toString:qC}={},{keys:QC}=Object,oo=e=>{const t=typeof e;if(t!=="object"||!e)return[ta,t];const n=qC.call(e).slice(8,-1);switch(n){case"Array":return[jo,Kr];case"Object":return[Nl,Kr];case"Date":return[Md,Kr];case"RegExp":return[Od,Kr];case"Map":return[$d,Kr];case"Set":return[Bd,Kr];case"DataView":return[jo,n]}return n.includes("Array")?[jo,n]:n.includes("Error")?[uy,n]:[Nl,n]},Rs=([e,t])=>e===ta&&(t==="function"||t==="symbol"),VC=(e,t,n,r)=>{const i=(s,l)=>{const a=r.push(s)-1;return n.set(l,a),a},o=s=>{if(n.has(s))return n.get(s);let[l,a]=oo(s);switch(l){case ta:{let f=s;switch(a){case"bigint":l=cy,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);f=null;break;case"undefined":return i([ay],s)}return i([l,f],s)}case jo:{if(a){let p=s;return a==="DataView"?p=new Uint8Array(s.buffer):a==="ArrayBuffer"&&(p=new Uint8Array(s)),i([a,[...p]],s)}const f=[],d=i([l,f],s);for(const p of s)f.push(o(p));return d}case Nl:{if(a)switch(a){case"BigInt":return i([a,s.toString()],s);case"Boolean":case"Number":case"String":return i([a,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const f=[],d=i([l,f],s);for(const p of QC(s))(e||!Rs(oo(s[p])))&&f.push([o(p),o(s[p])]);return d}case Md:return i([l,s.toISOString()],s);case Od:{const{source:f,flags:d}=s;return i([l,{source:f,flags:d}],s)}case $d:{const f=[],d=i([l,f],s);for(const[p,h]of s)(e||!(Rs(oo(p))||Rs(oo(h))))&&f.push([o(p),o(h)]);return d}case Bd:{const f=[],d=i([l,f],s);for(const p of s)(e||!Rs(oo(p)))&&f.push(o(p));return d}}const{message:c}=s;return i([l,{name:a,message:c}],s)};return o},th=(e,{json:t,lossy:n}={})=>{const r=[];return VC(!(t||n),!!t,new Map,r)(e),r},El=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?eh(th(e,t)):structuredClone(e):(e,t)=>eh(th(e,t));function WC(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function KC(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function GC(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||WC,r=e.options.footnoteBackLabel||KC,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let a=-1;for(;++a<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[a]);if(!c)continue;const f=e.all(c),d=String(c.identifier).toUpperCase(),p=qi(d.toLowerCase());let h=0;const g=[],v=e.footnoteCounts.get(d);for(;v!==void 0&&++h<=v;){g.length>0&&g.push({type:"text",value:" "});let x=typeof n=="string"?n:n(a,h);typeof x=="string"&&(x={type:"text",value:x}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(a,h),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const k=f[f.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const x=k.children[k.children.length-1];x&&x.type==="text"?x.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...g)}else f.push(...g);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(c,m),l.push(m)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...El(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
188
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
189
+ `}]}}const na=function(e){if(e==null)return ZC;if(typeof e=="function")return ra(e);if(typeof e=="object")return Array.isArray(e)?YC(e):XC(e);if(typeof e=="string")return JC(e);throw new Error("Expected function, string, or object as test")};function YC(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=na(e[n]);return ra(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function XC(e){const t=e;return ra(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function JC(e){return ra(t);function t(n){return n&&n.type===e}}function ra(e){return t;function t(n,r,i){return!!(ej(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function ZC(){return!0}function ej(e){return e!==null&&typeof e=="object"&&"type"in e}const dy=[],tj=!0,gc=!1,nj="skip";function fy(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=na(i),s=r?-1:1;l(e,void 0,[])();function l(a,c,f){const d=a&&typeof a=="object"?a:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(a.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=dy,g,v,k;if((!t||o(a,c,f[f.length-1]||void 0))&&(h=rj(n(a,f)),h[0]===gc))return h;if("children"in a&&a.children){const m=a;if(m.children&&h[0]!==nj)for(v=(r?m.children.length:-1)+s,k=f.concat(m);v>-1&&v<m.children.length;){const x=m.children[v];if(g=l(x,v,k)(),g[0]===gc)return g;v=typeof g[1]=="number"?g[1]:v+s}}return h}}}function rj(e){return Array.isArray(e)?e:typeof e=="number"?[tj,e]:e==null?dy:[e]}function Ud(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),fy(e,o,l,i);function l(a,c){const f=c[c.length-1],d=f?f.children.indexOf(a):void 0;return s(a,d,f)}}const xc={}.hasOwnProperty,ij={};function oj(e,t){const n=t||ij,r=new Map,i=new Map,o=new Map,s={...BC,...n.handlers},l={all:c,applyData:lj,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:a,options:n,patch:sj,wrap:uj};return Ud(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();d.has(p)||d.set(p,f)}}),l;function a(f,d){const p=f.type,h=l.handlers[p];if(xc.call(l.handlers,p)&&h)return h(l,f,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in f){const{children:v,...k}=f,m=El(k);return m.children=l.all(f),m}return El(f)}return(l.options.unknownHandler||aj)(l,f,d)}function c(f){const d=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const g=l.one(p[h],f);if(g){if(h&&p[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=nh(g.value)),!Array.isArray(g)&&g.type==="element")){const v=g.children[0];v&&v.type==="text"&&(v.value=nh(v.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function sj(e,t){e.position&&(t.position=Wk(e))}function lj(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,El(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function aj(e,t){const n=t.data||{},r="value"in t&&!(xc.call(n,"hProperties")||xc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function uj(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
190
+ `});++r<e.length;)r&&n.push({type:"text",value:`
191
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
192
+ `}),n}function nh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function rh(e,t){const n=oj(e,t),r=n.one(e,void 0),i=GC(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
193
+ `},i),o}function cj(e,t){return e&&"run"in e?async function(n,r){const i=rh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return rh(n,{file:r,...e||t})}}function ih(e){if(e)throw e}var Ys=Object.prototype.hasOwnProperty,py=Object.prototype.toString,oh=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,lh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):py.call(t)==="[object Array]"},ah=function(t){if(!t||py.call(t)!=="[object Object]")return!1;var n=Ys.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ys.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ys.call(t,i)},uh=function(t,n){oh&&n.name==="__proto__"?oh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},ch=function(t,n){if(n==="__proto__")if(Ys.call(t,n)){if(sh)return sh(t,n).value}else return;return t[n]},dj=function e(){var t,n,r,i,o,s,l=arguments[0],a=1,c=arguments.length,f=!1;for(typeof l=="boolean"&&(f=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<c;++a)if(t=arguments[a],t!=null)for(n in t)r=ch(l,n),i=ch(t,n),l!==i&&(f&&i&&(ah(i)||(o=lh(i)))?(o?(o=!1,s=r&&lh(r)?r:[]):s=r&&ah(r)?r:{},uh(l,{name:n,newValue:e(f,s,i)})):typeof i<"u"&&uh(l,{name:n,newValue:i}));return l};const Fa=Nc(dj);function yc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function fj(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(a,...c){const f=e[++o];let d=-1;if(a){s(a);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,f?pj(f,l)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function pj(e,t){let n;return r;function r(...s){const l=e.length>s.length;let a;l&&s.push(i);try{a=e.apply(this,s)}catch(c){const f=c;if(l&&n)throw f;return i(f)}l||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const Yt={basename:hj,dirname:mj,extname:gj,join:xj,sep:"/"};function hj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');us(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function mj(e){if(us(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gj(e){us(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function xj(...e){let t=-1,n;for(;++t<e.length;)us(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":yj(n)}function yj(e){us(e);const t=e.codePointAt(0)===47;let n=vj(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vj(e,t){let n="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function us(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const bj={cwd:kj};function kj(){return"/"}function vc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wj(e){if(typeof e=="string")e=new URL(e);else if(!vc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Sj(e)}function Sj(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Da=["history","path","basename","stem","extname","dirname"];class hy{constructor(t){let n;t?vc(t)?n={path:t}:typeof t=="string"||Cj(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":bj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Da.length;){const o=Da[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Da.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Yt.basename(this.path):void 0}set basename(t){Oa(t,"basename"),Ma(t,"basename"),this.path=Yt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Yt.dirname(this.path):void 0}set dirname(t){dh(this.basename,"dirname"),this.path=Yt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Yt.extname(this.path):void 0}set extname(t){if(Ma(t,"extname"),dh(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vc(t)&&(t=wj(t)),Oa(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Yt.basename(this.path,this.extname):void 0}set stem(t){Oa(t,"stem"),Ma(t,"stem"),this.path=Yt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ye(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ma(e,t){if(e&&e.includes(Yt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yt.sep+"`")}function Oa(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function dh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Cj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jj=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},Nj={}.hasOwnProperty;class Hd extends jj{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=fj()}copy(){const t=new Hd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Fa(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ua("data",this.frozen),this.namespace[t]=n,this):Nj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ua("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=As(t),r=this.parser||this.Parser;return $a("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),$a("process",this.parser||this.Parser),Ba("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=As(t),a=r.parse(l);r.run(a,l,function(f,d,p){if(f||!d||!p)return c(f);const h=d,g=r.stringify(h,p);Tj(g)?p.value=g:p.result=g,c(f,p)});function c(f,d){f||!d?s(f):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),$a("processSync",this.parser||this.Parser),Ba("processSync",this.compiler||this.Compiler),this.process(t,i),ph("processSync","process",n),r;function i(o,s){n=!0,ih(o),r=s}}run(t,n,r){fh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const a=As(n);i.run(t,a,c);function c(f,d,p){const h=d||t;f?l(f):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),ph("runSync","run",r),i;function o(s,l){ih(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=As(n),i=this.compiler||this.Compiler;return Ba("stringify",i),fh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ua("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")a(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...d]=c;a(f,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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");l(c.plugins),c.settings&&(i.settings=Fa(!0,i.settings,c.settings))}function l(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const d=c[f];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function a(c,f){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...f]);else if(f.length>0){let[h,...g]=f;const v=r[p][1];yc(v)&&yc(h)&&(h=Fa(!0,v,h)),r[p]=[c,h,...g]}}}}const Ej=new Hd().freeze();function $a(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ba(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ua(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fh(e){if(!yc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ph(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function As(e){return Pj(e)?e:new hy(e)}function Pj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Tj(e){return typeof e=="string"||Ij(e)}function Ij(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _j="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hh=[],mh={allowDangerousHtml:!0},Lj=/^(https?|ircs?|mailto|xmpp)$/i,Rj=[{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 Aj(e){const t=zj(e),n=Fj(e);return Dj(t.runSync(t.parse(n),n),e)}function zj(e){const t=e.rehypePlugins||hh,n=e.remarkPlugins||hh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mh}:mh;return Ej().use(mC).use(n).use(cj,r).use(t)}function Fj(e){const t=e.children||"",n=new hy;return typeof t=="string"&&(n.value=t),n}function Dj(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,a=t.urlTransform||Mj;for(const f of Rj)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+_j+f.id,void 0);return Ud(e,c),Jk(e,{Fragment:u.Fragment,components:i,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function c(f,d,p){if(f.type==="raw"&&p&&typeof d=="number")return s?p.children.splice(d,1):p.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let h;for(h in Ra)if(Object.hasOwn(Ra,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],v=Ra[h];(v===null||v.includes(f.tagName))&&(f.properties[h]=a(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(f,d,p)),h&&p&&typeof d=="number")return l&&f.children?p.children.splice(d,1,...f.children):p.children.splice(d,1),d}}}function Mj(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Lj.test(e.slice(0,t))?e:""}function gh(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Oj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function $j(e,t,n){const i=na((n||{}).ignore||[]),o=Bj(t);let s=-1;for(;++s<o.length;)fy(e,"text",l);function l(c,f){let d=-1,p;for(;++d<f.length;){const h=f[d],g=p?p.children:void 0;if(i(h,g?g.indexOf(h):void 0,p))return;p=h}if(p)return a(c,f)}function a(c,f){const d=f[f.length-1],p=o[s][0],h=o[s][1];let g=0;const k=d.children.indexOf(c);let m=!1,x=[];p.lastIndex=0;let y=p.exec(c.value);for(;y;){const w=y.index,E={index:y.index,input:y.input,stack:[...f,c]};let S=h(...y,E);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=w+1:(g!==w&&x.push({type:"text",value:c.value.slice(g,w)}),Array.isArray(S)?x.push(...S):S&&x.push(S),g=w+y[0].length,m=!0),!p.global)break;y=p.exec(c.value)}return m?(g<c.value.length&&x.push({type:"text",value:c.value.slice(g)}),d.children.splice(k,1,...x)):x=[c],k+x.length}}function Bj(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Uj(i[0]),Hj(i[1])])}return t}function Uj(e){return typeof e=="string"?new RegExp(Oj(e),"g"):e}function Hj(e){return typeof e=="function"?e:function(){return e}}const Ha="phrasing",qa=["autolink","link","image","label"];function qj(){return{transforms:[Xj],enter:{literalAutolink:Vj,literalAutolinkEmail:Qa,literalAutolinkHttp:Qa,literalAutolinkWww:Qa},exit:{literalAutolink:Yj,literalAutolinkEmail:Gj,literalAutolinkHttp:Wj,literalAutolinkWww:Kj}}}function Qj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ha,notInConstruct:qa},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ha,notInConstruct:qa},{character:":",before:"[ps]",after:"\\/",inConstruct:Ha,notInConstruct:qa}]}}function Vj(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Qa(e){this.config.enter.autolinkProtocol.call(this,e)}function Wj(e){this.config.exit.autolinkProtocol.call(this,e)}function Kj(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Gj(e){this.config.exit.autolinkEmail.call(this,e)}function Yj(e){this.exit(e)}function Xj(e){$j(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Jj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Zj]],{ignore:["link","linkReference"]})}function Jj(e,t,n,r,i){let o="";if(!my(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!e2(n)))return!1;const s=t2(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function Zj(e,t,n,r){return!my(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function e2(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function t2(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=gh(e,"(");let o=gh(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function my(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Or(n)||Zl(n))&&(!t||n!==47)}gy.peek=c2;function n2(){this.buffer()}function r2(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function i2(){this.buffer()}function o2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function s2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=qt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function l2(e){this.exit(e)}function a2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=qt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function u2(e){this.exit(e)}function c2(){return"["}function gy(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function d2(){return{enter:{gfmFootnoteCallString:n2,gfmFootnoteCall:r2,gfmFootnoteDefinitionLabelString:i2,gfmFootnoteDefinition:o2},exit:{gfmFootnoteCallString:s2,gfmFootnoteCall:l2,gfmFootnoteDefinitionLabelString:a2,gfmFootnoteDefinition:u2}}}function f2(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:gy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let a=l.move("[^");const c=o.enter("footnoteDefinition"),f=o.enter("label");return a+=l.move(o.safe(o.associationId(r),{before:a,after:"]"})),f(),a+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),a+=l.move((t?`
194
+ `:" ")+o.indentLines(o.containerFlow(r,l.current()),t?xy:p2))),c(),a}}function p2(e,t,n){return t===0?e:xy(e,t,n)}function xy(e,t,n){return(n?"":" ")+e}const h2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yy.peek=v2;function m2(){return{canContainEols:["delete"],enter:{strikethrough:x2},exit:{strikethrough:y2}}}function g2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:h2}],handlers:{delete:yy}}}function x2(e){this.enter({type:"delete",children:[]},e)}function y2(e){this.exit(e)}function yy(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function v2(){return"~"}function b2(e){return e.length}function k2(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||b2,o=[],s=[],l=[],a=[];let c=0,f=-1;for(;++f<e.length;){const v=[],k=[];let m=-1;for(e[f].length>c&&(c=e[f].length);++m<e[f].length;){const x=w2(e[f][m]);if(n.alignDelimiters!==!1){const y=i(x);k[m]=y,(a[m]===void 0||y>a[m])&&(a[m]=y)}v.push(x)}s[f]=v,l[f]=k}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)o[d]=xh(r[d]);else{const v=xh(r);for(;++d<c;)o[d]=v}d=-1;const p=[],h=[];for(;++d<c;){const v=o[d];let k="",m="";v===99?(k=":",m=":"):v===108?k=":":v===114&&(m=":");let x=n.alignDelimiters===!1?1:Math.max(1,a[d]-k.length-m.length);const y=k+"-".repeat(x)+m;n.alignDelimiters!==!1&&(x=k.length+x+m.length,x>a[d]&&(a[d]=x),h[d]=x),p[d]=y}s.splice(1,0,p),l.splice(1,0,h),f=-1;const g=[];for(;++f<s.length;){const v=s[f],k=l[f];d=-1;const m=[];for(;++d<c;){const x=v[d]||"";let y="",w="";if(n.alignDelimiters!==!1){const E=a[d]-(k[d]||0),S=o[d];S===114?y=" ".repeat(E):S===99?E%2?(y=" ".repeat(E/2+.5),w=" ".repeat(E/2-.5)):(y=" ".repeat(E/2),w=y):w=" ".repeat(E)}n.delimiterStart!==!1&&!d&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||d)&&m.push(" "),n.alignDelimiters!==!1&&m.push(y),m.push(x),n.alignDelimiters!==!1&&m.push(w),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&m.push("|")}g.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return g.join(`
195
+ `)}function w2(e){return e==null?"":String(e)}function xh(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function S2(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),C2);return i(),s}function C2(e,t,n){return">"+(n?"":" ")+e}function j2(e,t){return yh(e,t.inConstruct,!0)&&!yh(e,t.notInConstruct,!1)}function yh(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function vh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
196
+ `&&j2(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
197
+ `}function N2(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function E2(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function P2(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function T2(e,t,n,r){const i=P2(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(E2(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(o,I2);return d(),p}const l=n.createTracker(r),a=i.repeat(Math.max(N2(o,i)+1,3)),c=n.enter("codeFenced");let f=l.move(a);if(e.lang){const d=n.enter(`codeFencedLang${s}`);f+=l.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);f+=l.move(" "),f+=l.move(n.safe(e.meta,{before:f,after:`
198
+ `,encode:["`"],...l.current()})),d()}return f+=l.move(`
199
+ `),o&&(f+=l.move(o+`
200
+ `)),f+=l.move(a),c(),f}function I2(e,t,n){return(n?"":" ")+e}function qd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _2(e,t,n,r){const i=qd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let c=a.move("[");return c+=a.move(n.safe(n.associationId(e),{before:c,after:"]",...a.current()})),c+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":`
201
+ `,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),s(),c}function L2(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Wo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Pl(e,t,n){const r=Di(e),i=Di(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}vy.peek=R2;function vy(e,t,n,r){const i=L2(n),o=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const c=a.charCodeAt(0),f=Pl(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(a=Wo(c)+a.slice(1));const d=a.charCodeAt(a.length-1),p=Pl(r.after.charCodeAt(0),d,i);p.inside&&(a=a.slice(0,-1)+Wo(d));const h=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+a+h}function R2(e,t,n){return n.options.emphasis||"*"}function A2(e,t){let n=!1;return Ud(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,gc}),!!((!e.depth||e.depth<3)&&zd(e)&&(t.options.setext||n))}function z2(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(A2(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
202
+ `,after:`
203
+ `});return d(),f(),p+`
204
+ `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
205
+ `))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
206
+ `,...o.current()});return/^[\t ]/.test(c)&&(c=Wo(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),a(),l(),c}by.peek=F2;function by(e){return e.value||""}function F2(){return"<"}ky.peek=D2;function ky(e,t,n,r){const i=qd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let c=a.move("![");return c+=a.move(n.safe(e.alt,{before:c,after:"]",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),s(),c}function D2(){return"!"}wy.peek=M2;function wy(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const c=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=f,o(),i==="full"||!c||c!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function M2(){return"!"}Sy.peek=O2;function Sy(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let a;if(s.atBreak)for(;a=l.exec(r);){let c=a.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(a.index+1)}}return i+r+i}function O2(){return"`"}function Cy(e,t){const n=zd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}jy.peek=$2;function jy(e,t,n,r){const i=qd(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,a;if(Cy(e,n)){const f=n.stack;n.stack=[],l=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),l(),n.stack=f,d}l=n.enter("link"),a=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(a=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),a()),c+=s.move(")"),l(),c}function $2(e,t,n){return Cy(e,n)?"<":"["}Ny.peek=B2;function Ny(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const c=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=f,o(),i==="full"||!c||c!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function B2(){return"["}function Qd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function U2(e){const t=Qd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function H2(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ey(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function q2(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?H2(n):Qd(n);const l=e.ordered?s==="."?")":".":U2(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),Ey(n)===s&&f){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),c}function Q2(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function V2(e,t,n,r){const i=Q2(n);let o=n.bulletCurrent||Qd(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),f);return a(),c;function f(d,p,h){return p?(h?"":" ".repeat(s))+d:(h?o:o+" ".repeat(s-o.length))+d}}function W2(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const K2=na(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function G2(e,t,n,r){return(e.children.some(function(s){return K2(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Y2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Py.peek=X2;function Py(e,t,n,r){const i=Y2(n),o=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const c=a.charCodeAt(0),f=Pl(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(a=Wo(c)+a.slice(1));const d=a.charCodeAt(a.length-1),p=Pl(r.after.charCodeAt(0),d,i);p.inside&&(a=a.slice(0,-1)+Wo(d));const h=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},l+a+h}function X2(e,t,n){return n.options.strong||"*"}function J2(e,t,n,r){return n.safe(e.value,r)}function Z2(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function eN(e,t,n){const r=(Ey(n)+(n.options.ruleSpaces?" ":"")).repeat(Z2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ty={blockquote:S2,break:vh,code:T2,definition:_2,emphasis:vy,hardBreak:vh,heading:z2,html:by,image:ky,imageReference:wy,inlineCode:Sy,link:jy,linkReference:Ny,list:q2,listItem:V2,paragraph:W2,root:G2,strong:Py,text:J2,thematicBreak:eN};function tN(){return{enter:{table:nN,tableData:bh,tableHeader:bh,tableRow:iN},exit:{codeText:oN,table:rN,tableData:Va,tableHeader:Va,tableRow:Va}}}function nN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function rN(e){this.exit(e),this.data.inTable=void 0}function iN(e){this.enter({type:"tableRow",children:[]},e)}function Va(e){this.exit(e)}function bh(e){this.enter({type:"tableCell",children:[]},e)}function oN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,sN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function sN(e,t){return t==="|"?t:e}function lN(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
207
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:a,tableRow:l}};function s(h,g,v,k){return c(f(h,v,k),h.align)}function l(h,g,v,k){const m=d(h,v,k),x=c([m]);return x.slice(0,x.indexOf(`
208
+ `))}function a(h,g,v,k){const m=v.enter("tableCell"),x=v.enter("phrasing"),y=v.containerPhrasing(h,{...k,before:o,after:o});return x(),m(),y}function c(h,g){return k2(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,v){const k=h.children;let m=-1;const x=[],y=g.enter("table");for(;++m<k.length;)x[m]=d(k[m],g,v);return y(),x}function d(h,g,v){const k=h.children;let m=-1;const x=[],y=g.enter("tableRow");for(;++m<k.length;)x[m]=a(k[m],h,g,v);return y(),x}function p(h,g,v){let k=Ty.inlineCode(h,g,v);return v.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function aN(){return{exit:{taskListCheckValueChecked:kh,taskListCheckValueUnchecked:kh,paragraph:cN}}}function uN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:dN}}}function kh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function cN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function dN(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let a=Ty.listItem(e,t,n,{...r,...l.current()});return o&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),a;function c(f){return f+s}}function fN(){return[qj(),d2(),m2(),tN(),aN()]}function pN(e){return{extensions:[Qj(),f2(e),g2(),lN(e),uN()]}}const hN={tokenize:bN,partial:!0},Iy={tokenize:kN,partial:!0},_y={tokenize:wN,partial:!0},Ly={tokenize:SN,partial:!0},mN={tokenize:CN,partial:!0},Ry={name:"wwwAutolink",tokenize:yN,previous:zy},Ay={name:"protocolAutolink",tokenize:vN,previous:Fy},Nn={name:"emailAutolink",tokenize:xN,previous:Dy},sn={};function gN(){return{text:sn}}let hr=48;for(;hr<123;)sn[hr]=Nn,hr++,hr===58?hr=65:hr===91&&(hr=97);sn[43]=Nn;sn[45]=Nn;sn[46]=Nn;sn[95]=Nn;sn[72]=[Nn,Ay];sn[104]=[Nn,Ay];sn[87]=[Nn,Ry];sn[119]=[Nn,Ry];function xN(e,t,n){const r=this;let i,o;return s;function s(d){return!bc(d)||!Dy.call(r,r.previous)||Vd(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return bc(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(mN,f,c)(d):d===45||d===95||Ke(d)?(o=!0,e.consume(d),a):f(d)}function c(d){return e.consume(d),i=!0,a}function f(d){return o&&i&&tt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function yN(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!zy.call(r,r.previous)||Vd(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(hN,e.attempt(Iy,e.attempt(_y,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function vN(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&Fy.call(r,r.previous)&&!Vd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(tt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),a}return n(d)}function a(d){return d===47?(e.consume(d),o?c:(o=!0,a)):n(d)}function c(d){return d===null||jl(d)||pe(d)||Or(d)||Zl(d)?n(d):e.attempt(Iy,e.attempt(_y,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function bN(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function kN(e,t,n){let r,i,o;return s;function s(c){return c===46||c===95?e.check(Ly,a,l)(c):c===null||pe(c)||Or(c)||c!==45&&Zl(c)?a(c):(o=!0,e.consume(c),s)}function l(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function a(c){return i||r||!o?n(c):t(c)}}function wN(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Ly,t,o)(s):s===null||pe(s)||Or(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function SN(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||pe(l)||Or(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||pe(l)||Or(l)?t(l):r(l)}function o(l){return tt(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):tt(l)?(e.consume(l),s):n(l)}}function CN(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Ke(o)?n(o):t(o)}}function zy(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pe(e)}function Fy(e){return!tt(e)}function Dy(e){return!(e===47||bc(e))}function bc(e){return e===43||e===45||e===46||e===95||Ke(e)}function Vd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const jN={tokenize:RN,partial:!0};function NN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:IN,continuation:{tokenize:_N},exit:LN}},text:{91:{name:"gfmFootnoteCall",tokenize:TN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:EN,resolveTo:PN}}}}function EN(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!s||!s._balanced)return n(a);const c=qt(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function PN(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function TN(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),a}function a(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(o>999||d===93&&!s||d===null||d===91||pe(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(qt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return pe(d)||(s=!0),o++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),o++,c):c(d)}}function IN(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(s>999||g===93&&!l||g===null||g===91||pe(g))return n(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=qt(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return pe(g)||(l=!0),s++,e.consume(g),g===92?d:f}function d(g){return g===91||g===92||g===93?(e.consume(g),s++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),se(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function _N(e,t,n){return e.check(as,t,e.attempt(jN,t,n))}function LN(e){e.exit("gfmFootnoteDefinition")}function RN(e,t,n){const r=this;return se(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function AN(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let c=a;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[a][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[a][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[a][1].start)},p=[["enter",f,l],["enter",s[c][1],l],["exit",s[c][1],l],["enter",d,l]],h=l.parser.constructs.insideSpan.null;h&&St(p,p.length,0,ea(h,s.slice(c+1,a),l)),St(p,p.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",f,l]]),St(s,c-1,a-c+3,p),a=c+p.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const c=this.previous,f=this.events;let d=0;return p;function p(g){return c===126&&f[f.length-1][1].type!=="characterEscape"?a(g):(s.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const v=Di(c);if(g===126)return d>1?a(g):(s.consume(g),d++,h);if(d<2&&!n)return a(g);const k=s.exit("strikethroughSequenceTemporary"),m=Di(g);return k._open=!m||m===2&&!!v,k._close=!v||v===2&&!!m,l(g)}}}class zN{constructor(){this.map=[]}add(t,n,r){FN(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function FN(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function DN(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function MN(){return{flow:{null:{name:"table",tokenize:ON,resolveAll:$N}}}}function ON(e,t,n){const r=this;let i=0,o=0,s;return l;function l(j){let _=r.events.length-1;for(;_>-1;){const Y=r.events[_][1].type;if(Y==="lineEnding"||Y==="linePrefix")_--;else break}const A=_>-1?r.events[_][1].type:null,W=A==="tableHead"||A==="tableRow"?S:a;return W===S&&r.parser.lazy[r.now().line]?n(j):W(j)}function a(j){return e.enter("tableHead"),e.enter("tableRow"),c(j)}function c(j){return j===124||(s=!0,o+=1),f(j)}function f(j){return j===null?n(j):G(j)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),h):n(j):te(j)?se(e,f,"whitespace")(j):(o+=1,s&&(s=!1,i+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(j)))}function d(j){return j===null||j===124||pe(j)?(e.exit("data"),f(j)):(e.consume(j),j===92?p:d)}function p(j){return j===92||j===124?(e.consume(j),d):d(j)}function h(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),s=!1,te(j)?se(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):g(j))}function g(j){return j===45||j===58?k(j):j===124?(s=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),v):E(j)}function v(j){return te(j)?se(e,k,"whitespace")(j):k(j)}function k(j){return j===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),m):j===45?(o+=1,m(j)):j===null||G(j)?w(j):E(j)}function m(j){return j===45?(e.enter("tableDelimiterFiller"),x(j)):E(j)}function x(j){return j===45?(e.consume(j),x):j===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(j))}function y(j){return te(j)?se(e,w,"whitespace")(j):w(j)}function w(j){return j===124?g(j):j===null||G(j)?!s||i!==o?E(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):E(j)}function E(j){return n(j)}function S(j){return e.enter("tableRow"),T(j)}function T(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),T):j===null||G(j)?(e.exit("tableRow"),t(j)):te(j)?se(e,T,"whitespace")(j):(e.enter("data"),I(j))}function I(j){return j===null||j===124||pe(j)?(e.exit("data"),T(j)):(e.consume(j),j===92?R:I)}function R(j){return j===92||j===124?(e.consume(j),I):I(j)}}function $N(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,c,f,d;const p=new zN;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(l=!1,a!==0&&(wh(p,t,a,c,f),f=void 0,a=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=zs(p,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=zs(p,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):g.type==="tableHead"?(l=!0,a=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(a=n,o[1]!==0?(s[0]=s[1],d=zs(p,t,o,i,n,d)):s[1]!==0&&(d=zs(p,t,s,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&wh(p,t,a,c,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=DN(t.events,n))}return e}function zs(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},Yr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=Yr(t.events,n[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const c=Yr(t.events,n[2]),f=Yr(t.events,n[3]),d={type:l,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,v=n[3]-n[2]-1;e.add(g,v,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},Yr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function wh(e,t,n,r,i){const o=[],s=Yr(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Yr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const BN={name:"tasklistCheck",tokenize:HN};function UN(){return{text:{91:BN}}}function HN(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return pe(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return G(a)?t(a):te(a)?e.check({tokenize:qN},t,n)(a):n(a)}}function qN(e,t,n){return se(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function QN(e){return Wx([gN(),NN(),AN(e),MN(),UN()])}const VN={};function WN(e){const t=this,n=e||VN,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(QN(n)),o.push(fN()),s.push(pN(n))}const Sh=e=>{let t;const n=new Set,r=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(h=>h(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>a,subscribe:c=>(n.add(c),()=>n.delete(c))},a=t=e(r,i,l);return l},KN=e=>e?Sh(e):Sh,GN=e=>e;function YN(e,t=GN){const n=hs.useSyncExternalStore(e.subscribe,hs.useCallback(()=>t(e.getState()),[e,t]),hs.useCallback(()=>t(e.getInitialState()),[e,t]));return hs.useDebugValue(n),n}const Ch=e=>{const t=KN(e),n=r=>YN(t,r);return Object.assign(n,t),n},My=e=>e?Ch(e):Ch,$r=My(e=>({toasts:[],errSeen:0,warnSeen:0,pushToast:t=>e(n=>({toasts:[...n.toasts,t],errSeen:n.errSeen+(t.notifyType==="error"?1:0),warnSeen:n.warnSeen+(t.notifyType==="warning"?1:0)})),dismissToast:t=>e(n=>({toasts:n.toasts.filter(r=>r.id!==t)})),resetCounters:()=>e({errSeen:0,warnSeen:0})}));function Oy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Oy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function XN(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Oy(e))&&(r&&(r+=" "),r+=t);return r}const Wd="-",JN=e=>{const t=eE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const l=s.split(Wd);return l[0]===""&&l.length!==1&&l.shift(),$y(l,t)||ZN(s)},getConflictingClassGroupIds:(s,l)=>{const a=n[s]||[];return l&&r[s]?[...a,...r[s]]:a}}},$y=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?$y(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Wd);return(s=t.validators.find(({validator:l})=>l(o)))==null?void 0:s.classGroupId},jh=/^\[(.+)\]$/,ZN=e=>{if(jh.test(e)){const t=jh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},eE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return nE(Object.entries(e.classGroups),n).forEach(([o,s])=>{kc(s,r,o,t)}),r},kc=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Nh(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(tE(i)){kc(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{kc(s,Nh(t,o),n,r)})})},Nh=(e,t)=>{let n=e;return t.split(Wd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},tE=e=>e.isThemeGetter,nE=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,l])=>[t+s,l])):o);return[n,i]}):e,rE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,s)=>{n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}},By="!",iE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,s=l=>{const a=[];let c=0,f=0,d;for(let k=0;k<l.length;k++){let m=l[k];if(c===0){if(m===i&&(r||l.slice(k,k+o)===t)){a.push(l.slice(f,k)),f=k+o;continue}if(m==="/"){d=k;continue}}m==="["?c++:m==="]"&&c--}const p=a.length===0?l:l.substring(f),h=p.startsWith(By),g=h?p.substring(1):p,v=d&&d>f?d-f:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:s}):s},oE=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},sE=e=>({cache:rE(e.cacheSize),parseClassName:iE(e),...JN(e)}),lE=/\s+/,aE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(lE);let l="";for(let a=s.length-1;a>=0;a-=1){const c=s[a],{modifiers:f,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}=n(c);let g=!!h,v=r(g?p.substring(0,h):p);if(!v){if(!g){l=c+(l.length>0?" "+l:l);continue}if(v=r(p),!v){l=c+(l.length>0?" "+l:l);continue}g=!1}const k=oE(f).join(":"),m=d?k+By:k,x=m+v;if(o.includes(x))continue;o.push(x);const y=i(v,g);for(let w=0;w<y.length;++w){const E=y[w];o.push(m+E)}l=c+(l.length>0?" "+l:l)}return l};function uE(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Uy(t))&&(r&&(r+=" "),r+=n);return r}const Uy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Uy(e[r]))&&(n&&(n+=" "),n+=t);return n};function cE(e,...t){let n,r,i,o=s;function s(a){const c=t.reduce((f,d)=>d(f),e());return n=sE(c),r=n.cache.get,i=n.cache.set,o=l,l(a)}function l(a){const c=r(a);if(c)return c;const f=aE(a,n);return i(a,f),f}return function(){return o(uE.apply(null,arguments))}}const ge=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Hy=/^\[(?:([a-z-]+):)?(.+)\]$/i,dE=/^\d+\/\d+$/,fE=new Set(["px","full","screen"]),pE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hE=/\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$/,mE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,un=e=>gi(e)||fE.has(e)||dE.test(e),Tn=e=>Qi(e,"length",jE),gi=e=>!!e&&!Number.isNaN(Number(e)),Wa=e=>Qi(e,"number",gi),so=e=>!!e&&Number.isInteger(Number(e)),yE=e=>e.endsWith("%")&&gi(e.slice(0,-1)),Z=e=>Hy.test(e),In=e=>pE.test(e),vE=new Set(["length","size","percentage"]),bE=e=>Qi(e,vE,qy),kE=e=>Qi(e,"position",qy),wE=new Set(["image","url"]),SE=e=>Qi(e,wE,EE),CE=e=>Qi(e,"",NE),lo=()=>!0,Qi=(e,t,n)=>{const r=Hy.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},jE=e=>hE.test(e)&&!mE.test(e),qy=()=>!1,NE=e=>gE.test(e),EE=e=>xE.test(e),PE=()=>{const e=ge("colors"),t=ge("spacing"),n=ge("blur"),r=ge("brightness"),i=ge("borderColor"),o=ge("borderRadius"),s=ge("borderSpacing"),l=ge("borderWidth"),a=ge("contrast"),c=ge("grayscale"),f=ge("hueRotate"),d=ge("invert"),p=ge("gap"),h=ge("gradientColorStops"),g=ge("gradientColorStopPositions"),v=ge("inset"),k=ge("margin"),m=ge("opacity"),x=ge("padding"),y=ge("saturate"),w=ge("scale"),E=ge("sepia"),S=ge("skew"),T=ge("space"),I=ge("translate"),R=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",Z,t],A=()=>[Z,t],W=()=>["",un,Tn],Y=()=>["auto",gi,Z],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],re=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",Z],b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[gi,Z];return{cacheSize:500,separator:":",theme:{colors:[lo],spacing:[un,Tn],blur:["none","",In,Z],brightness:K(),borderColor:[e],borderRadius:["none","","full",In,Z],borderSpacing:A(),borderWidth:W(),contrast:K(),grayscale:B(),hueRotate:K(),invert:B(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[yE,Tn],inset:_(),margin:_(),opacity:K(),padding:A(),saturate:K(),scale:K(),sepia:B(),skew:K(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",Z]}],container:["container"],columns:[{columns:[In]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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"],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:[...H(),Z]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",so,Z]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Z]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",so,Z]}],"grid-cols":[{"grid-cols":[lo]}],"col-start-end":[{col:["auto",{span:["full",so,Z]},Z]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[lo]}],"row-start-end":[{row:["auto",{span:[so,Z]},Z]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Z]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Z,t]}],"min-w":[{"min-w":[Z,t,"min","max","fit"]}],"max-w":[{"max-w":[Z,t,"none","full","min","max","fit","prose",{screen:[In]},In]}],h:[{h:[Z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",In,Tn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wa]}],"font-family":[{font:[lo]}],"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:["tighter","tight","normal","wide","wider","widest",Z]}],"line-clamp":[{"line-clamp":["none",gi,Wa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",un,Z]}],"list-image":[{"list-image":["none",Z]}],"list-style-type":[{list:["none","disc","decimal",Z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",un,Tn]}],"underline-offset":[{"underline-offset":["auto",un,Z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),kE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",bE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},SE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...re(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:re()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...re()]}],"outline-offset":[{"outline-offset":[un,Z]}],"outline-w":[{outline:[un,Tn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[un,Tn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",In,CE]}],"shadow-color":[{shadow:[lo]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",In,Z]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Z]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Z]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[so,Z]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Z]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",Z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[un,Tn,Wa]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},TE=cE(PE);function U(...e){return TE(XN(e))}function Qy({text:e,streaming:t,className:n}){return u.jsxs("div",{className:U("font-sans text-[14px] leading-[1.65] tracking-[-0.005em] text-foreground","[&>p:last-child]:inline","[overflow-wrap:anywhere]",n),children:[u.jsx(Aj,{remarkPlugins:[WN],components:IE,children:e}),t&&u.jsx("span",{className:"ml-1 inline-block h-[14px] w-[7px] translate-y-[2px] rounded-[1px] bg-brand align-baseline",style:{animation:"v2-blink 1s steps(2) infinite"},"aria-hidden":!0})]})}const IE={h1:({children:e})=>u.jsx("h1",{className:"mb-2 mt-5 text-[18px] font-medium tracking-[-0.015em] text-foreground first:mt-0",children:e}),h2:({children:e})=>u.jsx("h2",{className:"mb-2 mt-4 text-[16px] font-medium tracking-[-0.01em] text-foreground first:mt-0",children:e}),h3:({children:e})=>u.jsx("h3",{className:"mb-1.5 mt-3 text-[14.5px] font-medium tracking-[-0.005em] text-foreground first:mt-0",children:e}),h4:({children:e})=>u.jsx("h4",{className:"mb-1.5 mt-3 text-[13.5px] font-medium text-foreground first:mt-0",children:e}),h5:({children:e})=>u.jsx("h5",{className:"mb-1 mt-3 text-[13px] font-medium text-foreground first:mt-0",children:e}),h6:({children:e})=>u.jsx("h6",{className:"mb-1 mt-3 text-[12.5px] font-medium uppercase tracking-[0.04em] text-muted-foreground first:mt-0",children:e}),strong:({children:e})=>u.jsx("strong",{className:"font-medium text-foreground",children:e}),em:({children:e})=>u.jsx("em",{className:"italic text-foreground",children:e}),p:({children:e})=>u.jsx("p",{className:"my-2 first:mt-0 last:mb-0",children:e}),a:({href:e,children:t})=>u.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-brand underline underline-offset-2 transition-colors hover:text-brand-strong",children:t}),hr:()=>u.jsx("hr",{className:"my-3 border-t border-border-soft"}),ul:({children:e})=>u.jsx("ul",{className:"my-2 flex list-none flex-col gap-[3px] pl-5",children:e}),ol:({children:e,start:t})=>u.jsx("ol",{className:"my-2 flex list-decimal flex-col gap-[3px] pl-6 marker:font-mono marker:text-[12px] marker:text-muted-foreground",start:t??void 0,children:e}),li:({children:e,...t})=>{const n=typeof t.className=="string"&&t.className.includes("task-list-item");return u.jsx("li",{className:U("relative",!n&&"pl-3 before:absolute before:left-0 before:top-0 before:text-muted-foreground before:content-['·']"),children:e})},blockquote:({children:e})=>u.jsx("blockquote",{className:"my-2 border-l-2 border-brand/[0.30] pl-3 text-muted-foreground",children:e}),table:({children:e})=>u.jsx("div",{className:"my-3 overflow-x-auto rounded-md border border-border-soft",children:u.jsx("table",{className:"w-full border-collapse text-[12.5px]",children:e})}),thead:({children:e})=>u.jsx("thead",{className:"border-b border-border-soft bg-muted",children:e}),tbody:({children:e})=>u.jsx("tbody",{children:e}),tr:({children:e})=>u.jsx("tr",{className:"border-b border-border-soft/60 last:border-b-0",children:e}),th:({children:e,style:t})=>u.jsx("th",{style:t,className:"px-2.5 py-1.5 text-left text-[11.5px] font-medium text-muted-foreground",children:e}),td:({children:e,style:t})=>u.jsx("td",{style:t,className:"px-2.5 py-1.5 align-top text-foreground",children:e}),img:({src:e,alt:t})=>u.jsx("img",{src:e,alt:t,className:"my-2 max-w-full rounded-md border border-border-soft"}),pre:({children:e})=>u.jsx(_E,{children:e}),code:({className:e,children:t,...n})=>typeof e=="string"&&/\blanguage-/.test(e)?u.jsx("code",{className:e,...n,children:t}):u.jsx("code",{className:"rounded-[5px] border border-border-soft bg-muted px-1.5 py-px font-mono text-[12px] text-foreground",...n,children:t})};function _E({children:e}){const t=P.useRef(null),n=$r(s=>s.pushToast),[r,i]=P.useState(!1),o=async()=>{var l;const s=((l=t.current)==null?void 0:l.textContent)??"";if(s)try{await navigator.clipboard.writeText(s),i(!0),setTimeout(()=>i(!1),1200)}catch{n({id:`copy-${Date.now()}`,workspaceId:"",message:"Copy failed — clipboard not available",notifyType:"warning"})}};return u.jsxs("div",{className:"group/code relative my-3 overflow-hidden rounded-md border border-border-soft bg-muted",children:[u.jsx("pre",{ref:t,className:"overflow-x-auto px-3 py-2.5 font-mono text-[12px] leading-relaxed text-foreground",children:e}),u.jsx("button",{type:"button",onClick:o,title:"Copy code","aria-label":"Copy code",className:"absolute right-1.5 top-1.5 rounded-md border border-border-soft bg-card p-1 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover/code:opacity-100 focus-visible:opacity-100",children:r?u.jsx(ss,{className:"h-3 w-3 text-signal-ok"}):u.jsx(Ix,{className:"h-3 w-3"})})]})}function Vy(e){return["workspace-sessions",e]}function LE(e){return rn({queryKey:Vy(e),enabled:!!e,staleTime:1e4,queryFn:()=>{if(!e)throw new Error("workspaceId required");return de(`/api/workspaces/${encodeURIComponent(e)}/sessions`).then(t=>t.sessions)}})}function RE(e){const t=Pe();return Oe({mutationFn:n=>{if(!e)throw new Error("workspaceId required");const r=`?path=${encodeURIComponent(n)}`;return de(`/api/workspaces/${encodeURIComponent(e)}/sessions${r}`,{method:"DELETE"})},onSuccess:()=>t.invalidateQueries({queryKey:Vy(e)})})}function AE(e,t,n){return rn({queryKey:["fork-points",e,t??"__none__"],enabled:!!e&&!!t&&n,staleTime:0,queryFn:()=>{if(!e)throw new Error("workspaceId required");return de(`/api/workspaces/${encodeURIComponent(e)}/fork-points`).then(r=>r.points)}})}function zE({open:e,title:t,message:n,confirmLabel:r="Confirm",cancelLabel:i="Cancel",variant:o="default",onConfirm:s,onCancel:l}){const a=P.useRef(null),c=P.useRef(null);if(P.useEffect(()=>{if(e)c.current=document.activeElement,requestAnimationFrame(()=>{var d;return(d=a.current)==null?void 0:d.focus()});else if(c.current){const d=c.current;c.current=null,d.isConnected&&d.focus()}},[e]),P.useEffect(()=>{if(!e)return;const d=p=>{p.key==="Escape"?(p.preventDefault(),p.stopPropagation(),l()):p.key==="Enter"&&(p.preventDefault(),p.stopPropagation(),s())};return document.addEventListener("keydown",d,!0),()=>document.removeEventListener("keydown",d,!0)},[e,l,s]),!e)return null;const f=o==="danger";return u.jsxs("div",{className:"fixed inset-0 z-[200] flex items-center justify-center",children:[u.jsx("div",{className:"absolute inset-0 bg-background/60 backdrop-blur-[2px] v2-fade-in",onClick:l,onMouseDown:d=>d.stopPropagation()}),u.jsxs("div",{role:"alertdialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title","aria-describedby":"confirm-dialog-message",className:"relative z-10 mx-4 w-full max-w-sm overflow-hidden rounded-xl border border-border bg-card shadow-panel v2-dialog-in",onMouseDown:d=>d.stopPropagation(),children:[u.jsx("div",{className:"px-5 pt-5 pb-4",children:u.jsxs("div",{className:"flex items-start gap-3",children:[f&&u.jsx("span",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-signal-rose/10",children:u.jsx(ac,{className:"h-4 w-4 text-signal-rose"})}),u.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[u.jsx("h2",{id:"confirm-dialog-title",className:"text-sm font-semibold text-foreground",children:t}),u.jsx("p",{id:"confirm-dialog-message",className:"whitespace-pre-line text-[13px] leading-relaxed text-muted-foreground",children:n})]})]})}),u.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-border bg-muted/40 px-5 py-3",children:[i!==null&&u.jsx("button",{type:"button",onClick:l,className:U("rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors","border border-border bg-card text-foreground/80","hover:bg-accent hover:text-foreground","focus:outline-none focus:ring-2 focus:ring-brand/40"),children:i}),u.jsx("button",{ref:a,type:"button",onClick:s,className:U("rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors","focus:outline-none focus:ring-2",f?"bg-signal-rose text-white hover:bg-signal-rose/90 focus:ring-signal-rose/40":"bg-brand text-brand-foreground hover:bg-brand-strong focus:ring-brand/40"),children:r})]})]})]})}const Wy=P.createContext(null);function cs(){const e=P.useContext(Wy);if(!e)throw new Error("useConfirm must be used within a <ConfirmProvider />");return e}function FE({children:e}){const[t,n]=P.useState(null),r=P.useRef(null),i=P.useCallback(s=>(r.current&&(r.current(!1),r.current=null),new Promise(l=>{r.current=l,n({...s,open:!0})})),[]),o=P.useCallback(s=>{var l;n(a=>a?{...a,open:!1}:null),(l=r.current)==null||l.call(r,s),r.current=null},[]);return u.jsxs(Wy.Provider,{value:i,children:[e,u.jsx(zE,{open:(t==null?void 0:t.open)??!1,title:(t==null?void 0:t.title)??"",message:(t==null?void 0:t.message)??"",confirmLabel:t==null?void 0:t.confirmLabel,cancelLabel:t==null?void 0:t.cancelLabel,variant:t==null?void 0:t.variant,onConfirm:()=>o(!0),onCancel:()=>o(!1)})]})}function DE({workspaceId:e,sessionPath:t,disabled:n=!1,onSelect:r,onNewSession:i,onFork:o}){const{data:s,isFetching:l,refetch:a}=LE(e),c=RE(e),f=cs(),[d,p]=P.useState(!1),[h,g]=P.useState("sessions"),{data:v}=AE(e,t,h==="fork"&&d),k=P.useRef(null),m=P.useRef(null),x=P.useRef(null),y=P.useRef(null),w=P.useRef(!1);P.useEffect(()=>{d||g("sessions")},[d]),P.useEffect(()=>{g("sessions")},[t]),P.useEffect(()=>{!e||t===void 0||a()},[e,t,a]),P.useEffect(()=>{if(!d)return;const R=_=>{k.current&&!k.current.contains(_.target)&&p(!1)},j=_=>{var A,W;if(_.key==="Escape"){_.preventDefault(),w.current=!0,h==="fork"?g("sessions"):p(!1);return}if(_.key==="Tab"){(A=m.current)==null||A.focus(),p(!1);return}if(h==="sessions"&&(_.key==="ArrowDown"||_.key==="ArrowUp"||_.key==="Home"||_.key==="End")){const Y=x.current;if(!Y)return;const H=Array.from(Y.querySelectorAll('[role="option"]'));if(H.length===0)return;_.preventDefault();const re=H.indexOf(document.activeElement),Q=_.key==="ArrowDown"?re<0?0:Math.min(re+1,H.length-1):_.key==="ArrowUp"?re<0?H.length-1:Math.max(re-1,0):_.key==="Home"?0:H.length-1;(W=H[Q])==null||W.focus()}};return document.addEventListener("mousedown",R),document.addEventListener("keydown",j),()=>{document.removeEventListener("mousedown",R),document.removeEventListener("keydown",j)}},[d,h]),P.useLayoutEffect(()=>{var R,j;if(d&&h==="sessions"){const _=y.current??((R=x.current)==null?void 0:R.querySelector('[role="option"]'));_==null||_.scrollIntoView({block:"nearest"}),_==null||_.focus({preventScroll:!0})}else!d&&w.current&&(w.current=!1,(j=m.current)==null||j.focus())},[d,h]);const E=n||!e,S=c.isPending?c.variables??null:null,T=async R=>{if(c.isPending||R===t)return;const j=s==null?void 0:s.find(W=>W.path===R),_=j?Ga(j):Ky(R);await f({title:"Delete session",message:`Delete session "${_}"? This cannot be undone.`,confirmLabel:"Delete",variant:"danger"})&&c.mutate(R,{onError:async W=>{await f({title:"Delete failed",message:`Failed to delete session: ${W.message}`,confirmLabel:"OK",cancelLabel:null})}})},I=s==null?void 0:s.find(R=>R.path===t);return u.jsxs("div",{ref:k,className:"relative",children:[u.jsxs("button",{ref:m,type:"button",onClick:()=>p(R=>!R),disabled:E,"aria-label":"Session","aria-haspopup":"menu","aria-expanded":d,title:t===void 0?"Session — connecting":t===null?"Session — new":t,className:U("flex items-center gap-1.5 rounded-md px-2 py-1 text-[12.5px] text-muted-foreground transition-colors ring-brand-focus","border border-transparent bg-transparent","hover:bg-muted hover:text-foreground","disabled:cursor-not-allowed disabled:opacity-50",d&&"bg-muted text-foreground"),children:[u.jsx("span",{children:"Session"}),I&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-foreground/40",children:"·"}),u.jsx("span",{className:"font-mono tabular-nums text-foreground",children:ME(I.updatedAt)})]}),t===void 0&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-foreground/40",children:"·"}),u.jsx("span",{className:"text-foreground/60",children:"Connecting…"})]}),t===null&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-foreground/40",children:"·"}),u.jsx("span",{className:"text-foreground/60",children:"New"})]}),typeof t=="string"&&!I&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-foreground/40",children:"·"}),u.jsx("span",{className:"text-foreground/60",children:"…"})]}),u.jsx(cr,{className:U("h-3 w-3 shrink-0 opacity-50 transition-transform",d&&"rotate-180")})]}),d&&u.jsx("div",{ref:x,role:"menu","aria-label":"Session menu",className:"absolute left-0 top-full z-50 mt-1.5 w-80 overflow-hidden rounded-md border border-border bg-card shadow-menu",children:h==="sessions"?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"py-1",children:[u.jsx(Ka,{icon:u.jsx(Gl,{className:"h-3.5 w-3.5"}),onClick:()=>{w.current=!0,p(!1),i()},children:"New session"}),u.jsx(Ka,{icon:u.jsx($b,{className:"h-3.5 w-3.5"}),onClick:()=>g("fork"),children:"Fork from message…"}),u.jsx(Ka,{icon:l?u.jsx(Vt,{className:"h-3.5 w-3.5 animate-spin"}):u.jsx(Hb,{className:"h-3.5 w-3.5"}),onClick:()=>void a(),disabled:l,children:"Reload"})]}),u.jsxs("div",{className:"flex items-center justify-between border-t border-border bg-muted/60 px-3 py-1.5 text-[11.5px] text-muted-foreground",children:[u.jsx("span",{className:"font-medium text-foreground/80",children:"Session history"}),s&&u.jsx("span",{className:"font-mono tabular-nums",children:s.length})]}),u.jsxs("div",{className:"max-h-72 overflow-y-auto py-1",children:[!s&&u.jsx("div",{className:"px-3 py-3 text-xs text-muted-foreground",children:l?"Loading…":"No sessions."}),s&&s.length===0&&u.jsx("div",{className:"px-3 py-3 text-xs text-muted-foreground",children:"No sessions yet."}),s==null?void 0:s.map(R=>{const j=R.path===t,_=S===R.path;return u.jsxs("div",{className:"group/row relative flex items-stretch px-1.5",children:[u.jsxs("button",{ref:j?y:void 0,type:"button",role:"option","aria-selected":j,onClick:()=>{w.current=!0,p(!1),j||r(R.path)},title:R.path,className:U("flex w-full items-start gap-2.5 rounded-md px-2 py-1.5 pr-9 text-left text-xs transition-colors ring-brand-focus focus:outline-none","text-foreground/90 hover:bg-accent hover:text-foreground focus:bg-accent focus:text-foreground"),children:[u.jsx(ss,{className:U("mt-0.5 h-3.5 w-3.5 shrink-0",j?"text-brand opacity-100":"opacity-0")}),u.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[u.jsx("span",{className:"truncate font-normal text-foreground",children:Ga(R)}),u.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground",children:OE(R.updatedAt)})]})]}),!j&&u.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),T(R.path)},disabled:c.isPending,"aria-label":`Delete session ${Ga(R)}`,title:c.isPending&&!_?"Another delete is in progress":"Delete session",className:U("absolute right-3 top-1/2 -translate-y-1/2 rounded p-1 text-muted-foreground transition-opacity ring-brand-focus","hover:bg-signal-rose/15 hover:text-signal-rose","disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted-foreground",_?"opacity-100":"opacity-0 group-hover/row:opacity-100 focus:opacity-100"),children:_?u.jsx(Vt,{className:"h-3 w-3 animate-spin"}):u.jsx(Qo,{className:"h-3 w-3"})})]},R.path)})]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center gap-1 border-b border-border bg-muted/60 px-2 py-1.5",children:[u.jsx("button",{type:"button",onClick:()=>g("sessions"),"aria-label":"Back to sessions",title:"Back",className:"rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground ring-brand-focus",children:u.jsx(Tx,{className:"h-3.5 w-3.5"})}),u.jsx("span",{className:"text-[11.5px] font-medium text-foreground/80",children:"Fork from message"})]}),u.jsxs("div",{className:"max-h-72 overflow-y-auto py-1",children:[!v&&u.jsx("div",{className:"px-3 py-3 text-xs text-muted-foreground",children:"Loading…"}),v&&v.length===0&&u.jsx("div",{className:"px-3 py-3 text-xs text-muted-foreground",children:"No messages to fork from."}),v==null?void 0:v.map(R=>u.jsx("button",{type:"button",onClick:()=>{w.current=!0,p(!1),o(R.entryId)},className:"w-full truncate px-3 py-1.5 text-left text-xs text-foreground/90 transition-colors hover:bg-accent hover:text-foreground ring-brand-focus",title:R.text,children:R.text},R.entryId))]})]})})]})}function Ka({icon:e,children:t,onClick:n,disabled:r}){return u.jsxs("button",{type:"button",role:"menuitem",onClick:n,disabled:r,className:U("flex w-full items-center gap-2.5 px-3 py-1.5 text-left text-[12.5px] text-foreground/90 transition-colors ring-brand-focus","hover:bg-accent hover:text-foreground","disabled:cursor-not-allowed disabled:opacity-50"),children:[u.jsx("span",{className:"shrink-0 text-muted-foreground",children:e}),u.jsx("span",{children:t})]})}function Ga(e){return e.name??e.preview??Ky(e.path)}function Ky(e){return e.split("/").at(-1)??e}function ME(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(t)}function OE(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(t)}const $E={online:"bg-signal-ok",streaming:"bg-brand",idle:"bg-muted-foreground/40",error:"bg-signal-error",warning:"bg-signal-warn"};function Tl({state:e}){return u.jsx("span",{className:U("inline-block h-1.5 w-1.5 shrink-0 rounded-full",$E[e],e==="streaming"&&"animate-[v2-halo-brand_2.4s_ease-out_infinite]")})}const BE={default:"text-muted-foreground bg-muted border-border",brand:"text-brand bg-brand/[0.08] border-brand/[0.22]",ok:"text-signal-ok bg-signal-ok/[0.10] border-transparent",warn:"text-signal-warn bg-signal-warn/[0.10] border-transparent",error:"text-signal-error bg-signal-error/[0.10] border-transparent",ghost:"text-muted-foreground bg-transparent border-border-soft"};function ir({tone:e="default",mono:t=!1,className:n,title:r,children:i}){return u.jsx("span",{title:r,className:U("inline-flex items-center gap-1.5 rounded-full border px-[9px] py-[2px] text-[11.5px] font-medium leading-[1.5]",t?"font-mono tracking-normal":"tracking-[-0.005em]",BE[e],n),children:i})}function Kn({children:e,className:t}){return u.jsx("kbd",{className:U("inline-flex min-w-[18px] items-center justify-center rounded-[5px] border border-border bg-card px-1.5 py-px text-[10.5px] font-medium leading-none text-muted-foreground","border-b-[1.5px] border-b-border-hi",t),children:e})}function Ko({active:e,title:t,onClick:n,disabled:r,className:i,children:o,...s}){return u.jsx("button",{type:"button",title:t,onClick:n,disabled:r,"aria-label":s["aria-label"]??t,className:U("inline-flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-full border text-[13px] transition-colors ring-brand-focus disabled:cursor-not-allowed disabled:opacity-50",e?"border-brand/[0.22] bg-brand/[0.08] text-brand":"border-transparent text-muted-foreground hover:bg-accent/70 hover:text-foreground",i),children:o})}function ia({tool:e,className:t}){const n="currentColor";switch(e){case"read":return u.jsx("svg",{className:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:n,strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:u.jsx("path",{d:"M2 3h7l3 3v5a1 1 0 0 1-1 1H2zM9 3v3h3"})});case"edit":return u.jsx("svg",{className:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:n,strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:u.jsx("path",{d:"M2 10l7-7 2 2-7 7H2zM8.5 3.5L10.5 5.5"})});case"write":return u.jsx("svg",{className:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:n,strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:u.jsx("path",{d:"M3 2h6l3 3v7H3zM7 2v9M3 7h9"})});case"bash":return u.jsx("svg",{className:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:n,strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:u.jsx("path",{d:"M2 4l3 3-3 3M7 10h5"})});case"grep":case"find":return u.jsxs("svg",{className:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:n,strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:[u.jsx("circle",{cx:"6",cy:"6",r:"3.5"}),u.jsx("path",{d:"M9 9l3 3"})]});case"ls":return u.jsx("svg",{className:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:n,strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:u.jsx("path",{d:"M2 4h10M2 7h10M2 10h6"})});case"plan":return u.jsx("svg",{className:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:n,strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",children:u.jsx("path",{d:"M3 4l1.5 1.5L7 3M3 8l1.5 1.5L7 7M9 4.5h3M9 8.5h3"})});default:return u.jsx("svg",{className:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:n,strokeWidth:1.2,children:u.jsx("circle",{cx:"7",cy:"7",r:"3"})})}}function Eh(){const e=new Date,t=n=>String(n).padStart(2,"0");return`${t(e.getUTCHours())}:${t(e.getUTCMinutes())}:${t(e.getUTCSeconds())}Z`}function UE(){const[e,t]=P.useState(Eh);return P.useEffect(()=>{const n=setInterval(()=>t(Eh()),1e3);return()=>clearInterval(n)},[]),e}function Ya(e){return e==null?"—":e<1e3?`${Math.round(e)}ms`:e<1e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/1e3)}s`}function HE(e){if(e!=null)return e>=3e3?"text-signal-error":e>=1500?"text-signal-warn":"text-brand"}const Xa={30:"text-zinc-800 dark:text-zinc-200",31:"text-red-600 dark:text-red-400",32:"text-green-600 dark:text-green-400",33:"text-yellow-600 dark:text-yellow-400",34:"text-blue-600 dark:text-blue-400",35:"text-purple-600 dark:text-purple-400",36:"text-cyan-600 dark:text-cyan-400",37:"text-zinc-500 dark:text-zinc-400",90:"text-zinc-500 dark:text-zinc-500",91:"text-red-500 dark:text-red-300",92:"text-green-500 dark:text-green-300",93:"text-yellow-500 dark:text-yellow-300",94:"text-blue-500 dark:text-blue-300",95:"text-purple-500 dark:text-purple-300",96:"text-cyan-500 dark:text-cyan-300",97:"text-zinc-100"};function qE(e){if(e<0||e>255||e<16)return;if(e<232){const n=e-16,r=Math.floor(n/36),i=Math.floor(n%36/6),o=n%6,s=[0,95,135,175,215,255];return`rgb(${s[r]},${s[i]},${s[o]})`}const t=8+(e-232)*10;return`rgb(${t},${t},${t})`}function QE(e,t){const n={...e};for(let r=0;r<t.length;r++){const i=t[r];switch(i){case 0:n.fgClass=void 0,n.fgStyle=void 0,n.bold=!1,n.dim=!1,n.italic=!1,n.underline=!1;break;case 1:n.bold=!0;break;case 2:n.dim=!0;break;case 3:n.italic=!0;break;case 4:n.underline=!0;break;case 22:n.bold=!1,n.dim=!1;break;case 23:n.italic=!1;break;case 24:n.underline=!1;break;case 39:n.fgClass=void 0,n.fgStyle=void 0;break;case 38:{const o=t[r+1];if(o===5){const s=t[r+2];if(typeof s=="number"){const l=qE(s);if(l)n.fgStyle=l,n.fgClass=void 0;else if(s<16){const a=s<8?30+s:90+(s-8);n.fgClass=Xa[a],n.fgStyle=void 0}}r+=2}else if(o===2){const s=t[r+2],l=t[r+3],a=t[r+4];typeof s=="number"&&typeof l=="number"&&typeof a=="number"&&(n.fgStyle=`rgb(${s},${l},${a})`,n.fgClass=void 0),r+=4}break}default:Xa[i]&&(n.fgClass=Xa[i],n.fgStyle=void 0)}}return n}const wc=/\x1b(?:\[([0-9;]*)([a-zA-Z])|\][^\x07\x1b]*(?:\x07|\x1b\\))/g;function VE(e){return e.includes("\r")?e.split(`
209
+ `).map(t=>{if(!t.includes("\r"))return t;const n=t.split("\r");return n[n.length-1]??""}).join(`
210
+ `):e}function Sc(e){const t=VE(e),n=[];let r={},i=0,o=0;const s=a=>{if(!a)return;if(!WE(r)){n.push(a);return}const c=KE(r),f=GE(r);n.push(u.jsx("span",{className:c||void 0,style:f,children:a},o++))};wc.lastIndex=0;let l;for(;(l=wc.exec(t))!==null;){const a=l.index;if(a>i&&s(t.slice(i,a)),l[2]==="m"){const c=l[1]?l[1].split(";").map(f=>f===""?0:Number(f)):[0];r=QE(r,c)}i=a+l[0].length}return i<t.length&&s(t.slice(i)),n}function WE(e){return!!(e.fgClass||e.fgStyle||e.bold||e.dim||e.italic||e.underline)}function KE(e){const t=[];return e.fgClass&&t.push(e.fgClass),e.bold&&t.push("font-bold"),e.dim&&t.push("opacity-60"),e.italic&&t.push("italic"),e.underline&&t.push("underline"),t.join(" ")}function GE(e){return e.fgStyle?{color:e.fgStyle}:void 0}function Ph(e){return e.replace(wc,"")}function Gy({item:e,isCurrentPlan:t=!0}){if(e.kind==="bash")return u.jsx(Th,{command:e.command,output:e.output,exitCode:e.exitCode,running:!1});const n=l3(e.args),r=e.toolName;return r==="edit"?u.jsx(JE,{item:e,args:n}):r==="write"?u.jsx(ZE,{item:e,args:n}):r==="read"?u.jsx(e3,{item:e,args:n}):r==="bash"?u.jsx(Th,{command:bt(n==null?void 0:n.command)??"",output:e.text,exitCode:void 0,running:e.status==="running",errored:e.status==="error"}):r==="update_plan"?u.jsx(n3,{item:e,args:n,isCurrent:t}):u.jsx(Yy,{item:e,args:n})}function YE({items:e}){const[t,n]=P.useState(!1),r=P.useId(),i=XE(e);return u.jsxs("div",{className:"overflow-hidden rounded-[10px] border border-border-soft bg-muted",children:[u.jsxs("button",{type:"button","aria-expanded":t,"aria-controls":r,onClick:()=>n(o=>!o),className:"flex w-full items-center gap-3 px-3 py-2 text-left transition-colors hover:bg-accent/40 ring-brand-focus",children:[u.jsx(cr,{className:U("h-3 w-3 shrink-0 text-muted-foreground transition-transform",t&&"rotate-180")}),u.jsxs("span",{className:"shrink-0 text-[12.5px] font-medium text-foreground",children:[e.length," actions"]}),u.jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] text-muted-foreground",children:i.map(o=>`${o.count} ${o.name}`).join(" · ")}),u.jsx(ir,{tone:"ghost",children:t?"open":"batched"})]}),t&&u.jsx("div",{id:r,className:"flex flex-col gap-2 border-t border-border-soft bg-card p-2",children:e.map(o=>u.jsx(Gy,{item:o,isCurrentPlan:!1},o.id))})]})}function XE(e){const t=new Map;for(const n of e){const r=n.kind==="bash"?"bash":n.toolName;t.set(r,(t.get(r)??0)+1)}return Array.from(t.entries()).sort((n,r)=>r[1]-n[1]).map(([n,r])=>({name:n,count:r}))}function JE({item:e,args:t}){const n=Xd(t),r=a3(t),i=e.status==="error",o=s3(r);return u.jsxs(Vi,{children:[u.jsx(Kd,{name:"edit",verb:"Edited",path:n,status:e.status,stats:o}),r.length>0?u.jsx(o3,{children:u.jsx("div",{className:"flex flex-col gap-2 bg-background p-2",children:r.map((s,l)=>u.jsx(i3,{index:l,edit:s,multi:r.length>1},l))})}):e.text&&u.jsx(Go,{text:e.text}),e.text&&r.length>0&&i&&u.jsx(Go,{text:e.text})]})}function ZE({item:e,args:t}){const n=Xd(t),r=bt(t==null?void 0:t.content)??"",i=e.status==="error";return u.jsxs(Vi,{children:[u.jsx(Kd,{name:"write",verb:"Wrote",path:n,status:e.status}),r?u.jsx(Yd,{text:r,render:o=>u.jsx("pre",{className:"overflow-auto whitespace-pre font-mono text-[12px] leading-relaxed text-foreground",children:o})}):e.text&&u.jsx(Go,{text:e.text}),r&&i&&e.text&&u.jsx(Go,{text:e.text})]})}function e3({item:e,args:t}){const n=Xd(t),r=_h(t==null?void 0:t.offset),i=_h(t==null?void 0:t.limit),o=r!==void 0||i!==void 0?`lines ${r??1}–${(r??1)+(i??0)-1}`:void 0;return u.jsxs(Vi,{children:[u.jsx(Kd,{name:"read",verb:"Read",path:n,status:e.status,suffix:o}),e.text&&u.jsx(Yd,{text:e.text,render:s=>u.jsx("pre",{className:"overflow-auto whitespace-pre-wrap break-words font-mono text-[12px] leading-relaxed text-muted-foreground",children:s})})]})}function Th({command:e,output:t,exitCode:n,running:r,errored:i}){const s=r?"running":i===!0||n!==void 0&&n!==0?"error":"ok";return u.jsxs(Vi,{children:[u.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[u.jsx(ia,{tool:"bash",className:"shrink-0 text-muted-foreground"}),u.jsx("span",{className:"text-[12.5px] text-foreground",children:"Ran"}),u.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[11.5px] tracking-[-0.005em] text-muted-foreground",children:e}),n!==void 0&&n!==0&&u.jsxs("span",{className:"font-mono text-[11px] text-signal-error",children:["exit ",n]}),u.jsx(Gd,{status:s})]}),t&&u.jsx(Yd,{text:t,alwaysCollapsible:!0,render:l=>u.jsx("pre",{className:"overflow-auto whitespace-pre-wrap break-words font-mono text-[12px] leading-relaxed text-foreground",children:Sc(l)})})]})}function Yy({item:e,args:t}){const n=u3(e.toolName,t);return u.jsxs(Vi,{children:[u.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[u.jsx(ia,{tool:e.toolName,className:"shrink-0 text-muted-foreground"}),u.jsxs("span",{className:"min-w-0 flex-1 truncate text-[12.5px] text-muted-foreground",children:[u.jsx("span",{className:"text-foreground",children:e.toolName}),n&&u.jsx("span",{className:"ml-2 font-mono text-[11.5px]",children:n})]}),u.jsx(Gd,{status:e.status})]}),e.text&&u.jsx(Go,{text:e.text})]})}function t3(e){if(!e)return[];const t=e.items;if(!Array.isArray(t))return[];const n=new Set;return t.flatMap(r=>{if(!r||typeof r!="object")return[];const i=r;if(typeof i.id!="string"||typeof i.title!="string")return[];if(!i.title.trim()||n.has(i.id))return[];const o=i.status;return o!=="pending"&&o!=="in_progress"&&o!=="completed"?[]:(n.add(i.id),[{id:i.id,title:i.title,status:o,note:typeof i.note=="string"?i.note:void 0}])})}function n3({item:e,args:t,isCurrent:n}){const r=P.useMemo(()=>t3(t),[t]),i=r.length,[o,s]=P.useState(!1),l=P.useId();if(i===0)return u.jsx(Yy,{item:e,args:t});const a=r.filter(p=>p.status==="completed").length,c=a/i,f=n||o,d=u.jsxs(u.Fragment,{children:[!n&&u.jsx(cr,{className:U("h-3 w-3 shrink-0 text-muted-foreground transition-transform",o&&"rotate-180")}),u.jsx(ia,{tool:"plan",className:"shrink-0 text-muted-foreground"}),u.jsx("span",{className:"shrink-0 text-[12.5px] text-foreground",children:"Plan"}),u.jsxs("span",{className:"inline-flex min-w-0 flex-1 items-center gap-2 text-[12px] text-muted-foreground",children:[u.jsxs("span",{className:"font-mono text-[11.5px] tabular-nums",children:[a,"/",i]}),u.jsx("span",{className:"inline-block h-1 w-[48px] overflow-hidden rounded-full bg-border-soft",role:"progressbar","aria-valuemin":0,"aria-valuenow":a,"aria-valuemax":i,"aria-label":`Plan progress: ${a} of ${i} completed`,children:u.jsx("span",{className:"block h-full rounded-full bg-brand transition-[width] duration-300",style:{width:`${c*100}%`}})})]})]});return u.jsxs(Vi,{children:[n?u.jsx("div",{className:"flex items-center gap-2.5 px-3 py-2",children:d}):u.jsx("button",{type:"button","aria-expanded":o,"aria-controls":l,onClick:()=>s(p=>!p),className:"flex w-full items-center gap-2.5 px-3 py-2 text-left transition-colors hover:bg-accent/40 ring-brand-focus",children:d}),f&&u.jsx("ul",{id:l,className:"border-t border-border-soft bg-background px-3 py-1.5","aria-label":"Plan items",children:r.map(p=>u.jsxs("li",{className:"flex items-start gap-2 py-[3px]",children:[u.jsx("span",{className:"mt-[2px] shrink-0",children:p.status==="completed"?u.jsx(ss,{className:"h-3.5 w-3.5 text-signal-ok","aria-hidden":!0}):p.status==="in_progress"?n?u.jsx(Vt,{className:"h-3.5 w-3.5 text-brand",style:{animation:"v2-spin 1.4s linear infinite"},"aria-label":"In progress"}):u.jsx(Db,{className:"h-3.5 w-3.5 text-muted-foreground/70","aria-label":"Was in progress"}):u.jsx(Mb,{className:"h-3.5 w-3.5 text-muted-foreground/40","aria-hidden":!0})}),u.jsxs("span",{className:U("min-w-0 flex-1 text-[12.5px] leading-[1.5]",p.status==="completed"?"text-muted-foreground line-through decoration-muted-foreground/30":p.status==="in_progress"&&n?"text-foreground font-medium":"text-muted-foreground"),children:[p.title,p.note&&u.jsxs("span",{className:"ml-1.5 text-[11.5px] text-muted-foreground/60",children:["— ",p.note]})]})]},p.id))})]})}function Vi({children:e}){return u.jsx("div",{className:"overflow-hidden rounded-[10px] border border-border-soft bg-muted",children:e})}function Kd({name:e,verb:t,path:n,status:r,suffix:i,stats:o}){return u.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[u.jsx(ia,{tool:e,className:"shrink-0 text-muted-foreground"}),u.jsx("span",{className:"shrink-0 text-[12.5px] text-foreground",children:t}),n?u.jsx(r3,{path:n}):u.jsx("span",{className:"flex-1 text-muted-foreground",children:"…"}),i&&u.jsx("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:i}),o&&(o.adds>0||o.dels>0)&&u.jsxs("span",{className:"shrink-0 font-mono text-[11.5px] tabular-nums",children:[o.adds>0&&u.jsxs("span",{className:"text-signal-ok",children:["+",o.adds]}),o.adds>0&&o.dels>0&&" ",o.dels>0&&u.jsxs("span",{className:"text-signal-error",children:["−",o.dels]})]}),u.jsx(Gd,{status:r})]})}function Gd({status:e}){return e==="ok"?u.jsx(ir,{tone:"ok",children:"done"}):e==="error"?u.jsx(ir,{tone:"error",children:"error"}):u.jsx(ir,{tone:"warn",children:"running"})}function r3({path:e}){const t=$r(s=>s.pushToast),[n,r]=P.useState(!1),i=Xs(e),o=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1200),t({id:`copy-${Date.now()}`,workspaceId:"",message:`Copied: ${e}`,notifyType:"info"})}catch{t({id:`copy-${Date.now()}`,workspaceId:"",message:"Copy failed — clipboard not available",notifyType:"warning"})}};return u.jsxs("button",{type:"button",onClick:o,title:`${e} — click to copy`,className:"group inline-flex min-w-0 flex-1 items-center gap-1 truncate text-left font-mono text-[11.5px] tracking-[-0.005em] text-muted-foreground transition-colors hover:text-foreground",children:[u.jsx("span",{className:"truncate",children:i}),n?u.jsx(ss,{className:"h-3 w-3 shrink-0 text-signal-ok"}):u.jsx(Ix,{className:"h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60"})]})}function i3({index:e,edit:t,multi:n}){return u.jsxs("div",{className:"overflow-hidden rounded-md border border-border-soft bg-card",children:[n&&u.jsxs("div",{className:"border-b border-border-soft bg-muted px-2.5 py-1 text-[11px] text-muted-foreground",children:["Edit ",e+1]}),u.jsx(Ih,{kind:"del",text:t.oldText}),u.jsx(Ih,{kind:"add",text:t.newText})]})}function Ih({kind:e,text:t}){if(!t)return null;const n=t.split(`
211
+ `),r=e==="add"?"bg-signal-ok/[0.08] text-signal-ok":"bg-signal-error/[0.08] text-signal-error",i=e==="add"?"+":"−";return u.jsx("pre",{className:U("overflow-x-auto whitespace-pre font-mono text-[12px] leading-relaxed",r),children:n.map((o,s)=>u.jsxs("div",{className:"flex",children:[u.jsx("span",{className:"select-none px-2 opacity-60",children:i}),u.jsx("span",{className:"flex-1 pr-2",children:o||" "})]},s))})}function o3({children:e}){const[t,n]=P.useState(!1),r=P.useId();return u.jsxs("div",{className:"border-t border-border-soft bg-background",children:[t&&u.jsx("div",{id:r,children:e}),u.jsxs("button",{type:"button","aria-expanded":t,"aria-controls":r,onClick:()=>n(i=>!i),className:U("flex w-full items-center gap-1.5 px-3 py-1.5 text-[11.5px] text-muted-foreground transition-colors hover:text-foreground",t&&"border-t border-border-soft"),children:[u.jsx(cr,{className:U("h-3 w-3 transition-transform",t&&"rotate-180")}),t?"Collapse":"Show details"]})]})}function Go({text:e}){const[t,n]=P.useState(!1),r=P.useId(),i=e.split(`
212
+ `).length;return i<=3?u.jsx("pre",{className:"overflow-auto whitespace-pre-wrap break-words border-t border-border-soft bg-background px-3 py-2 font-mono text-[12px] leading-relaxed text-muted-foreground",title:Ph(e).slice(0,400),children:Sc(e)}):u.jsxs("div",{className:"border-t border-border-soft bg-background",children:[t&&u.jsx("pre",{id:r,className:"max-h-80 overflow-auto whitespace-pre-wrap break-words px-3 py-2 font-mono text-[12px] leading-relaxed text-muted-foreground",title:Ph(e).slice(0,400),children:Sc(e)}),u.jsxs("button",{type:"button","aria-expanded":t,"aria-controls":r,onClick:()=>n(o=>!o),className:U("flex w-full items-center gap-1.5 px-3 py-1.5 text-[11.5px] text-muted-foreground transition-colors hover:text-foreground",t&&"border-t border-border-soft"),children:[u.jsx(cr,{className:U("h-3 w-3 transition-transform",t&&"rotate-180")}),t?"Collapse":`Show ${i} line${i===1?"":"s"}`]})]})}function s3(e){let t=0,n=0;for(const r of e)r.oldText&&(n+=r.oldText.split(`
213
+ `).filter(i=>i.length>0).length),r.newText&&(t+=r.newText.split(`
214
+ `).filter(i=>i.length>0).length);return{adds:t,dels:n}}function Yd({text:e,render:t,alwaysCollapsible:n=!1}){const[r,i]=P.useState(!1),o=P.useId(),s=e.split(`
215
+ `).length;return s<=3&&!n?u.jsx("div",{className:"overflow-auto border-t border-border-soft bg-background px-3 py-2",children:t(e)}):u.jsxs("div",{className:"border-t border-border-soft bg-background",children:[r&&u.jsx("div",{id:o,className:"max-h-80 overflow-auto px-3 py-2",children:t(e)}),u.jsxs("button",{type:"button","aria-expanded":r,"aria-controls":o,onClick:()=>i(l=>!l),className:U("flex w-full items-center gap-1.5 px-3 py-1.5 text-[11.5px] text-muted-foreground transition-colors hover:text-foreground",r&&"border-t border-border-soft"),children:[u.jsx(cr,{className:U("h-3 w-3 transition-transform",r&&"rotate-180")}),r?"Collapse":`Show ${s} line${s===1?"":"s"}`]})]})}function l3(e){return e&&typeof e=="object"?e:void 0}function bt(e){return typeof e=="string"?e:void 0}function _h(e){return typeof e=="number"?e:void 0}function Xd(e){return bt(e==null?void 0:e.path)??bt(e==null?void 0:e.file_path)}function a3(e){if(!e)return[];if(Array.isArray(e.edits))return e.edits.flatMap(r=>{if(!r||typeof r!="object")return[];const i=r.oldText??r.old_string,o=r.newText??r.new_string;return typeof i=="string"&&typeof o=="string"?[{oldText:i,newText:o}]:[]});const t=bt(e.old_string)??bt(e.oldText),n=bt(e.new_string)??bt(e.newText);return typeof t=="string"&&typeof n=="string"?[{oldText:t,newText:n}]:[]}function Xs(e){const t="/Users/";if(e.startsWith(t)){const n=e.slice(t.length),r=n.indexOf("/");if(r>0)return"~/"+n.slice(r+1)}if(e.length>60){const n=e.split("/").filter(Boolean);if(n.length>2)return".../"+n.slice(-2).join("/")}return e}function u3(e,t){if(!t)return;if(e==="grep"){const r=bt(t.pattern),i=bt(t.path);if(r)return`/${r}/${i?` in ${Xs(i)}`:""}`}if(e==="find"){const r=bt(t.pattern),i=bt(t.path);if(r)return`${r}${i?` in ${Xs(i)}`:""}`}if(e==="ls"){const r=bt(t.path);return r?Xs(r):"."}const n=Object.keys(t);if(n.length!==0)return`(${n.slice(0,4).join(", ")}${n.length>4?", …":""})`}function c3(e){const t=[];let n=[];const r=()=>{n.length!==0&&(n.length===1?t.push({kind:"single",item:n[0]}):t.push({kind:"group",items:n}),n=[])};for(const i of e)if(i.kind==="tool"||i.kind==="bash")f3(i)||Il(i)?(r(),t.push({kind:"single",item:i})):n.push(i);else{if(d3(i))continue;r(),t.push({kind:"single",item:i})}return r(),h3(t)}function d3(e){return e.kind==="assistant"&&!e.streaming&&e.text.length===0&&e.thinking.length===0}function f3(e){return e.kind==="tool"?e.status==="error":e.exitCode!==void 0&&e.exitCode!==0}function Il(e){return e.kind==="tool"&&e.toolName==="update_plan"}function p3(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.kind==="single"&&Il(n.item))return n.item.id}}function h3(e){const t=new Set;let n=0;for(let r=0;r<=e.length;r++){const i=r===e.length,o=!i&&e[r].kind==="single"&&e[r].item.kind==="user";if(i||o){let s=-1;for(let l=r-1;l>=n;l--){const a=e[l];if(a.kind==="single"&&Il(a.item)){s=l;break}}if(s!==-1)for(let l=n;l<r;l++){const a=e[l];l!==s&&a.kind==="single"&&Il(a.item)&&t.add(l)}n=r}}return t.size===0?e:e.filter((r,i)=>!t.has(i))}function Jd({size:e=28,running:t=!1,filled:n,className:r,title:i="pi-pilot"}){const o=n??t;return u.jsx("span",{role:"img","aria-label":i,title:i,className:U("inline-flex shrink-0 items-center justify-center rounded-full",o?"bg-brand text-[hsl(var(--brand-foreground))] border border-brand":"bg-card text-brand border border-border-hi",r),style:{width:e,height:e,fontFamily:'"Instrument Serif", "Times New Roman", serif',fontSize:Math.round(e*.5),fontStyle:"italic",lineHeight:1,letterSpacing:"-0.02em"},children:"π"})}function m3({className:e}){return u.jsx("span",{className:U("font-sans text-[15px] font-medium tracking-[-0.01em] text-foreground",e),children:"pi-pilot"})}let g3=1;const Fn=()=>String(g3++),Le=My(e=>({sessionPath:void 0,items:[],running:!1,switching:!1,queueSteering:[],queueFollowUp:[],compaction:void 0,contextUsage:void 0,latency:void 0,reset:()=>e({sessionPath:void 0,items:[],running:!1,switching:!1,queueSteering:[],queueFollowUp:[],compaction:void 0,contextUsage:void 0,latency:void 0}),pushUser:t=>e(n=>({items:[...n.items,{id:Fn(),kind:"user",text:t,pending:!0}]})),apply:t=>e(n=>y3(n,t)),setSwitching:t=>e({switching:t}),applyHistory:(t,n)=>e({items:t.map(r=>r.kind==="user"?{id:Fn(),kind:"user",text:r.text}:r.kind==="assistant"?{id:Fn(),kind:"assistant",text:r.text,thinking:r.thinking,streaming:!1,firstTokenMs:void 0,totalMs:void 0}:r.kind==="tool"?{id:Fn(),kind:"tool",toolCallId:r.toolCallId,toolName:r.toolName,args:x3(r.args),text:r.text,status:r.isError?"error":"ok"}:{id:Fn(),kind:"bash",command:r.command,output:r.output,exitCode:r.exitCode}),running:n})}));function x3(e){if(!(e==null||e==="")){if(typeof e=="object"&&!Array.isArray(e))return e;if(typeof e=="string")try{const t=JSON.parse(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:void 0}catch{return}}}function y3(e,t){if(t.type==="subscribed")return{sessionPath:t.sessionPath,items:[],running:!1,switching:!1,queueSteering:[],queueFollowUp:[],compaction:void 0};if(t.type==="error"){const n={};if(e.switching&&(n.switching=!1),t.command==="prompt"){const r=e.items.findIndex(i=>i.kind==="user"&&i.pending===!0);if(r>=0){const i=e.items.slice(),o=i[r];i[r]={...o,pending:!1},n.items=i}}return n}return t.type!=="event"?{}:v3(e,t.payload)}function v3(e,t){var n;switch(t.kind){case"agent_start":return{running:!0};case"agent_end":return{running:!1};case"message_start":{if(t.role==="user"){if(t.text===void 0)return{};const r=e.items.findIndex(i=>i.kind==="user"&&i.pending===!0);if(r>=0){const i=e.items.slice(),o=i[r];return i[r]={...o,text:t.text,pending:!1},{items:i}}return{items:[...e.items,{id:Fn(),kind:"user",text:t.text}]}}return t.role!=="assistant"?{}:{items:[...e.items,{id:Fn(),kind:"assistant",text:"",thinking:"",streaming:!0,firstTokenMs:void 0,totalMs:void 0}]}}case"message_end":{if(t.role!=="assistant")return{};const r=Lh(e.items);if(r<0)return{};const i=e.items.slice();return i[r]={...i[r],streaming:!1},{items:i}}case"message_update":{if(t.delta.kind==="other")return{};const r=Lh(e.items);if(r<0)return{};const i=e.items[r],o=t.delta.kind==="text"?{...i,text:i.text+t.delta.text}:{...i,thinking:i.thinking+t.delta.text},s=e.items.slice();return s[r]=o,{items:s}}case"tool_execution_start":return{items:[...e.items,{id:Fn(),kind:"tool",toolCallId:t.toolCallId,toolName:t.toolName,args:t.args,text:"",status:"running"}]};case"tool_execution_update":return{items:e.items.map(r=>r.kind==="tool"&&r.toolCallId===t.toolCallId?{...r,text:t.partialText??r.text}:r)};case"tool_execution_end":return{items:e.items.map(r=>r.kind==="tool"&&r.toolCallId===t.toolCallId?{...r,text:t.text??r.text,status:t.isError?"error":"ok"}:r)};case"queue_update":return{queueSteering:t.steering,queueFollowUp:t.followUp};case"compaction_start":return{compaction:{reason:t.reason}};case"compaction_end":return{compaction:void 0};case"context_usage":return{contextUsage:{tokens:t.tokens,contextWindow:t.contextWindow,percent:t.percent}};case"assistant_timing":{const r=((n=e.latency)==null?void 0:n.rollingFirstTokenMs)??[],i=t.firstTokenMs==null?r:[...r,t.firstTokenMs].slice(-5),o={lastFirstTokenMs:t.firstTokenMs,lastTotalMs:t.totalMs,rollingFirstTokenMs:i};let s=-1;for(let a=e.items.length-1;a>=0;a--){const c=e.items[a];if(c.kind==="assistant"&&!c.streaming&&c.totalMs===void 0){s=a;break}}if(s<0)return{latency:o};const l=e.items.slice();return l[s]={...l[s],firstTokenMs:t.firstTokenMs,totalMs:t.totalMs},{items:l,latency:o}}default:return{}}}function Lh(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.kind==="assistant"&&n.streaming)return t}return-1}function b3(e,t){const n=Le(d=>d.apply),r=Le(d=>d.pushUser),i=Le(d=>d.reset),o=Le(d=>d.setSwitching),s=Le(d=>d.applyHistory),l=Le(d=>d.switching),a=P.useRef(null),c=P.useRef(null),f=P.useRef(0);return P.useEffect(()=>(st.start(),()=>{}),[]),P.useEffect(()=>st.on(p=>{const h=c.current;if(h&&p.type==="event"&&p.workspaceId===h.expectedWorkspaceId&&p.sessionPath===h.expectedSessionPath){h.buffer.push(p);return}if(p.type==="subscribed"){const g=Le.getState().sessionPath;if(g!==void 0&&g===p.sessionPath)return}n(p)}),[n]),P.useEffect(()=>{if(!e){i();return}t&&o(!0),st.send({type:"subscribe",workspaceId:e,...t?{sessionPath:t.path}:{}})},[e,t,i,o]),P.useEffect(()=>st.onReconnect(()=>{a.current=null}),[]),P.useEffect(()=>{const d=h=>{if(h.type!=="subscribed")return;const g=h.workspaceId,v=h.sessionPath,k=a.current;if(k&&k.wsId===g&&k.sp===v)return;const m=c.current;m&&m.controller.abort(),a.current={wsId:g,sp:v};const x=++f.current,y=new AbortController,w={token:x,expectedWorkspaceId:g,expectedSessionPath:v,controller:y,buffer:[]};c.current=w;const E=st.connectionEpoch,S=v?`?sessionPath=${encodeURIComponent(v)}`:"";de(`/api/workspaces/${g}/history${S}`,{signal:y.signal}).then(T=>{var j;if(((j=c.current)==null?void 0:j.token)!==x)return;const I=()=>{var _;((_=c.current)==null?void 0:_.token)===x&&(c.current=null)};if(st.connectionEpoch!==E){I();return}if(Le.getState().sessionPath!==v){I();return}s(T.items,T.isStreaming),Ja(w),c.current=null}).catch(T=>{var I;(T==null?void 0:T.name)!=="AbortError"&&((I=c.current)==null?void 0:I.token)===x&&(console.error("[useSessionStream] history fetch failed:",T),Ja(w),c.current=null)})},p=st.on(d);return()=>{p();const h=c.current;h&&(h.controller.abort(),c.current=null,Ja(h))}},[s]),P.useMemo(()=>({sendPrompt(d,p){!e||l||(p!=null&&p.skipOptimistic||r(d),st.send({type:"prompt",message:d}))},abort(){e&&st.send({type:"abort"})},newSession(){e&&(o(!0),st.send({type:"new_session",workspaceId:e}))},fork(d){e&&(o(!0),st.send({type:"fork",workspaceId:e,entryId:d}))}}),[e,r,o,l])}function Ja(e){const{expectedWorkspaceId:t,expectedSessionPath:n,buffer:r}=e;for(const i of r)i.type==="event"&&i.workspaceId===t&&i.sessionPath===n&&Le.getState().apply(i)}function k3({workspaceId:e,rightPanel:t,onToggleConfig:n,onToggleResources:r}){const i=Le(E=>E.items),o=Le(E=>E.running),s=Le(E=>E.switching),l=Le(E=>E.sessionPath),[a,c]=P.useState(void 0),{sendPrompt:f,abort:d,newSession:p,fork:h}=b3(e,a),g=Ed(e).data,v=P.useMemo(()=>_3(g),[g]),k=P.useCallback(E=>{const S=L3(E,v);f(E,{skipOptimistic:S})},[f,v]),m=P.useCallback(E=>{c(S=>({path:E,nonce:((S==null?void 0:S.nonce)??0)+1}))},[]),x=P.useRef(null),[y,w]=P.useState(0);return P.useLayoutEffect(()=>{const E=x.current;if(!E)return;w(E.getBoundingClientRect().height);const S=new ResizeObserver(T=>{const I=T[0];I&&w(I.contentRect.height)});return S.observe(E),()=>S.disconnect()},[e]),e?u.jsxs("main",{className:"relative flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-clip bg-background",children:[u.jsx(w3,{workspaceId:e,sessionPath:l,running:o,switching:s,onSelectSession:m,onNewSession:p,onFork:h,rightPanel:t,onToggleConfig:n,onToggleResources:r}),u.jsx(S3,{}),u.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[u.jsx(j3,{items:i,running:o,bottomPad:y}),u.jsx("div",{ref:x,className:"pointer-events-none absolute inset-x-0 bottom-0 z-20 flex flex-col",children:u.jsx(z3,{workspaceId:e,onSend:k,onAbort:d,running:o,disabled:s})})]})]}):u.jsx("main",{className:"relative flex flex-1 items-center justify-center bg-background",children:u.jsx(Xy,{title:"Ready when you are.",tagline:"Pick or add a workspace from the left to begin a session."})})}function w3({workspaceId:e,sessionPath:t,running:n,switching:r,onSelectSession:i,onNewSession:o,onFork:s,rightPanel:l,onToggleConfig:a,onToggleResources:c}){const f=Le(h=>{var g;return(g=h.contextUsage)==null?void 0:g.percent}),{data:d}=Nx(e,t),p=f!=null?Math.round(f):null;return u.jsx("header",{className:"relative z-20 shrink-0 border-b border-border bg-popover",children:u.jsxs("div",{className:"flex items-center gap-2 px-4 py-[10px]",children:[u.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[u.jsx(DE,{workspaceId:e,sessionPath:t,disabled:n||r,onSelect:i,onNewSession:o,onFork:s}),n&&u.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-[11.5px] text-brand",children:[u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-brand",style:{animation:"v2-pulse 1.6s ease-in-out infinite"}}),u.jsx("span",{children:"thinking…"})]})]}),u.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[(d==null?void 0:d.currentModel)&&u.jsx(ir,{tone:"ghost",className:"hidden md:inline-flex",title:d.currentModel.modelId,children:u.jsx("span",{className:"max-w-[180px] truncate text-foreground",children:d.currentModel.name})}),(d==null?void 0:d.currentModel)&&p!=null&&u.jsx("span",{"aria-hidden":!0,className:"hidden h-4 w-px bg-border md:inline-block"}),p!=null&&u.jsxs(ir,{tone:"ghost",className:"hidden md:inline-flex",title:`Context · ${p}%`,children:[u.jsx("span",{className:"text-muted-foreground",children:"Context"}),u.jsxs("span",{className:"font-mono text-[11px] tabular-nums text-foreground",children:[p,"%"]}),u.jsx("span",{className:"inline-block h-1 w-[22px] overflow-hidden rounded-full bg-border-soft",children:u.jsx("span",{className:"block h-full bg-brand",style:{width:`${Math.min(100,p)}%`}})})]}),(c||a)&&u.jsx("span",{"aria-hidden":!0,className:"hidden h-4 w-px bg-border md:inline-block"}),c&&u.jsx(Ko,{active:l==="resources",onClick:c,title:"Resources",children:u.jsx(Ob,{className:"h-3.5 w-3.5"})}),a&&u.jsx(Ko,{active:l==="config",onClick:a,title:"Configuration",children:u.jsx(Lx,{className:"h-3.5 w-3.5"})})]})]})})}function S3(){const e=Le(n=>n.compaction),t=Le(n=>{var r;return(r=n.contextUsage)==null?void 0:r.percent});return e?u.jsxs("div",{className:"relative z-10 flex shrink-0 items-center gap-3 border-b border-border bg-signal-warn/[0.10] px-4 py-2 text-[12.5px] text-signal-warn",children:[u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",style:{animation:"v2-spin 1.4s linear infinite"},children:u.jsx("circle",{cx:"7",cy:"7",r:"5",stroke:"currentColor",strokeWidth:"1.4",strokeDasharray:"3 3"})}),u.jsx("span",{className:"flex-1",children:C3(e)}),t!=null&&u.jsxs("span",{className:"font-mono text-[11px] tabular-nums",children:["Context ",Math.round(t),"%"]})]}):null}function C3(e){switch(e.reason){case"manual":return"Compacting context (manual)…";case"threshold":return"Compacting context — threshold reached";case"overflow":return"Compacting context (overflow) — will retry the prompt";default:return"Compacting context…"}}function j3({items:e,running:t,bottomPad:n}){const r=P.useRef(null),i=P.useRef(!0),o=P.useCallback(()=>{const l=r.current;l&&(i.current=l.scrollHeight-l.scrollTop-l.clientHeight<30)},[]);P.useEffect(()=>{const l=r.current;!l||!i.current||(l.scrollTop=l.scrollHeight)},[e,t]),P.useEffect(()=>{const l=r.current;!l||!i.current||(l.scrollTop=l.scrollHeight)},[n]);const s=e.length===0&&!t;return u.jsx("div",{ref:r,onScroll:o,className:U("relative z-10 min-h-0 flex-1 overflow-y-auto overflow-x-hidden overscroll-contain",s?"flex items-center justify-center":"pt-4"),style:s?void 0:{maskImage:"linear-gradient(to bottom, black calc(100% - 56px), transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black calc(100% - 56px), transparent 100%)"},children:s?u.jsx(Xy,{title:"Ready when you are.",tagline:"Send a message to brief your co-pilot. Enter submits, Shift+Enter inserts a newline.",hint:{keys:["⏎"],label:"Send"}}):u.jsx("div",{className:"mx-auto flex w-full max-w-[760px] flex-col gap-[18px] px-6",style:{paddingBottom:n},children:(()=>{const l=c3(e),a=p3(l);return l.flatMap(c=>{if(c.kind==="single")return[u.jsx(N3,{item:c.item,isCurrentPlan:c.item.id===a},c.item.id)];const f=`group:${c.items[0].id}`;return[u.jsx(E3,{group:c},f)]})})()})})}function N3({item:e,isCurrentPlan:t}){return e.kind==="user"?u.jsx(P3,{item:e}):e.kind==="assistant"?u.jsx(T3,{item:e}):e.kind==="tool"||e.kind==="bash"?u.jsx("div",{className:"pl-10",children:u.jsx(Gy,{item:e,isCurrentPlan:t})}):null}function E3({group:e}){return u.jsx("div",{className:"pl-10",children:u.jsx(YE,{items:e.items})})}function P3({item:e}){return u.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[u.jsx("div",{className:"max-w-[78%] rounded-[14px] rounded-br-[4px] border border-brand/[0.22] bg-brand/[0.08] px-3.5 py-2.5 text-[14px] leading-[1.55] text-foreground [overflow-wrap:anywhere]",children:u.jsx(Qy,{text:e.text})}),u.jsx(Cc,{children:"You"})]})}function T3({item:e}){return!e.text&&!e.thinking&&!e.streaming?null:u.jsxs("div",{className:"flex gap-3",children:[u.jsx(Jd,{size:28,filled:!0}),u.jsxs("div",{className:"min-w-0 flex-1 pt-0.5 [overflow-wrap:anywhere]",children:[u.jsxs("div",{className:"mb-1 flex items-baseline gap-2",children:[u.jsx("span",{className:"text-[13px] font-medium tracking-[-0.005em] text-foreground",children:"Pilot"}),!e.streaming&&typeof e.firstTokenMs=="number"&&u.jsx(Cc,{className:U(HE(e.firstTokenMs)),title:e.totalMs!=null?`first token ${Ya(e.firstTokenMs)} · total ${Ya(e.totalMs)}`:void 0,children:Ya(e.firstTokenMs)}),e.streaming&&u.jsx(Cc,{className:"text-brand",children:"streaming…"})]}),e.thinking&&u.jsxs("details",{className:"mb-2 text-muted-foreground",children:[u.jsx("summary",{className:"cursor-pointer select-none text-[12px] text-muted-foreground hover:text-foreground",children:"Thinking"}),u.jsx("pre",{className:"mt-1.5 whitespace-pre-wrap rounded-md border border-border-soft bg-muted px-3 py-2 font-mono text-[11.5px] leading-relaxed text-muted-foreground",children:e.thinking})]}),u.jsx(Qy,{text:e.text,streaming:e.streaming})]})]})}function Cc({children:e,className:t,title:n}){return u.jsx("span",{title:n,className:U("text-[11px] tracking-[-0.005em] text-muted-foreground",t),children:e})}function Xy({title:e,tagline:t,hint:n}){return u.jsxs("div",{className:"relative z-10 flex max-w-[480px] flex-col items-center px-8 text-center",children:[u.jsx(Jd,{size:56,filled:!0}),u.jsx("h2",{className:"mt-5 font-serif text-[36px] italic font-normal leading-[1.05] tracking-[-0.02em] text-foreground",children:e}),u.jsx("p",{className:"mt-2 text-[14.5px] leading-[1.6] tracking-[-0.005em] text-muted-foreground",children:t}),n&&u.jsxs("div",{className:"mt-6 inline-flex items-center gap-2 rounded-[10px] border border-border bg-card px-3.5 py-2 text-[12.5px] text-muted-foreground",children:[n.keys.map(r=>u.jsx(Kn,{children:r},r)),u.jsx("span",{children:n.label})]})]})}function Rh(e,t){if(t<=0)return null;const n=e.slice(0,t),r=/(?:^|\s)([/@])(\S*)$/.exec(n);if(!r)return null;const i=r[1]??"",o=r[2]??"",s=(r.index??0)+(r[0].length-1-o.length);return{kind:i==="/"?"slash":"at",tokenStart:s,query:o}}function I3(e){const t=[],n=/(^|\s)([/@])(\S+)/g;let r;for(;(r=n.exec(e))!==null;){const i=r[1]??"",o=r[2]??"",s=r[3]??"",l=(r.index??0)+i.length,a=l+1+s.length;t.push({kind:o==="/"?"slash":"at",start:l,end:a,body:e.slice(l,a)})}return t}const Ah=50;function _3(e){const t=new Set;if(!e)return t;for(const n of e.extensions)for(const r of n.commands)t.add(r);return t}function L3(e,t){if(t.size===0||!e.startsWith("/"))return!1;const n=e.slice(1),r=n.search(/\s/),i=r===-1?n:n.slice(0,r);return t.has(i)}function R3(e,t){if(!e)return[];const n=t.toLowerCase(),r=[];for(const i of e.skills)n&&!i.name.toLowerCase().includes(n)||r.push({key:`skill:${i.filePath}`,label:`/skill:${i.name}`,description:i.description||void 0,insertText:`/skill:${i.name} `});for(const i of e.prompts)n&&!i.name.toLowerCase().includes(n)||r.push({key:`prompt:${i.filePath}`,label:`/${i.name}`,description:i.argumentHint?`${i.description??"prompt"} · ${i.argumentHint}`:i.description||"prompt",insertText:`/${i.name} `});for(const i of e.extensions)for(const o of i.commands)n&&!o.toLowerCase().includes(n)||r.push({key:`cmd:${i.resolvedPath}:${o}`,label:`/${o}`,description:`extension · ${i.source.label}`,insertText:`/${o} `});return r.length>Ah?r.slice(0,Ah):r}function A3(e){return e?e.entries.map(t=>({key:t.path,label:t.relPath,insertText:`@${t.relPath} `})):[]}function z3({workspaceId:e,onSend:t,onAbort:n,running:r,disabled:i}){var re;const[o,s]=P.useState(""),[l,a]=P.useState(0),[c,f]=P.useState(!1),[d,p]=P.useState(0),[h,g]=P.useState(null),v=P.useRef(null),k=P.useRef(!1),m=P.useRef(0),x=P.useMemo(()=>Rh(o,l),[o,l]),y=x==null?void 0:x.kind,w=(x==null?void 0:x.query)??"",E=Ed(y==="slash"?e:void 0),S=Vb(e,y==="at"?w:"",y==="at"),T=P.useMemo(()=>y?y==="slash"?R3(E.data,w):A3(S.data):[],[y,w,E.data,S.data]),I=x?`${x.kind}:${x.tokenStart}:${x.query}`:null,R=!!x&&T.length>0&&h!==I;P.useEffect(()=>{p(0)},[I]),P.useEffect(()=>{h&&h!==I&&g(null)},[I,h]),P.useCallback(()=>{const Q=v.current;Q&&a(Q.selectionStart??0)},[]);const j=()=>{if(i)return;const Q=o.trim();Q&&(t(Q),s(""),a(0))},_=Q=>{const z=v.current,B=(z==null?void 0:z.value)??o,b=(z==null?void 0:z.selectionStart)??l,K=Rh(B,b);if(!K)return;const le=K.tokenStart+1+K.query.length,N=B.slice(0,K.tokenStart),ve=B.slice(le),He=`${N}${Q.insertText}${ve}`,V=K.tokenStart+Q.insertText.length;s(He),a(V),g(null),requestAnimationFrame(()=>{const ze=v.current;ze&&(ze.focus(),ze.setSelectionRange(V,V))})},A=()=>{k.current=!0},W=()=>{k.current=!1,m.current=performance.now()},Y=Q=>{if(!(k.current||Q.nativeEvent.isComposing||Q.nativeEvent.keyCode===229)&&!(Q.key==="Enter"&&performance.now()-m.current<200)){if(R){if(Q.key==="ArrowDown"){Q.preventDefault(),p(z=>(z+1)%T.length);return}if(Q.key==="ArrowUp"){Q.preventDefault(),p(z=>(z-1+T.length)%T.length);return}if(Q.key==="Enter"||Q.key==="Tab"){Q.preventDefault();const z=T[d]??T[0];z&&_(z);return}if(Q.key==="Escape"){Q.preventDefault(),I&&g(I);return}}Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),j())}},H=i?"Switching session…":r?"Agent is running…":"Write a message…";return u.jsx("div",{className:"relative shrink-0 pb-5 pt-3",children:u.jsxs("div",{className:"pointer-events-auto mx-auto w-full max-w-[760px] px-6",children:[u.jsxs("div",{className:U("relative rounded-[14px] border bg-card transition-shadow",c?"border-brand/[0.22] shadow-[0_2px_18px_-6px_hsl(var(--brand)/0.18),0_0_0_3px_hsl(var(--brand)/0.08)]":"border-border shadow-[0_2px_14px_-6px_hsl(var(--foreground)/0.10),0_1px_3px_-1px_hsl(var(--foreground)/0.06)]"),children:[R&&x&&u.jsx(O3,{kind:x.kind,query:x.query,items:T,selectedIdx:d,loading:x.kind==="slash"?E.isPending:S.isPending,truncated:x.kind==="at"?!!((re=S.data)!=null&&re.truncated):!1,onPick:_,onHover:p}),u.jsx(F3,{textareaRef:v,text:o,onTextChange:(Q,z)=>{s(Q),a(z)},onCaretChange:a,onFocus:()=>f(!0),onBlur:()=>f(!1),onKeyDown:Y,onCompositionStart:A,onCompositionEnd:W,disabled:i,placeholder:H}),u.jsx("div",{className:"absolute bottom-2 right-2 z-10",children:r?u.jsx("button",{type:"button",onClick:n,disabled:i,title:"Stop streaming",className:"inline-flex h-7 w-7 items-center justify-center rounded-full bg-signal-error/[0.12] text-signal-error transition-colors hover:bg-signal-error/[0.18] disabled:opacity-50 ring-brand-focus",children:u.jsx(qb,{className:"h-3 w-3",fill:"currentColor"})}):u.jsx("button",{type:"button",onClick:j,disabled:i||!o.trim(),title:"Send",className:"inline-flex h-7 w-7 items-center justify-center rounded-full bg-brand text-[hsl(var(--brand-foreground))] transition-colors hover:bg-brand-strong disabled:cursor-not-allowed disabled:bg-border-soft disabled:text-muted-foreground ring-brand-focus",children:u.jsx(Px,{className:"h-3.5 w-3.5",strokeWidth:2.5})})})]}),u.jsxs("div",{className:"mt-1.5 flex items-center justify-center gap-2 text-[11.5px] text-muted-foreground",children:[u.jsx(Kn,{children:"⏎"}),u.jsx("span",{children:"send"}),u.jsx("span",{className:"text-muted-foreground/50",children:"·"}),u.jsx(Kn,{children:"⇧⏎"}),u.jsx("span",{children:"newline"}),u.jsx("span",{className:"text-muted-foreground/50",children:"·"}),u.jsx(Kn,{children:"/"}),u.jsx("span",{children:"commands"}),u.jsx("span",{className:"text-muted-foreground/50",children:"·"}),u.jsx(Kn,{children:"@"}),u.jsx("span",{children:"files"})]})]})})}const zh="block max-h-[180px] min-h-[44px] w-full resize-none pl-4 pr-12 pt-3 pb-3 font-sans text-[14px] leading-[1.55] tracking-[-0.005em] whitespace-pre-wrap break-words",Fh=180;function F3({textareaRef:e,text:t,onTextChange:n,onCaretChange:r,onFocus:i,onBlur:o,onKeyDown:s,onCompositionStart:l,onCompositionEnd:a,disabled:c,placeholder:f}){const d=P.useRef(null),[p,h]=P.useState(!1),g=P.useMemo(()=>I3(t),[t]),v=P.useCallback(()=>{const E=e.current;E&&r(E.selectionStart??0)},[e,r]),k=P.useCallback(()=>{const E=e.current,S=d.current;!E||!S||(S.scrollTop=E.scrollTop,S.scrollLeft=E.scrollLeft)},[e,d]);P.useLayoutEffect(()=>{const E=e.current;if(!E)return;E.style.height="auto";const S=Math.min(E.scrollHeight,Fh);E.style.height=`${S}px`,E.style.overflowY=E.scrollHeight>Fh?"auto":"hidden",k()},[t,e,k]);const m=P.useMemo(()=>D3(t,g),[t,g]),y=g.length>0,w=p?"text-transparent":"text-foreground";return u.jsxs("div",{className:"relative",children:[y&&u.jsxs("div",{ref:d,"aria-hidden":!0,className:U(zh,"pointer-events-none absolute inset-0 overflow-hidden whitespace-pre-wrap"),children:[m.map((E,S)=>E.kind==="text"?u.jsx("span",{className:w,children:E.text},S):u.jsx(M3,{body:E.text,hideText:p},S)),"​"]}),u.jsx("textarea",{ref:e,value:t,onChange:E=>n(E.target.value,E.target.selectionStart??E.target.value.length),onSelect:v,onClick:v,onKeyUp:v,onScroll:k,onCompositionStart:()=>{h(!0),l==null||l()},onCompositionEnd:()=>{h(!1),a==null||a()},onFocus:i,onBlur:o,onKeyDown:s,disabled:c,placeholder:f,spellCheck:!1,autoCorrect:"off",rows:1,className:U(zh,"relative bg-transparent caret-foreground placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-60",y&&!p?"text-transparent selection:text-transparent selection:bg-brand/20":"text-foreground")})]})}function D3(e,t){if(t.length===0)return[{kind:"text",text:e}];const n=[];let r=0;for(const i of t)i.start>r&&n.push({kind:"text",text:e.slice(r,i.start)}),n.push({kind:i.kind,text:e.slice(i.start,i.end)}),r=i.end;return r<e.length&&n.push({kind:"text",text:e.slice(r)}),n}function M3({body:e,hideText:t=!1}){return u.jsx("span",{className:U("inline rounded-[3px] bg-brand/[0.08] [box-decoration-break:clone] [-webkit-box-decoration-break:clone]",t?"text-transparent":"text-brand"),children:e})}function O3({kind:e,query:t,items:n,selectedIdx:r,loading:i,truncated:o,onPick:s,onHover:l}){const a=P.useRef(null);P.useEffect(()=>{const d=a.current;if(!d)return;const p=d.querySelector(`[data-idx="${r}"]`);p==null||p.scrollIntoView({block:"nearest"})},[r]);const c=e==="slash"?"Commands":"Files",f=t?`"${t}"`:"";return u.jsxs("div",{className:"absolute bottom-full left-0 right-0 z-30 mb-2 overflow-hidden rounded-[10px] border border-border bg-popover shadow-panel",children:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border-soft bg-muted px-3 py-2 text-[11.5px] text-muted-foreground",children:[u.jsxs("span",{children:[u.jsx("span",{className:"font-medium text-foreground",children:c}),f&&u.jsx("span",{className:"ml-1.5 font-mono text-muted-foreground",children:f})]}),u.jsx("span",{className:"font-mono text-[10.5px] tabular-nums",children:i?"…":`${n.length}${o?"+":""}`})]}),u.jsx("div",{ref:a,className:"max-h-64 overflow-y-auto py-1",children:n.map((d,p)=>{const h=p===r;return u.jsxs("button",{type:"button","data-idx":p,onMouseDown:g=>{g.preventDefault(),s(d)},onMouseEnter:()=>l(p),className:U("flex w-full flex-col gap-0.5 px-3 py-1.5 text-left text-[12.5px] transition-colors",h?"bg-brand/[0.08] text-foreground":"hover:bg-accent/60"),children:[u.jsx("span",{className:"truncate font-mono text-foreground",children:d.label}),d.description&&u.jsx("span",{className:U("truncate text-[11px]",h?"text-brand-strong":"text-muted-foreground"),children:d.description})]},d.key)})}),u.jsxs("div",{className:"flex items-center gap-2 border-t border-border-soft bg-muted px-3 py-1.5 text-[11px] text-muted-foreground",children:[u.jsx(Kn,{children:"↑↓"}),"nav",u.jsx(Kn,{children:"⏎"}),"insert",u.jsx(Kn,{children:"Esc"}),"dismiss"]})]})}const Wi=["model-configs"];function $3(){return rn({queryKey:Wi,queryFn:()=>de("/api/model-configs")})}function B3(e){const t=Pe(),n=e?`?workspaceId=${encodeURIComponent(e)}`:"";return Oe({mutationFn:r=>de(`/api/model-configs/providers${n}`,{method:"POST",body:JSON.stringify(r)}),onSuccess:()=>{t.invalidateQueries({queryKey:Wi}),t.invalidateQueries({queryKey:["config"]})}})}function U3(e){const t=Pe(),n=e?`?workspaceId=${encodeURIComponent(e)}`:"";return Oe({mutationFn:r=>de(`/api/model-configs/providers?name=${encodeURIComponent(r)}${n?"&"+n.slice(1):""}`,{method:"DELETE"}),onSuccess:()=>{t.invalidateQueries({queryKey:Wi}),t.invalidateQueries({queryKey:["config"]})}})}function H3(e){const t=Pe(),n=e?`?workspaceId=${encodeURIComponent(e)}`:"";return Oe({mutationFn:({provider:r,model:i})=>de(`/api/model-configs/providers/${encodeURIComponent(r)}/models${n}`,{method:"POST",body:JSON.stringify({model:i})}),onSuccess:()=>{t.invalidateQueries({queryKey:Wi}),t.invalidateQueries({queryKey:["config"]})}})}function q3(e){const t=Pe(),n=e?`?workspaceId=${encodeURIComponent(e)}`:"";return Oe({mutationFn:({provider:r,modelId:i,model:o})=>de(`/api/model-configs/providers/${encodeURIComponent(r)}/models/${encodeURIComponent(i)}${n}`,{method:"PUT",body:JSON.stringify({model:o})}),onSuccess:()=>{t.invalidateQueries({queryKey:Wi}),t.invalidateQueries({queryKey:["config"]})}})}function Q3(e){const t=Pe(),n=e?`?workspaceId=${encodeURIComponent(e)}`:"";return Oe({mutationFn:({provider:r,modelId:i})=>de(`/api/model-configs/providers/${encodeURIComponent(r)}/models/${encodeURIComponent(i)}${n}`,{method:"DELETE"}),onSuccess:()=>{t.invalidateQueries({queryKey:Wi}),t.invalidateQueries({queryKey:["config"]})}})}const Dh=["anthropic-messages","openai-completions","openai-responses","azure-openai-responses","openai-codex-responses","mistral-conversations","bedrock-converse-stream","google-generative-ai","google-vertex"];function V3({workspaceId:e,open:t,onClose:n}){return t?u.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50",children:u.jsxs("div",{className:"flex max-h-[85vh] w-[600px] max-w-[90vw] flex-col overflow-hidden rounded-md border border-border bg-card shadow-panel",children:[u.jsx(W3,{onClose:n}),u.jsx(K3,{workspaceId:e})]})}):null}function W3({onClose:e}){return u.jsxs("header",{className:"flex items-center justify-between border-b border-border-soft px-4 py-3",children:[u.jsx("span",{className:"font-mono text-[11px] font-semibold uppercase tracking-[0.2em] text-brand",children:"Model Configuration"}),u.jsx("button",{type:"button",onClick:e,className:"rounded-[2px] p-1 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground","aria-label":"Close",children:u.jsx(Ui,{className:"h-4 w-4"})})]})}function K3({workspaceId:e}){const{data:t,isLoading:n,error:r}=$3(),[i,o]=P.useState(null),[s,l]=P.useState(!1),[a,c]=P.useState(null),[f,d]=P.useState(null);if(n)return u.jsxs("div",{className:"flex items-center justify-center py-8",children:[u.jsx(Vt,{className:"h-4 w-4 animate-spin text-muted-foreground"}),u.jsx("span",{className:"ml-2 font-mono text-[10px] uppercase tracking-[0.16em] text-muted-foreground",children:"Loading..."})]});if(r||!t)return u.jsx("p",{className:"m-4 border border-signal-rose/40 bg-signal-rose/10 px-3 py-2 text-center font-mono text-[11px] text-signal-rose",children:(r==null?void 0:r.message)??"Failed to load model config"});const p=t.config.providers;return i?u.jsx(Mh,{workspaceId:e,initialName:i.name,initialConfig:i.config,onDone:()=>o(null)}):s?u.jsx(Mh,{workspaceId:e,initialName:"",initialConfig:null,onDone:()=>l(!1)}):a?u.jsx(Oh,{workspaceId:e,provider:a.provider,initialModel:a.model,onDone:()=>c(null)}):f?u.jsx(Oh,{workspaceId:e,provider:f,initialModel:null,onDone:()=>d(null)}):u.jsxs("div",{className:"flex-1 overflow-y-auto",children:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 px-4 py-2",children:[u.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-[0.16em] text-muted-foreground",children:["Providers (",Object.keys(p).length,")"]}),u.jsxs("button",{type:"button",onClick:()=>l(!0),className:"flex items-center gap-1 rounded-[2px] px-2 py-1 font-mono text-[10px] uppercase tracking-[0.12em] text-brand transition-colors hover:bg-brand/10",children:[u.jsx(Gl,{className:"h-3 w-3"})," Add Provider"]})]}),Object.keys(p).length===0&&u.jsx("p",{className:"px-4 py-6 text-center font-mono text-[11px] text-muted-foreground",children:'No providers configured. Click "Add Provider" to get started.'}),Object.entries(p).map(([h,g])=>u.jsx(G3,{name:h,config:g,workspaceId:e,onEditProvider:()=>o({name:h,config:g}),onEditModel:v=>c({provider:h,model:v}),onAddModel:()=>d(h)},h))]})}function G3({name:e,config:t,workspaceId:n,onEditProvider:r,onEditModel:i,onAddModel:o}){const[s,l]=P.useState(!0),a=U3(n),c=Q3(n),f=cs();return u.jsxs("div",{className:"border-b border-border/30",children:[u.jsxs("div",{className:"flex items-center gap-1 px-4 py-2",children:[u.jsx("button",{type:"button",onClick:()=>l(d=>!d),className:"p-0.5 text-muted-foreground hover:text-foreground",children:s?u.jsx(cr,{className:"h-3 w-3"}):u.jsx(Nd,{className:"h-3 w-3"})}),u.jsx("span",{className:"flex-1 font-mono text-[12px] font-semibold text-foreground",children:e}),u.jsx("span",{className:"font-mono text-[9px] uppercase text-muted-foreground",children:t.api}),u.jsx("button",{type:"button",onClick:r,className:"rounded-[2px] p-1 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Edit provider",children:u.jsx(lc,{className:"h-3 w-3"})}),u.jsx("button",{type:"button",onClick:async()=>{await f({title:"Delete provider",message:`Delete provider "${e}" and all its models?`,confirmLabel:"Delete",variant:"danger"})&&a.mutate(e)},className:"rounded-[2px] p-1 text-muted-foreground hover:bg-signal-rose/10 hover:text-signal-rose",title:"Delete provider",children:u.jsx(Qo,{className:"h-3 w-3"})})]}),s&&u.jsxs("div",{className:"pb-2 pl-8 pr-4",children:[u.jsxs("div",{className:"mb-1 font-mono text-[9px] uppercase tracking-[0.12em] text-muted-foreground",children:["Base URL: ",u.jsx("span",{className:"text-foreground/70",children:t.baseUrl})]}),t.models.length===0&&u.jsx("p",{className:"py-1 font-mono text-[10px] text-muted-foreground",children:"No models."}),t.models.map(d=>u.jsxs("div",{className:"flex items-center gap-2 rounded-[2px] px-2 py-1 transition-colors hover:bg-muted/50",children:[u.jsx("span",{className:"flex-1 font-mono text-[11px] text-foreground",children:d.name}),u.jsx("span",{className:"font-mono text-[9px] text-muted-foreground",children:d.id}),d.reasoning&&u.jsx("span",{className:"rounded-sm bg-brand/10 px-1 py-0.5 font-mono text-[8px] uppercase text-brand",children:"reasoning"}),u.jsx("button",{type:"button",onClick:()=>i(d),className:"rounded-[2px] p-0.5 text-muted-foreground hover:text-foreground",title:"Edit model",children:u.jsx(lc,{className:"h-2.5 w-2.5"})}),u.jsx("button",{type:"button",onClick:async()=>{await f({title:"Delete model",message:`Delete model "${d.name}"?`,confirmLabel:"Delete",variant:"danger"})&&c.mutate({provider:e,modelId:d.id})},className:"rounded-[2px] p-0.5 text-muted-foreground hover:text-signal-rose",title:"Delete model",children:u.jsx(Qo,{className:"h-2.5 w-2.5"})})]},d.id)),u.jsxs("button",{type:"button",onClick:o,className:"mt-1 flex items-center gap-1 font-mono text-[10px] text-brand/70 transition-colors hover:text-brand",children:[u.jsx(Gl,{className:"h-2.5 w-2.5"})," Add Model"]})]})]})}function Mh({workspaceId:e,initialName:t,initialConfig:n,onDone:r}){var E,S;const i=!!n,[o,s]=P.useState(t),[l,a]=P.useState((n==null?void 0:n.baseUrl)??""),[c,f]=P.useState(n!=null&&n.api&&!Dh.includes(n.api)?"__custom__":(n==null?void 0:n.api)??"anthropic-messages"),[d,p]=P.useState(n!=null&&n.api&&!Dh.includes(n.api)?n.api:""),[h,g]=P.useState((n==null?void 0:n.apiKey)??""),[v,k]=P.useState(((E=n==null?void 0:n.compat)==null?void 0:E.forceAdaptiveThinking)===!0),m=B3(e),[x,y]=P.useState(null),w=T=>{T.preventDefault(),y(null);const I=c==="__custom__"?d:c;if(!I){y("API type is required.");return}const R={baseUrl:l,api:I,apiKey:h,...v?{compat:{forceAdaptiveThinking:!0}}:{},models:(n==null?void 0:n.models)??[]};m.mutate({name:o,provider:R},{onSuccess:()=>r()})};return u.jsxs("form",{onSubmit:w,className:"flex flex-1 flex-col overflow-y-auto",children:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 px-4 py-2",children:[u.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.16em] text-muted-foreground",children:i?"Edit Provider":"New Provider"}),u.jsx("button",{type:"button",onClick:r,className:"font-mono text-[10px] text-muted-foreground hover:text-foreground",children:"Cancel"})]}),u.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[u.jsx(Je,{label:"Name",required:!0,children:u.jsx("input",{value:o,onChange:T=>s(T.target.value),placeholder:"e.g. my-provider",disabled:i,className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40 disabled:opacity-50",required:!0})}),u.jsx(Je,{label:"Base URL",required:!0,children:u.jsx("input",{value:l,onChange:T=>a(T.target.value),placeholder:"https://api.example.com",className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40",required:!0})}),u.jsxs(Je,{label:"API Type",required:!0,children:[u.jsxs("select",{value:c,onChange:T=>f(T.target.value),className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40",children:[u.jsx("option",{value:"anthropic-messages",children:"anthropic-messages"}),u.jsx("option",{value:"openai-completions",children:"openai-completions"}),u.jsx("option",{value:"openai-responses",children:"openai-responses"}),u.jsx("option",{value:"azure-openai-responses",children:"azure-openai-responses"}),u.jsx("option",{value:"openai-codex-responses",children:"openai-codex-responses"}),u.jsx("option",{value:"mistral-conversations",children:"mistral-conversations"}),u.jsx("option",{value:"bedrock-converse-stream",children:"bedrock-converse-stream"}),u.jsx("option",{value:"google-generative-ai",children:"google-generative-ai"}),u.jsx("option",{value:"google-vertex",children:"google-vertex"}),u.jsx("option",{value:"__custom__",children:"Custom..."})]}),c==="__custom__"&&u.jsx("input",{value:d,onChange:T=>p(T.target.value),placeholder:"custom-api-type",className:"mt-1.5 w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40",required:!0})]}),u.jsx(Je,{label:"API Key",required:!0,children:u.jsx("input",{type:"password",value:h,onChange:T=>g(T.target.value),placeholder:"sk-...",className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40",required:!0})}),u.jsxs("label",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"checkbox",checked:v,onChange:T=>k(T.target.checked),className:"h-3 w-3 accent-[hsl(var(--brand))]"}),u.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:"Force Adaptive Thinking"})]})]}),u.jsxs("div",{className:"flex justify-end gap-2 border-t border-border/50 px-4 py-3",children:[u.jsx("button",{type:"button",onClick:r,className:"rounded-[2px] border border-border-soft px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-muted-foreground hover:text-foreground",children:"Cancel"}),u.jsx("button",{type:"submit",disabled:m.isPending,className:"rounded-[2px] bg-brand/10 px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-brand hover:bg-brand/20 disabled:opacity-50",children:m.isPending?"Saving...":i?"Update":"Create"})]}),(x||m.isError)&&u.jsx("p",{className:"mx-4 mb-3 font-mono text-[10px] text-signal-rose",children:x??((S=m.error)==null?void 0:S.message)})]})}function Oh({workspaceId:e,provider:t,initialModel:n,onDone:r}){var B,b,K,le,N,ve,He;const i=!!n,[o,s]=P.useState((n==null?void 0:n.id)??""),[l,a]=P.useState((n==null?void 0:n.name)??""),[c,f]=P.useState((n==null?void 0:n.reasoning)??!0),[d,p]=P.useState(String((n==null?void 0:n.contextWindow)??2e5)),[h,g]=P.useState(String((n==null?void 0:n.maxTokens)??32e3)),[v,k]=P.useState(String(((B=n==null?void 0:n.cost)==null?void 0:B.input)??0)),[m,x]=P.useState(String(((b=n==null?void 0:n.cost)==null?void 0:b.output)??0)),[y,w]=P.useState(String(((K=n==null?void 0:n.cost)==null?void 0:K.cacheRead)??0)),[E,S]=P.useState(String(((le=n==null?void 0:n.cost)==null?void 0:le.cacheWrite)??0)),[T,I]=P.useState(((N=n==null?void 0:n.thinkingLevelMap)==null?void 0:N.high)??"high"),[R,j]=P.useState(((ve=n==null?void 0:n.thinkingLevelMap)==null?void 0:ve.xhigh)??"max"),[_,A]=P.useState(n!=null&&n.headers?JSON.stringify(n.headers,null,2):""),W=H3(e),Y=q3(e),H=i?Y:W,[re,Q]=P.useState(null),z=V=>{V.preventDefault(),Q(null);let ze;if(_.trim())try{ze=JSON.parse(_)}catch{Q("Headers must be valid JSON.");return}const zt={id:o,name:l,reasoning:c,input:["text"],contextWindow:Number(d),maxTokens:Number(h),cost:{input:Number(v),output:Number(m),cacheRead:Number(y),cacheWrite:Number(E)},...c?{thinkingLevelMap:{high:T,xhigh:R}}:{},...ze?{headers:ze}:{}};i?Y.mutate({provider:t,modelId:n.id,model:zt},{onSuccess:()=>r()}):W.mutate({provider:t,model:zt},{onSuccess:()=>r()})};return u.jsxs("form",{onSubmit:z,className:"flex flex-1 flex-col overflow-y-auto",children:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 px-4 py-2",children:[u.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-[0.16em] text-muted-foreground",children:[i?"Edit Model":"New Model"," · ",t]}),u.jsx("button",{type:"button",onClick:r,className:"font-mono text-[10px] text-muted-foreground hover:text-foreground",children:"Cancel"})]}),u.jsxs("div",{className:"flex flex-col gap-3 overflow-y-auto p-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(Je,{label:"Model ID",required:!0,children:u.jsx("input",{value:o,onChange:V=>s(V.target.value),placeholder:"claude-opus-4-7",disabled:i,className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40 disabled:opacity-50",required:!0})}),u.jsx(Je,{label:"Display Name",required:!0,children:u.jsx("input",{value:l,onChange:V=>a(V.target.value),placeholder:"Claude Opus 4.7",className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40",required:!0})})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(Je,{label:"Context Window",children:u.jsx("input",{type:"number",value:d,onChange:V=>p(V.target.value),className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40"})}),u.jsx(Je,{label:"Max Tokens",children:u.jsx("input",{type:"number",value:h,onChange:V=>g(V.target.value),className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40"})})]}),u.jsxs("label",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"checkbox",checked:c,onChange:V=>f(V.target.checked),className:"h-3 w-3 accent-[hsl(var(--brand))]"}),u.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:"Supports Reasoning"})]}),c&&u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(Je,{label:"Thinking High maps to",children:u.jsx("input",{value:T,onChange:V=>I(V.target.value),placeholder:"high",className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40"})}),u.jsx(Je,{label:"Thinking XHigh maps to",children:u.jsx("input",{value:R,onChange:V=>j(V.target.value),placeholder:"max",className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40"})})]}),u.jsxs("fieldset",{className:"rounded-[2px] border border-border/50 p-3",children:[u.jsx("legend",{className:"px-1 font-mono text-[9px] uppercase tracking-[0.16em] text-muted-foreground",children:"Cost (per million tokens)"}),u.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[u.jsx(Je,{label:"Input",children:u.jsx("input",{type:"number",step:"0.01",value:v,onChange:V=>k(V.target.value),className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1 font-mono text-[11px] text-foreground outline-none focus:border-brand/40"})}),u.jsx(Je,{label:"Output",children:u.jsx("input",{type:"number",step:"0.01",value:m,onChange:V=>x(V.target.value),className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1 font-mono text-[11px] text-foreground outline-none focus:border-brand/40"})}),u.jsx(Je,{label:"Cache Read",children:u.jsx("input",{type:"number",step:"0.01",value:y,onChange:V=>w(V.target.value),className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1 font-mono text-[11px] text-foreground outline-none focus:border-brand/40"})}),u.jsx(Je,{label:"Cache Write",children:u.jsx("input",{type:"number",step:"0.01",value:E,onChange:V=>S(V.target.value),className:"w-full rounded-[2px] border border-border-soft bg-background px-2 py-1 font-mono text-[11px] text-foreground outline-none focus:border-brand/40"})})]})]}),u.jsx(Je,{label:"Custom Headers (JSON)",children:u.jsx("textarea",{value:_,onChange:V=>A(V.target.value),placeholder:'{"User-Agent": "..."}',rows:3,className:"w-full resize-none rounded-[2px] border border-border-soft bg-background px-2 py-1.5 font-mono text-[11px] text-foreground outline-none focus:border-brand/40"})})]}),u.jsxs("div",{className:"flex justify-end gap-2 border-t border-border/50 px-4 py-3",children:[u.jsx("button",{type:"button",onClick:r,className:"rounded-[2px] border border-border-soft px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-muted-foreground hover:text-foreground",children:"Cancel"}),u.jsx("button",{type:"submit",disabled:H.isPending,className:"rounded-[2px] bg-brand/10 px-3 py-1.5 font-mono text-[10px] uppercase tracking-[0.12em] text-brand hover:bg-brand/20 disabled:opacity-50",children:H.isPending?"Saving...":i?"Update":"Create"})]}),(re||H.isError)&&u.jsx("p",{className:"mx-4 mb-3 font-mono text-[10px] text-signal-rose",children:re??((He=H.error)==null?void 0:He.message)})]})}function Je({label:e,required:t,children:n}){return u.jsxs("div",{children:[u.jsxs("label",{className:"mb-1 block font-mono text-[9px] uppercase tracking-[0.16em] text-muted-foreground",children:[e,t&&u.jsx("span",{className:"text-signal-rose",children:" *"})]}),n]})}function Y3({workspaceId:e,open:t,onClose:n}){return t?u.jsxs("aside",{className:"flex h-full w-[320px] shrink-0 flex-col border-l border-border bg-popover",children:[u.jsx(X3,{onClose:n}),u.jsx("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto p-4",children:u.jsx(J3,{workspaceId:e})})]}):null}function X3({onClose:e}){return u.jsxs("header",{className:"flex h-[44px] items-center justify-between border-b border-border-soft px-4",children:[u.jsx("span",{className:"text-[13px] font-medium tracking-[-0.005em] text-foreground",children:"Configuration"}),u.jsx(Ko,{onClick:e,title:"Close","aria-label":"Close config panel",children:u.jsx(Ui,{className:"h-3.5 w-3.5"})})]})}function J3({workspaceId:e}){const t=Le(s=>s.sessionPath),n=Le(s=>s.running),{data:r,isLoading:i,error:o}=Nx(e,t);return i?u.jsxs("div",{className:"flex items-center justify-center py-8 text-[12px] text-muted-foreground",children:[u.jsx(Vt,{className:"h-3.5 w-3.5 animate-spin"}),u.jsx("span",{className:"ml-2",children:"Loading config…"})]}):o||!r?u.jsx("p",{className:"rounded-md border border-signal-error/[0.30] bg-signal-error/[0.08] px-3 py-2 text-center text-[12px] text-signal-error",children:(o==null?void 0:o.message)??"Failed to load config"}):u.jsxs(u.Fragment,{children:[n&&u.jsx("p",{className:"rounded-md border border-brand/[0.22] bg-brand/[0.08] px-3 py-1.5 text-center text-[11.5px] text-brand",children:"Read-only · agent running"}),u.jsx(Z3,{workspaceId:e,currentModel:r.currentModel,availableModels:r.availableModels,disabled:n}),u.jsx(rP,{workspaceId:e,level:r.thinkingLevel,availableLevels:r.availableThinkingLevels,disabled:n}),u.jsx(iP,{workspaceId:e,activeTools:r.activeTools,allTools:r.allTools,disabled:n})]})}function Z3({workspaceId:e,currentModel:t,availableModels:n,disabled:r}){const i=Pb(e),[o,s]=P.useState(!1),l=t?`${t.provider}/${t.modelId}`:"";return u.jsxs("section",{children:[u.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[u.jsx(_l,{children:"Model"}),u.jsxs("button",{type:"button",onClick:()=>s(!0),className:"inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11.5px] text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground",title:"Manage model configurations",children:[u.jsx(Lx,{className:"h-3 w-3"})," Manage"]})]}),u.jsx(eP,{currentKey:l,availableModels:n,disabled:r||i.isPending,onSelect:(a,c)=>i.mutate({provider:a,modelId:c})}),i.isError&&u.jsx("p",{className:"mt-1.5 text-[11.5px] text-signal-error",children:i.error.message}),u.jsx(V3,{workspaceId:e,open:o,onClose:()=>s(!1)})]})}function eP({currentKey:e,availableModels:t,disabled:n,onSelect:r}){const[i,o]=P.useState(!1),s=P.useRef(null),l=P.useRef(null),a=P.useRef(null),c=P.useRef(null),f=P.useRef(!1);P.useEffect(()=>{if(!i)return;const g=k=>{s.current&&!s.current.contains(k.target)&&o(!1)},v=k=>{var m,x;if(k.key==="Escape"){k.preventDefault(),f.current=!0,o(!1);return}if(k.key==="Tab"){(m=l.current)==null||m.focus(),o(!1);return}if(k.key==="ArrowDown"||k.key==="ArrowUp"||k.key==="Home"||k.key==="End"){const y=a.current;if(!y)return;const w=Array.from(y.querySelectorAll('[role="option"]'));if(w.length===0)return;k.preventDefault();const E=w.indexOf(document.activeElement),S=k.key==="ArrowDown"?E<0?0:Math.min(E+1,w.length-1):k.key==="ArrowUp"?E<0?w.length-1:Math.max(E-1,0):k.key==="Home"?0:w.length-1;(x=w[S])==null||x.focus()}};return document.addEventListener("mousedown",g),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",v)}},[i]),P.useLayoutEffect(()=>{var g,v;if(i){const k=c.current??((g=a.current)==null?void 0:g.querySelector('[role="option"]'));k==null||k.scrollIntoView({block:"nearest"}),k==null||k.focus({preventScroll:!0})}else f.current&&(f.current=!1,(v=l.current)==null||v.focus())},[i]);const d=t.find(g=>`${g.provider}/${g.modelId}`===e),p=(d==null?void 0:d.name)??"Select model",h=(d==null?void 0:d.modelId)??p;return u.jsxs("div",{ref:s,className:"relative",children:[u.jsxs("button",{ref:l,type:"button",onClick:()=>o(g=>!g),disabled:n,"aria-label":"Model","aria-haspopup":"listbox","aria-expanded":i,title:h,className:U("flex w-full items-center gap-1.5 rounded-md border bg-card px-3 py-2 text-[12.5px] text-foreground outline-none ring-brand-focus transition-colors","disabled:cursor-not-allowed disabled:opacity-50",i?"border-brand/[0.30]":"border-border hover:border-border-hi"),children:[u.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:p}),u.jsx(cr,{className:U("h-3 w-3 shrink-0 text-muted-foreground transition-transform",i&&"rotate-180")})]}),i&&u.jsxs("div",{ref:a,role:"listbox","aria-label":"Available models",className:"absolute left-0 right-0 top-full z-50 mt-1.5 overflow-hidden rounded-md border border-border bg-popover shadow-panel",children:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border-soft bg-muted px-3 py-2 text-[11.5px] text-muted-foreground",children:[u.jsx("span",{className:"font-medium text-foreground",children:"Available models"}),t.length>0&&u.jsx("span",{className:"font-mono tabular-nums",children:t.length})]}),u.jsxs("div",{className:"max-h-72 overflow-y-auto py-1",children:[t.length===0&&u.jsx("div",{className:"px-3 py-3 text-[12px] text-muted-foreground",children:"No models available."}),t.map(g=>{const v=`${g.provider}/${g.modelId}`,k=v===e;return u.jsxs("button",{ref:k?c:void 0,type:"button",role:"option","aria-selected":k,onClick:()=>{f.current=!0,o(!1),k||r(g.provider,g.modelId)},title:`${g.provider}/${g.modelId}`,className:U("flex w-full items-start gap-2 px-3 py-1.5 text-left text-[12.5px] transition-colors ring-brand-focus focus:bg-accent/60 focus:outline-none",k?"bg-brand/[0.08] text-brand-strong":"text-foreground hover:bg-accent/60"),children:[u.jsx(ss,{className:U("mt-0.5 h-3 w-3 shrink-0",k?"opacity-100":"opacity-0")}),u.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[u.jsx("span",{className:"truncate",children:g.name}),u.jsxs("span",{className:U("truncate font-mono text-[11px]",k?"text-brand":"text-muted-foreground"),children:[g.provider,"/",g.modelId]})]})]},v)})]})]})]})}const tP={off:"Off",minimal:"Min",low:"Low",medium:"Med",high:"High",xhigh:"Max"},nP={off:"Off",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"Extra high"};function rP({workspaceId:e,level:t,availableLevels:n,disabled:r}){const i=Tb(e);return n.length===0?u.jsxs("section",{children:[u.jsx(_l,{children:"Thinking"}),u.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Model has no thinking support."})]}):u.jsxs("section",{children:[u.jsx(_l,{children:"Thinking"}),u.jsx("div",{className:"flex gap-0.5 rounded-md border border-border bg-card p-1",children:n.map(o=>u.jsx("button",{type:"button",onClick:()=>i.mutate({level:o}),disabled:r||i.isPending,title:nP[o]??o,className:U("min-w-0 flex-1 truncate rounded-[6px] px-1.5 py-1.5 text-[12px] font-medium transition-colors ring-brand-focus",o===t?"bg-brand/[0.08] text-brand-strong":"text-muted-foreground hover:text-foreground",(r||i.isPending)&&"opacity-50"),children:tP[o]??o},o))}),i.isError&&u.jsx("p",{className:"mt-1.5 text-[11.5px] text-signal-error",children:i.error.message})]})}function iP({workspaceId:e,activeTools:t,allTools:n,disabled:r}){const i=Ib(e),o=new Set(t),s=(l,a)=>{const c=a?[...t,l]:t.filter(f=>f!==l);i.mutate({tools:c})};return u.jsxs("section",{children:[u.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[u.jsx(_l,{children:"Tools"}),u.jsx(ir,{tone:"ghost",children:u.jsxs("span",{className:"font-mono text-[10.5px] tabular-nums",children:[t.length,"/",n.length]})})]}),u.jsx("ul",{className:"flex flex-col gap-1.5",children:n.map(l=>u.jsx("li",{children:u.jsxs("label",{className:U("flex cursor-pointer items-start gap-2.5 rounded-md border border-border-soft bg-card px-3 py-2 transition-colors hover:border-border",o.has(l.name)&&"border-brand/[0.22] bg-brand/[0.04]",(r||i.isPending)&&"pointer-events-none opacity-50"),children:[u.jsx("input",{type:"checkbox",checked:o.has(l.name),onChange:a=>s(l.name,a.target.checked),disabled:r||i.isPending,className:"mt-[3px] h-3 w-3 shrink-0 accent-[hsl(var(--brand))]"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("span",{className:"block font-mono text-[12px] text-foreground",children:l.name}),l.description&&u.jsx("span",{className:"mt-0.5 block truncate text-[11.5px] text-muted-foreground",children:l.description})]})]})},l.name))}),i.isError&&u.jsx("p",{className:"mt-1.5 text-[11.5px] text-signal-error",children:i.error.message})]})}function _l({children:e}){return u.jsx("h3",{className:"mb-1.5 text-[11.5px] font-medium text-muted-foreground",children:e})}let oP=0,sP=0;function lP(e){const t=$r(n=>n.pushToast);P.useEffect(()=>st.on(r=>{if(r.type!=="error")return;const i=r.command?`${r.command}: ${r.message}`:r.message;t({id:`wserr-${++oP}`,workspaceId:e??"",message:i,notifyType:"error"})}),[t,e])}function aP(){const e=$r(t=>t.pushToast);P.useEffect(()=>st.on(n=>{if(n.type!=="extension_error")return;const r=cP(n.extensionPath);e({id:`exterr-${++sP}`,workspaceId:n.workspaceId,message:`${r}: ${n.event}: ${n.message}`,notifyType:"error"})}),[e])}function uP(e){const t=$r(n=>n.pushToast);P.useEffect(()=>{},[t,e])}function cP(e){if(!e)return"extension";const t=e.replace(/\/+$/,""),n=t.split("/"),r=n.at(-1)||t;return/^(index|extension)\.(ts|js|mjs|cjs)$/.test(r)&&n.length>=2?n[n.length-2]:r.replace(/\.(ts|js|mjs|cjs)$/,"")}function dP(){const e=$r(n=>n.toasts),t=$r(n=>n.dismissToast);return u.jsx("div",{className:"pointer-events-none fixed right-4 top-4 z-40 flex w-72 flex-col gap-2",children:e.map(n=>u.jsx(fP,{toast:n,onClose:()=>t(n.id)},n.id))})}function fP({toast:e,onClose:t}){P.useEffect(()=>{const i=e.notifyType==="error"?8e3:4e3,o=setTimeout(t,i);return()=>clearTimeout(o)},[t,e.notifyType]);const n=e.notifyType==="error"||e.notifyType==="warning"?ac:e.notifyType==="info"?Bb:Fb,r=e.notifyType==="error"?"border-l-signal-error text-signal-error":e.notifyType==="warning"?"border-l-signal-warn text-signal-warn":"border-l-brand text-foreground";return u.jsxs("div",{className:U("pointer-events-auto flex items-start gap-2 rounded-[10px] border border-border bg-card p-3 text-[12.5px] shadow-glow-lg","border-l-[3px]",r),children:[u.jsx(n,{className:U("mt-0.5 h-3.5 w-3.5 shrink-0",e.notifyType==="info"&&"text-brand")}),u.jsx("div",{className:"flex-1 whitespace-pre-wrap break-words text-foreground",children:e.message}),u.jsx("button",{type:"button",onClick:t,className:"text-muted-foreground transition-colors hover:text-foreground","aria-label":"Dismiss",children:u.jsx(Ui,{className:"h-3 w-3"})})]})}function pP({workspaceId:e,request:t,onClose:n}){return u.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",onMouseDown:r=>{r.target===r.currentTarget&&n()},children:u.jsxs("div",{className:"flex h-full max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-lg border border-border bg-card shadow-xl",children:[u.jsx(hP,{kind:t.kind,mode:t.mode,onClose:n}),t.mode==="create"?u.jsx(mP,{workspaceId:e,kind:t.kind,defaultScope:t.defaultScope,onDone:n}):u.jsx(gP,{workspaceId:e,kind:t.kind,filePath:t.filePath,onDone:n})]})})}function hP({kind:e,mode:t,onClose:n}){const r=t==="create"?e==="skill"?"New skill":"New prompt template":e==="skill"?"Edit skill":"Edit prompt template";return u.jsxs("header",{className:"flex items-center justify-between border-b border-border px-4 py-2",children:[u.jsx("h2",{className:"text-sm font-semibold text-foreground",children:r}),u.jsx("button",{type:"button",onClick:n,className:"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground","aria-label":"Close editor",children:u.jsx(Ui,{className:"h-4 w-4"})})]})}function mP({workspaceId:e,kind:t,defaultScope:n,onDone:r}){var S,T;const[i,o]=P.useState(n),[s,l]=P.useState(""),[a,c]=P.useState(""),[f,d]=P.useState(""),[p,h]=P.useState(!1),[g,v]=P.useState(t==="skill"?xP:""),k=Gb(e),m=Zb(e),x=k.isPending||m.isPending,y=((S=k.error)==null?void 0:S.message)??((T=m.error)==null?void 0:T.message),w=async()=>{try{t==="skill"?await k.mutateAsync({scope:i,name:s.trim(),description:a.trim(),body:g,disableModelInvocation:p||void 0}):await m.mutateAsync({scope:i,name:s.trim(),description:a.trim(),argumentHint:f.trim()||void 0,body:g}),r()}catch{}},E=!x&&s.trim().length>0&&a.trim().length>0&&g.length>0;return u.jsx(Jy,{kind:t,scope:i,onScopeChange:o,scopeLocked:!1,name:s,onNameChange:l,description:a,onDescriptionChange:c,argumentHint:f,onArgumentHintChange:d,disableModelInvocation:p,onDisableModelInvocationChange:h,body:g,onBodyChange:v,submitLabel:"Create",canSubmit:E,pending:x,error:y,onSubmit:w,onCancel:r})}function gP({workspaceId:e,kind:t,filePath:n,onDone:r}){var A,W,Y;const i=Kb(e,t==="skill"?n:void 0),o=Jb(e,t==="prompt"?n:void 0),s=t==="skill"?i.data:o.data,l=(A=t==="skill"?i.error:o.error)==null?void 0:A.message,a=t==="skill"?i.isLoading:o.isLoading,[c,f]=P.useState(!1),[d]=P.useState(void 0),[p,h]=P.useState(""),[g,v]=P.useState(""),[k,m]=P.useState(""),[x,y]=P.useState(!1),[w,E]=P.useState("");P.useEffect(()=>{!s||c||(h(s.name),v(s.description),m(s.argumentHint??""),y(!!s.disableModelInvocation),E(s.body),f(!0))},[s,c]);const S=Yb(e),T=ek(e),I=S.isPending||T.isPending,R=((W=S.error)==null?void 0:W.message)??((Y=T.error)==null?void 0:Y.message),j=async()=>{try{t==="skill"?await S.mutateAsync({filePath:n,name:p.trim(),description:g.trim(),body:w,disableModelInvocation:x||void 0}):await T.mutateAsync({filePath:n,name:p.trim(),description:g.trim(),argumentHint:k.trim()||void 0,body:w}),r()}catch{}};if(a)return u.jsxs("div",{className:"flex flex-1 items-center justify-center text-muted-foreground",children:[u.jsx(Vt,{className:"h-4 w-4 animate-spin"}),u.jsx("span",{className:"ml-2 text-xs",children:"Loading file\\u2026"})]});if(l||!s)return u.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-4 text-xs text-signal-rose",children:[u.jsx("p",{children:l??"Failed to load file"}),u.jsx("button",{type:"button",onClick:r,className:"rounded-md border border-input bg-background px-3 py-1.5 text-foreground",children:"Close"})]});const _=c&&!I&&p.trim().length>0&&g.trim().length>0&&w.length>0;return u.jsx(Jy,{kind:t,scope:d??s.scope,onScopeChange:()=>{},scopeLocked:!0,scopeLockedReason:"Move the file on disk to change scope.",name:p,onNameChange:h,description:g,onDescriptionChange:v,argumentHint:k,onArgumentHintChange:m,disableModelInvocation:x,onDisableModelInvocationChange:y,body:w,onBodyChange:E,filePath:s.filePath,submitLabel:"Save",canSubmit:_,pending:I,error:R,onSubmit:j,onCancel:r})}function Jy(e){return u.jsxs("form",{className:"flex min-h-0 flex-1 flex-col",onSubmit:t=>{t.preventDefault(),e.canSubmit&&e.onSubmit()},children:[u.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4",children:[e.filePath&&u.jsx("p",{className:"truncate font-mono text-[10px] text-muted-foreground",title:e.filePath,children:e.filePath}),u.jsxs(Gr,{label:"Scope",children:[u.jsxs("div",{className:"flex gap-1",children:[u.jsx($h,{active:e.scope==="project",onClick:()=>e.onScopeChange("project"),disabled:e.scopeLocked,children:"Project"}),u.jsx($h,{active:e.scope==="user",onClick:()=>e.onScopeChange("user"),disabled:e.scopeLocked,children:"User"})]}),u.jsx("p",{className:"mt-1 text-[11px] text-muted-foreground",children:e.scopeLocked?e.scopeLockedReason??"Scope is fixed for existing files.":e.scope==="project"?`Lives in <workspace>/.pi/${e.kind==="skill"?"skills":"prompts"}/`:`Lives in ~/.pi/agent/${e.kind==="skill"?"skills":"prompts"}/`})]}),u.jsxs(Gr,{label:e.kind==="skill"?"Name":"Name (becomes /name)",children:[u.jsx("input",{type:"text",value:e.name,onChange:t=>e.onNameChange(t.target.value),placeholder:e.kind==="skill"?"pdf-tools":"review-pr",className:"w-full rounded-md border border-input bg-background px-3 py-1.5 text-sm font-mono outline-none focus:ring-1 focus:ring-ring"}),u.jsxs("p",{className:"mt-1 text-[11px] text-muted-foreground",children:["Lowercase a-z, 0-9, hyphens",e.kind==="prompt"?" or underscores":"","; 1\\u201364 chars."]})]}),u.jsx(Gr,{label:"Description",children:u.jsx("textarea",{value:e.description,onChange:t=>e.onDescriptionChange(t.target.value),rows:2,placeholder:e.kind==="skill"?"What this skill does and when to use it. Be specific.":"What this prompt template does.",className:"w-full resize-y rounded-md border border-input bg-background px-3 py-1.5 text-sm outline-none focus:ring-1 focus:ring-ring"})}),e.kind==="skill"?u.jsx(Gr,{label:"",children:u.jsxs("label",{className:"flex cursor-pointer items-start gap-2 text-xs",children:[u.jsx("input",{type:"checkbox",checked:e.disableModelInvocation,onChange:t=>e.onDisableModelInvocationChange(t.target.checked),className:"mt-0.5 accent-primary"}),u.jsxs("span",{children:[u.jsx("span",{className:"font-medium text-foreground",children:"Manual invocation only"}),u.jsxs("span",{className:"block text-muted-foreground",children:["Hide from the system prompt. Users must explicitly run /skill:",e.name||"name","."]})]})]})}):u.jsxs(Gr,{label:"Argument hint (optional)",children:[u.jsx("input",{type:"text",value:e.argumentHint,onChange:t=>e.onArgumentHintChange(t.target.value),placeholder:"<file> [--flag]",className:"w-full rounded-md border border-input bg-background px-3 py-1.5 text-sm font-mono outline-none focus:ring-1 focus:ring-ring"}),u.jsxs("p",{className:"mt-1 text-[11px] text-muted-foreground",children:["Shown in autocomplete, e.g. ",u.jsx("code",{className:"font-mono",children:"<PR-URL>"}),"."]})]}),u.jsxs(Gr,{label:"Body (markdown)",children:[u.jsx("textarea",{value:e.body,onChange:t=>e.onBodyChange(t.target.value),rows:14,spellCheck:!1,className:"w-full resize-y rounded-md border border-input bg-background px-3 py-1.5 font-mono text-xs outline-none focus:ring-1 focus:ring-ring"}),e.kind==="prompt"&&u.jsxs("p",{className:"mt-1 text-[11px] text-muted-foreground",children:["Use ",u.jsx("code",{className:"font-mono",children:"$1"}),", ",u.jsx("code",{className:"font-mono",children:"$2"}),", ",u.jsx("code",{className:"font-mono",children:"$@"}),", ",u.jsxs("code",{className:"font-mono",children:["$","{@:N}"]}),", ",u.jsxs("code",{className:"font-mono",children:["$","{@:N:L}"]})," for arguments."]})]}),e.error&&u.jsx("p",{className:"rounded-md border border-signal-rose/40 bg-signal-rose/10 px-3 py-1.5 text-xs text-signal-rose",children:e.error})]}),u.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-border px-4 py-2",children:[u.jsx("button",{type:"button",onClick:e.onCancel,disabled:e.pending,className:"rounded-md border border-input bg-background px-3 py-1.5 text-sm text-foreground hover:bg-accent disabled:opacity-50",children:"Cancel"}),u.jsxs("button",{type:"submit",disabled:!e.canSubmit,className:"inline-flex items-center gap-1 rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground disabled:opacity-50",children:[e.pending&&u.jsx(Vt,{className:"h-3.5 w-3.5 animate-spin"}),e.submitLabel]})]})]})}function Gr({label:e,children:t}){return u.jsxs("div",{children:[e&&u.jsx("label",{className:"mb-1 block text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e}),t]})}function $h({active:e,disabled:t,onClick:n,children:r}){return u.jsx("button",{type:"button",onClick:n,disabled:t,className:U("rounded-md border px-3 py-1 text-xs transition-colors",e?"border-primary bg-primary text-primary-foreground":"border-input bg-background text-foreground hover:bg-accent",t&&"cursor-not-allowed opacity-60 hover:bg-background"),children:r})}const xP=`# Skill name
216
+
217
+ Describe what the skill does, when to use it, and any setup steps.
218
+
219
+ ## Usage
220
+
221
+ \`\`\`bash
222
+ ./scripts/example.sh <input>
223
+ \`\`\`
224
+ `;function yP({workspaceId:e,open:t,onClose:n}){return t?u.jsx("aside",{className:"flex h-full w-[320px] shrink-0 flex-col border-l border-border bg-popover",children:u.jsx(vP,{workspaceId:e,onClose:n})}):null}function vP({workspaceId:e,onClose:t}){const{data:n,isLoading:r,error:i}=Ed(e),o=Wb(e),[s,l]=P.useState("skills"),[a,c]=P.useState(null),f=g=>c({kind:g,mode:"create",defaultScope:"project"}),d=(g,v)=>c({kind:g,mode:"edit",filePath:v}),p={skills:(n==null?void 0:n.skills.length)??0,prompts:(n==null?void 0:n.prompts.length)??0,extensions:(n==null?void 0:n.extensions.length)??0},h=p.skills+p.prompts+p.extensions;return r?u.jsxs(u.Fragment,{children:[u.jsx(Za,{total:0,onReload:()=>o.mutate(),reloading:o.isPending,onClose:t}),u.jsxs("div",{className:"flex flex-1 items-center justify-center text-[12px] text-muted-foreground",children:[u.jsx(Vt,{className:"h-3.5 w-3.5 animate-spin"}),u.jsx("span",{className:"ml-2",children:"Loading resources…"})]})]}):i||!n?u.jsxs(u.Fragment,{children:[u.jsx(Za,{total:0,onReload:()=>o.mutate(),reloading:o.isPending,onClose:t}),u.jsx("p",{className:"px-4 py-4 text-center text-[12.5px] text-signal-error",children:(i==null?void 0:i.message)??"Failed to load resources"})]}):u.jsxs(u.Fragment,{children:[u.jsx(Za,{total:h,onReload:()=>o.mutate(),reloading:o.isPending,onClose:t}),o.isError&&u.jsx("p",{className:"border-b border-signal-error/[0.30] bg-signal-error/[0.08] px-4 py-1.5 text-[11.5px] text-signal-error",children:o.error.message}),u.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[u.jsxs("div",{className:"flex gap-1 border-b border-border-soft px-3 pb-1 pt-2",children:[u.jsx(eu,{active:s==="skills",onClick:()=>l("skills"),label:"Skills",count:p.skills}),u.jsx(eu,{active:s==="prompts",onClick:()=>l("prompts"),label:"Prompts",count:p.prompts}),u.jsx(eu,{active:s==="extensions",onClick:()=>l("extensions"),label:"Extensions",count:p.extensions})]}),u.jsxs("div",{className:"flex-1 overflow-y-auto p-3",children:[s==="skills"&&u.jsx(bP,{workspaceId:e,skills:n.skills,onNew:()=>f("skill"),onEdit:g=>d("skill",g.filePath)}),s==="prompts"&&u.jsx(kP,{workspaceId:e,prompts:n.prompts,onNew:()=>f("prompt"),onEdit:g=>d("prompt",g.filePath)}),s==="extensions"&&u.jsx(wP,{extensionsEnabled:n.extensionsEnabled,extensions:n.extensions,errors:n.extensionErrors,disabledExtensions:n.disabledExtensions})]})]}),a&&u.jsx(pP,{workspaceId:e,request:a,onClose:()=>c(null)})]})}function Za({total:e,onReload:t,reloading:n,onClose:r}){return u.jsxs("header",{className:"flex h-[44px] items-center gap-1 border-b border-border-soft px-4",children:[u.jsxs("span",{className:"text-[13px] font-medium tracking-[-0.005em] text-foreground",children:["Resources",e>0&&u.jsx("span",{className:"ml-1.5 text-muted-foreground/60",children:e})]}),u.jsx("span",{className:"flex-1"}),u.jsx(Ko,{onClick:t,disabled:n,title:"Reload resources","aria-label":"Reload resources",children:u.jsx(Ub,{className:U("h-3.5 w-3.5",n&&"animate-spin")})}),u.jsx(Ko,{onClick:r,title:"Close","aria-label":"Close resources panel",children:u.jsx(Ui,{className:"h-3.5 w-3.5"})})]})}function eu({active:e,onClick:t,label:n,count:r}){return u.jsxs("button",{type:"button",onClick:t,className:U("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[12px] font-medium transition-colors ring-brand-focus",e?"bg-brand/[0.08] text-brand-strong":"text-muted-foreground hover:bg-accent/60 hover:text-foreground"),children:[u.jsx("span",{children:n}),u.jsx("span",{className:"font-mono text-[10.5px] tabular-nums opacity-70",children:r})]})}function bP({workspaceId:e,skills:t,onNew:n,onEdit:r}){const i=Xb(e),o=cs(),s=async l=>{await o({title:"Delete skill",message:`Delete skill "${l.name}"?
225
+
226
+ This removes ${l.filePath} and any sibling files in its directory.`,confirmLabel:"Delete",variant:"danger"})&&i.mutate({filePath:l.filePath})};return u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsx(Zy,{label:"New skill",onClick:n}),i.isError&&u.jsx("p",{className:"rounded-md border border-signal-error/[0.30] bg-signal-error/[0.08] px-2.5 py-1.5 text-[11.5px] text-signal-error",children:i.error.message}),t.length===0?u.jsx(n1,{text:"No skills discovered."}):u.jsx("ul",{className:"flex flex-col gap-2",children:t.map(l=>{var a;return u.jsxs("li",{className:"rounded-[10px] border border-border-soft bg-card px-3 py-2.5 transition-colors hover:border-border",children:[u.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[u.jsx("span",{className:"truncate text-[13px] font-medium text-foreground",children:l.name}),u.jsx(Zd,{source:l.source})]}),l.description&&u.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:l.description}),l.disableModelInvocation&&u.jsxs("p",{className:"mt-1 text-[11.5px] italic text-muted-foreground",children:["Manual invocation only (/skill:",l.name,")"]}),u.jsx(ef,{path:l.filePath}),l.managed?u.jsx(t1,{onEdit:()=>r(l),onDelete:()=>s(l),deleting:i.isPending&&((a=i.variables)==null?void 0:a.filePath)===l.filePath}):u.jsx(e1,{kind:"skill",source:l.source})]},l.filePath)})})]})}function kP({workspaceId:e,prompts:t,onNew:n,onEdit:r}){const i=tk(e),o=cs(),s=async l=>{await o({title:"Delete prompt",message:`Delete prompt template /${l.name}?
227
+
228
+ ${l.filePath}`,confirmLabel:"Delete",variant:"danger"})&&i.mutate({filePath:l.filePath})};return u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsx(Zy,{label:"New prompt",onClick:n}),i.isError&&u.jsx("p",{className:"rounded-md border border-signal-error/[0.30] bg-signal-error/[0.08] px-2.5 py-1.5 text-[11.5px] text-signal-error",children:i.error.message}),t.length===0?u.jsx(n1,{text:"No prompt templates discovered."}):u.jsx("ul",{className:"flex flex-col gap-2",children:t.map(l=>{var a;return u.jsxs("li",{className:"rounded-[10px] border border-border-soft bg-card px-3 py-2.5 transition-colors hover:border-border",children:[u.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[u.jsxs("span",{className:"truncate text-[13px] font-medium text-foreground",children:["/",l.name,l.argumentHint&&u.jsx("span",{className:"ml-1 font-normal text-muted-foreground",children:l.argumentHint})]}),u.jsx(Zd,{source:l.source})]}),l.description&&u.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:l.description}),u.jsxs("details",{className:"mt-1.5 text-[12px]",children:[u.jsx("summary",{className:"cursor-pointer select-none rounded px-1 -mx-1 text-muted-foreground hover:text-foreground",children:"View template"}),u.jsx("pre",{className:"mt-1 max-h-64 overflow-auto rounded-md border border-border-soft bg-muted p-2 font-mono text-[11.5px] leading-relaxed text-foreground",children:l.content})]}),u.jsx(ef,{path:l.filePath}),l.managed?u.jsx(t1,{onEdit:()=>r(l),onDelete:()=>s(l),deleting:i.isPending&&((a=i.variables)==null?void 0:a.filePath)===l.filePath}):u.jsx(e1,{kind:"prompt",source:l.source})]},l.filePath)})})]})}function wP({extensionsEnabled:e,extensions:t,errors:n,disabledExtensions:r}){return e?t.length===0&&n.length===0?u.jsx("div",{className:"flex flex-col gap-3",children:u.jsxs("div",{className:"rounded-[10px] border border-border-soft bg-card px-3 py-3",children:[u.jsx("p",{className:"text-[13px] font-medium text-foreground",children:"Extensions enabled, none installed"}),u.jsxs("p",{className:"mt-1.5 text-[12px] leading-relaxed text-muted-foreground",children:[u.jsx("code",{className:"rounded bg-muted px-1 font-mono",children:"PI_PILOT_ENABLE_EXTENSIONS=1"})," is set but no extension modules were discovered under"," ",u.jsx("code",{className:"rounded bg-muted px-1 font-mono",children:"~/.pi/agent/extensions/"})," or"," ",u.jsx("code",{className:"rounded bg-muted px-1 font-mono",children:".pi/extensions/"}),"."]})]})}):u.jsxs("div",{className:"flex flex-col gap-2",children:[n.map(i=>u.jsxs("div",{className:"rounded-[10px] border border-signal-error/[0.30] bg-signal-error/[0.08] px-3 py-2.5 text-[12px] text-signal-error",children:[u.jsx("p",{className:"text-[11.5px] font-medium",children:"Failed to load"}),u.jsx("p",{className:"mt-1 break-all font-mono text-[11px] text-signal-error/80",children:i.path}),u.jsx("p",{className:"mt-1 break-words",children:i.error})]},i.path)),t.map(i=>u.jsxs("div",{className:"rounded-[10px] border border-border-soft bg-card px-3 py-2.5 transition-colors hover:border-border",children:[u.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[u.jsx("span",{className:"truncate text-[13px] font-medium text-foreground",children:Bh(i.path)}),u.jsx(Zd,{source:i.source})]}),u.jsx(SP,{ext:i}),u.jsx(ef,{path:i.resolvedPath})]},i.resolvedPath))]}):u.jsxs("div",{className:"flex flex-col gap-3",children:[u.jsxs("div",{className:"rounded-[10px] border border-border-soft bg-card px-3 py-3",children:[u.jsx("p",{className:"text-[13px] font-medium text-foreground",children:"Extensions are not supported"}),u.jsx("p",{className:"mt-1.5 text-[12px] leading-relaxed text-muted-foreground",children:"The pi extension system is built for a terminal UI (custom renderers, ANSI themes, keyboard overlays). These APIs cannot be bridged to the Web in any meaningful way, so pi-pilot disables all extensions by default."}),u.jsx("p",{className:"mt-2 text-[12px] leading-relaxed text-muted-foreground",children:"Skills and prompts work as usual; only extension modules are skipped."})]}),r.length>0&&u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx("p",{className:"px-1 text-[12px] font-medium text-muted-foreground",children:"Detected but disabled"}),r.map(i=>u.jsxs("div",{className:"flex items-center gap-2 rounded-[8px] border border-border-soft bg-muted/50 px-2.5 py-1.5",title:i,children:[u.jsx(zb,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),u.jsx("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:Bh(i)})]},i))]})]})}function SP({ext:e}){const t=[{label:"tools",items:e.tools},{label:"commands",items:e.commands.map(n=>`/${n}`)},{label:"flags",items:e.flags.map(n=>`--${n}`)},{label:"shortcuts",items:e.shortcuts}].filter(n=>n.items.length>0);return t.length===0?u.jsx("p",{className:"mt-1.5 text-[11.5px] italic text-muted-foreground",children:"No registrations."}):u.jsx("dl",{className:"mt-1.5 flex flex-col gap-1 text-[11.5px]",children:t.map(n=>u.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[u.jsxs("dt",{className:"shrink-0 text-muted-foreground",children:[n.label,":"]}),u.jsx("dd",{className:"flex flex-wrap gap-1",children:n.items.map(r=>u.jsx("span",{className:"rounded border border-border-soft bg-muted px-1.5 py-px font-mono text-[10.5px] text-foreground",children:r},r))})]},n.label))})}function Zy({label:e,onClick:t}){return u.jsxs("button",{type:"button",onClick:t,className:"group inline-flex items-center justify-center gap-1.5 rounded-md border border-dashed border-border bg-transparent px-2 py-2 text-[12px] font-medium text-muted-foreground transition-colors hover:border-brand/[0.30] hover:text-brand ring-brand-focus",children:[u.jsx(Gl,{className:"h-3 w-3 transition-transform group-hover:rotate-90"}),e]})}function e1({kind:e,source:t}){return u.jsxs("p",{className:"mt-1.5 text-[11px] text-muted-foreground",children:["Read-only · ",e," from ",t.label]})}function t1({onEdit:e,onDelete:t,deleting:n}){return u.jsxs("div",{className:"mt-2 flex justify-end gap-1.5",children:[u.jsxs("button",{type:"button",onClick:e,className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-2.5 py-1 text-[11.5px] font-medium text-foreground transition-colors hover:border-brand/[0.30] hover:text-brand ring-brand-focus",children:[u.jsx(lc,{className:"h-3 w-3"})," Edit"]}),u.jsxs("button",{type:"button",onClick:t,disabled:n,className:"inline-flex items-center gap-1.5 rounded-md border border-signal-error/[0.30] bg-card px-2.5 py-1 text-[11.5px] font-medium text-signal-error transition-colors hover:bg-signal-error/[0.08] disabled:opacity-50 ring-brand-focus",children:[n?u.jsx(Vt,{className:"h-3 w-3 animate-spin"}):u.jsx(Qo,{className:"h-3 w-3"})," ","Delete"]})]})}function Zd({source:e}){const t=e.scope==="user"?"default":e.scope==="project"?"brand":"warn";return u.jsx(ir,{tone:t,className:"shrink-0",children:u.jsx("span",{title:e.label,children:e.scope})})}function ef({path:e}){return u.jsx("p",{className:"mt-1.5 truncate font-mono text-[10.5px] tracking-[-0.005em] text-muted-foreground",title:e,children:e})}function n1({text:e}){return u.jsx("p",{className:"py-8 text-center text-[12.5px] text-muted-foreground",children:e})}function Bh(e){return e.replace(/\/+$/,"").split("/").at(-1)||e}const tf=["workspaces"];function CP(){return rn({queryKey:tf,queryFn:()=>de("/api/workspaces").then(e=>e.workspaces)})}function jP(){const e=Pe();return Oe({mutationFn:async t=>(await de("/api/workspaces",{method:"POST",body:JSON.stringify(t)})).workspace,onSuccess:()=>e.invalidateQueries({queryKey:tf})})}function NP(){const e=Pe();return Oe({mutationFn:t=>de(`/api/workspaces/${encodeURIComponent(t)}`,{method:"DELETE"}),onSuccess:()=>e.invalidateQueries({queryKey:tf})})}function EP({open:e,initialPath:t,onClose:n,onPick:r,error:i,busy:o}){const[s,l]=P.useState(t),[a,c]=P.useState(t??""),[f,d]=P.useState(!1),{data:p,isFetching:h,error:g}=Qb(s,f,e),v=p==null?void 0:p.path;P.useEffect(()=>{v&&v!==s&&(l(v),c(v))},[v,s]),P.useEffect(()=>{e&&(l(t),c(t??""))},[e,t]);const k=P.useRef(n);if(P.useEffect(()=>{k.current=n},[n]),P.useEffect(()=>{if(!e)return;const y=w=>{w.key==="Escape"&&k.current()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[e]),!e)return null;const m=(p==null?void 0:p.path)??s??"",x=i??(g instanceof Error?g.message:void 0);return u.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",onMouseDown:y=>{y.target===y.currentTarget&&n()},children:u.jsxs("div",{className:"flex h-[32rem] w-full max-w-2xl flex-col overflow-hidden rounded-xl border border-border bg-popover shadow-panel",children:[u.jsxs("header",{className:"flex items-center justify-between border-b border-border/70 bg-card/40 px-4 py-3",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[u.jsx(_x,{className:"h-4 w-4 text-brand"}),"Add workspace"]}),u.jsx("button",{type:"button",onClick:n,className:"rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground ring-brand-focus","aria-label":"Close",children:u.jsx(Ui,{className:"h-4 w-4"})})]}),u.jsx(PP,{value:a,onChange:c,onSubmit:()=>{const y=a.trim();y&&l(y)}}),u.jsx(TP,{path:m,onJump:l}),u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(IP,{entries:(p==null?void 0:p.entries)??[],parent:(p==null?void 0:p.parent)??null,loading:h&&!p,error:g instanceof Error&&!p?g.message:void 0,onEnter:l})}),u.jsxs("footer",{className:"border-t border-border/70 bg-card/40 px-4 py-3",children:[u.jsxs("label",{className:"mb-2 flex items-center gap-2 text-xs text-muted-foreground",children:[u.jsx("input",{type:"checkbox",checked:f,onChange:y=>d(y.target.checked),className:"h-3.5 w-3.5 accent-[hsl(var(--brand))]"}),"Show hidden directories"]}),u.jsxs("div",{className:"flex items-center justify-between gap-3",children:[u.jsx("p",{className:"flex-1 truncate font-mono text-xs text-foreground",children:m||"—"}),u.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[u.jsx("button",{type:"button",onClick:n,className:"rounded-md px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground ring-brand-focus",children:"Cancel"}),u.jsxs("button",{type:"button",disabled:!m||o,onClick:()=>void r(m),className:U("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ring-brand-focus",!m||o?"bg-muted text-muted-foreground/70 cursor-not-allowed":"bg-brand text-brand-foreground hover:bg-brand-strong shadow-glow-sm"),children:[o&&u.jsx(Vt,{className:"h-3 w-3 animate-spin"}),"Add this folder"]})]})]}),x&&u.jsx("p",{className:"mt-2 rounded-md border border-signal-rose/40 bg-signal-rose/10 px-2 py-1 text-xs text-signal-rose",children:x})]})]})})}function PP({value:e,onChange:t,onSubmit:n}){const r=P.useRef(null);return P.useEffect(()=>{var i;(i=r.current)==null||i.focus()},[]),u.jsx("div",{className:"border-b border-border/70 bg-background/30 px-4 py-2",children:u.jsx("input",{ref:r,type:"text",value:e,onChange:i=>t(i.target.value),onKeyDown:i=>{i.key==="Enter"&&(i.preventDefault(),n())},placeholder:"/absolute/path (Enter to jump)",className:"w-full rounded-md border border-input bg-card/60 px-2.5 py-1.5 font-mono text-xs text-foreground outline-none transition-colors focus:border-brand/40 focus:ring-1 focus:ring-brand/40"})})}function TP({path:e,onJump:t}){const n=P.useMemo(()=>_P(e),[e]);return u.jsxs("nav",{className:"flex items-center gap-0.5 overflow-x-auto border-b border-border/70 bg-background/20 px-3 py-1.5 text-xs",children:[n.length===0&&u.jsx("span",{className:"text-muted-foreground",children:"—"}),n.map((r,i)=>u.jsxs("span",{className:"flex shrink-0 items-center gap-0.5",children:[u.jsx("button",{type:"button",onClick:()=>t(r.path),className:"rounded px-1.5 py-0.5 text-foreground/90 transition-colors hover:bg-accent hover:text-foreground",children:r.label}),i<n.length-1&&u.jsx(Nd,{className:"h-3 w-3 text-muted-foreground"})]},r.path))]})}function IP({entries:e,parent:t,loading:n,error:r,onEnter:i}){return n?u.jsxs("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:[u.jsx(Vt,{className:"mr-2 h-3 w-3 animate-spin"}),"Loading…"]}):r?u.jsx("div",{className:"p-4 text-xs text-signal-rose",children:r}):u.jsxs("ul",{className:"p-1.5",children:[t&&u.jsx("li",{children:u.jsxs("button",{type:"button",onClick:()=>i(t),className:Uh,children:[u.jsx(Px,{className:"h-4 w-4 shrink-0 opacity-70"}),u.jsx("span",{className:"text-muted-foreground",children:".. (parent)"})]})}),e.length===0&&u.jsx("li",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"(no subdirectories)"}),e.map(o=>u.jsx("li",{children:u.jsxs("button",{type:"button",onClick:()=>i(o.path),className:Uh,children:[u.jsx(_x,{className:"h-4 w-4 shrink-0 text-brand/70 opacity-80"}),u.jsx("span",{className:"truncate",children:o.name})]})},o.path))]})}const Uh=U("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm","text-foreground/90 transition-colors hover:bg-accent hover:text-foreground");function _P(e){if(!e)return[];const t=e.split("/").filter(Boolean),n=[{label:"/",path:"/"}];let r="";for(const i of t)r+=`/${i}`,n.push({label:i,path:r});return n}function LP({activeId:e,onSelect:t,collapsed:n,onToggleCollapse:r}){const{data:i,isLoading:o}=CP(),s=jP(),l=NP(),a=cs(),[c,f]=P.useState(!1),[d,p]=P.useState(void 0),h=Le(k=>k.running),g=async k=>{p(void 0);try{const m=await s.mutateAsync({path:k});f(!1),t(m.id)}catch(m){p(m instanceof Error?m.message:String(m))}},v=(i==null?void 0:i.length)??0;return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"relative h-full shrink-0",children:[u.jsxs("aside",{className:U("flex h-full flex-col overflow-hidden border-r border-border bg-popover","transition-[width] duration-300 ease-out",n?"w-[56px]":"w-[272px]"),children:[u.jsxs("header",{className:"flex h-[54px] shrink-0 items-center",children:[u.jsx("div",{className:"flex h-full w-[56px] shrink-0 items-center justify-center",children:u.jsx(Jd,{size:28,filled:h})}),u.jsx("div",{className:U("flex min-w-0 flex-1 items-center pr-3 transition-opacity duration-200 ease-out",n?"opacity-0":"opacity-100"),children:u.jsx(m3,{})})]}),u.jsxs("div",{className:U("flex shrink-0 items-center justify-between px-4 pb-2 pt-3 transition-opacity duration-200 ease-out",n?"pointer-events-none opacity-0":"opacity-100"),children:[u.jsxs("h2",{className:"m-0 whitespace-nowrap text-[11.5px] font-medium text-muted-foreground",children:["Workspaces",v>0&&u.jsx("span",{className:"ml-1.5 text-muted-foreground/60",children:v})]}),u.jsxs("button",{type:"button",onClick:()=>{p(void 0),f(!0)},className:"inline-flex items-center gap-1 rounded-md px-1.5 py-1 text-[12px] text-muted-foreground transition-colors hover:bg-accent/70 hover:text-foreground",children:[u.jsx("span",{className:"text-[15px] leading-none text-brand",children:"+"}),u.jsx("span",{children:"Add"})]})]}),u.jsxs("ul",{className:"flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto overflow-x-hidden px-2.5 pb-3",children:[u.jsx(Hh,{show:!!o,collapsed:n,label:"Loading…"}),u.jsx(Hh,{show:!o&&(i==null?void 0:i.length)===0,collapsed:n,label:"No workspaces yet",variant:"dashed"}),i==null?void 0:i.map(k=>{const m=e===k.id;return u.jsx(RP,{name:k.name,path:k.path,active:m,streaming:m&&h,collapsed:n,onSelect:()=>t(k.id),onDelete:async()=>{await a({title:"Remove workspace",message:`Remove "${k.name}" from the list? (Files are not deleted.)`,confirmLabel:"Remove",variant:"danger"})&&l.mutateAsync(k.id)}},k.id)})]}),u.jsx(AP,{collapsed:n})]}),u.jsx("button",{type:"button",onClick:r,className:"absolute right-0 top-1/2 z-10 -translate-y-1/2 translate-x-1/2 rounded-full border border-border bg-card p-1 text-muted-foreground shadow-glow transition-colors hover:text-foreground","aria-label":n?"Expand sidebar (Ctrl+B)":"Collapse sidebar (Ctrl+B)",title:n?"Expand sidebar (Ctrl+B)":"Collapse sidebar (Ctrl+B)",children:n?u.jsx(Nd,{className:"h-3.5 w-3.5"}):u.jsx(Tx,{className:"h-3.5 w-3.5"})})]}),u.jsx(EP,{open:c,onClose:()=>f(!1),onPick:g,error:d,busy:s.isPending})]})}function Hh({show:e,collapsed:t,label:n,variant:r}){return e?u.jsx("li",{className:U("overflow-hidden text-center text-[12px] text-muted-foreground","transition-[opacity,max-height,margin,padding] duration-300 ease-out",r==="dashed"&&"rounded-lg border border-dashed border-border-soft bg-background/60",t?"pointer-events-none my-0 max-h-0 py-0 opacity-0":r==="dashed"?"mt-1 max-h-[80px] px-3 py-5 opacity-100":"max-h-[40px] px-3 py-2 opacity-100"),children:n}):null}function RP({name:e,path:t,active:n,streaming:r,collapsed:i,onSelect:o,onDelete:s}){const l=n?r?"streaming":"online":"idle";return u.jsxs("li",{className:"group relative",children:[u.jsxs("button",{type:"button",onClick:o,title:i?e:void 0,"aria-label":e,className:U("relative flex w-full items-start gap-2 overflow-hidden rounded-[10px] border pl-[14px] pr-7 py-[10px] text-left transition-colors",n?"border-border bg-card":"border-transparent bg-transparent hover:bg-accent/40"),children:[n&&u.jsx("span",{"aria-hidden":!0,className:"absolute left-1.5 top-3 bottom-3 w-[2px] rounded-full bg-brand"}),u.jsx("div",{className:U("flex items-center justify-center transition-[width,opacity] duration-200",i?"w-[18px] opacity-100":"w-0 opacity-0"),children:u.jsx(Tl,{state:l})}),u.jsxs("div",{className:U("flex min-w-0 flex-1 flex-col gap-[3px] overflow-hidden transition-[opacity,max-height,padding] duration-300 ease-out",i?"pointer-events-none max-h-0 py-0 opacity-0":"max-h-[80px] opacity-100"),children:[u.jsx("div",{className:"flex items-center gap-2",children:u.jsx("span",{className:U("min-w-0 flex-1 truncate text-[13.5px] tracking-[-0.005em]",n?"font-medium text-foreground":"text-foreground"),children:e})}),u.jsx("div",{className:"truncate font-mono text-[10.5px] tracking-[-0.005em] text-muted-foreground",children:zP(t)})]})]}),u.jsxs("div",{className:U("pointer-events-none absolute right-2 top-[10px] flex flex-col items-end gap-0.5 transition-opacity duration-300 ease-out",i?"opacity-0":"opacity-100"),children:[u.jsx("span",{className:"flex h-[20px] items-center",children:u.jsx(Tl,{state:l})}),u.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),s()},className:U("pointer-events-none rounded-md p-1 text-muted-foreground transition-opacity duration-150","opacity-0 hover:bg-signal-error/[0.10] hover:text-signal-error",!i&&"group-hover:pointer-events-auto group-hover:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100"),"aria-label":"Remove workspace",title:"Remove workspace",tabIndex:i?-1:0,children:u.jsx(Qo,{className:"h-3 w-3"})})]})]})}function AP({collapsed:e}){const t=UE();return u.jsxs("footer",{className:"flex h-[40px] shrink-0 items-center gap-2 border-t border-border-soft px-4",children:[u.jsxs("div",{className:U("flex w-full items-center gap-2 text-[11.5px] text-muted-foreground transition-opacity",e?"opacity-0":"opacity-100"),children:[u.jsx(Tl,{state:"online"}),u.jsx("span",{children:"Online"}),u.jsx("span",{className:"flex-1"}),u.jsx("span",{className:"font-mono text-[10.5px] tracking-[-0.005em] text-muted-foreground",children:t})]}),e&&u.jsx("div",{className:"absolute left-0 right-0 flex justify-center",children:u.jsx(Tl,{state:"online"})})]})}function zP(e){const t=e.match(/^\/(?:Users|home)\/[^/]+/);if(!t)return e;const n=e.slice(t[0].length);return n===""||n.startsWith("/")?"~"+n:e}function FP(){const[e,t]=P.useState(void 0),[n,r]=P.useState(null),[i,o]=P.useState(!1);lP(e),aP(),_b(),uP(e);const s=a=>r(c=>c===a?null:a),l=P.useCallback(()=>{o(a=>!a)},[]);return P.useEffect(()=>{const a=c=>{(c.ctrlKey||c.metaKey)&&c.key==="b"&&(c.preventDefault(),l())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[l]),u.jsx(FE,{children:u.jsxs("div",{className:"flex h-full",children:[u.jsx(LP,{activeId:e,onSelect:t,collapsed:i,onToggleCollapse:l}),u.jsx(k3,{workspaceId:e,rightPanel:n,onToggleConfig:()=>s("config"),onToggleResources:()=>s("resources")},e??"none"),e&&u.jsxs(u.Fragment,{children:[u.jsx(Y3,{workspaceId:e,open:n==="config",onClose:()=>r(null)},`cfg-${e}`),u.jsx(yP,{workspaceId:e,open:n==="resources",onClose:()=>r(null)},`res-${e}`)]}),u.jsx(dP,{})]})})}const DP=new fb({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),r1=document.getElementById("root");if(!r1)throw new Error("missing #root");px(r1).render(u.jsx(P.StrictMode,{children:u.jsx(pb,{client:DP,children:u.jsx(FP,{})})}));