@jyork0828/pi-pilot 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +102 -12
- package/dist/index.js.map +1 -1
- package/package.json +13 -11
- package/public/assets/index-Cpw6tfat.css +1 -0
- package/public/assets/index-Dw_Ppxym.js +223 -0
- package/public/index.html +2 -2
- package/public/assets/index-Bqpj-esU.css +0 -1
- package/public/assets/index-e1hZMoPP.js +0 -218
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
var u1=Object.defineProperty;var of=e=>{throw TypeError(e)};var c1=(e,t,n)=>t in e?u1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Vt=(e,t,n)=>c1(e,typeof t!="symbol"?t+"":t,n),ia=(e,t,n)=>t.has(e)||of("Cannot "+n);var j=(e,t,n)=>(ia(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?of("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(ia(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),X=(e,t,n)=>(ia(e,t,"access private method"),n);var ds=(e,t,n,r)=>({set _(i){D(e,t,i,n)},get _(){return j(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 Xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jh={exports:{}},Il={},Zh={exports:{}},te={};/**
|
|
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"),d1=Symbol.for("react.portal"),f1=Symbol.for("react.fragment"),p1=Symbol.for("react.strict_mode"),h1=Symbol.for("react.profiler"),m1=Symbol.for("react.provider"),g1=Symbol.for("react.context"),x1=Symbol.for("react.forward_ref"),y1=Symbol.for("react.suspense"),v1=Symbol.for("react.memo"),k1=Symbol.for("react.lazy"),sf=Symbol.iterator;function b1(e){return e===null||typeof e!="object"?null:(e=sf&&e[sf]||e["@@iterator"],typeof e=="function"?e:null)}var em={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tm=Object.assign,nm={};function Oi(e,t,n){this.props=e,this.context=t,this.refs=nm,this.updater=n||em}Oi.prototype.isReactComponent={};Oi.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")};Oi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rm(){}rm.prototype=Oi.prototype;function jc(e,t,n){this.props=e,this.context=t,this.refs=nm,this.updater=n||em}var Nc=jc.prototype=new rm;Nc.constructor=jc;tm(Nc,Oi.prototype);Nc.isPureReactComponent=!0;var lf=Array.isArray,im=Object.prototype.hasOwnProperty,Ec={current:null},om={key:!0,ref:!0,__self:!0,__source:!0};function sm(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)im.call(t,r)&&!om.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:Ec.current}}function w1(e,t){return{$$typeof:ts,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Pc(e){return typeof e=="object"&&e!==null&&e.$$typeof===ts}function S1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var af=/\/+/g;function oa(e,t){return typeof e=="object"&&e!==null&&e.key!=null?S1(""+e.key):t.toString(36)}function zs(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 d1:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+oa(s,0):r,lf(i)?(n="",e!=null&&(n=e.replace(af,"$&/")+"/"),zs(i,t,n,"",function(c){return c})):i!=null&&(Pc(i)&&(i=w1(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(af,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",lf(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+oa(o,l);s+=zs(o,t,n,a,i)}else if(a=b1(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+oa(o,l++),s+=zs(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 fs(e,t,n){if(e==null)return e;var r=[],i=0;return zs(e,r,"","",function(o){return t.call(n,o,i++)}),r}function C1(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 nt={current:null},Fs={transition:null},j1={ReactCurrentDispatcher:nt,ReactCurrentBatchConfig:Fs,ReactCurrentOwner:Ec};function lm(){throw Error("act(...) is not supported in production builds of React.")}te.Children={map:fs,forEach:function(e,t,n){fs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fs(e,function(){t++}),t},toArray:function(e){return fs(e,function(t){return t})||[]},only:function(e){if(!Pc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Component=Oi;te.Fragment=f1;te.Profiler=h1;te.PureComponent=jc;te.StrictMode=p1;te.Suspense=y1;te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j1;te.act=lm;te.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=tm({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Ec.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)im.call(t,a)&&!om.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}};te.createContext=function(e){return e={$$typeof:g1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:m1,_context:e},e.Consumer=e};te.createElement=sm;te.createFactory=function(e){var t=sm.bind(null,e);return t.type=e,t};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:x1,render:e}};te.isValidElement=Pc;te.lazy=function(e){return{$$typeof:k1,_payload:{_status:-1,_result:e},_init:C1}};te.memo=function(e,t){return{$$typeof:v1,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=Fs.transition;Fs.transition={};try{e()}finally{Fs.transition=t}};te.unstable_act=lm;te.useCallback=function(e,t){return nt.current.useCallback(e,t)};te.useContext=function(e){return nt.current.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e){return nt.current.useDeferredValue(e)};te.useEffect=function(e,t){return nt.current.useEffect(e,t)};te.useId=function(){return nt.current.useId()};te.useImperativeHandle=function(e,t,n){return nt.current.useImperativeHandle(e,t,n)};te.useInsertionEffect=function(e,t){return nt.current.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return nt.current.useLayoutEffect(e,t)};te.useMemo=function(e,t){return nt.current.useMemo(e,t)};te.useReducer=function(e,t,n){return nt.current.useReducer(e,t,n)};te.useRef=function(e){return nt.current.useRef(e)};te.useState=function(e){return nt.current.useState(e)};te.useSyncExternalStore=function(e,t,n){return nt.current.useSyncExternalStore(e,t,n)};te.useTransition=function(){return nt.current.useTransition()};te.version="18.3.1";Zh.exports=te;var P=Zh.exports;const ps=Cc(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 N1=P,E1=Symbol.for("react.element"),P1=Symbol.for("react.fragment"),T1=Object.prototype.hasOwnProperty,I1=N1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_1={key:!0,ref:!0,__self:!0,__source:!0};function am(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)T1.call(t,r)&&!_1.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:E1,type:e,key:o,ref:s,props:i,_owner:I1.current}}Il.Fragment=P1;Il.jsx=am;Il.jsxs=am;Jh.exports=Il;var u=Jh.exports,um={exports:{}},jt={},cm={exports:{}},dm={};/**
|
|
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(L,B){var k=L.length;L.push(B);e:for(;0<k;){var V=k-1>>>1,oe=L[V];if(0<i(oe,B))L[V]=B,L[k]=oe,k=V;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var B=L[0],k=L.pop();if(k!==B){L[0]=k;e:for(var V=0,oe=L.length,S=oe>>>1;V<S;){var ge=2*(V+1)-1,Ue=L[ge],ue=ge+1,it=L[ue];if(0>i(Ue,k))ue<oe&&0>i(it,Ue)?(L[V]=it,L[ue]=k,V=ue):(L[V]=Ue,L[ge]=k,V=ge);else if(ue<oe&&0>i(it,k))L[V]=it,L[ue]=k,V=ue;else break e}}return B}function i(L,B){var k=L.sortIndex-B.sortIndex;return k!==0?k:L.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,m=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,g=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(L){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=L)r(c),B.sortIndex=B.expirationTime,t(a,B);else break;B=n(c)}}function b(L){if(v=!1,y(L),!m)if(n(a)!==null)m=!0,le(E);else{var B=n(c);B!==null&&Q(b,B.startTime-L)}}function E(L,B){m=!1,v&&(v=!1,g(T),T=-1),h=!0;var k=p;try{for(y(B),d=n(a);d!==null&&(!(d.expirationTime>B)||L&&!z());){var V=d.callback;if(typeof V=="function"){d.callback=null,p=d.priorityLevel;var oe=V(d.expirationTime<=B);B=e.unstable_now(),typeof oe=="function"?d.callback=oe:d===n(a)&&r(a),y(B)}else r(a);d=n(a)}if(d!==null)var S=!0;else{var ge=n(c);ge!==null&&Q(b,ge.startTime-B),S=!1}return S}finally{d=null,p=k,h=!1}}var C=!1,I=null,T=-1,A=5,N=-1;function z(){return!(e.unstable_now()-N<A)}function R(){if(I!==null){var L=e.unstable_now();N=L;var B=!0;try{B=I(!0,L)}finally{B?G():(C=!1,I=null)}}else C=!1}var G;if(typeof x=="function")G=function(){x(R)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,q=K.port2;K.port1.onmessage=R,G=function(){q.postMessage(null)}}else G=function(){w(R,0)};function le(L){I=L,C||(C=!0,G())}function Q(L,B){T=w(function(){L(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(L){L.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,le(E))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(L){switch(p){case 1:case 2:case 3:var B=3;break;default:B=p}var k=p;p=B;try{return L()}finally{p=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,B){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var k=p;p=L;try{return B()}finally{p=k}},e.unstable_scheduleCallback=function(L,B,k){var V=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?V+k:V):k=V,L){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=k+oe,L={id:f++,callback:B,priorityLevel:L,startTime:k,expirationTime:oe,sortIndex:-1},k>V?(L.sortIndex=k,t(c,L),n(a)===null&&L===n(c)&&(v?(g(T),T=-1):v=!0,Q(b,k-V))):(L.sortIndex=oe,t(a,L),m||h||(m=!0,le(E))),L},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(L){var B=p;return function(){var k=p;p=B;try{return L.apply(this,arguments)}finally{p=k}}}})(dm);cm.exports=dm;var R1=cm.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 L1=P,Ct=R1;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 fm=new Set,No={};function $r(e,t){Ii(e,t),Ii(e+"Capture",t)}function Ii(e,t){for(No[e]=t,e=0;e<t.length;e++)fm.add(t[e])}var kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=Object.prototype.hasOwnProperty,A1=/^[: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]*$/,uf={},cf={};function z1(e){return eu.call(cf,e)?!0:eu.call(uf,e)?!1:A1.test(e)?cf[e]=!0:(uf[e]=!0,!1)}function F1(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 M1(e,t,n,r){if(t===null||typeof t>"u"||F1(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 rt(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 Be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Be[e]=new rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Be[t]=new rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Be[e]=new rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Be[e]=new rt(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){Be[e]=new rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Be[e]=new rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Be[e]=new rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Be[e]=new rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Be[e]=new rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Tc=/[\-:]([a-z])/g;function Ic(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(Tc,Ic);Be[t]=new rt(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(Tc,Ic);Be[t]=new rt(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(Tc,Ic);Be[t]=new rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Be[e]=new rt(e,1,!1,e.toLowerCase(),null,!1,!1)});Be.xlinkHref=new rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Be[e]=new rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function _c(e,t,n,r){var i=Be.hasOwnProperty(t)?Be[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(M1(t,n,i,r)&&(n=null),r||i===null?z1(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 Cn=L1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hs=Symbol.for("react.element"),Xr=Symbol.for("react.portal"),Jr=Symbol.for("react.fragment"),Rc=Symbol.for("react.strict_mode"),tu=Symbol.for("react.profiler"),pm=Symbol.for("react.provider"),hm=Symbol.for("react.context"),Lc=Symbol.for("react.forward_ref"),nu=Symbol.for("react.suspense"),ru=Symbol.for("react.suspense_list"),Ac=Symbol.for("react.memo"),Rn=Symbol.for("react.lazy"),mm=Symbol.for("react.offscreen"),df=Symbol.iterator;function Yi(e){return e===null||typeof e!="object"?null:(e=df&&e[df]||e["@@iterator"],typeof e=="function"?e:null)}var Se=Object.assign,sa;function ao(e){if(sa===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);sa=t&&t[1]||""}return`
|
|
34
|
+
`+sa+e}var la=!1;function aa(e,t){if(!e||la)return"";la=!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{la=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ao(e):""}function O1(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=aa(e.type,!1),e;case 11:return e=aa(e.type.render,!1),e;case 1:return e=aa(e.type,!0),e;default:return""}}function iu(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 tu:return"Profiler";case Rc:return"StrictMode";case nu:return"Suspense";case ru:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case hm:return(e.displayName||"Context")+".Consumer";case pm:return(e._context.displayName||"Context")+".Provider";case Lc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ac:return t=e.displayName||null,t!==null?t:iu(e.type)||"Memo";case Rn:t=e._payload,e=e._init;try{return iu(e(t))}catch{}}return null}function D1(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 iu(t);case 8:return t===Rc?"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 gm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $1(e){var t=gm(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 ms(e){e._valueTracker||(e._valueTracker=$1(e))}function xm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Js(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 ou(e,t){var n=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ff(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 ym(e,t){t=t.checked,t!=null&&_c(e,"checked",t,!1)}function su(e,t){ym(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")?lu(e,t.type,n):t.hasOwnProperty("defaultValue")&&lu(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pf(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 lu(e,t,n){(t!=="number"||Js(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 au(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(F(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hf(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 vm(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 mf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function km(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 uu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?km(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var gs,bm=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(gs=gs||document.createElement("div"),gs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=gs.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},B1=["Webkit","ms","Moz","O"];Object.keys(ho).forEach(function(e){B1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ho[t]=ho[e]})});function wm(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 Sm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=wm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var U1=Se({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 cu(e,t){if(t){if(U1[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 du(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 fu=null;function zc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pu=null,ci=null,di=null;function gf(e){if(e=is(e)){if(typeof pu!="function")throw Error(F(280));var t=e.stateNode;t&&(t=zl(t),pu(e.stateNode,e.type,t))}}function Cm(e){ci?di?di.push(e):di=[e]:ci=e}function jm(){if(ci){var e=ci,t=di;if(di=ci=null,gf(e),t)for(e=0;e<t.length;e++)gf(t[e])}}function Nm(e,t){return e(t)}function Em(){}var ua=!1;function Pm(e,t,n){if(ua)return e(t,n);ua=!0;try{return Nm(e,t,n)}finally{ua=!1,(ci!==null||di!==null)&&(Em(),jm())}}function Po(e,t){var n=e.stateNode;if(n===null)return null;var r=zl(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 hu=!1;if(kn)try{var Xi={};Object.defineProperty(Xi,"passive",{get:function(){hu=!0}}),window.addEventListener("test",Xi,Xi),window.removeEventListener("test",Xi,Xi)}catch{hu=!1}function H1(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,Zs=null,el=!1,mu=null,q1={onError:function(e){mo=!0,Zs=e}};function Q1(e,t,n,r,i,o,s,l,a){mo=!1,Zs=null,H1.apply(q1,arguments)}function V1(e,t,n,r,i,o,s,l,a){if(Q1.apply(this,arguments),mo){if(mo){var c=Zs;mo=!1,Zs=null}else throw Error(F(198));el||(el=!0,mu=c)}}function Br(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 Tm(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 xf(e){if(Br(e)!==e)throw Error(F(188))}function W1(e){var t=e.alternate;if(!t){if(t=Br(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 xf(i),e;if(o===r)return xf(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 Im(e){return e=W1(e),e!==null?_m(e):null}function _m(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_m(e);if(t!==null)return t;e=e.sibling}return null}var Rm=Ct.unstable_scheduleCallback,yf=Ct.unstable_cancelCallback,K1=Ct.unstable_shouldYield,G1=Ct.unstable_requestPaint,Ee=Ct.unstable_now,Y1=Ct.unstable_getCurrentPriorityLevel,Fc=Ct.unstable_ImmediatePriority,Lm=Ct.unstable_UserBlockingPriority,tl=Ct.unstable_NormalPriority,X1=Ct.unstable_LowPriority,Am=Ct.unstable_IdlePriority,_l=null,en=null;function J1(e){if(en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot(_l,e,void 0,(e.current.flags&128)===128)}catch{}}var Bt=Math.clz32?Math.clz32:tv,Z1=Math.log,ev=Math.LN2;function tv(e){return e>>>=0,e===0?32:31-(Z1(e)/ev|0)|0}var xs=64,ys=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 nl(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-Bt(t),i=1<<n,r|=e[n],t&=~i;return r}function nv(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 rv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Bt(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=nv(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function gu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function zm(){var e=xs;return xs<<=1,!(xs&4194240)&&(xs=64),e}function ca(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-Bt(t),e[t]=n}function iv(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-Bt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Mc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Bt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ce=0;function Fm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Mm,Oc,Om,Dm,$m,xu=!1,vs=[],Gn=null,Yn=null,Xn=null,To=new Map,Io=new Map,An=[],ov="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 vf(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&&Oc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function sv(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 Bm(e){var t=xr(e.target);if(t!==null){var n=Br(t);if(n!==null){if(t=n.tag,t===13){if(t=Tm(n),t!==null){e.blockedOn=t,$m(e.priority,function(){Om(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=yu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fu=r,n.target.dispatchEvent(r),fu=null}else return t=is(n),t!==null&&Oc(t),e.blockedOn=n,!1;t.shift()}return!0}function kf(e,t,n){Ms(e)&&n.delete(t)}function lv(){xu=!1,Gn!==null&&Ms(Gn)&&(Gn=null),Yn!==null&&Ms(Yn)&&(Yn=null),Xn!==null&&Ms(Xn)&&(Xn=null),To.forEach(kf),Io.forEach(kf)}function Zi(e,t){e.blockedOn===t&&(e.blockedOn=null,xu||(xu=!0,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,lv)))}function _o(e){function t(i){return Zi(i,e)}if(0<vs.length){Zi(vs[0],e);for(var n=1;n<vs.length;n++){var r=vs[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);)Bm(n),n.blockedOn===null&&An.shift()}var fi=Cn.ReactCurrentBatchConfig,rl=!0;function av(e,t,n,r){var i=ce,o=fi.transition;fi.transition=null;try{ce=1,Dc(e,t,n,r)}finally{ce=i,fi.transition=o}}function uv(e,t,n,r){var i=ce,o=fi.transition;fi.transition=null;try{ce=4,Dc(e,t,n,r)}finally{ce=i,fi.transition=o}}function Dc(e,t,n,r){if(rl){var i=yu(e,t,n,r);if(i===null)ka(e,t,r,il,n),vf(e,r);else if(sv(i,e,t,n,r))r.stopPropagation();else if(vf(e,r),t&4&&-1<ov.indexOf(e)){for(;i!==null;){var o=is(i);if(o!==null&&Mm(o),o=yu(e,t,n,r),o===null&&ka(e,t,r,il,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else ka(e,t,r,null,n)}}var il=null;function yu(e,t,n,r){if(il=null,e=zc(r),e=xr(e),e!==null)if(t=Br(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Tm(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 il=e,null}function Um(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(Y1()){case Fc:return 1;case Lm:return 4;case tl:case X1:return 16;case Am:return 536870912;default:return 16}default:return 16}}var Vn=null,$c=null,Os=null;function Hm(){if(Os)return Os;var e,t=$c,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 Ds(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 bf(){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:bf,this.isPropagationStopped=bf,this}return Se(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 Di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bc=Nt(Di),rs=Se({},Di,{view:0,detail:0}),cv=Nt(rs),da,fa,eo,Rl=Se({},rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uc,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"?(da=e.screenX-eo.screenX,fa=e.screenY-eo.screenY):fa=da=0,eo=e),da)},movementY:function(e){return"movementY"in e?e.movementY:fa}}),wf=Nt(Rl),dv=Se({},Rl,{dataTransfer:0}),fv=Nt(dv),pv=Se({},rs,{relatedTarget:0}),pa=Nt(pv),hv=Se({},Di,{animationName:0,elapsedTime:0,pseudoElement:0}),mv=Nt(hv),gv=Se({},Di,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xv=Nt(gv),yv=Se({},Di,{data:0}),Sf=Nt(yv),vv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kv={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"},bv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bv[e])?!!t[e]:!1}function Uc(){return wv}var Sv=Se({},rs,{key:function(e){if(e.key){var t=vv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?kv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uc,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Cv=Nt(Sv),jv=Se({},Rl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cf=Nt(jv),Nv=Se({},rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uc}),Ev=Nt(Nv),Pv=Se({},Di,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tv=Nt(Pv),Iv=Se({},Rl,{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}),_v=Nt(Iv),Rv=[9,13,27,32],Hc=kn&&"CompositionEvent"in window,go=null;kn&&"documentMode"in document&&(go=document.documentMode);var Lv=kn&&"TextEvent"in window&&!go,qm=kn&&(!Hc||go&&8<go&&11>=go),jf=" ",Nf=!1;function Qm(e,t){switch(e){case"keyup":return Rv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zr=!1;function Av(e,t){switch(e){case"compositionend":return Vm(t);case"keypress":return t.which!==32?null:(Nf=!0,jf);case"textInput":return e=t.data,e===jf&&Nf?null:e;default:return null}}function zv(e,t){if(Zr)return e==="compositionend"||!Hc&&Qm(e,t)?(e=Hm(),Os=$c=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 qm&&t.locale!=="ko"?null:t.data;default:return null}}var Fv={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 Ef(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fv[e.type]:t==="textarea"}function Wm(e,t,n,r){Cm(r),t=ol(t,"onChange"),0<t.length&&(n=new Bc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var xo=null,Ro=null;function Mv(e){ig(e,0)}function Ll(e){var t=ni(e);if(xm(t))return e}function Ov(e,t){if(e==="change")return t}var Km=!1;if(kn){var ha;if(kn){var ma="oninput"in document;if(!ma){var Pf=document.createElement("div");Pf.setAttribute("oninput","return;"),ma=typeof Pf.oninput=="function"}ha=ma}else ha=!1;Km=ha&&(!document.documentMode||9<document.documentMode)}function Tf(){xo&&(xo.detachEvent("onpropertychange",Gm),Ro=xo=null)}function Gm(e){if(e.propertyName==="value"&&Ll(Ro)){var t=[];Wm(t,Ro,e,zc(e)),Pm(Mv,t)}}function Dv(e,t,n){e==="focusin"?(Tf(),xo=t,Ro=n,xo.attachEvent("onpropertychange",Gm)):e==="focusout"&&Tf()}function $v(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ll(Ro)}function Bv(e,t){if(e==="click")return Ll(t)}function Uv(e,t){if(e==="input"||e==="change")return Ll(t)}function Hv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qt=typeof Object.is=="function"?Object.is:Hv;function Lo(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(!eu.call(t,i)||!qt(e[i],t[i]))return!1}return!0}function If(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _f(e,t){var n=If(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=If(n)}}function Ym(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ym(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xm(){for(var e=window,t=Js();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Js(e.document)}return t}function qc(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 qv(e){var t=Xm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ym(n.ownerDocument.documentElement,n)){if(r!==null&&qc(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=_f(n,o);var s=_f(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 Qv=kn&&"documentMode"in document&&11>=document.documentMode,ei=null,vu=null,yo=null,ku=!1;function Rf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ku||ei==null||ei!==Js(r)||(r=ei,"selectionStart"in r&&qc(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&&Lo(yo,r)||(yo=r,r=ol(vu,"onSelect"),0<r.length&&(t=new Bc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ei)))}function bs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ti={animationend:bs("Animation","AnimationEnd"),animationiteration:bs("Animation","AnimationIteration"),animationstart:bs("Animation","AnimationStart"),transitionend:bs("Transition","TransitionEnd")},ga={},Jm={};kn&&(Jm=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 Al(e){if(ga[e])return ga[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jm)return ga[e]=t[n];return e}var Zm=Al("animationend"),eg=Al("animationiteration"),tg=Al("animationstart"),ng=Al("transitionend"),rg=new Map,Lf="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){rg.set(e,t),$r(t,[e])}for(var xa=0;xa<Lf.length;xa++){var ya=Lf[xa],Vv=ya.toLowerCase(),Wv=ya[0].toUpperCase()+ya.slice(1);lr(Vv,"on"+Wv)}lr(Zm,"onAnimationEnd");lr(eg,"onAnimationIteration");lr(tg,"onAnimationStart");lr("dblclick","onDoubleClick");lr("focusin","onFocus");lr("focusout","onBlur");lr(ng,"onTransitionEnd");Ii("onMouseEnter",["mouseout","mouseover"]);Ii("onMouseLeave",["mouseout","mouseover"]);Ii("onPointerEnter",["pointerout","pointerover"]);Ii("onPointerLeave",["pointerout","pointerover"]);$r("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$r("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$r("onBeforeInput",["compositionend","keypress","textInput","paste"]);$r("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$r("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(" "),Kv=new Set("cancel close invalid load scroll toggle".split(" ").concat(fo));function Af(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,V1(r,t,void 0,e),e.currentTarget=null}function ig(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;Af(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;Af(i,l,c),o=a}}}if(el)throw e=mu,el=!1,mu=null,e}function ye(e,t){var n=t[ju];n===void 0&&(n=t[ju]=new Set);var r=e+"__bubble";n.has(r)||(og(t,e,2,!1),n.add(r))}function va(e,t,n){var r=0;t&&(r|=4),og(n,e,r,t)}var ws="_reactListening"+Math.random().toString(36).slice(2);function Ao(e){if(!e[ws]){e[ws]=!0,fm.forEach(function(n){n!=="selectionchange"&&(Kv.has(n)||va(n,!1,e),va(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ws]||(t[ws]=!0,va("selectionchange",!1,t))}}function og(e,t,n,r){switch(Um(t)){case 1:var i=av;break;case 4:i=uv;break;default:i=Dc}n=i.bind(null,t,n,e),i=void 0,!hu||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=xr(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}Pm(function(){var c=o,f=zc(n),d=[];e:{var p=rg.get(e);if(p!==void 0){var h=Bc,m=e;switch(e){case"keypress":if(Ds(n)===0)break e;case"keydown":case"keyup":h=Cv;break;case"focusin":m="focus",h=pa;break;case"focusout":m="blur",h=pa;break;case"beforeblur":case"afterblur":h=pa;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=wf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=fv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Ev;break;case Zm:case eg:case tg:h=mv;break;case ng:h=Tv;break;case"scroll":h=cv;break;case"wheel":h=_v;break;case"copy":case"cut":case"paste":h=xv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Cf}var v=(t&4)!==0,w=!v&&e==="scroll",g=v?p!==null?p+"Capture":null:p;v=[];for(var x=c,y;x!==null;){y=x;var b=y.stateNode;if(y.tag===5&&b!==null&&(y=b,g!==null&&(b=Po(x,g),b!=null&&v.push(zo(x,b,y)))),w)break;x=x.return}0<v.length&&(p=new h(p,m,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!==fu&&(m=n.relatedTarget||n.fromElement)&&(xr(m)||m[bn]))break e;if((h||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=c,m=m?xr(m):null,m!==null&&(w=Br(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(v=wf,b="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(v=Cf,b="onPointerLeave",g="onPointerEnter",x="pointer"),w=h==null?p:ni(h),y=m==null?p:ni(m),p=new v(b,x+"leave",h,n,f),p.target=w,p.relatedTarget=y,b=null,xr(f)===c&&(v=new v(g,x+"enter",m,n,f),v.target=y,v.relatedTarget=w,b=v),w=b,h&&m)t:{for(v=h,g=m,x=0,y=v;y;y=Wr(y))x++;for(y=0,b=g;b;b=Wr(b))y++;for(;0<x-y;)v=Wr(v),x--;for(;0<y-x;)g=Wr(g),y--;for(;x--;){if(v===g||g!==null&&v===g.alternate)break t;v=Wr(v),g=Wr(g)}v=null}else v=null;h!==null&&zf(d,p,h,v,!1),m!==null&&w!==null&&zf(d,w,m,v,!0)}}e:{if(p=c?ni(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var E=Ov;else if(Ef(p))if(Km)E=Uv;else{E=$v;var C=Dv}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=Bv);if(E&&(E=E(e,c))){Wm(d,E,n,f);break e}C&&C(e,p,c),e==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&lu(p,"number",p.value)}switch(C=c?ni(c):window,e){case"focusin":(Ef(C)||C.contentEditable==="true")&&(ei=C,vu=c,yo=null);break;case"focusout":yo=vu=ei=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,Rf(d,n,f);break;case"selectionchange":if(Qv)break;case"keydown":case"keyup":Rf(d,n,f)}var I;if(Hc)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Zr?Qm(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(qm&&n.locale!=="ko"&&(Zr||T!=="onCompositionStart"?T==="onCompositionEnd"&&Zr&&(I=Hm()):(Vn=f,$c="value"in Vn?Vn.value:Vn.textContent,Zr=!0)),C=ol(c,T),0<C.length&&(T=new Sf(T,e,null,n,f),d.push({event:T,listeners:C}),I?T.data=I:(I=Vm(n),I!==null&&(T.data=I)))),(I=Lv?Av(e,n):zv(e,n))&&(c=ol(c,"onBeforeInput"),0<c.length&&(f=new Sf("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=I))}ig(d,t)})}function zo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ol(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 zf(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 Gv=/\r\n?/g,Yv=/\u0000|\uFFFD/g;function Ff(e){return(typeof e=="string"?e:""+e).replace(Gv,`
|
|
38
|
+
`).replace(Yv,"")}function Ss(e,t,n){if(t=Ff(t),Ff(e)!==t&&n)throw Error(F(425))}function sl(){}var bu=null,wu=null;function Su(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 Cu=typeof setTimeout=="function"?setTimeout:void 0,Xv=typeof clearTimeout=="function"?clearTimeout:void 0,Mf=typeof Promise=="function"?Promise:void 0,Jv=typeof queueMicrotask=="function"?queueMicrotask:typeof Mf<"u"?function(e){return Mf.resolve(null).then(e).catch(Zv)}:Cu;function Zv(e){setTimeout(function(){throw e})}function ba(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 Of(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),Zt="__reactFiber$"+$i,Fo="__reactProps$"+$i,bn="__reactContainer$"+$i,ju="__reactEvents$"+$i,e0="__reactListeners$"+$i,t0="__reactHandles$"+$i;function xr(e){var t=e[Zt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[bn]||n[Zt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Of(e);e!==null;){if(n=e[Zt])return n;e=Of(e)}return t}e=n,n=e.parentNode}return null}function is(e){return e=e[Zt]||e[bn],!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 zl(e){return e[Fo]||null}var Nu=[],ri=-1;function ar(e){return{current:e}}function ve(e){0>ri||(e.current=Nu[ri],Nu[ri]=null,ri--)}function me(e,t){ri++,Nu[ri]=e.current,e.current=t}var sr={},Ke=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 ll(){ve(dt),ve(Ke)}function Df(e,t,n){if(Ke.current!==sr)throw Error(F(168));me(Ke,t),me(dt,n)}function sg(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,D1(e)||"Unknown",i));return Se({},n,r)}function al(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,Rr=Ke.current,me(Ke,e),me(dt,dt.current),!0}function $f(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=sg(e,t,Rr),r.__reactInternalMemoizedMergedChildContext=e,ve(dt),ve(Ke),me(Ke,e)):ve(dt),me(dt,n)}var dn=null,Fl=!1,wa=!1;function lg(e){dn===null?dn=[e]:dn.push(e)}function n0(e){Fl=!0,lg(e)}function ur(){if(!wa&&dn!==null){wa=!0;var e=0,t=ce;try{var n=dn;for(ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}dn=null,Fl=!1}catch(i){throw dn!==null&&(dn=dn.slice(e+1)),Rm(Fc,ur),i}finally{ce=t,wa=!1}}return null}var ii=[],oi=0,ul=null,cl=0,Pt=[],Tt=0,Lr=null,gn=1,xn="";function hr(e,t){ii[oi++]=cl,ii[oi++]=ul,ul=e,cl=t}function ag(e,t,n){Pt[Tt++]=gn,Pt[Tt++]=xn,Pt[Tt++]=Lr,Lr=e;var r=gn;e=xn;var i=32-Bt(r)-1;r&=~(1<<i),n+=1;var o=32-Bt(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,gn=1<<32-Bt(t)+i|n<<i|r,xn=o+e}else gn=1<<o|n<<i|r,xn=e}function Qc(e){e.return!==null&&(hr(e,1),ag(e,1,0))}function Vc(e){for(;e===ul;)ul=ii[--oi],ii[oi]=null,cl=ii[--oi],ii[oi]=null;for(;e===Lr;)Lr=Pt[--Tt],Pt[Tt]=null,xn=Pt[--Tt],Pt[Tt]=null,gn=Pt[--Tt],Pt[Tt]=null}var wt=null,bt=null,ke=!1,$t=null;function ug(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 Bf(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,bt=Jn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,wt=e,bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Lr!==null?{id:gn,overflow:xn}: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,bt=null,!0):!1;default:return!1}}function Eu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pu(e){if(ke){var t=bt;if(t){var n=t;if(!Bf(e,t)){if(Eu(e))throw Error(F(418));t=Jn(n.nextSibling);var r=wt;t&&Bf(e,t)?ug(r,n):(e.flags=e.flags&-4097|2,ke=!1,wt=e)}}else{if(Eu(e))throw Error(F(418));e.flags=e.flags&-4097|2,ke=!1,wt=e}}}function Uf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;wt=e}function Cs(e){if(e!==wt)return!1;if(!ke)return Uf(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Su(e.type,e.memoizedProps)),t&&(t=bt)){if(Eu(e))throw cg(),Error(F(418));for(;t;)ug(e,t),t=Jn(t.nextSibling)}if(Uf(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){bt=Jn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}bt=null}}else bt=wt?Jn(e.stateNode.nextSibling):null;return!0}function cg(){for(var e=bt;e;)e=Jn(e.nextSibling)}function Ri(){bt=wt=null,ke=!1}function Wc(e){$t===null?$t=[e]:$t.push(e)}var r0=Cn.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 js(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Hf(e){var t=e._init;return t(e._payload)}function dg(e){function t(g,x){if(e){var y=g.deletions;y===null?(g.deletions=[x],g.flags|=16):y.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=nr(g,x),g.index=0,g.sibling=null,g}function o(g,x,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<x?(g.flags|=2,x):y):(g.flags|=2,x)):(g.flags|=1048576,x)}function s(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,x,y,b){return x===null||x.tag!==6?(x=Ta(y,g.mode,b),x.return=g,x):(x=i(x,y),x.return=g,x)}function a(g,x,y,b){var E=y.type;return E===Jr?f(g,x,y.props.children,b,y.key):x!==null&&(x.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Rn&&Hf(E)===x.type)?(b=i(x,y.props),b.ref=to(g,x,y),b.return=g,b):(b=Vs(y.type,y.key,y.props,null,g.mode,b),b.ref=to(g,x,y),b.return=g,b)}function c(g,x,y,b){return x===null||x.tag!==4||x.stateNode.containerInfo!==y.containerInfo||x.stateNode.implementation!==y.implementation?(x=Ia(y,g.mode,b),x.return=g,x):(x=i(x,y.children||[]),x.return=g,x)}function f(g,x,y,b,E){return x===null||x.tag!==7?(x=_r(y,g.mode,b,E),x.return=g,x):(x=i(x,y),x.return=g,x)}function d(g,x,y){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Ta(""+x,g.mode,y),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case hs:return y=Vs(x.type,x.key,x.props,null,g.mode,y),y.ref=to(g,null,x),y.return=g,y;case Xr:return x=Ia(x,g.mode,y),x.return=g,x;case Rn:var b=x._init;return d(g,b(x._payload),y)}if(uo(x)||Yi(x))return x=_r(x,g.mode,y,null),x.return=g,x;js(g,x)}return null}function p(g,x,y,b){var E=x!==null?x.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return E!==null?null:l(g,x,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case hs:return y.key===E?a(g,x,y,b):null;case Xr:return y.key===E?c(g,x,y,b):null;case Rn:return E=y._init,p(g,x,E(y._payload),b)}if(uo(y)||Yi(y))return E!==null?null:f(g,x,y,b,null);js(g,y)}return null}function h(g,x,y,b,E){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(y)||null,l(x,g,""+b,E);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case hs:return g=g.get(b.key===null?y:b.key)||null,a(x,g,b,E);case Xr:return g=g.get(b.key===null?y:b.key)||null,c(x,g,b,E);case Rn:var C=b._init;return h(g,x,y,C(b._payload),E)}if(uo(b)||Yi(b))return g=g.get(y)||null,f(x,g,b,E,null);js(x,b)}return null}function m(g,x,y,b){for(var E=null,C=null,I=x,T=x=0,A=null;I!==null&&T<y.length;T++){I.index>T?(A=I,I=null):A=I.sibling;var N=p(g,I,y[T],b);if(N===null){I===null&&(I=A);break}e&&I&&N.alternate===null&&t(g,I),x=o(N,x,T),C===null?E=N:C.sibling=N,C=N,I=A}if(T===y.length)return n(g,I),ke&&hr(g,T),E;if(I===null){for(;T<y.length;T++)I=d(g,y[T],b),I!==null&&(x=o(I,x,T),C===null?E=I:C.sibling=I,C=I);return ke&&hr(g,T),E}for(I=r(g,I);T<y.length;T++)A=h(I,g,T,y[T],b),A!==null&&(e&&A.alternate!==null&&I.delete(A.key===null?T:A.key),x=o(A,x,T),C===null?E=A:C.sibling=A,C=A);return e&&I.forEach(function(z){return t(g,z)}),ke&&hr(g,T),E}function v(g,x,y,b){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 C=E=null,I=x,T=x=0,A=null,N=y.next();I!==null&&!N.done;T++,N=y.next()){I.index>T?(A=I,I=null):A=I.sibling;var z=p(g,I,N.value,b);if(z===null){I===null&&(I=A);break}e&&I&&z.alternate===null&&t(g,I),x=o(z,x,T),C===null?E=z:C.sibling=z,C=z,I=A}if(N.done)return n(g,I),ke&&hr(g,T),E;if(I===null){for(;!N.done;T++,N=y.next())N=d(g,N.value,b),N!==null&&(x=o(N,x,T),C===null?E=N:C.sibling=N,C=N);return ke&&hr(g,T),E}for(I=r(g,I);!N.done;T++,N=y.next())N=h(I,g,T,N.value,b),N!==null&&(e&&N.alternate!==null&&I.delete(N.key===null?T:N.key),x=o(N,x,T),C===null?E=N:C.sibling=N,C=N);return e&&I.forEach(function(R){return t(g,R)}),ke&&hr(g,T),E}function w(g,x,y,b){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 hs:e:{for(var E=y.key,C=x;C!==null;){if(C.key===E){if(E=y.type,E===Jr){if(C.tag===7){n(g,C.sibling),x=i(C,y.props.children),x.return=g,g=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Rn&&Hf(E)===C.type){n(g,C.sibling),x=i(C,y.props),x.ref=to(g,C,y),x.return=g,g=x;break e}n(g,C);break}else t(g,C);C=C.sibling}y.type===Jr?(x=_r(y.props.children,g.mode,b,y.key),x.return=g,g=x):(b=Vs(y.type,y.key,y.props,null,g.mode,b),b.ref=to(g,x,y),b.return=g,g=b)}return s(g);case Xr:e:{for(C=y.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(g,x.sibling),x=i(x,y.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=Ia(y,g.mode,b),x.return=g,g=x}return s(g);case Rn:return C=y._init,w(g,x,C(y._payload),b)}if(uo(y))return m(g,x,y,b);if(Yi(y))return v(g,x,y,b);js(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,y),x.return=g,g=x):(n(g,x),x=Ta(y,g.mode,b),x.return=g,g=x),s(g)):n(g,x)}return w}var Li=dg(!0),fg=dg(!1),dl=ar(null),fl=null,si=null,Kc=null;function Gc(){Kc=si=fl=null}function Yc(e){var t=dl.current;ve(dl),e._currentValue=t}function Tu(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){fl=e,Kc=si=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ct=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(Kc!==e)if(e={context:e,memoizedValue:t,next:null},si===null){if(fl===null)throw Error(F(308));si=e,fl.dependencies={lanes:0,firstContext:e}}else si=si.next=e;return t}var yr=null;function Xc(e){yr===null?yr=[e]:yr.push(e)}function pg(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Xc(t)):(n.next=i.next,i.next=n),t.interleaved=n,wn(e,r)}function wn(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 Ln=!1;function Jc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hg(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 yn(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,se&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,wn(e,n)}return i=r.interleaved,i===null?(t.next=t,Xc(r)):(t.next=i.next,i.next=t),r.interleaved=t,wn(e,n)}function $s(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,Mc(e,n)}}function qf(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 pl(e,t,n,r){var i=e.updateQueue;Ln=!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 m=e,v=l;switch(p=t,h=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){d=m.call(h,d,p);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,p=typeof m=="function"?m.call(h,d,p):m,p==null)break e;d=Se({},d,p);break e;case 2:Ln=!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);zr|=s,e.lanes=s,e.memoizedState=d}}function Qf(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={},tn=ar(os),Mo=ar(os),Oo=ar(os);function vr(e){if(e===os)throw Error(F(174));return e}function Zc(e,t){switch(me(Oo,t),me(Mo,e),me(tn,os),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:uu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=uu(t,e)}ve(tn),me(tn,t)}function Ai(){ve(tn),ve(Mo),ve(Oo)}function mg(e){vr(Oo.current);var t=vr(tn.current),n=uu(t,e.type);t!==n&&(me(Mo,e),me(tn,n))}function ed(e){Mo.current===e&&(ve(tn),ve(Mo))}var be=ar(0);function hl(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 Sa=[];function td(){for(var e=0;e<Sa.length;e++)Sa[e]._workInProgressVersionPrimary=null;Sa.length=0}var Bs=Cn.ReactCurrentDispatcher,Ca=Cn.ReactCurrentBatchConfig,Ar=0,we=null,_e=null,Fe=null,ml=!1,vo=!1,Do=0,i0=0;function He(){throw Error(F(321))}function nd(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 rd(e,t,n,r,i,o){if(Ar=o,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bs.current=e===null||e.memoizedState===null?a0:u0,e=n(r,i),vo){o=0;do{if(vo=!1,Do=0,25<=o)throw Error(F(301));o+=1,Fe=_e=null,t.updateQueue=null,Bs.current=c0,e=n(r,i)}while(vo)}if(Bs.current=gl,t=_e!==null&&_e.next!==null,Ar=0,Fe=_e=we=null,ml=!1,t)throw Error(F(300));return e}function id(){var e=Do!==0;return Do=0,e}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?we.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function At(){if(_e===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Fe===null?we.memoizedState:Fe.next;if(t!==null)Fe=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},Fe===null?we.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function $o(e,t){return typeof t=="function"?t(e):t}function ja(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((Ar&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,we.lanes|=f,zr|=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,we.lanes|=o,zr|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Na(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 gg(){}function xg(e,t){var n=we,r=At(),i=t(),o=!qt(r.memoizedState,i);if(o&&(r.memoizedState=i,ct=!0),r=r.queue,od(kg.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Fe!==null&&Fe.memoizedState.tag&1){if(n.flags|=2048,Bo(9,vg.bind(null,n,r,i,t),void 0,null),Me===null)throw Error(F(349));Ar&30||yg(n,t,i)}return i}function yg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vg(e,t,n,r){t.value=n,t.getSnapshot=r,bg(t)&&wg(e)}function kg(e,t,n){return n(function(){bg(t)&&wg(e)})}function bg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qt(e,n)}catch{return!0}}function wg(e){var t=wn(e,1);t!==null&&Ut(t,e,1,-1)}function Vf(e){var t=Kt();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=l0.bind(null,we,e),[t.memoizedState,e]}function Bo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.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 Sg(){return At().memoizedState}function Us(e,t,n,r){var i=Kt();we.flags|=e,i.memoizedState=Bo(1|t,n,void 0,r===void 0?null:r)}function Ml(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&&nd(r,s.deps)){i.memoizedState=Bo(t,n,o,r);return}}we.flags|=e,i.memoizedState=Bo(1|t,n,o,r)}function Wf(e,t){return Us(8390656,8,e,t)}function od(e,t){return Ml(2048,8,e,t)}function Cg(e,t){return Ml(4,2,e,t)}function jg(e,t){return Ml(4,4,e,t)}function Ng(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 Eg(e,t,n){return n=n!=null?n.concat([e]):null,Ml(4,4,Ng.bind(null,t,e),n)}function sd(){}function Pg(e,t){var n=At();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&nd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Tg(e,t){var n=At();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&nd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ig(e,t,n){return Ar&21?(qt(n,t)||(n=zm(),we.lanes|=n,zr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ct=!0),e.memoizedState=n)}function o0(e,t){var n=ce;ce=n!==0&&4>n?n:4,e(!0);var r=Ca.transition;Ca.transition={};try{e(!1),t()}finally{ce=n,Ca.transition=r}}function _g(){return At().memoizedState}function s0(e,t,n){var r=tr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Rg(e))Lg(t,n);else if(n=pg(e,t,n,r),n!==null){var i=tt();Ut(n,e,r,i),Ag(n,t,r)}}function l0(e,t,n){var r=tr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rg(e))Lg(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,Xc(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=pg(e,t,i,r),n!==null&&(i=tt(),Ut(n,e,r,i),Ag(n,t,r))}}function Rg(e){var t=e.alternate;return e===we||t!==null&&t===we}function Lg(e,t){vo=ml=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ag(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mc(e,n)}}var gl={readContext:Lt,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},a0={readContext:Lt,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:Wf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Us(4194308,4,Ng.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Us(4194308,4,e,t)},useInsertionEffect:function(e,t){return Us(4,2,e,t)},useMemo:function(e,t){var n=Kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Kt();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=s0.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:Vf,useDebugValue:sd,useDeferredValue:function(e){return Kt().memoizedState=e},useTransition:function(){var e=Vf(!1),t=e[0];return e=o0.bind(null,e[1]),Kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=we,i=Kt();if(ke){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),Me===null)throw Error(F(349));Ar&30||yg(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Wf(kg.bind(null,r,o,e),[e]),r.flags|=2048,Bo(9,vg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Kt(),t=Me.identifierPrefix;if(ke){var n=xn,r=gn;n=(r&~(1<<32-Bt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Do++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=i0++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},u0={readContext:Lt,useCallback:Pg,useContext:Lt,useEffect:od,useImperativeHandle:Eg,useInsertionEffect:Cg,useLayoutEffect:jg,useMemo:Tg,useReducer:ja,useRef:Sg,useState:function(){return ja($o)},useDebugValue:sd,useDeferredValue:function(e){var t=At();return Ig(t,_e.memoizedState,e)},useTransition:function(){var e=ja($o)[0],t=At().memoizedState;return[e,t]},useMutableSource:gg,useSyncExternalStore:xg,useId:_g,unstable_isNewReconciler:!1},c0={readContext:Lt,useCallback:Pg,useContext:Lt,useEffect:od,useImperativeHandle:Eg,useInsertionEffect:Cg,useLayoutEffect:jg,useMemo:Tg,useReducer:Na,useRef:Sg,useState:function(){return Na($o)},useDebugValue:sd,useDeferredValue:function(e){var t=At();return _e===null?t.memoizedState=e:Ig(t,_e.memoizedState,e)},useTransition:function(){var e=Na($o)[0],t=At().memoizedState;return[e,t]},useMutableSource:gg,useSyncExternalStore:xg,useId:_g,unstable_isNewReconciler:!1};function Mt(e,t){if(e&&e.defaultProps){t=Se({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Iu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Se({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ol={isMounted:function(e){return(e=e._reactInternals)?Br(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tt(),i=tr(e),o=yn(r,i);o.payload=t,n!=null&&(o.callback=n),t=Zn(e,o,i),t!==null&&(Ut(t,e,i,r),$s(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tt(),i=tr(e),o=yn(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Zn(e,o,i),t!==null&&(Ut(t,e,i,r),$s(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tt(),r=tr(e),i=yn(n,r);i.tag=2,t!=null&&(i.callback=t),t=Zn(e,i,r),t!==null&&(Ut(t,e,r,n),$s(t,e,r))}};function Kf(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?!Lo(n,r)||!Lo(i,o):!0}function zg(e,t,n){var r=!1,i=sr,o=t.contextType;return typeof o=="object"&&o!==null?o=Lt(o):(i=ft(t)?Rr:Ke.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=Ol,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Gf(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&&Ol.enqueueReplaceState(t,t.state,null)}function _u(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Jc(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Lt(o):(o=ft(t)?Rr:Ke.current,i.context=_i(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Iu(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&&Ol.enqueueReplaceState(i,i.state,null),pl(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+=O1(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 Ea(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 d0=typeof WeakMap=="function"?WeakMap:Map;function Fg(e,t,n){n=yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yl||(yl=!0,Uu=r),Ru(e,t)},n}function Mg(e,t,n){n=yn(-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 Yf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new d0;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=j0.bind(null,e,t,n),t.then(e,e))}function Xf(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 Jf(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=yn(-1,1),t.tag=2,Zn(n,t,1))),n.lanes|=1),e)}var f0=Cn.ReactCurrentOwner,ct=!1;function Je(e,t,n,r){t.child=e===null?fg(t,null,n,r):Li(t,e.child,n,r)}function Zf(e,t,n,r,i){n=n.render;var o=t.ref;return pi(t,i),r=rd(e,t,n,r,o,i),n=id(),e!==null&&!ct?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sn(e,t,i)):(ke&&n&&Qc(t),t.flags|=1,Je(e,t,r,i),t.child)}function ep(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!hd(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Og(e,t,o,r,i)):(e=Vs(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:Lo,n(s,r)&&e.ref===t.ref)return Sn(e,t,i)}return t.flags|=1,e=nr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Og(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Lo(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,Sn(e,t,i)}return Lu(e,t,n,r,i)}function Dg(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 Je(e,t,i,n),t.child}function $g(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Lu(e,t,n,r,i){var o=ft(n)?Rr:Ke.current;return o=_i(t,o),pi(t,i),n=rd(e,t,n,r,o,i),r=id(),e!==null&&!ct?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sn(e,t,i)):(ke&&r&&Qc(t),t.flags|=1,Je(e,t,n,i),t.child)}function tp(e,t,n,r,i){if(ft(n)){var o=!0;al(t)}else o=!1;if(pi(t,i),t.stateNode===null)Hs(e,t),zg(t,n,r),_u(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=Lt(c):(c=ft(n)?Rr:Ke.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)&&Gf(t,s,r,c),Ln=!1;var p=t.memoizedState;s.state=p,pl(t,r,s,i),a=t.memoizedState,l!==r||p!==a||dt.current||Ln?(typeof f=="function"&&(Iu(t,n,f,r),a=t.memoizedState),(l=Ln||Kf(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,hg(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=Lt(a):(a=ft(n)?Rr:Ke.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)&&Gf(t,s,r,a),Ln=!1,p=t.memoizedState,s.state=p,pl(t,r,s,i);var m=t.memoizedState;l!==d||p!==m||dt.current||Ln?(typeof h=="function"&&(Iu(t,n,h,r),m=t.memoizedState),(c=Ln||Kf(t,n,c,r,p,m,a)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,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=m),s.props=r,s.state=m,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 Au(e,t,n,r,o,i)}function Au(e,t,n,r,i,o){$g(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&$f(t,n,!1),Sn(e,t,o);r=t.stateNode,f0.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Li(t,e.child,null,o),t.child=Li(t,null,l,o)):Je(e,t,l,o),t.memoizedState=r.state,i&&$f(t,n,!0),t.child}function Bg(e){var t=e.stateNode;t.pendingContext?Df(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Df(e,t.context,!1),Zc(e,t.containerInfo)}function np(e,t,n,r,i){return Ri(),Wc(i),t.flags|=256,Je(e,t,n,r),t.child}var zu={dehydrated:null,treeContext:null,retryLane:0};function Fu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ug(e,t,n){var r=t.pendingProps,i=be.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(be,i&1),e===null)return Pu(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=Bl(s,r,0,null),e=_r(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Fu(n),t.memoizedState=zu,e):ld(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return p0(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=_r(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?Fu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=zu,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 ld(e,t){return t=Bl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ns(e,t,n,r){return r!==null&&Wc(r),Li(t,e.child,null,n),e=ld(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function p0(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Ea(Error(F(422))),Ns(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Bl({mode:"visible",children:r.children},i,0,null),o=_r(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Li(t,e.child,null,s),t.child.memoizedState=Fu(s),t.memoizedState=zu,o);if(!(t.mode&1))return Ns(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=Ea(o,r,void 0),Ns(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,wn(e,i),Ut(r,e,i,-1))}return pd(),r=Ea(Error(F(421))),Ns(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=N0.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,bt=Jn(i.nextSibling),wt=t,ke=!0,$t=null,e!==null&&(Pt[Tt++]=gn,Pt[Tt++]=xn,Pt[Tt++]=Lr,gn=e.id,xn=e.overflow,Lr=t),t=ld(t,r.children),t.flags|=4096,t)}function rp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Tu(e.return,t,n)}function Pa(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 Hg(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Je(e,t,r.children,n),r=be.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&&rp(e,n,t);else if(e.tag===19)rp(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(be,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&&hl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Pa(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&&hl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Pa(t,!0,n,null,o);break;case"together":Pa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Sn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zr|=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 h0(e,t,n){switch(t.tag){case 3:Bg(t),Ri();break;case 5:mg(t);break;case 1:ft(t.type)&&al(t);break;case 4:Zc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;me(dl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(me(be,be.current&1),t.flags|=128,null):n&t.child.childLanes?Ug(e,t,n):(me(be,be.current&1),e=Sn(e,t,n),e!==null?e.sibling:null);me(be,be.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Hg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),me(be,be.current),r)break;return null;case 22:case 23:return t.lanes=0,Dg(e,t,n)}return Sn(e,t,n)}var qg,Mu,Qg,Vg;qg=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(){};Qg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,vr(tn.current);var o=null;switch(n){case"input":i=ou(e,i),r=ou(e,r),o=[];break;case"select":i=Se({},i,{value:void 0}),r=Se({},r,{value:void 0}),o=[];break;case"textarea":i=au(e,i),r=au(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=sl)}cu(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"&&ye("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)}};Vg=function(e,t,n,r){n!==r&&(t.flags|=4)};function no(e,t){if(!ke)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 m0(e,t,n){var r=t.pendingProps;switch(Vc(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)&&ll(),qe(t),null;case 3:return r=t.stateNode,Ai(),ve(dt),ve(Ke),td(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Cs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$t!==null&&(Qu($t),$t=null))),Mu(e,t),qe(t),null;case 5:ed(t);var i=vr(Oo.current);if(n=t.type,e!==null&&t.stateNode!=null)Qg(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=vr(tn.current),Cs(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Zt]=t,r[Fo]=o,e=(t.mode&1)!==0,n){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(i=0;i<fo.length;i++)ye(fo[i],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":ff(r,o),ye("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ye("invalid",r);break;case"textarea":hf(r,o),ye("invalid",r)}cu(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&&Ss(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Ss(r.textContent,l,e),i=["children",""+l]):No.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&ye("scroll",r)}switch(n){case"input":ms(r),pf(r,o,!0);break;case"textarea":ms(r),mf(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=sl)}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=km(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[Zt]=t,e[Fo]=r,qg(e,t,!1,!1),t.stateNode=e;e:{switch(s=du(n,r),n){case"dialog":ye("cancel",e),ye("close",e),i=r;break;case"iframe":case"object":case"embed":ye("load",e),i=r;break;case"video":case"audio":for(i=0;i<fo.length;i++)ye(fo[i],e);i=r;break;case"source":ye("error",e),i=r;break;case"img":case"image":case"link":ye("error",e),ye("load",e),i=r;break;case"details":ye("toggle",e),i=r;break;case"input":ff(e,r),i=ou(e,r),ye("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Se({},r,{value:void 0}),ye("invalid",e);break;case"textarea":hf(e,r),i=au(e,r),ye("invalid",e);break;default:i=r}cu(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?Sm(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&bm(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"&&ye("scroll",e):a!=null&&_c(e,o,a,s))}switch(n){case"input":ms(e),pf(e,r,!1);break;case"textarea":ms(e),mf(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=sl)}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)Vg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(166));if(n=vr(Oo.current),vr(tn.current),Cs(t)){if(r=t.stateNode,n=t.memoizedProps,r[Zt]=t,(o=r.nodeValue!==n)&&(e=wt,e!==null))switch(e.tag){case 3:Ss(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ss(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Zt]=t,t.stateNode=r}return qe(t),null;case 13:if(ve(be),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&&bt!==null&&t.mode&1&&!(t.flags&128))cg(),Ri(),t.flags|=98560,o=!1;else if(o=Cs(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[Zt]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qe(t),o=!1}else $t!==null&&(Qu($t),$t=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||be.current&1?Ae===0&&(Ae=3):pd())),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 Yc(t.type._context),qe(t),null;case 17:return ft(t.type)&&ll(),qe(t),null;case 19:if(ve(be),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=hl(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(be,be.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=hl(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&&!ke)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=be.current,me(be,r?n&1|2:n&1),t):(qe(t),null);case 22:case 23:return fd(),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 g0(e,t){switch(Vc(t),t.tag){case 1:return ft(t.type)&&ll(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(),ve(dt),ve(Ke),td(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ed(t),null;case 13:if(ve(be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(be),null;case 4:return Ai(),null;case 10:return Yc(t.type._context),null;case 22:case 23:return fd(),null;case 24:return null;default:return null}}var Es=!1,Ve=!1,x0=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 ip=!1;function y0(e,t){if(bu=rl,e=Xm(),qc(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(wu={focusedElem:e,selectionRange:n},rl=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,w=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:Mt(t.type,v),w);g.__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(b){Ne(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return m=ip,ip=!1,m}function ko(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 Dl(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 Du(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 Wg(e){var t=e.alternate;t!==null&&(e.alternate=null,Wg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zt],delete t[Fo],delete t[ju],delete t[e0],delete t[t0])),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 Kg(e){return e.tag===5||e.tag===3||e.tag===4}function op(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Kg(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 $u(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=sl));else if(r!==4&&(e=e.child,e!==null))for($u(e,t,n),e=e.sibling;e!==null;)$u(e,t,n),e=e.sibling}function Bu(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(Bu(e,t,n),e=e.sibling;e!==null;)Bu(e,t,n),e=e.sibling}var De=null,Dt=!1;function En(e,t,n){for(n=n.child;n!==null;)Gg(e,t,n),n=n.sibling}function Gg(e,t,n){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(_l,n)}catch{}switch(n.tag){case 5:Ve||li(n,t);case 6:var r=De,i=Dt;De=null,En(e,t,n),De=r,Dt=i,De!==null&&(Dt?(e=De,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(Dt?(e=De,n=n.stateNode,e.nodeType===8?ba(e.parentNode,n):e.nodeType===1&&ba(e,n),_o(e)):ba(De,n.stateNode));break;case 4:r=De,i=Dt,De=n.stateNode.containerInfo,Dt=!0,En(e,t,n),De=r,Dt=i;break;case 0:case 11:case 14:case 15:if(!Ve&&(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(!Ve&&(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?(Ve=(r=Ve)||n.memoizedState!==null,En(e,t,n),Ve=r):En(e,t,n);break;default:En(e,t,n)}}function sp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new x0),t.forEach(function(r){var i=E0.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ft(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:De=l.stateNode,Dt=!1;break e;case 3:De=l.stateNode.containerInfo,Dt=!0;break e;case 4:De=l.stateNode.containerInfo,Dt=!0;break e}l=l.return}if(De===null)throw Error(F(160));Gg(o,s,i),De=null,Dt=!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;)Yg(t,e),t=t.sibling}function Yg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ft(t,e),Wt(e),r&4){try{ko(3,e,e.return),Dl(3,e)}catch(v){Ne(e,e.return,v)}try{ko(5,e,e.return)}catch(v){Ne(e,e.return,v)}}break;case 1:Ft(t,e),Wt(e),r&512&&n!==null&&li(n,n.return);break;case 5:if(Ft(t,e),Wt(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&&ym(i,o),du(l,s);var c=du(l,o);for(s=0;s<a.length;s+=2){var f=a[s],d=a[s+1];f==="style"?Sm(i,d):f==="dangerouslySetInnerHTML"?bm(i,d):f==="children"?Eo(i,d):_c(i,f,d,c)}switch(l){case"input":su(i,o);break;case"textarea":vm(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(Ft(t,e),Wt(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(Ft(t,e),Wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{_o(t.containerInfo)}catch(v){Ne(e,e.return,v)}break;case 4:Ft(t,e),Wt(e);break;case 13:Ft(t,e),Wt(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(cd=Ee())),r&4&&sp(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Ve=(c=Ve)||f,Ft(t,e),Ve=c):Ft(t,e),Wt(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:ko(4,p,p.return);break;case 1:li(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){Ne(r,n,v)}}break;case 5:li(p,p.return);break;case 22:if(p.memoizedState!==null){ap(d);continue}}h!==null?(h.return=p,$=h):ap(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=wm("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:Ft(t,e),Wt(e),r&4&&sp(e);break;case 21:break;default:Ft(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Kg(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=op(e);Bu(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=op(e);$u(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 v0(e,t,n){$=e,Xg(e)}function Xg(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||Es;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||Ve;l=Es;var c=Ve;if(Es=s,(Ve=a)&&!c)for($=i;$!==null;)s=$,a=s.child,s.tag===22&&s.memoizedState!==null?up(i):a!==null?(a.return=s,$=a):up(i);for(;o!==null;)$=o,Xg(o),o=o.sibling;$=i,Es=l,Ve=c}lp(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,$=o):lp(e)}}function lp(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:Ve||Dl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ve)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&&Qf(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}Qf(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))}Ve||t.flags&512&&Du(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 ap(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 up(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Dl(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{Du(t)}catch(a){Ne(t,o,a)}break;case 5:var s=t.return;try{Du(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 k0=Math.ceil,xl=Cn.ReactCurrentDispatcher,ad=Cn.ReactCurrentOwner,Rt=Cn.ReactCurrentBatchConfig,se=0,Me=null,Ie=null,$e=0,xt=0,ai=ar(0),Ae=0,Uo=null,zr=0,$l=0,ud=0,bo=null,ut=null,cd=0,Fi=1/0,cn=null,yl=!1,Uu=null,er=null,Ps=!1,Wn=null,vl=0,wo=0,Hu=null,qs=-1,Qs=0;function tt(){return se&6?Ee():qs!==-1?qs:qs=Ee()}function tr(e){return e.mode&1?se&2&&$e!==0?$e&-$e:r0.transition!==null?(Qs===0&&(Qs=zm()),Qs):(e=ce,e!==0||(e=window.event,e=e===void 0?16:Um(e.type)),e):1}function Ut(e,t,n,r){if(50<wo)throw wo=0,Hu=null,Error(F(185));ns(e,n,r),(!(se&2)||e!==Me)&&(e===Me&&(!(se&2)&&($l|=n),Ae===4&&zn(e,$e)),pt(e,r),n===1&&se===0&&!(t.mode&1)&&(Fi=Ee()+500,Fl&&ur()))}function pt(e,t){var n=e.callbackNode;rv(e,t);var r=nl(e,e===Me?$e:0);if(r===0)n!==null&&yf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&yf(n),t===1)e.tag===0?n0(cp.bind(null,e)):lg(cp.bind(null,e)),Jv(function(){!(se&6)&&ur()}),n=null;else{switch(Fm(r)){case 1:n=Fc;break;case 4:n=Lm;break;case 16:n=tl;break;case 536870912:n=Am;break;default:n=tl}n=ox(n,Jg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Jg(e,t){if(qs=-1,Qs=0,se&6)throw Error(F(327));var n=e.callbackNode;if(hi()&&e.callbackNode!==n)return null;var r=nl(e,e===Me?$e:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=kl(e,r);else{t=r;var i=se;se|=2;var o=ex();(Me!==e||$e!==t)&&(cn=null,Fi=Ee()+500,Ir(e,t));do try{S0();break}catch(l){Zg(e,l)}while(!0);Gc(),xl.current=o,se=i,Ie!==null?t=0:(Me=null,$e=0,t=Ae)}if(t!==0){if(t===2&&(i=gu(e),i!==0&&(r=i,t=qu(e,i))),t===1)throw n=Uo,Ir(e,0),zn(e,r),pt(e,Ee()),n;if(t===6)zn(e,r);else{if(i=e.current.alternate,!(r&30)&&!b0(i)&&(t=kl(e,r),t===2&&(o=gu(e),o!==0&&(r=o,t=qu(e,o))),t===1))throw n=Uo,Ir(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:mr(e,ut,cn);break;case 3:if(zn(e,r),(r&130023424)===r&&(t=cd+500-Ee(),10<t)){if(nl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){tt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Cu(mr.bind(null,e,ut,cn),t);break}mr(e,ut,cn);break;case 4:if(zn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Bt(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*k0(r/1960))-r,10<r){e.timeoutHandle=Cu(mr.bind(null,e,ut,cn),r);break}mr(e,ut,cn);break;case 5:mr(e,ut,cn);break;default:throw Error(F(329))}}}return pt(e,Ee()),e.callbackNode===n?Jg.bind(null,e):null}function qu(e,t){var n=bo;return e.current.memoizedState.isDehydrated&&(Ir(e,t).flags|=256),e=kl(e,t),e!==2&&(t=ut,ut=n,t!==null&&Qu(t)),e}function Qu(e){ut===null?ut=e:ut.push.apply(ut,e)}function b0(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&=~ud,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Bt(t),r=1<<n;e[n]=-1,t&=~r}}function cp(e){if(se&6)throw Error(F(327));hi();var t=nl(e,0);if(!(t&1))return pt(e,Ee()),null;var n=kl(e,t);if(e.tag!==0&&n===2){var r=gu(e);r!==0&&(t=r,n=qu(e,r))}if(n===1)throw n=Uo,Ir(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,mr(e,ut,cn),pt(e,Ee()),null}function dd(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Fi=Ee()+500,Fl&&ur())}}function Fr(e){Wn!==null&&Wn.tag===0&&!(se&6)&&hi();var t=se;se|=1;var n=Rt.transition,r=ce;try{if(Rt.transition=null,ce=1,e)return e()}finally{ce=r,Rt.transition=n,se=t,!(se&6)&&ur()}}function fd(){xt=ai.current,ve(ai)}function Ir(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Xv(n)),Ie!==null)for(n=Ie.return;n!==null;){var r=n;switch(Vc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ll();break;case 3:Ai(),ve(dt),ve(Ke),td();break;case 5:ed(r);break;case 4:Ai();break;case 13:ve(be);break;case 19:ve(be);break;case 10:Yc(r.type._context);break;case 22:case 23:fd()}n=n.return}if(Me=e,Ie=e=nr(e.current,null),$e=xt=t,Ae=0,Uo=null,ud=$l=zr=0,ut=bo=null,yr!==null){for(t=0;t<yr.length;t++)if(n=yr[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}yr=null}return e}function Zg(e,t){do{var n=Ie;try{if(Gc(),Bs.current=gl,ml){for(var r=we.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ml=!1}if(Ar=0,Fe=_e=we=null,vo=!1,Do=0,ad.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=$e,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=Xf(s);if(h!==null){h.flags&=-257,Jf(h,s,l,o,t),h.mode&1&&Yf(o,c,t),t=h,a=c;var m=t.updateQueue;if(m===null){var v=new Set;v.add(a),t.updateQueue=v}else m.add(a);break e}else{if(!(t&1)){Yf(o,c,t),pd();break e}a=Error(F(426))}}else if(ke&&l.mode&1){var w=Xf(s);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Jf(w,s,l,o,t),Wc(zi(a,l));break e}}o=a=zi(a,l),Ae!==4&&(Ae=2),bo===null?bo=[o]:bo.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=Fg(o,a,t);qf(o,g);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 b=Mg(o,l,t);qf(o,b);break e}}o=o.return}while(o!==null)}nx(n)}catch(E){t=E,Ie===n&&n!==null&&(Ie=n=n.return);continue}break}while(!0)}function ex(){var e=xl.current;return xl.current=gl,e===null?gl:e}function pd(){(Ae===0||Ae===3||Ae===2)&&(Ae=4),Me===null||!(zr&268435455)&&!($l&268435455)||zn(Me,$e)}function kl(e,t){var n=se;se|=2;var r=ex();(Me!==e||$e!==t)&&(cn=null,Ir(e,t));do try{w0();break}catch(i){Zg(e,i)}while(!0);if(Gc(),se=n,xl.current=r,Ie!==null)throw Error(F(261));return Me=null,$e=0,Ae}function w0(){for(;Ie!==null;)tx(Ie)}function S0(){for(;Ie!==null&&!K1();)tx(Ie)}function tx(e){var t=ix(e.alternate,e,xt);e.memoizedProps=e.pendingProps,t===null?nx(e):Ie=t,ad.current=null}function nx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=g0(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=m0(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 mr(e,t,n){var r=ce,i=Rt.transition;try{Rt.transition=null,ce=1,C0(e,t,n,r)}finally{Rt.transition=i,ce=r}return null}function C0(e,t,n,r){do hi();while(Wn!==null);if(se&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(iv(e,o),e===Me&&(Ie=Me=null,$e=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ps||(Ps=!0,ox(tl,function(){return hi(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Rt.transition,Rt.transition=null;var s=ce;ce=1;var l=se;se|=4,ad.current=null,y0(e,n),Yg(n,e),qv(wu),rl=!!bu,wu=bu=null,e.current=n,v0(n),G1(),se=l,ce=s,Rt.transition=o}else e.current=n;if(Ps&&(Ps=!1,Wn=e,vl=i),o=e.pendingLanes,o===0&&(er=null),J1(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(yl)throw yl=!1,e=Uu,Uu=null,e;return vl&1&&e.tag!==0&&hi(),o=e.pendingLanes,o&1?e===Hu?wo++:(wo=0,Hu=e):wo=0,ur(),null}function hi(){if(Wn!==null){var e=Fm(vl),t=Rt.transition,n=ce;try{if(Rt.transition=null,ce=16>e?16:e,Wn===null)var r=!1;else{if(e=Wn,Wn=null,vl=0,se&6)throw Error(F(331));var i=se;for(se|=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:ko(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(Wg(f),f===c){$=null;break}if(p!==null){p.return=h,$=p;break}$=h}}}var m=o.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var w=v.sibling;v.sibling=null,v=w}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:ko(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,$=g;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:Dl(9,l)}}catch(E){Ne(l,l.return,E)}if(l===s){$=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,$=b;break e}$=l.return}}if(se=i,ur(),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(_l,e)}catch{}r=!0}return r}finally{ce=n,Rt.transition=t}}return!1}function dp(e,t,n){t=zi(n,t),t=Fg(e,t,1),e=Zn(e,t,1),t=tt(),e!==null&&(ns(e,1,t),pt(e,t))}function Ne(e,t,n){if(e.tag===3)dp(e,e,n);else for(;t!==null;){if(t.tag===3){dp(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=Mg(t,e,1),t=Zn(t,e,1),e=tt(),t!==null&&(ns(t,1,e),pt(t,e));break}}t=t.return}}function j0(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tt(),e.pingedLanes|=e.suspendedLanes&n,Me===e&&($e&n)===n&&(Ae===4||Ae===3&&($e&130023424)===$e&&500>Ee()-cd?Ir(e,0):ud|=n),pt(e,t)}function rx(e,t){t===0&&(e.mode&1?(t=ys,ys<<=1,!(ys&130023424)&&(ys=4194304)):t=1);var n=tt();e=wn(e,t),e!==null&&(ns(e,t,n),pt(e,n))}function N0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rx(e,n)}function E0(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),rx(e,n)}var ix;ix=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,h0(e,t,n);ct=!!(e.flags&131072)}else ct=!1,ke&&t.flags&1048576&&ag(t,cl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=_i(t,Ke.current);pi(t,n),i=rd(null,t,r,e,i,n);var o=id();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,al(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Jc(t),i.updater=Ol,t.stateNode=i,i._reactInternals=t,_u(t,r,e,n),t=Au(null,t,r,!0,o,n)):(t.tag=0,ke&&o&&Qc(t),Je(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=T0(r),e=Mt(r,e),i){case 0:t=Lu(null,t,r,e,n);break e;case 1:t=tp(null,t,r,e,n);break e;case 11:t=Zf(null,t,r,e,n);break e;case 14:t=ep(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),Lu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mt(r,i),tp(e,t,r,i,n);case 3:e:{if(Bg(t),e===null)throw Error(F(387));r=t.pendingProps,o=t.memoizedState,i=o.element,hg(e,t),pl(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=np(e,t,r,n,i);break e}else if(r!==i){i=zi(Error(F(424)),t),t=np(e,t,r,n,i);break e}else for(bt=Jn(t.stateNode.containerInfo.firstChild),wt=t,ke=!0,$t=null,n=fg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ri(),r===i){t=Sn(e,t,n);break e}Je(e,t,r,n)}t=t.child}return t;case 5:return mg(t),e===null&&Pu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Su(r,i)?s=null:o!==null&&Su(r,o)&&(t.flags|=32),$g(e,t),Je(e,t,s,n),t.child;case 6:return e===null&&Pu(t),null;case 13:return Ug(e,t,n);case 4:return Zc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Li(t,null,r,n):Je(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mt(r,i),Zf(e,t,r,i,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(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(dl,r._currentValue),r._currentValue=s,o!==null)if(qt(o.value,s)){if(o.children===i.children&&!dt.current){t=Sn(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=yn(-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),Tu(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),Tu(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}Je(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,pi(t,n),i=Lt(i),r=r(i),t.flags|=1,Je(e,t,r,n),t.child;case 14:return r=t.type,i=Mt(r,t.pendingProps),i=Mt(r.type,i),ep(e,t,r,i,n);case 15:return Og(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Mt(r,i),Hs(e,t),t.tag=1,ft(r)?(e=!0,al(t)):e=!1,pi(t,n),zg(t,r,i),_u(t,r,i,n),Au(null,t,r,!0,e,n);case 19:return Hg(e,t,n);case 22:return Dg(e,t,n)}throw Error(F(156,t.tag))};function ox(e,t){return Rm(e,t)}function P0(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 P0(e,t,n,r)}function hd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function T0(e){if(typeof e=="function")return hd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Lc)return 11;if(e===Ac)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 Vs(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")hd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Jr:return _r(n.children,i,o,t);case Rc:s=8,i|=8;break;case tu:return e=_t(12,n,t,i|2),e.elementType=tu,e.lanes=o,e;case nu:return e=_t(13,n,t,i),e.elementType=nu,e.lanes=o,e;case ru:return e=_t(19,n,t,i),e.elementType=ru,e.lanes=o,e;case mm:return Bl(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pm:s=10;break e;case hm:s=9;break e;case Lc:s=11;break e;case Ac:s=14;break e;case Rn: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 _r(e,t,n,r){return e=_t(7,e,r,t),e.lanes=n,e}function Bl(e,t,n,r){return e=_t(22,e,r,t),e.elementType=mm,e.lanes=n,e.stateNode={isHidden:!1},e}function Ta(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function Ia(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 I0(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=ca(0),this.expirationTimes=ca(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function md(e,t,n,r,i,o,s,l,a){return e=new I0(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},Jc(o),e}function _0(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 sx(e){if(!e)return sr;e=e._reactInternals;e:{if(Br(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 sg(e,n,t)}return t}function lx(e,t,n,r,i,o,s,l,a){return e=md(n,r,!0,e,i,o,s,l,a),e.context=sx(null),n=e.current,r=tt(),i=tr(n),o=yn(r,i),o.callback=t??null,Zn(n,o,i),e.current.lanes=i,ns(e,i,r),pt(e,r),e}function Ul(e,t,n,r){var i=t.current,o=tt(),s=tr(i);return n=sx(n),t.context===null?t.context=n:t.pendingContext=n,t=yn(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Zn(i,t,s),e!==null&&(Ut(e,i,s,o),$s(e,i,s)),s}function bl(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 fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gd(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function R0(){return null}var ax=typeof reportError=="function"?reportError:function(e){console.error(e)};function xd(e){this._internalRoot=e}Hl.prototype.render=xd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));Ul(e,t,null,null)};Hl.prototype.unmount=xd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fr(function(){Ul(null,e,null,null)}),t[bn]=null}};function Hl(e){this._internalRoot=e}Hl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dm();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&&Bm(e)}};function yd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ql(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pp(){}function L0(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=bl(s);o.call(c)}}var s=lx(t,r,e,0,null,!1,!1,"",pp);return e._reactRootContainer=s,e[bn]=s.current,Ao(e.nodeType===8?e.parentNode:e),Fr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var c=bl(a);l.call(c)}}var a=md(e,0,!1,null,null,!1,!1,"",pp);return e._reactRootContainer=a,e[bn]=a.current,Ao(e.nodeType===8?e.parentNode:e),Fr(function(){Ul(t,a,n,r)}),a}function Ql(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=bl(s);l.call(a)}}Ul(t,s,e,i)}else s=L0(n,t,e,i,r);return bl(s)}Mm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=co(t.pendingLanes);n!==0&&(Mc(t,n|1),pt(t,Ee()),!(se&6)&&(Fi=Ee()+500,ur()))}break;case 13:Fr(function(){var r=wn(e,1);if(r!==null){var i=tt();Ut(r,e,1,i)}}),gd(e,1)}};Oc=function(e){if(e.tag===13){var t=wn(e,134217728);if(t!==null){var n=tt();Ut(t,e,134217728,n)}gd(e,134217728)}};Om=function(e){if(e.tag===13){var t=tr(e),n=wn(e,t);if(n!==null){var r=tt();Ut(n,e,t,r)}gd(e,t)}};Dm=function(){return ce};$m=function(e,t){var n=ce;try{return ce=e,t()}finally{ce=n}};pu=function(e,t,n){switch(t){case"input":if(su(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=zl(r);if(!i)throw Error(F(90));xm(r),su(r,i)}}}break;case"textarea":vm(e,n);break;case"select":t=n.value,t!=null&&ui(e,!!n.multiple,t,!1)}};Nm=dd;Em=Fr;var A0={usingClientEntryPoint:!1,Events:[is,ni,zl,Cm,jm,dd]},ro={findFiberByHostInstance:xr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},z0={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:Cn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Im(e),e===null?null:e.stateNode},findFiberByHostInstance:ro.findFiberByHostInstance||R0,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 Ts=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ts.isDisabled&&Ts.supportsFiber)try{_l=Ts.inject(z0),en=Ts}catch{}}jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A0;jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yd(t))throw Error(F(200));return _0(e,t,null,n)};jt.createRoot=function(e,t){if(!yd(e))throw Error(F(299));var n=!1,r="",i=ax;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=md(e,1,!1,null,null,n,!1,r,i),e[bn]=t.current,Ao(e.nodeType===8?e.parentNode:e),new xd(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=Im(t),e=e===null?null:e.stateNode,e};jt.flushSync=function(e){return Fr(e)};jt.hydrate=function(e,t,n){if(!ql(t))throw Error(F(200));return Ql(null,e,t,!0,n)};jt.hydrateRoot=function(e,t,n){if(!yd(e))throw Error(F(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=ax;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=lx(t,null,e,1,n??null,i,!1,o,s),e[bn]=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 Hl(t)};jt.render=function(e,t,n){if(!ql(t))throw Error(F(200));return Ql(null,e,t,!1,n)};jt.unmountComponentAtNode=function(e){if(!ql(e))throw Error(F(40));return e._reactRootContainer?(Fr(function(){Ql(null,null,e,!1,function(){e._reactRootContainer=null,e[bn]=null})}),!0):!1};jt.unstable_batchedUpdates=dd;jt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ql(n))throw Error(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return Ql(e,t,n,!1,r)};jt.version="18.3.1-next-f1338f8080-20240426";function ux(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ux)}catch(e){console.error(e)}}ux(),um.exports=jt;var F0=um.exports,cx,hp=F0;cx=hp.createRoot,hp.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(){}},br,Mn,xi,Bh,M0=(Bh=class extends Bi{constructor(){super();U(this,br);U(this,Mn);U(this,xi);D(this,xi,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,Mn)||this.setEventListener(j(this,xi))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Mn))==null||t.call(this),D(this,Mn,void 0))}setEventListener(t){var n;D(this,xi,t),(n=j(this,Mn))==null||n.call(this),D(this,Mn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){j(this,br)!==t&&(D(this,br,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof j(this,br)=="boolean"?j(this,br):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},br=new WeakMap,Mn=new WeakMap,xi=new WeakMap,Bh),vd=new M0,O0={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},On,Sc,Uh,D0=(Uh=class{constructor(){U(this,On,O0);U(this,Sc,!1)}setTimeoutProvider(e){D(this,On,e)}setTimeout(e,t){return j(this,On).setTimeout(e,t)}clearTimeout(e){j(this,On).clearTimeout(e)}setInterval(e,t){return j(this,On).setInterval(e,t)}clearInterval(e){j(this,On).clearInterval(e)}},On=new WeakMap,Sc=new WeakMap,Uh),kr=new D0;function $0(e){setTimeout(e,0)}var B0=typeof window>"u"||"Deno"in globalThis;function Ze(){}function U0(e,t){return typeof e=="function"?e(t):e}function Vu(e){return typeof e=="number"&&e>=0&&e!==1/0}function dx(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 mp(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:l}=e;if(s){if(r){if(t.queryHash!==kd(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 gp(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 kd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Mr)(e)}function Mr(e){return JSON.stringify(e,(t,n)=>Wu(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 H0=Object.prototype.hasOwnProperty;function fx(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=xp(e)&&xp(t);if(!r&&!(Wu(e)&&Wu(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:H0.call(e,d))&&c++;continue}if(p===null||h===null||typeof p!="object"||typeof h!="object"){a[d]=h;continue}const m=fx(p,h,n+1);a[d]=m,m===p&&c++}return o===l&&c===o?e:a}function wl(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 xp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Wu(e){if(!yp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!yp(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function yp(e){return Object.prototype.toString.call(e)==="[object Object]"}function q0(e){return new Promise(t=>{kr.setTimeout(t,e)})}function Ku(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?fx(e,t):t}function Q0(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function V0(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var bd=Symbol();function px(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===bd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function wd(e,t){return typeof e=="function"?e(...t):!!e}function W0(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=()=>B0;return{isServer(){return e()},setIsServer(t){e=t}}})();function Gu(){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 K0=$0;function G0(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=K0;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 Le=G0(),yi,Dn,vi,Hh,Y0=(Hh=class extends Bi{constructor(){super();U(this,yi,!0);U(this,Dn);U(this,vi);D(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(){j(this,Dn)||this.setEventListener(j(this,vi))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Dn))==null||t.call(this),D(this,Dn,void 0))}setEventListener(t){var n;D(this,vi,t),(n=j(this,Dn))==null||n.call(this),D(this,Dn,t(this.setOnline.bind(this)))}setOnline(t){j(this,yi)!==t&&(D(this,yi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return j(this,yi)}},yi=new WeakMap,Dn=new WeakMap,vi=new WeakMap,Hh),Sl=new Y0;function X0(e){return Math.min(1e3*2**e,3e4)}function hx(e){return(e??"online")==="online"?Sl.isOnline():!0}var Yu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function mx(e){let t=!1,n=0,r;const i=Gu(),o=()=>i.status!=="pending",s=v=>{var w;if(!o()){const g=new Yu(v);p(g),(w=e.onCancel)==null||w.call(e,g)}},l=()=>{t=!0},a=()=>{t=!1},c=()=>vd.isFocused()&&(e.networkMode==="always"||Sl.isOnline())&&e.canRun(),f=()=>hx(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 w;r=g=>{(o()||c())&&v(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var v;r=void 0,o()||(v=e.onContinue)==null||v.call(e)}),m=()=>{if(o())return;let v;const w=n===0?e.initialPromise:void 0;try{v=w??e.fn()}catch(g){v=Promise.reject(g)}Promise.resolve(v).then(d).catch(g=>{var C;if(o())return;const x=e.retry??(qo.isServer()?0:3),y=e.retryDelay??X0,b=typeof y=="function"?y(n,g):y,E=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,g);if(t||!E){p(g);return}n++,(C=e.onFail)==null||C.call(e,n,g),q0(b).then(()=>c()?void 0:h()).then(()=>{t?p(g):m()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:a,canStart:f,start:()=>(f()?m():h().then(m),i)}}var wr,qh,gx=(qh=class{constructor(){U(this,wr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vu(this.gcTime)&&D(this,wr,kr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qo.isServer()?1/0:5*60*1e3))}clearGcTimeout(){j(this,wr)!==void 0&&(kr.clearTimeout(j(this,wr)),D(this,wr,void 0))}},wr=new WeakMap,qh);function J0(e){return{onFetch:(t,n)=>{var f,d,p,h,m;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=((m=t.state.data)==null?void 0:m.pageParams)||[];let l={pages:[],pageParams:[]},a=0;const c=async()=>{let v=!1;const w=y=>{W0(y,()=>t.signal,()=>v=!0)},g=px(t.options,t.fetchOptions),x=async(y,b,E)=>{if(v)return Promise.reject(t.signal.reason);if(b==null&&y.pages.length)return Promise.resolve(y);const I=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:b,direction:E?"backward":"forward",meta:t.options.meta};return w(z),z})(),T=await g(I),{maxPages:A}=t.options,N=E?V0:Q0;return{pages:N(y.pages,T,A),pageParams:N(y.pageParams,b,A)}};if(i&&o.length){const y=i==="backward",b=y?Z0:vp,E={pages:o,pageParams:s},C=b(r,E);l=await x(E,C,y)}else{const y=e??o.length;do{const b=a===0?s[0]??r.initialPageParam:vp(r,l);if(a>0&&b==null)break;l=await x(l,b),a++}while(a<y)}return l};t.options.persister?t.fetchFn=()=>{var v,w;return(w=(v=t.options).persister)==null?void 0:w.call(v,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function vp(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 Z0(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 ki,Sr,bi,Et,Cr,ze,Yo,jr,yt,xx,un,Qh,ek=(Qh=class extends gx{constructor(t){super();U(this,yt);U(this,ki);U(this,Sr);U(this,bi);U(this,Et);U(this,Cr);U(this,ze);U(this,Yo);U(this,jr);D(this,jr,!1),D(this,Yo,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Cr,t.client),D(this,Et,j(this,Cr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Sr,bp(this.options)),this.state=t.state??j(this,Sr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return j(this,ki)}get promise(){var t;return(t=j(this,ze))==null?void 0:t.promise}setOptions(t){if(this.options={...j(this,Yo),...t},t!=null&&t._type&&D(this,ki,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=bp(this.options);n.data!==void 0&&(this.setState(kp(n.data,n.dataUpdatedAt)),D(this,Sr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Et).remove(this)}setData(t,n){const r=Ku(this.state.data,t,this.options);return X(this,yt,un).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){X(this,yt,un).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=j(this,ze))==null?void 0:r.promise;return(i=j(this,ze))==null||i.cancel(t),n?n.then(Ze).catch(Ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return j(this,Sr)}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===bd||!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:!dx(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,ze))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,ze))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(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||(j(this,ze)&&(j(this,jr)||X(this,yt,xx).call(this)?j(this,ze).cancel({revert:!0}):j(this,ze).cancelRetry()),this.scheduleGc()),j(this,Et).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,yt,un).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,d,p,h,m,v,w,g,x,y;if(this.state.fetchStatus!=="idle"&&((c=j(this,ze))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,ze))return j(this,ze).continueRetry(),j(this,ze).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(E=>E.options.queryFn);b&&this.setOptions(b.options)}const r=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(D(this,jr,!0),r.signal)})},o=()=>{const b=px(this.options,n),C=(()=>{const I={client:j(this,Cr),queryKey:this.queryKey,meta:this.meta};return i(I),I})();return D(this,jr,!1),this.options.persister?this.options.persister(b,C,this):b(C)},l=(()=>{const b={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:j(this,Cr),state:this.state,fetchFn:o};return i(b),b})(),a=j(this,ki)==="infinite"?J0(this.options.pages):this.options.behavior;a==null||a.onFetch(l,this),D(this,bi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&X(this,yt,un).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta}),D(this,ze,mx({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:b=>{b instanceof Yu&&b.revert&&this.setState({...j(this,bi),fetchStatus:"idle"}),r.abort()},onFail:(b,E)=>{X(this,yt,un).call(this,{type:"failed",failureCount:b,error:E})},onPause:()=>{X(this,yt,un).call(this,{type:"pause"})},onContinue:()=>{X(this,yt,un).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const b=await j(this,ze).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(h=(p=j(this,Et).config).onSuccess)==null||h.call(p,b,this),(v=(m=j(this,Et).config).onSettled)==null||v.call(m,b,this.state.error,this),b}catch(b){if(b instanceof Yu){if(b.silent)return j(this,ze).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw X(this,yt,un).call(this,{type:"error",error:b}),(g=(w=j(this,Et).config).onError)==null||g.call(w,b,this),(y=(x=j(this,Et).config).onSettled)==null||y.call(x,this.state.data,b,this),b}finally{this.scheduleGc()}}},ki=new WeakMap,Sr=new WeakMap,bi=new WeakMap,Et=new WeakMap,Cr=new WeakMap,ze=new WeakMap,Yo=new WeakMap,jr=new WeakMap,yt=new WeakSet,xx=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},un=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,...yx(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...kp(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return D(this,bi,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),Le.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,Et).notify({query:this,type:"updated",action:t})})},Qh);function yx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hx(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function bp(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,re,Xo,Ye,Nr,wi,fn,$n,Jo,Si,Ci,Er,Pr,Bn,ji,ae,po,Xu,Ju,Zu,ec,tc,nc,rc,vx,Vh,tk=(Vh=class extends Bi{constructor(t,n){super();U(this,ae);U(this,lt);U(this,re);U(this,Xo);U(this,Ye);U(this,Nr);U(this,wi);U(this,fn);U(this,$n);U(this,Jo);U(this,Si);U(this,Ci);U(this,Er);U(this,Pr);U(this,Bn);U(this,ji,new Set);this.options=n,D(this,lt,t),D(this,$n,null),D(this,fn,Gu()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,re).addObserver(this),wp(j(this,re),this.options)?X(this,ae,po).call(this):this.updateResult(),X(this,ae,ec).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ic(j(this,re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ic(j(this,re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,tc).call(this),X(this,ae,nc).call(this),j(this,re).removeObserver(this)}setOptions(t){const n=this.options,r=j(this,re);if(this.options=j(this,lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vt(this.options.enabled,j(this,re))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,rc).call(this),j(this,re).setOptions(this.options),n._defaulted&&!wl(this.options,n)&&j(this,lt).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,re),observer:this});const i=this.hasListeners();i&&Sp(j(this,re),r,this.options,n)&&X(this,ae,po).call(this),this.updateResult(),i&&(j(this,re)!==r||vt(this.options.enabled,j(this,re))!==vt(n.enabled,j(this,re))||rr(this.options.staleTime,j(this,re))!==rr(n.staleTime,j(this,re)))&&X(this,ae,Xu).call(this);const o=X(this,ae,Ju).call(this);i&&(j(this,re)!==r||vt(this.options.enabled,j(this,re))!==vt(n.enabled,j(this,re))||o!==j(this,Bn))&&X(this,ae,Zu).call(this,o)}getOptimisticResult(t){const n=j(this,lt).getQueryCache().build(j(this,lt),t),r=this.createResult(n,t);return rk(this,r)&&(D(this,Ye,r),D(this,wi,this.options),D(this,Nr,j(this,re).state)),r}getCurrentResult(){return j(this,Ye)}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&&j(this,fn).status==="pending"&&j(this,fn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){j(this,ji).add(t)}getCurrentQuery(){return j(this,re)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=j(this,lt).defaultQueryOptions(t),r=j(this,lt).getQueryCache().build(j(this,lt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,po).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,Ye)))}createResult(t,n){var A;const r=j(this,re),i=this.options,o=j(this,Ye),s=j(this,Nr),l=j(this,wi),c=t!==r?t.state:j(this,Xo),{state:f}=t;let d={...f},p=!1,h;if(n._optimisticResults){const N=this.hasListeners(),z=!N&&wp(t,n),R=N&&Sp(t,r,n,i);(z||R)&&(d={...d,...yx(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:v,status:w}=d;h=d.data;let g=!1;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let N;o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(N=o.data,g=!0):N=typeof n.placeholderData=="function"?n.placeholderData((A=j(this,Ci))==null?void 0:A.state.data,j(this,Ci)):n.placeholderData,N!==void 0&&(w="success",h=Ku(o==null?void 0:o.data,N,n),p=!0)}if(n.select&&h!==void 0&&!g)if(o&&h===(s==null?void 0:s.data)&&n.select===j(this,Jo))h=j(this,Si);else try{D(this,Jo,n.select),h=n.select(h),h=Ku(o==null?void 0:o.data,h,n),D(this,Si,h),D(this,$n,null)}catch(N){D(this,$n,N)}j(this,$n)&&(m=j(this,$n),h=j(this,Si),v=Date.now(),w="error");const x=d.fetchStatus==="fetching",y=w==="pending",b=w==="error",E=y&&x,C=h!==void 0,T={status:w,fetchStatus:d.fetchStatus,isPending:y,isSuccess:w==="success",isError:b,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:d.dataUpdatedAt,error:m,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:b&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:b&&C,isStale:Sd(t,n),refetch:this.refetch,promise:j(this,fn),isEnabled:vt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const N=T.data!==void 0,z=T.status==="error"&&!N,R=q=>{z?q.reject(T.error):N&&q.resolve(T.data)},G=()=>{const q=D(this,fn,T.promise=Gu());R(q)},K=j(this,fn);switch(K.status){case"pending":t.queryHash===r.queryHash&&R(K);break;case"fulfilled":(z||T.data!==K.value)&&G();break;case"rejected":(!z||T.error!==K.reason)&&G();break}}return T}updateResult(){const t=j(this,Ye),n=this.createResult(j(this,re),this.options);if(D(this,Nr,j(this,re).state),D(this,wi,this.options),j(this,Nr).data!==void 0&&D(this,Ci,j(this,re)),wl(n,t))return;D(this,Ye,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!j(this,ji).size)return!0;const s=new Set(o??j(this,ji));return this.options.throwOnError&&s.add("error"),Object.keys(j(this,Ye)).some(l=>{const a=l;return j(this,Ye)[a]!==t[a]&&s.has(a)})};X(this,ae,vx).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,ec).call(this)}},lt=new WeakMap,re=new WeakMap,Xo=new WeakMap,Ye=new WeakMap,Nr=new WeakMap,wi=new WeakMap,fn=new WeakMap,$n=new WeakMap,Jo=new WeakMap,Si=new WeakMap,Ci=new WeakMap,Er=new WeakMap,Pr=new WeakMap,Bn=new WeakMap,ji=new WeakMap,ae=new WeakSet,po=function(t){X(this,ae,rc).call(this);let n=j(this,re).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ze)),n},Xu=function(){X(this,ae,tc).call(this);const t=rr(this.options.staleTime,j(this,re));if(qo.isServer()||j(this,Ye).isStale||!Vu(t))return;const r=dx(j(this,Ye).dataUpdatedAt,t)+1;D(this,Er,kr.setTimeout(()=>{j(this,Ye).isStale||this.updateResult()},r))},Ju=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,re)):this.options.refetchInterval)??!1},Zu=function(t){X(this,ae,nc).call(this),D(this,Bn,t),!(qo.isServer()||vt(this.options.enabled,j(this,re))===!1||!Vu(j(this,Bn))||j(this,Bn)===0)&&D(this,Pr,kr.setInterval(()=>{(this.options.refetchIntervalInBackground||vd.isFocused())&&X(this,ae,po).call(this)},j(this,Bn)))},ec=function(){X(this,ae,Xu).call(this),X(this,ae,Zu).call(this,X(this,ae,Ju).call(this))},tc=function(){j(this,Er)!==void 0&&(kr.clearTimeout(j(this,Er)),D(this,Er,void 0))},nc=function(){j(this,Pr)!==void 0&&(kr.clearInterval(j(this,Pr)),D(this,Pr,void 0))},rc=function(){const t=j(this,lt).getQueryCache().build(j(this,lt),this.options);if(t===j(this,re))return;const n=j(this,re);D(this,re,t),D(this,Xo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},vx=function(t){Le.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(j(this,Ye))}),j(this,lt).getQueryCache().notify({query:j(this,re),type:"observerResultsUpdated"})})},Vh);function nk(e,t){return vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&vt(t.retryOnMount,e)===!1)}function wp(e,t){return nk(e,t)||e.state.data!==void 0&&ic(e,t,t.refetchOnMount)}function ic(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&&Sd(e,t)}return!1}function Sp(e,t,n,r){return(e!==t||vt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Sd(e,n)}function Sd(e,t){return vt(t.enabled,e)!==!1&&e.isStaleByTime(rr(t.staleTime,e))}function rk(e,t){return!wl(e.getCurrentResult(),t)}var Zo,Yt,Qe,Tr,Xt,_n,Wh,ik=(Wh=class extends gx{constructor(t){super();U(this,Xt);U(this,Zo);U(this,Yt);U(this,Qe);U(this,Tr);D(this,Zo,t.client),this.mutationId=t.mutationId,D(this,Qe,t.mutationCache),D(this,Yt,[]),this.state=t.state||kx(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,Yt).includes(t)||(j(this,Yt).push(t),this.clearGcTimeout(),j(this,Qe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Yt,j(this,Yt).filter(n=>n!==t)),this.scheduleGc(),j(this,Qe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,Yt).length||(this.state.status==="pending"?this.scheduleGc():j(this,Qe).remove(this))}continue(){var t;return((t=j(this,Tr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,l,a,c,f,d,p,h,m,v,w,g,x,y,b,E,C,I;const n=()=>{X(this,Xt,_n).call(this,{type:"continue"})},r={client:j(this,Zo),meta:this.options.meta,mutationKey:this.options.mutationKey};D(this,Tr,mx({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(T,A)=>{X(this,Xt,_n).call(this,{type:"failed",failureCount:T,error:A})},onPause:()=>{X(this,Xt,_n).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,Qe).canRun(this)}));const i=this.state.status==="pending",o=!j(this,Tr).canStart();try{if(i)n();else{X(this,Xt,_n).call(this,{type:"pending",variables:t,isPaused:o}),j(this,Qe).config.onMutate&&await j(this,Qe).config.onMutate(t,this,r);const A=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t,r));A!==this.state.context&&X(this,Xt,_n).call(this,{type:"pending",context:A,variables:t,isPaused:o})}const T=await j(this,Tr).start();return await((c=(a=j(this,Qe).config).onSuccess)==null?void 0:c.call(a,T,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,T,t,this.state.context,r)),await((h=(p=j(this,Qe).config).onSettled)==null?void 0:h.call(p,T,null,this.state.variables,this.state.context,this,r)),await((v=(m=this.options).onSettled)==null?void 0:v.call(m,T,null,t,this.state.context,r)),X(this,Xt,_n).call(this,{type:"success",data:T}),T}catch(T){try{await((g=(w=j(this,Qe).config).onError)==null?void 0:g.call(w,T,t,this.state.context,this,r))}catch(A){Promise.reject(A)}try{await((y=(x=this.options).onError)==null?void 0:y.call(x,T,t,this.state.context,r))}catch(A){Promise.reject(A)}try{await((E=(b=j(this,Qe).config).onSettled)==null?void 0:E.call(b,void 0,T,this.state.variables,this.state.context,this,r))}catch(A){Promise.reject(A)}try{await((I=(C=this.options).onSettled)==null?void 0:I.call(C,void 0,T,t,this.state.context,r))}catch(A){Promise.reject(A)}throw X(this,Xt,_n).call(this,{type:"error",error:T}),T}finally{j(this,Qe).runNext(this)}}},Zo=new WeakMap,Yt=new WeakMap,Qe=new WeakMap,Tr=new WeakMap,Xt=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),Le.batch(()=>{j(this,Yt).forEach(r=>{r.onMutationUpdate(t)}),j(this,Qe).notify({mutation:this,type:"updated",action:t})})},Wh);function kx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pn,Ot,es,Kh,ok=(Kh=class extends Bi{constructor(t={}){super();U(this,pn);U(this,Ot);U(this,es);this.config=t,D(this,pn,new Set),D(this,Ot,new Map),D(this,es,0)}build(t,n,r){const i=new ik({client:t,mutationCache:this,mutationId:++ds(this,es)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){j(this,pn).add(t);const n=Is(t);if(typeof n=="string"){const r=j(this,Ot).get(n);r?r.push(t):j(this,Ot).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(j(this,pn).delete(t)){const n=Is(t);if(typeof n=="string"){const r=j(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&&j(this,Ot).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Is(t);if(typeof n=="string"){const r=j(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=Is(t);if(typeof n=="string"){const i=(r=j(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(){Le.batch(()=>{j(this,pn).forEach(t=>{this.notify({type:"removed",mutation:t})}),j(this,pn).clear(),j(this,Ot).clear()})}getAll(){return Array.from(j(this,pn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gp(n,r))}findAll(t={}){return this.getAll().filter(n=>gp(t,n))}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Le.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ze))))}},pn=new WeakMap,Ot=new WeakMap,es=new WeakMap,Kh);function Is(e){var t;return(t=e.options.scope)==null?void 0:t.id}var hn,Un,at,mn,vn,Ws,oc,Gh,sk=(Gh=class extends Bi{constructor(n,r){super();U(this,vn);U(this,hn);U(this,Un);U(this,at);U(this,mn);D(this,hn,n),this.setOptions(r),this.bindMethods(),X(this,vn,Ws).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=j(this,hn).defaultMutationOptions(n),wl(this.options,r)||j(this,hn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,at),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Mr(r.mutationKey)!==Mr(this.options.mutationKey)?this.reset():((i=j(this,at))==null?void 0:i.state.status)==="pending"&&j(this,at).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=j(this,at))==null||n.removeObserver(this)}onMutationUpdate(n){X(this,vn,Ws).call(this),X(this,vn,oc).call(this,n)}getCurrentResult(){return j(this,Un)}reset(){var n;(n=j(this,at))==null||n.removeObserver(this),D(this,at,void 0),X(this,vn,Ws).call(this),X(this,vn,oc).call(this)}mutate(n,r){var i;return D(this,mn,r),(i=j(this,at))==null||i.removeObserver(this),D(this,at,j(this,hn).getMutationCache().build(j(this,hn),this.options)),j(this,at).addObserver(this),j(this,at).execute(n)}},hn=new WeakMap,Un=new WeakMap,at=new WeakMap,mn=new WeakMap,vn=new WeakSet,Ws=function(){var r;const n=((r=j(this,at))==null?void 0:r.state)??kx();D(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})},oc=function(n){Le.batch(()=>{var r,i,o,s,l,a,c,f;if(j(this,mn)&&this.hasListeners()){const d=j(this,Un).variables,p=j(this,Un).context,h={client:j(this,hn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=j(this,mn)).onSuccess)==null||i.call(r,n.data,d,p,h)}catch(m){Promise.reject(m)}try{(s=(o=j(this,mn)).onSettled)==null||s.call(o,n.data,null,d,p,h)}catch(m){Promise.reject(m)}}else if((n==null?void 0:n.type)==="error"){try{(a=(l=j(this,mn)).onError)==null||a.call(l,n.error,d,p,h)}catch(m){Promise.reject(m)}try{(f=(c=j(this,mn)).onSettled)==null||f.call(c,void 0,n.error,d,p,h)}catch(m){Promise.reject(m)}}}this.listeners.forEach(d=>{d(j(this,Un))})})},Gh),Jt,Yh,lk=(Yh=class extends Bi{constructor(t={}){super();U(this,Jt);this.config=t,D(this,Jt,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??kd(i,n);let s=this.get(o);return s||(s=new ek({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){j(this,Jt).has(t.queryHash)||(j(this,Jt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=j(this,Jt).get(t.queryHash);n&&(t.destroy(),n===t&&j(this,Jt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,Jt).get(t)}getAll(){return[...j(this,Jt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>mp(t,r)):n}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Le.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Le.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Jt=new WeakMap,Yh),je,Hn,qn,Ni,Ei,Qn,Pi,Ti,Xh,ak=(Xh=class{constructor(e={}){U(this,je);U(this,Hn);U(this,qn);U(this,Ni);U(this,Ei);U(this,Qn);U(this,Pi);U(this,Ti);D(this,je,e.queryCache||new lk),D(this,Hn,e.mutationCache||new ok),D(this,qn,e.defaultOptions||{}),D(this,Ni,new Map),D(this,Ei,new Map),D(this,Qn,0)}mount(){ds(this,Qn)._++,j(this,Qn)===1&&(D(this,Pi,vd.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,je).onFocus())})),D(this,Ti,Sl.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,je).onOnline())})))}unmount(){var e,t;ds(this,Qn)._--,j(this,Qn)===0&&((e=j(this,Pi))==null||e.call(this),D(this,Pi,void 0),(t=j(this,Ti))==null||t.call(this),D(this,Ti,void 0))}isFetching(e){return j(this,je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,Hn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=j(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 j(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=j(this,je).get(r.queryHash),o=i==null?void 0:i.state.data,s=U0(t,o);if(s!==void 0)return j(this,je).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Le.batch(()=>j(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=j(this,je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=j(this,je);Le.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=j(this,je);return Le.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Le.batch(()=>j(this,je).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ze).catch(Ze)}invalidateQueries(e,t={}){return Le.batch(()=>(j(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=Le.batch(()=>j(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(Ze)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ze)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=j(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(Ze).catch(Ze)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ze).catch(Ze)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Sl.isOnline()?j(this,Hn).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,je)}getMutationCache(){return j(this,Hn)}getDefaultOptions(){return j(this,qn)}setDefaultOptions(e){D(this,qn,e)}setQueryDefaults(e,t){j(this,Ni).set(Mr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,Ni).values()],n={};return t.forEach(r=>{Ho(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){j(this,Ei).set(Mr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(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={...j(this,qn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=kd(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===bd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,qn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,je).clear(),j(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,Xh),bx=P.createContext(void 0),Pe=e=>{const t=P.useContext(bx);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},uk=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(bx.Provider,{value:e,children:t})),wx=P.createContext(!1),ck=()=>P.useContext(wx);wx.Provider;function dk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fk=P.createContext(dk()),pk=()=>P.useContext(fk),hk=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?wd(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},mk=e=>{P.useEffect(()=>{e.clearReset()},[e])},gk=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||wd(n,[e.error,r])),xk=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))}},yk=(e,t)=>e.isLoading&&e.isFetching&&!t,vk=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Cp=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function kk(e,t,n){var p,h,m,v;const r=ck(),i=pk(),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",xk(s),hk(s,i,l),mk(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(w=>{const g=d?c.subscribe(Le.batchCalls(w)):Ze;return c.updateResult(),g},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),P.useEffect(()=>{c.setOptions(s)},[s,c]),vk(s,f))throw Cp(s,c,i);if(gk({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:l,suspense:s.suspense}))throw f.error;if((v=(m=o.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||v.call(m,s,f),s.experimental_prefetchInRender&&!qo.isServer()&&yk(f,r)){const w=a?Cp(s,c,i):l==null?void 0:l.promise;w==null||w.catch(Ze).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?f:c.trackResult(f)}function nn(e,t){return kk(e,tk)}function Oe(e,t){const n=Pe(),[r]=P.useState(()=>new sk(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);const i=P.useSyncExternalStore(P.useCallback(s=>r.subscribe(Le.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=P.useCallback((s,l)=>{r.mutate(s,l).catch(Ze)},[r]);if(i.error&&wd(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}class bk{constructor(){Vt(this,"ws");Vt(this,"listeners",new Set);Vt(this,"reconnectListeners",new Set);Vt(this,"reconnectAttempt",0);Vt(this,"shouldRun",!1);Vt(this,"url");Vt(this,"outbox",[]);Vt(this,"lastSubscribe");Vt(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 bk;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(wk(r)??`${n.status} ${n.statusText}${r?`: ${r}`:""}`)}return await n.json()}function wk(e){if(e)try{const t=JSON.parse(e);if(t&&typeof t.error=="string"&&t.error.length>0)return t.error}catch{}}const Vl=e=>["config",e],Sk=(e,t)=>["config",e,t??"__none__"];function Sx(e,t){return nn({queryKey:Sk(e,t),queryFn:()=>{if(!e)throw new Error("workspaceId required");return de(`/api/workspaces/${encodeURIComponent(e)}/config`)},enabled:!!e})}function Ck(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:Vl(e)})})}function jk(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:Vl(e)})})}function Nk(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:Vl(e)})})}function Ek(){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:Vl(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 Pk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Cx=(...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 Tk={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 Ik=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,...Tk,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Cx("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 Ce=(e,t)=>{const n=P.forwardRef(({className:r,...i},o)=>P.createElement(Ik,{ref:o,iconNode:t,className:Cx(`lucide-${Pk(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 jx=Ce("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 _k=Ce("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=Ce("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 Ur=Ce("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 Nx=Ce("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 Cd=Ce("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 Rk=Ce("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 Lk=Ce("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
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 Ex=Ce("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"}]]);/**
|
|
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 Ak=Ce("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"}]]);/**
|
|
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 Px=Ce("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"}]]);/**
|
|
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 zk=Ce("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"}]]);/**
|
|
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 Fk=Ce("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
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 Qt=Ce("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
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 sc=Ce("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"}]]);/**
|
|
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 Wl=Ce("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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 Mk=Ce("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"}]]);/**
|
|
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 Ok=Ce("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"}]]);/**
|
|
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 Tx=Ce("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"}]]);/**
|
|
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 Dk=Ce("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
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 Qo=Ce("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"}]]);/**
|
|
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 jp=Ce("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"}]]);/**
|
|
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 Ui=Ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function $k(e,t,n=!0){return nn({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 Bk(e,t,n=!0){const r=t.toLowerCase();return nn({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 cr=e=>["resources",e],Kl=e=>["resources",e,"skill-body"],Gl=e=>["resources",e,"prompt-body"];function rn(e,t=""){return`/api/workspaces/${encodeURIComponent(e)}/resources${t}`}function jd(e){return nn({queryKey:cr(e),queryFn:()=>{if(!e)throw new Error("workspaceId required");return de(rn(e))},enabled:!!e})}function Uk(e){const t=Pe();return Oe({mutationFn:()=>de(rn(e,"/reload"),{method:"POST"}),onSuccess:n=>{t.setQueryData(cr(e),n),t.invalidateQueries({queryKey:Kl(e)}),t.invalidateQueries({queryKey:Gl(e)})}})}function Hk(e,t){return nn({queryKey:[...Kl(e),t],queryFn:()=>{if(!t)throw new Error("filePath required");return de(`${rn(e,"/skill")}?path=${encodeURIComponent(t)}`)},enabled:!!t,refetchOnWindowFocus:!1,staleTime:1/0})}function qk(e){const t=Pe();return Oe({mutationFn:n=>de(rn(e,"/skills"),{method:"POST",body:JSON.stringify(n)}),onSuccess:n=>t.setQueryData(cr(e),n)})}function Qk(e){const t=Pe();return Oe({mutationFn:n=>de(rn(e,"/skills"),{method:"PUT",body:JSON.stringify(n)}),onSuccess:n=>{t.setQueryData(cr(e),n),t.invalidateQueries({queryKey:Kl(e)})}})}function Vk(e){const t=Pe();return Oe({mutationFn:({filePath:n})=>de(`${rn(e,"/skills")}?path=${encodeURIComponent(n)}`,{method:"DELETE"}),onSuccess:n=>{t.setQueryData(cr(e),n),t.invalidateQueries({queryKey:Kl(e)})}})}function Wk(e,t){return nn({queryKey:[...Gl(e),t],queryFn:()=>{if(!t)throw new Error("filePath required");return de(`${rn(e,"/prompt")}?path=${encodeURIComponent(t)}`)},enabled:!!t,refetchOnWindowFocus:!1,staleTime:1/0})}function Kk(e){const t=Pe();return Oe({mutationFn:n=>de(rn(e,"/prompts"),{method:"POST",body:JSON.stringify(n)}),onSuccess:n=>t.setQueryData(cr(e),n)})}function Gk(e){const t=Pe();return Oe({mutationFn:n=>de(rn(e,"/prompts"),{method:"PUT",body:JSON.stringify(n)}),onSuccess:n=>{t.setQueryData(cr(e),n),t.invalidateQueries({queryKey:Gl(e)})}})}function Yk(e){const t=Pe();return Oe({mutationFn:({filePath:n})=>de(`${rn(e,"/prompts")}?path=${encodeURIComponent(n)}`,{method:"DELETE"}),onSuccess:n=>{t.setQueryData(cr(e),n),t.invalidateQueries({queryKey:Gl(e)})}})}function Xk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Jk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eb={};function Np(e,t){return(eb.jsx?Zk:Jk).test(e)}const tb=/[ \t\n\f\r]/g;function nb(e){return typeof e=="object"?e.type==="text"?Ep(e.value):!1:Ep(e)}function Ep(e){return e.replace(tb,"")===""}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 Ix(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 lc(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 rb=0;const Z=Hr(),Te=Hr(),ac=Hr(),M=Hr(),he=Hr(),mi=Hr(),gt=Hr();function Hr(){return 2**++rb}const uc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Z,booleanish:Te,commaOrSpaceSeparated:gt,commaSeparated:mi,number:M,overloadedBoolean:ac,spaceSeparated:he},Symbol.toStringTag,{value:"Module"})),_a=Object.keys(uc);class Nd extends ht{constructor(t,n,r,i){let o=-1;if(super(t,n),Pp(this,"space",i),typeof r=="number")for(;++o<_a.length;){const s=_a[o];Pp(this,_a[o],(r&uc[s])===uc[s])}}}Nd.prototype.defined=!0;function Pp(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 Nd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[lc(r)]=r,n[lc(o.attribute)]=r}return new ls(t,n,e.space)}const _x=Hi({properties:{ariaActiveDescendant:null,ariaAtomic:Te,ariaAutoComplete:null,ariaBusy:Te,ariaChecked:Te,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,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:M,ariaLive:null,ariaModal:Te,ariaMultiLine:Te,ariaMultiSelectable:Te,ariaOrientation:null,ariaOwns:he,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:Te,ariaReadOnly:Te,ariaRelevant:null,ariaRequired:Te,ariaRoleDescription:he,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:Te,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Rx(e,t){return t in e?e[t]:t}function Lx(e,t){return Rx(e,t.toLowerCase())}const ib=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:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:he,autoFocus:Z,autoPlay:Z,blocking:he,capture:null,charSet:null,checked:Z,cite:null,className:he,cols:M,colSpan:null,content:null,contentEditable:Te,controls:Z,controlsList:he,coords:M|mi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:ac,draggable:Te,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:he,height:M,hidden:ac,high:M,href:null,hrefLang:null,htmlFor:he,httpEquiv:he,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:he,itemRef:he,itemScope:Z,itemType:he,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,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:Z,optimum:M,pattern:null,ping:he,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:he,required:Z,reversed:Z,rows:M,rowSpan:M,sandbox:he,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:Te,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:Te,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:he,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:Te,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:Lx}),ob=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:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,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:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,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:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:gt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,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:M,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:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:he,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,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:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:gt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gt,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,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:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Rx}),Ax=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()}}),zx=Hi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Lx}),Fx=Hi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),sb={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"},lb=/[A-Z]/g,Tp=/-[a-z]/g,ab=/^data[-\w.:]+$/i;function ub(e,t){const n=lc(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"&&ab.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Tp,db);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Tp.test(o)){let s=o.replace(lb,cb);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Nd}return new i(r,t)}function cb(e){return"-"+e.toLowerCase()}function db(e){return e.charAt(1).toUpperCase()}const fb=Ix([_x,ib,Ax,zx,Fx],"html"),Ed=Ix([_x,ob,Ax,zx,Fx],"svg");function pb(e){return e.join(" ").trim()}var Pd={},Ip=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,hb=/\n/g,mb=/^\s*/,gb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xb=/^:\s*/,yb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,vb=/^[;\s]*/,kb=/^\s+|\s+$/g,bb=`
|
|
176
|
+
`,_p="/",Rp="*",gr="",wb="comment",Sb="declaration";function Cb(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(m){var v=m.match(hb);v&&(n+=v.length);var w=m.lastIndexOf(bb);r=~w?m.length-w:r+m.length}function o(){var m={line:n,column:r};return function(v){return v.position=new s(m),c(),v}}function s(m){this.start=m,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(m){var v=new Error(t.source+":"+n+":"+r+": "+m);if(v.reason=m,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function a(m){var v=m.exec(e);if(v){var w=v[0];return i(w),e=e.slice(w.length),v}}function c(){a(mb)}function f(m){var v;for(m=m||[];v=d();)v!==!1&&m.push(v);return m}function d(){var m=o();if(!(_p!=e.charAt(0)||Rp!=e.charAt(1))){for(var v=2;gr!=e.charAt(v)&&(Rp!=e.charAt(v)||_p!=e.charAt(v+1));)++v;if(v+=2,gr===e.charAt(v-1))return l("End of comment missing");var w=e.slice(2,v-2);return r+=2,i(w),e=e.slice(v),r+=2,m({type:wb,comment:w})}}function p(){var m=o(),v=a(gb);if(v){if(d(),!a(xb))return l("property missing ':'");var w=a(yb),g=m({type:Sb,property:Lp(v[0].replace(Ip,gr)),value:w?Lp(w[0].replace(Ip,gr)):gr});return a(vb),g}}function h(){var m=[];f(m);for(var v;v=p();)v!==!1&&(m.push(v),f(m));return m}return c(),h()}function Lp(e){return e?e.replace(kb,gr):gr}var jb=Cb,Nb=Xs&&Xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pd,"__esModule",{value:!0});Pd.default=Pb;const Eb=Nb(jb);function Pb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Eb.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 Yl={};Object.defineProperty(Yl,"__esModule",{value:!0});Yl.camelCase=void 0;var Tb=/^--[a-zA-Z0-9_-]+$/,Ib=/-([a-z])/g,_b=/^[^-]+$/,Rb=/^-(webkit|moz|ms|o|khtml)-/,Lb=/^-(ms)-/,Ab=function(e){return!e||_b.test(e)||Tb.test(e)},zb=function(e,t){return t.toUpperCase()},Ap=function(e,t){return"".concat(t,"-")},Fb=function(e,t){return t===void 0&&(t={}),Ab(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Lb,Ap):e=e.replace(Rb,Ap),e.replace(Ib,zb))};Yl.camelCase=Fb;var Mb=Xs&&Xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ob=Mb(Pd),Db=Yl;function cc(e,t){var n={};return!e||typeof e!="string"||(0,Ob.default)(e,function(r,i){r&&i&&(n[(0,Db.camelCase)(r,t)]=i)}),n}cc.default=cc;var $b=cc;const Bb=Cc($b),Mx=Ox("end"),Td=Ox("start");function Ox(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 Ub(e){const t=Td(e),n=Mx(e);if(t&&n)return{start:t,end:n}}function So(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zp(e.position):"start"in e||"end"in e?zp(e):"line"in e||"column"in e?dc(e):""}function dc(e){return Fp(e&&e.line)+":"+Fp(e&&e.column)}function zp(e){return dc(e&&e.start)+"-"+dc(e&&e.end)}function Fp(e){return e&&typeof e=="number"?e:1}class Ge 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}}Ge.prototype.file="";Ge.prototype.name="";Ge.prototype.reason="";Ge.prototype.message="";Ge.prototype.stack="";Ge.prototype.column=void 0;Ge.prototype.line=void 0;Ge.prototype.ancestors=void 0;Ge.prototype.cause=void 0;Ge.prototype.fatal=void 0;Ge.prototype.place=void 0;Ge.prototype.ruleId=void 0;Ge.prototype.source=void 0;const Id={}.hasOwnProperty,Hb=new Map,qb=/[A-Z]/g,Qb=new Set(["table","tbody","thead","tfoot","tr"]),Vb=new Set(["td","th"]),Dx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Wb(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=tw(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=ew(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"?Ed:fb,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=$x(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function $x(e,t,n){if(t.type==="element")return Kb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Gb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Xb(e,t,n);if(t.type==="mdxjsEsm")return Yb(e,t);if(t.type==="root")return Jb(e,t,n);if(t.type==="text")return Zb(e,t)}function Kb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ed,e.schema=i),e.ancestors.push(t);const o=Ux(e,t.tagName,!1),s=nw(e,t);let l=Rd(e,t);return Qb.has(t.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!nb(a):!0})),Bx(e,s,o,t),_d(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function Gb(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 Yb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Vo(e,t.position)}function Xb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ed,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Ux(e,t.name,!0),s=rw(e,t),l=Rd(e,t);return Bx(e,s,o,t),_d(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function Jb(e,t,n){const r={};return _d(r,Rd(e,t)),e.create(t,e.Fragment,r,n)}function Zb(e,t){return t.value}function Bx(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _d(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ew(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 tw(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),a=Td(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 nw(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Id.call(t.properties,i)){const o=iw(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&Vb.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 rw(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 Rd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Hb;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=$x(e,o,s);l!==void 0&&n.push(l)}return n}function iw(e,t,n){const r=ub(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Xk(n):pb(n)),r.property==="style"){let i=typeof n=="object"?n:ow(e,String(n));return e.stylePropertyNameCase==="css"&&(i=sw(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?sb[r.property]||r.property:r.attribute,n]}}function ow(e,t){try{return Bb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ge("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=Dx+"#cannot-parse-style-attribute",i}}function Ux(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=Np(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=Np(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Id.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 Ge("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=Dx+"#cannot-handle-mdx-estrees-without-createevaluater",n}function sw(e){const t={};let n;for(n in e)Id.call(e,n)&&(t[lw(n)]=e[n]);return t}function lw(e){let t=e.replace(qb,aw);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function aw(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"]},uw={};function Ld(e,t){const n=uw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Hx(e,r,i)}function Hx(e,t,n){if(cw(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 Mp(e.children,t,n)}return Array.isArray(e)?Mp(e,t,n):""}function Mp(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Hx(e[i],t,n);return r.join("")}function cw(e){return!!(e&&typeof e=="object")}const Op=document.createElement("i");function Ad(e){const t="&"+e+";";Op.innerHTML=t;const n=Op.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 Dp={}.hasOwnProperty;function qx(e){const t={};let n=-1;for(;++n<e.length;)dw(t,e[n]);return t}function dw(e,t){let n;for(n in t){const i=(Dp.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){Dp.call(i,s)||(i[s]=[]);const l=o[s];fw(i[s],Array.isArray(l)?l:l?[l]:[])}}}function fw(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 Qx(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 Ht(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const et=dr(/[A-Za-z]/),We=dr(/[\dA-Za-z]/),pw=dr(/[#-'*+\--9=?A-Z^-~]/);function Cl(e){return e!==null&&(e<32||e===127)}const fc=dr(/\d/),hw=dr(/[\dA-Fa-f]/),mw=dr(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function pe(e){return e!==null&&(e<0||e===32)}function ee(e){return e===-2||e===-1||e===32}const Xl=dr(new RegExp("\\p{P}|\\p{S}","u")),Or=dr(/\s/);function dr(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&&We(e.charCodeAt(n+1))&&We(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 ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return ee(a)?(e.enter(n),l(a)):t(a)}function l(a){return ee(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}const gw={tokenize:xw};function xw(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"),ie(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 W(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const yw={tokenize:vw},$p={tokenize:kw};function vw(e){const t=this,n=[];let r=0,i,o,s;return l;function l(y){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,a,c)(y)}return c(y)}function a(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const b=t.events.length;let E=b,C;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){C=t.events[E][1].end;break}g(r);let I=b;for(;I<t.events.length;)t.events[I][1].end={...C},I++;return St(t.events,E+1,0,t.events.slice(b)),t.events.length=I,c(y)}return l(y)}function c(y){if(r===n.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return m(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($p,f,d)(y)}function f(y){return i&&x(),g(r),p(y)}function d(y){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(y)}function p(y){return t.containerState={},e.attempt($p,h,m)(y)}function h(y){return r++,n.push([t.currentConstruct,t.containerState]),p(y)}function m(y){if(y===null){i&&x(),g(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){w(e.exit("chunkFlow"),!0),g(0),e.consume(y);return}return W(y)?(e.consume(y),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(y),v)}function w(y,b){const E=t.sliceStream(y);if(b&&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 C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const I=t.events.length;let T=I,A,N;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(A){N=t.events[T][1].end;break}A=!0}for(g(r),C=I;C<t.events.length;)t.events[C][1].end={...N},C++;St(t.events,T+1,0,t.events.slice(I)),t.events.length=C}}function g(y){let b=n.length;for(;b-- >y;){const E=n[b];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 kw(e,t,n){return ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Mi(e){if(e===null||pe(e)||Or(e))return 1;if(Xl(e))return 2}function Jl(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 pc={name:"attention",resolveAll:bw,tokenize:ww};function bw(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};Bp(d,-a),Bp(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,Jl(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 ww(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Mi(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=Mi(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 Bp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Sw={name:"autolink",tokenize:Cw};function Cw(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 et(h)?(e.consume(h),s):h===64?n(h):c(h)}function s(h){return h===43||h===45||h===46||We(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||We(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||Cl(h)?n(h):(e.consume(h),a)}function c(h){return h===64?(e.consume(h),f):pw(h)?(e.consume(h),c):n(h)}function f(h){return We(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||We(h))&&r++<63){const m=h===45?p:d;return e.consume(h),m}return n(h)}}const as={partial:!0,tokenize:jw};function jw(e,t,n){return r;function r(o){return ee(o)?ie(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||W(o)?t(o):n(o)}}const Vx={continuation:{tokenize:Ew},exit:Pw,name:"blockQuote",tokenize:Nw};function Nw(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 ee(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Ew(e,t,n){const r=this;return i;function i(s){return ee(s)?ie(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Vx,t,n)(s)}}function Pw(e){e.exit("blockQuote")}const Wx={name:"characterEscape",tokenize:Tw};function Tw(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 mw(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Kx={name:"characterReference",tokenize:Iw};function Iw(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=We,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=hw,f):(e.enter("characterReferenceValue"),o=7,s=fc,f(d))}function f(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===We&&!Ad(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 Up={partial:!0,tokenize:Rw},Hp={concrete:!0,name:"codeFenced",tokenize:_w};function _w(e,t,n){const r=this,i={partial:!0,tokenize:E};let o=0,s=0,l;return a;function a(C){return c(C)}function c(C){const I=r.events[r.events.length-1];return o=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,l=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===l?(s++,e.consume(C),f):s<3?n(C):(e.exit("codeFencedFenceSequence"),ee(C)?ie(e,d,"whitespace")(C):d(C))}function d(C){return C===null||W(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(Up,v,b)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||W(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):ee(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ie(e,h,"whitespace")(C)):C===96&&C===l?n(C):(e.consume(C),p)}function h(C){return C===null||W(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||W(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===l?n(C):(e.consume(C),m)}function v(C){return e.attempt(i,b,w)(C)}function w(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),g}function g(C){return o>0&&ee(C)?ie(e,x,"linePrefix",o+1)(C):x(C)}function x(C){return C===null||W(C)?e.check(Up,v,b)(C):(e.enter("codeFlowValue"),y(C))}function y(C){return C===null||W(C)?(e.exit("codeFlowValue"),x(C)):(e.consume(C),y)}function b(C){return e.exit("codeFenced"),t(C)}function E(C,I,T){let A=0;return N;function N(q){return C.enter("lineEnding"),C.consume(q),C.exit("lineEnding"),z}function z(q){return C.enter("codeFencedFence"),ee(q)?ie(C,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):R(q)}function R(q){return q===l?(C.enter("codeFencedFenceSequence"),G(q)):T(q)}function G(q){return q===l?(A++,C.consume(q),G):A>=s?(C.exit("codeFencedFenceSequence"),ee(q)?ie(C,K,"whitespace")(q):K(q)):T(q)}function K(q){return q===null||W(q)?(C.exit("codeFencedFence"),I(q)):T(q)}}}function Rw(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 La={name:"codeIndented",tokenize:Aw},Lw={partial:!0,tokenize:zw};function Aw(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ie(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):W(c)?e.attempt(Lw,s,a)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||W(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),l)}function a(c){return e.exit("codeIndented"),t(c)}}function zw(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):W(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ie(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):W(s)?i(s):n(s)}}const Fw={name:"codeText",previous:Ow,resolve:Mw,tokenize:Dw};function Mw(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 Ow(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Dw(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)):W(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||W(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 $w{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 Gx(e){const t={};let n=-1,r,i,o,s,l,a,c;const f=new $w(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,Bw(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 Bw(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,m=0,v=0;const w=[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,w.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):w.pop(),p=w.length;p--;){const g=l.slice(w[p],w[p+1]),x=o.pop();a.push([x,x+g.length-1]),e.splice(x,2,g)}for(a.reverse(),p=-1;++p<a.length;)c[m+a[p][0]]=m+a[p][1],m+=a[p][1]-a[p][0]-1;return c}const Uw={resolve:qw,tokenize:Qw},Hw={partial:!0,tokenize:Vw};function qw(e){return Gx(e),e}function Qw(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):W(l)?e.check(Hw,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 Vw(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ie(e,o,"linePrefix")}function o(s){if(s===null||W(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 Yx(e,t,n,r,i,o,s,l,a){const c=a||Number.POSITIVE_INFINITY;let f=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),p):g===null||g===32||g===41||Cl(g)?n(g):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(g))}function p(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(l),p(g)):g===null||g===60||W(g)?n(g):(e.consume(g),g===92?m:h)}function m(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function v(g){return!f&&(g===null||g===41||pe(g))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(g)):f<c&&g===40?(e.consume(g),f++,v):g===41?(e.consume(g),f--,v):g===null||g===32||g===40||Cl(g)?n(g):(e.consume(g),g===92?w:v)}function w(g){return g===40||g===41||g===92?(e.consume(g),v):v(g)}}function Xx(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):W(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||W(h)||l++>999?(e.exit("chunkString"),f(h)):(e.consume(h),a||(a=!ee(h)),h===92?p:d)}function p(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function Jx(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):W(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ie(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===s||p===null||W(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 W(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ee(i)?ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Ww={name:"definition",tokenize:Gw},Kw={partial:!0,tokenize:Yw};function Gw(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return Xx.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return i=Ht(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 Yx(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Kw,d,d)(h)}function d(h){return ee(h)?ie(e,p,"whitespace")(h):p(h)}function p(h){return h===null||W(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Yw(e,t,n){return r;function r(l){return pe(l)?Co(e,i)(l):n(l)}function i(l){return Jx(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return ee(l)?ie(e,s,"whitespace")(l):s(l)}function s(l){return l===null||W(l)?t(l):n(l)}}const Xw={name:"hardBreakEscape",tokenize:Jw};function Jw(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return W(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Zw={name:"headingAtx",resolve:eS,tokenize:tS};function eS(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 tS(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||W(f)?(e.exit("atxHeading"),t(f)):ee(f)?ie(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 nS=["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"],qp=["pre","script","style","textarea"],rS={concrete:!0,name:"htmlFlow",resolveTo:sS,tokenize:lS},iS={partial:!0,tokenize:uS},oS={partial:!0,tokenize:aS};function sS(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 lS(e,t,n){const r=this;let i,o,s,l,a;return c;function c(S){return f(S)}function f(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),o=!0,v):S===63?(e.consume(S),i=3,r.interrupt?t:k):et(S)?(e.consume(S),s=String.fromCharCode(S),w):n(S)}function p(S){return S===45?(e.consume(S),i=2,h):S===91?(e.consume(S),i=5,l=0,m):et(S)?(e.consume(S),i=4,r.interrupt?t:k):n(S)}function h(S){return S===45?(e.consume(S),r.interrupt?t:k):n(S)}function m(S){const ge="CDATA[";return S===ge.charCodeAt(l++)?(e.consume(S),l===ge.length?r.interrupt?t:R:m):n(S)}function v(S){return et(S)?(e.consume(S),s=String.fromCharCode(S),w):n(S)}function w(S){if(S===null||S===47||S===62||pe(S)){const ge=S===47,Ue=s.toLowerCase();return!ge&&!o&&qp.includes(Ue)?(i=1,r.interrupt?t(S):R(S)):nS.includes(s.toLowerCase())?(i=6,ge?(e.consume(S),g):r.interrupt?t(S):R(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):o?x(S):y(S))}return S===45||We(S)?(e.consume(S),s+=String.fromCharCode(S),w):n(S)}function g(S){return S===62?(e.consume(S),r.interrupt?t:R):n(S)}function x(S){return ee(S)?(e.consume(S),x):N(S)}function y(S){return S===47?(e.consume(S),N):S===58||S===95||et(S)?(e.consume(S),b):ee(S)?(e.consume(S),y):N(S)}function b(S){return S===45||S===46||S===58||S===95||We(S)?(e.consume(S),b):E(S)}function E(S){return S===61?(e.consume(S),C):ee(S)?(e.consume(S),E):y(S)}function C(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),a=S,I):ee(S)?(e.consume(S),C):T(S)}function I(S){return S===a?(e.consume(S),a=null,A):S===null||W(S)?n(S):(e.consume(S),I)}function T(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||pe(S)?E(S):(e.consume(S),T)}function A(S){return S===47||S===62||ee(S)?y(S):n(S)}function N(S){return S===62?(e.consume(S),z):n(S)}function z(S){return S===null||W(S)?R(S):ee(S)?(e.consume(S),z):n(S)}function R(S){return S===45&&i===2?(e.consume(S),le):S===60&&i===1?(e.consume(S),Q):S===62&&i===4?(e.consume(S),V):S===63&&i===3?(e.consume(S),k):S===93&&i===5?(e.consume(S),B):W(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(iS,oe,G)(S)):S===null||W(S)?(e.exit("htmlFlowData"),G(S)):(e.consume(S),R)}function G(S){return e.check(oS,K,oe)(S)}function K(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),q}function q(S){return S===null||W(S)?G(S):(e.enter("htmlFlowData"),R(S))}function le(S){return S===45?(e.consume(S),k):R(S)}function Q(S){return S===47?(e.consume(S),s="",L):R(S)}function L(S){if(S===62){const ge=s.toLowerCase();return qp.includes(ge)?(e.consume(S),V):R(S)}return et(S)&&s.length<8?(e.consume(S),s+=String.fromCharCode(S),L):R(S)}function B(S){return S===93?(e.consume(S),k):R(S)}function k(S){return S===62?(e.consume(S),V):S===45&&i===2?(e.consume(S),k):R(S)}function V(S){return S===null||W(S)?(e.exit("htmlFlowData"),oe(S)):(e.consume(S),V)}function oe(S){return e.exit("htmlFlow"),t(S)}}function aS(e,t,n){const r=this;return i;function i(s){return W(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 uS(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(as,t,n)}}const cS={name:"htmlText",tokenize:dS};function dS(e,t,n){const r=this;let i,o,s;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),a}function a(k){return k===33?(e.consume(k),c):k===47?(e.consume(k),E):k===63?(e.consume(k),y):et(k)?(e.consume(k),T):n(k)}function c(k){return k===45?(e.consume(k),f):k===91?(e.consume(k),o=0,m):et(k)?(e.consume(k),x):n(k)}function f(k){return k===45?(e.consume(k),h):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),p):W(k)?(s=d,Q(k)):(e.consume(k),d)}function p(k){return k===45?(e.consume(k),h):d(k)}function h(k){return k===62?le(k):k===45?p(k):d(k)}function m(k){const V="CDATA[";return k===V.charCodeAt(o++)?(e.consume(k),o===V.length?v:m):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),w):W(k)?(s=v,Q(k)):(e.consume(k),v)}function w(k){return k===93?(e.consume(k),g):v(k)}function g(k){return k===62?le(k):k===93?(e.consume(k),g):v(k)}function x(k){return k===null||k===62?le(k):W(k)?(s=x,Q(k)):(e.consume(k),x)}function y(k){return k===null?n(k):k===63?(e.consume(k),b):W(k)?(s=y,Q(k)):(e.consume(k),y)}function b(k){return k===62?le(k):y(k)}function E(k){return et(k)?(e.consume(k),C):n(k)}function C(k){return k===45||We(k)?(e.consume(k),C):I(k)}function I(k){return W(k)?(s=I,Q(k)):ee(k)?(e.consume(k),I):le(k)}function T(k){return k===45||We(k)?(e.consume(k),T):k===47||k===62||pe(k)?A(k):n(k)}function A(k){return k===47?(e.consume(k),le):k===58||k===95||et(k)?(e.consume(k),N):W(k)?(s=A,Q(k)):ee(k)?(e.consume(k),A):le(k)}function N(k){return k===45||k===46||k===58||k===95||We(k)?(e.consume(k),N):z(k)}function z(k){return k===61?(e.consume(k),R):W(k)?(s=z,Q(k)):ee(k)?(e.consume(k),z):A(k)}function R(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,G):W(k)?(s=R,Q(k)):ee(k)?(e.consume(k),R):(e.consume(k),K)}function G(k){return k===i?(e.consume(k),i=void 0,q):k===null?n(k):W(k)?(s=G,Q(k)):(e.consume(k),G)}function K(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||pe(k)?A(k):(e.consume(k),K)}function q(k){return k===47||k===62||pe(k)?A(k):n(k)}function le(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function Q(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),L}function L(k){return ee(k)?ie(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):B(k)}function B(k){return e.enter("htmlTextData"),s(k)}}const zd={name:"labelEnd",resolveAll:mS,resolveTo:gS,tokenize:xS},fS={tokenize:yS},pS={tokenize:vS},hS={tokenize:kS};function mS(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 gS(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,Jl(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 xS(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(Ht(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(fS,f,s?f:d)(p):p===91?e.attempt(pS,f,s?c:d)(p):s?f(p):d(p)}function c(p){return e.attempt(hS,f,d)(p)}function f(p){return t(p)}function d(p){return o._balanced=!0,n(p)}}function yS(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):Yx(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?Jx(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 vS(e,t,n){const r=this;return i;function i(l){return Xx.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function kS(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 bS={name:"labelStartImage",resolveAll:zd.resolveAll,tokenize:wS};function wS(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 SS={name:"labelStartLink",resolveAll:zd.resolveAll,tokenize:CS};function CS(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 Aa={name:"lineEnding",tokenize:jS};function jS(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ie(e,t,"linePrefix")}}const Ks={name:"thematicBreak",tokenize:NS};function NS(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||W(c))?(e.exit("thematicBreak"),t(c)):n(c)}function a(c){return c===i?(e.consume(c),r++,a):(e.exit("thematicBreakSequence"),ee(c)?ie(e,l,"whitespace")(c):l(c))}}const ot={continuation:{tokenize:IS},exit:RS,name:"list",tokenize:TS},ES={partial:!0,tokenize:LS},PS={partial:!0,tokenize:_S};function TS(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 m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:fc(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Ks,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 fc(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(ES,p,d))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function d(h){return ee(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 IS(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,ie(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!ee(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(PS,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(ot,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function _S(e,t,n){const r=this;return ie(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 RS(e){e.exit(this.containerState.type)}function LS(e,t,n){const r=this;return ie(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!ee(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Qp={name:"setextUnderline",resolveTo:AS,tokenize:zS};function AS(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 zS(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"),ee(c)?ie(e,a,"lineSuffix")(c):a(c))}function a(c){return c===null||W(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const FS={tokenize:MS};function MS(e){const t=this,n=e.attempt(as,r,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Uw,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 OS={resolveAll:ey()},DS=Zx("string"),$S=Zx("text");function Zx(e){return{resolveAll:ey(e==="text"?BS: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 ey(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 BS(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 US={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:Vx},HS={91:Ww},qS={[-2]:La,[-1]:La,32:La},QS={35:Zw,42:Ks,45:[Qp,Ks],60:rS,61:Qp,95:Ks,96:Hp,126:Hp},VS={38:Kx,92:Wx},WS={[-5]:Aa,[-4]:Aa,[-3]:Aa,33:bS,38:Kx,42:pc,60:[Sw,cS],91:SS,92:[Xw,Wx],93:zd,95:pc,96:Fw},KS={null:[pc,OS]},GS={null:[42,95]},YS={null:[]},XS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:GS,contentInitial:HS,disable:YS,document:US,flow:QS,flowInitial:qS,insideSpan:KS,string:VS,text:WS},Symbol.toStringTag,{value:"Module"}));function JS(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:I(E),check:I(C),consume:x,enter:y,exit:b,interrupt:I(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:v,events:[],now:m,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(z){return s=It(s,z),w(),s[s.length-1]!==null?[]:(T(t,0),c.events=Jl(o,c.events,c),c.events)}function p(z,R){return eC(h(z),R)}function h(z){return ZS(s,z)}function m(){const{_bufferIndex:z,_index:R,line:G,column:K,offset:q}=r;return{_bufferIndex:z,_index:R,line:G,column:K,offset:q}}function v(z){i[z.line]=z.column,N()}function w(){let z;for(;r._index<s.length;){const R=s[r._index];if(typeof R=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<R.length;)g(R.charCodeAt(r._bufferIndex));else g(R)}}function g(z){f=f(z)}function x(z){W(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,N()):z!==-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=z}function y(z,R){const G=R||{};return G.type=z,G.start=m(),c.events.push(["enter",G,c]),l.push(G),G}function b(z){const R=l.pop();return R.end=m(),c.events.push(["exit",R,c]),R}function E(z,R){T(z,R.from)}function C(z,R){R.restore()}function I(z,R){return G;function G(K,q,le){let Q,L,B,k;return Array.isArray(K)?oe(K):"tokenize"in K?oe([K]):V(K);function V(ue){return it;function it(Nn){const qr=Nn!==null&&ue[Nn],Qr=Nn!==null&&ue.null,cs=[...Array.isArray(qr)?qr:qr?[qr]:[],...Array.isArray(Qr)?Qr:Qr?[Qr]:[]];return oe(cs)(Nn)}}function oe(ue){return Q=ue,L=0,ue.length===0?le:S(ue[L])}function S(ue){return it;function it(Nn){return k=A(),B=ue,ue.partial||(c.currentConstruct=ue),ue.name&&c.parser.constructs.disable.null.includes(ue.name)?Ue():ue.tokenize.call(R?Object.assign(Object.create(c),R):c,a,ge,Ue)(Nn)}}function ge(ue){return z(B,k),q}function Ue(ue){return k.restore(),++L<Q.length?S(Q[L]):le}}}function T(z,R){z.resolveAll&&!o.includes(z)&&o.push(z),z.resolve&&St(c.events,R,c.events.length-R,z.resolve(c.events.slice(R),c)),z.resolveTo&&(c.events=z.resolveTo(c.events,c))}function A(){const z=m(),R=c.previous,G=c.currentConstruct,K=c.events.length,q=Array.from(l);return{from:K,restore:le};function le(){r=z,c.previous=R,c.currentConstruct=G,c.events.length=K,l=q,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ZS(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 eC(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=`
|
|
177
|
+
`;break}case-3:{s=`\r
|
|
178
|
+
`;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 tC(e){const r={constructs:qx([XS,...(e||{}).extensions||[]]),content:i(gw),defined:[],document:i(yw),flow:i(FS),lazy:{},string:i(DS),text:i($S)};return r;function i(o){return s;function s(l){return JS(r,o,l)}}}function nC(e){for(;!Gx(e););return e}const Vp=/[\0\t\n\r]/g;function rC(){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(Vp.lastIndex=d,c=Vp.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 iC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function oC(e){return e.replace(iC,sC)}function sC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Qx(n.slice(o?2:1),o?16:10)}return Ad(n)||e}const ty={}.hasOwnProperty;function lC(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),aC(n)(nC(tC(n).document().write(rC()(e,t,!0))))}function aC(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(nf),autolinkProtocol:A,autolinkEmail:A,atxHeading:o(Zd),blockQuote:o(Qr),characterEscape:A,characterReference:A,codeFenced:o(cs),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(cs,s),codeText:o(e1,s),codeTextData:A,data:A,codeFlowValue:A,definition:o(t1),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(n1),hardBreakEscape:o(ef),hardBreakTrailing:o(ef),htmlFlow:o(tf,s),htmlFlowData:A,htmlText:o(tf,s),htmlTextData:A,image:o(r1),label:s,link:o(nf),listItem:o(i1),listItemValue:p,listOrdered:o(rf,d),listUnordered:o(rf),paragraph:o(o1),reference:S,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Zd),strong:o(s1),thematicBreak:o(a1)},exit:{atxHeading:a(),atxHeadingSequence:E,autolink:a(),autolinkEmail:qr,autolinkProtocol:Nn,blockQuote:a(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:Ue,characterReferenceMarkerNumeric:Ue,characterReferenceValue:ue,characterReference:it,codeFenced:a(w),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:N,codeIndented:a(g),codeText:a(q),codeTextData:N,data:N,definition:a(),definitionDestinationString:b,definitionLabelString:x,definitionTitleString:y,emphasis:a(),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(G),htmlFlowData:N,htmlText:a(K),htmlTextData:N,image:a(Q),label:B,labelText:L,lineEnding:z,link:a(le),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ge,resourceDestinationString:k,resourceTitleString:V,resource:oe,setextHeading:a(T),setextHeadingLineSequence:I,setextHeadingText:C,strong:a(),thematicBreak:a()}};ny(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(_){let O={type:"root",children:[]};const Y={stack:[O],tokenStack:[],config:t,enter:l,exit:c,buffer:s,resume:f,data:n},ne=[];let fe=-1;for(;++fe<_.length;)if(_[fe][1].type==="listOrdered"||_[fe][1].type==="listUnordered")if(_[fe][0]==="enter")ne.push(fe);else{const zt=ne.pop();fe=i(_,zt,fe)}for(fe=-1;++fe<_.length;){const zt=t[_[fe][0]];ty.call(zt,_[fe][1].type)&&zt[_[fe][1].type].call(Object.assign({sliceSerialize:_[fe][2].sliceSerialize},Y),_[fe][1])}if(Y.tokenStack.length>0){const zt=Y.tokenStack[Y.tokenStack.length-1];(zt[1]||Wp).call(Y,void 0,zt[0])}for(O.position={start:Pn(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:Pn(_.length>0?_[_.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)O=t.transforms[fe](O)||O;return O}function i(_,O,Y){let ne=O-1,fe=-1,zt=!1,fr,sn,Ki,Gi;for(;++ne<=Y;){const mt=_[ne];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?fe++:fe--,Gi=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(fr&&!Gi&&!fe&&!Ki&&(Ki=ne),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(fr){let Vr=ne;for(sn=void 0;Vr--;){const ln=_[Vr];if(ln[1].type==="lineEnding"||ln[1].type==="lineEndingBlank"){if(ln[0]==="exit")continue;sn&&(_[sn][1].type="lineEndingBlank",zt=!0),ln[1].type="lineEnding",sn=Vr}else if(!(ln[1].type==="linePrefix"||ln[1].type==="blockQuotePrefix"||ln[1].type==="blockQuotePrefixWhitespace"||ln[1].type==="blockQuoteMarker"||ln[1].type==="listItemIndent"))break}Ki&&(!sn||Ki<sn)&&(fr._spread=!0),fr.end=Object.assign({},sn?_[sn][1].start:mt[1].end),_.splice(sn||ne,0,["exit",fr,mt[2]]),ne++,Y++}if(mt[1].type==="listItemPrefix"){const Vr={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};fr=Vr,_.splice(ne,0,["enter",Vr,mt[2]]),ne++,Y++,Ki=void 0,Gi=!0}}}return _[O][1]._spread=zt,Y}function o(_,O){return Y;function Y(ne){l.call(this,_(ne),ne),O&&O.call(this,ne)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(_,O,Y){this.stack[this.stack.length-1].children.push(_),this.stack.push(_),this.tokenStack.push([O,Y||void 0]),_.position={start:Pn(O.start),end:void 0}}function a(_){return O;function O(Y){_&&_.call(this,Y),c.call(this,Y)}}function c(_,O){const Y=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==_.type&&(O?O.call(this,_,ne[0]):(ne[1]||Wp).call(this,_,ne[0]));else throw new Error("Cannot close `"+_.type+"` ("+So({start:_.start,end:_.end})+"): it’s not open");Y.position.end=Pn(_.end)}function f(){return Ld(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(_){if(this.data.expectingFirstListItemValue){const O=this.stack[this.stack.length-2];O.start=Number.parseInt(this.sliceSerialize(_),10),this.data.expectingFirstListItemValue=void 0}}function h(){const _=this.resume(),O=this.stack[this.stack.length-1];O.lang=_}function m(){const _=this.resume(),O=this.stack[this.stack.length-1];O.meta=_}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const _=this.resume(),O=this.stack[this.stack.length-1];O.value=_.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const _=this.resume(),O=this.stack[this.stack.length-1];O.value=_.replace(/(\r?\n|\r)$/g,"")}function x(_){const O=this.resume(),Y=this.stack[this.stack.length-1];Y.label=O,Y.identifier=Ht(this.sliceSerialize(_)).toLowerCase()}function y(){const _=this.resume(),O=this.stack[this.stack.length-1];O.title=_}function b(){const _=this.resume(),O=this.stack[this.stack.length-1];O.url=_}function E(_){const O=this.stack[this.stack.length-1];if(!O.depth){const Y=this.sliceSerialize(_).length;O.depth=Y}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function I(_){const O=this.stack[this.stack.length-1];O.depth=this.sliceSerialize(_).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function A(_){const Y=this.stack[this.stack.length-1].children;let ne=Y[Y.length-1];(!ne||ne.type!=="text")&&(ne=l1(),ne.position={start:Pn(_.start),end:void 0},Y.push(ne)),this.stack.push(ne)}function N(_){const O=this.stack.pop();O.value+=this.sliceSerialize(_),O.position.end=Pn(_.end)}function z(_){const O=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Y=O.children[O.children.length-1];Y.position.end=Pn(_.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(O.type)&&(A.call(this,_),N.call(this,_))}function R(){this.data.atHardBreak=!0}function G(){const _=this.resume(),O=this.stack[this.stack.length-1];O.value=_}function K(){const _=this.resume(),O=this.stack[this.stack.length-1];O.value=_}function q(){const _=this.resume(),O=this.stack[this.stack.length-1];O.value=_}function le(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const O=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=O,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function Q(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const O=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=O,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function L(_){const O=this.sliceSerialize(_),Y=this.stack[this.stack.length-2];Y.label=oC(O),Y.identifier=Ht(O).toLowerCase()}function B(){const _=this.stack[this.stack.length-1],O=this.resume(),Y=this.stack[this.stack.length-1];if(this.data.inReference=!0,Y.type==="link"){const ne=_.children;Y.children=ne}else Y.alt=O}function k(){const _=this.resume(),O=this.stack[this.stack.length-1];O.url=_}function V(){const _=this.resume(),O=this.stack[this.stack.length-1];O.title=_}function oe(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function ge(_){const O=this.resume(),Y=this.stack[this.stack.length-1];Y.label=O,Y.identifier=Ht(this.sliceSerialize(_)).toLowerCase(),this.data.referenceType="full"}function Ue(_){this.data.characterReferenceType=_.type}function ue(_){const O=this.sliceSerialize(_),Y=this.data.characterReferenceType;let ne;Y?(ne=Qx(O,Y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=Ad(O);const fe=this.stack[this.stack.length-1];fe.value+=ne}function it(_){const O=this.stack.pop();O.position.end=Pn(_.end)}function Nn(_){N.call(this,_);const O=this.stack[this.stack.length-1];O.url=this.sliceSerialize(_)}function qr(_){N.call(this,_);const O=this.stack[this.stack.length-1];O.url="mailto:"+this.sliceSerialize(_)}function Qr(){return{type:"blockquote",children:[]}}function cs(){return{type:"code",lang:null,meta:null,value:""}}function e1(){return{type:"inlineCode",value:""}}function t1(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function n1(){return{type:"emphasis",children:[]}}function Zd(){return{type:"heading",depth:0,children:[]}}function ef(){return{type:"break"}}function tf(){return{type:"html",value:""}}function r1(){return{type:"image",title:null,url:"",alt:null}}function nf(){return{type:"link",title:null,url:"",children:[]}}function rf(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[]}}function i1(_){return{type:"listItem",spread:_._spread,checked:null,children:[]}}function o1(){return{type:"paragraph",children:[]}}function s1(){return{type:"strong",children:[]}}function l1(){return{type:"text",value:""}}function a1(){return{type:"thematicBreak"}}}function Pn(e){return{line:e.line,column:e.column,offset:e.offset}}function ny(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ny(e,r):uC(e,r)}}function uC(e,t){let n;for(n in t)if(ty.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 Wp(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 cC(e){const t=this;t.parser=n;function n(r){return lC(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function dC(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 fC(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
179
|
+
`}]}function pC(e,t){const n=t.value?t.value+`
|
|
180
|
+
`:"",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 hC(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mC(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gC(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 xC(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 yC(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ry(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 vC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ry(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 kC(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 bC(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 wC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ry(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 SC(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 CC(e,t,n){const r=e.all(t),i=n?jC(n):iy(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:`
|
|
181
|
+
`}),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:`
|
|
182
|
+
`});const c={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,c),e.applyData(t,c)}function jC(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=iy(n[r])}return t}function iy(e){const t=e.spread;return t??e.children.length>1}function NC(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 EC(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PC(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function TC(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IC(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=Td(t.children[1]),a=Mx(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 _C(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 m={type:"element",tagName:o,properties:p,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),c.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function RC(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Kp=9,Gp=32;function LC(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Yp(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Yp(t.slice(i),i>0,!1)),o.join("")}function Yp(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Kp||o===Gp;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Kp||o===Gp;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function AC(e,t){const n={type:"text",value:LC(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zC(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const FC={blockquote:dC,break:fC,code:pC,delete:hC,emphasis:mC,footnoteReference:gC,heading:xC,html:yC,imageReference:vC,image:kC,inlineCode:bC,linkReference:wC,link:SC,listItem:CC,list:NC,paragraph:EC,root:PC,strong:TC,table:IC,tableCell:RC,tableRow:_C,text:AC,thematicBreak:zC,toml:_s,yaml:_s,definition:_s,footnoteDefinition:_s};function _s(){}const oy=-1,Zl=0,jo=1,jl=2,Fd=3,Md=4,Od=5,Dd=6,sy=7,ly=8,MC=typeof self=="object"?self:globalThis,Xp=(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 MC[e](t)},OC=(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 Zl:case oy:return n(s,i);case jo:{const l=n([],i);for(const a of s)l.push(r(a));return l}case jl:{const l=n({},i);for(const[a,c]of s)l[r(a)]=r(c);return l}case Fd:return n(new Date(s),i);case Md:{const{source:l,flags:a}=s;return n(new RegExp(l,a),i)}case Od:{const l=n(new Map,i);for(const[a,c]of s)l.set(r(a),r(c));return l}case Dd:{const l=n(new Set,i);for(const a of s)l.add(r(a));return l}case sy:{const{name:l,message:a}=s;return n(Xp(l,a),i)}case ly: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(Xp(o,s),i)};return r},Jp=e=>OC(new Map,e)(0),Kr="",{toString:DC}={},{keys:$C}=Object,oo=e=>{const t=typeof e;if(t!=="object"||!e)return[Zl,t];const n=DC.call(e).slice(8,-1);switch(n){case"Array":return[jo,Kr];case"Object":return[jl,Kr];case"Date":return[Fd,Kr];case"RegExp":return[Md,Kr];case"Map":return[Od,Kr];case"Set":return[Dd,Kr];case"DataView":return[jo,n]}return n.includes("Array")?[jo,n]:n.includes("Error")?[sy,n]:[jl,n]},Rs=([e,t])=>e===Zl&&(t==="function"||t==="symbol"),BC=(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 Zl:{let f=s;switch(a){case"bigint":l=ly,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);f=null;break;case"undefined":return i([oy],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 jl:{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 $C(s))(e||!Rs(oo(s[p])))&&f.push([o(p),o(s[p])]);return d}case Fd:return i([l,s.toISOString()],s);case Md:{const{source:f,flags:d}=s;return i([l,{source:f,flags:d}],s)}case Od:{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 Dd:{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},Zp=(e,{json:t,lossy:n}={})=>{const r=[];return BC(!(t||n),!!t,new Map,r)(e),r},Nl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Jp(Zp(e,t)):structuredClone(e):(e,t)=>Jp(Zp(e,t));function UC(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 HC(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qC(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||UC,r=e.options.footnoteBackLabel||HC,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 m=[],v=e.footnoteCounts.get(d);for(;v!==void 0&&++h<=v;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(a,h);typeof x=="string"&&(x={type:"text",value:x}),m.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 w=f[f.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const x=w.children[w.children.length-1];x&&x.type==="text"?x.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else f.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(c,g),l.push(g)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Nl(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
183
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
184
|
+
`}]}}const ea=function(e){if(e==null)return KC;if(typeof e=="function")return ta(e);if(typeof e=="object")return Array.isArray(e)?QC(e):VC(e);if(typeof e=="string")return WC(e);throw new Error("Expected function, string, or object as test")};function QC(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ea(e[n]);return ta(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function VC(e){const t=e;return ta(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function WC(e){return ta(t);function t(n){return n&&n.type===e}}function ta(e){return t;function t(n,r,i){return!!(GC(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function KC(){return!0}function GC(e){return e!==null&&typeof e=="object"&&"type"in e}const ay=[],YC=!0,hc=!1,XC="skip";function uy(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=ea(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=ay,m,v,w;if((!t||o(a,c,f[f.length-1]||void 0))&&(h=JC(n(a,f)),h[0]===hc))return h;if("children"in a&&a.children){const g=a;if(g.children&&h[0]!==XC)for(v=(r?g.children.length:-1)+s,w=f.concat(g);v>-1&&v<g.children.length;){const x=g.children[v];if(m=l(x,v,w)(),m[0]===hc)return m;v=typeof m[1]=="number"?m[1]:v+s}}return h}}}function JC(e){return Array.isArray(e)?e:typeof e=="number"?[YC,e]:e==null?ay:[e]}function $d(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),uy(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 mc={}.hasOwnProperty,ZC={};function ej(e,t){const n=t||ZC,r=new Map,i=new Map,o=new Map,s={...FC,...n.handlers},l={all:c,applyData:nj,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:a,options:n,patch:tj,wrap:ij};return $d(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(mc.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,...w}=f,g=Nl(w);return g.children=l.all(f),g}return Nl(f)}return(l.options.unknownHandler||rj)(l,f,d)}function c(f){const d=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const m=l.one(p[h],f);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=eh(m.value)),!Array.isArray(m)&&m.type==="element")){const v=m.children[0];v&&v.type==="text"&&(v.value=eh(v.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function tj(e,t){e.position&&(t.position=Ub(e))}function nj(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,Nl(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function rj(e,t){const n=t.data||{},r="value"in t&&!(mc.call(n,"hProperties")||mc.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 ij(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
185
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
186
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
187
|
+
`}),n}function eh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function th(e,t){const n=ej(e,t),r=n.one(e,void 0),i=qC(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
188
|
+
`},i),o}function oj(e,t){return e&&"run"in e?async function(n,r){const i=th(n,{file:r,...t});await e.run(i,r)}:function(n,r){return th(n,{file:r,...e||t})}}function nh(e){if(e)throw e}var Gs=Object.prototype.hasOwnProperty,cy=Object.prototype.toString,rh=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,oh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):cy.call(t)==="[object Array]"},sh=function(t){if(!t||cy.call(t)!=="[object Object]")return!1;var n=Gs.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Gs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Gs.call(t,i)},lh=function(t,n){rh&&n.name==="__proto__"?rh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},ah=function(t,n){if(n==="__proto__")if(Gs.call(t,n)){if(ih)return ih(t,n).value}else return;return t[n]},sj=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=ah(l,n),i=ah(t,n),l!==i&&(f&&i&&(sh(i)||(o=oh(i)))?(o?(o=!1,s=r&&oh(r)?r:[]):s=r&&sh(r)?r:{},lh(l,{name:n,newValue:e(f,s,i)})):typeof i<"u"&&lh(l,{name:n,newValue:i}));return l};const za=Cc(sj);function gc(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 lj(){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?aj(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 aj(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 Gt={basename:uj,dirname:cj,extname:dj,join:fj,sep:"/"};function uj(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 cj(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 dj(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 fj(...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?".":pj(n)}function pj(e){us(e);const t=e.codePointAt(0)===47;let n=hj(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function hj(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 mj={cwd:gj};function gj(){return"/"}function xc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function xj(e){if(typeof e=="string")e=new URL(e);else if(!xc(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 yj(e)}function yj(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 Fa=["history","path","basename","stem","extname","dirname"];class dy{constructor(t){let n;t?xc(t)?n={path:t}:typeof t=="string"||vj(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":mj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Fa.length;){const o=Fa[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)Fa.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Gt.basename(this.path):void 0}set basename(t){Oa(t,"basename"),Ma(t,"basename"),this.path=Gt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gt.dirname(this.path):void 0}set dirname(t){uh(this.basename,"dirname"),this.path=Gt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gt.extname(this.path):void 0}set extname(t){if(Ma(t,"extname"),uh(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=Gt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){xc(t)&&(t=xj(t)),Oa(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gt.basename(this.path,this.extname):void 0}set stem(t){Oa(t,"stem"),Ma(t,"stem"),this.path=Gt.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 Ge(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(Gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gt.sep+"`")}function Oa(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function uh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function vj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kj=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},bj={}.hasOwnProperty;class Bd extends kj{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=lj()}copy(){const t=new Bd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(za(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ba("data",this.frozen),this.namespace[t]=n,this):bj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ba("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=Ls(t),r=this.parser||this.Parser;return Da("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Da("process",this.parser||this.Parser),$a("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=Ls(t),a=r.parse(l);r.run(a,l,function(f,d,p){if(f||!d||!p)return c(f);const h=d,m=r.stringify(h,p);Cj(m)?p.value=m:p.result=m,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(),Da("processSync",this.parser||this.Parser),$a("processSync",this.compiler||this.Compiler),this.process(t,i),dh("processSync","process",n),r;function i(o,s){n=!0,nh(o),r=s}}run(t,n,r){ch(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=Ls(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),dh("runSync","run",r),i;function o(s,l){nh(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Ls(n),i=this.compiler||this.Compiler;return $a("stringify",i),ch(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ba("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=za(!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,...m]=f;const v=r[p][1];gc(v)&&gc(h)&&(h=za(!0,v,h)),r[p]=[c,h,...m]}}}}const wj=new Bd().freeze();function Da(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $a(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ba(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 ch(e){if(!gc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ls(e){return Sj(e)?e:new dy(e)}function Sj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Cj(e){return typeof e=="string"||jj(e)}function jj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Nj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",fh=[],ph={allowDangerousHtml:!0},Ej=/^(https?|ircs?|mailto|xmpp)$/i,Pj=[{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 Tj(e){const t=Ij(e),n=_j(e);return Rj(t.runSync(t.parse(n),n),e)}function Ij(e){const t=e.rehypePlugins||fh,n=e.remarkPlugins||fh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ph}:ph;return wj().use(cC).use(n).use(oj,r).use(t)}function _j(e){const t=e.children||"",n=new dy;return typeof t=="string"&&(n.value=t),n}function Rj(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,a=t.urlTransform||Lj;for(const f of Pj)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Nj+f.id,void 0);return $d(e,c),Wb(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 m=f.properties[h],v=Ra[h];(v===null||v.includes(f.tagName))&&(f.properties[h]=a(String(m||""),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 Lj(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||Ej.test(e.slice(0,t))?e:""}function hh(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 Aj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function zj(e,t,n){const i=ea((n||{}).ignore||[]),o=Fj(t);let s=-1;for(;++s<o.length;)uy(e,"text",l);function l(c,f){let d=-1,p;for(;++d<f.length;){const h=f[d],m=p?p.children:void 0;if(i(h,m?m.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 m=0;const w=d.children.indexOf(c);let g=!1,x=[];p.lastIndex=0;let y=p.exec(c.value);for(;y;){const b=y.index,E={index:y.index,input:y.input,stack:[...f,c]};let C=h(...y,E);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?p.lastIndex=b+1:(m!==b&&x.push({type:"text",value:c.value.slice(m,b)}),Array.isArray(C)?x.push(...C):C&&x.push(C),m=b+y[0].length,g=!0),!p.global)break;y=p.exec(c.value)}return g?(m<c.value.length&&x.push({type:"text",value:c.value.slice(m)}),d.children.splice(w,1,...x)):x=[c],w+x.length}}function Fj(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([Mj(i[0]),Oj(i[1])])}return t}function Mj(e){return typeof e=="string"?new RegExp(Aj(e),"g"):e}function Oj(e){return typeof e=="function"?e:function(){return e}}const Ua="phrasing",Ha=["autolink","link","image","label"];function Dj(){return{transforms:[Vj],enter:{literalAutolink:Bj,literalAutolinkEmail:qa,literalAutolinkHttp:qa,literalAutolinkWww:qa},exit:{literalAutolink:Qj,literalAutolinkEmail:qj,literalAutolinkHttp:Uj,literalAutolinkWww:Hj}}}function $j(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ua,notInConstruct:Ha},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ua,notInConstruct:Ha},{character:":",before:"[ps]",after:"\\/",inConstruct:Ua,notInConstruct:Ha}]}}function Bj(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qa(e){this.config.enter.autolinkProtocol.call(this,e)}function Uj(e){this.config.exit.autolinkProtocol.call(this,e)}function Hj(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 qj(e){this.config.exit.autolinkEmail.call(this,e)}function Qj(e){this.exit(e)}function Vj(e){zj(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Wj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Kj]],{ignore:["link","linkReference"]})}function Wj(e,t,n,r,i){let o="";if(!fy(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Gj(n)))return!1;const s=Yj(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 Kj(e,t,n,r){return!fy(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Gj(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 Yj(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=hh(e,"(");let o=hh(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 fy(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Or(n)||Xl(n))&&(!t||n!==47)}py.peek=o2;function Xj(){this.buffer()}function Jj(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Zj(){this.buffer()}function e2(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function t2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function n2(e){this.exit(e)}function r2(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function i2(e){this.exit(e)}function o2(){return"["}function py(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 s2(){return{enter:{gfmFootnoteCallString:Xj,gfmFootnoteCall:Jj,gfmFootnoteDefinitionLabelString:Zj,gfmFootnoteDefinition:e2},exit:{gfmFootnoteCallString:t2,gfmFootnoteCall:n2,gfmFootnoteDefinitionLabelString:r2,gfmFootnoteDefinition:i2}}}function l2(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:py},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?`
|
|
189
|
+
`:" ")+o.indentLines(o.containerFlow(r,l.current()),t?hy:a2))),c(),a}}function a2(e,t,n){return t===0?e:hy(e,t,n)}function hy(e,t,n){return(n?"":" ")+e}const u2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];my.peek=h2;function c2(){return{canContainEols:["delete"],enter:{strikethrough:f2},exit:{strikethrough:p2}}}function d2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:u2}],handlers:{delete:my}}}function f2(e){this.enter({type:"delete",children:[]},e)}function p2(e){this.exit(e)}function my(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 h2(){return"~"}function m2(e){return e.length}function g2(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||m2,o=[],s=[],l=[],a=[];let c=0,f=-1;for(;++f<e.length;){const v=[],w=[];let g=-1;for(e[f].length>c&&(c=e[f].length);++g<e[f].length;){const x=x2(e[f][g]);if(n.alignDelimiters!==!1){const y=i(x);w[g]=y,(a[g]===void 0||y>a[g])&&(a[g]=y)}v.push(x)}s[f]=v,l[f]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)o[d]=mh(r[d]);else{const v=mh(r);for(;++d<c;)o[d]=v}d=-1;const p=[],h=[];for(;++d<c;){const v=o[d];let w="",g="";v===99?(w=":",g=":"):v===108?w=":":v===114&&(g=":");let x=n.alignDelimiters===!1?1:Math.max(1,a[d]-w.length-g.length);const y=w+"-".repeat(x)+g;n.alignDelimiters!==!1&&(x=w.length+x+g.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 m=[];for(;++f<s.length;){const v=s[f],w=l[f];d=-1;const g=[];for(;++d<c;){const x=v[d]||"";let y="",b="";if(n.alignDelimiters!==!1){const E=a[d]-(w[d]||0),C=o[d];C===114?y=" ".repeat(E):C===99?E%2?(y=" ".repeat(E/2+.5),b=" ".repeat(E/2-.5)):(y=" ".repeat(E/2),b=y):b=" ".repeat(E)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(y),g.push(x),n.alignDelimiters!==!1&&g.push(b),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
|
|
190
|
+
`)}function x2(e){return e==null?"":String(e)}function mh(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 y2(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()),v2);return i(),s}function v2(e,t,n){return">"+(n?"":" ")+e}function k2(e,t){return gh(e,t.inConstruct,!0)&&!gh(e,t.notInConstruct,!1)}function gh(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 xh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
191
|
+
`&&k2(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
192
|
+
`}function b2(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 w2(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 S2(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 C2(e,t,n,r){const i=S2(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(w2(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(o,j2);return d(),p}const l=n.createTracker(r),a=i.repeat(Math.max(b2(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:`
|
|
193
|
+
`,encode:["`"],...l.current()})),d()}return f+=l.move(`
|
|
194
|
+
`),o&&(f+=l.move(o+`
|
|
195
|
+
`)),f+=l.move(a),c(),f}function j2(e,t,n){return(n?"":" ")+e}function Ud(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 N2(e,t,n,r){const i=Ud(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?" ":`
|
|
196
|
+
`,...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 E2(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 El(e,t,n){const r=Mi(e),i=Mi(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}}gy.peek=P2;function gy(e,t,n,r){const i=E2(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=El(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=El(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 P2(e,t,n){return n.options.emphasis||"*"}function T2(e,t){let n=!1;return $d(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,hc}),!!((!e.depth||e.depth<3)&&Ld(e)&&(t.options.setext||n))}function I2(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(T2(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
|
|
197
|
+
`,after:`
|
|
198
|
+
`});return d(),f(),p+`
|
|
199
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
200
|
+
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
201
|
+
`,...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}xy.peek=_2;function xy(e){return e.value||""}function _2(){return"<"}yy.peek=R2;function yy(e,t,n,r){const i=Ud(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 R2(){return"!"}vy.peek=L2;function vy(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 L2(){return"!"}ky.peek=A2;function ky(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 A2(){return"`"}function by(e,t){const n=Ld(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))}wy.peek=z2;function wy(e,t,n,r){const i=Ud(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,a;if(by(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 z2(e,t,n){return by(e,n)?"<":"["}Sy.peek=F2;function Sy(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 F2(){return"["}function Hd(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 M2(e){const t=Hd(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 O2(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 Cy(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 D2(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?O2(n):Hd(n);const l=e.ordered?s==="."?")":".":M2(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),Cy(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 $2(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 B2(e,t,n,r){const i=$2(n);let o=n.bulletCurrent||Hd(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 U2(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const H2=ea(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function q2(e,t,n,r){return(e.children.some(function(s){return H2(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Q2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}jy.peek=V2;function jy(e,t,n,r){const i=Q2(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=El(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=El(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 V2(e,t,n){return n.options.strong||"*"}function W2(e,t,n,r){return n.safe(e.value,r)}function K2(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 G2(e,t,n){const r=(Cy(n)+(n.options.ruleSpaces?" ":"")).repeat(K2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ny={blockquote:y2,break:xh,code:C2,definition:N2,emphasis:gy,hardBreak:xh,heading:I2,html:xy,image:yy,imageReference:vy,inlineCode:ky,link:wy,linkReference:Sy,list:D2,listItem:B2,paragraph:U2,root:q2,strong:jy,text:W2,thematicBreak:G2};function Y2(){return{enter:{table:X2,tableData:yh,tableHeader:yh,tableRow:Z2},exit:{codeText:eN,table:J2,tableData:Qa,tableHeader:Qa,tableRow:Qa}}}function X2(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 J2(e){this.exit(e),this.data.inTable=void 0}function Z2(e){this.enter({type:"tableRow",children:[]},e)}function Qa(e){this.exit(e)}function yh(e){this.enter({type:"tableCell",children:[]},e)}function eN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tN(e,t){return t==="|"?t:e}function nN(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
202
|
+
`,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,m,v,w){return c(f(h,v,w),h.align)}function l(h,m,v,w){const g=d(h,v,w),x=c([g]);return x.slice(0,x.indexOf(`
|
|
203
|
+
`))}function a(h,m,v,w){const g=v.enter("tableCell"),x=v.enter("phrasing"),y=v.containerPhrasing(h,{...w,before:o,after:o});return x(),g(),y}function c(h,m){return g2(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(h,m,v){const w=h.children;let g=-1;const x=[],y=m.enter("table");for(;++g<w.length;)x[g]=d(w[g],m,v);return y(),x}function d(h,m,v){const w=h.children;let g=-1;const x=[],y=m.enter("tableRow");for(;++g<w.length;)x[g]=a(w[g],h,m,v);return y(),x}function p(h,m,v){let w=Ny.inlineCode(h,m,v);return v.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function rN(){return{exit:{taskListCheckValueChecked:vh,taskListCheckValueUnchecked:vh,paragraph:oN}}}function iN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sN}}}function vh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function oN(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 sN(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=Ny.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 lN(){return[Dj(),s2(),c2(),Y2(),rN()]}function aN(e){return{extensions:[$j(),l2(e),d2(),nN(e),iN()]}}const uN={tokenize:mN,partial:!0},Ey={tokenize:gN,partial:!0},Py={tokenize:xN,partial:!0},Ty={tokenize:yN,partial:!0},cN={tokenize:vN,partial:!0},Iy={name:"wwwAutolink",tokenize:pN,previous:Ry},_y={name:"protocolAutolink",tokenize:hN,previous:Ly},jn={name:"emailAutolink",tokenize:fN,previous:Ay},on={};function dN(){return{text:on}}let pr=48;for(;pr<123;)on[pr]=jn,pr++,pr===58?pr=65:pr===91&&(pr=97);on[43]=jn;on[45]=jn;on[46]=jn;on[95]=jn;on[72]=[jn,_y];on[104]=[jn,_y];on[87]=[jn,Iy];on[119]=[jn,Iy];function fN(e,t,n){const r=this;let i,o;return s;function s(d){return!yc(d)||!Ay.call(r,r.previous)||qd(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return yc(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(cN,f,c)(d):d===45||d===95||We(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&&et(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function pN(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Ry.call(r,r.previous)||qd(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(uN,e.attempt(Ey,e.attempt(Py,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function hN(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&Ly.call(r,r.previous)&&!qd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(et(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||Cl(d)||pe(d)||Or(d)||Xl(d)?n(d):e.attempt(Ey,e.attempt(Py,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function mN(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 gN(e,t,n){let r,i,o;return s;function s(c){return c===46||c===95?e.check(Ty,a,l)(c):c===null||pe(c)||Or(c)||c!==45&&Xl(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 xN(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(Ty,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 yN(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 et(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):et(l)?(e.consume(l),s):n(l)}}function vN(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return We(o)?n(o):t(o)}}function Ry(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||pe(e)}function Ly(e){return!et(e)}function Ay(e){return!(e===47||yc(e))}function yc(e){return e===43||e===45||e===46||e===95||We(e)}function qd(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 kN={tokenize:PN,partial:!0};function bN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:jN,continuation:{tokenize:NN},exit:EN}},text:{91:{name:"gfmFootnoteCall",tokenize:CN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:wN,resolveTo:SN}}}}function wN(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=Ht(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 SN(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 CN(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(Ht(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 jN(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(s>999||m===93&&!l||m===null||m===91||pe(m))return n(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Ht(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return pe(m)||(l=!0),s++,e.consume(m),m===92?d:f}function d(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),ie(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function NN(e,t,n){return e.check(as,t,e.attempt(kN,t,n))}function EN(e){e.exit("gfmFootnoteDefinition")}function PN(e,t,n){const r=this;return ie(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 TN(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,Jl(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(m){return c===126&&f[f.length-1][1].type!=="characterEscape"?a(m):(s.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const v=Mi(c);if(m===126)return d>1?a(m):(s.consume(m),d++,h);if(d<2&&!n)return a(m);const w=s.exit("strikethroughSequenceTemporary"),g=Mi(m);return w._open=!g||g===2&&!!v,w._close=!v||v===2&&!!g,l(m)}}}class IN{constructor(){this.map=[]}add(t,n,r){_N(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 _N(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 RN(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 LN(){return{flow:{null:{name:"table",tokenize:AN,resolveAll:zN}}}}function AN(e,t,n){const r=this;let i=0,o=0,s;return l;function l(N){let z=r.events.length-1;for(;z>-1;){const K=r.events[z][1].type;if(K==="lineEnding"||K==="linePrefix")z--;else break}const R=z>-1?r.events[z][1].type:null,G=R==="tableHead"||R==="tableRow"?C:a;return G===C&&r.parser.lazy[r.now().line]?n(N):G(N)}function a(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(s=!0,o+=1),f(N)}function f(N){return N===null?n(N):W(N)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),h):n(N):ee(N)?ie(e,f,"whitespace")(N):(o+=1,s&&(s=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(N)))}function d(N){return N===null||N===124||pe(N)?(e.exit("data"),f(N)):(e.consume(N),N===92?p:d)}function p(N){return N===92||N===124?(e.consume(N),d):d(N)}function h(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),s=!1,ee(N)?ie(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):m(N))}function m(N){return N===45||N===58?w(N):N===124?(s=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),v):E(N)}function v(N){return ee(N)?ie(e,w,"whitespace")(N):w(N)}function w(N){return N===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),g):N===45?(o+=1,g(N)):N===null||W(N)?b(N):E(N)}function g(N){return N===45?(e.enter("tableDelimiterFiller"),x(N)):E(N)}function x(N){return N===45?(e.consume(N),x):N===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(N))}function y(N){return ee(N)?ie(e,b,"whitespace")(N):b(N)}function b(N){return N===124?m(N):N===null||W(N)?!s||i!==o?E(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):E(N)}function E(N){return n(N)}function C(N){return e.enter("tableRow"),I(N)}function I(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),I):N===null||W(N)?(e.exit("tableRow"),t(N)):ee(N)?ie(e,I,"whitespace")(N):(e.enter("data"),T(N))}function T(N){return N===null||N===124||pe(N)?(e.exit("data"),I(N)):(e.consume(N),N===92?A:T)}function A(N){return N===92||N===124?(e.consume(N),T):T(N)}}function zN(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 IN;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(l=!1,a!==0&&(kh(p,t,a,c,f),f=void 0,a=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])):m.type==="tableRow"||m.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({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=As(p,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=As(p,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):m.type==="tableHead"?(l=!0,a=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(a=n,o[1]!==0?(s[0]=s[1],d=As(p,t,o,i,n,d)):s[1]!==0&&(d=As(p,t,s,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&kh(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=RN(t.events,n))}return e}function As(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 m=n[2]+1,v=n[3]-n[2]-1;e.add(m,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 kh(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 FN={name:"tasklistCheck",tokenize:ON};function MN(){return{text:{91:FN}}}function ON(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 W(a)?t(a):ee(a)?e.check({tokenize:DN},t,n)(a):n(a)}}function DN(e,t,n){return ie(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function $N(e){return qx([dN(),bN(),TN(e),LN(),MN()])}const BN={};function UN(e){const t=this,n=e||BN,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push($N(n)),o.push(lN()),s.push(aN(n))}const bh=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},HN=e=>e?bh(e):bh,qN=e=>e;function QN(e,t=qN){const n=ps.useSyncExternalStore(e.subscribe,ps.useCallback(()=>t(e.getState()),[e,t]),ps.useCallback(()=>t(e.getInitialState()),[e,t]));return ps.useDebugValue(n),n}const wh=e=>{const t=HN(e),n=r=>QN(t,r);return Object.assign(n,t),n},zy=e=>e?wh(e):wh,Dr=zy(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 Fy(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=Fy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function VN(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Fy(e))&&(r&&(r+=" "),r+=t);return r}const Qd="-",WN=e=>{const t=GN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const l=s.split(Qd);return l[0]===""&&l.length!==1&&l.shift(),My(l,t)||KN(s)},getConflictingClassGroupIds:(s,l)=>{const a=n[s]||[];return l&&r[s]?[...a,...r[s]]:a}}},My=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?My(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Qd);return(s=t.validators.find(({validator:l})=>l(o)))==null?void 0:s.classGroupId},Sh=/^\[(.+)\]$/,KN=e=>{if(Sh.test(e)){const t=Sh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},GN=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return XN(Object.entries(e.classGroups),n).forEach(([o,s])=>{vc(s,r,o,t)}),r},vc=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Ch(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(YN(i)){vc(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{vc(s,Ch(t,o),n,r)})})},Ch=(e,t)=>{let n=e;return t.split(Qd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},YN=e=>e.isThemeGetter,XN=(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,JN=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)}}},Oy="!",ZN=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 w=0;w<l.length;w++){let g=l[w];if(c===0){if(g===i&&(r||l.slice(w,w+o)===t)){a.push(l.slice(f,w)),f=w+o;continue}if(g==="/"){d=w;continue}}g==="["?c++:g==="]"&&c--}const p=a.length===0?l:l.substring(f),h=p.startsWith(Oy),m=h?p.substring(1):p,v=d&&d>f?d-f:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:s}):s},eE=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},tE=e=>({cache:JN(e.cacheSize),parseClassName:ZN(e),...WN(e)}),nE=/\s+/,rE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],s=e.trim().split(nE);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 m=!!h,v=r(m?p.substring(0,h):p);if(!v){if(!m){l=c+(l.length>0?" "+l:l);continue}if(v=r(p),!v){l=c+(l.length>0?" "+l:l);continue}m=!1}const w=eE(f).join(":"),g=d?w+Oy:w,x=g+v;if(o.includes(x))continue;o.push(x);const y=i(v,m);for(let b=0;b<y.length;++b){const E=y[b];o.push(g+E)}l=c+(l.length>0?" "+l:l)}return l};function iE(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Dy(t))&&(r&&(r+=" "),r+=n);return r}const Dy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Dy(e[r]))&&(n&&(n+=" "),n+=t);return n};function oE(e,...t){let n,r,i,o=s;function s(a){const c=t.reduce((f,d)=>d(f),e());return n=tE(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=rE(a,n);return i(a,f),f}return function(){return o(iE.apply(null,arguments))}}const xe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$y=/^\[(?:([a-z-]+):)?(.+)\]$/i,sE=/^\d+\/\d+$/,lE=new Set(["px","full","screen"]),aE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uE=/\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$/,cE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,an=e=>gi(e)||lE.has(e)||sE.test(e),Tn=e=>Qi(e,"length",kE),gi=e=>!!e&&!Number.isNaN(Number(e)),Va=e=>Qi(e,"number",gi),so=e=>!!e&&Number.isInteger(Number(e)),pE=e=>e.endsWith("%")&&gi(e.slice(0,-1)),J=e=>$y.test(e),In=e=>aE.test(e),hE=new Set(["length","size","percentage"]),mE=e=>Qi(e,hE,By),gE=e=>Qi(e,"position",By),xE=new Set(["image","url"]),yE=e=>Qi(e,xE,wE),vE=e=>Qi(e,"",bE),lo=()=>!0,Qi=(e,t,n)=>{const r=$y.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},kE=e=>uE.test(e)&&!cE.test(e),By=()=>!1,bE=e=>dE.test(e),wE=e=>fE.test(e),SE=()=>{const e=xe("colors"),t=xe("spacing"),n=xe("blur"),r=xe("brightness"),i=xe("borderColor"),o=xe("borderRadius"),s=xe("borderSpacing"),l=xe("borderWidth"),a=xe("contrast"),c=xe("grayscale"),f=xe("hueRotate"),d=xe("invert"),p=xe("gap"),h=xe("gradientColorStops"),m=xe("gradientColorStopPositions"),v=xe("inset"),w=xe("margin"),g=xe("opacity"),x=xe("padding"),y=xe("saturate"),b=xe("scale"),E=xe("sepia"),C=xe("skew"),I=xe("space"),T=xe("translate"),A=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",J,t],R=()=>[J,t],G=()=>["",an,Tn],K=()=>["auto",gi,J],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],le=()=>["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"],L=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",J],k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[gi,J];return{cacheSize:500,separator:":",theme:{colors:[lo],spacing:[an,Tn],blur:["none","",In,J],brightness:V(),borderColor:[e],borderRadius:["none","","full",In,J],borderSpacing:R(),borderWidth:G(),contrast:V(),grayscale:B(),hueRotate:V(),invert:B(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[pE,Tn],inset:z(),margin:z(),opacity:V(),padding:R(),saturate:V(),scale:V(),sepia:B(),skew:V(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[In]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:[...q(),J]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],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,J]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",so,J]}],"grid-cols":[{"grid-cols":[lo]}],"col-start-end":[{col:["auto",{span:["full",so,J]},J]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[lo]}],"row-start-end":[{row:["auto",{span:[so,J]},J]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"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:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,t]}],"min-w":[{"min-w":[J,t,"min","max","fit"]}],"max-w":[{"max-w":[J,t,"none","full","min","max","fit","prose",{screen:[In]},In]}],h:[{h:[J,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,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",Va]}],"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",J]}],"line-clamp":[{"line-clamp":["none",gi,Va]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",an,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",an,Tn]}],"underline-offset":[{"underline-offset":["auto",an,J]}],"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:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],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",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),gE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"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":[g]}],"border-style":[{border:[...le(),"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":[g]}],"divide-style":[{divide:le()}],"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:["",...le()]}],"outline-offset":[{"outline-offset":[an,J]}],"outline-w":[{outline:[an,Tn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[an,Tn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",In,vE]}],"shadow-color":[{shadow:[lo]}],opacity:[{opacity:[g]}],"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,J]}],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":[g]}],"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",J]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[so,J]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],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",J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",J]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[an,Tn,Va]}],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"]}}},CE=oE(SE);function H(...e){return CE(VN(e))}function Uy({text:e,streaming:t,className:n}){return u.jsxs("div",{className:H("font-sans text-[14px] leading-[1.65] tracking-[-0.005em] text-foreground","[&>p:last-child]:inline","[overflow-wrap:anywhere]",n),children:[u.jsx(Tj,{remarkPlugins:[UN],components:jE,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 jE={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:H("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(NE,{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 NE({children:e}){const t=P.useRef(null),n=Dr(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(Ex,{className:"h-3 w-3"})})]})}function Hy(e){return["workspace-sessions",e]}function EE(e){return nn({queryKey:Hy(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 PE(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:Hy(e)})})}function TE(e,t,n){return nn({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 IE({workspaceId:e,sessionPath:t,disabled:n=!1,onSelect:r,onNewSession:i,onFork:o}){const{data:s,isFetching:l,refetch:a}=EE(e),c=PE(e),[f,d]=P.useState(!1),[p,h]=P.useState("sessions"),{data:m}=TE(e,t,p==="fork"&&f),v=P.useRef(null),w=P.useRef(null),g=P.useRef(null),x=P.useRef(null),y=P.useRef(!1);P.useEffect(()=>{f||h("sessions")},[f]),P.useEffect(()=>{h("sessions")},[t]),P.useEffect(()=>{!e||t===void 0||a()},[e,t,a]),P.useEffect(()=>{if(!f)return;const T=N=>{v.current&&!v.current.contains(N.target)&&d(!1)},A=N=>{var z,R;if(N.key==="Escape"){N.preventDefault(),y.current=!0,p==="fork"?h("sessions"):d(!1);return}if(N.key==="Tab"){(z=w.current)==null||z.focus(),d(!1);return}if(p==="sessions"&&(N.key==="ArrowDown"||N.key==="ArrowUp"||N.key==="Home"||N.key==="End")){const G=g.current;if(!G)return;const K=Array.from(G.querySelectorAll('[role="option"]'));if(K.length===0)return;N.preventDefault();const q=K.indexOf(document.activeElement),le=N.key==="ArrowDown"?q<0?0:Math.min(q+1,K.length-1):N.key==="ArrowUp"?q<0?K.length-1:Math.max(q-1,0):N.key==="Home"?0:K.length-1;(R=K[le])==null||R.focus()}};return document.addEventListener("mousedown",T),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("keydown",A)}},[f,p]),P.useLayoutEffect(()=>{var T,A;if(f&&p==="sessions"){const N=x.current??((T=g.current)==null?void 0:T.querySelector('[role="option"]'));N==null||N.scrollIntoView({block:"nearest"}),N==null||N.focus({preventScroll:!0})}else!f&&y.current&&(y.current=!1,(A=w.current)==null||A.focus())},[f,p]);const b=n||!e,E=c.isPending?c.variables??null:null,C=T=>{if(c.isPending||T===t)return;const A=s==null?void 0:s.find(R=>R.path===T),N=A?Ka(A):qy(T);window.confirm(`Delete session "${N}"? This cannot be undone.`)&&c.mutate(T,{onError:R=>{window.alert(`Failed to delete session: ${R.message}`)}})},I=s==null?void 0:s.find(T=>T.path===t);return u.jsxs("div",{ref:v,className:"relative",children:[u.jsxs("button",{ref:w,type:"button",onClick:()=>d(T=>!T),disabled:b,"aria-label":"Session","aria-haspopup":"menu","aria-expanded":f,title:t===void 0?"Session — connecting":t===null?"Session — new":t,className:H("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",f&&"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:_E(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(Ur,{className:H("h-3 w-3 shrink-0 opacity-50 transition-transform",f&&"rotate-180")})]}),f&&u.jsx("div",{ref:g,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:p==="sessions"?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"py-1",children:[u.jsx(Wa,{icon:u.jsx(Wl,{className:"h-3.5 w-3.5"}),onClick:()=>{y.current=!0,d(!1),i()},children:"New session"}),u.jsx(Wa,{icon:u.jsx(zk,{className:"h-3.5 w-3.5"}),onClick:()=>h("fork"),children:"Fork from message…"}),u.jsx(Wa,{icon:l?u.jsx(Qt,{className:"h-3.5 w-3.5 animate-spin"}):u.jsx(Ok,{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(T=>{const A=T.path===t,N=E===T.path;return u.jsxs("div",{className:"group/row relative flex items-stretch px-1.5",children:[u.jsxs("button",{ref:A?x:void 0,type:"button",role:"option","aria-selected":A,onClick:()=>{y.current=!0,d(!1),A||r(T.path)},title:T.path,className:H("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:H("mt-0.5 h-3.5 w-3.5 shrink-0",A?"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:Ka(T)}),u.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground",children:RE(T.updatedAt)})]})]}),!A&&u.jsx("button",{type:"button",onClick:z=>{z.stopPropagation(),C(T.path)},disabled:c.isPending,"aria-label":`Delete session ${Ka(T)}`,title:c.isPending&&!N?"Another delete is in progress":"Delete session",className:H("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",N?"opacity-100":"opacity-0 group-hover/row:opacity-100 focus:opacity-100"),children:N?u.jsx(Qt,{className:"h-3 w-3 animate-spin"}):u.jsx(Qo,{className:"h-3 w-3"})})]},T.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:()=>h("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(Nx,{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:[!m&&u.jsx("div",{className:"px-3 py-3 text-xs text-muted-foreground",children:"Loading…"}),m&&m.length===0&&u.jsx("div",{className:"px-3 py-3 text-xs text-muted-foreground",children:"No messages to fork from."}),m==null?void 0:m.map(T=>u.jsx("button",{type:"button",onClick:()=>{y.current=!0,d(!1),o(T.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:T.text,children:T.text},T.entryId))]})]})})]})}function Wa({icon:e,children:t,onClick:n,disabled:r}){return u.jsxs("button",{type:"button",role:"menuitem",onClick:n,disabled:r,className:H("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 Ka(e){return e.name??e.preview??qy(e.path)}function qy(e){return e.split("/").at(-1)??e}function _E(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 RE(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 LE={online:"bg-signal-ok",streaming:"bg-brand",idle:"bg-muted-foreground/40",error:"bg-signal-error",warning:"bg-signal-warn"};function Pl({state:e}){return u.jsx("span",{className:H("inline-block h-1.5 w-1.5 shrink-0 rounded-full",LE[e],e==="streaming"&&"animate-[v2-halo-brand_2.4s_ease-out_infinite]")})}const AE={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:H("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]",AE[e],n),children:i})}function Kn({children:e,className:t}){return u.jsx("kbd",{className:H("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:H("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 na({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 jh(){const e=new Date,t=n=>String(n).padStart(2,"0");return`${t(e.getUTCHours())}:${t(e.getUTCMinutes())}:${t(e.getUTCSeconds())}Z`}function zE(){const[e,t]=P.useState(jh);return P.useEffect(()=>{const n=setInterval(()=>t(jh()),1e3);return()=>clearInterval(n)},[]),e}function Ga(e){return e==null?"—":e<1e3?`${Math.round(e)}ms`:e<1e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/1e3)}s`}function FE(e){if(e!=null)return e>=3e3?"text-signal-error":e>=1500?"text-signal-warn":"text-brand"}const Ya={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 ME(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 OE(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=ME(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=Ya[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:Ya[i]&&(n.fgClass=Ya[i],n.fgStyle=void 0)}}return n}const kc=/\x1b(?:\[([0-9;]*)([a-zA-Z])|\][^\x07\x1b]*(?:\x07|\x1b\\))/g;function DE(e){return e.includes("\r")?e.split(`
|
|
204
|
+
`).map(t=>{if(!t.includes("\r"))return t;const n=t.split("\r");return n[n.length-1]??""}).join(`
|
|
205
|
+
`):e}function bc(e){const t=DE(e),n=[];let r={},i=0,o=0;const s=a=>{if(!a)return;if(!$E(r)){n.push(a);return}const c=BE(r),f=UE(r);n.push(u.jsx("span",{className:c||void 0,style:f,children:a},o++))};kc.lastIndex=0;let l;for(;(l=kc.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=OE(r,c)}i=a+l[0].length}return i<t.length&&s(t.slice(i)),n}function $E(e){return!!(e.fgClass||e.fgStyle||e.bold||e.dim||e.italic||e.underline)}function BE(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 UE(e){return e.fgStyle?{color:e.fgStyle}:void 0}function Nh(e){return e.replace(kc,"")}function Qy({item:e}){if(e.kind==="bash")return u.jsx(Eh,{command:e.command,output:e.output,exitCode:e.exitCode,running:!1});const t=e3(e.args),n=e.toolName;return n==="edit"?u.jsx(QE,{item:e,args:t}):n==="write"?u.jsx(VE,{item:e,args:t}):n==="read"?u.jsx(WE,{item:e,args:t}):n==="bash"?u.jsx(Eh,{command:kt(t==null?void 0:t.command)??"",output:e.text,exitCode:void 0,running:e.status==="running",errored:e.status==="error"}):n==="update_plan"?u.jsx(GE,{item:e,args:t}):u.jsx(Vy,{item:e,args:t})}function HE({items:e}){const[t,n]=P.useState(!1),r=P.useId(),i=qE(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(Ur,{className:H("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(Qy,{item:o},o.id))})]})}function qE(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 QE({item:e,args:t}){const n=Kd(t),r=t3(t),i=e.status==="error",o=ZE(r);return u.jsxs(Vi,{children:[u.jsx(Vd,{name:"edit",verb:"Edited",path:n,status:e.status,stats:o}),r.length>0?u.jsx(JE,{children:u.jsx("div",{className:"flex flex-col gap-2 bg-background p-2",children:r.map((s,l)=>u.jsx(XE,{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 VE({item:e,args:t}){const n=Kd(t),r=kt(t==null?void 0:t.content)??"",i=e.status==="error";return u.jsxs(Vi,{children:[u.jsx(Vd,{name:"write",verb:"Wrote",path:n,status:e.status}),r?u.jsx(Wd,{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 WE({item:e,args:t}){const n=Kd(t),r=Th(t==null?void 0:t.offset),i=Th(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(Vd,{name:"read",verb:"Read",path:n,status:e.status,suffix:o}),e.text&&u.jsx(Wd,{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 Eh({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(na,{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(ra,{status:s})]}),t&&u.jsx(Wd,{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:bc(l)})})]})}function Vy({item:e,args:t}){const n=n3(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(na,{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(ra,{status:e.status})]}),e.text&&u.jsx(Go,{text:e.text})]})}function KE(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 GE({item:e,args:t}){const n=P.useMemo(()=>KE(t),[t]),r=n.length;if(r===0)return u.jsx(Vy,{item:e,args:t});const i=n.filter(s=>s.status==="completed").length,o=i/r;return u.jsxs(Vi,{children:[u.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[u.jsx(na,{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:[i,"/",r]}),u.jsx("span",{className:"inline-block h-1 w-[48px] overflow-hidden rounded-full bg-border-soft",role:"progressbar","aria-valuemin":0,"aria-valuenow":i,"aria-valuemax":r,"aria-label":`Plan progress: ${i} of ${r} completed`,children:u.jsx("span",{className:"block h-full rounded-full bg-brand transition-[width] duration-300",style:{width:`${o*100}%`}})})]}),u.jsx(ra,{status:e.status})]}),u.jsx("ul",{className:"border-t border-border-soft bg-background px-3 py-1.5","aria-label":"Plan items",children:n.map(s=>u.jsxs("li",{className:"flex items-start gap-2 py-[3px]",children:[u.jsx("span",{className:"mt-[2px] shrink-0",children:s.status==="completed"?u.jsx(ss,{className:"h-3.5 w-3.5 text-signal-ok","aria-hidden":!0}):s.status==="in_progress"?u.jsx(Qt,{className:"h-3.5 w-3.5 text-brand",style:{animation:"v2-spin 1.4s linear infinite"},"aria-label":"In progress"}):u.jsx(Lk,{className:"h-3.5 w-3.5 text-muted-foreground/40","aria-hidden":!0})}),u.jsxs("span",{className:H("min-w-0 flex-1 text-[12.5px] leading-[1.5]",s.status==="completed"?"text-muted-foreground line-through decoration-muted-foreground/30":s.status==="in_progress"?"text-foreground font-medium":"text-muted-foreground"),children:[s.title,s.note&&u.jsxs("span",{className:"ml-1.5 text-[11.5px] text-muted-foreground/60",children:["— ",s.note]})]})]},s.id))})]})}function Vi({children:e}){return u.jsx("div",{className:"overflow-hidden rounded-[10px] border border-border-soft bg-muted",children:e})}function Vd({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(na,{tool:e,className:"shrink-0 text-muted-foreground"}),u.jsx("span",{className:"shrink-0 text-[12.5px] text-foreground",children:t}),n?u.jsx(YE,{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(ra,{status:r})]})}function ra({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 YE({path:e}){const t=Dr(s=>s.pushToast),[n,r]=P.useState(!1),i=Ys(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(Ex,{className:"h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60"})]})}function XE({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(Ph,{kind:"del",text:t.oldText}),u.jsx(Ph,{kind:"add",text:t.newText})]})}function Ph({kind:e,text:t}){if(!t)return null;const n=t.split(`
|
|
206
|
+
`),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:H("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 JE({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:H("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(Ur,{className:H("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(`
|
|
207
|
+
`).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:Nh(e).slice(0,400),children:bc(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:Nh(e).slice(0,400),children:bc(e)}),u.jsxs("button",{type:"button","aria-expanded":t,"aria-controls":r,onClick:()=>n(o=>!o),className:H("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(Ur,{className:H("h-3 w-3 transition-transform",t&&"rotate-180")}),t?"Collapse":`Show ${i} line${i===1?"":"s"}`]})]})}function ZE(e){let t=0,n=0;for(const r of e)r.oldText&&(n+=r.oldText.split(`
|
|
208
|
+
`).filter(i=>i.length>0).length),r.newText&&(t+=r.newText.split(`
|
|
209
|
+
`).filter(i=>i.length>0).length);return{adds:t,dels:n}}function Wd({text:e,render:t,alwaysCollapsible:n=!1}){const[r,i]=P.useState(!1),o=P.useId(),s=e.split(`
|
|
210
|
+
`).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:H("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(Ur,{className:H("h-3 w-3 transition-transform",r&&"rotate-180")}),r?"Collapse":`Show ${s} line${s===1?"":"s"}`]})]})}function e3(e){return e&&typeof e=="object"?e:void 0}function kt(e){return typeof e=="string"?e:void 0}function Th(e){return typeof e=="number"?e:void 0}function Kd(e){return kt(e==null?void 0:e.path)??kt(e==null?void 0:e.file_path)}function t3(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=kt(e.old_string)??kt(e.oldText),n=kt(e.new_string)??kt(e.newText);return typeof t=="string"&&typeof n=="string"?[{oldText:t,newText:n}]:[]}function Ys(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 n3(e,t){if(!t)return;if(e==="grep"){const r=kt(t.pattern),i=kt(t.path);if(r)return`/${r}/${i?` in ${Ys(i)}`:""}`}if(e==="find"){const r=kt(t.pattern),i=kt(t.path);if(r)return`${r}${i?` in ${Ys(i)}`:""}`}if(e==="ls"){const r=kt(t.path);return r?Ys(r):"."}const n=Object.keys(t);if(n.length!==0)return`(${n.slice(0,4).join(", ")}${n.length>4?", …":""})`}function r3(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")o3(i)?(r(),t.push({kind:"single",item:i})):n.push(i);else{if(i3(i))continue;r(),t.push({kind:"single",item:i})}return r(),t}function i3(e){return e.kind==="assistant"&&!e.streaming&&e.text.length===0&&e.thinking.length===0}function o3(e){return e.kind==="tool"?e.status==="error":e.exitCode!==void 0&&e.exitCode!==0}function Gd({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:H("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 s3({className:e}){return u.jsx("span",{className:H("font-sans text-[15px] font-medium tracking-[-0.01em] text-foreground",e),children:"pi-pilot"})}let l3=1;const Fn=()=>String(l3++),Re=zy(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=>a3(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: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 a3(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"?{}:u3(e,t.payload)}function u3(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=Ih(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=Ih(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 Ih(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 c3(e,t){const n=Re(d=>d.apply),r=Re(d=>d.pushUser),i=Re(d=>d.reset),o=Re(d=>d.setSwitching),s=Re(d=>d.applyHistory),l=Re(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 m=Re.getState().sessionPath;if(m!==void 0&&m===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 m=h.workspaceId,v=h.sessionPath,w=a.current;if(w&&w.wsId===m&&w.sp===v)return;const g=c.current;g&&g.controller.abort(),a.current={wsId:m,sp:v};const x=++f.current,y=new AbortController,b={token:x,expectedWorkspaceId:m,expectedSessionPath:v,controller:y,buffer:[]};c.current=b;const E=st.connectionEpoch,C=v?`?sessionPath=${encodeURIComponent(v)}`:"";de(`/api/workspaces/${m}/history${C}`,{signal:y.signal}).then(I=>{var N;if(((N=c.current)==null?void 0:N.token)!==x)return;const T=()=>{var z;((z=c.current)==null?void 0:z.token)===x&&(c.current=null)};if(st.connectionEpoch!==E){T();return}if(Re.getState().sessionPath!==v){T();return}s(I.items,I.isStreaming),Xa(b),c.current=null}).catch(I=>{var T;(I==null?void 0:I.name)!=="AbortError"&&((T=c.current)==null?void 0:T.token)===x&&(console.error("[useSessionStream] history fetch failed:",I),Xa(b),c.current=null)})},p=st.on(d);return()=>{p();const h=c.current;h&&(h.controller.abort(),c.current=null,Xa(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 Xa(e){const{expectedWorkspaceId:t,expectedSessionPath:n,buffer:r}=e;for(const i of r)i.type==="event"&&i.workspaceId===t&&i.sessionPath===n&&Re.getState().apply(i)}function d3({workspaceId:e,rightPanel:t,onToggleConfig:n,onToggleResources:r}){const i=Re(E=>E.items),o=Re(E=>E.running),s=Re(E=>E.switching),l=Re(E=>E.sessionPath),[a,c]=P.useState(void 0),{sendPrompt:f,abort:d,newSession:p,fork:h}=c3(e,a),m=jd(e).data,v=P.useMemo(()=>b3(m),[m]),w=P.useCallback(E=>{const C=w3(E,v);f(E,{skipOptimistic:C})},[f,v]),g=P.useCallback(E=>{c(C=>({path:E,nonce:((C==null?void 0:C.nonce)??0)+1}))},[]),x=P.useRef(null),[y,b]=P.useState(0);return P.useLayoutEffect(()=>{const E=x.current;if(!E)return;b(E.getBoundingClientRect().height);const C=new ResizeObserver(I=>{const T=I[0];T&&b(T.contentRect.height)});return C.observe(E),()=>C.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(f3,{workspaceId:e,sessionPath:l,running:o,switching:s,onSelectSession:g,onNewSession:p,onFork:h,rightPanel:t,onToggleConfig:n,onToggleResources:r}),u.jsx(p3,{}),u.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[u.jsx(m3,{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(j3,{workspaceId:e,onSend:w,onAbort:d,running:o,disabled:s})})]})]}):u.jsx("main",{className:"relative flex flex-1 items-center justify-center bg-background",children:u.jsx(Wy,{title:"Ready when you are.",tagline:"Pick or add a workspace from the left to begin a session."})})}function f3({workspaceId:e,sessionPath:t,running:n,switching:r,onSelectSession:i,onNewSession:o,onFork:s,rightPanel:l,onToggleConfig:a,onToggleResources:c}){const f=Re(h=>{var m;return(m=h.contextUsage)==null?void 0:m.percent}),{data:d}=Sx(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(IE,{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(Ak,{className:"h-3.5 w-3.5"})}),a&&u.jsx(Ko,{active:l==="config",onClick:a,title:"Configuration",children:u.jsx(Tx,{className:"h-3.5 w-3.5"})})]})]})})}function p3(){const e=Re(n=>n.compaction),t=Re(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:h3(e)}),t!=null&&u.jsxs("span",{className:"font-mono text-[11px] tabular-nums",children:["Context ",Math.round(t),"%"]})]}):null}function h3(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 m3({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:H("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(Wy,{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:r3(e).flatMap(l=>{if(l.kind==="single")return[u.jsx(g3,{item:l.item},l.item.id)];const a=`group:${l.items[0].id}`;return[u.jsx(x3,{group:l},a)]})})})}function g3({item:e}){return e.kind==="user"?u.jsx(y3,{item:e}):e.kind==="assistant"?u.jsx(v3,{item:e}):e.kind==="tool"||e.kind==="bash"?u.jsx("div",{className:"pl-10",children:u.jsx(Qy,{item:e})}):null}function x3({group:e}){return u.jsx("div",{className:"pl-10",children:u.jsx(HE,{items:e.items})})}function y3({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(Uy,{text:e.text})}),u.jsx(wc,{children:"You"})]})}function v3({item:e}){return!e.text&&!e.thinking&&!e.streaming?null:u.jsxs("div",{className:"flex gap-3",children:[u.jsx(Gd,{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(wc,{className:H(FE(e.firstTokenMs)),title:e.totalMs!=null?`first token ${Ga(e.firstTokenMs)} · total ${Ga(e.totalMs)}`:void 0,children:Ga(e.firstTokenMs)}),e.streaming&&u.jsx(wc,{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(Uy,{text:e.text,streaming:e.streaming})]})]})}function wc({children:e,className:t,title:n}){return u.jsx("span",{title:n,className:H("text-[11px] tracking-[-0.005em] text-muted-foreground",t),children:e})}function Wy({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(Gd,{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 _h(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 k3(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 Rh=50;function b3(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 w3(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 S3(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>Rh?r.slice(0,Rh):r}function C3(e){return e?e.entries.map(t=>({key:t.path,label:t.relPath,insertText:`@${t.relPath} `})):[]}function j3({workspaceId:e,onSend:t,onAbort:n,running:r,disabled:i}){var le;const[o,s]=P.useState(""),[l,a]=P.useState(0),[c,f]=P.useState(!1),[d,p]=P.useState(0),[h,m]=P.useState(null),v=P.useRef(null),w=P.useRef(!1),g=P.useRef(0),x=P.useMemo(()=>_h(o,l),[o,l]),y=x==null?void 0:x.kind,b=(x==null?void 0:x.query)??"",E=jd(y==="slash"?e:void 0),C=Bk(e,y==="at"?b:"",y==="at"),I=P.useMemo(()=>y?y==="slash"?S3(E.data,b):C3(C.data):[],[y,b,E.data,C.data]),T=x?`${x.kind}:${x.tokenStart}:${x.query}`:null,A=!!x&&I.length>0&&h!==T;P.useEffect(()=>{p(0)},[T]),P.useEffect(()=>{h&&h!==T&&m(null)},[T,h]),P.useCallback(()=>{const Q=v.current;Q&&a(Q.selectionStart??0)},[]);const N=()=>{if(i)return;const Q=o.trim();Q&&(t(Q),s(""),a(0))},z=Q=>{const L=v.current,B=(L==null?void 0:L.value)??o,k=(L==null?void 0:L.selectionStart)??l,V=_h(B,k);if(!V)return;const oe=V.tokenStart+1+V.query.length,S=B.slice(0,V.tokenStart),ge=B.slice(oe),Ue=`${S}${Q.insertText}${ge}`,ue=V.tokenStart+Q.insertText.length;s(Ue),a(ue),m(null),requestAnimationFrame(()=>{const it=v.current;it&&(it.focus(),it.setSelectionRange(ue,ue))})},R=()=>{w.current=!0},G=()=>{w.current=!1,g.current=performance.now()},K=Q=>{if(!(w.current||Q.nativeEvent.isComposing||Q.nativeEvent.keyCode===229)&&!(Q.key==="Enter"&&performance.now()-g.current<200)){if(A){if(Q.key==="ArrowDown"){Q.preventDefault(),p(L=>(L+1)%I.length);return}if(Q.key==="ArrowUp"){Q.preventDefault(),p(L=>(L-1+I.length)%I.length);return}if(Q.key==="Enter"||Q.key==="Tab"){Q.preventDefault();const L=I[d]??I[0];L&&z(L);return}if(Q.key==="Escape"){Q.preventDefault(),T&&m(T);return}}Q.key==="Enter"&&!Q.shiftKey&&(Q.preventDefault(),N())}},q=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:H("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:[A&&x&&u.jsx(T3,{kind:x.kind,query:x.query,items:I,selectedIdx:d,loading:x.kind==="slash"?E.isPending:C.isPending,truncated:x.kind==="at"?!!((le=C.data)!=null&&le.truncated):!1,onPick:z,onHover:p}),u.jsx(N3,{textareaRef:v,text:o,onTextChange:(Q,L)=>{s(Q),a(L)},onCaretChange:a,onFocus:()=>f(!0),onBlur:()=>f(!1),onKeyDown:K,onCompositionStart:R,onCompositionEnd:G,disabled:i,placeholder:q}),u.jsx("div",{className:"flex items-center justify-end px-2 pb-2",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(Dk,{className:"h-3 w-3",fill:"currentColor"})}):u.jsx("button",{type:"button",onClick:N,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(jx,{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 Lh="block max-h-[220px] min-h-[44px] w-full resize-none px-4 pt-3 pb-1 font-sans text-[14px] leading-[1.55] tracking-[-0.005em] whitespace-pre-wrap break-words";function N3({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),m=P.useMemo(()=>k3(t),[t]),v=P.useCallback(()=>{const E=e.current;E&&r(E.selectionStart??0)},[e,r]),w=P.useCallback(()=>{const E=e.current,C=d.current;!E||!C||(C.scrollTop=E.scrollTop,C.scrollLeft=E.scrollLeft)},[e,d]);P.useLayoutEffect(()=>{w()},[t,w]);const g=P.useMemo(()=>E3(t,m),[t,m]),y=m.length>0,b=p?"text-transparent":"text-foreground";return u.jsxs("div",{className:"relative",children:[y&&u.jsxs("div",{ref:d,"aria-hidden":!0,className:H(Lh,"pointer-events-none absolute inset-0 overflow-hidden whitespace-pre-wrap"),children:[g.map((E,C)=>E.kind==="text"?u.jsx("span",{className:b,children:E.text},C):u.jsx(P3,{body:E.text,hideText:p},C)),""]}),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:w,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:H(Lh,"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 E3(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 P3({body:e,hideText:t=!1}){return u.jsx("span",{className:H("inline rounded-[3px] bg-brand/[0.08] [box-decoration-break:clone] [-webkit-box-decoration-break:clone]",t?"text-transparent":"text-brand"),children:e})}function T3({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:m=>{m.preventDefault(),s(d)},onMouseEnter:()=>l(p),className:H("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:H("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 I3(){return nn({queryKey:Wi,queryFn:()=>de("/api/model-configs")})}function _3(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 R3(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 L3(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 A3(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 z3(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 Ah=["anthropic-messages","openai-completions","openai-responses","azure-openai-responses","openai-codex-responses","mistral-conversations","bedrock-converse-stream","google-generative-ai","google-vertex"];function F3({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(M3,{onClose:n}),u.jsx(O3,{workspaceId:e})]})}):null}function M3({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 O3({workspaceId:e}){const{data:t,isLoading:n,error:r}=I3(),[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(Qt,{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(zh,{workspaceId:e,initialName:i.name,initialConfig:i.config,onDone:()=>o(null)}):s?u.jsx(zh,{workspaceId:e,initialName:"",initialConfig:null,onDone:()=>l(!1)}):a?u.jsx(Fh,{workspaceId:e,provider:a.provider,initialModel:a.model,onDone:()=>c(null)}):f?u.jsx(Fh,{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(Wl,{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,m])=>u.jsx(D3,{name:h,config:m,workspaceId:e,onEditProvider:()=>o({name:h,config:m}),onEditModel:v=>c({provider:h,model:v}),onAddModel:()=>d(h)},h))]})}function D3({name:e,config:t,workspaceId:n,onEditProvider:r,onEditModel:i,onAddModel:o}){const[s,l]=P.useState(!0),a=R3(n),c=z3(n);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(f=>!f),className:"p-0.5 text-muted-foreground hover:text-foreground",children:s?u.jsx(Ur,{className:"h-3 w-3"}):u.jsx(Cd,{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(sc,{className:"h-3 w-3"})}),u.jsx("button",{type:"button",onClick:()=>{confirm(`Delete provider "${e}" and all its models?`)&&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(f=>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:f.name}),u.jsx("span",{className:"font-mono text-[9px] text-muted-foreground",children:f.id}),f.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(f),className:"rounded-[2px] p-0.5 text-muted-foreground hover:text-foreground",title:"Edit model",children:u.jsx(sc,{className:"h-2.5 w-2.5"})}),u.jsx("button",{type:"button",onClick:()=>{confirm(`Delete model "${f.name}"?`)&&c.mutate({provider:e,modelId:f.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"})})]},f.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(Wl,{className:"h-2.5 w-2.5"})," Add Model"]})]})]})}function zh({workspaceId:e,initialName:t,initialConfig:n,onDone:r}){var y;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&&!Ah.includes(n.api)?"__custom__":(n==null?void 0:n.api)??"anthropic-messages"),[d,p]=P.useState(n!=null&&n.api&&!Ah.includes(n.api)?n.api:""),[h,m]=P.useState((n==null?void 0:n.apiKey)??""),[v,w]=P.useState(((y=n==null?void 0:n.compat)==null?void 0:y.forceAdaptiveThinking)===!0),g=_3(e),x=b=>{b.preventDefault();const E=c==="__custom__"?d:c;if(!E){alert("API type is required");return}const C={baseUrl:l,api:E,apiKey:h,...v?{compat:{forceAdaptiveThinking:!0}}:{},models:(n==null?void 0:n.models)??[]};g.mutate({name:o,provider:C},{onSuccess:()=>r()})};return u.jsxs("form",{onSubmit:x,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(Xe,{label:"Name",required:!0,children:u.jsx("input",{value:o,onChange:b=>s(b.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(Xe,{label:"Base URL",required:!0,children:u.jsx("input",{value:l,onChange:b=>a(b.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(Xe,{label:"API Type",required:!0,children:[u.jsxs("select",{value:c,onChange:b=>f(b.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:b=>p(b.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(Xe,{label:"API Key",required:!0,children:u.jsx("input",{type:"password",value:h,onChange:b=>m(b.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:b=>w(b.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:g.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:g.isPending?"Saving...":i?"Update":"Create"})]}),g.isError&&u.jsx("p",{className:"mx-4 mb-3 font-mono text-[10px] text-signal-rose",children:g.error.message})]})}function Fh({workspaceId:e,provider:t,initialModel:n,onDone:r}){var Q,L,B,k,V,oe;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,m]=P.useState(String((n==null?void 0:n.maxTokens)??32e3)),[v,w]=P.useState(String(((Q=n==null?void 0:n.cost)==null?void 0:Q.input)??0)),[g,x]=P.useState(String(((L=n==null?void 0:n.cost)==null?void 0:L.output)??0)),[y,b]=P.useState(String(((B=n==null?void 0:n.cost)==null?void 0:B.cacheRead)??0)),[E,C]=P.useState(String(((k=n==null?void 0:n.cost)==null?void 0:k.cacheWrite)??0)),[I,T]=P.useState(((V=n==null?void 0:n.thinkingLevelMap)==null?void 0:V.high)??"high"),[A,N]=P.useState(((oe=n==null?void 0:n.thinkingLevelMap)==null?void 0:oe.xhigh)??"max"),[z,R]=P.useState(n!=null&&n.headers?JSON.stringify(n.headers,null,2):""),G=L3(e),K=A3(e),q=i?K:G,le=S=>{S.preventDefault();let ge;if(z.trim())try{ge=JSON.parse(z)}catch{alert("Headers must be valid JSON");return}const Ue={id:o,name:l,reasoning:c,input:["text"],contextWindow:Number(d),maxTokens:Number(h),cost:{input:Number(v),output:Number(g),cacheRead:Number(y),cacheWrite:Number(E)},...c?{thinkingLevelMap:{high:I,xhigh:A}}:{},...ge?{headers:ge}:{}};i?K.mutate({provider:t,modelId:n.id,model:Ue},{onSuccess:()=>r()}):G.mutate({provider:t,model:Ue},{onSuccess:()=>r()})};return u.jsxs("form",{onSubmit:le,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(Xe,{label:"Model ID",required:!0,children:u.jsx("input",{value:o,onChange:S=>s(S.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(Xe,{label:"Display Name",required:!0,children:u.jsx("input",{value:l,onChange:S=>a(S.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(Xe,{label:"Context Window",children:u.jsx("input",{type:"number",value:d,onChange:S=>p(S.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(Xe,{label:"Max Tokens",children:u.jsx("input",{type:"number",value:h,onChange:S=>m(S.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:S=>f(S.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(Xe,{label:"Thinking High maps to",children:u.jsx("input",{value:I,onChange:S=>T(S.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(Xe,{label:"Thinking XHigh maps to",children:u.jsx("input",{value:A,onChange:S=>N(S.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(Xe,{label:"Input",children:u.jsx("input",{type:"number",step:"0.01",value:v,onChange:S=>w(S.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(Xe,{label:"Output",children:u.jsx("input",{type:"number",step:"0.01",value:g,onChange:S=>x(S.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(Xe,{label:"Cache Read",children:u.jsx("input",{type:"number",step:"0.01",value:y,onChange:S=>b(S.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(Xe,{label:"Cache Write",children:u.jsx("input",{type:"number",step:"0.01",value:E,onChange:S=>C(S.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(Xe,{label:"Custom Headers (JSON)",children:u.jsx("textarea",{value:z,onChange:S=>R(S.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:q.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:q.isPending?"Saving...":i?"Update":"Create"})]}),q.isError&&u.jsx("p",{className:"mx-4 mb-3 font-mono text-[10px] text-signal-rose",children:q.error.message})]})}function Xe({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 $3({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(B3,{onClose:n}),u.jsx("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto p-4",children:u.jsx(U3,{workspaceId:e})})]}):null}function B3({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 U3({workspaceId:e}){const t=Re(s=>s.sessionPath),n=Re(s=>s.running),{data:r,isLoading:i,error:o}=Sx(e,t);return i?u.jsxs("div",{className:"flex items-center justify-center py-8 text-[12px] text-muted-foreground",children:[u.jsx(Qt,{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(H3,{workspaceId:e,currentModel:r.currentModel,availableModels:r.availableModels,disabled:n}),u.jsx(W3,{workspaceId:e,level:r.thinkingLevel,availableLevels:r.availableThinkingLevels,disabled:n}),u.jsx(K3,{workspaceId:e,activeTools:r.activeTools,allTools:r.allTools,disabled:n})]})}function H3({workspaceId:e,currentModel:t,availableModels:n,disabled:r}){const i=Ck(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(Tl,{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(Tx,{className:"h-3 w-3"})," Manage"]})]}),u.jsx(q3,{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(F3,{workspaceId:e,open:o,onClose:()=>s(!1)})]})}function q3({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 m=w=>{s.current&&!s.current.contains(w.target)&&o(!1)},v=w=>{var g,x;if(w.key==="Escape"){w.preventDefault(),f.current=!0,o(!1);return}if(w.key==="Tab"){(g=l.current)==null||g.focus(),o(!1);return}if(w.key==="ArrowDown"||w.key==="ArrowUp"||w.key==="Home"||w.key==="End"){const y=a.current;if(!y)return;const b=Array.from(y.querySelectorAll('[role="option"]'));if(b.length===0)return;w.preventDefault();const E=b.indexOf(document.activeElement),C=w.key==="ArrowDown"?E<0?0:Math.min(E+1,b.length-1):w.key==="ArrowUp"?E<0?b.length-1:Math.max(E-1,0):w.key==="Home"?0:b.length-1;(x=b[C])==null||x.focus()}};return document.addEventListener("mousedown",m),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",v)}},[i]),P.useLayoutEffect(()=>{var m,v;if(i){const w=c.current??((m=a.current)==null?void 0:m.querySelector('[role="option"]'));w==null||w.scrollIntoView({block:"nearest"}),w==null||w.focus({preventScroll:!0})}else f.current&&(f.current=!1,(v=l.current)==null||v.focus())},[i]);const d=t.find(m=>`${m.provider}/${m.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(m=>!m),disabled:n,"aria-label":"Model","aria-haspopup":"listbox","aria-expanded":i,title:h,className:H("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(Ur,{className:H("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(m=>{const v=`${m.provider}/${m.modelId}`,w=v===e;return u.jsxs("button",{ref:w?c:void 0,type:"button",role:"option","aria-selected":w,onClick:()=>{f.current=!0,o(!1),w||r(m.provider,m.modelId)},title:`${m.provider}/${m.modelId}`,className:H("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",w?"bg-brand/[0.08] text-brand-strong":"text-foreground hover:bg-accent/60"),children:[u.jsx(ss,{className:H("mt-0.5 h-3 w-3 shrink-0",w?"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:m.name}),u.jsxs("span",{className:H("truncate font-mono text-[11px]",w?"text-brand":"text-muted-foreground"),children:[m.provider,"/",m.modelId]})]})]},v)})]})]})]})}const Q3={off:"Off",minimal:"Min",low:"Low",medium:"Med",high:"High",xhigh:"Max"},V3={off:"Off",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"Extra high"};function W3({workspaceId:e,level:t,availableLevels:n,disabled:r}){const i=jk(e);return n.length===0?u.jsxs("section",{children:[u.jsx(Tl,{children:"Thinking"}),u.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Model has no thinking support."})]}):u.jsxs("section",{children:[u.jsx(Tl,{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:V3[o]??o,className:H("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:Q3[o]??o},o))}),i.isError&&u.jsx("p",{className:"mt-1.5 text-[11.5px] text-signal-error",children:i.error.message})]})}function K3({workspaceId:e,activeTools:t,allTools:n,disabled:r}){const i=Nk(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(Tl,{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:H("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 Tl({children:e}){return u.jsx("h3",{className:"mb-1.5 text-[11.5px] font-medium text-muted-foreground",children:e})}let G3=0,Y3=0;function X3(e){const t=Dr(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-${++G3}`,workspaceId:e??"",message:i,notifyType:"error"})}),[t,e])}function J3(){const e=Dr(t=>t.pushToast);P.useEffect(()=>st.on(n=>{if(n.type!=="extension_error")return;const r=eP(n.extensionPath);e({id:`exterr-${++Y3}`,workspaceId:n.workspaceId,message:`${r}: ${n.event}: ${n.message}`,notifyType:"error"})}),[e])}function Z3(e){const t=Dr(n=>n.pushToast);P.useEffect(()=>{},[t,e])}function eP(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 tP(){const e=Dr(n=>n.toasts),t=Dr(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(nP,{toast:n,onClose:()=>t(n.id)},n.id))})}function nP({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"?jp:e.notifyType==="info"?Fk:Rk,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:H("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:H("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 rP({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(iP,{kind:t.kind,mode:t.mode,onClose:n}),t.mode==="create"?u.jsx(oP,{workspaceId:e,kind:t.kind,defaultScope:t.defaultScope,onDone:n}):u.jsx(sP,{workspaceId:e,kind:t.kind,filePath:t.filePath,onDone:n})]})})}function iP({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 oP({workspaceId:e,kind:t,defaultScope:n,onDone:r}){var C,I;const[i,o]=P.useState(n),[s,l]=P.useState(""),[a,c]=P.useState(""),[f,d]=P.useState(""),[p,h]=P.useState(!1),[m,v]=P.useState(t==="skill"?lP:""),w=qk(e),g=Kk(e),x=w.isPending||g.isPending,y=((C=w.error)==null?void 0:C.message)??((I=g.error)==null?void 0:I.message),b=async()=>{try{t==="skill"?await w.mutateAsync({scope:i,name:s.trim(),description:a.trim(),body:m,disableModelInvocation:p||void 0}):await g.mutateAsync({scope:i,name:s.trim(),description:a.trim(),argumentHint:f.trim()||void 0,body:m}),r()}catch{}},E=!x&&s.trim().length>0&&a.trim().length>0&&m.length>0;return u.jsx(Ky,{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:m,onBodyChange:v,submitLabel:"Create",canSubmit:E,pending:x,error:y,onSubmit:b,onCancel:r})}function sP({workspaceId:e,kind:t,filePath:n,onDone:r}){var R,G,K;const i=Hk(e,t==="skill"?n:void 0),o=Wk(e,t==="prompt"?n:void 0),s=t==="skill"?i.data:o.data,l=(R=t==="skill"?i.error:o.error)==null?void 0:R.message,a=t==="skill"?i.isLoading:o.isLoading,[c,f]=P.useState(!1),[d]=P.useState(void 0),[p,h]=P.useState(""),[m,v]=P.useState(""),[w,g]=P.useState(""),[x,y]=P.useState(!1),[b,E]=P.useState("");P.useEffect(()=>{!s||c||(h(s.name),v(s.description),g(s.argumentHint??""),y(!!s.disableModelInvocation),E(s.body),f(!0))},[s,c]);const C=Qk(e),I=Gk(e),T=C.isPending||I.isPending,A=((G=C.error)==null?void 0:G.message)??((K=I.error)==null?void 0:K.message),N=async()=>{try{t==="skill"?await C.mutateAsync({filePath:n,name:p.trim(),description:m.trim(),body:b,disableModelInvocation:x||void 0}):await I.mutateAsync({filePath:n,name:p.trim(),description:m.trim(),argumentHint:w.trim()||void 0,body:b}),r()}catch{}};if(a)return u.jsxs("div",{className:"flex flex-1 items-center justify-center text-muted-foreground",children:[u.jsx(Qt,{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 z=c&&!T&&p.trim().length>0&&m.trim().length>0&&b.length>0;return u.jsx(Ky,{kind:t,scope:d??s.scope,onScopeChange:()=>{},scopeLocked:!0,scopeLockedReason:"Move the file on disk to change scope.",name:p,onNameChange:h,description:m,onDescriptionChange:v,argumentHint:w,onArgumentHintChange:g,disableModelInvocation:x,onDisableModelInvocationChange:y,body:b,onBodyChange:E,filePath:s.filePath,submitLabel:"Save",canSubmit:z,pending:T,error:A,onSubmit:N,onCancel:r})}function Ky(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(Mh,{active:e.scope==="project",onClick:()=>e.onScopeChange("project"),disabled:e.scopeLocked,children:"Project"}),u.jsx(Mh,{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(Qt,{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 Mh({active:e,disabled:t,onClick:n,children:r}){return u.jsx("button",{type:"button",onClick:n,disabled:t,className:H("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 lP=`# Skill name
|
|
211
|
+
|
|
212
|
+
Describe what the skill does, when to use it, and any setup steps.
|
|
213
|
+
|
|
214
|
+
## Usage
|
|
215
|
+
|
|
216
|
+
\`\`\`bash
|
|
217
|
+
./scripts/example.sh <input>
|
|
218
|
+
\`\`\`
|
|
219
|
+
`;function aP({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(uP,{workspaceId:e,onClose:n})}):null}function uP({workspaceId:e,onClose:t}){const{data:n,isLoading:r,error:i}=jd(e),o=Uk(e),[s,l]=P.useState("skills"),[a,c]=P.useState(null),f=m=>c({kind:m,mode:"create",defaultScope:"project"}),d=(m,v)=>c({kind:m,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(Ja,{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(Qt,{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(Ja,{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(Ja,{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(Za,{active:s==="skills",onClick:()=>l("skills"),label:"Skills",count:p.skills}),u.jsx(Za,{active:s==="prompts",onClick:()=>l("prompts"),label:"Prompts",count:p.prompts}),u.jsx(Za,{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(cP,{workspaceId:e,skills:n.skills,onNew:()=>f("skill"),onEdit:m=>d("skill",m.filePath)}),s==="prompts"&&u.jsx(dP,{workspaceId:e,prompts:n.prompts,onNew:()=>f("prompt"),onEdit:m=>d("prompt",m.filePath)}),s==="extensions"&&u.jsx(fP,{extensionsEnabled:n.extensionsEnabled,extensions:n.extensions,errors:n.extensionErrors,disabledExtensions:n.disabledExtensions})]})]}),a&&u.jsx(rP,{workspaceId:e,request:a,onClose:()=>c(null)})]})}function Ja({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(Mk,{className:H("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 Za({active:e,onClick:t,label:n,count:r}){return u.jsxs("button",{type:"button",onClick:t,className:H("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 cP({workspaceId:e,skills:t,onNew:n,onEdit:r}){const i=Vk(e),o=s=>{confirm(`Delete skill "${s.name}"?
|
|
220
|
+
|
|
221
|
+
This removes ${s.filePath} and any sibling files in its directory.`)&&i.mutate({filePath:s.filePath})};return u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsx(Gy,{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(Jy,{text:"No skills discovered."}):u.jsx("ul",{className:"flex flex-col gap-2",children:t.map(s=>{var l;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:s.name}),u.jsx(Yd,{source:s.source})]}),s.description&&u.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:s.description}),s.disableModelInvocation&&u.jsxs("p",{className:"mt-1 text-[11.5px] italic text-muted-foreground",children:["Manual invocation only (/skill:",s.name,")"]}),u.jsx(Xd,{path:s.filePath}),s.managed?u.jsx(Xy,{onEdit:()=>r(s),onDelete:()=>o(s),deleting:i.isPending&&((l=i.variables)==null?void 0:l.filePath)===s.filePath}):u.jsx(Yy,{kind:"skill",source:s.source})]},s.filePath)})})]})}function dP({workspaceId:e,prompts:t,onNew:n,onEdit:r}){const i=Yk(e),o=s=>{confirm(`Delete prompt template /${s.name}?
|
|
222
|
+
|
|
223
|
+
${s.filePath}`)&&i.mutate({filePath:s.filePath})};return u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsx(Gy,{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(Jy,{text:"No prompt templates discovered."}):u.jsx("ul",{className:"flex flex-col gap-2",children:t.map(s=>{var l;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:["/",s.name,s.argumentHint&&u.jsx("span",{className:"ml-1 font-normal text-muted-foreground",children:s.argumentHint})]}),u.jsx(Yd,{source:s.source})]}),s.description&&u.jsx("p",{className:"mt-1 text-[12px] text-muted-foreground",children:s.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:s.content})]}),u.jsx(Xd,{path:s.filePath}),s.managed?u.jsx(Xy,{onEdit:()=>r(s),onDelete:()=>o(s),deleting:i.isPending&&((l=i.variables)==null?void 0:l.filePath)===s.filePath}):u.jsx(Yy,{kind:"prompt",source:s.source})]},s.filePath)})})]})}function fP({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:Oh(i.path)}),u.jsx(Yd,{source:i.source})]}),u.jsx(pP,{ext:i}),u.jsx(Xd,{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(_k,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),u.jsx("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:Oh(i)})]},i))]})]})}function pP({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 Gy({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(Wl,{className:"h-3 w-3 transition-transform group-hover:rotate-90"}),e]})}function Yy({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 Xy({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(sc,{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(Qt,{className:"h-3 w-3 animate-spin"}):u.jsx(Qo,{className:"h-3 w-3"})," ","Delete"]})]})}function Yd({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 Xd({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 Jy({text:e}){return u.jsx("p",{className:"py-8 text-center text-[12.5px] text-muted-foreground",children:e})}function Oh(e){return e.replace(/\/+$/,"").split("/").at(-1)||e}const Jd=["workspaces"];function hP(){return nn({queryKey:Jd,queryFn:()=>de("/api/workspaces").then(e=>e.workspaces)})}function mP(){const e=Pe();return Oe({mutationFn:async t=>(await de("/api/workspaces",{method:"POST",body:JSON.stringify(t)})).workspace,onSuccess:()=>e.invalidateQueries({queryKey:Jd})})}function gP(){const e=Pe();return Oe({mutationFn:t=>de(`/api/workspaces/${encodeURIComponent(t)}`,{method:"DELETE"}),onSuccess:()=>e.invalidateQueries({queryKey:Jd})})}function xP({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:m}=$k(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 w=P.useRef(n);if(P.useEffect(()=>{w.current=n},[n]),P.useEffect(()=>{if(!e)return;const y=b=>{b.key==="Escape"&&w.current()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[e]),!e)return null;const g=(p==null?void 0:p.path)??s??"",x=i??(m instanceof Error?m.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(Px,{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(yP,{value:a,onChange:c,onSubmit:()=>{const y=a.trim();y&&l(y)}}),u.jsx(vP,{path:g,onJump:l}),u.jsx("div",{className:"flex-1 overflow-y-auto",children:u.jsx(kP,{entries:(p==null?void 0:p.entries)??[],parent:(p==null?void 0:p.parent)??null,loading:h&&!p,error:m instanceof Error&&!p?m.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:g||"—"}),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:!g||o,onClick:()=>void r(g),className:H("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ring-brand-focus",!g||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(Qt,{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 yP({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 vP({path:e,onJump:t}){const n=P.useMemo(()=>bP(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(Cd,{className:"h-3 w-3 text-muted-foreground"})]},r.path))]})}function kP({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(Qt,{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:Dh,children:[u.jsx(jx,{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:Dh,children:[u.jsx(Px,{className:"h-4 w-4 shrink-0 text-brand/70 opacity-80"}),u.jsx("span",{className:"truncate",children:o.name})]})},o.path))]})}const Dh=H("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 bP(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 wP({activeId:e,onSelect:t,collapsed:n,onToggleCollapse:r}){const{data:i,isLoading:o}=hP(),s=mP(),l=gP(),[a,c]=P.useState(!1),[f,d]=P.useState(void 0),p=Re(v=>v.running),h=async v=>{d(void 0);try{const w=await s.mutateAsync({path:v});c(!1),t(w.id)}catch(w){d(w instanceof Error?w.message:String(w))}},m=(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:H("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(Gd,{size:28,filled:p})}),u.jsx("div",{className:H("flex min-w-0 flex-1 items-center pr-3 transition-opacity duration-200 ease-out",n?"opacity-0":"opacity-100"),children:u.jsx(s3,{})})]}),u.jsxs("div",{className:H("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",m>0&&u.jsx("span",{className:"ml-1.5 text-muted-foreground/60",children:m})]}),u.jsxs("button",{type:"button",onClick:()=>{d(void 0),c(!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($h,{show:!!o,collapsed:n,label:"Loading…"}),u.jsx($h,{show:!o&&(i==null?void 0:i.length)===0,collapsed:n,label:"No workspaces yet",variant:"dashed"}),i==null?void 0:i.map(v=>{const w=e===v.id;return u.jsx(SP,{name:v.name,path:v.path,active:w,streaming:w&&p,collapsed:n,onSelect:()=>t(v.id),onDelete:()=>{confirm(`Remove "${v.name}" from the list? (Files are not deleted.)`)&&l.mutateAsync(v.id)}},v.id)})]}),u.jsx(CP,{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(Cd,{className:"h-3.5 w-3.5"}):u.jsx(Nx,{className:"h-3.5 w-3.5"})})]}),u.jsx(xP,{open:a,onClose:()=>c(!1),onPick:h,error:f,busy:s.isPending})]})}function $h({show:e,collapsed:t,label:n,variant:r}){return e?u.jsx("li",{className:H("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 SP({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:H("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:H("flex items-center justify-center transition-[width,opacity] duration-200",i?"w-[18px] opacity-100":"w-0 opacity-0"),children:u.jsx(Pl,{state:l})}),u.jsxs("div",{className:H("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:H("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:jP(t)})]})]}),u.jsxs("div",{className:H("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(Pl,{state:l})}),u.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),s()},className:H("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 CP({collapsed:e}){const t=zE();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:H("flex w-full items-center gap-2 text-[11.5px] text-muted-foreground transition-opacity",e?"opacity-0":"opacity-100"),children:[u.jsx(Pl,{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(Pl,{state:"online"})})]})}function jP(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 NP(){const[e,t]=P.useState(void 0),[n,r]=P.useState(null),[i,o]=P.useState(!1);X3(e),J3(),Ek(),Z3(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.jsxs("div",{className:"flex h-full",children:[u.jsx(wP,{activeId:e,onSelect:t,collapsed:i,onToggleCollapse:l}),u.jsx(d3,{workspaceId:e,rightPanel:n,onToggleConfig:()=>s("config"),onToggleResources:()=>s("resources")},e??"none"),e&&u.jsxs(u.Fragment,{children:[u.jsx($3,{workspaceId:e,open:n==="config",onClose:()=>r(null)},`cfg-${e}`),u.jsx(aP,{workspaceId:e,open:n==="resources",onClose:()=>r(null)},`res-${e}`)]}),u.jsx(tP,{})]})}const EP=new ak({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),Zy=document.getElementById("root");if(!Zy)throw new Error("missing #root");cx(Zy).render(u.jsx(P.StrictMode,{children:u.jsx(uk,{client:EP,children:u.jsx(NP,{})})}));
|