@polderlabs/bizar 4.4.2 → 4.4.4

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.
@@ -1,354 +0,0 @@
1
- var ag=Object.defineProperty;var ug=(e,t,n)=>t in e?ag(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var We=(e,t,n)=>ug(e,typeof t!="symbol"?t+"":t,n);(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 l of i)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var gl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var df={exports:{}},Xl={},ff={exports:{}},ne={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Ci=Symbol.for("react.element"),cg=Symbol.for("react.portal"),dg=Symbol.for("react.fragment"),fg=Symbol.for("react.strict_mode"),hg=Symbol.for("react.profiler"),mg=Symbol.for("react.provider"),pg=Symbol.for("react.context"),gg=Symbol.for("react.forward_ref"),yg=Symbol.for("react.suspense"),xg=Symbol.for("react.memo"),vg=Symbol.for("react.lazy"),Bu=Symbol.iterator;function kg(e){return e===null||typeof e!="object"?null:(e=Bu&&e[Bu]||e["@@iterator"],typeof e=="function"?e:null)}var hf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mf=Object.assign,pf={};function br(e,t,n){this.props=e,this.context=t,this.refs=pf,this.updater=n||hf}br.prototype.isReactComponent={};br.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")};br.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function gf(){}gf.prototype=br.prototype;function ka(e,t,n){this.props=e,this.context=t,this.refs=pf,this.updater=n||hf}var wa=ka.prototype=new gf;wa.constructor=ka;mf(wa,br.prototype);wa.isPureReactComponent=!0;var Uu=Array.isArray,yf=Object.prototype.hasOwnProperty,ba={current:null},xf={key:!0,ref:!0,__self:!0,__source:!0};function vf(e,t,n){var r,i={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)yf.call(t,r)&&!xf.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var u=Array(o),d=0;d<o;d++)u[d]=arguments[d+2];i.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:Ci,type:e,key:l,ref:s,props:i,_owner:ba.current}}function wg(e,t){return{$$typeof:Ci,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Sa(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ci}function bg(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Hu=/\/+/g;function ks(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bg(""+e.key):t.toString(36)}function tl(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ci:case cg:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+ks(s,0):r,Uu(i)?(n="",e!=null&&(n=e.replace(Hu,"$&/")+"/"),tl(i,t,n,"",function(d){return d})):i!=null&&(Sa(i)&&(i=wg(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(Hu,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",Uu(e))for(var o=0;o<e.length;o++){l=e[o];var u=r+ks(l,o);s+=tl(l,t,n,u,i)}else if(u=kg(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=r+ks(l,o++),s+=tl(l,t,n,u,i);else if(l==="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 Mi(e,t,n){if(e==null)return e;var r=[],i=0;return tl(e,r,"","",function(l){return t.call(n,l,i++)}),r}function Sg(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 He={current:null},nl={transition:null},Cg={ReactCurrentDispatcher:He,ReactCurrentBatchConfig:nl,ReactCurrentOwner:ba};function kf(){throw Error("act(...) is not supported in production builds of React.")}ne.Children={map:Mi,forEach:function(e,t,n){Mi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Mi(e,function(){t++}),t},toArray:function(e){return Mi(e,function(t){return t})||[]},only:function(e){if(!Sa(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ne.Component=br;ne.Fragment=dg;ne.Profiler=hg;ne.PureComponent=ka;ne.StrictMode=fg;ne.Suspense=yg;ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cg;ne.act=kf;ne.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=mf({},e.props),i=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=ba.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)yf.call(t,u)&&!xf.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var d=0;d<u;d++)o[d]=arguments[d+2];r.children=o}return{$$typeof:Ci,type:e.type,key:i,ref:l,props:r,_owner:s}};ne.createContext=function(e){return e={$$typeof:pg,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:mg,_context:e},e.Consumer=e};ne.createElement=vf;ne.createFactory=function(e){var t=vf.bind(null,e);return t.type=e,t};ne.createRef=function(){return{current:null}};ne.forwardRef=function(e){return{$$typeof:gg,render:e}};ne.isValidElement=Sa;ne.lazy=function(e){return{$$typeof:vg,_payload:{_status:-1,_result:e},_init:Sg}};ne.memo=function(e,t){return{$$typeof:xg,type:e,compare:t===void 0?null:t}};ne.startTransition=function(e){var t=nl.transition;nl.transition={};try{e()}finally{nl.transition=t}};ne.unstable_act=kf;ne.useCallback=function(e,t){return He.current.useCallback(e,t)};ne.useContext=function(e){return He.current.useContext(e)};ne.useDebugValue=function(){};ne.useDeferredValue=function(e){return He.current.useDeferredValue(e)};ne.useEffect=function(e,t){return He.current.useEffect(e,t)};ne.useId=function(){return He.current.useId()};ne.useImperativeHandle=function(e,t,n){return He.current.useImperativeHandle(e,t,n)};ne.useInsertionEffect=function(e,t){return He.current.useInsertionEffect(e,t)};ne.useLayoutEffect=function(e,t){return He.current.useLayoutEffect(e,t)};ne.useMemo=function(e,t){return He.current.useMemo(e,t)};ne.useReducer=function(e,t,n){return He.current.useReducer(e,t,n)};ne.useRef=function(e){return He.current.useRef(e)};ne.useState=function(e){return He.current.useState(e)};ne.useSyncExternalStore=function(e,t,n){return He.current.useSyncExternalStore(e,t,n)};ne.useTransition=function(){return He.current.useTransition()};ne.version="18.3.1";ff.exports=ne;var S=ff.exports;const Ne=va(S);/**
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 jg=S,Ng=Symbol.for("react.element"),Eg=Symbol.for("react.fragment"),Tg=Object.prototype.hasOwnProperty,zg=jg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Pg={key:!0,ref:!0,__self:!0,__source:!0};function wf(e,t,n){var r,i={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Tg.call(t,r)&&!Pg.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:Ng,type:e,key:l,ref:s,props:i,_owner:zg.current}}Xl.Fragment=Eg;Xl.jsx=wf;Xl.jsxs=wf;df.exports=Xl;var a=df.exports,bf={exports:{}},ut={},Sf={exports:{}},Cf={};/**
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(D,H){var b=D.length;D.push(H);e:for(;0<b;){var K=b-1>>>1,Z=D[K];if(0<i(Z,H))D[K]=H,D[b]=Z,b=K;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var H=D[0],b=D.pop();if(b!==H){D[0]=b;e:for(var K=0,Z=D.length,E=Z>>>1;K<E;){var he=2*(K+1)-1,Je=D[he],ae=he+1,et=D[ae];if(0>i(Je,b))ae<Z&&0>i(et,Je)?(D[K]=et,D[ae]=b,K=ae):(D[K]=Je,D[he]=b,K=he);else if(ae<Z&&0>i(et,b))D[K]=et,D[ae]=b,K=ae;else break e}}return H}function i(D,H){var b=D.sortIndex-H.sortIndex;return b!==0?b:D.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var u=[],d=[],c=1,f=null,h=3,m=!1,p=!1,x=!1,k=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(D){for(var H=n(d);H!==null;){if(H.callback===null)r(d);else if(H.startTime<=D)r(d),H.sortIndex=H.expirationTime,t(u,H);else break;H=n(d)}}function C(D){if(x=!1,v(D),!p)if(n(u)!==null)p=!0,V(z);else{var H=n(d);H!==null&&G(C,H.startTime-D)}}function z(D,H){p=!1,x&&(x=!1,g(R),R=-1),m=!0;var b=h;try{for(v(H),f=n(u);f!==null&&(!(f.expirationTime>H)||D&&!j());){var K=f.callback;if(typeof K=="function"){f.callback=null,h=f.priorityLevel;var Z=K(f.expirationTime<=H);H=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(u)&&r(u),v(H)}else r(u);f=n(u)}if(f!==null)var E=!0;else{var he=n(d);he!==null&&G(C,he.startTime-H),E=!1}return E}finally{f=null,h=b,m=!1}}var N=!1,A=null,R=-1,T=5,w=-1;function j(){return!(e.unstable_now()-w<T)}function P(){if(A!==null){var D=e.unstable_now();w=D;var H=!0;try{H=A(!0,D)}finally{H?L():(N=!1,A=null)}}else N=!1}var L;if(typeof y=="function")L=function(){y(P)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,I=F.port2;F.port1.onmessage=P,L=function(){I.postMessage(null)}}else L=function(){k(P,0)};function V(D){A=D,N||(N=!0,L())}function G(D,H){R=k(function(){D(e.unstable_now())},H)}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(D){D.callback=null},e.unstable_continueExecution=function(){p||m||(p=!0,V(z))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(D){switch(h){case 1:case 2:case 3:var H=3;break;default:H=h}var b=h;h=H;try{return D()}finally{h=b}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,H){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var b=h;h=D;try{return H()}finally{h=b}},e.unstable_scheduleCallback=function(D,H,b){var K=e.unstable_now();switch(typeof b=="object"&&b!==null?(b=b.delay,b=typeof b=="number"&&0<b?K+b:K):b=K,D){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=b+Z,D={id:c++,callback:H,priorityLevel:D,startTime:b,expirationTime:Z,sortIndex:-1},b>K?(D.sortIndex=b,t(d,D),n(u)===null&&D===n(d)&&(x?(g(R),R=-1):x=!0,G(C,b-K))):(D.sortIndex=Z,t(u,D),p||m||(p=!0,V(z))),D},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(D){var H=h;return function(){var b=h;h=H;try{return D.apply(this,arguments)}finally{h=b}}}})(Cf);Sf.exports=Cf;var Ig=Sf.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 Ag=S,ot=Ig;function _(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 jf=new Set,li={};function Fn(e,t){hr(e,t),hr(e+"Capture",t)}function hr(e,t){for(li[e]=t,e=0;e<t.length;e++)jf.add(t[e])}var Ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uo=Object.prototype.hasOwnProperty,Mg=/^[: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]*$/,Vu={},Wu={};function Lg(e){return uo.call(Wu,e)?!0:uo.call(Vu,e)?!1:Mg.test(e)?Wu[e]=!0:(Vu[e]=!0,!1)}function Rg(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 Dg(e,t,n,r){if(t===null||typeof t>"u"||Rg(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 Ve(e,t,n,r,i,l,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=l,this.removeEmptyString=s}var Me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Me[e]=new Ve(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Me[t]=new Ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Me[e]=new Ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Me[e]=new Ve(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){Me[e]=new Ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Me[e]=new Ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Me[e]=new Ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Me[e]=new Ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Me[e]=new Ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ca=/[\-:]([a-z])/g;function ja(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(Ca,ja);Me[t]=new Ve(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(Ca,ja);Me[t]=new Ve(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(Ca,ja);Me[t]=new Ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Me[e]=new Ve(e,1,!1,e.toLowerCase(),null,!1,!1)});Me.xlinkHref=new Ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Me[e]=new Ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function Na(e,t,n,r){var i=Me.hasOwnProperty(t)?Me[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Dg(t,n,i,r)&&(n=null),r||i===null?Lg(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 qt=Ag.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Li=Symbol.for("react.element"),qn=Symbol.for("react.portal"),Yn=Symbol.for("react.fragment"),Ea=Symbol.for("react.strict_mode"),co=Symbol.for("react.profiler"),Nf=Symbol.for("react.provider"),Ef=Symbol.for("react.context"),Ta=Symbol.for("react.forward_ref"),fo=Symbol.for("react.suspense"),ho=Symbol.for("react.suspense_list"),za=Symbol.for("react.memo"),Xt=Symbol.for("react.lazy"),Tf=Symbol.for("react.offscreen"),Qu=Symbol.iterator;function Ar(e){return e===null||typeof e!="object"?null:(e=Qu&&e[Qu]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Object.assign,ws;function Ur(e){if(ws===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ws=t&&t[1]||""}return`
34
- `+ws+e}var bs=!1;function Ss(e,t){if(!e||bs)return"";bs=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(`
35
- `),l=r.stack.split(`
36
- `),s=i.length-1,o=l.length-1;1<=s&&0<=o&&i[s]!==l[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==l[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==l[o]){var u=`
37
- `+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=o);break}}}finally{bs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ur(e):""}function _g(e){switch(e.tag){case 5:return Ur(e.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return e=Ss(e.type,!1),e;case 11:return e=Ss(e.type.render,!1),e;case 1:return e=Ss(e.type,!0),e;default:return""}}function mo(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 Yn:return"Fragment";case qn:return"Portal";case co:return"Profiler";case Ea:return"StrictMode";case fo:return"Suspense";case ho:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ef:return(e.displayName||"Context")+".Consumer";case Nf:return(e._context.displayName||"Context")+".Provider";case Ta:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case za:return t=e.displayName||null,t!==null?t:mo(e.type)||"Memo";case Xt:t=e._payload,e=e._init;try{return mo(e(t))}catch{}}return null}function Og(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 mo(t);case 8:return t===Ea?"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 fn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fg(e){var t=zf(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,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,l.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 Ri(e){e._valueTracker||(e._valueTracker=Fg(e))}function Pf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=zf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yl(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 po(e,t){var n=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fn(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 If(e,t){t=t.checked,t!=null&&Na(e,"checked",t,!1)}function go(e,t){If(e,t);var n=fn(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")?yo(e,t.type,n):t.hasOwnProperty("defaultValue")&&yo(e,t.type,fn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yu(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 yo(e,t,n){(t!=="number"||yl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hr=Array.isArray;function sr(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=""+fn(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 xo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ku(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(Hr(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fn(n)}}function Af(e,t){var n=fn(t.value),r=fn(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 Gu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Mf(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 vo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Mf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Di,Lf=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(Di=Di||document.createElement("div"),Di.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function si(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qr={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},$g=["Webkit","ms","Moz","O"];Object.keys(Qr).forEach(function(e){$g.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qr[t]=Qr[e]})});function Rf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qr.hasOwnProperty(e)&&Qr[e]?(""+t).trim():t+"px"}function Df(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Rf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Bg=ve({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 ko(e,t){if(t){if(Bg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function wo(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 bo=null;function Pa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var So=null,or=null,ar=null;function Xu(e){if(e=Ei(e)){if(typeof So!="function")throw Error(_(280));var t=e.stateNode;t&&(t=ns(t),So(e.stateNode,e.type,t))}}function _f(e){or?ar?ar.push(e):ar=[e]:or=e}function Of(){if(or){var e=or,t=ar;if(ar=or=null,Xu(e),t)for(e=0;e<t.length;e++)Xu(t[e])}}function Ff(e,t){return e(t)}function $f(){}var Cs=!1;function Bf(e,t,n){if(Cs)return e(t,n);Cs=!0;try{return Ff(e,t,n)}finally{Cs=!1,(or!==null||ar!==null)&&($f(),Of())}}function oi(e,t){var n=e.stateNode;if(n===null)return null;var r=ns(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(_(231,t,typeof n));return n}var Co=!1;if(Ht)try{var Mr={};Object.defineProperty(Mr,"passive",{get:function(){Co=!0}}),window.addEventListener("test",Mr,Mr),window.removeEventListener("test",Mr,Mr)}catch{Co=!1}function Ug(e,t,n,r,i,l,s,o,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(c){this.onError(c)}}var qr=!1,xl=null,vl=!1,jo=null,Hg={onError:function(e){qr=!0,xl=e}};function Vg(e,t,n,r,i,l,s,o,u){qr=!1,xl=null,Ug.apply(Hg,arguments)}function Wg(e,t,n,r,i,l,s,o,u){if(Vg.apply(this,arguments),qr){if(qr){var d=xl;qr=!1,xl=null}else throw Error(_(198));vl||(vl=!0,jo=d)}}function $n(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 Uf(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 Zu(e){if($n(e)!==e)throw Error(_(188))}function Qg(e){var t=e.alternate;if(!t){if(t=$n(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return Zu(i),e;if(l===r)return Zu(i),t;l=l.sibling}throw Error(_(188))}if(n.return!==r.return)n=i,r=l;else{for(var s=!1,o=i.child;o;){if(o===n){s=!0,n=i,r=l;break}if(o===r){s=!0,r=i,n=l;break}o=o.sibling}if(!s){for(o=l.child;o;){if(o===n){s=!0,n=l,r=i;break}if(o===r){s=!0,r=l,n=i;break}o=o.sibling}if(!s)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function Hf(e){return e=Qg(e),e!==null?Vf(e):null}function Vf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Vf(e);if(t!==null)return t;e=e.sibling}return null}var Wf=ot.unstable_scheduleCallback,Ju=ot.unstable_cancelCallback,qg=ot.unstable_shouldYield,Yg=ot.unstable_requestPaint,Se=ot.unstable_now,Kg=ot.unstable_getCurrentPriorityLevel,Ia=ot.unstable_ImmediatePriority,Qf=ot.unstable_UserBlockingPriority,kl=ot.unstable_NormalPriority,Gg=ot.unstable_LowPriority,qf=ot.unstable_IdlePriority,Zl=null,Mt=null;function Xg(e){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Zl,e,void 0,(e.current.flags&128)===128)}catch{}}var St=Math.clz32?Math.clz32:ey,Zg=Math.log,Jg=Math.LN2;function ey(e){return e>>>=0,e===0?32:31-(Zg(e)/Jg|0)|0}var _i=64,Oi=4194304;function Vr(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 wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=Vr(o):(l&=s,l!==0&&(r=Vr(l)))}else s=n&~i,s!==0?r=Vr(s):l!==0&&(r=Vr(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&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-St(t),i=1<<n,r|=e[n],t&=~i;return r}function ty(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 ny(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-St(l),o=1<<s,u=i[s];u===-1?(!(o&n)||o&r)&&(i[s]=ty(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function No(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Yf(){var e=_i;return _i<<=1,!(_i&4194240)&&(_i=64),e}function js(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ji(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-St(t),e[t]=n}function ry(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-St(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function Aa(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-St(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var oe=0;function Kf(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Gf,Ma,Xf,Zf,Jf,Eo=!1,Fi=[],rn=null,ln=null,sn=null,ai=new Map,ui=new Map,Jt=[],iy="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 ec(e,t){switch(e){case"focusin":case"focusout":rn=null;break;case"dragenter":case"dragleave":ln=null;break;case"mouseover":case"mouseout":sn=null;break;case"pointerover":case"pointerout":ai.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ui.delete(t.pointerId)}}function Lr(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=Ei(t),t!==null&&Ma(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ly(e,t,n,r,i){switch(t){case"focusin":return rn=Lr(rn,e,t,n,r,i),!0;case"dragenter":return ln=Lr(ln,e,t,n,r,i),!0;case"mouseover":return sn=Lr(sn,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return ai.set(l,Lr(ai.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,ui.set(l,Lr(ui.get(l)||null,e,t,n,r,i)),!0}return!1}function eh(e){var t=Cn(e.target);if(t!==null){var n=$n(t);if(n!==null){if(t=n.tag,t===13){if(t=Uf(n),t!==null){e.blockedOn=t,Jf(e.priority,function(){Xf(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 rl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=To(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bo=r,n.target.dispatchEvent(r),bo=null}else return t=Ei(n),t!==null&&Ma(t),e.blockedOn=n,!1;t.shift()}return!0}function tc(e,t,n){rl(e)&&n.delete(t)}function sy(){Eo=!1,rn!==null&&rl(rn)&&(rn=null),ln!==null&&rl(ln)&&(ln=null),sn!==null&&rl(sn)&&(sn=null),ai.forEach(tc),ui.forEach(tc)}function Rr(e,t){e.blockedOn===t&&(e.blockedOn=null,Eo||(Eo=!0,ot.unstable_scheduleCallback(ot.unstable_NormalPriority,sy)))}function ci(e){function t(i){return Rr(i,e)}if(0<Fi.length){Rr(Fi[0],e);for(var n=1;n<Fi.length;n++){var r=Fi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rn!==null&&Rr(rn,e),ln!==null&&Rr(ln,e),sn!==null&&Rr(sn,e),ai.forEach(t),ui.forEach(t),n=0;n<Jt.length;n++)r=Jt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Jt.length&&(n=Jt[0],n.blockedOn===null);)eh(n),n.blockedOn===null&&Jt.shift()}var ur=qt.ReactCurrentBatchConfig,bl=!0;function oy(e,t,n,r){var i=oe,l=ur.transition;ur.transition=null;try{oe=1,La(e,t,n,r)}finally{oe=i,ur.transition=l}}function ay(e,t,n,r){var i=oe,l=ur.transition;ur.transition=null;try{oe=4,La(e,t,n,r)}finally{oe=i,ur.transition=l}}function La(e,t,n,r){if(bl){var i=To(e,t,n,r);if(i===null)Rs(e,t,r,Sl,n),ec(e,r);else if(ly(i,e,t,n,r))r.stopPropagation();else if(ec(e,r),t&4&&-1<iy.indexOf(e)){for(;i!==null;){var l=Ei(i);if(l!==null&&Gf(l),l=To(e,t,n,r),l===null&&Rs(e,t,r,Sl,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else Rs(e,t,r,null,n)}}var Sl=null;function To(e,t,n,r){if(Sl=null,e=Pa(r),e=Cn(e),e!==null)if(t=$n(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Uf(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 Sl=e,null}function th(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(Kg()){case Ia:return 1;case Qf:return 4;case kl:case Gg:return 16;case qf:return 536870912;default:return 16}default:return 16}}var tn=null,Ra=null,il=null;function nh(){if(il)return il;var e,t=Ra,n=t.length,r,i="value"in tn?tn.value:tn.textContent,l=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[l-r];r++);return il=i.slice(e,1<r?1-r:void 0)}function ll(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 $i(){return!0}function nc(){return!1}function ct(e){function t(n,r,i,l,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?$i:nc,this.isPropagationStopped=nc,this}return ve(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=$i)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=$i)},persist:function(){},isPersistent:$i}),t}var Sr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Da=ct(Sr),Ni=ve({},Sr,{view:0,detail:0}),uy=ct(Ni),Ns,Es,Dr,Jl=ve({},Ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_a,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!==Dr&&(Dr&&e.type==="mousemove"?(Ns=e.screenX-Dr.screenX,Es=e.screenY-Dr.screenY):Es=Ns=0,Dr=e),Ns)},movementY:function(e){return"movementY"in e?e.movementY:Es}}),rc=ct(Jl),cy=ve({},Jl,{dataTransfer:0}),dy=ct(cy),fy=ve({},Ni,{relatedTarget:0}),Ts=ct(fy),hy=ve({},Sr,{animationName:0,elapsedTime:0,pseudoElement:0}),my=ct(hy),py=ve({},Sr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gy=ct(py),yy=ve({},Sr,{data:0}),ic=ct(yy),xy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vy={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"},ky={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ky[e])?!!t[e]:!1}function _a(){return wy}var by=ve({},Ni,{key:function(e){if(e.key){var t=xy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ll(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_a,charCode:function(e){return e.type==="keypress"?ll(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ll(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Sy=ct(by),Cy=ve({},Jl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lc=ct(Cy),jy=ve({},Ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_a}),Ny=ct(jy),Ey=ve({},Sr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ty=ct(Ey),zy=ve({},Jl,{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}),Py=ct(zy),Iy=[9,13,27,32],Oa=Ht&&"CompositionEvent"in window,Yr=null;Ht&&"documentMode"in document&&(Yr=document.documentMode);var Ay=Ht&&"TextEvent"in window&&!Yr,rh=Ht&&(!Oa||Yr&&8<Yr&&11>=Yr),sc=" ",oc=!1;function ih(e,t){switch(e){case"keyup":return Iy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kn=!1;function My(e,t){switch(e){case"compositionend":return lh(t);case"keypress":return t.which!==32?null:(oc=!0,sc);case"textInput":return e=t.data,e===sc&&oc?null:e;default:return null}}function Ly(e,t){if(Kn)return e==="compositionend"||!Oa&&ih(e,t)?(e=nh(),il=Ra=tn=null,Kn=!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 rh&&t.locale!=="ko"?null:t.data;default:return null}}var Ry={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 ac(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ry[e.type]:t==="textarea"}function sh(e,t,n,r){_f(r),t=Cl(t,"onChange"),0<t.length&&(n=new Da("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kr=null,di=null;function Dy(e){yh(e,0)}function es(e){var t=Zn(e);if(Pf(t))return e}function _y(e,t){if(e==="change")return t}var oh=!1;if(Ht){var zs;if(Ht){var Ps="oninput"in document;if(!Ps){var uc=document.createElement("div");uc.setAttribute("oninput","return;"),Ps=typeof uc.oninput=="function"}zs=Ps}else zs=!1;oh=zs&&(!document.documentMode||9<document.documentMode)}function cc(){Kr&&(Kr.detachEvent("onpropertychange",ah),di=Kr=null)}function ah(e){if(e.propertyName==="value"&&es(di)){var t=[];sh(t,di,e,Pa(e)),Bf(Dy,t)}}function Oy(e,t,n){e==="focusin"?(cc(),Kr=t,di=n,Kr.attachEvent("onpropertychange",ah)):e==="focusout"&&cc()}function Fy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return es(di)}function $y(e,t){if(e==="click")return es(t)}function By(e,t){if(e==="input"||e==="change")return es(t)}function Uy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nt=typeof Object.is=="function"?Object.is:Uy;function fi(e,t){if(Nt(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(!uo.call(t,i)||!Nt(e[i],t[i]))return!1}return!0}function dc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fc(e,t){var n=dc(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=dc(n)}}function uh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ch(){for(var e=window,t=yl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=yl(e.document)}return t}function Fa(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 Hy(e){var t=ch(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&uh(n.ownerDocument.documentElement,n)){if(r!==null&&Fa(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,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=fc(n,l);var s=fc(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(),l>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 Vy=Ht&&"documentMode"in document&&11>=document.documentMode,Gn=null,zo=null,Gr=null,Po=!1;function hc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Po||Gn==null||Gn!==yl(r)||(r=Gn,"selectionStart"in r&&Fa(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}),Gr&&fi(Gr,r)||(Gr=r,r=Cl(zo,"onSelect"),0<r.length&&(t=new Da("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Gn)))}function Bi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xn={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionend:Bi("Transition","TransitionEnd")},Is={},dh={};Ht&&(dh=document.createElement("div").style,"AnimationEvent"in window||(delete Xn.animationend.animation,delete Xn.animationiteration.animation,delete Xn.animationstart.animation),"TransitionEvent"in window||delete Xn.transitionend.transition);function ts(e){if(Is[e])return Is[e];if(!Xn[e])return e;var t=Xn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in dh)return Is[e]=t[n];return e}var fh=ts("animationend"),hh=ts("animationiteration"),mh=ts("animationstart"),ph=ts("transitionend"),gh=new Map,mc="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 mn(e,t){gh.set(e,t),Fn(t,[e])}for(var As=0;As<mc.length;As++){var Ms=mc[As],Wy=Ms.toLowerCase(),Qy=Ms[0].toUpperCase()+Ms.slice(1);mn(Wy,"on"+Qy)}mn(fh,"onAnimationEnd");mn(hh,"onAnimationIteration");mn(mh,"onAnimationStart");mn("dblclick","onDoubleClick");mn("focusin","onFocus");mn("focusout","onBlur");mn(ph,"onTransitionEnd");hr("onMouseEnter",["mouseout","mouseover"]);hr("onMouseLeave",["mouseout","mouseover"]);hr("onPointerEnter",["pointerout","pointerover"]);hr("onPointerLeave",["pointerout","pointerover"]);Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wr="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(" "),qy=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wr));function pc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Wg(r,t,void 0,e),e.currentTarget=null}function yh(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 l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],u=o.instance,d=o.currentTarget;if(o=o.listener,u!==l&&i.isPropagationStopped())break e;pc(i,o,d),l=u}else for(s=0;s<r.length;s++){if(o=r[s],u=o.instance,d=o.currentTarget,o=o.listener,u!==l&&i.isPropagationStopped())break e;pc(i,o,d),l=u}}}if(vl)throw e=jo,vl=!1,jo=null,e}function me(e,t){var n=t[Ro];n===void 0&&(n=t[Ro]=new Set);var r=e+"__bubble";n.has(r)||(xh(t,e,2,!1),n.add(r))}function Ls(e,t,n){var r=0;t&&(r|=4),xh(n,e,r,t)}var Ui="_reactListening"+Math.random().toString(36).slice(2);function hi(e){if(!e[Ui]){e[Ui]=!0,jf.forEach(function(n){n!=="selectionchange"&&(qy.has(n)||Ls(n,!1,e),Ls(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ui]||(t[Ui]=!0,Ls("selectionchange",!1,t))}}function xh(e,t,n,r){switch(th(t)){case 1:var i=oy;break;case 4:i=ay;break;default:i=La}n=i.bind(null,t,n,e),i=void 0,!Co||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 Rs(e,t,n,r,i){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;o!==null;){if(s=Cn(o),s===null)return;if(u=s.tag,u===5||u===6){r=l=s;continue e}o=o.parentNode}}r=r.return}Bf(function(){var d=l,c=Pa(n),f=[];e:{var h=gh.get(e);if(h!==void 0){var m=Da,p=e;switch(e){case"keypress":if(ll(n)===0)break e;case"keydown":case"keyup":m=Sy;break;case"focusin":p="focus",m=Ts;break;case"focusout":p="blur",m=Ts;break;case"beforeblur":case"afterblur":m=Ts;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":m=rc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=dy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Ny;break;case fh:case hh:case mh:m=my;break;case ph:m=Ty;break;case"scroll":m=uy;break;case"wheel":m=Py;break;case"copy":case"cut":case"paste":m=gy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=lc}var x=(t&4)!==0,k=!x&&e==="scroll",g=x?h!==null?h+"Capture":null:h;x=[];for(var y=d,v;y!==null;){v=y;var C=v.stateNode;if(v.tag===5&&C!==null&&(v=C,g!==null&&(C=oi(y,g),C!=null&&x.push(mi(y,C,v)))),k)break;y=y.return}0<x.length&&(h=new m(h,p,null,n,c),f.push({event:h,listeners:x}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==bo&&(p=n.relatedTarget||n.fromElement)&&(Cn(p)||p[Vt]))break e;if((m||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,m?(p=n.relatedTarget||n.toElement,m=d,p=p?Cn(p):null,p!==null&&(k=$n(p),p!==k||p.tag!==5&&p.tag!==6)&&(p=null)):(m=null,p=d),m!==p)){if(x=rc,C="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(x=lc,C="onPointerLeave",g="onPointerEnter",y="pointer"),k=m==null?h:Zn(m),v=p==null?h:Zn(p),h=new x(C,y+"leave",m,n,c),h.target=k,h.relatedTarget=v,C=null,Cn(c)===d&&(x=new x(g,y+"enter",p,n,c),x.target=v,x.relatedTarget=k,C=x),k=C,m&&p)t:{for(x=m,g=p,y=0,v=x;v;v=Vn(v))y++;for(v=0,C=g;C;C=Vn(C))v++;for(;0<y-v;)x=Vn(x),y--;for(;0<v-y;)g=Vn(g),v--;for(;y--;){if(x===g||g!==null&&x===g.alternate)break t;x=Vn(x),g=Vn(g)}x=null}else x=null;m!==null&&gc(f,h,m,x,!1),p!==null&&k!==null&&gc(f,k,p,x,!0)}}e:{if(h=d?Zn(d):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var z=_y;else if(ac(h))if(oh)z=By;else{z=Fy;var N=Oy}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(z=$y);if(z&&(z=z(e,d))){sh(f,z,n,c);break e}N&&N(e,h,d),e==="focusout"&&(N=h._wrapperState)&&N.controlled&&h.type==="number"&&yo(h,"number",h.value)}switch(N=d?Zn(d):window,e){case"focusin":(ac(N)||N.contentEditable==="true")&&(Gn=N,zo=d,Gr=null);break;case"focusout":Gr=zo=Gn=null;break;case"mousedown":Po=!0;break;case"contextmenu":case"mouseup":case"dragend":Po=!1,hc(f,n,c);break;case"selectionchange":if(Vy)break;case"keydown":case"keyup":hc(f,n,c)}var A;if(Oa)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Kn?ih(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(rh&&n.locale!=="ko"&&(Kn||R!=="onCompositionStart"?R==="onCompositionEnd"&&Kn&&(A=nh()):(tn=c,Ra="value"in tn?tn.value:tn.textContent,Kn=!0)),N=Cl(d,R),0<N.length&&(R=new ic(R,e,null,n,c),f.push({event:R,listeners:N}),A?R.data=A:(A=lh(n),A!==null&&(R.data=A)))),(A=Ay?My(e,n):Ly(e,n))&&(d=Cl(d,"onBeforeInput"),0<d.length&&(c=new ic("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:d}),c.data=A))}yh(f,t)})}function mi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Cl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=oi(e,n),l!=null&&r.unshift(mi(e,l,i)),l=oi(e,t),l!=null&&r.push(mi(e,l,i))),e=e.return}return r}function Vn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gc(e,t,n,r,i){for(var l=t._reactName,s=[];n!==null&&n!==r;){var o=n,u=o.alternate,d=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&d!==null&&(o=d,i?(u=oi(n,l),u!=null&&s.unshift(mi(n,u,o))):i||(u=oi(n,l),u!=null&&s.push(mi(n,u,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Yy=/\r\n?/g,Ky=/\u0000|\uFFFD/g;function yc(e){return(typeof e=="string"?e:""+e).replace(Yy,`
38
- `).replace(Ky,"")}function Hi(e,t,n){if(t=yc(t),yc(e)!==t&&n)throw Error(_(425))}function jl(){}var Io=null,Ao=null;function Mo(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 Lo=typeof setTimeout=="function"?setTimeout:void 0,Gy=typeof clearTimeout=="function"?clearTimeout:void 0,xc=typeof Promise=="function"?Promise:void 0,Xy=typeof queueMicrotask=="function"?queueMicrotask:typeof xc<"u"?function(e){return xc.resolve(null).then(e).catch(Zy)}:Lo;function Zy(e){setTimeout(function(){throw e})}function Ds(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),ci(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ci(t)}function on(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 vc(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 Cr=Math.random().toString(36).slice(2),At="__reactFiber$"+Cr,pi="__reactProps$"+Cr,Vt="__reactContainer$"+Cr,Ro="__reactEvents$"+Cr,Jy="__reactListeners$"+Cr,e1="__reactHandles$"+Cr;function Cn(e){var t=e[At];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vt]||n[At]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vc(e);e!==null;){if(n=e[At])return n;e=vc(e)}return t}e=n,n=e.parentNode}return null}function Ei(e){return e=e[At]||e[Vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function ns(e){return e[pi]||null}var Do=[],Jn=-1;function pn(e){return{current:e}}function pe(e){0>Jn||(e.current=Do[Jn],Do[Jn]=null,Jn--)}function fe(e,t){Jn++,Do[Jn]=e.current,e.current=t}var hn={},Oe=pn(hn),Ke=pn(!1),In=hn;function mr(e,t){var n=e.type.contextTypes;if(!n)return hn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ge(e){return e=e.childContextTypes,e!=null}function Nl(){pe(Ke),pe(Oe)}function kc(e,t,n){if(Oe.current!==hn)throw Error(_(168));fe(Oe,t),fe(Ke,n)}function vh(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(_(108,Og(e)||"Unknown",i));return ve({},n,r)}function El(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hn,In=Oe.current,fe(Oe,e),fe(Ke,Ke.current),!0}function wc(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=vh(e,t,In),r.__reactInternalMemoizedMergedChildContext=e,pe(Ke),pe(Oe),fe(Oe,e)):pe(Ke),fe(Ke,n)}var Ft=null,rs=!1,_s=!1;function kh(e){Ft===null?Ft=[e]:Ft.push(e)}function t1(e){rs=!0,kh(e)}function gn(){if(!_s&&Ft!==null){_s=!0;var e=0,t=oe;try{var n=Ft;for(oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ft=null,rs=!1}catch(i){throw Ft!==null&&(Ft=Ft.slice(e+1)),Wf(Ia,gn),i}finally{oe=t,_s=!1}}return null}var er=[],tr=0,Tl=null,zl=0,dt=[],ft=0,An=null,$t=1,Bt="";function wn(e,t){er[tr++]=zl,er[tr++]=Tl,Tl=e,zl=t}function wh(e,t,n){dt[ft++]=$t,dt[ft++]=Bt,dt[ft++]=An,An=e;var r=$t;e=Bt;var i=32-St(r)-1;r&=~(1<<i),n+=1;var l=32-St(t)+i;if(30<l){var s=i-i%5;l=(r&(1<<s)-1).toString(32),r>>=s,i-=s,$t=1<<32-St(t)+i|n<<i|r,Bt=l+e}else $t=1<<l|n<<i|r,Bt=e}function $a(e){e.return!==null&&(wn(e,1),wh(e,1,0))}function Ba(e){for(;e===Tl;)Tl=er[--tr],er[tr]=null,zl=er[--tr],er[tr]=null;for(;e===An;)An=dt[--ft],dt[ft]=null,Bt=dt[--ft],dt[ft]=null,$t=dt[--ft],dt[ft]=null}var lt=null,it=null,ge=!1,bt=null;function bh(e,t){var n=mt(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 bc(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,lt=e,it=on(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,it=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=An!==null?{id:$t,overflow:Bt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=mt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,lt=e,it=null,!0):!1;default:return!1}}function _o(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Oo(e){if(ge){var t=it;if(t){var n=t;if(!bc(e,t)){if(_o(e))throw Error(_(418));t=on(n.nextSibling);var r=lt;t&&bc(e,t)?bh(r,n):(e.flags=e.flags&-4097|2,ge=!1,lt=e)}}else{if(_o(e))throw Error(_(418));e.flags=e.flags&-4097|2,ge=!1,lt=e}}}function Sc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;lt=e}function Vi(e){if(e!==lt)return!1;if(!ge)return Sc(e),ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Mo(e.type,e.memoizedProps)),t&&(t=it)){if(_o(e))throw Sh(),Error(_(418));for(;t;)bh(e,t),t=on(t.nextSibling)}if(Sc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){it=on(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}it=null}}else it=lt?on(e.stateNode.nextSibling):null;return!0}function Sh(){for(var e=it;e;)e=on(e.nextSibling)}function pr(){it=lt=null,ge=!1}function Ua(e){bt===null?bt=[e]:bt.push(e)}var n1=qt.ReactCurrentBatchConfig;function _r(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(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var o=i.refs;s===null?delete o[l]:o[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function Wi(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Cc(e){var t=e._init;return t(e._payload)}function Ch(e){function t(g,y){if(e){var v=g.deletions;v===null?(g.deletions=[y],g.flags|=16):v.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function i(g,y){return g=dn(g,y),g.index=0,g.sibling=null,g}function l(g,y,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<y?(g.flags|=2,y):v):(g.flags|=2,y)):(g.flags|=1048576,y)}function s(g){return e&&g.alternate===null&&(g.flags|=2),g}function o(g,y,v,C){return y===null||y.tag!==6?(y=Vs(v,g.mode,C),y.return=g,y):(y=i(y,v),y.return=g,y)}function u(g,y,v,C){var z=v.type;return z===Yn?c(g,y,v.props.children,C,v.key):y!==null&&(y.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===Xt&&Cc(z)===y.type)?(C=i(y,v.props),C.ref=_r(g,y,v),C.return=g,C):(C=fl(v.type,v.key,v.props,null,g.mode,C),C.ref=_r(g,y,v),C.return=g,C)}function d(g,y,v,C){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=Ws(v,g.mode,C),y.return=g,y):(y=i(y,v.children||[]),y.return=g,y)}function c(g,y,v,C,z){return y===null||y.tag!==7?(y=zn(v,g.mode,C,z),y.return=g,y):(y=i(y,v),y.return=g,y)}function f(g,y,v){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Vs(""+y,g.mode,v),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Li:return v=fl(y.type,y.key,y.props,null,g.mode,v),v.ref=_r(g,null,y),v.return=g,v;case qn:return y=Ws(y,g.mode,v),y.return=g,y;case Xt:var C=y._init;return f(g,C(y._payload),v)}if(Hr(y)||Ar(y))return y=zn(y,g.mode,v,null),y.return=g,y;Wi(g,y)}return null}function h(g,y,v,C){var z=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return z!==null?null:o(g,y,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Li:return v.key===z?u(g,y,v,C):null;case qn:return v.key===z?d(g,y,v,C):null;case Xt:return z=v._init,h(g,y,z(v._payload),C)}if(Hr(v)||Ar(v))return z!==null?null:c(g,y,v,C,null);Wi(g,v)}return null}function m(g,y,v,C,z){if(typeof C=="string"&&C!==""||typeof C=="number")return g=g.get(v)||null,o(y,g,""+C,z);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Li:return g=g.get(C.key===null?v:C.key)||null,u(y,g,C,z);case qn:return g=g.get(C.key===null?v:C.key)||null,d(y,g,C,z);case Xt:var N=C._init;return m(g,y,v,N(C._payload),z)}if(Hr(C)||Ar(C))return g=g.get(v)||null,c(y,g,C,z,null);Wi(y,C)}return null}function p(g,y,v,C){for(var z=null,N=null,A=y,R=y=0,T=null;A!==null&&R<v.length;R++){A.index>R?(T=A,A=null):T=A.sibling;var w=h(g,A,v[R],C);if(w===null){A===null&&(A=T);break}e&&A&&w.alternate===null&&t(g,A),y=l(w,y,R),N===null?z=w:N.sibling=w,N=w,A=T}if(R===v.length)return n(g,A),ge&&wn(g,R),z;if(A===null){for(;R<v.length;R++)A=f(g,v[R],C),A!==null&&(y=l(A,y,R),N===null?z=A:N.sibling=A,N=A);return ge&&wn(g,R),z}for(A=r(g,A);R<v.length;R++)T=m(A,g,R,v[R],C),T!==null&&(e&&T.alternate!==null&&A.delete(T.key===null?R:T.key),y=l(T,y,R),N===null?z=T:N.sibling=T,N=T);return e&&A.forEach(function(j){return t(g,j)}),ge&&wn(g,R),z}function x(g,y,v,C){var z=Ar(v);if(typeof z!="function")throw Error(_(150));if(v=z.call(v),v==null)throw Error(_(151));for(var N=z=null,A=y,R=y=0,T=null,w=v.next();A!==null&&!w.done;R++,w=v.next()){A.index>R?(T=A,A=null):T=A.sibling;var j=h(g,A,w.value,C);if(j===null){A===null&&(A=T);break}e&&A&&j.alternate===null&&t(g,A),y=l(j,y,R),N===null?z=j:N.sibling=j,N=j,A=T}if(w.done)return n(g,A),ge&&wn(g,R),z;if(A===null){for(;!w.done;R++,w=v.next())w=f(g,w.value,C),w!==null&&(y=l(w,y,R),N===null?z=w:N.sibling=w,N=w);return ge&&wn(g,R),z}for(A=r(g,A);!w.done;R++,w=v.next())w=m(A,g,R,w.value,C),w!==null&&(e&&w.alternate!==null&&A.delete(w.key===null?R:w.key),y=l(w,y,R),N===null?z=w:N.sibling=w,N=w);return e&&A.forEach(function(P){return t(g,P)}),ge&&wn(g,R),z}function k(g,y,v,C){if(typeof v=="object"&&v!==null&&v.type===Yn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Li:e:{for(var z=v.key,N=y;N!==null;){if(N.key===z){if(z=v.type,z===Yn){if(N.tag===7){n(g,N.sibling),y=i(N,v.props.children),y.return=g,g=y;break e}}else if(N.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===Xt&&Cc(z)===N.type){n(g,N.sibling),y=i(N,v.props),y.ref=_r(g,N,v),y.return=g,g=y;break e}n(g,N);break}else t(g,N);N=N.sibling}v.type===Yn?(y=zn(v.props.children,g.mode,C,v.key),y.return=g,g=y):(C=fl(v.type,v.key,v.props,null,g.mode,C),C.ref=_r(g,y,v),C.return=g,g=C)}return s(g);case qn:e:{for(N=v.key;y!==null;){if(y.key===N)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(g,y.sibling),y=i(y,v.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Ws(v,g.mode,C),y.return=g,g=y}return s(g);case Xt:return N=v._init,k(g,y,N(v._payload),C)}if(Hr(v))return p(g,y,v,C);if(Ar(v))return x(g,y,v,C);Wi(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,v),y.return=g,g=y):(n(g,y),y=Vs(v,g.mode,C),y.return=g,g=y),s(g)):n(g,y)}return k}var gr=Ch(!0),jh=Ch(!1),Pl=pn(null),Il=null,nr=null,Ha=null;function Va(){Ha=nr=Il=null}function Wa(e){var t=Pl.current;pe(Pl),e._currentValue=t}function Fo(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 cr(e,t){Il=e,Ha=nr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ye=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Ha!==e)if(e={context:e,memoizedValue:t,next:null},nr===null){if(Il===null)throw Error(_(308));nr=e,Il.dependencies={lanes:0,firstContext:e}}else nr=nr.next=e;return t}var jn=null;function Qa(e){jn===null?jn=[e]:jn.push(e)}function Nh(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Qa(t)):(n.next=i.next,i.next=n),t.interleaved=n,Wt(e,r)}function Wt(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 Zt=!1;function qa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Eh(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 Ut(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function an(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,Wt(e,n)}return i=r.interleaved,i===null?(t.next=t,Qa(r)):(t.next=i.next,i.next=t),r.interleaved=t,Wt(e,n)}function sl(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,Aa(e,n)}}function jc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=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};l===null?i=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,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 Al(e,t,n,r){var i=e.updateQueue;Zt=!1;var l=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var u=o,d=u.next;u.next=null,s===null?l=d:s.next=d,s=u;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==s&&(o===null?c.firstBaseUpdate=d:o.next=d,c.lastBaseUpdate=u))}if(l!==null){var f=i.baseState;s=0,c=d=u=null,o=l;do{var h=o.lane,m=o.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:m,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,x=o;switch(h=t,m=n,x.tag){case 1:if(p=x.payload,typeof p=="function"){f=p.call(m,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=x.payload,h=typeof p=="function"?p.call(m,f,h):p,h==null)break e;f=ve({},f,h);break e;case 2:Zt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[o]:h.push(o))}else m={eventTime:m,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(d=c=m,u=f):c=c.next=m,s|=h;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;h=o,o=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=d,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);Ln|=s,e.lanes=s,e.memoizedState=f}}function Nc(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(_(191,i));i.call(r)}}}var Ti={},Lt=pn(Ti),gi=pn(Ti),yi=pn(Ti);function Nn(e){if(e===Ti)throw Error(_(174));return e}function Ya(e,t){switch(fe(yi,t),fe(gi,e),fe(Lt,Ti),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vo(t,e)}pe(Lt),fe(Lt,t)}function yr(){pe(Lt),pe(gi),pe(yi)}function Th(e){Nn(yi.current);var t=Nn(Lt.current),n=vo(t,e.type);t!==n&&(fe(gi,e),fe(Lt,n))}function Ka(e){gi.current===e&&(pe(Lt),pe(gi))}var ye=pn(0);function Ml(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Os=[];function Ga(){for(var e=0;e<Os.length;e++)Os[e]._workInProgressVersionPrimary=null;Os.length=0}var ol=qt.ReactCurrentDispatcher,Fs=qt.ReactCurrentBatchConfig,Mn=0,xe=null,Ee=null,ze=null,Ll=!1,Xr=!1,xi=0,r1=0;function Le(){throw Error(_(321))}function Xa(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nt(e[n],t[n]))return!1;return!0}function Za(e,t,n,r,i,l){if(Mn=l,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ol.current=e===null||e.memoizedState===null?o1:a1,e=n(r,i),Xr){l=0;do{if(Xr=!1,xi=0,25<=l)throw Error(_(301));l+=1,ze=Ee=null,t.updateQueue=null,ol.current=u1,e=n(r,i)}while(Xr)}if(ol.current=Rl,t=Ee!==null&&Ee.next!==null,Mn=0,ze=Ee=xe=null,Ll=!1,t)throw Error(_(300));return e}function Ja(){var e=xi!==0;return xi=0,e}function Pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?xe.memoizedState=ze=e:ze=ze.next=e,ze}function yt(){if(Ee===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=ze===null?xe.memoizedState:ze.next;if(t!==null)ze=t,Ee=e;else{if(e===null)throw Error(_(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},ze===null?xe.memoizedState=ze=e:ze=ze.next=e}return ze}function vi(e,t){return typeof t=="function"?t(e):t}function $s(e){var t=yt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=Ee,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var s=i.next;i.next=l.next,l.next=s}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var o=s=null,u=null,d=l;do{var c=d.lane;if((Mn&c)===c)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var f={lane:c,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(o=u=f,s=r):u=u.next=f,xe.lanes|=c,Ln|=c}d=d.next}while(d!==null&&d!==l);u===null?s=r:u.next=o,Nt(r,t.memoizedState)||(Ye=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,xe.lanes|=l,Ln|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Bs(e){var t=yt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do l=e(l,s.action),s=s.next;while(s!==i);Nt(l,t.memoizedState)||(Ye=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function zh(){}function Ph(e,t){var n=xe,r=yt(),i=t(),l=!Nt(r.memoizedState,i);if(l&&(r.memoizedState=i,Ye=!0),r=r.queue,eu(Mh.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||ze!==null&&ze.memoizedState.tag&1){if(n.flags|=2048,ki(9,Ah.bind(null,n,r,i,t),void 0,null),Pe===null)throw Error(_(349));Mn&30||Ih(n,t,i)}return i}function Ih(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ah(e,t,n,r){t.value=n,t.getSnapshot=r,Lh(t)&&Rh(e)}function Mh(e,t,n){return n(function(){Lh(t)&&Rh(e)})}function Lh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nt(e,n)}catch{return!0}}function Rh(e){var t=Wt(e,1);t!==null&&Ct(t,e,1,-1)}function Ec(e){var t=Pt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},t.queue=e,e=e.dispatch=s1.bind(null,xe,e),[t.memoizedState,e]}function ki(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.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 Dh(){return yt().memoizedState}function al(e,t,n,r){var i=Pt();xe.flags|=e,i.memoizedState=ki(1|t,n,void 0,r===void 0?null:r)}function is(e,t,n,r){var i=yt();r=r===void 0?null:r;var l=void 0;if(Ee!==null){var s=Ee.memoizedState;if(l=s.destroy,r!==null&&Xa(r,s.deps)){i.memoizedState=ki(t,n,l,r);return}}xe.flags|=e,i.memoizedState=ki(1|t,n,l,r)}function Tc(e,t){return al(8390656,8,e,t)}function eu(e,t){return is(2048,8,e,t)}function _h(e,t){return is(4,2,e,t)}function Oh(e,t){return is(4,4,e,t)}function Fh(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 $h(e,t,n){return n=n!=null?n.concat([e]):null,is(4,4,Fh.bind(null,t,e),n)}function tu(){}function Bh(e,t){var n=yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Uh(e,t){var n=yt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Xa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Hh(e,t,n){return Mn&21?(Nt(n,t)||(n=Yf(),xe.lanes|=n,Ln|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ye=!0),e.memoizedState=n)}function i1(e,t){var n=oe;oe=n!==0&&4>n?n:4,e(!0);var r=Fs.transition;Fs.transition={};try{e(!1),t()}finally{oe=n,Fs.transition=r}}function Vh(){return yt().memoizedState}function l1(e,t,n){var r=cn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Wh(e))Qh(t,n);else if(n=Nh(e,t,n,r),n!==null){var i=Ue();Ct(n,e,r,i),qh(n,t,r)}}function s1(e,t,n){var r=cn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wh(e))Qh(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,o=l(s,n);if(i.hasEagerState=!0,i.eagerState=o,Nt(o,s)){var u=t.interleaved;u===null?(i.next=i,Qa(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Nh(e,t,i,r),n!==null&&(i=Ue(),Ct(n,e,r,i),qh(n,t,r))}}function Wh(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Qh(e,t){Xr=Ll=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Aa(e,n)}}var Rl={readContext:gt,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},o1={readContext:gt,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Tc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,al(4194308,4,Fh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return al(4194308,4,e,t)},useInsertionEffect:function(e,t){return al(4,2,e,t)},useMemo:function(e,t){var n=Pt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pt();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=l1.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:Ec,useDebugValue:tu,useDeferredValue:function(e){return Pt().memoizedState=e},useTransition:function(){var e=Ec(!1),t=e[0];return e=i1.bind(null,e[1]),Pt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,i=Pt();if(ge){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),Pe===null)throw Error(_(349));Mn&30||Ih(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,Tc(Mh.bind(null,r,l,e),[e]),r.flags|=2048,ki(9,Ah.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Pt(),t=Pe.identifierPrefix;if(ge){var n=Bt,r=$t;n=(r&~(1<<32-St(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=xi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=r1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},a1={readContext:gt,useCallback:Bh,useContext:gt,useEffect:eu,useImperativeHandle:$h,useInsertionEffect:_h,useLayoutEffect:Oh,useMemo:Uh,useReducer:$s,useRef:Dh,useState:function(){return $s(vi)},useDebugValue:tu,useDeferredValue:function(e){var t=yt();return Hh(t,Ee.memoizedState,e)},useTransition:function(){var e=$s(vi)[0],t=yt().memoizedState;return[e,t]},useMutableSource:zh,useSyncExternalStore:Ph,useId:Vh,unstable_isNewReconciler:!1},u1={readContext:gt,useCallback:Bh,useContext:gt,useEffect:eu,useImperativeHandle:$h,useInsertionEffect:_h,useLayoutEffect:Oh,useMemo:Uh,useReducer:Bs,useRef:Dh,useState:function(){return Bs(vi)},useDebugValue:tu,useDeferredValue:function(e){var t=yt();return Ee===null?t.memoizedState=e:Hh(t,Ee.memoizedState,e)},useTransition:function(){var e=Bs(vi)[0],t=yt().memoizedState;return[e,t]},useMutableSource:zh,useSyncExternalStore:Ph,useId:Vh,unstable_isNewReconciler:!1};function kt(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function $o(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ls={isMounted:function(e){return(e=e._reactInternals)?$n(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ue(),i=cn(e),l=Ut(r,i);l.payload=t,n!=null&&(l.callback=n),t=an(e,l,i),t!==null&&(Ct(t,e,i,r),sl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ue(),i=cn(e),l=Ut(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=an(e,l,i),t!==null&&(Ct(t,e,i,r),sl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ue(),r=cn(e),i=Ut(n,r);i.tag=2,t!=null&&(i.callback=t),t=an(e,i,r),t!==null&&(Ct(t,e,r,n),sl(t,e,r))}};function zc(e,t,n,r,i,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!fi(n,r)||!fi(i,l):!0}function Yh(e,t,n){var r=!1,i=hn,l=t.contextType;return typeof l=="object"&&l!==null?l=gt(l):(i=Ge(t)?In:Oe.current,r=t.contextTypes,l=(r=r!=null)?mr(e,i):hn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ls,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function Pc(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&&ls.enqueueReplaceState(t,t.state,null)}function Bo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},qa(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=gt(l):(l=Ge(t)?In:Oe.current,i.context=mr(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&($o(e,t,l,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&&ls.enqueueReplaceState(i,i.state,null),Al(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function xr(e,t){try{var n="",r=t;do n+=_g(r),r=r.return;while(r);var i=n}catch(l){i=`
39
- Error generating stack: `+l.message+`
40
- `+l.stack}return{value:e,source:t,stack:i,digest:null}}function Us(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Uo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var c1=typeof WeakMap=="function"?WeakMap:Map;function Kh(e,t,n){n=Ut(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_l||(_l=!0,Zo=r),Uo(e,t)},n}function Gh(e,t,n){n=Ut(-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(){Uo(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Uo(e,t),typeof r!="function"&&(un===null?un=new Set([this]):un.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Ic(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new c1;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=C1.bind(null,e,t,n),t.then(e,e))}function Ac(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 Mc(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=Ut(-1,1),t.tag=2,an(n,t,1))),n.lanes|=1),e)}var d1=qt.ReactCurrentOwner,Ye=!1;function $e(e,t,n,r){t.child=e===null?jh(t,null,n,r):gr(t,e.child,n,r)}function Lc(e,t,n,r,i){n=n.render;var l=t.ref;return cr(t,i),r=Za(e,t,n,r,l,i),n=Ja(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Qt(e,t,i)):(ge&&n&&$a(t),t.flags|=1,$e(e,t,r,i),t.child)}function Rc(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!uu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Xh(e,t,l,r,i)):(e=fl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:fi,n(s,r)&&e.ref===t.ref)return Qt(e,t,i)}return t.flags|=1,e=dn(l,r),e.ref=t.ref,e.return=t,t.child=e}function Xh(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(fi(l,r)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(Ye=!0);else return t.lanes=e.lanes,Qt(e,t,i)}return Ho(e,t,n,r,i)}function Zh(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},fe(ir,rt),rt|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,fe(ir,rt),rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,fe(ir,rt),rt|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,fe(ir,rt),rt|=r;return $e(e,t,i,n),t.child}function Jh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ho(e,t,n,r,i){var l=Ge(n)?In:Oe.current;return l=mr(t,l),cr(t,i),n=Za(e,t,n,r,l,i),r=Ja(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Qt(e,t,i)):(ge&&r&&$a(t),t.flags|=1,$e(e,t,n,i),t.child)}function Dc(e,t,n,r,i){if(Ge(n)){var l=!0;El(t)}else l=!1;if(cr(t,i),t.stateNode===null)ul(e,t),Yh(t,n,r),Bo(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var u=s.context,d=n.contextType;typeof d=="object"&&d!==null?d=gt(d):(d=Ge(n)?In:Oe.current,d=mr(t,d));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==r||u!==d)&&Pc(t,s,r,d),Zt=!1;var h=t.memoizedState;s.state=h,Al(t,r,s,i),u=t.memoizedState,o!==r||h!==u||Ke.current||Zt?(typeof c=="function"&&($o(t,n,c,r),u=t.memoizedState),(o=Zt||zc(t,n,o,r,h,u,d))?(f||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=u),s.props=r,s.state=u,s.context=d,r=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Eh(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:kt(t.type,o),s.props=d,f=t.pendingProps,h=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=gt(u):(u=Ge(n)?In:Oe.current,u=mr(t,u));var m=n.getDerivedStateFromProps;(c=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==f||h!==u)&&Pc(t,s,r,u),Zt=!1,h=t.memoizedState,s.state=h,Al(t,r,s,i);var p=t.memoizedState;o!==f||h!==p||Ke.current||Zt?(typeof m=="function"&&($o(t,n,m,r),p=t.memoizedState),(d=Zt||zc(t,n,d,r,h,p,u)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=u,r=d):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Vo(e,t,n,r,l,i)}function Vo(e,t,n,r,i,l){Jh(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&wc(t,n,!1),Qt(e,t,l);r=t.stateNode,d1.current=t;var o=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=gr(t,e.child,null,l),t.child=gr(t,null,o,l)):$e(e,t,o,l),t.memoizedState=r.state,i&&wc(t,n,!0),t.child}function em(e){var t=e.stateNode;t.pendingContext?kc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kc(e,t.context,!1),Ya(e,t.containerInfo)}function _c(e,t,n,r,i){return pr(),Ua(i),t.flags|=256,$e(e,t,n,r),t.child}var Wo={dehydrated:null,treeContext:null,retryLane:0};function Qo(e){return{baseLanes:e,cachePool:null,transitions:null}}function tm(e,t,n){var r=t.pendingProps,i=ye.current,l=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),fe(ye,i&1),e===null)return Oo(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,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=as(s,r,0,null),e=zn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Qo(n),t.memoizedState=Wo,e):nu(t,s));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return f1(e,t,s,r,o,i,n);if(l){l=r.fallback,s=t.mode,i=e.child,o=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=dn(i,u),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?l=dn(o,l):(l=zn(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?Qo(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=Wo,r}return l=e.child,e=l.sibling,r=dn(l,{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 nu(e,t){return t=as({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qi(e,t,n,r){return r!==null&&Ua(r),gr(t,e.child,null,n),e=nu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function f1(e,t,n,r,i,l,s){if(n)return t.flags&256?(t.flags&=-257,r=Us(Error(_(422))),Qi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=as({mode:"visible",children:r.children},i,0,null),l=zn(l,i,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&gr(t,e.child,null,s),t.child.memoizedState=Qo(s),t.memoizedState=Wo,l);if(!(t.mode&1))return Qi(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(_(419)),r=Us(l,r,void 0),Qi(e,t,s,r)}if(o=(s&e.childLanes)!==0,Ye||o){if(r=Pe,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!==l.retryLane&&(l.retryLane=i,Wt(e,i),Ct(r,e,i,-1))}return au(),r=Us(Error(_(421))),Qi(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=j1.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,it=on(i.nextSibling),lt=t,ge=!0,bt=null,e!==null&&(dt[ft++]=$t,dt[ft++]=Bt,dt[ft++]=An,$t=e.id,Bt=e.overflow,An=t),t=nu(t,r.children),t.flags|=4096,t)}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Fo(e.return,t,n)}function Hs(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function nm(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if($e(e,t,r.children,n),r=ye.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&&Oc(e,n,t);else if(e.tag===19)Oc(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(fe(ye,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ml(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Hs(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ml(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Hs(t,!0,n,null,l);break;case"together":Hs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ul(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ln|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=dn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=dn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function h1(e,t,n){switch(t.tag){case 3:em(t),pr();break;case 5:Th(t);break;case 1:Ge(t.type)&&El(t);break;case 4:Ya(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;fe(Pl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(fe(ye,ye.current&1),t.flags|=128,null):n&t.child.childLanes?tm(e,t,n):(fe(ye,ye.current&1),e=Qt(e,t,n),e!==null?e.sibling:null);fe(ye,ye.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return nm(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),fe(ye,ye.current),r)break;return null;case 22:case 23:return t.lanes=0,Zh(e,t,n)}return Qt(e,t,n)}var rm,qo,im,lm;rm=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}};qo=function(){};im=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Nn(Lt.current);var l=null;switch(n){case"input":i=po(e,i),r=po(e,r),l=[];break;case"select":i=ve({},i,{value:void 0}),r=ve({},r,{value:void 0}),l=[];break;case"textarea":i=xo(e,i),r=xo(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=jl)}ko(n,r);var s;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var o=i[d];for(s in o)o.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(li.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var u=r[d];if(o=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&u!==o&&(u!=null||o!=null))if(d==="style")if(o){for(s in o)!o.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&o[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(l||(l=[]),l.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(li.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&me("scroll",e),l||o===u||(l=[])):(l=l||[]).push(d,u))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}};lm=function(e,t,n,r){n!==r&&(t.flags|=4)};function Or(e,t){if(!ge)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 Re(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 m1(e,t,n){var r=t.pendingProps;switch(Ba(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Ge(t.type)&&Nl(),Re(t),null;case 3:return r=t.stateNode,yr(),pe(Ke),pe(Oe),Ga(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Vi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bt!==null&&(ta(bt),bt=null))),qo(e,t),Re(t),null;case 5:Ka(t);var i=Nn(yi.current);if(n=t.type,e!==null&&t.stateNode!=null)im(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Re(t),null}if(e=Nn(Lt.current),Vi(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[At]=t,r[pi]=l,e=(t.mode&1)!==0,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(i=0;i<Wr.length;i++)me(Wr[i],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":qu(r,l),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},me("invalid",r);break;case"textarea":Ku(r,l),me("invalid",r)}ko(n,l),i=null;for(var s in l)if(l.hasOwnProperty(s)){var o=l[s];s==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&Hi(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&Hi(r.textContent,o,e),i=["children",""+o]):li.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&me("scroll",r)}switch(n){case"input":Ri(r),Yu(r,l,!0);break;case"textarea":Ri(r),Gu(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=jl)}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=Mf(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[At]=t,e[pi]=r,rm(e,t,!1,!1),t.stateNode=e;e:{switch(s=wo(n,r),n){case"dialog":me("cancel",e),me("close",e),i=r;break;case"iframe":case"object":case"embed":me("load",e),i=r;break;case"video":case"audio":for(i=0;i<Wr.length;i++)me(Wr[i],e);i=r;break;case"source":me("error",e),i=r;break;case"img":case"image":case"link":me("error",e),me("load",e),i=r;break;case"details":me("toggle",e),i=r;break;case"input":qu(e,r),i=po(e,r),me("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ve({},r,{value:void 0}),me("invalid",e);break;case"textarea":Ku(e,r),i=xo(e,r),me("invalid",e);break;default:i=r}ko(n,i),o=i;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?Df(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Lf(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&si(e,u):typeof u=="number"&&si(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(li.hasOwnProperty(l)?u!=null&&l==="onScroll"&&me("scroll",e):u!=null&&Na(e,l,u,s))}switch(n){case"input":Ri(e),Yu(e,r,!1);break;case"textarea":Ri(e),Gu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fn(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?sr(e,!!r.multiple,l,!1):r.defaultValue!=null&&sr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=jl)}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 Re(t),null;case 6:if(e&&t.stateNode!=null)lm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=Nn(yi.current),Nn(Lt.current),Vi(t)){if(r=t.stateNode,n=t.memoizedProps,r[At]=t,(l=r.nodeValue!==n)&&(e=lt,e!==null))switch(e.tag){case 3:Hi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hi(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[At]=t,t.stateNode=r}return Re(t),null;case 13:if(pe(ye),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ge&&it!==null&&t.mode&1&&!(t.flags&128))Sh(),pr(),t.flags|=98560,l=!1;else if(l=Vi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(_(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(_(317));l[At]=t}else pr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),l=!1}else bt!==null&&(ta(bt),bt=null),l=!0;if(!l)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||ye.current&1?Te===0&&(Te=3):au())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return yr(),qo(e,t),e===null&&hi(t.stateNode.containerInfo),Re(t),null;case 10:return Wa(t.type._context),Re(t),null;case 17:return Ge(t.type)&&Nl(),Re(t),null;case 19:if(pe(ye),l=t.memoizedState,l===null)return Re(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)Or(l,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ml(e),s!==null){for(t.flags|=128,Or(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fe(ye,ye.current&1|2),t.child}e=e.sibling}l.tail!==null&&Se()>vr&&(t.flags|=128,r=!0,Or(l,!1),t.lanes=4194304)}else{if(!r)if(e=Ml(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Or(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ge)return Re(t),null}else 2*Se()-l.renderingStartTime>vr&&n!==1073741824&&(t.flags|=128,r=!0,Or(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Se(),t.sibling=null,n=ye.current,fe(ye,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return ou(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?rt&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function p1(e,t){switch(Ba(t),t.tag){case 1:return Ge(t.type)&&Nl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yr(),pe(Ke),pe(Oe),Ga(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ka(t),null;case 13:if(pe(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));pr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ye),null;case 4:return yr(),null;case 10:return Wa(t.type._context),null;case 22:case 23:return ou(),null;case 24:return null;default:return null}}var qi=!1,De=!1,g1=typeof WeakSet=="function"?WeakSet:Set,U=null;function rr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function Yo(e,t,n){try{n()}catch(r){we(e,t,r)}}var Fc=!1;function y1(e,t){if(Io=bl,e=ch(),Fa(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,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,o=-1,u=-1,d=0,c=0,f=e,h=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(o=s+i),f!==l||r!==0&&f.nodeType!==3||(u=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===n&&++d===i&&(o=s),h===l&&++c===r&&(u=s),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ao={focusedElem:e,selectionRange:n},bl=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var x=p.memoizedProps,k=p.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:kt(t.type,x),k);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(C){we(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return p=Fc,Fc=!1,p}function Zr(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 l=i.destroy;i.destroy=void 0,l!==void 0&&Yo(t,n,l)}i=i.next}while(i!==r)}}function ss(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 Ko(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 sm(e){var t=e.alternate;t!==null&&(e.alternate=null,sm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[At],delete t[pi],delete t[Ro],delete t[Jy],delete t[e1])),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 om(e){return e.tag===5||e.tag===3||e.tag===4}function $c(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||om(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 Go(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=jl));else if(r!==4&&(e=e.child,e!==null))for(Go(e,t,n),e=e.sibling;e!==null;)Go(e,t,n),e=e.sibling}function Xo(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(Xo(e,t,n),e=e.sibling;e!==null;)Xo(e,t,n),e=e.sibling}var Ie=null,wt=!1;function Kt(e,t,n){for(n=n.child;n!==null;)am(e,t,n),n=n.sibling}function am(e,t,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Zl,n)}catch{}switch(n.tag){case 5:De||rr(n,t);case 6:var r=Ie,i=wt;Ie=null,Kt(e,t,n),Ie=r,wt=i,Ie!==null&&(wt?(e=Ie,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ie.removeChild(n.stateNode));break;case 18:Ie!==null&&(wt?(e=Ie,n=n.stateNode,e.nodeType===8?Ds(e.parentNode,n):e.nodeType===1&&Ds(e,n),ci(e)):Ds(Ie,n.stateNode));break;case 4:r=Ie,i=wt,Ie=n.stateNode.containerInfo,wt=!0,Kt(e,t,n),Ie=r,wt=i;break;case 0:case 11:case 14:case 15:if(!De&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&Yo(n,t,s),i=i.next}while(i!==r)}Kt(e,t,n);break;case 1:if(!De&&(rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){we(n,t,o)}Kt(e,t,n);break;case 21:Kt(e,t,n);break;case 22:n.mode&1?(De=(r=De)||n.memoizedState!==null,Kt(e,t,n),De=r):Kt(e,t,n);break;default:Kt(e,t,n)}}function Bc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new g1),t.forEach(function(r){var i=N1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:Ie=o.stateNode,wt=!1;break e;case 3:Ie=o.stateNode.containerInfo,wt=!0;break e;case 4:Ie=o.stateNode.containerInfo,wt=!0;break e}o=o.return}if(Ie===null)throw Error(_(160));am(l,s,i),Ie=null,wt=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(d){we(i,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)um(t,e),t=t.sibling}function um(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vt(t,e),zt(e),r&4){try{Zr(3,e,e.return),ss(3,e)}catch(x){we(e,e.return,x)}try{Zr(5,e,e.return)}catch(x){we(e,e.return,x)}}break;case 1:vt(t,e),zt(e),r&512&&n!==null&&rr(n,n.return);break;case 5:if(vt(t,e),zt(e),r&512&&n!==null&&rr(n,n.return),e.flags&32){var i=e.stateNode;try{si(i,"")}catch(x){we(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&If(i,l),wo(o,s);var d=wo(o,l);for(s=0;s<u.length;s+=2){var c=u[s],f=u[s+1];c==="style"?Df(i,f):c==="dangerouslySetInnerHTML"?Lf(i,f):c==="children"?si(i,f):Na(i,c,f,d)}switch(o){case"input":go(i,l);break;case"textarea":Af(i,l);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var m=l.value;m!=null?sr(i,!!l.multiple,m,!1):h!==!!l.multiple&&(l.defaultValue!=null?sr(i,!!l.multiple,l.defaultValue,!0):sr(i,!!l.multiple,l.multiple?[]:"",!1))}i[pi]=l}catch(x){we(e,e.return,x)}}break;case 6:if(vt(t,e),zt(e),r&4){if(e.stateNode===null)throw Error(_(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(x){we(e,e.return,x)}}break;case 3:if(vt(t,e),zt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ci(t.containerInfo)}catch(x){we(e,e.return,x)}break;case 4:vt(t,e),zt(e);break;case 13:vt(t,e),zt(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(lu=Se())),r&4&&Bc(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(De=(d=De)||c,vt(t,e),De=d):vt(t,e),zt(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!c&&e.mode&1)for(U=e,c=e.child;c!==null;){for(f=U=c;U!==null;){switch(h=U,m=h.child,h.tag){case 0:case 11:case 14:case 15:Zr(4,h,h.return);break;case 1:rr(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(x){we(r,n,x)}}break;case 5:rr(h,h.return);break;case 22:if(h.memoizedState!==null){Hc(f);continue}}m!==null?(m.return=h,U=m):Hc(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,d?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=f.stateNode,u=f.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=Rf("display",s))}catch(x){we(e,e.return,x)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=d?"":f.memoizedProps}catch(x){we(e,e.return,x)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:vt(t,e),zt(e),r&4&&Bc(e);break;case 21:break;default:vt(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(om(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(si(i,""),r.flags&=-33);var l=$c(e);Xo(e,l,i);break;case 3:case 4:var s=r.stateNode.containerInfo,o=$c(e);Go(e,o,s);break;default:throw Error(_(161))}}catch(u){we(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function x1(e,t,n){U=e,cm(e)}function cm(e,t,n){for(var r=(e.mode&1)!==0;U!==null;){var i=U,l=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||qi;if(!s){var o=i.alternate,u=o!==null&&o.memoizedState!==null||De;o=qi;var d=De;if(qi=s,(De=u)&&!d)for(U=i;U!==null;)s=U,u=s.child,s.tag===22&&s.memoizedState!==null?Vc(i):u!==null?(u.return=s,U=u):Vc(i);for(;l!==null;)U=l,cm(l),l=l.sibling;U=i,qi=o,De=d}Uc(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,U=l):Uc(e)}}function Uc(e){for(;U!==null;){var t=U;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:De||ss(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!De)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:kt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Nc(t,l,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}Nc(t,s,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var c=d.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&ci(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}De||t.flags&512&&Ko(t)}catch(h){we(t,t.return,h)}}if(t===e){U=null;break}if(n=t.sibling,n!==null){n.return=t.return,U=n;break}U=t.return}}function Hc(e){for(;U!==null;){var t=U;if(t===e){U=null;break}var n=t.sibling;if(n!==null){n.return=t.return,U=n;break}U=t.return}}function Vc(e){for(;U!==null;){var t=U;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ss(4,t)}catch(u){we(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){we(t,i,u)}}var l=t.return;try{Ko(t)}catch(u){we(t,l,u)}break;case 5:var s=t.return;try{Ko(t)}catch(u){we(t,s,u)}}}catch(u){we(t,t.return,u)}if(t===e){U=null;break}var o=t.sibling;if(o!==null){o.return=t.return,U=o;break}U=t.return}}var v1=Math.ceil,Dl=qt.ReactCurrentDispatcher,ru=qt.ReactCurrentOwner,pt=qt.ReactCurrentBatchConfig,se=0,Pe=null,je=null,Ae=0,rt=0,ir=pn(0),Te=0,wi=null,Ln=0,os=0,iu=0,Jr=null,qe=null,lu=0,vr=1/0,Ot=null,_l=!1,Zo=null,un=null,Yi=!1,nn=null,Ol=0,ei=0,Jo=null,cl=-1,dl=0;function Ue(){return se&6?Se():cl!==-1?cl:cl=Se()}function cn(e){return e.mode&1?se&2&&Ae!==0?Ae&-Ae:n1.transition!==null?(dl===0&&(dl=Yf()),dl):(e=oe,e!==0||(e=window.event,e=e===void 0?16:th(e.type)),e):1}function Ct(e,t,n,r){if(50<ei)throw ei=0,Jo=null,Error(_(185));ji(e,n,r),(!(se&2)||e!==Pe)&&(e===Pe&&(!(se&2)&&(os|=n),Te===4&&en(e,Ae)),Xe(e,r),n===1&&se===0&&!(t.mode&1)&&(vr=Se()+500,rs&&gn()))}function Xe(e,t){var n=e.callbackNode;ny(e,t);var r=wl(e,e===Pe?Ae:0);if(r===0)n!==null&&Ju(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ju(n),t===1)e.tag===0?t1(Wc.bind(null,e)):kh(Wc.bind(null,e)),Xy(function(){!(se&6)&&gn()}),n=null;else{switch(Kf(r)){case 1:n=Ia;break;case 4:n=Qf;break;case 16:n=kl;break;case 536870912:n=qf;break;default:n=kl}n=xm(n,dm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function dm(e,t){if(cl=-1,dl=0,se&6)throw Error(_(327));var n=e.callbackNode;if(dr()&&e.callbackNode!==n)return null;var r=wl(e,e===Pe?Ae:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Fl(e,r);else{t=r;var i=se;se|=2;var l=hm();(Pe!==e||Ae!==t)&&(Ot=null,vr=Se()+500,Tn(e,t));do try{b1();break}catch(o){fm(e,o)}while(!0);Va(),Dl.current=l,se=i,je!==null?t=0:(Pe=null,Ae=0,t=Te)}if(t!==0){if(t===2&&(i=No(e),i!==0&&(r=i,t=ea(e,i))),t===1)throw n=wi,Tn(e,0),en(e,r),Xe(e,Se()),n;if(t===6)en(e,r);else{if(i=e.current.alternate,!(r&30)&&!k1(i)&&(t=Fl(e,r),t===2&&(l=No(e),l!==0&&(r=l,t=ea(e,l))),t===1))throw n=wi,Tn(e,0),en(e,r),Xe(e,Se()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:bn(e,qe,Ot);break;case 3:if(en(e,r),(r&130023424)===r&&(t=lu+500-Se(),10<t)){if(wl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ue(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Lo(bn.bind(null,e,qe,Ot),t);break}bn(e,qe,Ot);break;case 4:if(en(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-St(r);l=1<<s,s=t[s],s>i&&(i=s),r&=~l}if(r=i,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*v1(r/1960))-r,10<r){e.timeoutHandle=Lo(bn.bind(null,e,qe,Ot),r);break}bn(e,qe,Ot);break;case 5:bn(e,qe,Ot);break;default:throw Error(_(329))}}}return Xe(e,Se()),e.callbackNode===n?dm.bind(null,e):null}function ea(e,t){var n=Jr;return e.current.memoizedState.isDehydrated&&(Tn(e,t).flags|=256),e=Fl(e,t),e!==2&&(t=qe,qe=n,t!==null&&ta(t)),e}function ta(e){qe===null?qe=e:qe.push.apply(qe,e)}function k1(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],l=i.getSnapshot;i=i.value;try{if(!Nt(l(),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 en(e,t){for(t&=~iu,t&=~os,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-St(t),r=1<<n;e[n]=-1,t&=~r}}function Wc(e){if(se&6)throw Error(_(327));dr();var t=wl(e,0);if(!(t&1))return Xe(e,Se()),null;var n=Fl(e,t);if(e.tag!==0&&n===2){var r=No(e);r!==0&&(t=r,n=ea(e,r))}if(n===1)throw n=wi,Tn(e,0),en(e,t),Xe(e,Se()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bn(e,qe,Ot),Xe(e,Se()),null}function su(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(vr=Se()+500,rs&&gn())}}function Rn(e){nn!==null&&nn.tag===0&&!(se&6)&&dr();var t=se;se|=1;var n=pt.transition,r=oe;try{if(pt.transition=null,oe=1,e)return e()}finally{oe=r,pt.transition=n,se=t,!(se&6)&&gn()}}function ou(){rt=ir.current,pe(ir)}function Tn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Gy(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(Ba(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Nl();break;case 3:yr(),pe(Ke),pe(Oe),Ga();break;case 5:Ka(r);break;case 4:yr();break;case 13:pe(ye);break;case 19:pe(ye);break;case 10:Wa(r.type._context);break;case 22:case 23:ou()}n=n.return}if(Pe=e,je=e=dn(e.current,null),Ae=rt=t,Te=0,wi=null,iu=os=Ln=0,qe=Jr=null,jn!==null){for(t=0;t<jn.length;t++)if(n=jn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=i,r.next=s}n.pending=r}jn=null}return e}function fm(e,t){do{var n=je;try{if(Va(),ol.current=Rl,Ll){for(var r=xe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ll=!1}if(Mn=0,ze=Ee=xe=null,Xr=!1,xi=0,ru.current=null,n===null||n.return===null){Te=1,wi=t,je=null;break}e:{var l=e,s=n.return,o=n,u=t;if(t=Ae,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,c=o,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var m=Ac(s);if(m!==null){m.flags&=-257,Mc(m,s,o,l,t),m.mode&1&&Ic(l,d,t),t=m,u=d;var p=t.updateQueue;if(p===null){var x=new Set;x.add(u),t.updateQueue=x}else p.add(u);break e}else{if(!(t&1)){Ic(l,d,t),au();break e}u=Error(_(426))}}else if(ge&&o.mode&1){var k=Ac(s);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Mc(k,s,o,l,t),Ua(xr(u,o));break e}}l=u=xr(u,o),Te!==4&&(Te=2),Jr===null?Jr=[l]:Jr.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var g=Kh(l,u,t);jc(l,g);break e;case 1:o=u;var y=l.type,v=l.stateNode;if(!(l.flags&128)&&(typeof y.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(un===null||!un.has(v)))){l.flags|=65536,t&=-t,l.lanes|=t;var C=Gh(l,o,t);jc(l,C);break e}}l=l.return}while(l!==null)}pm(n)}catch(z){t=z,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function hm(){var e=Dl.current;return Dl.current=Rl,e===null?Rl:e}function au(){(Te===0||Te===3||Te===2)&&(Te=4),Pe===null||!(Ln&268435455)&&!(os&268435455)||en(Pe,Ae)}function Fl(e,t){var n=se;se|=2;var r=hm();(Pe!==e||Ae!==t)&&(Ot=null,Tn(e,t));do try{w1();break}catch(i){fm(e,i)}while(!0);if(Va(),se=n,Dl.current=r,je!==null)throw Error(_(261));return Pe=null,Ae=0,Te}function w1(){for(;je!==null;)mm(je)}function b1(){for(;je!==null&&!qg();)mm(je)}function mm(e){var t=ym(e.alternate,e,rt);e.memoizedProps=e.pendingProps,t===null?pm(e):je=t,ru.current=null}function pm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=p1(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Te=6,je=null;return}}else if(n=m1(n,t,rt),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Te===0&&(Te=5)}function bn(e,t,n){var r=oe,i=pt.transition;try{pt.transition=null,oe=1,S1(e,t,n,r)}finally{pt.transition=i,oe=r}return null}function S1(e,t,n,r){do dr();while(nn!==null);if(se&6)throw Error(_(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(_(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(ry(e,l),e===Pe&&(je=Pe=null,Ae=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Yi||(Yi=!0,xm(kl,function(){return dr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=pt.transition,pt.transition=null;var s=oe;oe=1;var o=se;se|=4,ru.current=null,y1(e,n),um(n,e),Hy(Ao),bl=!!Io,Ao=Io=null,e.current=n,x1(n),Yg(),se=o,oe=s,pt.transition=l}else e.current=n;if(Yi&&(Yi=!1,nn=e,Ol=i),l=e.pendingLanes,l===0&&(un=null),Xg(n.stateNode),Xe(e,Se()),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(_l)throw _l=!1,e=Zo,Zo=null,e;return Ol&1&&e.tag!==0&&dr(),l=e.pendingLanes,l&1?e===Jo?ei++:(ei=0,Jo=e):ei=0,gn(),null}function dr(){if(nn!==null){var e=Kf(Ol),t=pt.transition,n=oe;try{if(pt.transition=null,oe=16>e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Ol=0,se&6)throw Error(_(331));var i=se;for(se|=4,U=e.current;U!==null;){var l=U,s=l.child;if(U.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var d=o[u];for(U=d;U!==null;){var c=U;switch(c.tag){case 0:case 11:case 15:Zr(8,c,l)}var f=c.child;if(f!==null)f.return=c,U=f;else for(;U!==null;){c=U;var h=c.sibling,m=c.return;if(sm(c),c===d){U=null;break}if(h!==null){h.return=m,U=h;break}U=m}}}var p=l.alternate;if(p!==null){var x=p.child;if(x!==null){p.child=null;do{var k=x.sibling;x.sibling=null,x=k}while(x!==null)}}U=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,U=s;else e:for(;U!==null;){if(l=U,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Zr(9,l,l.return)}var g=l.sibling;if(g!==null){g.return=l.return,U=g;break e}U=l.return}}var y=e.current;for(U=y;U!==null;){s=U;var v=s.child;if(s.subtreeFlags&2064&&v!==null)v.return=s,U=v;else e:for(s=y;U!==null;){if(o=U,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:ss(9,o)}}catch(z){we(o,o.return,z)}if(o===s){U=null;break e}var C=o.sibling;if(C!==null){C.return=o.return,U=C;break e}U=o.return}}if(se=i,gn(),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Zl,e)}catch{}r=!0}return r}finally{oe=n,pt.transition=t}}return!1}function Qc(e,t,n){t=xr(n,t),t=Kh(e,t,1),e=an(e,t,1),t=Ue(),e!==null&&(ji(e,1,t),Xe(e,t))}function we(e,t,n){if(e.tag===3)Qc(e,e,n);else for(;t!==null;){if(t.tag===3){Qc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(un===null||!un.has(r))){e=xr(n,e),e=Gh(t,e,1),t=an(t,e,1),e=Ue(),t!==null&&(ji(t,1,e),Xe(t,e));break}}t=t.return}}function C1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ue(),e.pingedLanes|=e.suspendedLanes&n,Pe===e&&(Ae&n)===n&&(Te===4||Te===3&&(Ae&130023424)===Ae&&500>Se()-lu?Tn(e,0):iu|=n),Xe(e,t)}function gm(e,t){t===0&&(e.mode&1?(t=Oi,Oi<<=1,!(Oi&130023424)&&(Oi=4194304)):t=1);var n=Ue();e=Wt(e,t),e!==null&&(ji(e,t,n),Xe(e,n))}function j1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gm(e,n)}function N1(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(_(314))}r!==null&&r.delete(t),gm(e,n)}var ym;ym=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)Ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ye=!1,h1(e,t,n);Ye=!!(e.flags&131072)}else Ye=!1,ge&&t.flags&1048576&&wh(t,zl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ul(e,t),e=t.pendingProps;var i=mr(t,Oe.current);cr(t,n),i=Za(null,t,r,e,i,n);var l=Ja();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,Ge(r)?(l=!0,El(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,qa(t),i.updater=ls,t.stateNode=i,i._reactInternals=t,Bo(t,r,e,n),t=Vo(null,t,r,!0,l,n)):(t.tag=0,ge&&l&&$a(t),$e(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ul(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=T1(r),e=kt(r,e),i){case 0:t=Ho(null,t,r,e,n);break e;case 1:t=Dc(null,t,r,e,n);break e;case 11:t=Lc(null,t,r,e,n);break e;case 14:t=Rc(null,t,r,kt(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),Ho(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),Dc(e,t,r,i,n);case 3:e:{if(em(t),e===null)throw Error(_(387));r=t.pendingProps,l=t.memoizedState,i=l.element,Eh(e,t),Al(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=xr(Error(_(423)),t),t=_c(e,t,r,n,i);break e}else if(r!==i){i=xr(Error(_(424)),t),t=_c(e,t,r,n,i);break e}else for(it=on(t.stateNode.containerInfo.firstChild),lt=t,ge=!0,bt=null,n=jh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(pr(),r===i){t=Qt(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return Th(t),e===null&&Oo(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,s=i.children,Mo(r,i)?s=null:l!==null&&Mo(r,l)&&(t.flags|=32),Jh(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&Oo(t),null;case 13:return tm(e,t,n);case 4:return Ya(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=gr(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),Lc(e,t,r,i,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,s=i.value,fe(Pl,r._currentValue),r._currentValue=s,l!==null)if(Nt(l.value,s)){if(l.children===i.children&&!Ke.current){t=Qt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){s=l.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=Ut(-1,n&-n),u.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var c=d.pending;c===null?u.next=u:(u.next=c.next,c.next=u),d.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Fo(l.return,n,t),o.lanes|=n;break}u=u.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(_(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Fo(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}$e(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,cr(t,n),i=gt(i),r=r(i),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,i=kt(r,t.pendingProps),i=kt(r.type,i),Rc(e,t,r,i,n);case 15:return Xh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),ul(e,t),t.tag=1,Ge(r)?(e=!0,El(t)):e=!1,cr(t,n),Yh(t,r,i),Bo(t,r,i,n),Vo(null,t,r,!0,e,n);case 19:return nm(e,t,n);case 22:return Zh(e,t,n)}throw Error(_(156,t.tag))};function xm(e,t){return Wf(e,t)}function E1(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 mt(e,t,n,r){return new E1(e,t,n,r)}function uu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function T1(e){if(typeof e=="function")return uu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ta)return 11;if(e===za)return 14}return 2}function dn(e,t){var n=e.alternate;return n===null?(n=mt(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 fl(e,t,n,r,i,l){var s=2;if(r=e,typeof e=="function")uu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Yn:return zn(n.children,i,l,t);case Ea:s=8,i|=8;break;case co:return e=mt(12,n,t,i|2),e.elementType=co,e.lanes=l,e;case fo:return e=mt(13,n,t,i),e.elementType=fo,e.lanes=l,e;case ho:return e=mt(19,n,t,i),e.elementType=ho,e.lanes=l,e;case Tf:return as(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nf:s=10;break e;case Ef:s=9;break e;case Ta:s=11;break e;case za:s=14;break e;case Xt:s=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=mt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function zn(e,t,n,r){return e=mt(7,e,r,t),e.lanes=n,e}function as(e,t,n,r){return e=mt(22,e,r,t),e.elementType=Tf,e.lanes=n,e.stateNode={isHidden:!1},e}function Vs(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function Ws(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function z1(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=js(0),this.expirationTimes=js(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=js(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function cu(e,t,n,r,i,l,s,o,u){return e=new z1(e,t,n,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=mt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},qa(l),e}function P1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:qn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function vm(e){if(!e)return hn;e=e._reactInternals;e:{if($n(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ge(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(Ge(n))return vh(e,n,t)}return t}function km(e,t,n,r,i,l,s,o,u){return e=cu(n,r,!0,e,i,l,s,o,u),e.context=vm(null),n=e.current,r=Ue(),i=cn(n),l=Ut(r,i),l.callback=t??null,an(n,l,i),e.current.lanes=i,ji(e,i,r),Xe(e,r),e}function us(e,t,n,r){var i=t.current,l=Ue(),s=cn(i);return n=vm(n),t.context===null?t.context=n:t.pendingContext=n,t=Ut(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=an(i,t,s),e!==null&&(Ct(e,i,s,l),sl(e,i,s)),s}function $l(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 qc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function du(e,t){qc(e,t),(e=e.alternate)&&qc(e,t)}function I1(){return null}var wm=typeof reportError=="function"?reportError:function(e){console.error(e)};function fu(e){this._internalRoot=e}cs.prototype.render=fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));us(e,t,null,null)};cs.prototype.unmount=fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rn(function(){us(null,e,null,null)}),t[Vt]=null}};function cs(e){this._internalRoot=e}cs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jt.length&&t!==0&&t<Jt[n].priority;n++);Jt.splice(n,0,e),n===0&&eh(e)}};function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ds(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yc(){}function A1(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var d=$l(s);l.call(d)}}var s=km(t,r,e,0,null,!1,!1,"",Yc);return e._reactRootContainer=s,e[Vt]=s.current,hi(e.nodeType===8?e.parentNode:e),Rn(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var d=$l(u);o.call(d)}}var u=cu(e,0,!1,null,null,!1,!1,"",Yc);return e._reactRootContainer=u,e[Vt]=u.current,hi(e.nodeType===8?e.parentNode:e),Rn(function(){us(t,u,n,r)}),u}function fs(e,t,n,r,i){var l=n._reactRootContainer;if(l){var s=l;if(typeof i=="function"){var o=i;i=function(){var u=$l(s);o.call(u)}}us(t,s,e,i)}else s=A1(n,t,e,i,r);return $l(s)}Gf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vr(t.pendingLanes);n!==0&&(Aa(t,n|1),Xe(t,Se()),!(se&6)&&(vr=Se()+500,gn()))}break;case 13:Rn(function(){var r=Wt(e,1);if(r!==null){var i=Ue();Ct(r,e,1,i)}}),du(e,1)}};Ma=function(e){if(e.tag===13){var t=Wt(e,134217728);if(t!==null){var n=Ue();Ct(t,e,134217728,n)}du(e,134217728)}};Xf=function(e){if(e.tag===13){var t=cn(e),n=Wt(e,t);if(n!==null){var r=Ue();Ct(n,e,t,r)}du(e,t)}};Zf=function(){return oe};Jf=function(e,t){var n=oe;try{return oe=e,t()}finally{oe=n}};So=function(e,t,n){switch(t){case"input":if(go(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=ns(r);if(!i)throw Error(_(90));Pf(r),go(r,i)}}}break;case"textarea":Af(e,n);break;case"select":t=n.value,t!=null&&sr(e,!!n.multiple,t,!1)}};Ff=su;$f=Rn;var M1={usingClientEntryPoint:!1,Events:[Ei,Zn,ns,_f,Of,su]},Fr={findFiberByHostInstance:Cn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},L1={bundleType:Fr.bundleType,version:Fr.version,rendererPackageName:Fr.rendererPackageName,rendererConfig:Fr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hf(e),e===null?null:e.stateNode},findFiberByHostInstance:Fr.findFiberByHostInstance||I1,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 Ki=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ki.isDisabled&&Ki.supportsFiber)try{Zl=Ki.inject(L1),Mt=Ki}catch{}}ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M1;ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hu(t))throw Error(_(200));return P1(e,t,null,n)};ut.createRoot=function(e,t){if(!hu(e))throw Error(_(299));var n=!1,r="",i=wm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=cu(e,1,!1,null,null,n,!1,r,i),e[Vt]=t.current,hi(e.nodeType===8?e.parentNode:e),new fu(t)};ut.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(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=Hf(t),e=e===null?null:e.stateNode,e};ut.flushSync=function(e){return Rn(e)};ut.hydrate=function(e,t,n){if(!ds(t))throw Error(_(200));return fs(null,e,t,!0,n)};ut.hydrateRoot=function(e,t,n){if(!hu(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",s=wm;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=km(t,null,e,1,n??null,i,!1,l,s),e[Vt]=t.current,hi(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 cs(t)};ut.render=function(e,t,n){if(!ds(t))throw Error(_(200));return fs(null,e,t,!1,n)};ut.unmountComponentAtNode=function(e){if(!ds(e))throw Error(_(40));return e._reactRootContainer?(Rn(function(){fs(null,null,e,!1,function(){e._reactRootContainer=null,e[Vt]=null})}),!0):!1};ut.unstable_batchedUpdates=su;ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ds(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return fs(e,t,n,!1,r)};ut.version="18.3.1-next-f1338f8080-20240426";function bm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bm)}catch(e){console.error(e)}}bm(),bf.exports=ut;var Sm=bf.exports,R1,Kc=Sm;R1=Kc.createRoot,Kc.hydrateRoot;/**
41
- * @license lucide-react v0.460.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 D1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Cm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46
- * @license lucide-react v0.460.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 _1={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.460.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 O1=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:l,iconNode:s,...o},u)=>S.createElement("svg",{ref:u,..._1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Cm("lucide",i),...o},[...s.map(([d,c])=>S.createElement(d,c)),...Array.isArray(l)?l:[l]]));/**
56
- * @license lucide-react v0.460.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 q=(e,t)=>{const n=S.forwardRef(({className:r,...i},l)=>S.createElement(O1,{ref:l,iconNode:t,className:Cm(`lucide-${D1(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
61
- * @license lucide-react v0.460.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 na=q("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
66
- * @license lucide-react v0.460.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 F1=q("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
71
- * @license lucide-react v0.460.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 Gc=q("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
76
- * @license lucide-react v0.460.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 $1=q("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
81
- * @license lucide-react v0.460.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 jr=q("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
86
- * @license lucide-react v0.460.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 B1=q("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/**
91
- * @license lucide-react v0.460.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 hs=q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
96
- * @license lucide-react v0.460.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 Xc=q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
101
- * @license lucide-react v0.460.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 U1=q("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
106
- * @license lucide-react v0.460.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 H1=q("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
111
- * @license lucide-react v0.460.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 V1=q("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
116
- * @license lucide-react v0.460.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 ra=q("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
121
- * @license lucide-react v0.460.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 W1=q("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
126
- * @license lucide-react v0.460.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 Q1=q("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"}]]);/**
131
- * @license lucide-react v0.460.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 q1=q("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
136
- * @license lucide-react v0.460.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 Dn=q("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
141
- * @license lucide-react v0.460.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 mu=q("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"}]]);/**
146
- * @license lucide-react v0.460.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 Y1=q("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
151
- * @license lucide-react v0.460.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 ia=q("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
156
- * @license lucide-react v0.460.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 K1=q("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
161
- * @license lucide-react v0.460.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 G1=q("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
166
- * @license lucide-react v0.460.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 X1=q("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
171
- * @license lucide-react v0.460.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 En=q("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
176
- * @license lucide-react v0.460.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const Z1=q("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
181
- * @license lucide-react v0.460.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const J1=q("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
186
- * @license lucide-react v0.460.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const Zc=q("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
191
- * @license lucide-react v0.460.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const ex=q("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
196
- * @license lucide-react v0.460.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const jm=q("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"}]]);/**
201
- * @license lucide-react v0.460.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const tx=q("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
206
- * @license lucide-react v0.460.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const Bl=q("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
211
- * @license lucide-react v0.460.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const at=q("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
216
- * @license lucide-react v0.460.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const Nm=q("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
221
- * @license lucide-react v0.460.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const nx=q("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
226
- * @license lucide-react v0.460.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const Tt=q("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"}]]);/**
231
- * @license lucide-react v0.460.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const rx=q("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"}]]);/**
236
- * @license lucide-react v0.460.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const ix=q("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
241
- * @license lucide-react v0.460.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const Em=q("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
246
- * @license lucide-react v0.460.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const Jc=q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
251
- * @license lucide-react v0.460.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const Tm=q("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
256
- * @license lucide-react v0.460.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const lx=q("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
261
- * @license lucide-react v0.460.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const zm=q("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
266
- * @license lucide-react v0.460.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const kr=q("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
271
- * @license lucide-react v0.460.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const sx=q("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
276
- * @license lucide-react v0.460.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const Ul=q("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
281
- * @license lucide-react v0.460.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const Hl=q("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
286
- * @license lucide-react v0.460.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const ed=q("StickyNote",[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]]);/**
291
- * @license lucide-react v0.460.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const ox=q("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
296
- * @license lucide-react v0.460.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const ax=q("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
301
- * @license lucide-react v0.460.0 - ISC
302
- *
303
- * This source code is licensed under the ISC license.
304
- * See the LICENSE file in the root directory of this source tree.
305
- */const zi=q("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"}]]);/**
306
- * @license lucide-react v0.460.0 - ISC
307
- *
308
- * This source code is licensed under the ISC license.
309
- * See the LICENSE file in the root directory of this source tree.
310
- */const ux=q("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"}]]);/**
311
- * @license lucide-react v0.460.0 - ISC
312
- *
313
- * This source code is licensed under the ISC license.
314
- * See the LICENSE file in the root directory of this source tree.
315
- */const Bn=q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function pu(...e){return e.filter(Boolean).join(" ")}function fr(e){if(!e&&e!==0)return"";const t=typeof e=="number"?e:new Date(e).getTime();if(Number.isNaN(t))return"";const n=Date.now()-t;return n<0||n<6e4?"just now":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:n<7*864e5?`${Math.floor(n/864e5)}d ago`:new Date(t).toLocaleDateString()}function cx(e){if(!e)return"";const t=typeof e=="number"?new Date(e):new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString()}function RC(e,t=160){return e?e.length>t?e.slice(0,t)+"…":e:""}function DC(e,t=200){let n=null;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const dx={low:"var(--text-dim)",normal:"var(--info)",high:"var(--error)"};function _C(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n);return(t>>>0).toString(36)}function OC(e,t=!0){const n=(e||"").replace(/\r\n?/g,`
316
- `).trim();if(!n){if(!t)return"";const s=new Date,o=u=>String(u).padStart(2,"0");return`Untitled task — ${s.getFullYear()}-${o(s.getMonth()+1)}-${o(s.getDate())} ${o(s.getHours())}:${o(s.getMinutes())}`}const r=n.split(`
317
- `).map(s=>s.replace(/^[\s>#*\-]+/,"").trim()).find(s=>s.length>0)||"";if(!r){if(!t)return"";const s=new Date,o=u=>String(u).padStart(2,"0");return`Untitled task — ${s.getFullYear()}-${o(s.getMonth()+1)}-${o(s.getDate())} ${o(s.getHours())}:${o(s.getMinutes())}`}if(r.length<=60)return r;const i=r.slice(0,60),l=i.lastIndexOf(" ");return(l>20?i.slice(0,l):i).trimEnd()+"…"}const hl="bizar-auth-token",td="bizar-loopback-trusted";class nd extends Error{constructor(n,r,i){super(n);We(this,"status");We(this,"data");this.name="ApiError",this.status=r,this.data=i}}class fx{constructor(){We(this,"base","/api")}getToken(){try{return localStorage.getItem(hl)||""}catch{return""}}setToken(t){try{t?localStorage.setItem(hl,t):localStorage.removeItem(hl)}catch{}}urlWithToken(t){const n=this.base+t,r=this.getToken();if(!r)return n;const i=n.includes("?")?"&":"?";return`${n}${i}token=${encodeURIComponent(r)}`}async probeAuthStatus(){try{const t=await this.get("/auth/status");try{localStorage.setItem(td,t.loopback?"1":"0")}catch{}return t}catch{return{required:!1,loopback:!0,peer:""}}}isLoopbackTrusted(){try{return localStorage.getItem(td)!=="0"}catch{return!0}}async get(t){return this.req("GET",t)}async post(t,n){return this.req("POST",t,n)}async put(t,n){return this.req("PUT",t,n)}async patch(t,n){return this.req("PATCH",t,n)}async del(t){return this.req("DELETE",t)}async req(t,n,r){const i={"Content-Type":"application/json"},l=this.getToken();l&&(i.Authorization=`Bearer ${l}`);const s={method:t,headers:i};r!=null&&(s.body=typeof r=="string"?r:JSON.stringify(r));const o=await fetch(this.base+n,s);if((o.headers.get("content-type")||"").includes("application/json")){const c=await o.json();if(!o.ok){const f=(c&&typeof c=="object"&&"message"in c?c.message:void 0)||`${t} ${n}: ${o.status}`;throw new nd(f,o.status,c)}return c}const d=await o.text();if(!o.ok)throw new nd(`${t} ${n}: ${o.status} — ${d.slice(0,200)}`,o.status,d);try{return JSON.parse(d)}catch{return d}}}const W=new fx;async function hx(e){return e}const Pm=S.createContext(null),mx=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function px(){const e=S.useContext(Pm);return e||{open:()=>"",close:()=>{},isModalOpen:!1}}function FC({children:e}){const[t,n]=S.useState([]),r=S.useCallback(l=>{n(s=>{if(!l)return s.slice(0,-1);const o=s.findIndex(u=>u.id===l);return o===-1||o!==s.length-1?s:s.slice(0,-1)})},[]),i=S.useCallback(l=>{const s=`m${Math.random().toString(36).slice(2,9)}`;return n(o=>[...o,{...l,id:s}]),s},[]);return S.useEffect(()=>{if(t.length===0)return;const l=s=>{s.key==="Escape"&&(s.stopPropagation(),r())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[t.length,r]),a.jsxs(Pm.Provider,{value:{open:i,close:r,isModalOpen:t.length>0},children:[e,typeof document<"u"&&Sm.createPortal(a.jsx("div",{className:"modal-stack","aria-hidden":t.length===0,children:t.map((l,s)=>a.jsx(gx,{modal:l,onClose:()=>{var o;(o=l.onClose)==null||o.call(l),r(l.id)},depth:s},l.id))}),document.body)]})}function gx({modal:e,onClose:t,depth:n}){const r=S.useRef(null),i=S.useRef(null),l=S.useId(),s=()=>{const o=r.current;return o?Array.from(o.querySelectorAll(mx)).filter(u=>!u.hasAttribute("disabled")&&u.tabIndex!==-1):[]};return S.useEffect(()=>{var d;i.current=document.activeElement instanceof HTMLElement?document.activeElement:null,(d=s()[0]??r.current)==null||d.focus();const u=c=>{var x,k,g;if(c.key!=="Tab")return;const f=s();if(f.length===0){c.preventDefault(),(x=r.current)==null||x.focus();return}const h=f[0],m=f[f.length-1],p=document.activeElement instanceof HTMLElement?document.activeElement:null;if(c.shiftKey){(!p||p===h||!((k=r.current)!=null&&k.contains(p)))&&(c.preventDefault(),m.focus());return}(!p||p===m||!((g=r.current)!=null&&g.contains(p)))&&(c.preventDefault(),h.focus())};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u);const c=i.current;c&&c.isConnected&&c.focus()}},[]),a.jsx("div",{className:"modal-backdrop",onClick:o=>{o.stopPropagation(),o.target===o.currentTarget&&t()},style:n>0?{background:"rgba(0,0,0,0.4)"}:void 0,children:a.jsxs("div",{ref:r,className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":e.title?l:void 0,tabIndex:-1,onClick:o=>o.stopPropagation(),style:e.width?{maxWidth:e.width}:void 0,children:[e.title&&a.jsxs("header",{className:"modal-header",children:[a.jsx("h2",{id:l,className:"modal-title",children:e.title}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close",onClick:t,children:a.jsx(Bn,{size:16})})]}),a.jsx("div",{className:"modal-body",children:e.children}),e.footer&&a.jsx("footer",{className:"modal-footer",children:e.footer})]})})}const Vl=S.forwardRef(function({variant:t="secondary",size:n="md",iconOnly:r=!1,loading:i=!1,disabled:l,className:s,children:o,...u},d){return a.jsxs("button",{ref:d,type:u.type??"button",disabled:l||i,className:pu("btn",`btn-${t}`,`btn-size-${n}`,r&&"btn-icon",i&&"btn-loading",s),...u,children:[i?a.jsx("span",{className:"btn-spinner","aria-hidden":!0}):null,o]})}),Im=S.createContext(null);function yx(){const e=S.useContext(Im);return e||{show:()=>{},info:()=>{},success:()=>{},error:()=>{},warning:()=>{},dismiss:()=>{},toasts:[]}}const xx={info:G1,success:H1,error:U1,warning:ux};function $C({children:e}){const[t,n]=S.useState([]),r=S.useRef(1),i=S.useRef(new Map),l=S.useCallback(u=>{n(c=>c.filter(f=>f.id!==u));const d=i.current.get(u);d&&(clearTimeout(d),i.current.delete(u))},[]),s=S.useCallback((u,d="info",c=4e3)=>{const f=r.current++;if(n(h=>[...h,{id:f,kind:d,message:u}]),c>0){const h=setTimeout(()=>l(f),c);i.current.set(f,h)}},[l]);S.useEffect(()=>()=>{for(const u of i.current.values())clearTimeout(u);i.current.clear()},[]);const o=S.useMemo(()=>({show:s,info:(u,d)=>s(u,"info",d),success:(u,d)=>s(u,"success",d),error:(u,d)=>s(u,"error",d),warning:(u,d)=>s(u,"warning",d),dismiss:l,toasts:t}),[s,l,t]);return a.jsxs(Im.Provider,{value:o,children:[e,a.jsx(vx,{toasts:t,onDismiss:l})]})}function vx({toasts:e,onDismiss:t}){return a.jsx("div",{className:"toast-stack","aria-live":"polite",children:e.map(n=>a.jsx(kx,{toast:n,onDismiss:t},n.id))})}function kx({toast:e,onDismiss:t}){const n=xx[e.kind];return a.jsxs("div",{className:`toast toast-${e.kind}`,role:"status",children:[a.jsx(n,{size:16,className:"toast-icon"}),a.jsx("span",{className:"toast-message",children:e.message}),a.jsx("button",{type:"button",className:"toast-close","aria-label":"Dismiss",onClick:()=>t(e.id),children:a.jsx(Bn,{size:14})})]})}function wx(){if(typeof location>"u")return"ws://localhost/ws";const e=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws`;let t="";try{t=localStorage.getItem(hl)||""}catch{}return t?`${e}?token=${encodeURIComponent(t)}`:e}class Am{constructor(t){We(this,"urlOverride");We(this,"handlers",new Set);We(this,"statusHandlers",new Set);We(this,"ws",null);We(this,"reconnectDelay",1e3);We(this,"maxReconnectDelay",15e3);We(this,"reconnectTimer",null);We(this,"_status","connecting");We(this,"pingTimer",null);We(this,"closed",!1);this.urlOverride=t,this.connect()}on(t){return this.handlers.add(t),()=>{this.handlers.delete(t)}}onStatus(t){return this.statusHandlers.add(t),t(this._status),()=>{this.statusHandlers.delete(t)}}get status(){return this._status}send(t){return this.ws&&this.ws.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(t)),!0):!1}close(){var t;this.closed=!0,this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=null;try{(t=this.ws)==null||t.close()}catch{}this.ws=null,this.setStatus("disconnected")}connect(){if(this.closed)return;this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.setStatus("connecting");const t=this.urlOverride??wx();let n;try{n=new WebSocket(t),this.ws=n}catch(r){console.warn("[ws] construct failed:",r),this.scheduleReconnect();return}n.addEventListener("open",()=>{this.ws!==n||this.closed||(this.reconnectDelay=1e3,this.setStatus("connected"),this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=setInterval(()=>{this._status==="connected"&&this.send({type:"ping"})},3e4))}),n.addEventListener("close",()=>{this.ws===n&&(this.ws=null,this.setStatus("disconnected"),this.pingTimer&&(clearInterval(this.pingTimer),this.pingTimer=null),this.closed||this.scheduleReconnect())}),n.addEventListener("error",()=>{this.ws===n&&console.warn("[ws] error")}),n.addEventListener("message",r=>{let i;try{i=JSON.parse(r.data)}catch{console.warn("[ws] bad message");return}for(const l of this.handlers)try{l(i)}catch(s){console.error("[ws] handler error:",s)}})}scheduleReconnect(){this.closed||this.reconnectTimer||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*1.6,this.maxReconnectDelay))}setStatus(t){this._status=t;for(const n of this.statusHandlers)try{n(t)}catch(r){console.error("[ws] status handler error:",r)}}}const bx=Object.freeze(Object.defineProperty({__proto__:null,Ws:Am},Symbol.toStringTag,{value:"Module"}));function Wl(e){const t=typeof e=="string"?e:e.mode,n=t==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":t==="light"?"light":"dark";return typeof document<"u"&&(n==="light"?document.documentElement.setAttribute("data-theme","light"):document.documentElement.removeAttribute("data-theme")),n}function ti(e){if(typeof document>"u")return;const t=document.documentElement;t.style.setProperty("--accent",e.accent),t.style.setProperty("--success",e.success),t.style.setProperty("--warning",e.warning),t.style.setProperty("--error",e.error),t.style.setProperty("--info",e.info),t.style.setProperty("--accent-bg",rd(e.accent,.12)),t.style.setProperty("--accent-border",rd(e.accent,.4)),e.fontFamily&&t.style.setProperty("--font-sans",`'${e.fontFamily}', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif`),e.fontSize&&t.style.setProperty("--base-font-size",`${e.fontSize}px`),t.dataset.compactMode=e.compactMode?"true":"false",t.dataset.animations=e.animations?"true":"false"}function rd(e,t){const n=/^#?([0-9a-f]{6})$/i.exec(e||"");if(!n)return`rgba(139, 92, 246, ${t})`;const r=parseInt(n[1],16),i=r>>16&255,l=r>>8&255,s=r&255;return`rgba(${i}, ${l}, ${s}, ${t})`}function Mm({size:e="md",className:t,label:n}){return a.jsx("span",{className:pu("spinner",`spinner-${e}`,t),role:"status","aria-label":n||"Loading"})}function Sx({activeProject:e,sessionCount:t,sessionsOpen:n,infoOpen:r,onToggleSessions:i,onToggleInfo:l,onOpenOverview:s}){return a.jsxs("header",{className:"chat-topbar",children:[a.jsxs("button",{type:"button",className:"chat-topbar-project",onClick:s,children:[a.jsx(mu,{size:14}),a.jsx("span",{className:"chat-topbar-project-name",children:(e==null?void 0:e.name)??"No project"}),a.jsx(hs,{size:12})]}),a.jsx("div",{className:"chat-topbar-spacer"}),a.jsxs("button",{type:"button",className:`chat-topbar-btn ${n?"active":""}`,onClick:i,"aria-pressed":n,children:["Sessions (",t,")"]}),a.jsx("button",{type:"button",className:`chat-topbar-btn ${r?"active":""}`,onClick:l,"aria-pressed":r,children:"Info"})]})}function Cx({icon:e,title:t,message:n,action:r}){return a.jsxs("div",{className:"chat-empty-state",children:[e&&a.jsx("div",{className:"chat-empty-state-icon",children:e}),a.jsx("h2",{className:"chat-empty-state-title",children:t}),a.jsx("p",{className:"chat-empty-state-message",children:n}),r&&a.jsx("div",{className:"chat-empty-state-action",children:r})]})}function jx({sessions:e,opencodeSessions:t,activeSessionId:n,activeProject:r,creating:i,onCreateSession:l,onSelectSession:s}){const[o,u]=S.useState("all"),[d,c]=S.useState(!1),f=30,h=o==="all"?[...e,...t].sort((k,g)=>Number(g.mtime)-Number(k.mtime)):e,m=d?h:h.slice(0,f),p=t.length,x=k=>{if(k.source==="opencode"&&k.opencodeUrl){window.open(k.opencodeUrl,"_blank","noopener,noreferrer");return}s(k.id)};return a.jsxs("div",{className:"chat-sessions",children:[a.jsxs("div",{className:"chat-sessions-header",children:[a.jsx("span",{className:"chat-sessions-header-title",children:"Sessions"}),a.jsx("span",{className:"chat-sessions-count",children:m.length})]}),p>0&&a.jsxs("div",{className:"chat-sessions-toggle",children:[a.jsx("button",{type:"button",className:`chat-sessions-toggle-btn ${o==="bizar"?"active":""}`,onClick:()=>u("bizar"),children:"Bizar"}),a.jsxs("button",{type:"button",className:`chat-sessions-toggle-btn ${o==="all"?"active":""}`,onClick:()=>u("all"),children:["All (",p," opencode)"]})]}),a.jsxs("button",{type:"button",className:"chat-sessions-new",onClick:l,disabled:i||!r,title:r?"Create new session":"Pick a project first","aria-label":"Create new session",children:[i?a.jsx(Mm,{size:"sm"}):a.jsx(at,{size:14}),a.jsx("span",{children:i?"Creating…":"New session"})]}),e.length===0?a.jsx("div",{className:"chat-sessions-empty",children:a.jsx(Cx,{icon:a.jsx(Ul,{size:20}),title:r?"No sessions yet":"No project",message:r?"Create your first session to start chatting.":"Pick a project in Overview to scope chat sessions.",action:r?a.jsxs(Vl,{variant:"primary",size:"sm",onClick:l,loading:i,children:[a.jsx(at,{size:12})," New session"]}):a.jsxs(Vl,{variant:"secondary",size:"sm",onClick:()=>{window.location.hash="#overview"},children:[a.jsx(mu,{size:12})," Open Overview"]})})}):a.jsx("ul",{className:"chat-sessions-list",children:m.map(k=>{const g=k.source!=="opencode"&&n===k.id,y=k.source==="opencode";return a.jsxs("li",{className:`chat-sessions-item ${g?"active":""} ${y?"chat-sessions-item-opencode":""}`,onClick:()=>x(k),title:y?`Open in opencode UI: ${k.title||k.id}`:k.id,children:[y&&a.jsx(q1,{size:10,className:"chat-sessions-item-icon"}),a.jsx("span",{className:"chat-sessions-item-id",children:k.title||k.id}),a.jsx("span",{className:"chat-sessions-item-meta",children:new Date(Number(k.mtime)).toLocaleDateString()})]},y?`oc-${k.id}`:k.id)})}),h.length>f&&a.jsx("button",{type:"button",className:"chat-sessions-show-more",onClick:()=>c(k=>!k),children:d?`Show less (${h.length-f} hidden)`:`Show all ${h.length} sessions`})]})}function Nx({count:e=3}){return a.jsx("div",{className:"chat-loading-skeleton","aria-label":"Loading messages",children:Array.from({length:e}).map((t,n)=>a.jsxs("div",{className:"chat-loading-skeleton-bubble",children:[a.jsx("div",{className:"chat-loading-skeleton-meta"}),a.jsx("div",{className:"chat-loading-skeleton-line"}),a.jsx("div",{className:"chat-loading-skeleton-line short"})]},n))})}function Ex({projectName:e,onPickSuggestion:t}){const n=[{icon:a.jsx(W1,{size:16}),title:e?`Explain ${e}`:"Explain this project",preview:"Give me a tour of the codebase, highlight the architecture, and call out any anti-patterns or hotspots.",prompt:e?`Explain the ${e} project. Give me a tour of the codebase, highlight the architecture, and call out any anti-patterns or hotspots.`:"Explain the current project. Give me a tour of the codebase, highlight the architecture, and call out any anti-patterns or hotspots."},{icon:a.jsx($1,{size:16}),title:"Summarize recent sessions",preview:"Read my last 5 chat sessions and give me a 3-bullet summary of what I worked on and what got stuck.",prompt:"Read my last 5 chat sessions and give me a 3-bullet summary of what I worked on and what got stuck."},{icon:a.jsx(X1,{size:16}),title:"Suggest a refactor",preview:"Look for the largest, most painful files in this project and propose a concrete refactor for the worst one.",prompt:"Look for the largest, most painful files in this project and propose a concrete refactor for the worst one."},{icon:a.jsx(K1,{size:16}),title:"Find visual regressions",preview:"Open the dashboard, screenshot the Chat tab, and flag any layout problems or anti-patterns you see.",prompt:"Open the dashboard, screenshot the Chat tab, and flag any layout problems or anti-patterns you see."}];return a.jsx("div",{className:"chat-suggestions",children:n.map((r,i)=>a.jsxs("button",{type:"button",className:"chat-suggestion",onClick:()=>t(r.prompt),children:[a.jsxs("div",{className:"chat-suggestion-title",children:[r.icon,a.jsx("span",{children:r.title})]}),a.jsx("div",{className:"chat-suggestion-preview",children:r.preview})]},i))})}function id({variant:e,projectName:t,onPickSuggestion:n}){if(e==="no-project")return a.jsxs("div",{className:"chat-welcome",children:[a.jsx("h1",{className:"chat-welcome-h1",children:a.jsx("span",{className:"chat-greeting-hello",children:"No project selected."})}),a.jsx("p",{className:"chat-welcome-subtitle",children:"Pick a project in Overview to scope chat sessions."})]});const r=t||"there";return a.jsxs("div",{className:"chat-welcome",children:[a.jsxs("h1",{className:"chat-welcome-h1",children:[a.jsx("span",{className:"chat-greeting-hello",children:"Hello, "}),a.jsxs("span",{className:"chat-greeting-name",children:[r,"."]})]}),a.jsx("p",{className:"chat-welcome-subtitle",children:"How can I help you today?"}),a.jsx(Ex,{projectName:t,onPickSuggestion:n})]})}function Tx(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Px=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ix={};function ld(e,t){return(Ix.jsx?Px:zx).test(e)}const Ax=/[ \t\n\f\r]/g;function Mx(e){return typeof e=="object"?e.type==="text"?sd(e.value):!1:sd(e)}function sd(e){return e.replace(Ax,"")===""}class Pi{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Pi.prototype.normal={};Pi.prototype.property={};Pi.prototype.space=void 0;function Lm(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Pi(n,r,t)}function la(e){return e.toLowerCase()}class Ze{constructor(t,n){this.attribute=n,this.property=t}}Ze.prototype.attribute="";Ze.prototype.booleanish=!1;Ze.prototype.boolean=!1;Ze.prototype.commaOrSpaceSeparated=!1;Ze.prototype.commaSeparated=!1;Ze.prototype.defined=!1;Ze.prototype.mustUseProperty=!1;Ze.prototype.number=!1;Ze.prototype.overloadedBoolean=!1;Ze.prototype.property="";Ze.prototype.spaceSeparated=!1;Ze.prototype.space=void 0;let Lx=0;const Y=Un(),Ce=Un(),sa=Un(),O=Un(),ce=Un(),Pn=Un(),nt=Un();function Un(){return 2**++Lx}const oa=Object.freeze(Object.defineProperty({__proto__:null,boolean:Y,booleanish:Ce,commaOrSpaceSeparated:nt,commaSeparated:Pn,number:O,overloadedBoolean:sa,spaceSeparated:ce},Symbol.toStringTag,{value:"Module"})),Qs=Object.keys(oa);class gu extends Ze{constructor(t,n,r,i){let l=-1;if(super(t,n),od(this,"space",i),typeof r=="number")for(;++l<Qs.length;){const s=Qs[l];od(this,Qs[l],(r&oa[s])===oa[s])}}}gu.prototype.defined=!0;function od(e,t,n){n&&(e[t]=n)}function Nr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new gu(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[la(r)]=r,n[la(l.attribute)]=r}return new Pi(t,n,e.space)}const Rm=Nr({properties:{ariaActiveDescendant:null,ariaAtomic:Ce,ariaAutoComplete:null,ariaBusy:Ce,ariaChecked:Ce,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:ce,ariaCurrent:null,ariaDescribedBy:ce,ariaDetails:null,ariaDisabled:Ce,ariaDropEffect:ce,ariaErrorMessage:null,ariaExpanded:Ce,ariaFlowTo:ce,ariaGrabbed:Ce,ariaHasPopup:null,ariaHidden:Ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ce,ariaLevel:O,ariaLive:null,ariaModal:Ce,ariaMultiLine:Ce,ariaMultiSelectable:Ce,ariaOrientation:null,ariaOwns:ce,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:Ce,ariaReadOnly:Ce,ariaRelevant:null,ariaRequired:Ce,ariaRoleDescription:ce,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:Ce,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Dm(e,t){return t in e?e[t]:t}function _m(e,t){return Dm(e,t.toLowerCase())}const Rx=Nr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pn,acceptCharset:ce,accessKey:ce,action:null,allow:null,allowFullScreen:Y,allowPaymentRequest:Y,allowUserMedia:Y,alpha:Y,alt:null,as:null,async:Y,autoCapitalize:null,autoComplete:ce,autoFocus:Y,autoPlay:Y,blocking:ce,capture:null,charSet:null,checked:Y,cite:null,className:ce,closedBy:null,colorSpace:null,cols:O,colSpan:O,command:null,commandFor:null,content:null,contentEditable:Ce,controls:Y,controlsList:ce,coords:O|Pn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Y,defer:Y,dir:null,dirName:null,disabled:Y,download:sa,draggable:Ce,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Y,formTarget:null,headers:ce,height:O,hidden:sa,high:O,href:null,hrefLang:null,htmlFor:ce,httpEquiv:ce,id:null,imageSizes:null,imageSrcSet:null,inert:Y,inputMode:null,integrity:null,is:null,isMap:Y,itemId:null,itemProp:ce,itemRef:ce,itemScope:Y,itemType:ce,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Y,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:Y,muted:Y,name:null,nonce:null,noModule:Y,noValidate:Y,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:Y,optimum:O,pattern:null,ping:ce,placeholder:null,playsInline:Y,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Y,referrerPolicy:null,rel:ce,required:Y,reversed:Y,rows:O,rowSpan:O,sandbox:ce,scope:null,scoped:Y,seamless:Y,selected:Y,shadowRootClonable:Y,shadowRootCustomElementRegistry:Y,shadowRootDelegatesFocus:Y,shadowRootMode:null,shadowRootSerializable:Y,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:Ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:Y,useMap:null,value:Ce,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ce,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Y,declare:Y,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:Y,noHref:Y,noShade:Y,noWrap:Y,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:Ce,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Y,disablePictureInPicture:Y,disableRemotePlayback:Y,exportParts:Pn,part:ce,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:_m}),Dx=Nr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:nt,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:ce,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:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:Y,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,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:Pn,g2:Pn,glyphName:Pn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:nt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,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:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ce,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nt,rev:nt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nt,requiredFeatures:nt,requiredFonts:nt,requiredFormats:nt,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:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:nt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nt,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dm}),Om=Nr({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()}}),Fm=Nr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_m}),$m=Nr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_x={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"},Ox=/[A-Z]/g,ad=/-[a-z]/g,Fx=/^data[-\w.:]+$/i;function $x(e,t){const n=la(t);let r=t,i=Ze;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Fx.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(ad,Ux);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!ad.test(l)){let s=l.replace(Ox,Bx);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=gu}return new i(r,t)}function Bx(e){return"-"+e.toLowerCase()}function Ux(e){return e.charAt(1).toUpperCase()}const Hx=Lm([Rm,Rx,Om,Fm,$m],"html"),yu=Lm([Rm,Dx,Om,Fm,$m],"svg");function Vx(e){return e.join(" ").trim()}var xu={},ud=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Wx=/\n/g,Qx=/^\s*/,qx=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Yx=/^:\s*/,Kx=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Gx=/^[;\s]*/,Xx=/^\s+|\s+$/g,Zx=`
318
- `,cd="/",dd="*",Sn="",Jx="comment",ev="declaration";function tv(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(p){var x=p.match(Wx);x&&(n+=x.length);var k=p.lastIndexOf(Zx);r=~k?p.length-k:r+p.length}function l(){var p={line:n,column:r};return function(x){return x.position=new s(p),d(),x}}function s(p){this.start=p,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function o(p){var x=new Error(t.source+":"+n+":"+r+": "+p);if(x.reason=p,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(p){var x=p.exec(e);if(x){var k=x[0];return i(k),e=e.slice(k.length),x}}function d(){u(Qx)}function c(p){var x;for(p=p||[];x=f();)x!==!1&&p.push(x);return p}function f(){var p=l();if(!(cd!=e.charAt(0)||dd!=e.charAt(1))){for(var x=2;Sn!=e.charAt(x)&&(dd!=e.charAt(x)||cd!=e.charAt(x+1));)++x;if(x+=2,Sn===e.charAt(x-1))return o("End of comment missing");var k=e.slice(2,x-2);return r+=2,i(k),e=e.slice(x),r+=2,p({type:Jx,comment:k})}}function h(){var p=l(),x=u(qx);if(x){if(f(),!u(Yx))return o("property missing ':'");var k=u(Kx),g=p({type:ev,property:fd(x[0].replace(ud,Sn)),value:k?fd(k[0].replace(ud,Sn)):Sn});return u(Gx),g}}function m(){var p=[];c(p);for(var x;x=h();)x!==!1&&(p.push(x),c(p));return p}return d(),m()}function fd(e){return e?e.replace(Xx,Sn):Sn}var nv=tv,rv=gl&&gl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xu,"__esModule",{value:!0});xu.default=lv;const iv=rv(nv);function lv(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,iv.default)(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:s,value:o}=l;i?t(s,o,l):o&&(n=n||{},n[s]=o)}),n}var ms={};Object.defineProperty(ms,"__esModule",{value:!0});ms.camelCase=void 0;var sv=/^--[a-zA-Z0-9_-]+$/,ov=/-([a-z])/g,av=/^[^-]+$/,uv=/^-(webkit|moz|ms|o|khtml)-/,cv=/^-(ms)-/,dv=function(e){return!e||av.test(e)||sv.test(e)},fv=function(e,t){return t.toUpperCase()},hd=function(e,t){return"".concat(t,"-")},hv=function(e,t){return t===void 0&&(t={}),dv(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(cv,hd):e=e.replace(uv,hd),e.replace(ov,fv))};ms.camelCase=hv;var mv=gl&&gl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},pv=mv(xu),gv=ms;function aa(e,t){var n={};return!e||typeof e!="string"||(0,pv.default)(e,function(r,i){r&&i&&(n[(0,gv.camelCase)(r,t)]=i)}),n}aa.default=aa;var yv=aa;const xv=va(yv),Bm=Um("end"),vu=Um("start");function Um(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 vv(e){const t=vu(e),n=Bm(e);if(t&&n)return{start:t,end:n}}function ni(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?md(e.position):"start"in e||"end"in e?md(e):"line"in e||"column"in e?ua(e):""}function ua(e){return pd(e&&e.line)+":"+pd(e&&e.column)}function md(e){return ua(e&&e.start)+"-"+ua(e&&e.end)}function pd(e){return e&&typeof e=="number"?e:1}class Fe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},s=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(s=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const o=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=ni(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=s&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Fe.prototype.file="";Fe.prototype.name="";Fe.prototype.reason="";Fe.prototype.message="";Fe.prototype.stack="";Fe.prototype.column=void 0;Fe.prototype.line=void 0;Fe.prototype.ancestors=void 0;Fe.prototype.cause=void 0;Fe.prototype.fatal=void 0;Fe.prototype.place=void 0;Fe.prototype.ruleId=void 0;Fe.prototype.source=void 0;const ku={}.hasOwnProperty,kv=new Map,wv=/[A-Z]/g,bv=new Set(["table","tbody","thead","tfoot","tr"]),Sv=new Set(["td","th"]),Hm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Cv(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=Av(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=Iv(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"?yu:Hx,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Vm(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Vm(e,t,n){if(t.type==="element")return jv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Nv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Tv(e,t,n);if(t.type==="mdxjsEsm")return Ev(e,t);if(t.type==="root")return zv(e,t,n);if(t.type==="text")return Pv(e,t)}function jv(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=yu,e.schema=i),e.ancestors.push(t);const l=Qm(e,t.tagName,!1),s=Mv(e,t);let o=bu(e,t);return bv.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Mx(u):!0})),Wm(e,s,l,t),wu(s,o),e.ancestors.pop(),e.schema=r,e.create(t,l,s,n)}function Nv(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)}bi(e,t.position)}function Ev(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bi(e,t.position)}function Tv(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=yu,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Qm(e,t.name,!0),s=Lv(e,t),o=bu(e,t);return Wm(e,s,l,t),wu(s,o),e.ancestors.pop(),e.schema=r,e.create(t,l,s,n)}function zv(e,t,n){const r={};return wu(r,bu(e,t)),e.create(t,e.Fragment,r,n)}function Pv(e,t){return t.value}function Wm(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function wu(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Iv(e,t,n){return r;function r(i,l,s,o){const d=Array.isArray(s.children)?n:t;return o?d(l,s,o):d(l,s)}}function Av(e,t){return n;function n(r,i,l,s){const o=Array.isArray(l.children),u=vu(r);return t(i,l,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Mv(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ku.call(t.properties,i)){const l=Rv(e,i,t.properties[i]);if(l){const[s,o]=l;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&Sv.has(t.tagName)?r=o:n[s]=o}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Lv(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const s=l.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else bi(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,l=e.evaluater.evaluateExpression(o.expression)}else bi(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function bu(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:kv;for(;++r<t.children.length;){const l=t.children[r];let s;if(e.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const d=i.get(u)||0;s=u+"-"+d,i.set(u,d+1)}}const o=Vm(e,l,s);o!==void 0&&n.push(o)}return n}function Rv(e,t,n){const r=$x(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Tx(n):Vx(n)),r.property==="style"){let i=typeof n=="object"?n:Dv(e,String(n));return e.stylePropertyNameCase==="css"&&(i=_v(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?_x[r.property]||r.property:r.attribute,n]}}function Dv(e,t){try{return xv(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Fe("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=Hm+"#cannot-parse-style-attribute",i}}function Qm(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,s;for(;++l<i.length;){const o=ld(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(l&&o.type==="Literal"),optional:!1}:o}r=s}else r=ld(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ku.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);bi(e)}function bi(e,t){const n=new Fe("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=Hm+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _v(e){const t={};let n;for(n in e)ku.call(e,n)&&(t[Ov(n)]=e[n]);return t}function Ov(e){let t=e.replace(wv,Fv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Fv(e){return"-"+e.toLowerCase()}const qs={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"]},$v={};function Su(e,t){const n=$v,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return qm(e,r,i)}function qm(e,t,n){if(Bv(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 gd(e.children,t,n)}return Array.isArray(e)?gd(e,t,n):""}function gd(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=qm(e[i],t,n);return r.join("")}function Bv(e){return!!(e&&typeof e=="object")}const yd=document.createElement("i");function Cu(e){const t="&"+e+";";yd.innerHTML=t;const n=yd.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 l=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);l<r.length;)s=r.slice(l,l+1e4),s.unshift(t,0),e.splice(...s),l+=1e4,t+=1e4}function ht(e,t){return e.length>0?(st(e,e.length,0,t),e):t}const xd={}.hasOwnProperty;function Ym(e){const t={};let n=-1;for(;++n<e.length;)Uv(t,e[n]);return t}function Uv(e,t){let n;for(n in t){const i=(xd.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let s;if(l)for(s in l){xd.call(i,s)||(i[s]=[]);const o=l[s];Hv(i[s],Array.isArray(o)?o:o?[o]:[])}}}function Hv(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 Km(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 jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Be=yn(/[A-Za-z]/),_e=yn(/[\dA-Za-z]/),Vv=yn(/[#-'*+\--9=?A-Z^-~]/);function Ql(e){return e!==null&&(e<32||e===127)}const ca=yn(/\d/),Wv=yn(/[\dA-Fa-f]/),Qv=yn(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function de(e){return e!==null&&(e<0||e===32)}function te(e){return e===-2||e===-1||e===32}const ps=yn(new RegExp("\\p{P}|\\p{S}","u")),_n=yn(/\s/);function yn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Er(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let s="";if(l===37&&_e(e.charCodeAt(n+1))&&_e(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(s=String.fromCharCode(l));else if(l>55295&&l<57344){const o=e.charCodeAt(n+1);l<56320&&o>56319&&o<57344?(s=String.fromCharCode(l,o),i=1):s="�"}else s=String.fromCharCode(l);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 le(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return s;function s(u){return te(u)?(e.enter(n),o(u)):t(u)}function o(u){return te(u)&&l++<i?(e.consume(u),o):(e.exit(n),t(u))}}const qv={tokenize:Yv};function Yv(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),le(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),l(o)}function l(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Q(o)?(e.consume(o),e.exit("chunkText"),l):(e.consume(o),s)}}const Kv={tokenize:Gv},vd={tokenize:Xv};function Gv(e){const t=this,n=[];let r=0,i,l,s;return o;function o(v){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,u,d)(v)}return d(v)}function u(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const C=t.events.length;let z=C,N;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){N=t.events[z][1].end;break}g(r);let A=C;for(;A<t.events.length;)t.events[A][1].end={...N},A++;return st(t.events,z+1,0,t.events.slice(C)),t.events.length=A,d(v)}return o(v)}function d(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vd,c,f)(v)}function c(v){return i&&y(),g(r),h(v)}function f(v){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,p(v)}function h(v){return t.containerState={},e.attempt(vd,m,p)(v)}function m(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function p(v){if(v===null){i&&y(),g(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),x(v)}function x(v){if(v===null){k(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return Q(v)?(e.consume(v),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(v),x)}function k(v,C){const z=t.sliceStream(v);if(C&&z.push(null),v.previous=l,l&&(l.next=v),l=v,i.defineSkip(v.start),i.write(z),t.parser.lazy[v.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<s&&(!i.events[N][1].end||i.events[N][1].end.offset>s))return;const A=t.events.length;let R=A,T,w;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(T){w=t.events[R][1].end;break}T=!0}for(g(r),N=A;N<t.events.length;)t.events[N][1].end={...w},N++;st(t.events,R+1,0,t.events.slice(A)),t.events.length=N}}function g(v){let C=n.length;for(;C-- >v;){const z=n[C];t.containerState=z[1],z[0].exit.call(t,e)}n.length=v}function y(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Xv(e,t,n){return le(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wr(e){if(e===null||de(e)||_n(e))return 1;if(ps(e))return 2}function gs(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const da={name:"attention",resolveAll:Zv,tokenize:Jv};function Zv(e,t){let n=-1,r,i,l,s,o,u,d,c;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;u=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 f={...e[r][1].end},h={...e[n][1].start};kd(f,-u),kd(h,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=ht(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=ht(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",l,t]]),d=ht(d,gs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=ht(d,[["exit",l,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,d=ht(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,st(e,r-1,n-r+3,d),n=r+d.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Jv(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=wr(r);let l;return s;function s(u){return l=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===l)return e.consume(u),o;const d=e.exit("attentionSequence"),c=wr(u),f=!c||c===2&&i||n.includes(u),h=!i||i===2&&c||n.includes(r);return d._open=!!(l===42?f:f&&(i||!h)),d._close=!!(l===42?h:h&&(c||!f)),t(u)}}function kd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const e0={name:"autolink",tokenize:t0};function t0(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(m){return Be(m)?(e.consume(m),s):m===64?n(m):d(m)}function s(m){return m===43||m===45||m===46||_e(m)?(r=1,o(m)):d(m)}function o(m){return m===58?(e.consume(m),r=0,u):(m===43||m===45||m===46||_e(m))&&r++<32?(e.consume(m),o):(r=0,d(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Ql(m)?n(m):(e.consume(m),u)}function d(m){return m===64?(e.consume(m),c):Vv(m)?(e.consume(m),d):n(m)}function c(m){return _e(m)?f(m):n(m)}function f(m){return m===46?(e.consume(m),r=0,c):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):h(m)}function h(m){if((m===45||_e(m))&&r++<63){const p=m===45?h:f;return e.consume(m),p}return n(m)}}const Ii={partial:!0,tokenize:n0};function n0(e,t,n){return r;function r(l){return te(l)?le(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||Q(l)?t(l):n(l)}}const Gm={continuation:{tokenize:i0},exit:l0,name:"blockQuote",tokenize:r0};function r0(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),l}return n(s)}function l(s){return te(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function i0(e,t,n){const r=this;return i;function i(s){return te(s)?le(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):l(s)}function l(s){return e.attempt(Gm,t,n)(s)}}function l0(e){e.exit("blockQuote")}const Xm={name:"characterEscape",tokenize:s0};function s0(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Qv(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Zm={name:"characterReference",tokenize:o0};function o0(e,t,n){const r=this;let i=0,l,s;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),l=31,s=_e,c(f))}function d(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,s=Wv,c):(e.enter("characterReferenceValue"),l=7,s=ca,c(f))}function c(f){if(f===59&&i){const h=e.exit("characterReferenceValue");return s===_e&&!Cu(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<l?(e.consume(f),c):n(f)}}const wd={partial:!0,tokenize:u0},bd={concrete:!0,name:"codeFenced",tokenize:a0};function a0(e,t,n){const r=this,i={partial:!0,tokenize:z};let l=0,s=0,o;return u;function u(N){return d(N)}function d(N){const A=r.events[r.events.length-1];return l=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,o=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(N)}function c(N){return N===o?(s++,e.consume(N),c):s<3?n(N):(e.exit("codeFencedFenceSequence"),te(N)?le(e,f,"whitespace")(N):f(N))}function f(N){return N===null||Q(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(wd,x,C)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(N))}function h(N){return N===null||Q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(N)):te(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),le(e,m,"whitespace")(N)):N===96&&N===o?n(N):(e.consume(N),h)}function m(N){return N===null||Q(N)?f(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||Q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(N)):N===96&&N===o?n(N):(e.consume(N),p)}function x(N){return e.attempt(i,C,k)(N)}function k(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),g}function g(N){return l>0&&te(N)?le(e,y,"linePrefix",l+1)(N):y(N)}function y(N){return N===null||Q(N)?e.check(wd,x,C)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||Q(N)?(e.exit("codeFlowValue"),y(N)):(e.consume(N),v)}function C(N){return e.exit("codeFenced"),t(N)}function z(N,A,R){let T=0;return w;function w(I){return N.enter("lineEnding"),N.consume(I),N.exit("lineEnding"),j}function j(I){return N.enter("codeFencedFence"),te(I)?le(N,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):P(I)}function P(I){return I===o?(N.enter("codeFencedFenceSequence"),L(I)):R(I)}function L(I){return I===o?(T++,N.consume(I),L):T>=s?(N.exit("codeFencedFenceSequence"),te(I)?le(N,F,"whitespace")(I):F(I)):R(I)}function F(I){return I===null||Q(I)?(N.exit("codeFencedFence"),A(I)):R(I)}}}function u0(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"),l)}function l(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ys={name:"codeIndented",tokenize:d0},c0={partial:!0,tokenize:f0};function d0(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),le(e,l,"linePrefix",5)(d)}function l(d){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?u(d):Q(d)?e.attempt(c0,s,u)(d):(e.enter("codeFlowValue"),o(d))}function o(d){return d===null||Q(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),o)}function u(d){return e.exit("codeIndented"),t(d)}}function f0(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Q(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):le(e,l,"linePrefix",5)(s)}function l(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):Q(s)?i(s):n(s)}}const h0={name:"codeText",previous:p0,resolve:m0,tokenize:g0};function m0(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 p0(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function g0(e,t,n){let r=0,i,l;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(l=e.enter("codeTextSequence"),i=0,c(f)):Q(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||Q(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),d)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(l.type="codeTextData",d(f))}}class y0{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 l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&$r(this.left,r),l.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),$r(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),$r(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);$r(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);$r(this.left,n.reverse())}}}function $r(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 Jm(e){const t={};let n=-1,r,i,l,s,o,u,d;const c=new y0(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,x0(c,n)),n=t[n],d=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(s=c.get(l),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=l);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},o=c.slice(i,n),o.unshift(r),c.splice(i,n-i+1,o))}}return st(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!d}function x0(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,u=[],d={};let c,f,h=-1,m=n,p=0,x=0;const k=[x];for(;m;){for(;e.get(++i)[1]!==m;);l.push(i),m._tokenizer||(c=r.sliceStream(m),m.next||c.push(null),f&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=n;++h<o.length;)o[h][0]==="exit"&&o[h-1][0]==="enter"&&o[h][1].type===o[h-1][1].type&&o[h][1].start.line!==o[h][1].end.line&&(x=h+1,k.push(x),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):k.pop(),h=k.length;h--;){const g=o.slice(k[h],k[h+1]),y=l.pop();u.push([y,y+g.length-1]),e.splice(y,2,g)}for(u.reverse(),h=-1;++h<u.length;)d[p+u[h][0]]=p+u[h][1],p+=u[h][1]-u[h][0]-1;return d}const v0={resolve:w0,tokenize:b0},k0={partial:!0,tokenize:S0};function w0(e){return Jm(e),e}function b0(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?l(o):Q(o)?e.check(k0,s,l)(o):(e.consume(o),i)}function l(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function S0(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),le(e,l,"linePrefix")}function l(s){if(s===null||Q(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function ep(e,t,n,r,i,l,s,o,u){const d=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(g),e.exit(l),h):g===null||g===32||g===41||Ql(g)?n(g):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(g))}function h(g){return g===62?(e.enter(l),e.consume(g),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===62?(e.exit("chunkString"),e.exit(o),h(g)):g===null||g===60||Q(g)?n(g):(e.consume(g),g===92?p:m)}function p(g){return g===60||g===62||g===92?(e.consume(g),m):m(g)}function x(g){return!c&&(g===null||g===41||de(g))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(g)):c<d&&g===40?(e.consume(g),c++,x):g===41?(e.consume(g),c--,x):g===null||g===32||g===40||Ql(g)?n(g):(e.consume(g),g===92?k:x)}function k(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function tp(e,t,n,r,i,l){const s=this;let o=0,u;return d;function d(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(l),c}function c(m){return o>999||m===null||m===91||m===93&&!u||m===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(l),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):Q(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Q(m)||o++>999?(e.exit("chunkString"),c(m)):(e.consume(m),u||(u=!te(m)),m===92?h:f)}function h(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function np(e,t,n,r,i,l){let s;return o;function o(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,u):n(h)}function u(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(l),d(h))}function d(h){return h===s?(e.exit(l),u(s)):h===null?n(h):Q(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),le(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===s||h===null||Q(h)?(e.exit("chunkString"),d(h)):(e.consume(h),h===92?f:c)}function f(h){return h===s||h===92?(e.consume(h),c):c(h)}}function ri(e,t){let n;return r;function r(i){return Q(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):te(i)?le(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const C0={name:"definition",tokenize:N0},j0={partial:!0,tokenize:E0};function N0(e,t,n){const r=this;let i;return l;function l(m){return e.enter("definition"),s(m)}function s(m){return tp.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return i=jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):n(m)}function u(m){return de(m)?ri(e,d)(m):d(m)}function d(m){return ep(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function c(m){return e.attempt(j0,f,f)(m)}function f(m){return te(m)?le(e,h,"whitespace")(m):h(m)}function h(m){return m===null||Q(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function E0(e,t,n){return r;function r(o){return de(o)?ri(e,i)(o):n(o)}function i(o){return np(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function l(o){return te(o)?le(e,s,"whitespace")(o):s(o)}function s(o){return o===null||Q(o)?t(o):n(o)}}const T0={name:"hardBreakEscape",tokenize:z0};function z0(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return Q(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const P0={name:"headingAtx",resolve:I0,tokenize:A0};function I0(e,t){let n=e.length-2,r=3,i,l;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},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},st(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function A0(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),l(c)}function l(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||de(c)?(e.exit("atxHeadingSequence"),o(c)):n(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||Q(c)?(e.exit("atxHeading"),t(c)):te(c)?le(e,o,"whitespace")(c):(e.enter("atxHeadingText"),d(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),o(c))}function d(c){return c===null||c===35||de(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),d)}}const M0=["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"],Sd=["pre","script","style","textarea"],L0={concrete:!0,name:"htmlFlow",resolveTo:_0,tokenize:O0},R0={partial:!0,tokenize:$0},D0={partial:!0,tokenize:F0};function _0(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 O0(e,t,n){const r=this;let i,l,s,o,u;return d;function d(E){return c(E)}function c(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),f}function f(E){return E===33?(e.consume(E),h):E===47?(e.consume(E),l=!0,x):E===63?(e.consume(E),i=3,r.interrupt?t:b):Be(E)?(e.consume(E),s=String.fromCharCode(E),k):n(E)}function h(E){return E===45?(e.consume(E),i=2,m):E===91?(e.consume(E),i=5,o=0,p):Be(E)?(e.consume(E),i=4,r.interrupt?t:b):n(E)}function m(E){return E===45?(e.consume(E),r.interrupt?t:b):n(E)}function p(E){const he="CDATA[";return E===he.charCodeAt(o++)?(e.consume(E),o===he.length?r.interrupt?t:P:p):n(E)}function x(E){return Be(E)?(e.consume(E),s=String.fromCharCode(E),k):n(E)}function k(E){if(E===null||E===47||E===62||de(E)){const he=E===47,Je=s.toLowerCase();return!he&&!l&&Sd.includes(Je)?(i=1,r.interrupt?t(E):P(E)):M0.includes(s.toLowerCase())?(i=6,he?(e.consume(E),g):r.interrupt?t(E):P(E)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(E):l?y(E):v(E))}return E===45||_e(E)?(e.consume(E),s+=String.fromCharCode(E),k):n(E)}function g(E){return E===62?(e.consume(E),r.interrupt?t:P):n(E)}function y(E){return te(E)?(e.consume(E),y):w(E)}function v(E){return E===47?(e.consume(E),w):E===58||E===95||Be(E)?(e.consume(E),C):te(E)?(e.consume(E),v):w(E)}function C(E){return E===45||E===46||E===58||E===95||_e(E)?(e.consume(E),C):z(E)}function z(E){return E===61?(e.consume(E),N):te(E)?(e.consume(E),z):v(E)}function N(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),u=E,A):te(E)?(e.consume(E),N):R(E)}function A(E){return E===u?(e.consume(E),u=null,T):E===null||Q(E)?n(E):(e.consume(E),A)}function R(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||de(E)?z(E):(e.consume(E),R)}function T(E){return E===47||E===62||te(E)?v(E):n(E)}function w(E){return E===62?(e.consume(E),j):n(E)}function j(E){return E===null||Q(E)?P(E):te(E)?(e.consume(E),j):n(E)}function P(E){return E===45&&i===2?(e.consume(E),V):E===60&&i===1?(e.consume(E),G):E===62&&i===4?(e.consume(E),K):E===63&&i===3?(e.consume(E),b):E===93&&i===5?(e.consume(E),H):Q(E)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(R0,Z,L)(E)):E===null||Q(E)?(e.exit("htmlFlowData"),L(E)):(e.consume(E),P)}function L(E){return e.check(D0,F,Z)(E)}function F(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),I}function I(E){return E===null||Q(E)?L(E):(e.enter("htmlFlowData"),P(E))}function V(E){return E===45?(e.consume(E),b):P(E)}function G(E){return E===47?(e.consume(E),s="",D):P(E)}function D(E){if(E===62){const he=s.toLowerCase();return Sd.includes(he)?(e.consume(E),K):P(E)}return Be(E)&&s.length<8?(e.consume(E),s+=String.fromCharCode(E),D):P(E)}function H(E){return E===93?(e.consume(E),b):P(E)}function b(E){return E===62?(e.consume(E),K):E===45&&i===2?(e.consume(E),b):P(E)}function K(E){return E===null||Q(E)?(e.exit("htmlFlowData"),Z(E)):(e.consume(E),K)}function Z(E){return e.exit("htmlFlow"),t(E)}}function F0(e,t,n){const r=this;return i;function i(s){return Q(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l):n(s)}function l(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function $0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ii,t,n)}}const B0={name:"htmlText",tokenize:U0};function U0(e,t,n){const r=this;let i,l,s;return o;function o(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),u}function u(b){return b===33?(e.consume(b),d):b===47?(e.consume(b),z):b===63?(e.consume(b),v):Be(b)?(e.consume(b),R):n(b)}function d(b){return b===45?(e.consume(b),c):b===91?(e.consume(b),l=0,p):Be(b)?(e.consume(b),y):n(b)}function c(b){return b===45?(e.consume(b),m):n(b)}function f(b){return b===null?n(b):b===45?(e.consume(b),h):Q(b)?(s=f,G(b)):(e.consume(b),f)}function h(b){return b===45?(e.consume(b),m):f(b)}function m(b){return b===62?V(b):b===45?h(b):f(b)}function p(b){const K="CDATA[";return b===K.charCodeAt(l++)?(e.consume(b),l===K.length?x:p):n(b)}function x(b){return b===null?n(b):b===93?(e.consume(b),k):Q(b)?(s=x,G(b)):(e.consume(b),x)}function k(b){return b===93?(e.consume(b),g):x(b)}function g(b){return b===62?V(b):b===93?(e.consume(b),g):x(b)}function y(b){return b===null||b===62?V(b):Q(b)?(s=y,G(b)):(e.consume(b),y)}function v(b){return b===null?n(b):b===63?(e.consume(b),C):Q(b)?(s=v,G(b)):(e.consume(b),v)}function C(b){return b===62?V(b):v(b)}function z(b){return Be(b)?(e.consume(b),N):n(b)}function N(b){return b===45||_e(b)?(e.consume(b),N):A(b)}function A(b){return Q(b)?(s=A,G(b)):te(b)?(e.consume(b),A):V(b)}function R(b){return b===45||_e(b)?(e.consume(b),R):b===47||b===62||de(b)?T(b):n(b)}function T(b){return b===47?(e.consume(b),V):b===58||b===95||Be(b)?(e.consume(b),w):Q(b)?(s=T,G(b)):te(b)?(e.consume(b),T):V(b)}function w(b){return b===45||b===46||b===58||b===95||_e(b)?(e.consume(b),w):j(b)}function j(b){return b===61?(e.consume(b),P):Q(b)?(s=j,G(b)):te(b)?(e.consume(b),j):T(b)}function P(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,L):Q(b)?(s=P,G(b)):te(b)?(e.consume(b),P):(e.consume(b),F)}function L(b){return b===i?(e.consume(b),i=void 0,I):b===null?n(b):Q(b)?(s=L,G(b)):(e.consume(b),L)}function F(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||de(b)?T(b):(e.consume(b),F)}function I(b){return b===47||b===62||de(b)?T(b):n(b)}function V(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function G(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),D}function D(b){return te(b)?le(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):H(b)}function H(b){return e.enter("htmlTextData"),s(b)}}const ju={name:"labelEnd",resolveAll:Q0,resolveTo:q0,tokenize:Y0},H0={tokenize:K0},V0={tokenize:G0},W0={tokenize:X0};function Q0(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 q0(e,t){let n=e.length,r=0,i,l,s,o;for(;n--;)if(i=e[n][1],l){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&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[l][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",u,t],["enter",d,t]],o=ht(o,e.slice(l+1,l+r+3)),o=ht(o,[["enter",c,t]]),o=ht(o,gs(t.parser.constructs.insideSpan.null,e.slice(l+r+4,s-3),t)),o=ht(o,[["exit",c,t],e[s-2],e[s-1],["exit",d,t]]),o=ht(o,e.slice(s+1)),o=ht(o,[["exit",u,t]]),st(e,l,e.length,o),e}function Y0(e,t,n){const r=this;let i=r.events.length,l,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return o;function o(h){return l?l._inactive?f(h):(s=r.parser.defined.includes(jt(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(H0,c,s?c:f)(h):h===91?e.attempt(V0,c,s?d:f)(h):s?c(h):f(h)}function d(h){return e.attempt(W0,c,f)(h)}function c(h){return t(h)}function f(h){return l._balanced=!0,n(h)}}function K0(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return de(f)?ri(e,l)(f):l(f)}function l(f){return f===41?c(f):ep(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return de(f)?ri(e,u)(f):c(f)}function o(f){return n(f)}function u(f){return f===34||f===39||f===40?np(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function d(f){return de(f)?ri(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function G0(e,t,n){const r=this;return i;function i(o){return tp.call(r,e,l,s,"reference","referenceMarker","referenceString")(o)}function l(o){return r.parser.defined.includes(jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function X0(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Z0={name:"labelStartImage",resolveAll:ju.resolveAll,tokenize:J0};function J0(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),l}function l(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const ek={name:"labelStartLink",resolveAll:ju.resolveAll,tokenize:tk};function tk(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"),l}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ks={name:"lineEnding",tokenize:nk};function nk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),le(e,t,"linePrefix")}}const ml={name:"thematicBreak",tokenize:rk};function rk(e,t,n){let r=0,i;return l;function l(d){return e.enter("thematicBreak"),s(d)}function s(d){return i=d,o(d)}function o(d){return d===i?(e.enter("thematicBreakSequence"),u(d)):r>=3&&(d===null||Q(d))?(e.exit("thematicBreak"),t(d)):n(d)}function u(d){return d===i?(e.consume(d),r++,u):(e.exit("thematicBreakSequence"),te(d)?le(e,o,"whitespace")(d):o(d))}}const Qe={continuation:{tokenize:ok},exit:uk,name:"list",tokenize:sk},ik={partial:!0,tokenize:ck},lk={partial:!0,tokenize:ak};function sk(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(m){const p=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:ca(m)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(ml,n,d)(m):d(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return n(m)}function u(m){return ca(m)&&++s<10?(e.consume(m),u):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),d(m)):n(m)}function d(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(Ii,r.interrupt?n:c,e.attempt(ik,h,f))}function c(m){return r.containerState.initialBlankLine=!0,l++,h(m)}function f(m){return te(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),h):n(m)}function h(m){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function ok(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ii,i,l);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,le(e,t,"listItemIndent",r.containerState.size+1)(o)}function l(o){return r.containerState.furtherBlankLines||!te(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(lk,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,le(e,e.attempt(Qe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function ak(e,t,n){const r=this;return le(e,i,"listItemIndent",r.containerState.size+1);function i(l){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(l):n(l)}}function uk(e){e.exit(this.containerState.type)}function ck(e,t,n){const r=this;return le(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const s=r.events[r.events.length-1];return!te(l)&&s&&s[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Cd={name:"setextUnderline",resolveTo:dk,tokenize:fk};function dk(e,t){let n=e.length,r,i,l;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),!l&&e[n][1].type==="definition"&&(l=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",s,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function fk(e,t,n){const r=this;let i;return l;function l(d){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),o(d)}function o(d){return d===i?(e.consume(d),o):(e.exit("setextHeadingLineSequence"),te(d)?le(e,u,"lineSuffix")(d):u(d))}function u(d){return d===null||Q(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const hk={tokenize:mk};function mk(e){const t=this,n=e.attempt(Ii,r,e.attempt(this.parser.constructs.flowInitial,i,le(e,e.attempt(this.parser.constructs.flow,i,e.attempt(v0,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const pk={resolveAll:ip()},gk=rp("string"),yk=rp("text");function rp(e){return{resolveAll:ip(e==="text"?xk:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,s,o);return s;function s(c){return d(c)?l(c):o(c)}function o(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return d(c)?(n.exit("data"),l(c)):(n.consume(c),u)}function d(c){if(c===null)return!0;const f=i[c];let h=-1;if(f)for(;++h<f.length;){const m=f[h];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function ip(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function xk(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 l=i.length,s=-1,o=0,u;for(;l--;){const d=i[l];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(d===-2)u=!0,o++;else if(d!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const d={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?s:r.start._bufferIndex+s,_index:r.start._index+l,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const vk={42:Qe,43:Qe,45:Qe,48:Qe,49:Qe,50:Qe,51:Qe,52:Qe,53:Qe,54:Qe,55:Qe,56:Qe,57:Qe,62:Gm},kk={91:C0},wk={[-2]:Ys,[-1]:Ys,32:Ys},bk={35:P0,42:ml,45:[Cd,ml],60:L0,61:Cd,95:ml,96:bd,126:bd},Sk={38:Zm,92:Xm},Ck={[-5]:Ks,[-4]:Ks,[-3]:Ks,33:Z0,38:Zm,42:da,60:[e0,B0],91:ek,92:[T0,Xm],93:ju,95:da,96:h0},jk={null:[da,pk]},Nk={null:[42,95]},Ek={null:[]},Tk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Nk,contentInitial:kk,disable:Ek,document:vk,flow:bk,flowInitial:wk,insideSpan:jk,string:Sk,text:Ck},Symbol.toStringTag,{value:"Module"}));function zk(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={},l=[];let s=[],o=[];const u={attempt:A(z),check:A(N),consume:y,enter:v,exit:C,interrupt:A(N,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:m,write:f};let c=t.tokenize.call(d,u);return t.resolveAll&&l.push(t),d;function f(j){return s=ht(s,j),k(),s[s.length-1]!==null?[]:(R(t,0),d.events=gs(l,d.events,d),d.events)}function h(j,P){return Ik(m(j),P)}function m(j){return Pk(s,j)}function p(){const{_bufferIndex:j,_index:P,line:L,column:F,offset:I}=r;return{_bufferIndex:j,_index:P,line:L,column:F,offset:I}}function x(j){i[j.line]=j.column,w()}function k(){let j;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<P.length;)g(P.charCodeAt(r._bufferIndex));else g(P)}}function g(j){c=c(j)}function y(j){Q(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,w()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=j}function v(j,P){const L=P||{};return L.type=j,L.start=p(),d.events.push(["enter",L,d]),o.push(L),L}function C(j){const P=o.pop();return P.end=p(),d.events.push(["exit",P,d]),P}function z(j,P){R(j,P.from)}function N(j,P){P.restore()}function A(j,P){return L;function L(F,I,V){let G,D,H,b;return Array.isArray(F)?Z(F):"tokenize"in F?Z([F]):K(F);function K(ae){return et;function et(B){const re=B!==null&&ae[B],J=B!==null&&ae.null,be=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(J)?J:J?[J]:[]];return Z(be)(B)}}function Z(ae){return G=ae,D=0,ae.length===0?V:E(ae[D])}function E(ae){return et;function et(B){return b=T(),H=ae,ae.partial||(d.currentConstruct=ae),ae.name&&d.parser.constructs.disable.null.includes(ae.name)?Je():ae.tokenize.call(P?Object.assign(Object.create(d),P):d,u,he,Je)(B)}}function he(ae){return j(H,b),I}function Je(ae){return b.restore(),++D<G.length?E(G[D]):V}}}function R(j,P){j.resolveAll&&!l.includes(j)&&l.push(j),j.resolve&&st(d.events,P,d.events.length-P,j.resolve(d.events.slice(P),d)),j.resolveTo&&(d.events=j.resolveTo(d.events,d))}function T(){const j=p(),P=d.previous,L=d.currentConstruct,F=d.events.length,I=Array.from(o);return{from:F,restore:V};function V(){r=j,d.previous=P,d.currentConstruct=L,d.events.length=F,o=I,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pk(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,l)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}l>0&&s.push(e[i].slice(0,l))}return s}function Ik(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let s;if(typeof l=="string")s=l;else switch(l){case-5:{s="\r";break}case-4:{s=`
319
- `;break}case-3:{s=`\r
320
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(l)}i=l===-2,r.push(s)}return r.join("")}function Ak(e){const r={constructs:Ym([Tk,...(e||{}).extensions||[]]),content:i(qv),defined:[],document:i(Kv),flow:i(hk),lazy:{},string:i(gk),text:i(yk)};return r;function i(l){return s;function s(o){return zk(r,l,o)}}}function Mk(e){for(;!Jm(e););return e}const jd=/[\0\t\n\r]/g;function Lk(){let e=1,t="",n=!0,r;return i;function i(l,s,o){const u=[];let d,c,f,h,m;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(s||void 0).decode(l)),f=0,t="",n&&(l.charCodeAt(0)===65279&&f++,n=void 0);f<l.length;){if(jd.lastIndex=f,d=jd.exec(l),h=d&&d.index!==void 0?d.index:l.length,m=l.charCodeAt(h),!d){t=l.slice(f);break}if(m===10&&f===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<h&&(u.push(l.slice(f,h)),e+=h-f),m){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Rk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Dk(e){return e.replace(Rk,_k)}function _k(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Km(n.slice(l?2:1),l?16:10)}return Cu(n)||e}const lp={}.hasOwnProperty;function Ok(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Fk(n)(Mk(Ak(n).document().write(Lk()(e,t,!0))))}function Fk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Fu),autolinkProtocol:T,autolinkEmail:T,atxHeading:l(Du),blockQuote:l(J),characterEscape:T,characterReference:T,codeFenced:l(be),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:l(be,s),codeText:l(Tr,s),codeTextData:T,data:T,codeFlowValue:T,definition:l(zr),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:l(tg),hardBreakEscape:l(_u),hardBreakTrailing:l(_u),htmlFlow:l(Ou,s),htmlFlowData:T,htmlText:l(Ou,s),htmlTextData:T,image:l(ng),label:s,link:l(Fu),listItem:l(rg),listItemValue:h,listOrdered:l($u,f),listUnordered:l($u),paragraph:l(ig),reference:E,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:l(Du),strong:l(lg),thematicBreak:l(og)},exit:{atxHeading:u(),atxHeadingSequence:z,autolink:u(),autolinkEmail:re,autolinkProtocol:B,blockQuote:u(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:Je,characterReferenceMarkerNumeric:Je,characterReferenceValue:ae,characterReference:et,codeFenced:u(k),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:p,codeFlowValue:w,codeIndented:u(g),codeText:u(I),codeTextData:w,data:w,definition:u(),definitionDestinationString:C,definitionLabelString:y,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(L),htmlFlowData:w,htmlText:u(F),htmlTextData:w,image:u(G),label:H,labelText:D,lineEnding:j,link:u(V),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:he,resourceDestinationString:b,resourceTitleString:K,resource:Z,setextHeading:u(R),setextHeadingLineSequence:A,setextHeadingText:N,strong:u(),thematicBreak:u()}};sp(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(M){let $={type:"root",children:[]};const X={stack:[$],tokenStack:[],config:t,enter:o,exit:d,buffer:s,resume:c,data:n},ie=[];let ue=-1;for(;++ue<M.length;)if(M[ue][1].type==="listOrdered"||M[ue][1].type==="listUnordered")if(M[ue][0]==="enter")ie.push(ue);else{const xt=ie.pop();ue=i(M,xt,ue)}for(ue=-1;++ue<M.length;){const xt=t[M[ue][0]];lp.call(xt,M[ue][1].type)&&xt[M[ue][1].type].call(Object.assign({sliceSerialize:M[ue][2].sliceSerialize},X),M[ue][1])}if(X.tokenStack.length>0){const xt=X.tokenStack[X.tokenStack.length-1];(xt[1]||Nd).call(X,void 0,xt[0])}for($.position={start:Gt(M.length>0?M[0][1].start:{line:1,column:1,offset:0}),end:Gt(M.length>0?M[M.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)$=t.transforms[ue]($)||$;return $}function i(M,$,X){let ie=$-1,ue=-1,xt=!1,vn,Dt,Pr,Ir;for(;++ie<=X;){const tt=M[ie];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?ue++:ue--,Ir=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(vn&&!Ir&&!ue&&!Pr&&(Pr=ie),Ir=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ir=void 0}if(!ue&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||ue===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(vn){let Hn=ie;for(Dt=void 0;Hn--;){const _t=M[Hn];if(_t[1].type==="lineEnding"||_t[1].type==="lineEndingBlank"){if(_t[0]==="exit")continue;Dt&&(M[Dt][1].type="lineEndingBlank",xt=!0),_t[1].type="lineEnding",Dt=Hn}else if(!(_t[1].type==="linePrefix"||_t[1].type==="blockQuotePrefix"||_t[1].type==="blockQuotePrefixWhitespace"||_t[1].type==="blockQuoteMarker"||_t[1].type==="listItemIndent"))break}Pr&&(!Dt||Pr<Dt)&&(vn._spread=!0),vn.end=Object.assign({},Dt?M[Dt][1].start:tt[1].end),M.splice(Dt||ie,0,["exit",vn,tt[2]]),ie++,X++}if(tt[1].type==="listItemPrefix"){const Hn={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};vn=Hn,M.splice(ie,0,["enter",Hn,tt[2]]),ie++,X++,Pr=void 0,Ir=!0}}}return M[$][1]._spread=xt,X}function l(M,$){return X;function X(ie){o.call(this,M(ie),ie),$&&$.call(this,ie)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(M,$,X){this.stack[this.stack.length-1].children.push(M),this.stack.push(M),this.tokenStack.push([$,X||void 0]),M.position={start:Gt($.start),end:void 0}}function u(M){return $;function $(X){M&&M.call(this,X),d.call(this,X)}}function d(M,$){const X=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==M.type&&($?$.call(this,M,ie[0]):(ie[1]||Nd).call(this,M,ie[0]));else throw new Error("Cannot close `"+M.type+"` ("+ni({start:M.start,end:M.end})+"): it’s not open");X.position.end=Gt(M.end)}function c(){return Su(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(M){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(M),10),this.data.expectingFirstListItemValue=void 0}}function m(){const M=this.resume(),$=this.stack[this.stack.length-1];$.lang=M}function p(){const M=this.resume(),$=this.stack[this.stack.length-1];$.meta=M}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const M=this.resume(),$=this.stack[this.stack.length-1];$.value=M.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const M=this.resume(),$=this.stack[this.stack.length-1];$.value=M.replace(/(\r?\n|\r)$/g,"")}function y(M){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=jt(this.sliceSerialize(M)).toLowerCase()}function v(){const M=this.resume(),$=this.stack[this.stack.length-1];$.title=M}function C(){const M=this.resume(),$=this.stack[this.stack.length-1];$.url=M}function z(M){const $=this.stack[this.stack.length-1];if(!$.depth){const X=this.sliceSerialize(M).length;$.depth=X}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function A(M){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(M).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function T(M){const X=this.stack[this.stack.length-1].children;let ie=X[X.length-1];(!ie||ie.type!=="text")&&(ie=sg(),ie.position={start:Gt(M.start),end:void 0},X.push(ie)),this.stack.push(ie)}function w(M){const $=this.stack.pop();$.value+=this.sliceSerialize(M),$.position.end=Gt(M.end)}function j(M){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=$.children[$.children.length-1];X.position.end=Gt(M.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes($.type)&&(T.call(this,M),w.call(this,M))}function P(){this.data.atHardBreak=!0}function L(){const M=this.resume(),$=this.stack[this.stack.length-1];$.value=M}function F(){const M=this.resume(),$=this.stack[this.stack.length-1];$.value=M}function I(){const M=this.resume(),$=this.stack[this.stack.length-1];$.value=M}function V(){const M=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=$,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function G(){const M=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=$,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function D(M){const $=this.sliceSerialize(M),X=this.stack[this.stack.length-2];X.label=Dk($),X.identifier=jt($).toLowerCase()}function H(){const M=this.stack[this.stack.length-1],$=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const ie=M.children;X.children=ie}else X.alt=$}function b(){const M=this.resume(),$=this.stack[this.stack.length-1];$.url=M}function K(){const M=this.resume(),$=this.stack[this.stack.length-1];$.title=M}function Z(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function he(M){const $=this.resume(),X=this.stack[this.stack.length-1];X.label=$,X.identifier=jt(this.sliceSerialize(M)).toLowerCase(),this.data.referenceType="full"}function Je(M){this.data.characterReferenceType=M.type}function ae(M){const $=this.sliceSerialize(M),X=this.data.characterReferenceType;let ie;X?(ie=Km($,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=Cu($);const ue=this.stack[this.stack.length-1];ue.value+=ie}function et(M){const $=this.stack.pop();$.position.end=Gt(M.end)}function B(M){w.call(this,M);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(M)}function re(M){w.call(this,M);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(M)}function J(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function Tr(){return{type:"inlineCode",value:""}}function zr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function tg(){return{type:"emphasis",children:[]}}function Du(){return{type:"heading",depth:0,children:[]}}function _u(){return{type:"break"}}function Ou(){return{type:"html",value:""}}function ng(){return{type:"image",title:null,url:"",alt:null}}function Fu(){return{type:"link",title:null,url:"",children:[]}}function $u(M){return{type:"list",ordered:M.type==="listOrdered",start:null,spread:M._spread,children:[]}}function rg(M){return{type:"listItem",spread:M._spread,checked:null,children:[]}}function ig(){return{type:"paragraph",children:[]}}function lg(){return{type:"strong",children:[]}}function sg(){return{type:"text",value:""}}function og(){return{type:"thematicBreak"}}}function Gt(e){return{line:e.line,column:e.column,offset:e.offset}}function sp(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?sp(e,r):$k(e,r)}}function $k(e,t){let n;for(n in t)if(lp.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 Nd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ni({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ni({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ni({start:t.start,end:t.end})+") is still open")}function Bk(e){const t=this;t.parser=n;function n(r){return Ok(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Uk(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 Hk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
321
- `}]}function Vk(e,t){const n=t.value?t.value+`
322
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Wk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Er(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=l+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const d={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,d),e.applyData(t,d)}function Yk(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 Kk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function op(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),l=i[0];l&&l.type==="text"?l.value="["+l.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 Gk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return op(e,t);const i={src:Er(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function Xk(e,t){const n={src:Er(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 Zk(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 Jk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return op(e,t);const i={href:Er(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function ew(e,t){const n={href:Er(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 tw(e,t,n){const r=e.all(t),i=n?nw(n):ap(t),l={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const c=r[o];(i||o!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
323
- `}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
324
- `});const d={type:"element",tagName:"li",properties:l,children:s};return e.patch(t,d),e.applyData(t,d)}function nw(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=ap(n[r])}return t}function ap(e){const t=e.spread;return t??e.children.length>1}function rw(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 l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function iw(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lw(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sw(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ow(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)},o=vu(t.children[1]),u=Bm(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function aw(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const d=[];for(;++u<o;){const f=t.children[u],h={},m=s?s[u]:void 0;m&&(h.align=m);let p={type:"element",tagName:l,properties:h,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(f,p)),d.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,c),e.applyData(t,c)}function uw(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ed=9,Td=32;function cw(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(zd(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(zd(t.slice(i),i>0,!1)),l.join("")}function zd(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===Ed||l===Td;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===Ed||l===Td;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function dw(e,t){const n={type:"text",value:cw(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fw(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hw={blockquote:Uk,break:Hk,code:Vk,delete:Wk,emphasis:Qk,footnoteReference:qk,heading:Yk,html:Kk,imageReference:Gk,image:Xk,inlineCode:Zk,linkReference:Jk,link:ew,listItem:tw,list:rw,paragraph:iw,root:lw,strong:sw,table:ow,tableCell:uw,tableRow:aw,text:dw,thematicBreak:fw,toml:Gi,yaml:Gi,definition:Gi,footnoteDefinition:Gi};function Gi(){}const up=-1,ys=0,ii=1,ql=2,Nu=3,Eu=4,Tu=5,zu=6,cp=7,dp=8,mw=typeof self=="object"?self:globalThis,Pd=(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 mw[e](t)},pw=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,s]=t[i];switch(l){case ys:case up:return n(s,i);case ii:{const o=n([],i);for(const u of s)o.push(r(u));return o}case ql:{const o=n({},i);for(const[u,d]of s)o[r(u)]=r(d);return o}case Nu:return n(new Date(s),i);case Eu:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case Tu:{const o=n(new Map,i);for(const[u,d]of s)o.set(r(u),r(d));return o}case zu:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case cp:{const{name:o,message:u}=s;return n(Pd(o,u),i)}case dp: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:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(Pd(l,s),i)};return r},Id=e=>pw(new Map,e)(0),Wn="",{toString:gw}={},{keys:yw}=Object,Br=e=>{const t=typeof e;if(t!=="object"||!e)return[ys,t];const n=gw.call(e).slice(8,-1);switch(n){case"Array":return[ii,Wn];case"Object":return[ql,Wn];case"Date":return[Nu,Wn];case"RegExp":return[Eu,Wn];case"Map":return[Tu,Wn];case"Set":return[zu,Wn];case"DataView":return[ii,n]}return n.includes("Array")?[ii,n]:n.includes("Error")?[cp,n]:[ql,n]},Xi=([e,t])=>e===ys&&(t==="function"||t==="symbol"),xw=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},l=s=>{if(n.has(s))return n.get(s);let[o,u]=Br(s);switch(o){case ys:{let c=s;switch(u){case"bigint":o=dp,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([up],s)}return i([o,c],s)}case ii:{if(u){let h=s;return u==="DataView"?h=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(s)),i([u,[...h]],s)}const c=[],f=i([o,c],s);for(const h of s)c.push(l(h));return f}case ql:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return l(s.toJSON());const c=[],f=i([o,c],s);for(const h of yw(s))(e||!Xi(Br(s[h])))&&c.push([l(h),l(s[h])]);return f}case Nu:return i([o,s.toISOString()],s);case Eu:{const{source:c,flags:f}=s;return i([o,{source:c,flags:f}],s)}case Tu:{const c=[],f=i([o,c],s);for(const[h,m]of s)(e||!(Xi(Br(h))||Xi(Br(m))))&&c.push([l(h),l(m)]);return f}case zu:{const c=[],f=i([o,c],s);for(const h of s)(e||!Xi(Br(h)))&&c.push(l(h));return f}}const{message:d}=s;return i([o,{name:u,message:d}],s)};return l},Ad=(e,{json:t,lossy:n}={})=>{const r=[];return xw(!(t||n),!!t,new Map,r)(e),r},Yl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Id(Ad(e,t)):structuredClone(e):(e,t)=>Id(Ad(e,t));function vw(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 kw(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ww(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vw,r=e.options.footnoteBackLabel||kw,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[u]);if(!d)continue;const c=e.all(d),f=String(d.identifier).toUpperCase(),h=Er(f.toLowerCase());let m=0;const p=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++m<=x;){p.length>0&&p.push({type:"text",value:" "});let y=typeof n=="string"?n:n(u,m);typeof y=="string"&&(y={type:"text",value:y}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,m),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const k=c[c.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const y=k.children[k.children.length-1];y&&y.type==="text"?y.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...p)}else c.push(...p);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(d,g),o.push(g)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Yl(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
325
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
326
- `}]}}const xs=function(e){if(e==null)return jw;if(typeof e=="function")return vs(e);if(typeof e=="object")return Array.isArray(e)?bw(e):Sw(e);if(typeof e=="string")return Cw(e);throw new Error("Expected function, string, or object as test")};function bw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xs(e[n]);return vs(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function Sw(e){const t=e;return vs(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function Cw(e){return vs(t);function t(n){return n&&n.type===e}}function vs(e){return t;function t(n,r,i){return!!(Nw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function jw(){return!0}function Nw(e){return e!==null&&typeof e=="object"&&"type"in e}const fp=[],Ew=!0,fa=!1,Tw="skip";function hp(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const l=xs(i),s=r?-1:1;o(e,void 0,[])();function o(u,d,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=fp,p,x,k;if((!t||l(u,d,c[c.length-1]||void 0))&&(m=zw(n(u,c)),m[0]===fa))return m;if("children"in u&&u.children){const g=u;if(g.children&&m[0]!==Tw)for(x=(r?g.children.length:-1)+s,k=c.concat(g);x>-1&&x<g.children.length;){const y=g.children[x];if(p=o(y,x,k)(),p[0]===fa)return p;x=typeof p[1]=="number"?p[1]:x+s}}return m}}}function zw(e){return Array.isArray(e)?e:typeof e=="number"?[Ew,e]:e==null?fp:[e]}function Pu(e,t,n,r){let i,l,s;typeof t=="function"&&typeof n!="function"?(l=void 0,s=t,i=n):(l=t,s=n,i=r),hp(e,l,o,i);function o(u,d){const c=d[d.length-1],f=c?c.children.indexOf(u):void 0;return s(u,f,c)}}const ha={}.hasOwnProperty,Pw={};function Iw(e,t){const n=t||Pw,r=new Map,i=new Map,l=new Map,s={...hw,...n.handlers},o={all:d,applyData:Mw,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:s,one:u,options:n,patch:Aw,wrap:Rw};return Pu(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,h=String(c.identifier).toUpperCase();f.has(h)||f.set(h,c)}}),o;function u(c,f){const h=c.type,m=o.handlers[h];if(ha.call(o.handlers,h)&&m)return m(o,c,f);if(o.options.passThrough&&o.options.passThrough.includes(h)){if("children"in c){const{children:x,...k}=c,g=Yl(k);return g.children=o.all(c),g}return Yl(c)}return(o.options.unknownHandler||Lw)(o,c,f)}function d(c){const f=[];if("children"in c){const h=c.children;let m=-1;for(;++m<h.length;){const p=o.one(h[m],c);if(p){if(m&&h[m-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=Md(p.value)),!Array.isArray(p)&&p.type==="element")){const x=p.children[0];x&&x.type==="text"&&(x.value=Md(x.value))}Array.isArray(p)?f.push(...p):f.push(p)}}}return f}}function Aw(e,t){e.position&&(t.position=vv(e))}function Mw(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=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"&&l&&Object.assign(n.properties,Yl(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Lw(e,t){const n=t.data||{},r="value"in t&&!(ha.call(n,"hProperties")||ha.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 Rw(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
327
- `});++r<e.length;)r&&n.push({type:"text",value:`
328
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
329
- `}),n}function Md(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ld(e,t){const n=Iw(e,t),r=n.one(e,void 0),i=ww(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
330
- `},i),l}function Dw(e,t){return e&&"run"in e?async function(n,r){const i=Ld(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ld(n,{file:r,...e||t})}}function Rd(e){if(e)throw e}var pl=Object.prototype.hasOwnProperty,mp=Object.prototype.toString,Dd=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,Od=function(t){return typeof Array.isArray=="function"?Array.isArray(t):mp.call(t)==="[object Array]"},Fd=function(t){if(!t||mp.call(t)!=="[object Object]")return!1;var n=pl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&pl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||pl.call(t,i)},$d=function(t,n){Dd&&n.name==="__proto__"?Dd(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Bd=function(t,n){if(n==="__proto__")if(pl.call(t,n)){if(_d)return _d(t,n).value}else return;return t[n]},_w=function e(){var t,n,r,i,l,s,o=arguments[0],u=1,d=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},u=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});u<d;++u)if(t=arguments[u],t!=null)for(n in t)r=Bd(o,n),i=Bd(t,n),o!==i&&(c&&i&&(Fd(i)||(l=Od(i)))?(l?(l=!1,s=r&&Od(r)?r:[]):s=r&&Fd(r)?r:{},$d(o,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&$d(o,{name:n,newValue:i}));return o};const Gs=va(_w);function ma(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 Ow(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...d){const c=e[++l];let f=-1;if(u){s(u);return}for(;++f<i.length;)(d[f]===null||d[f]===void 0)&&(d[f]=i[f]);i=d,c?Fw(c,o)(...d):s(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Fw(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(d){const c=d;if(o&&n)throw c;return i(c)}o||(u&&u.then&&typeof u.then=="function"?u.then(l,i):u instanceof Error?i(u):l(u))}function i(s,...o){n||(n=!0,t(s,...o))}function l(s){i(null,s)}}const It={basename:$w,dirname:Bw,extname:Uw,join:Hw,sep:"/"};function $w(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ai(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else s<0&&(l=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Bw(e){if(Ai(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 Uw(e){Ai(e);let t=e.length,n=-1,r=0,i=-1,l=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Hw(...e){let t=-1,n;for(;++t<e.length;)Ai(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Vw(n)}function Vw(e){Ai(e);const t=e.codePointAt(0)===47;let n=Ww(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ww(e,t){let n="",r=0,i=-1,l=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||l===1))if(i!==s-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,l=0;continue}}else if(n.length>0){n="",r=0,i=s,l=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,l=0}else o===46&&l>-1?l++:l=-1}return n}function Ai(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Qw={cwd:qw};function qw(){return"/"}function pa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Yw(e){if(typeof e=="string")e=new URL(e);else if(!pa(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 Kw(e)}function Kw(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 Xs=["history","path","basename","stem","extname","dirname"];class pp{constructor(t){let n;t?pa(t)?n={path:t}:typeof t=="string"||Gw(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Qw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Xs.length;){const l=Xs[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)Xs.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?It.basename(this.path):void 0}set basename(t){Js(t,"basename"),Zs(t,"basename"),this.path=It.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?It.dirname(this.path):void 0}set dirname(t){Ud(this.basename,"dirname"),this.path=It.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?It.extname(this.path):void 0}set extname(t){if(Zs(t,"extname"),Ud(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=It.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pa(t)&&(t=Yw(t)),Js(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?It.basename(this.path,this.extname):void 0}set stem(t){Js(t,"stem"),Zs(t,"stem"),this.path=It.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 Fe(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 Zs(e,t){if(e&&e.includes(It.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+It.sep+"`")}function Js(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ud(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Gw(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xw=function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},Zw={}.hasOwnProperty;class Iu extends Xw{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=Ow()}copy(){const t=new Iu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Gs(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(no("data",this.frozen),this.namespace[t]=n,this):Zw.call(this.namespace,t)&&this.namespace[t]||void 0:t?(no("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=Zi(t),r=this.parser||this.Parser;return eo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),eo("process",this.parser||this.Parser),to("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,s){const o=Zi(t),u=r.parse(o);r.run(u,o,function(c,f,h){if(c||!f||!h)return d(c);const m=f,p=r.stringify(m,h);tb(p)?h.value=p:h.result=p,d(c,h)});function d(c,f){c||!f?s(c):l?l(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),eo("processSync",this.parser||this.Parser),to("processSync",this.compiler||this.Compiler),this.process(t,i),Vd("processSync","process",n),r;function i(l,s){n=!0,Rd(l),r=s}}run(t,n,r){Hd(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(s,o){const u=Zi(n);i.run(t,u,d);function d(c,f,h){const m=f||t;c?o(c):s?s(m):r(void 0,m,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),Vd("runSync","run",r),i;function l(s,o){Rd(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=Zi(n),i=this.compiler||this.Compiler;return to("stringify",i),Hd(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(no("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(d){if(typeof d=="function")u(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[c,...f]=d;u(c,f)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))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");o(d.plugins),d.settings&&(i.settings=Gs(!0,i.settings,d.settings))}function o(d){let c=-1;if(d!=null)if(Array.isArray(d))for(;++c<d.length;){const f=d[c];l(f)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function u(d,c){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===d){h=f;break}if(h===-1)r.push([d,...c]);else if(c.length>0){let[m,...p]=c;const x=r[h][1];ma(x)&&ma(m)&&(m=Gs(!0,x,m)),r[h]=[d,m,...p]}}}}const Jw=new Iu().freeze();function eo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function to(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function no(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 Hd(e){if(!ma(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Vd(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Zi(e){return eb(e)?e:new pp(e)}function eb(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tb(e){return typeof e=="string"||nb(e)}function nb(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rb="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Wd=[],Qd={allowDangerousHtml:!0},ib=/^(https?|ircs?|mailto|xmpp)$/i,lb=[{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:"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 sb(e){const t=ob(e),n=ab(e);return ub(t.runSync(t.parse(n),n),e)}function ob(e){const t=e.rehypePlugins||Wd,n=e.remarkPlugins||Wd,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Qd}:Qd;return Jw().use(Bk).use(n).use(Dw,r).use(t)}function ab(e){const t=e.children||"",n=new pp;return typeof t=="string"&&(n.value=t),n}function ub(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,u=t.urlTransform||cb;for(const c of lb)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+rb+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Pu(e,d),Cv(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function d(c,f,h){if(c.type==="raw"&&h&&typeof f=="number")return s?h.children.splice(f,1):h.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let m;for(m in qs)if(Object.hasOwn(qs,m)&&Object.hasOwn(c.properties,m)){const p=c.properties[m],x=qs[m];(x===null||x.includes(c.tagName))&&(c.properties[m]=u(String(p||""),m,c))}}if(c.type==="element"){let m=n?!n.includes(c.tagName):l?l.includes(c.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(c,f,h)),m&&h&&typeof f=="number")return o&&c.children?h.children.splice(f,1,...c.children):h.children.splice(f,1),f}}}function cb(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||ib.test(e.slice(0,t))?e:""}function qd(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 db(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function fb(e,t,n){const i=xs((n||{}).ignore||[]),l=hb(t);let s=-1;for(;++s<l.length;)hp(e,"text",o);function o(d,c){let f=-1,h;for(;++f<c.length;){const m=c[f],p=h?h.children:void 0;if(i(m,p?p.indexOf(m):void 0,h))return;h=m}if(h)return u(d,c)}function u(d,c){const f=c[c.length-1],h=l[s][0],m=l[s][1];let p=0;const k=f.children.indexOf(d);let g=!1,y=[];h.lastIndex=0;let v=h.exec(d.value);for(;v;){const C=v.index,z={index:v.index,input:v.input,stack:[...c,d]};let N=m(...v,z);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=C+1:(p!==C&&y.push({type:"text",value:d.value.slice(p,C)}),Array.isArray(N)?y.push(...N):N&&y.push(N),p=C+v[0].length,g=!0),!h.global)break;v=h.exec(d.value)}return g?(p<d.value.length&&y.push({type:"text",value:d.value.slice(p)}),f.children.splice(k,1,...y)):y=[d],k+y.length}}function hb(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([mb(i[0]),pb(i[1])])}return t}function mb(e){return typeof e=="string"?new RegExp(db(e),"g"):e}function pb(e){return typeof e=="function"?e:function(){return e}}const ro="phrasing",io=["autolink","link","image","label"];function gb(){return{transforms:[Sb],enter:{literalAutolink:xb,literalAutolinkEmail:lo,literalAutolinkHttp:lo,literalAutolinkWww:lo},exit:{literalAutolink:bb,literalAutolinkEmail:wb,literalAutolinkHttp:vb,literalAutolinkWww:kb}}}function yb(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ro,notInConstruct:io},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ro,notInConstruct:io},{character:":",before:"[ps]",after:"\\/",inConstruct:ro,notInConstruct:io}]}}function xb(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function lo(e){this.config.enter.autolinkProtocol.call(this,e)}function vb(e){this.config.exit.autolinkProtocol.call(this,e)}function kb(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 wb(e){this.config.exit.autolinkEmail.call(this,e)}function bb(e){this.exit(e)}function Sb(e){fb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Cb],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),jb]],{ignore:["link","linkReference"]})}function Cb(e,t,n,r,i){let l="";if(!gp(i)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!Nb(n)))return!1;const s=Eb(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:l+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function jb(e,t,n,r){return!gp(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Nb(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 Eb(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=qd(e,"(");let l=qd(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function gp(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||_n(n)||ps(n))&&(!t||n!==47)}yp.peek=Db;function Tb(){this.buffer()}function zb(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Pb(){this.buffer()}function Ib(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ab(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Mb(e){this.exit(e)}function Lb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Rb(e){this.exit(e)}function Db(){return"["}function yp(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),o(),s(),l+=i.move("]"),l}function _b(){return{enter:{gfmFootnoteCallString:Tb,gfmFootnoteCall:zb,gfmFootnoteDefinitionLabelString:Pb,gfmFootnoteDefinition:Ib},exit:{gfmFootnoteCallString:Ab,gfmFootnoteCall:Mb,gfmFootnoteDefinitionLabelString:Lb,gfmFootnoteDefinition:Rb}}}function Ob(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:yp},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,s){const o=l.createTracker(s);let u=o.move("[^");const d=l.enter("footnoteDefinition"),c=l.enter("label");return u+=o.move(l.safe(l.associationId(r),{before:u,after:"]"})),c(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
331
- `:" ")+l.indentLines(l.containerFlow(r,o.current()),t?xp:Fb))),d(),u}}function Fb(e,t,n){return t===0?e:xp(e,t,n)}function xp(e,t,n){return(n?"":" ")+e}const $b=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];vp.peek=Wb;function Bb(){return{canContainEols:["delete"],enter:{strikethrough:Hb},exit:{strikethrough:Vb}}}function Ub(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$b}],handlers:{delete:vp}}}function Hb(e){this.enter({type:"delete",children:[]},e)}function Vb(e){this.exit(e)}function vp(e,t,n,r){const i=n.createTracker(r),l=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),l(),s}function Wb(){return"~"}function Qb(e){return e.length}function qb(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Qb,l=[],s=[],o=[],u=[];let d=0,c=-1;for(;++c<e.length;){const x=[],k=[];let g=-1;for(e[c].length>d&&(d=e[c].length);++g<e[c].length;){const y=Yb(e[c][g]);if(n.alignDelimiters!==!1){const v=i(y);k[g]=v,(u[g]===void 0||v>u[g])&&(u[g]=v)}x.push(y)}s[c]=x,o[c]=k}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<d;)l[f]=Yd(r[f]);else{const x=Yd(r);for(;++f<d;)l[f]=x}f=-1;const h=[],m=[];for(;++f<d;){const x=l[f];let k="",g="";x===99?(k=":",g=":"):x===108?k=":":x===114&&(g=":");let y=n.alignDelimiters===!1?1:Math.max(1,u[f]-k.length-g.length);const v=k+"-".repeat(y)+g;n.alignDelimiters!==!1&&(y=k.length+y+g.length,y>u[f]&&(u[f]=y),m[f]=y),h[f]=v}s.splice(1,0,h),o.splice(1,0,m),c=-1;const p=[];for(;++c<s.length;){const x=s[c],k=o[c];f=-1;const g=[];for(;++f<d;){const y=x[f]||"";let v="",C="";if(n.alignDelimiters!==!1){const z=u[f]-(k[f]||0),N=l[f];N===114?v=" ".repeat(z):N===99?z%2?(v=" ".repeat(z/2+.5),C=" ".repeat(z/2-.5)):(v=" ".repeat(z/2),C=v):C=" ".repeat(z)}n.delimiterStart!==!1&&!f&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||f)&&g.push(" "),n.alignDelimiters!==!1&&g.push(v),g.push(y),n.alignDelimiters!==!1&&g.push(C),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||f!==d-1)&&g.push("|")}p.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return p.join(`
332
- `)}function Yb(e){return e==null?"":String(e)}function Yd(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 Kb(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const s=n.indentLines(n.containerFlow(e,l.current()),Gb);return i(),s}function Gb(e,t,n){return">"+(n?"":" ")+e}function Xb(e,t){return Kd(e,t.inConstruct,!0)&&!Kd(e,t.notInConstruct,!1)}function Kd(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 Gd(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
333
- `&&Xb(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
334
- `}function Zb(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>s&&(s=l):l=1,i=r+t.length,r=n.indexOf(t,i);return s}function Jb(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 eS(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 tS(e,t,n,r){const i=eS(n),l=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Jb(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(l,nS);return f(),h}const o=n.createTracker(r),u=i.repeat(Math.max(Zb(l,i)+1,3)),d=n.enter("codeFenced");let c=o.move(u);if(e.lang){const f=n.enter(`codeFencedLang${s}`);c+=o.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);c+=o.move(" "),c+=o.move(n.safe(e.meta,{before:c,after:`
335
- `,encode:["`"],...o.current()})),f()}return c+=o.move(`
336
- `),l&&(c+=o.move(l+`
337
- `)),c+=o.move(u),d(),c}function nS(e,t,n){return(n?"":" ")+e}function Au(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 rS(e,t,n,r){const i=Au(n),l=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let d=u.move("[");return d+=u.move(n.safe(n.associationId(e),{before:d,after:"]",...u.current()})),d+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),d+=u.move("<"),d+=u.move(n.safe(e.url,{before:d,after:">",...u.current()})),d+=u.move(">")):(o=n.enter("destinationRaw"),d+=u.move(n.safe(e.url,{before:d,after:e.title?" ":`
338
- `,...u.current()}))),o(),e.title&&(o=n.enter(`title${l}`),d+=u.move(" "+i),d+=u.move(n.safe(e.title,{before:d,after:i,...u.current()})),d+=u.move(i),o()),s(),d}function iS(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 Si(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Kl(e,t,n){const r=wr(e),i=wr(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}}kp.peek=lS;function kp(e,t,n,r){const i=iS(n),l=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const d=u.charCodeAt(0),c=Kl(r.before.charCodeAt(r.before.length-1),d,i);c.inside&&(u=Si(d)+u.slice(1));const f=u.charCodeAt(u.length-1),h=Kl(r.after.charCodeAt(0),f,i);h.inside&&(u=u.slice(0,-1)+Si(f));const m=s.move(i);return l(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},o+u+m}function lS(e,t,n){return n.options.emphasis||"*"}function sS(e,t){let n=!1;return Pu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,fa}),!!((!e.depth||e.depth<3)&&Su(e)&&(t.options.setext||n))}function oS(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(sS(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...l.current(),before:`
339
- `,after:`
340
- `});return f(),c(),h+`
341
- `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
342
- `))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");l.move(s+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
343
- `,...l.current()});return/^[\t ]/.test(d)&&(d=Si(d.charCodeAt(0))+d.slice(1)),d=d?s+" "+d:s,n.options.closeAtx&&(d+=" "+s),u(),o(),d}wp.peek=aS;function wp(e){return e.value||""}function aS(){return"<"}bp.peek=uS;function bp(e,t,n,r){const i=Au(n),l=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let d=u.move("![");return d+=u.move(n.safe(e.alt,{before:d,after:"]",...u.current()})),d+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),d+=u.move("<"),d+=u.move(n.safe(e.url,{before:d,after:">",...u.current()})),d+=u.move(">")):(o=n.enter("destinationRaw"),d+=u.move(n.safe(e.url,{before:d,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${l}`),d+=u.move(" "+i),d+=u.move(n.safe(e.title,{before:d,after:i,...u.current()})),d+=u.move(i),o()),d+=u.move(")"),s(),d}function uS(){return"!"}Sp.peek=cS;function Sp(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const d=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(d+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=c,l(),i==="full"||!d||d!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function cS(){return"!"}Cp.peek=dS;function Cp(e,t,n){let r=e.value||"",i="`",l=-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+" ");++l<n.unsafe.length;){const s=n.unsafe[l],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let d=u.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(u.index+1)}}return i+r+i}function dS(){return"`"}function jp(e,t){const n=Su(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))}Np.peek=fS;function Np(e,t,n,r){const i=Au(n),l=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(jp(e,n)){const c=n.stack;n.stack=[],o=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),o(),n.stack=c,f}o=n.enter("link"),u=n.enter("label");let d=s.move("[");return d+=s.move(n.containerPhrasing(e,{before:d,after:"](",...s.current()})),d+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=s.move("<"),d+=s.move(n.safe(e.url,{before:d,after:">",...s.current()})),d+=s.move(">")):(u=n.enter("destinationRaw"),d+=s.move(n.safe(e.url,{before:d,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${l}`),d+=s.move(" "+i),d+=s.move(n.safe(e.title,{before:d,after:i,...s.current()})),d+=s.move(i),u()),d+=s.move(")"),o(),d}function fS(e,t,n){return jp(e,n)?"<":"["}Ep.peek=hS;function Ep(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const d=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(d+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=c,l(),i==="full"||!d||d!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function hS(){return"["}function Mu(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 mS(e){const t=Mu(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 pS(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 Tp(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 gS(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let s=e.ordered?pS(n):Mu(n);const o=e.ordered?s==="."?")":".":mS(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.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&&(u=!0),Tp(n)===s&&c){let f=-1;for(;++f<e.children.length;){const h=e.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const d=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=l,i(),d}function yS(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 xS(e,t,n,r){const i=yS(n);let l=n.bulletCurrent||Mu(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let s=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(l+" ".repeat(s-l.length)),o.shift(s);const u=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,o.current()),c);return u(),d;function c(f,h,m){return h?(m?"":" ".repeat(s))+f:(m?l:l+" ".repeat(s-l.length))+f}}function vS(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),s=n.containerPhrasing(e,r);return l(),i(),s}const kS=xs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wS(e,t,n,r){return(e.children.some(function(s){return kS(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function bS(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}zp.peek=SS;function zp(e,t,n,r){const i=bS(n),l=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const d=u.charCodeAt(0),c=Kl(r.before.charCodeAt(r.before.length-1),d,i);c.inside&&(u=Si(d)+u.slice(1));const f=u.charCodeAt(u.length-1),h=Kl(r.after.charCodeAt(0),f,i);h.inside&&(u=u.slice(0,-1)+Si(f));const m=s.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:h.outside,before:c.outside},o+u+m}function SS(e,t,n){return n.options.strong||"*"}function CS(e,t,n,r){return n.safe(e.value,r)}function jS(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 NS(e,t,n){const r=(Tp(n)+(n.options.ruleSpaces?" ":"")).repeat(jS(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Pp={blockquote:Kb,break:Gd,code:tS,definition:rS,emphasis:kp,hardBreak:Gd,heading:oS,html:wp,image:bp,imageReference:Sp,inlineCode:Cp,link:Np,linkReference:Ep,list:gS,listItem:xS,paragraph:vS,root:wS,strong:zp,text:CS,thematicBreak:NS};function ES(){return{enter:{table:TS,tableData:Xd,tableHeader:Xd,tableRow:PS},exit:{codeText:IS,table:zS,tableData:so,tableHeader:so,tableRow:so}}}function TS(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 zS(e){this.exit(e),this.data.inTable=void 0}function PS(e){this.enter({type:"tableRow",children:[]},e)}function so(e){this.exit(e)}function Xd(e){this.enter({type:"tableCell",children:[]},e)}function IS(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,AS));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function AS(e,t){return t==="|"?t:e}function MS(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
344
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:u,tableRow:o}};function s(m,p,x,k){return d(c(m,x,k),m.align)}function o(m,p,x,k){const g=f(m,x,k),y=d([g]);return y.slice(0,y.indexOf(`
345
- `))}function u(m,p,x,k){const g=x.enter("tableCell"),y=x.enter("phrasing"),v=x.containerPhrasing(m,{...k,before:l,after:l});return y(),g(),v}function d(m,p){return qb(m,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function c(m,p,x){const k=m.children;let g=-1;const y=[],v=p.enter("table");for(;++g<k.length;)y[g]=f(k[g],p,x);return v(),y}function f(m,p,x){const k=m.children;let g=-1;const y=[],v=p.enter("tableRow");for(;++g<k.length;)y[g]=u(k[g],m,p,x);return v(),y}function h(m,p,x){let k=Pp.inlineCode(m,p,x);return x.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function LS(){return{exit:{taskListCheckValueChecked:Zd,taskListCheckValueUnchecked:Zd,paragraph:DS}}}function RS(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:_S}}}function Zd(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function DS(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 l=-1,s;for(;++l<i.length;){const o=i[l];if(o.type==="paragraph"){s=o;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 _S(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);l&&o.move(s);let u=Pp.listItem(e,t,n,{...r,...o.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),u;function d(c){return c+s}}function OS(){return[gb(),_b(),Bb(),ES(),LS()]}function FS(e){return{extensions:[yb(),Ob(e),Ub(),MS(e),RS()]}}const $S={tokenize:QS,partial:!0},Ip={tokenize:qS,partial:!0},Ap={tokenize:YS,partial:!0},Mp={tokenize:KS,partial:!0},BS={tokenize:GS,partial:!0},Lp={name:"wwwAutolink",tokenize:VS,previous:Dp},Rp={name:"protocolAutolink",tokenize:WS,previous:_p},Yt={name:"emailAutolink",tokenize:HS,previous:Op},Rt={};function US(){return{text:Rt}}let kn=48;for(;kn<123;)Rt[kn]=Yt,kn++,kn===58?kn=65:kn===91&&(kn=97);Rt[43]=Yt;Rt[45]=Yt;Rt[46]=Yt;Rt[95]=Yt;Rt[72]=[Yt,Rp];Rt[104]=[Yt,Rp];Rt[87]=[Yt,Lp];Rt[119]=[Yt,Lp];function HS(e,t,n){const r=this;let i,l;return s;function s(f){return!ga(f)||!Op.call(r,r.previous)||Lu(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return ga(f)?(e.consume(f),o):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(BS,c,d)(f):f===45||f===95||_e(f)?(l=!0,e.consume(f),u):c(f)}function d(f){return e.consume(f),i=!0,u}function c(f){return l&&i&&Be(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function VS(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Dp.call(r,r.previous)||Lu(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($S,e.attempt(Ip,e.attempt(Ap,l),n),n)(s))}function l(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function WS(e,t,n){const r=this;let i="",l=!1;return s;function s(f){return(f===72||f===104)&&_p.call(r,r.previous)&&!Lu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(Be(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),l?d:(l=!0,u)):n(f)}function d(f){return f===null||Ql(f)||de(f)||_n(f)||ps(f)?n(f):e.attempt(Ip,e.attempt(Ap,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function QS(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),l):n(s)}function l(s){return s===null?n(s):t(s)}}function qS(e,t,n){let r,i,l;return s;function s(d){return d===46||d===95?e.check(Mp,u,o)(d):d===null||de(d)||_n(d)||d!==45&&ps(d)?u(d):(l=!0,e.consume(d),s)}function o(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),s}function u(d){return i||r||!l?n(d):t(d)}}function YS(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?l(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(Mp,t,l)(s):s===null||de(s)||_n(s)?t(s):(e.consume(s),i)}function l(s){return s===41&&r++,e.consume(s),i}}function KS(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),l):o===93?(e.consume(o),i):o===60||o===null||de(o)||_n(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||de(o)||_n(o)?t(o):r(o)}function l(o){return Be(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):Be(o)?(e.consume(o),s):n(o)}}function GS(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return _e(l)?n(l):t(l)}}function Dp(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||de(e)}function _p(e){return!Be(e)}function Op(e){return!(e===47||ga(e))}function ga(e){return e===43||e===45||e===46||e===95||_e(e)}function Lu(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 XS={tokenize:l2,partial:!0};function ZS(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:n2,continuation:{tokenize:r2},exit:i2}},text:{91:{name:"gfmFootnoteCall",tokenize:t2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:JS,resolveTo:e2}}}}function JS(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const d=jt(r.sliceSerialize({start:s.end,end:r.now()}));return d.codePointAt(0)!==94||!l.includes(d.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function e2(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 l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",s,t],["exit",s,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function t2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(f){if(l>999||f===93&&!s||f===null||f===91||de(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(jt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return de(f)||(s=!0),l++,e.consume(f),f===92?c:d}function c(f){return f===91||f===92||f===93?(e.consume(f),l++,d):d(f)}}function n2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,s=0,o;return u;function u(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(p)}function c(p){if(s>999||p===93&&!o||p===null||p===91||de(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return l=jt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return de(p)||(o=!0),s++,e.consume(p),p===92?f:c}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}function h(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(l)||i.push(l),le(e,m,"gfmFootnoteDefinitionWhitespace")):n(p)}function m(p){return t(p)}}function r2(e,t,n){return e.check(Ii,t,e.attempt(XS,t,n))}function i2(e){e.exit("gfmFootnoteDefinition")}function l2(e,t,n){const r=this;return le(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(l):n(l)}}function s2(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let d=u;for(;d--;)if(s[d][0]==="exit"&&s[d][1].type==="strikethroughSequenceTemporary"&&s[d][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[d][1].end.offset-s[d][1].start.offset){s[u][1].type="strikethroughSequence",s[d][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[d][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[d][1].end),end:Object.assign({},s[u][1].start)},h=[["enter",c,o],["enter",s[d][1],o],["exit",s[d][1],o],["enter",f,o]],m=o.parser.constructs.insideSpan.null;m&&st(h,h.length,0,gs(m,s.slice(d+1,u),o)),st(h,h.length,0,[["exit",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",c,o]]),st(s,d-1,u-d+3,h),u=d+h.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function l(s,o,u){const d=this.previous,c=this.events;let f=0;return h;function h(p){return d===126&&c[c.length-1][1].type!=="characterEscape"?u(p):(s.enter("strikethroughSequenceTemporary"),m(p))}function m(p){const x=wr(d);if(p===126)return f>1?u(p):(s.consume(p),f++,m);if(f<2&&!n)return u(p);const k=s.exit("strikethroughSequenceTemporary"),g=wr(p);return k._open=!g||g===2&&!!x,k._close=!x||x===2&&!!g,o(p)}}}class o2{constructor(){this.map=[]}add(t,n,r){a2(this,t,n,r)}consume(t){if(this.map.sort(function(l,s){return l[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 l of i)t.push(l);i=r.pop()}this.map.length=0}}function a2(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 u2(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 l=r.length-1;r[l]=r[l]==="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 c2(){return{flow:{null:{name:"table",tokenize:d2,resolveAll:f2}}}}function d2(e,t,n){const r=this;let i=0,l=0,s;return o;function o(w){let j=r.events.length-1;for(;j>-1;){const F=r.events[j][1].type;if(F==="lineEnding"||F==="linePrefix")j--;else break}const P=j>-1?r.events[j][1].type:null,L=P==="tableHead"||P==="tableRow"?N:u;return L===N&&r.parser.lazy[r.now().line]?n(w):L(w)}function u(w){return e.enter("tableHead"),e.enter("tableRow"),d(w)}function d(w){return w===124||(s=!0,l+=1),c(w)}function c(w){return w===null?n(w):Q(w)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):n(w):te(w)?le(e,c,"whitespace")(w):(l+=1,s&&(s=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),f(w)))}function f(w){return w===null||w===124||de(w)?(e.exit("data"),c(w)):(e.consume(w),w===92?h:f)}function h(w){return w===92||w===124?(e.consume(w),f):f(w)}function m(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),s=!1,te(w)?le(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):p(w))}function p(w){return w===45||w===58?k(w):w===124?(s=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),x):z(w)}function x(w){return te(w)?le(e,k,"whitespace")(w):k(w)}function k(w){return w===58?(l+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),g):w===45?(l+=1,g(w)):w===null||Q(w)?C(w):z(w)}function g(w){return w===45?(e.enter("tableDelimiterFiller"),y(w)):z(w)}function y(w){return w===45?(e.consume(w),y):w===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(w))}function v(w){return te(w)?le(e,C,"whitespace")(w):C(w)}function C(w){return w===124?p(w):w===null||Q(w)?!s||i!==l?z(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):z(w)}function z(w){return n(w)}function N(w){return e.enter("tableRow"),A(w)}function A(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),A):w===null||Q(w)?(e.exit("tableRow"),t(w)):te(w)?le(e,A,"whitespace")(w):(e.enter("data"),R(w))}function R(w){return w===null||w===124||de(w)?(e.exit("data"),A(w)):(e.consume(w),w===92?T:R)}function T(w){return w===92||w===124?(e.consume(w),R):R(w)}}function f2(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,d,c,f;const h=new o2;for(;++n<e.length;){const m=e[n],p=m[1];m[0]==="enter"?p.type==="tableHead"?(o=!1,u!==0&&(Jd(h,t,u,d,c),c=void 0,u=0),d={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",d,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,f=void 0,l=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,t]])),i=p.type==="tableDelimiterRow"?2:c?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(l[1]!==0&&(s[0]=s[1],f=Ji(h,t,l,i,void 0,f),l=[0,0,0,0]),s[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(s[0]=s[1],f=Ji(h,t,l,i,void 0,f)),l=s,s=[l[1],n,0,0])):p.type==="tableHead"?(o=!0,u=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(u=n,l[1]!==0?(s[0]=s[1],f=Ji(h,t,l,i,n,f)):s[1]!==0&&(f=Ji(h,t,s,i,n,f)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Jd(h,t,u,d,c),h.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=u2(t.events,n))}return e}function Ji(e,t,n,r,i,l){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(l.end=Object.assign({},Qn(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const u=Qn(t.events,n[1]);if(l={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const d=Qn(t.events,n[2]),c=Qn(t.events,n[3]),f={type:o,start:Object.assign({},d),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const h=t.events[n[2]],m=t.events[n[3]];if(h[1].end=Object.assign({},m[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,x=n[3]-n[2]-1;e.add(p,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(l.end=Object.assign({},Qn(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Jd(e,t,n,r,i){const l=[],s=Qn(t.events,n);i&&(i.end=Object.assign({},s),l.push(["exit",i,t])),r.end=Object.assign({},s),l.push(["exit",r,t]),e.add(n+1,0,l)}function Qn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const h2={name:"tasklistCheck",tokenize:p2};function m2(){return{text:{91:h2}}}function p2(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),l)}function l(u){return de(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return Q(u)?t(u):te(u)?e.check({tokenize:g2},t,n)(u):n(u)}}function g2(e,t,n){return le(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function y2(e){return Ym([US(),ZS(),s2(e),c2(),m2()])}const x2={};function v2(e){const t=this,n=e||x2,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(y2(n)),l.push(OS()),s.push(FS(n))}function k2({message:e,pinned:t,onCopy:n,onDelete:r,onTogglePin:i,onRegenerate:l}){const s=(e.role||"assistant").toLowerCase(),o=e.ts?cx(e.ts):"",u=e.content||e.message||"",d=s==="user";return a.jsxs("article",{className:`chat-message ${d?"chat-message-user":"chat-message-assistant"} ${t?"chat-message-pinned":""}`,children:[a.jsxs("header",{className:"chat-message-meta",children:[a.jsx("span",{className:"chat-message-role",children:s}),e.agent&&a.jsxs("span",{className:"chat-message-agent",children:["@",e.agent]}),o&&a.jsx("time",{className:"chat-message-time",children:o}),t&&a.jsx("span",{className:"chat-message-pin",children:"pinned"}),a.jsxs("div",{className:"chat-message-actions",children:[a.jsx("button",{type:"button",className:"chat-msg-action-btn",onClick:n,title:"Copy","aria-label":"Copy",children:a.jsx(Q1,{size:12})}),!d&&a.jsx("button",{type:"button",className:"chat-msg-action-btn",onClick:l,title:"Regenerate","aria-label":"Regenerate",children:a.jsx(Tt,{size:12})}),a.jsx("button",{type:"button",className:"chat-msg-action-btn",onClick:i,title:"Pin","aria-label":"Pin",children:a.jsx(tx,{size:12})}),a.jsx("button",{type:"button",className:"chat-msg-action-btn chat-msg-action-btn-danger",onClick:r,title:"Delete","aria-label":"Delete",children:a.jsx(zi,{size:12})})]})]}),a.jsx("div",{className:"chat-message-content markdown-body",children:a.jsx(sb,{remarkPlugins:[v2],children:u})})]})}function w2({messages:e,loading:t,activeProject:n,sessionId:r,pinned:i,onPickSuggestion:l,onCopy:s,onDelete:o,onTogglePin:u,onRegenerate:d}){const c=S.useRef(null);return S.useEffect(()=>{c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e]),t?a.jsx("div",{className:"chat-thread",ref:c,children:a.jsx(Nx,{count:3})}):n?e.length===0?a.jsx("div",{className:"chat-thread",ref:c,children:a.jsx(id,{variant:"empty",projectName:n.name,onPickSuggestion:l})}):a.jsx("div",{className:"chat-thread",ref:c,children:e.map((f,h)=>a.jsx(k2,{message:f,pinned:i.has(h),onCopy:()=>s(f),onDelete:()=>o(h),onTogglePin:()=>u(h),onRegenerate:()=>d(String(f.ts??h))},`${h}-${f.ts??""}`))}):a.jsx("div",{className:"chat-thread",ref:c,children:a.jsx(id,{variant:"no-project",projectName:"",onPickSuggestion:l})})}function b2({agent:e,setAgent:t,agents:n}){const[r,i]=S.useState(!1),l=S.useRef(null);S.useEffect(()=>{if(!r)return;const u=d=>{l.current&&!l.current.contains(d.target)&&i(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[r]);const s=e||"no agent",o=s.startsWith("@")?s.slice(1):s;return a.jsxs("div",{className:"chat-agent-chip",ref:l,children:[a.jsxs("button",{type:"button",className:"chat-agent-chip-btn",onClick:()=>i(u=>!u),"aria-haspopup":"listbox","aria-expanded":r,children:[a.jsx(jr,{size:14}),a.jsx("span",{children:o}),a.jsx(hs,{size:12,className:r?"rotated":""})]}),r&&a.jsxs("div",{className:"chat-agent-chip-menu",role:"listbox",children:[a.jsx("button",{type:"button",role:"option","aria-selected":!e,onClick:()=>{t(""),i(!1)},children:a.jsx("span",{children:"no agent"})}),n.map(u=>a.jsx("button",{type:"button",role:"option","aria-selected":e===u.name,onClick:()=>{t(u.name),i(!1)},children:a.jsxs("span",{children:["@",u.name]})},u.name))]})]})}function S2(e,t,n=240){S.useLayoutEffect(()=>{const r=e.current;if(!r)return;r.style.height="auto";const i=Math.min(r.scrollHeight,n);r.style.height=`${i}px`,r.style.overflowY=r.scrollHeight>n?"auto":"hidden"},[e,t,n])}function C2({agent:e,setAgent:t,model:n,setModel:r,text:i,setText:l,sending:s,onSend:o,attachments:u,setAttachments:d,suggestions:c,onPickSuggestion:f,agents:h,onAttach:m}){const p=S.useRef(null),x=S.useRef(null);S2(p,i,200);const k=y=>{if(y.key==="Enter"&&(y.metaKey||y.ctrlKey))y.preventDefault(),o();else if(y.key==="Enter"&&!y.shiftKey)y.preventDefault(),o();else if(y.key==="Tab"&&c.length){y.preventDefault();const v=c[0].cmd.split(" ")[0];l(`${v} `)}},g=y=>{const v=y.target.files;if(!v)return;const C=[];for(let z=0;z<v.length;z++)C.push(v[z].name);d(z=>[...z,...C]),y.target.value=""};return a.jsxs("div",{className:"chat-composer",children:[c.length>0&&a.jsx("div",{className:"chat-composer-suggestions",children:c.map(y=>a.jsxs("button",{type:"button",className:"chat-composer-suggestion",onClick:()=>{var C;const v=y.cmd.split(" ")[0];l(`${v} `),(C=p.current)==null||C.focus()},children:[a.jsx("span",{className:"mono",children:y.cmd}),a.jsx("span",{children:y.desc})]},y.cmd))}),u.length>0&&a.jsx("div",{className:"chat-composer-attachments",children:u.map((y,v)=>a.jsxs("span",{className:"chat-composer-attachment-tag",children:[a.jsx(Zc,{size:10})," ",y,a.jsx("button",{type:"button",className:"chat-composer-attachment-remove",onClick:()=>d(C=>C.filter((z,N)=>N!==v)),"aria-label":`Remove ${y}`,children:a.jsx(Bn,{size:10})})]},v))}),a.jsxs("div",{className:"chat-composer-input",children:[a.jsx(b2,{agent:e,setAgent:t,agents:h}),a.jsx("textarea",{ref:p,className:"chat-composer-textarea",placeholder:s?"Sending…":"Send a message…",rows:1,value:i,onChange:y=>l(y.target.value),onKeyDown:k,disabled:s,"aria-label":"Message"}),a.jsx("input",{ref:x,type:"file",multiple:!0,style:{display:"none"},onChange:g}),a.jsx("button",{type:"button",className:"chat-attach-btn",onClick:m,title:"Attach files","aria-label":"Attach files",children:a.jsx(Zc,{size:14})}),a.jsx("button",{type:"button",className:"chat-attach-btn",onClick:async()=>{if(!i.trim())return;const y=await hx(i);y!==i&&l(y)},title:"Enhance prompt with AI","aria-label":"Enhance prompt",children:a.jsx(Ul,{size:14})}),a.jsx("button",{type:"button",className:"chat-send-btn",onClick:o,disabled:s||!i.trim(),title:"Send (Enter)","aria-label":"Send message",children:a.jsx(Tm,{size:16})})]})]})}function j2(e){return a.jsx("div",{className:"chat-composer-wrap",children:a.jsx("div",{className:"chat-composer-pill",children:a.jsx(C2,{...e})})})}function N2({sessionId:e,messages:t,pinned:n,agent:r,model:i,agents:l,mcps:s,allCommands:o}){const[u,d]=S.useState(!1),[c,f]=S.useState(!1),h=u?l:l.slice(0,4),m=c?o:o.slice(0,4);return a.jsxs("div",{className:"chat-info",children:[a.jsxs("div",{className:"chat-info-card",children:[a.jsxs("div",{className:"chat-info-card-title",children:[a.jsx(En,{size:14})," Session"]}),a.jsxs("dl",{className:"env-table",children:[a.jsx("dt",{children:"id"}),a.jsx("dd",{className:"mono",children:e||"Live"}),a.jsx("dt",{children:"Messages"}),a.jsx("dd",{className:"mono",children:t.length}),a.jsx("dt",{children:"Pinned"}),a.jsx("dd",{className:"mono",children:n.size}),a.jsx("dt",{children:"Agent"}),a.jsx("dd",{className:"mono",children:r||"—"}),a.jsx("dt",{children:"Model"}),a.jsx("dd",{className:"mono ellipsis",title:i,children:i||"—"})]})]}),a.jsxs("div",{className:"chat-info-card",children:[a.jsxs("div",{className:"chat-info-card-title",children:[a.jsx(jr,{size:14})," Agents",a.jsx("span",{className:"chat-info-card-count",children:l.length})]}),a.jsx("ul",{className:"mod-mini-list",children:h.map(p=>a.jsxs("li",{className:"mod-mini",children:[a.jsxs("span",{className:"mod-mini-name",children:["@",p.name]}),a.jsx("span",{className:"mod-mini-meta",children:p.model||p.mode||""})]},p.name))}),l.length>4&&a.jsx("button",{type:"button",className:"chat-info-card-toggle",onClick:()=>d(p=>!p),children:u?"− Show fewer":`+ ${l.length-4} more`})]}),a.jsxs("div",{className:"chat-info-card",children:[a.jsxs("div",{className:"chat-info-card-title",children:[a.jsx(lx,{size:14})," MCPs",a.jsx("span",{className:"chat-info-card-count",children:s.length})]}),a.jsxs("ul",{className:"mod-mini-list",children:[s.length===0?a.jsx("li",{className:"muted",children:"No MCPs configured."}):null,s.map(p=>a.jsxs("li",{className:"mod-mini",children:[a.jsx("span",{className:"mod-mini-name",children:p.id}),a.jsx("span",{className:`mod-mini-pill ${p.enabled?"on":"off"}`,children:p.enabled?"on":"off"})]},p.id))]})]}),a.jsxs("div",{className:"chat-info-card",children:[a.jsxs("button",{type:"button",className:"chat-info-card-title chat-info-card-title-button",onClick:()=>f(p=>!p),"aria-expanded":c,children:[a.jsx(ax,{size:14})," Slash commands",a.jsx("span",{className:"chat-info-card-count",children:o.length}),a.jsx(hs,{size:12,className:`chat-info-card-chevron ${c?"open":""}`})]}),c&&a.jsx("ul",{className:"mod-mini-list",children:m.map(p=>a.jsxs("li",{children:[a.jsx("code",{children:p.cmd}),a.jsx("span",{className:"muted",children:p.desc})]},p.cmd))})]})]})}const E2="modulepreload",T2=function(e){return"/"+e},ef={},z2=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=T2(u),u in ef)return;ef[u]=!0;const d=u.endsWith(".css"),c=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":E2,d||(f.as="script"),f.crossOrigin="",f.href=u,o&&f.setAttribute("nonce",o),document.head.appendChild(f),d)return new Promise((h,m)=>{f.addEventListener("load",h),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function l(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&l(o.reason);return t().catch(l)})};function P2(e,t,n){const[r,i]=S.useState([]),[l,s]=S.useState([]),[o,u]=S.useState([]),[d,c]=S.useState(""),[f,h]=S.useState(!0),[m,p]=S.useState(!1),[x,k]=S.useState(new Set),g=S.useRef(null),y=S.useRef(null);S.useEffect(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},[r]);const v=S.useCallback(async L=>{var F;try{const I=L?`/chat?session=${encodeURIComponent(L)}`:"/chat?limit=200",V=await W.get(I);i(V.messages||[]),s(V.sessions||[])}catch(I){(F=y.current)==null||F.error(`Chat load failed: ${I.message}`)}finally{h(!1)}},[]),C=S.useCallback(async L=>{var F;h(!0);try{const I=await W.get(`/tasks/${encodeURIComponent(L)}/chat`);i(I.messages||[]),c(I.sessionId||L)}catch(I){(F=y.current)==null||F.error(`Task chat load failed: ${I.message}`)}finally{h(!1)}},[]),z=S.useCallback(async()=>{try{const L=await W.get("/chat/sessions");s(L.sessions||[])}catch{}},[]),N=S.useCallback(async()=>{try{const F=((await W.get("/opencode-sessions")).sessions||[]).map(I=>({...I,source:"opencode",opencodeUrl:`/opencode/session/${I.id}`,title:I.title||I.id}));u(F)}catch{}},[]),A=S.useCallback(async()=>{var L,F;if(!e.activeProject){(L=y.current)==null||L.error("Pick a project in Overview to scope chat sessions.");return}try{const I=await W.post("/chat/sessions",{});c(I.id),i([]),k(new Set),await v(I.id),z().catch(()=>{})}catch(I){(F=y.current)==null||F.error(`Create failed: ${I.message}`)}},[e.activeProject,v,z]),R=S.useCallback(async(L,F,I,V)=>{var D,H;const G={role:"user",content:L,agent:F,ts:new Date().toISOString()};i(b=>[...b,G]),p(!0);try{const b=await W.post("/chat",{message:L,agent:F,model:I,attachments:V||[]});if(b!=null&&b.messages)for(const K of b.messages)K.role==="assistant"&&i(Z=>Z.some(he=>he.ts===K.ts)?Z:[...Z,K]);else(D=y.current)==null||D.info("Still processing… the response will appear shortly.")}catch(b){i(K=>K.filter(Z=>Z!==G)),(H=y.current)==null||H.error(`Send failed: ${b.message}`)}finally{p(!1)}},[]),T=S.useCallback(async L=>{var F,I;if(!d){(F=y.current)==null||F.error("No active session to regenerate.");return}try{await W.post("/chat/regenerate",{sessionId:d,messageId:L}),await v(d)}catch(V){(I=y.current)==null||I.error(`Regenerate failed: ${V.message}`)}},[d,v]),w=S.useCallback(L=>{i(F=>F.filter((I,V)=>V!==L))},[]),j=S.useCallback(L=>{k(F=>{const I=new Set(F);return I.has(L)?I.delete(L):I.add(L),I})},[]),P=S.useCallback(L=>{var I;const F=L.content||L.message||"";(I=navigator.clipboard)==null||I.writeText(F).then(()=>{var V;return(V=y.current)==null?void 0:V.success("Copied.")},()=>{var V;return(V=y.current)==null?void 0:V.error("Copy failed.")})},[]);return S.useEffect(()=>{n?C(n):v(),N()},[]),S.useEffect(()=>{const L=F=>{var V;const I=(V=F.detail)==null?void 0:V.taskId;I&&C(I)};return window.addEventListener("bizar:setChatTask",L),()=>window.removeEventListener("bizar:setChatTask",L)},[C]),S.useEffect(()=>{let L=!1;return z2(async()=>{const{Ws:F}=await Promise.resolve().then(()=>bx);return{Ws:F}},void 0).then(({Ws:F})=>{if(L)return;new F().on(V=>{if(V.type!=="chat:message")return;const G=V.message;i(D=>D.some(b=>b.ts===G.ts)?D:[...D,G])})}),()=>{L=!0}},[]),{messages:r,sessions:l,opencodeSessions:o,sessionId:d,setSessionId:c,loading:f,sending:m,pinned:x,listRef:g,setToast:L=>{y.current=L},loadChat:v,loadTaskChat:C,refreshSessions:z,refreshOpencodeSessions:N,onCreateSession:A,onSend:R,onRegenerate:T,deleteMessage:w,togglePin:j,copyMessage:P}}const I2=[{cmd:"/visual-plan [on|off|status]",desc:"Toggle or view visual plan mode"},{cmd:"/plan new <slug> [template]",desc:"Create a new plan"},{cmd:"/plan list",desc:"List all plans"},{cmd:"/plan open <slug>",desc:"Open a plan in the viewer"},{cmd:"/plan status <slug> <status>",desc:"Set plan status"},{cmd:"/plan get <slug>",desc:"Fetch plan canvas"},{cmd:"/plan add <slug> --title T --type kind",desc:"Add element to a plan"},{cmd:"/plan update <slug> <id>",desc:"Update a plan element"},{cmd:"/plan delete <slug> <id>",desc:"Delete a plan element"},{cmd:'/plan comment <slug> [id] "text"',desc:"Add a comment"},{cmd:"/plan comments <slug> [id]",desc:"Read plan comments"},{cmd:"/bizar",desc:"Launch Bizar dashboard"},{cmd:"/bizar <args>",desc:"Route via Bizar menu"},{cmd:"/audit",desc:"Run security audit"},{cmd:"/explain <q>",desc:"Read-only code Q&A"},{cmd:"/init",desc:"Initialize .bizar/ in this project"},{cmd:"/learn",desc:"Extract patterns from session"},{cmd:"/pr-review",desc:"PR review"},{cmd:"/help | /commands",desc:"Show all Bizar commands"}];function A2(e){const[t,n]=S.useState(""),r=S.useMemo(()=>[...I2,...(e.mods||[]).flatMap(l=>{var s;return(s=l.entry)!=null&&s.command?[{cmd:`/${l.id}`,desc:l.description||l.name,mod:l.id}]:[]})],[e.mods]),i=S.useMemo(()=>{if(!t.startsWith("/")||t.includes(" "))return[];const l=t.toLowerCase();return r.filter(s=>s.cmd.toLowerCase().startsWith(l)).slice(0,6)},[t,r]);return{allCommands:r,suggestions:i,setQuery:n}}var M2=Object.defineProperty,Gl=Object.getOwnPropertySymbols,Fp=Object.prototype.hasOwnProperty,$p=Object.prototype.propertyIsEnumerable,tf=(e,t,n)=>t in e?M2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ya=(e,t)=>{for(var n in t||(t={}))Fp.call(t,n)&&tf(e,n,t[n]);if(Gl)for(var n of Gl(t))$p.call(t,n)&&tf(e,n,t[n]);return e},xa=(e,t)=>{var n={};for(var r in e)Fp.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gl)for(var r of Gl(e))t.indexOf(r)<0&&$p.call(e,r)&&(n[r]=e[r]);return n};/**
346
- * @license QR Code generator library (TypeScript)
347
- * Copyright (c) Project Nayuki.
348
- * SPDX-License-Identifier: MIT
349
- */var On;(e=>{const t=class ee{constructor(u,d,c,f){if(this.version=u,this.errorCorrectionLevel=d,this.modules=[],this.isFunction=[],u<ee.MIN_VERSION||u>ee.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=u*4+17;let h=[];for(let p=0;p<this.size;p++)h.push(!1);for(let p=0;p<this.size;p++)this.modules.push(h.slice()),this.isFunction.push(h.slice());this.drawFunctionPatterns();const m=this.addEccAndInterleave(c);if(this.drawCodewords(m),f==-1){let p=1e9;for(let x=0;x<8;x++){this.applyMask(x),this.drawFormatBits(x);const k=this.getPenaltyScore();k<p&&(f=x,p=k),this.applyMask(x)}}i(0<=f&&f<=7),this.mask=f,this.applyMask(f),this.drawFormatBits(f),this.isFunction=[]}static encodeText(u,d){const c=e.QrSegment.makeSegments(u);return ee.encodeSegments(c,d)}static encodeBinary(u,d){const c=e.QrSegment.makeBytes(u);return ee.encodeSegments([c],d)}static encodeSegments(u,d,c=1,f=40,h=-1,m=!0){if(!(ee.MIN_VERSION<=c&&c<=f&&f<=ee.MAX_VERSION)||h<-1||h>7)throw new RangeError("Invalid value");let p,x;for(p=c;;p++){const v=ee.getNumDataCodewords(p,d)*8,C=s.getTotalBits(u,p);if(C<=v){x=C;break}if(p>=f)throw new RangeError("Data too long")}for(const v of[ee.Ecc.MEDIUM,ee.Ecc.QUARTILE,ee.Ecc.HIGH])m&&x<=ee.getNumDataCodewords(p,v)*8&&(d=v);let k=[];for(const v of u){n(v.mode.modeBits,4,k),n(v.numChars,v.mode.numCharCountBits(p),k);for(const C of v.getData())k.push(C)}i(k.length==x);const g=ee.getNumDataCodewords(p,d)*8;i(k.length<=g),n(0,Math.min(4,g-k.length),k),n(0,(8-k.length%8)%8,k),i(k.length%8==0);for(let v=236;k.length<g;v^=253)n(v,8,k);let y=[];for(;y.length*8<k.length;)y.push(0);return k.forEach((v,C)=>y[C>>>3]|=v<<7-(C&7)),new ee(p,d,y,h)}getModule(u,d){return 0<=u&&u<this.size&&0<=d&&d<this.size&&this.modules[d][u]}getModules(){return this.modules}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const u=this.getAlignmentPatternPositions(),d=u.length;for(let c=0;c<d;c++)for(let f=0;f<d;f++)c==0&&f==0||c==0&&f==d-1||c==d-1&&f==0||this.drawAlignmentPattern(u[c],u[f]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(u){const d=this.errorCorrectionLevel.formatBits<<3|u;let c=d;for(let h=0;h<10;h++)c=c<<1^(c>>>9)*1335;const f=(d<<10|c)^21522;i(f>>>15==0);for(let h=0;h<=5;h++)this.setFunctionModule(8,h,r(f,h));this.setFunctionModule(8,7,r(f,6)),this.setFunctionModule(8,8,r(f,7)),this.setFunctionModule(7,8,r(f,8));for(let h=9;h<15;h++)this.setFunctionModule(14-h,8,r(f,h));for(let h=0;h<8;h++)this.setFunctionModule(this.size-1-h,8,r(f,h));for(let h=8;h<15;h++)this.setFunctionModule(8,this.size-15+h,r(f,h));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let u=this.version;for(let c=0;c<12;c++)u=u<<1^(u>>>11)*7973;const d=this.version<<12|u;i(d>>>18==0);for(let c=0;c<18;c++){const f=r(d,c),h=this.size-11+c%3,m=Math.floor(c/3);this.setFunctionModule(h,m,f),this.setFunctionModule(m,h,f)}}drawFinderPattern(u,d){for(let c=-4;c<=4;c++)for(let f=-4;f<=4;f++){const h=Math.max(Math.abs(f),Math.abs(c)),m=u+f,p=d+c;0<=m&&m<this.size&&0<=p&&p<this.size&&this.setFunctionModule(m,p,h!=2&&h!=4)}}drawAlignmentPattern(u,d){for(let c=-2;c<=2;c++)for(let f=-2;f<=2;f++)this.setFunctionModule(u+f,d+c,Math.max(Math.abs(f),Math.abs(c))!=1)}setFunctionModule(u,d,c){this.modules[d][u]=c,this.isFunction[d][u]=!0}addEccAndInterleave(u){const d=this.version,c=this.errorCorrectionLevel;if(u.length!=ee.getNumDataCodewords(d,c))throw new RangeError("Invalid argument");const f=ee.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][d],h=ee.ECC_CODEWORDS_PER_BLOCK[c.ordinal][d],m=Math.floor(ee.getNumRawDataModules(d)/8),p=f-m%f,x=Math.floor(m/f);let k=[];const g=ee.reedSolomonComputeDivisor(h);for(let v=0,C=0;v<f;v++){let z=u.slice(C,C+x-h+(v<p?0:1));C+=z.length;const N=ee.reedSolomonComputeRemainder(z,g);v<p&&z.push(0),k.push(z.concat(N))}let y=[];for(let v=0;v<k[0].length;v++)k.forEach((C,z)=>{(v!=x-h||z>=p)&&y.push(C[v])});return i(y.length==m),y}drawCodewords(u){if(u.length!=Math.floor(ee.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let d=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let f=0;f<this.size;f++)for(let h=0;h<2;h++){const m=c-h,x=(c+1&2)==0?this.size-1-f:f;!this.isFunction[x][m]&&d<u.length*8&&(this.modules[x][m]=r(u[d>>>3],7-(d&7)),d++)}}i(d==u.length*8)}applyMask(u){if(u<0||u>7)throw new RangeError("Mask value out of range");for(let d=0;d<this.size;d++)for(let c=0;c<this.size;c++){let f;switch(u){case 0:f=(c+d)%2==0;break;case 1:f=d%2==0;break;case 2:f=c%3==0;break;case 3:f=(c+d)%3==0;break;case 4:f=(Math.floor(c/3)+Math.floor(d/2))%2==0;break;case 5:f=c*d%2+c*d%3==0;break;case 6:f=(c*d%2+c*d%3)%2==0;break;case 7:f=((c+d)%2+c*d%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[d][c]&&f&&(this.modules[d][c]=!this.modules[d][c])}}getPenaltyScore(){let u=0;for(let h=0;h<this.size;h++){let m=!1,p=0,x=[0,0,0,0,0,0,0];for(let k=0;k<this.size;k++)this.modules[h][k]==m?(p++,p==5?u+=ee.PENALTY_N1:p>5&&u++):(this.finderPenaltyAddHistory(p,x),m||(u+=this.finderPenaltyCountPatterns(x)*ee.PENALTY_N3),m=this.modules[h][k],p=1);u+=this.finderPenaltyTerminateAndCount(m,p,x)*ee.PENALTY_N3}for(let h=0;h<this.size;h++){let m=!1,p=0,x=[0,0,0,0,0,0,0];for(let k=0;k<this.size;k++)this.modules[k][h]==m?(p++,p==5?u+=ee.PENALTY_N1:p>5&&u++):(this.finderPenaltyAddHistory(p,x),m||(u+=this.finderPenaltyCountPatterns(x)*ee.PENALTY_N3),m=this.modules[k][h],p=1);u+=this.finderPenaltyTerminateAndCount(m,p,x)*ee.PENALTY_N3}for(let h=0;h<this.size-1;h++)for(let m=0;m<this.size-1;m++){const p=this.modules[h][m];p==this.modules[h][m+1]&&p==this.modules[h+1][m]&&p==this.modules[h+1][m+1]&&(u+=ee.PENALTY_N2)}let d=0;for(const h of this.modules)d=h.reduce((m,p)=>m+(p?1:0),d);const c=this.size*this.size,f=Math.ceil(Math.abs(d*20-c*10)/c)-1;return i(0<=f&&f<=9),u+=f*ee.PENALTY_N4,i(0<=u&&u<=2568888),u}getAlignmentPatternPositions(){if(this.version==1)return[];{const u=Math.floor(this.version/7)+2,d=this.version==32?26:Math.ceil((this.version*4+4)/(u*2-2))*2;let c=[6];for(let f=this.size-7;c.length<u;f-=d)c.splice(1,0,f);return c}}static getNumRawDataModules(u){if(u<ee.MIN_VERSION||u>ee.MAX_VERSION)throw new RangeError("Version number out of range");let d=(16*u+128)*u+64;if(u>=2){const c=Math.floor(u/7)+2;d-=(25*c-10)*c-55,u>=7&&(d-=36)}return i(208<=d&&d<=29648),d}static getNumDataCodewords(u,d){return Math.floor(ee.getNumRawDataModules(u)/8)-ee.ECC_CODEWORDS_PER_BLOCK[d.ordinal][u]*ee.NUM_ERROR_CORRECTION_BLOCKS[d.ordinal][u]}static reedSolomonComputeDivisor(u){if(u<1||u>255)throw new RangeError("Degree out of range");let d=[];for(let f=0;f<u-1;f++)d.push(0);d.push(1);let c=1;for(let f=0;f<u;f++){for(let h=0;h<d.length;h++)d[h]=ee.reedSolomonMultiply(d[h],c),h+1<d.length&&(d[h]^=d[h+1]);c=ee.reedSolomonMultiply(c,2)}return d}static reedSolomonComputeRemainder(u,d){let c=d.map(f=>0);for(const f of u){const h=f^c.shift();c.push(0),d.forEach((m,p)=>c[p]^=ee.reedSolomonMultiply(m,h))}return c}static reedSolomonMultiply(u,d){if(u>>>8||d>>>8)throw new RangeError("Byte out of range");let c=0;for(let f=7;f>=0;f--)c=c<<1^(c>>>7)*285,c^=(d>>>f&1)*u;return i(c>>>8==0),c}finderPenaltyCountPatterns(u){const d=u[1];i(d<=this.size*3);const c=d>0&&u[2]==d&&u[3]==d*3&&u[4]==d&&u[5]==d;return(c&&u[0]>=d*4&&u[6]>=d?1:0)+(c&&u[6]>=d*4&&u[0]>=d?1:0)}finderPenaltyTerminateAndCount(u,d,c){return u&&(this.finderPenaltyAddHistory(d,c),d=0),d+=this.size,this.finderPenaltyAddHistory(d,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(u,d){d[0]==0&&(u+=this.size),d.pop(),d.unshift(u)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(o,u,d){if(u<0||u>31||o>>>u)throw new RangeError("Value out of range");for(let c=u-1;c>=0;c--)d.push(o>>>c&1)}function r(o,u){return(o>>>u&1)!=0}function i(o){if(!o)throw new Error("Assertion error")}const l=class ke{constructor(u,d,c){if(this.mode=u,this.numChars=d,this.bitData=c,d<0)throw new RangeError("Invalid argument");this.bitData=c.slice()}static makeBytes(u){let d=[];for(const c of u)n(c,8,d);return new ke(ke.Mode.BYTE,u.length,d)}static makeNumeric(u){if(!ke.isNumeric(u))throw new RangeError("String contains non-numeric characters");let d=[];for(let c=0;c<u.length;){const f=Math.min(u.length-c,3);n(parseInt(u.substring(c,c+f),10),f*3+1,d),c+=f}return new ke(ke.Mode.NUMERIC,u.length,d)}static makeAlphanumeric(u){if(!ke.isAlphanumeric(u))throw new RangeError("String contains unencodable characters in alphanumeric mode");let d=[],c;for(c=0;c+2<=u.length;c+=2){let f=ke.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c))*45;f+=ke.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c+1)),n(f,11,d)}return c<u.length&&n(ke.ALPHANUMERIC_CHARSET.indexOf(u.charAt(c)),6,d),new ke(ke.Mode.ALPHANUMERIC,u.length,d)}static makeSegments(u){return u==""?[]:ke.isNumeric(u)?[ke.makeNumeric(u)]:ke.isAlphanumeric(u)?[ke.makeAlphanumeric(u)]:[ke.makeBytes(ke.toUtf8ByteArray(u))]}static makeEci(u){let d=[];if(u<0)throw new RangeError("ECI assignment value out of range");if(u<128)n(u,8,d);else if(u<16384)n(2,2,d),n(u,14,d);else if(u<1e6)n(6,3,d),n(u,21,d);else throw new RangeError("ECI assignment value out of range");return new ke(ke.Mode.ECI,0,d)}static isNumeric(u){return ke.NUMERIC_REGEX.test(u)}static isAlphanumeric(u){return ke.ALPHANUMERIC_REGEX.test(u)}getData(){return this.bitData.slice()}static getTotalBits(u,d){let c=0;for(const f of u){const h=f.mode.numCharCountBits(d);if(f.numChars>=1<<h)return 1/0;c+=4+h+f.bitData.length}return c}static toUtf8ByteArray(u){u=encodeURI(u);let d=[];for(let c=0;c<u.length;c++)u.charAt(c)!="%"?d.push(u.charCodeAt(c)):(d.push(parseInt(u.substring(c+1,c+3),16)),c+=2);return d}};l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=l;e.QrSegment=l})(On||(On={}));(e=>{(t=>{const n=class{constructor(i,l){this.ordinal=i,this.formatBits=l}};n.LOW=new n(0,1),n.MEDIUM=new n(1,0),n.QUARTILE=new n(2,3),n.HIGH=new n(3,2),t.Ecc=n})(e.QrCode||(e.QrCode={}))})(On||(On={}));(e=>{(t=>{const n=class{constructor(i,l){this.modeBits=i,this.numBitsCharCount=l}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};n.NUMERIC=new n(1,[10,12,14]),n.ALPHANUMERIC=new n(2,[9,11,13]),n.BYTE=new n(4,[8,16,16]),n.KANJI=new n(8,[8,10,12]),n.ECI=new n(7,[0,0,0]),t.Mode=n})(e.QrSegment||(e.QrSegment={}))})(On||(On={}));var lr=On;/**
350
- * @license qrcode.react
351
- * Copyright (c) Paul O'Shannessy
352
- * SPDX-License-Identifier: ISC
353
- */var L2={L:lr.QrCode.Ecc.LOW,M:lr.QrCode.Ecc.MEDIUM,Q:lr.QrCode.Ecc.QUARTILE,H:lr.QrCode.Ecc.HIGH},Bp=128,Up="L",Hp="#FFFFFF",Vp="#000000",Wp=!1,Qp=1,R2=4,D2=0,_2=.1;function qp(e,t=0){const n=[];return e.forEach(function(r,i){let l=null;r.forEach(function(s,o){if(!s&&l!==null){n.push(`M${l+t} ${i+t}h${o-l}v1H${l+t}z`),l=null;return}if(o===r.length-1){if(!s)return;l===null?n.push(`M${o+t},${i+t} h1v1H${o+t}z`):n.push(`M${l+t},${i+t} h${o+1-l}v1H${l+t}z`);return}s&&l===null&&(l=o)})}),n.join("")}function Yp(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((i,l)=>l<t.x||l>=t.x+t.w?i:!1))}function O2(e,t,n,r){if(r==null)return null;const i=e.length+n*2,l=Math.floor(t*_2),s=i/t,o=(r.width||l)*s,u=(r.height||l)*s,d=r.x==null?e.length/2-o/2:r.x*s,c=r.y==null?e.length/2-u/2:r.y*s,f=r.opacity==null?1:r.opacity;let h=null;if(r.excavate){let p=Math.floor(d),x=Math.floor(c),k=Math.ceil(o+d-p),g=Math.ceil(u+c-x);h={x:p,y:x,w:k,h:g}}const m=r.crossOrigin;return{x:d,y:c,h:u,w:o,excavation:h,opacity:f,crossOrigin:m}}function F2(e,t){return t!=null?Math.max(Math.floor(t),0):e?R2:D2}function Kp({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:l,size:s,boostLevel:o}){let u=Ne.useMemo(()=>{const p=(Array.isArray(e)?e:[e]).reduce((x,k)=>(x.push(...lr.QrSegment.makeSegments(k)),x),[]);return lr.QrCode.encodeSegments(p,L2[t],n,void 0,void 0,o)},[e,t,n,o]);const{cells:d,margin:c,numCells:f,calculatedImageSettings:h}=Ne.useMemo(()=>{let m=u.getModules();const p=F2(r,i),x=m.length+p*2,k=O2(m,s,p,l);return{cells:m,margin:p,numCells:x,calculatedImageSettings:k}},[u,s,l,r,i]);return{qrcode:u,margin:c,cells:d,numCells:f,calculatedImageSettings:h}}var $2=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),B2=Ne.forwardRef(function(t,n){const r=t,{value:i,size:l=Bp,level:s=Up,bgColor:o=Hp,fgColor:u=Vp,includeMargin:d=Wp,minVersion:c=Qp,boostLevel:f,marginSize:h,imageSettings:m}=r,x=xa(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:k}=x,g=xa(x,["style"]),y=m==null?void 0:m.src,v=Ne.useRef(null),C=Ne.useRef(null),z=Ne.useCallback(F=>{v.current=F,typeof n=="function"?n(F):n&&(n.current=F)},[n]),[N,A]=Ne.useState(!1),{margin:R,cells:T,numCells:w,calculatedImageSettings:j}=Kp({value:i,level:s,minVersion:c,boostLevel:f,includeMargin:d,marginSize:h,imageSettings:m,size:l});Ne.useEffect(()=>{if(v.current!=null){const F=v.current,I=F.getContext("2d");if(!I)return;let V=T;const G=C.current,D=j!=null&&G!==null&&G.complete&&G.naturalHeight!==0&&G.naturalWidth!==0;D&&j.excavation!=null&&(V=Yp(T,j.excavation));const H=window.devicePixelRatio||1;F.height=F.width=l*H;const b=l/w*H;I.scale(b,b),I.fillStyle=o,I.fillRect(0,0,w,w),I.fillStyle=u,$2?I.fill(new Path2D(qp(V,R))):T.forEach(function(K,Z){K.forEach(function(E,he){E&&I.fillRect(he+R,Z+R,1,1)})}),j&&(I.globalAlpha=j.opacity),D&&I.drawImage(G,j.x+R,j.y+R,j.w,j.h)}}),Ne.useEffect(()=>{A(!1)},[y]);const P=ya({height:l,width:l},k);let L=null;return y!=null&&(L=Ne.createElement("img",{src:y,key:y,style:{display:"none"},onLoad:()=>{A(!0)},ref:C,crossOrigin:j==null?void 0:j.crossOrigin})),Ne.createElement(Ne.Fragment,null,Ne.createElement("canvas",ya({style:P,height:l,width:l,ref:z,role:"img"},g)),L)});B2.displayName="QRCodeCanvas";var Gp=Ne.forwardRef(function(t,n){const r=t,{value:i,size:l=Bp,level:s=Up,bgColor:o=Hp,fgColor:u=Vp,includeMargin:d=Wp,minVersion:c=Qp,boostLevel:f,title:h,marginSize:m,imageSettings:p}=r,x=xa(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:k,cells:g,numCells:y,calculatedImageSettings:v}=Kp({value:i,level:s,minVersion:c,boostLevel:f,includeMargin:d,marginSize:m,imageSettings:p,size:l});let C=g,z=null;p!=null&&v!=null&&(v.excavation!=null&&(C=Yp(g,v.excavation)),z=Ne.createElement("image",{href:p.src,height:v.h,width:v.w,x:v.x+k,y:v.y+k,preserveAspectRatio:"none",opacity:v.opacity,crossOrigin:v.crossOrigin}));const N=qp(C,k);return Ne.createElement("svg",ya({height:l,width:l,viewBox:`0 0 ${y} ${y}`,ref:n,role:"img"},x),!!h&&Ne.createElement("title",null,h),Ne.createElement("path",{fill:o,d:`M0,0 h${y}v${y}H0z`,shapeRendering:"crispEdges"}),Ne.createElement("path",{fill:u,d:N,shapeRendering:"crispEdges"}),z)});Gp.displayName="QRCodeSVG";function U2({tabs:e,activeTab:t,onChange:n}){return a.jsx("nav",{className:"mobile-bottom-nav",role:"navigation","aria-label":"Mobile navigation",children:e.map(r=>{const i=r.icon;return a.jsxs("button",{type:"button",className:pu("mobile-nav-btn",t===r.id&&"mobile-nav-btn-active"),onClick:()=>n(r.id),"aria-label":r.label,"aria-current":t===r.id?"page":void 0,children:[a.jsx(i,{size:22}),a.jsx("span",{className:"mobile-nav-label",children:r.label})]},r.id)})})}function Et({open:e,onClose:t,title:n,children:r,actions:i,maxHeight:l="85vh"}){const s=S.useRef(null),o=S.useRef(null),u=S.useId(),d=S.useRef(null),c=S.useRef(null),f=S.useRef(0),h=S.useRef(0),m=()=>{var g;return((g=s.current)==null?void 0:g.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))??[]};if(S.useEffect(()=>{if(!e)return;d.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const g=y=>{var A;if(y.key==="Escape"&&t(),y.key!=="Tab")return;const v=Array.from(m());if(v.length===0){y.preventDefault(),(A=s.current)==null||A.focus();return}const C=v[0],z=v[v.length-1],N=document.activeElement;if(y.shiftKey){(!N||N===C||N===s.current)&&(y.preventDefault(),z==null||z.focus());return}N===z&&(y.preventDefault(),C==null||C.focus())};return window.addEventListener("keydown",g),requestAnimationFrame(()=>{var y,v;((y=o.current)==null?void 0:y.focus())??((v=s.current)==null||v.focus())}),()=>{var y;window.removeEventListener("keydown",g),(y=d.current)==null||y.focus()}},[e,t]),S.useEffect(()=>(e?(h.current=window.scrollY,document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${h.current}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%"):(document.documentElement.style.overflow="",document.body.style.overflow="",document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width=""),()=>{document.documentElement.style.overflow="",document.body.style.overflow="",document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width="",window.scrollTo(0,h.current)}),[e]),!e)return null;const p=g=>{var y;g.isPrimary&&(c.current=g.clientY,f.current=0,(y=s.current)==null||y.setPointerCapture(g.pointerId))},x=g=>{if(c.current==null||!s.current)return;const y=Math.max(0,g.clientY-c.current);f.current=y,s.current.style.transform=`translateY(${y}px)`},k=g=>{if(!s.current)return;g&&s.current.hasPointerCapture(g.pointerId)&&s.current.releasePointerCapture(g.pointerId);const y=f.current;s.current.style.transform="",c.current=null,f.current=0,y>72&&t()};return a.jsx("div",{className:"mobile-sheet-overlay",onClick:t,children:a.jsxs("div",{ref:s,className:"mobile-sheet",style:{maxHeight:l},onClick:g=>g.stopPropagation(),role:"dialog","aria-modal":!0,"aria-label":n?void 0:"Sheet","aria-labelledby":n?u:void 0,tabIndex:-1,children:[a.jsx("div",{className:"mobile-sheet-handle",onPointerDown:p,onPointerMove:x,onPointerUp:k,onPointerCancel:k,"aria-hidden":"true"}),a.jsxs("div",{className:"mobile-sheet-header",children:[n?a.jsx("h3",{id:u,className:"mobile-sheet-title",children:n}):a.jsx("div",{}),a.jsx("button",{ref:o,type:"button",className:"mobile-icon-btn",onClick:t,"aria-label":"Close",children:a.jsx(Bn,{size:18})})]}),a.jsx("div",{className:"mobile-sheet-content",children:r}),i&&a.jsx("div",{className:"mobile-sheet-actions",children:i})]})})}function H2(e){switch(e){case"success":return"✓";case"error":return"✗";case"warning":return"⚠";default:return"ℹ"}}function V2(e){const t=new Date(e),r=Date.now()-t.getTime();return r<6e4?"just now":r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:t.toLocaleDateString()}function W2({onSelect:e}){const[t,n]=S.useState(!1),[r,i]=S.useState([]),[l,s]=S.useState(0),o=async()=>{var c;try{const f=await W.get("/notifications");i(f.notifications||[]),s(((c=f.stats)==null?void 0:c.unread)||0)}catch{}};S.useEffect(()=>{o()},[]),S.useEffect(()=>{t&&o()},[t]);const u=async()=>{try{await W.post("/notifications/read-all"),i(c=>c.map(f=>({...f,read:!0}))),s(0)}catch{}},d=async c=>{try{await W.post(`/notifications/${encodeURIComponent(c)}/read`),i(f=>f.map(h=>h.id===c?{...h,read:!0}:h)),s(f=>Math.max(0,f-1))}catch{}};return a.jsxs(a.Fragment,{children:[a.jsxs("button",{type:"button",className:"mobile-icon-btn mobile-notif-btn",onClick:()=>n(!0),"aria-label":`Notifications${l>0?` (${l} unread)`:""}`,children:[a.jsx(Gc,{size:20}),l>0&&a.jsx("span",{className:"mobile-notif-badge",children:l>9?"9+":l})]}),a.jsx(Et,{open:t,onClose:()=>n(!1),title:"Notifications",actions:l>0?a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",style:{width:"100%"},onClick:u,children:[a.jsx(B1,{size:14})," Mark all read"]}):void 0,children:a.jsxs("div",{className:"mobile-notif-list",children:[r.length===0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx(Gc,{size:32}),a.jsx("p",{children:"No notifications"})]}),r.map(c=>a.jsxs("button",{type:"button",className:`mobile-notif-item ${c.read?"read":"unread"}`,onClick:()=>{c.read||d(c.id),e(c),n(!1)},children:[a.jsx("span",{className:`mobile-notif-icon severity-${c.severity}`,children:H2(c.severity)}),a.jsxs("div",{className:"mobile-notif-body",children:[a.jsx("span",{className:"mobile-notif-title",children:c.title||c.message}),c.message&&c.title&&a.jsx("span",{className:"mobile-notif-text",children:c.message}),a.jsx("span",{className:"mobile-notif-time",children:V2(c.ts)})]}),!c.read&&a.jsx("span",{className:"mobile-notif-dot"})]},c.id))]})})]})}const Q2={activity:"Activity",chat:"Chat",tasks:"Tasks",settings:"Settings",more:"More",plans:"Plans",agents:"Agents",skills:"Skills",mods:"Mods",schedules:"Schedules",history:"History",config:"Config","plan-detail":"Plan","agent-detail":"Agent","task-detail":"Task"};function q2({activeTab:e,snapshot:t,onSearch:n,onNavigate:r}){const[i,l]=S.useState(!1),s=async o=>{try{await W.post(`/projects/${encodeURIComponent(o)}/activate`),l(!1),window.location.reload()}catch{}};return a.jsxs("header",{className:"mobile-topbar",children:[a.jsxs("div",{className:"mobile-topbar-left",children:[a.jsx("span",{className:"mobile-logo",children:"ᛒ"}),(t==null?void 0:t.activeProject)&&a.jsxs("button",{type:"button",className:"mobile-project-btn",onClick:()=>l(!0),"aria-label":"Select project",children:[a.jsx("span",{className:"mobile-project-name",children:t.activeProject.name}),a.jsx(hs,{size:14})]}),a.jsx("span",{className:"mobile-title",children:Q2[e]||"Bizar"})]}),a.jsxs("div",{className:"mobile-topbar-right",children:[a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:n,"aria-label":"Search",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("path",{d:"m21 21-4.35-4.35"})]})}),a.jsx(W2,{onSelect:o=>{r("notification",o.link||"",o.meta??null)}}),(t==null?void 0:t.activeProject)&&a.jsx(Et,{open:i,onClose:()=>l(!1),title:"Projects",children:a.jsx("div",{className:"mobile-project-list",children:(t.projects||[]).map(o=>{var u,d;return a.jsxs("button",{type:"button",className:`mobile-project-item ${o.id===((u=t.activeProject)==null?void 0:u.id)?"active":""}`,onClick:()=>s(o.id),children:[a.jsx("div",{className:"mobile-project-status","data-status":o.status}),a.jsxs("div",{className:"mobile-project-info",children:[a.jsx("span",{className:"mobile-project-item-name",children:o.name}),a.jsx("span",{className:"mobile-project-item-path",children:o.path})]}),o.id===((d=t.activeProject)==null?void 0:d.id)&&a.jsx("span",{className:"mobile-active-badge",children:"active"})]},o.id)})})})]})]})}const Y2=["all","tasks","agents","bg","artifacts","mods"],oo={all:"All",tasks:"Tasks",agents:"Agents",bg:"Background",artifacts:"Plans",mods:"Mods"};function K2({snapshot:e,onRefresh:t}){var R;const[n,r]=S.useState(((R=e.overview)==null?void 0:R.recentActivity)||[]),[i,l]=S.useState(!0),[s,o]=S.useState("all"),[u,d]=S.useState(!1),[c,f]=S.useState(null),[h,m]=S.useState(""),[p,x]=S.useState(!1);S.useEffect(()=>{var T;(T=e.overview)!=null&&T.recentActivity?(r(e.overview.recentActivity),l(!1)):k()},[e.overview]);const k=async()=>{var T;try{const w=await W.get("/snapshot");r(((T=w.overview)==null?void 0:T.recentActivity)||[])}catch{}finally{l(!1)}},g=s==="all"?n:n.filter(T=>{var w,j,P,L,F,I;return s==="tasks"?(w=T.kind)==null?void 0:w.startsWith("task"):s==="agents"?(j=T.kind)==null?void 0:j.startsWith("agent"):s==="bg"?((P=T.kind)==null?void 0:P.includes("bg"))||((L=T.kind)==null?void 0:L.includes("schedule")):s==="artifacts"?(F=T.kind)==null?void 0:F.includes("artifacts"):s==="mods"?(I=T.kind)==null?void 0:I.includes("mod"):!0}),y=e.agents||[],v=e.tasks||[],C=v.filter(T=>T.status==="doing"||T.status==="queued"),z=v.filter(T=>T.status==="done"),N=async()=>{if(!(!h.trim()||p)){x(!0);try{await W.post("/chat",{message:h.trim(),agent:"odin"}),m(""),await t().catch(()=>{}),await k()}catch{}finally{x(!1)}}},A=async()=>{await t().catch(()=>{}),await k()};return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-submit-hero",children:[a.jsx("textarea",{className:"mobile-submit-input",placeholder:"What needs to be done? Describe a task, bug, or refactor for Odin to artifacts…",value:h,onChange:T=>m(T.target.value),rows:2}),a.jsxs("div",{className:"mobile-submit-actions",children:[a.jsx("div",{className:"mobile-submit-chips",children:["Implement feature","Fix bug","Refactor","Investigate","Write tests"].map(T=>a.jsx("button",{type:"button",className:"mobile-submit-chip",onClick:()=>m(w=>w?`${w} ${T}`:T),children:T},T))}),a.jsxs("button",{type:"button",className:"mobile-btn",disabled:!h.trim()||p,onClick:N,children:[a.jsx(Tm,{size:14})," Submit to Odin"]})]})]}),a.jsxs("div",{className:"mobile-stats",children:[a.jsxs("div",{className:"mobile-stat",children:[a.jsx("div",{className:"mobile-stat-value",children:y.length}),a.jsx("div",{className:"mobile-stat-label",children:"Agents"})]}),a.jsxs("div",{className:"mobile-stat",children:[a.jsx("div",{className:"mobile-stat-value",children:C.length}),a.jsx("div",{className:"mobile-stat-label",children:"Active"})]}),a.jsxs("div",{className:"mobile-stat",children:[a.jsx("div",{className:"mobile-stat-value",children:z.length}),a.jsx("div",{className:"mobile-stat-label",children:"Done"})]}),a.jsxs("div",{className:"mobile-stat",children:[a.jsx("div",{className:"mobile-stat-value",children:e.artifacts.length||0}),a.jsx("div",{className:"mobile-stat-label",children:"Plans"})]})]}),i&&n.length===0&&a.jsx("div",{className:"mobile-loading mobile-loading-inline",children:a.jsx("p",{children:"Loading activity…"})}),a.jsxs("div",{className:"mobile-activity-header",children:[a.jsx("h3",{className:"mobile-section-title",style:{margin:0},children:"Recent Activity"}),a.jsxs("div",{style:{display:"flex",gap:4},children:[a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>d(T=>!T),"aria-label":u?"Resume":"Pause",children:u?a.jsx(Bl,{size:14}):a.jsx(ex,{size:14})}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:A,"aria-label":"Refresh",children:a.jsx(Tt,{size:14})})]})]}),a.jsx("div",{className:"mobile-search-scopes",children:Y2.map(T=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${s===T?"active":""}`,onClick:()=>o(T),children:oo[T]},T))}),y.length>0&&a.jsxs("section",{className:"mobile-section",children:[a.jsxs("h3",{className:"mobile-section-title",children:[a.jsx(jr,{size:14})," Agents"]}),a.jsx("div",{className:"mobile-card-list",children:y.slice(0,6).map(T=>a.jsxs("div",{className:"mobile-agent-card",children:[a.jsx("div",{className:"mobile-agent-dot","data-status":T.status||"idle"}),a.jsxs("div",{className:"mobile-agent-info",children:[a.jsx("span",{className:"mobile-agent-name",children:T.name}),a.jsx("span",{className:"mobile-agent-meta",children:T.status||"idle"})]})]},T.name))})]}),!u&&g.length>0&&a.jsx("section",{className:"mobile-section",children:a.jsx("div",{className:"mobile-card-list",children:g.slice(0,30).map((T,w)=>a.jsxs("button",{type:"button",className:"mobile-event-item",onClick:()=>f(T),children:[a.jsx("span",{className:"mobile-event-kind","data-kind":T.kind,children:oo[T.kind]||T.kind}),a.jsx("span",{className:"mobile-event-msg",children:G2(T)}),a.jsx("span",{className:"mobile-event-time",children:fr(T.ts)})]},`${T.ts}-${T.kind}-${w}`))})}),!u&&g.length===0&&n.length>0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx(na,{size:40}),a.jsx("p",{children:"No matching activity."}),a.jsx("p",{className:"muted",children:"Try a different filter."})]}),c&&a.jsx(Et,{open:!0,onClose:()=>f(null),title:oo[c.kind]||c.kind,children:a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Kind"}),a.jsx("span",{children:c.kind})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Time"}),a.jsx("span",{children:new Date(c.ts).toLocaleString()})]}),Object.entries(c).filter(([T])=>!["ts","kind"].includes(T)).map(([T,w])=>a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:T}),a.jsx("span",{style:{fontSize:12,maxWidth:200,wordBreak:"break-all"},children:typeof w=="object"?JSON.stringify(w):String(w)})]},T))]})}),y.length===0&&C.length===0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx(na,{size:40}),a.jsx("p",{children:"No activity yet."}),a.jsx("p",{className:"muted",children:"Start a task or chat to see things here."})]})]})}function G2(e){const t=e.kind||"";return t.includes("task")?`Task: ${e.title||e.id||"updated"}`:t.includes("agent")?`Agent: ${e.name||"status changed"}`:t.includes("artifacts")?`Plan: ${e.slug||"changed"}`:t.includes("mod")?`Mod: ${e.name||"changed"}`:t.includes("schedule")?`Schedule: ${e.name||"triggered"}`:JSON.stringify(e).slice(0,80)}function xn({open:e,onClose:t,title:n,children:r,actions:i}){const l=S.useRef(null),s=S.useRef(null),o=S.useRef(null),u=S.useId(),d=S.useRef(0);return S.useEffect(()=>{if(!e)return;o.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const c='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',f=h=>{var g,y;if(h.key==="Escape"&&t(),h.key!=="Tab")return;const m=Array.from(((g=l.current)==null?void 0:g.querySelectorAll(c))??[]);if(m.length===0){h.preventDefault(),(y=l.current)==null||y.focus();return}const p=m[0],x=m[m.length-1],k=document.activeElement;if(h.shiftKey){(!k||k===p||k===l.current)&&(h.preventDefault(),x==null||x.focus());return}k===x&&(h.preventDefault(),p==null||p.focus())};return window.addEventListener("keydown",f),d.current=window.scrollY,document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${d.current}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%",requestAnimationFrame(()=>{var h,m;((h=s.current)==null?void 0:h.focus())??((m=l.current)==null||m.focus())}),()=>{var h;window.removeEventListener("keydown",f),document.documentElement.style.overflow="",document.body.style.overflow="",document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width="",window.scrollTo(0,d.current),(h=o.current)==null||h.focus()}},[e,t]),e?a.jsx("div",{className:"mobile-modal-overlay",onClick:c=>{c.target===c.currentTarget&&t()},children:a.jsxs("div",{ref:l,className:"mobile-modal",onClick:c=>c.stopPropagation(),role:"dialog","aria-modal":!0,"aria-label":n?void 0:"Modal","aria-labelledby":n?u:void 0,tabIndex:-1,children:[a.jsxs("div",{className:"mobile-modal-header",children:[n?a.jsx("h2",{id:u,className:"mobile-modal-title",children:n}):a.jsx("div",{}),a.jsx("button",{ref:s,type:"button",className:"mobile-icon-btn",onClick:t,"aria-label":"Close",children:a.jsx(Bn,{size:20})})]}),a.jsx("div",{className:"mobile-modal-content",children:r}),i&&a.jsx("div",{className:"mobile-modal-actions",children:i})]})}):null}const Xp=["reasoning","code","design","planning","gitops","analysis"],nf={reasoning:"var(--accent)",code:"var(--info)",design:"var(--success)",planning:"var(--warning)",gitops:"var(--error)",analysis:"var(--text-dim)"};function rf({snapshot:e,onBack:t,onOpenAgent:n,selectedAgent:r,onRefresh:i}){const[l,s]=S.useState(e.agents||[]),[o,u]=S.useState(!e.agents),[d,c]=S.useState(""),[f,h]=S.useState(""),[m,p]=S.useState(null),[x,k]=S.useState(!1),[g,y]=S.useState(""),[v,C]=S.useState(!1);S.useEffect(()=>{if(r){const j=l.find(P=>P.name===r);j&&p(j)}},[r,l]);const z=async()=>{try{const j=await W.get("/agents");s(j.agents||[])}catch{}finally{u(!1)}},N=l.filter(j=>{if(d&&j.category!==d)return!1;if(f){const P=f.toLowerCase();if(!j.name.toLowerCase().includes(P)&&!(j.description||"").toLowerCase().includes(P))return!1}return!0}),A=async(j,P)=>{try{await W.post(`/agents/${encodeURIComponent(j)}/invoke`,{prompt:P}),C(!1),y("")}catch{}},R=async j=>{try{await W.post(`/agents/${encodeURIComponent(j)}/restart`),await z()}catch{}},T=async j=>{if(confirm(`Delete agent "${j}"?`))try{await W.del(`/agents/${encodeURIComponent(j)}`),s(P=>P.filter(L=>L.name!==j)),p(null),i==null||i()}catch{}},w=async j=>{try{const P=await W.post("/agents",j);s(L=>[...L,P]),k(!1),i==null||i()}catch{}};return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search agents…",value:f,onChange:j=>h(j.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>z(),"aria-label":"Refresh",children:a.jsx(Tt,{size:16})}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>k(!0),"aria-label":"New agent",children:a.jsx(at,{size:16})})]}),a.jsxs("div",{className:"mobile-search-scopes",children:[a.jsx("button",{type:"button",className:`mobile-scope-chip ${d?"":"active"}`,onClick:()=>c(""),children:"All"}),Xp.map(j=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${d===j?"active":""}`,onClick:()=>c(j),children:j},j))]}),o?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):N.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(jr,{size:40}),a.jsx("p",{children:"No agents found."})]}):a.jsx("div",{className:"mobile-card-list",children:N.map(j=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>{p(j),n(j.name)},children:[a.jsx("div",{className:"mobile-agent-dot","data-status":j.status||"idle"}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:j.name}),a.jsx("span",{className:"mobile-list-meta",children:j.model||j.mode||"—"})]}),j.category&&a.jsx("span",{className:"mobile-list-badge",style:{color:nf[j.category]||"var(--text-dim)"},children:j.category}),a.jsx("span",{className:"mobile-list-badge","data-status":j.status||"idle",children:j.status||"idle"})]},j.name))}),m&&a.jsx(Et,{open:!0,onClose:()=>p(null),title:m.name,actions:a.jsxs("div",{className:"mobile-task-detail-actions",children:[a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>{y(""),C(!0)},children:[a.jsx(Bl,{size:14})," Invoke"]}),(m.isStuck||m.status==="error"||m.status==="working")&&a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",onClick:()=>R(m.name),children:[a.jsx(ix,{size:14})," Restart"]}),a.jsx("button",{type:"button",className:"mobile-btn mobile-btn-danger",onClick:()=>T(m.name),children:a.jsx(zi,{size:14})})]}),children:a.jsxs("div",{className:"mobile-agent-detail",children:[a.jsxs("div",{className:"mobile-agent-detail-status",children:[a.jsx("span",{className:"mobile-agent-dot","data-status":m.status||"idle"}),a.jsx("span",{className:"mobile-agent-detail-status-text",children:m.status||"idle"}),m.category&&a.jsx("span",{className:"mobile-list-badge",style:{color:nf[m.category]},children:m.category})]}),a.jsx("p",{className:"mobile-agent-detail-desc",children:m.description||"No description."}),a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Model"}),a.jsx("span",{className:"mono",children:m.model||"—"})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Mode"}),a.jsx("span",{children:m.mode||"subagent"})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Path"}),a.jsx("span",{className:"mono",style:{fontSize:11},children:m.path})]}),m.lastError&&a.jsxs("div",{className:"mobile-task-detail-row",style:{color:"var(--error)"},children:[a.jsx("span",{children:"Last error"}),a.jsx("span",{children:m.lastError.message})]}),m.tasksTotal!=null&&m.tasksTotal>0&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Success rate"}),a.jsxs("span",{children:[Math.round((m.successRate||0)*100),"%"]})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Last modified"}),a.jsx("span",{children:fr(m.mtime)})]})]})]})}),a.jsxs(xn,{open:v,onClose:()=>C(!1),title:`Invoke ${m==null?void 0:m.name}`,actions:a.jsxs("button",{type:"button",className:"mobile-btn",style:{width:"100%"},disabled:!g.trim(),onClick:()=>{m&&A(m.name,g.trim())},children:[a.jsx(Bl,{size:14})," Invoke"]}),children:[a.jsxs("p",{className:"muted",style:{marginBottom:12},children:["Model: ",a.jsx("span",{className:"mono",children:(m==null?void 0:m.model)||"—"})]}),a.jsx("textarea",{className:"mobile-input",rows:5,placeholder:"What should this agent do?",value:g,onChange:j=>y(j.target.value),autoFocus:!0})]}),a.jsx(X2,{open:x,onClose:()=>k(!1),onCreate:w})]})}function X2({open:e,onClose:t,onCreate:n}){const[r,i]=S.useState(""),[l,s]=S.useState(""),[o,u]=S.useState(""),[d,c]=S.useState("subagent"),[f,h]=S.useState("#8b5cf6"),[m,p]=S.useState(""),[x,k]=S.useState(""),[g,y]=S.useState(""),v=C=>{C.preventDefault(),r.trim()&&(n({name:r.trim(),description:l.trim(),model:o,mode:d,color:f,tools:[],tags:x.split(",").map(z=>z.trim()).filter(Boolean),category:m,prompt:g}),i(""),s(""),u(""),c("subagent"),h("#8b5cf6"),p(""),k(""),y(""))};return a.jsx(xn,{open:e,onClose:t,title:"New Agent",actions:a.jsxs("button",{type:"submit",form:"new-agent-form",className:"mobile-btn",style:{width:"100%"},children:[a.jsx(at,{size:14})," Create"]}),children:a.jsxs("form",{id:"new-agent-form",onSubmit:v,className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Name *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"my-agent",pattern:"[a-z0-9][a-z0-9-]{0,63}",value:r,onChange:C=>i(C.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Description"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"What does this agent do?",value:l,onChange:C=>s(C.target.value)}),a.jsx("label",{className:"mobile-field-label",children:"Model"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"(provider default)",value:o,onChange:C=>u(C.target.value)}),a.jsx("label",{className:"mobile-field-label",children:"Category"}),a.jsxs("select",{className:"mobile-input",value:m,onChange:C=>p(C.target.value),children:[a.jsx("option",{value:"",children:"None"}),Xp.map(C=>a.jsx("option",{value:C,children:C},C))]}),a.jsx("label",{className:"mobile-field-label",children:"Tags (comma-separated)"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"tag1, tag2",value:x,onChange:C=>k(C.target.value)})]})})}function Z2({snapshot:e,settings:t,setActiveTab:n,initialTaskId:r,onClearTaskId:i}){const l=yx(),s=px(),o=P2(e,t,r??""),[u,d]=S.useState(""),[c,f]=S.useState(t.defaultAgent||"odin"),[h,m]=S.useState(t.defaultModel||""),[p,x]=S.useState([]),[k,g]=S.useState(!1),[y,v]=S.useState(!1),[C,z]=S.useState(!1),N=S.useRef(null),{allCommands:A,suggestions:R,setQuery:T}=A2(e);S.useEffect(()=>{T(u)},[u,T]);const w=()=>{var I;return(I=N.current)==null?void 0:I.click()},j=I=>{const V=I.target.files;if(!V)return;const G=[];for(let D=0;D<V.length;D++)G.push(V[D].name);x(D=>{const H=G.filter(b=>!D.includes(b));return[...D,...H]}),N.current&&(N.current.value="")},P=()=>{const I=u.trim();I&&(d(""),T(""),o.onSend(I,c,h,p))},L=async()=>{if(!k){if(!e.activeProject){l.warning("Pick a project in Overview to scope chat sessions.",4e3);return}g(!0);try{const I=await fetch("/chat/sessions",{method:"POST"}).then(V=>V.json());o.loadChat(I.id),l.success(`Session ${I.id} created.`)}catch(I){l.error(`Create failed: ${I.message}`)}finally{g(!1)}}},F=I=>{s.open({title:"Delete message?",children:a.jsx("p",{style:{margin:0},children:"This action cannot be undone."}),footer:a.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[a.jsx(Vl,{variant:"secondary",size:"sm",onClick:()=>s.close(),children:"Cancel"}),a.jsx(Vl,{variant:"danger",size:"sm",onClick:()=>{s.close(),o.deleteMessage(I)},children:"Delete"})]})})};return a.jsxs("div",{className:"chat-shell",children:[a.jsx(Sx,{activeProject:e.activeProject,sessionCount:o.sessions.length,sessionsOpen:y,infoOpen:C,onToggleSessions:()=>v(I=>!I),onToggleInfo:()=>z(I=>!I),onOpenOverview:()=>n==null?void 0:n("overview")}),a.jsxs("div",{className:"chat-body",children:[a.jsx("aside",{className:`chat-sessions ${y?"":"chat-sessions-hidden"}`,children:a.jsx(jx,{sessions:o.sessions,opencodeSessions:o.opencodeSessions,activeSessionId:o.sessionId,activeProject:e.activeProject,onCreateSession:L,onSelectSession:o.loadChat,creating:k})}),a.jsxs("main",{className:"chat-main",children:[a.jsx(w2,{messages:o.messages,loading:o.loading,activeProject:e.activeProject,sessionId:o.sessionId,pinned:o.pinned,onPickSuggestion:I=>d(I),onCopy:I=>o.copyMessage(I),onDelete:F,onTogglePin:o.togglePin,onRegenerate:o.onRegenerate}),a.jsx(j2,{agent:c,setAgent:f,model:h,setModel:m,text:u,setText:d,sending:o.sending,onSend:P,attachments:p,setAttachments:x,suggestions:R,onPickSuggestion:I=>d(`${I.split(" ")[0]} `),agents:e.agents||[],onAttach:w,sessionsOpen:y,infoOpen:C}),a.jsx("input",{ref:N,type:"file",multiple:!0,style:{display:"none"},onChange:j})]}),a.jsx("aside",{className:`chat-info ${C?"":"chat-info-hidden"}`,children:a.jsx(N2,{sessionId:o.sessionId,messages:o.messages,pinned:o.pinned,agent:c,model:h,agents:e.agents||[],mcps:e.mcps||[],allCommands:A})})]})]})}function J2({onBack:e}){const[t,n]=S.useState([]),[r,i]=S.useState(!0),[l,s]=S.useState({}),[o,u]=S.useState(!1),d=async()=>{try{const x=await W.get("/config"),k=Object.entries(x).map(([g,y])=>({key:g,value:y,type:c(y)}));n(k),s(Object.fromEntries(Object.entries(x).map(([g,y])=>[g,y])))}catch{}finally{i(!1)}};S.useEffect(()=>{d()},[]);const c=x=>typeof x=="boolean"?"boolean":typeof x=="number"?"number":typeof x=="string"?"string":Array.isArray(x)?"array":x&&typeof x=="object"?"object":"unknown",f=(x,k)=>{s(g=>({...g,[x]:k}))},h=async()=>{u(!0);try{await W.patch("/config",l),await d()}catch{}finally{u(!1)}},m=(x,k)=>{s(g=>({...g,[x]:k}))},p=x=>{const k=l[x.key];switch(x.type){case"boolean":return a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:!!k,onChange:g=>f(x.key,g.target.checked)}),a.jsx("span",{className:"mobile-toggle-slider"})]});case"number":return a.jsx("input",{className:"mobile-input mobile-input-sm",type:"number",inputMode:"numeric",value:String(k??""),onChange:g=>f(x.key,Number(g.target.value))});case"string":return a.jsx("input",{className:"mobile-input mobile-input-sm",type:"text",value:String(k??""),onChange:g=>f(x.key,g.target.value)});case"object":case"array":return a.jsx("textarea",{className:"mobile-input mobile-input-sm",rows:2,value:JSON.stringify(k??null,null,2),onChange:g=>{try{f(x.key,JSON.parse(g.target.value))}catch{}}});default:return a.jsx("span",{className:"mobile-setting-value mono",children:String(k??"null")})}};return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsxs("span",{style:{fontSize:14,color:"var(--text-muted)",flex:1},children:[t.length," config entries"]}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>d(),"aria-label":"Refresh",children:a.jsx(Tt,{size:16})}),a.jsxs("button",{type:"button",className:"mobile-btn",disabled:o,onClick:()=>h(),children:[a.jsx(Em,{size:14})," ",o?"Saving…":"Save all"]})]}),r?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):t.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(kr,{size:40}),a.jsx("p",{children:"No config entries."})]}):a.jsx("div",{className:"mobile-config-list",children:t.map(x=>a.jsxs("div",{className:"mobile-config-row",children:[a.jsxs("div",{className:"mobile-config-key",children:[a.jsx("span",{className:"mono",children:x.key}),a.jsx("span",{className:"mobile-config-type",children:x.type})]}),a.jsx("div",{className:"mobile-config-value",children:p(x)}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>m(x.key,x.defaultValue),"aria-label":"Reset to default",title:"Reset",children:a.jsx(rx,{size:14})})]},x.key))})]})}function eC({onBack:e}){const[t,n]=S.useState([]),[r,i]=S.useState(!0),[l,s]=S.useState(null),[o,u]=S.useState(""),d=async()=>{try{const m=await W.get("/history");if(Array.isArray(m.history)){n(m.history);return}if(Array.isArray(m.projects)){const p=new Map;for(const x of m.events||[]){const k=x.projectId;if(!k)continue;const g=p.get(k);(!g||new Date(x.ts).getTime()>new Date(g.ts).getTime())&&p.set(k,x)}n(m.projects.map(x=>{const k=p.get(x.id);return{id:x.id,ts:x.lastAccessed||(k==null?void 0:k.ts)||new Date(0).toISOString(),agent:x.name,taskCount:x.tasks.total,summary:`${x.path} · ${x.tasks.done}/${x.tasks.total} done · ${x.plans} plan${x.plans===1?"":"s"}`,output:k?`${k.kind}${k.text?` — ${k.text}`:""}`:"No recent events."}}));return}n([])}catch{}finally{i(!1)}};S.useEffect(()=>{d()},[]);const c=m=>{if(!m)return"—";const p=Math.floor(m/1e3);if(p<60)return`${p}s`;const x=Math.floor(p/60),k=p%60;return`${x}m ${k}s`},f=m=>new Date(m).toLocaleString(),h=o.trim()?t.filter(m=>{const p=o.toLowerCase();return(m.agent||"session").toLowerCase().includes(p)||(m.summary||"").toLowerCase().includes(p)||(m.output||"").toLowerCase().includes(p)}):t;return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search history…",value:o,onChange:m=>u(m.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>d(),"aria-label":"Refresh",children:a.jsx(Tt,{size:16})})]}),r?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):h.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(ia,{size:40}),a.jsx("p",{children:t.length===0?"No history yet.":"No matching sessions."})]}):a.jsx("div",{className:"mobile-card-list",children:h.map(m=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>s(m),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(ia,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:m.agent||"Session"}),a.jsxs("span",{className:"mobile-list-meta",children:[f(m.ts),m.duration?` · ${c(m.duration)}`:"",m.taskCount?` · ${m.taskCount} tasks`:""]})]})]},m.id))}),l&&a.jsxs(Et,{open:!0,onClose:()=>s(null),title:"Session Detail",children:[a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Agent"}),a.jsx("span",{children:l.agent||"—"})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Started"}),a.jsx("span",{children:f(l.ts)})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Duration"}),a.jsx("span",{children:c(l.duration)})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Tasks"}),a.jsx("span",{children:l.taskCount||0})]})]}),l.summary&&a.jsxs("div",{style:{marginTop:12},children:[a.jsx("h4",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4},children:"Summary"}),a.jsx("p",{style:{fontSize:13},children:l.summary})]}),l.output&&a.jsxs("div",{style:{marginTop:12},children:[a.jsx("h4",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:4},children:"Output"}),a.jsxs("pre",{className:"mono",style:{fontSize:11,whiteSpace:"pre-wrap",wordBreak:"break-all",background:"var(--bg-elev-2)",padding:8,borderRadius:6},children:[l.output.slice(0,1e3),l.output.length>1e3?"…":""]})]})]})]})}function tC({snapshot:e,onBack:t}){const[n,r]=S.useState(e.mods||[]),[i,l]=S.useState(!e.mods),[s,o]=S.useState(""),[u,d]=S.useState("all"),[c,f]=S.useState(null),h=async()=>{try{const x=await W.get("/mods");r(x.mods||[])}catch{}finally{l(!1)}};S.useEffect(()=>{e.mods?(r(e.mods),l(!1)):h()},[e.mods]);const m=async(x,k)=>{try{await W.patch(`/mods/${encodeURIComponent(x)}`,{enabled:k}),r(g=>g.map(y=>y.id===x?{...y,enabled:k}:y)),(c==null?void 0:c.id)===x&&f(g=>g&&{...g,enabled:k})}catch{}},p=n.filter(x=>{if(u==="enabled"&&!x.enabled||u==="disabled"&&x.enabled)return!1;if(s){const k=s.toLowerCase();return x.name.toLowerCase().includes(k)||x.description.toLowerCase().includes(k)}return!0});return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search mods…",value:s,onChange:x=>o(x.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>h(),"aria-label":"Refresh",children:a.jsx(Tt,{size:16})})]}),a.jsx("div",{className:"mobile-search-scopes",children:["all","enabled","disabled"].map(x=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${u===x?"active":""}`,onClick:()=>d(x),children:x.charAt(0).toUpperCase()+x.slice(1)},x))}),i?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):p.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(kr,{size:40}),a.jsx("p",{children:"No mods found."})]}):a.jsx("div",{className:"mobile-card-list",children:p.map(x=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>f(x),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(kr,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:x.name}),a.jsxs("span",{className:"mobile-list-meta",children:["v",x.version," · ",x.author]})]}),a.jsx("span",{className:`mobile-list-badge ${x.enabled?"badge-on":"badge-off"}`,children:x.enabled?"on":"off"})]},x.id))}),c&&a.jsx(Et,{open:!0,onClose:()=>f(null),title:c.name,actions:a.jsx("div",{className:"mobile-task-detail-actions",children:a.jsxs("button",{type:"button",className:"mobile-btn",style:{flex:1},onClick:()=>{c&&m(c.id,!c.enabled)},children:[a.jsx(Nm,{size:14})," ",c.enabled?"Disable":"Enable"]})}),children:a.jsxs("div",{className:"mobile-agent-detail",children:[a.jsx("p",{className:"mobile-agent-detail-desc",children:c.description||"No description."}),a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Version"}),a.jsx("span",{className:"mono",children:c.version})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Author"}),a.jsx("span",{children:c.author})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Bizar"}),a.jsx("span",{className:"mono",children:c.bizar})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Type"}),a.jsx("span",{children:c.type})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Permissions"}),a.jsx("span",{children:c.permissions.length})]}),c.installedAt&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Installed"}),a.jsx("span",{children:new Date(c.installedAt).toLocaleDateString()})]})]})]})})]})}function nC({snapshot:e,onNavigate:t}){var s,o,u;const[n,r]=S.useState(""),i=[{id:"artifacts",icon:Dn,label:"Plans",count:e.artifacts.length||0,desc:"Visual artifacts with elements & comments"},{id:"agents",icon:jr,label:"Agents",count:((s=e.agents)==null?void 0:s.length)||0,desc:"The Norse pantheon"},{id:"skills",icon:kr,label:"Skills",count:null,desc:"Agent capabilities & tools"},{id:"mods",icon:kr,label:"Mods",count:((o=e.mods)==null?void 0:o.length)||0,desc:"Installed modifications"},{id:"schedules",icon:ra,label:"Schedules",count:((u=e.schedules)==null?void 0:u.length)||0,desc:"Cron jobs & automated tasks"},{id:"history",icon:ia,label:"History",count:null,desc:"Past sessions & outputs"},{id:"config",icon:zm,label:"Config",count:null,desc:"Key-value configuration editor"}],l=n.trim()?i.filter(d=>d.label.toLowerCase().includes(n.toLowerCase())||d.desc.toLowerCase().includes(n.toLowerCase())):i;return a.jsxs("div",{className:"mobile-view",children:[a.jsx("div",{className:"mobile-tasks-toolbar",children:a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search…",value:n,onChange:d=>r(d.target.value),style:{flex:1}})}),a.jsx("div",{className:"mobile-card-list",children:l.map(d=>{const c=d.icon;return a.jsxs("button",{type:"button",className:"mobile-more-nav-item",onClick:()=>t(d.id),children:[a.jsx("div",{className:"mobile-more-nav-icon",children:a.jsx(c,{size:20})}),a.jsxs("div",{className:"mobile-more-nav-content",children:[a.jsxs("span",{className:"mobile-more-nav-label",children:[d.label,d.count!=null&&a.jsx("span",{className:"mobile-more-nav-count",children:d.count})]}),a.jsx("span",{className:"mobile-more-nav-desc",children:d.desc})]}),a.jsx(Xc,{size:16,className:"mobile-more-nav-arrow"})]},d.id)})}),a.jsx("div",{className:"mobile-more-footer",children:a.jsxs("a",{href:"/?desktop=1",className:"mobile-more-link",children:["Switch to Desktop ",a.jsx(Xc,{size:14})]})})]})}const Ru=[{id:"task",label:"Task",color:"var(--info)"},{id:"note",label:"Note",color:"var(--text-dim)"},{id:"decision",label:"Decision",color:"var(--accent)"},{id:"question",label:"Question",color:"var(--warning)"}];function ao(e){var t;return((t=Ru.find(n=>n.id===e))==null?void 0:t.color)||"var(--text-dim)"}function rC({type:e,size:t=12}){switch(e){case"task":return a.jsx(Hl,{size:t,style:{color:"var(--info)"}});case"note":return a.jsx(ed,{size:t,style:{color:"var(--text-dim)"}});case"decision":return a.jsx(Hl,{size:t,style:{color:"var(--accent)"}});case"question":return a.jsx(V1,{size:t,style:{color:"var(--warning)"}});default:return a.jsx(ed,{size:t})}}function iC({slug:e,onBack:t}){const[n,r]=S.useState(null),[i,l]=S.useState(null),[s,o]=S.useState(!0),[u,d]=S.useState(!1),[c,f]=S.useState(null),[h,m]=S.useState(!1),[p,x]=S.useState(!1),[k,g]=S.useState(!1),[y,v]=S.useState(""),C=async()=>{o(!0);try{const T=await W.get(`/plans/${encodeURIComponent(e)}`);r(T.canvas),l(T.meta)}catch{}finally{o(!1)}};S.useEffect(()=>{C()},[e]);const z=async(T,w,j)=>{try{const P=((n==null?void 0:n.elements)||[]).reduce((F,I)=>Math.max(F,I.x||0),40),L=((n==null?void 0:n.elements)||[]).reduce((F,I)=>Math.max(F,I.y||0),40);await W.post(`/plans/${encodeURIComponent(e)}/elements`,{type:T,title:w,content:j,x:20+P,y:20+L,width:240,height:120}),await C(),x(!1)}catch{}},N=async(T,w)=>{try{await W.put(`/plans/${encodeURIComponent(e)}/elements/${encodeURIComponent(T)}`,w),await C(),f(null)}catch{}},A=async T=>{if(confirm("Delete this element?"))try{await W.del(`/plans/${encodeURIComponent(e)}/elements/${encodeURIComponent(T)}`),f(null),await C()}catch{}},R=async(T,w)=>{try{const j=w?`/plans/${encodeURIComponent(e)}/elements/${encodeURIComponent(w)}/comments`:`/plans/${encodeURIComponent(e)}/comments`;await W.post(j,{text:T,elementId:w}),await C(),v(""),g(!1)}catch{}};return s||!n||!i?a.jsx("div",{className:"mobile-view",children:a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading canvas…"})})}):a.jsxs("div",{className:"mobile-view mobile-view-canvas",children:[a.jsxs("div",{className:"mobile-canvas-bar",children:[a.jsxs("div",{className:"mobile-canvas-meta",children:[a.jsx("span",{className:"mobile-canvas-title",children:i.title||e}),a.jsx("span",{className:"mobile-canvas-status","data-status":i.status,children:i.status})]}),a.jsxs("div",{className:"mobile-canvas-actions",children:[a.jsx("button",{type:"button",className:`mobile-icon-btn ${u?"active":""}`,onClick:()=>d(T=>!T),"aria-label":u?"Done editing":"Edit",children:a.jsx(jm,{size:16})}),a.jsxs("button",{type:"button",className:"mobile-icon-btn",onClick:()=>m(T=>!T),"aria-label":"Comments",children:[a.jsx(En,{size:16}),n.comments.length>0&&a.jsx("span",{className:"mobile-canvas-comment-count",children:n.comments.length})]}),u&&a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>x(!0),"aria-label":"Add element",children:a.jsx(at,{size:16})})]})]}),a.jsxs("div",{className:"mobile-canvas-elements",children:[n.elements.length===0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx("p",{children:"No elements yet."}),u&&a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>x(!0),children:[a.jsx(at,{size:14})," Add Element"]})]}),n.elements.map(T=>a.jsxs("button",{type:"button",className:`mobile-canvas-element ${(c==null?void 0:c.id)===T.id?"selected":""}`,style:{borderColor:ao(T.type)},onClick:()=>{u&&f(T)},"aria-pressed":(c==null?void 0:c.id)===T.id,children:[a.jsxs("div",{className:"mobile-canvas-el-header",style:{background:`${ao(T.type)}18`},children:[a.jsx(rC,{type:T.type,size:12}),a.jsx("span",{className:"mobile-canvas-el-type",style:{color:ao(T.type)},children:T.type}),T.status&&T.status!=="open"&&a.jsx("span",{className:"mobile-canvas-el-status",children:T.status})]}),a.jsx("div",{className:"mobile-canvas-el-title",children:T.title||"Untitled"}),T.content&&a.jsxs("div",{className:"mobile-canvas-el-content",children:[T.content.slice(0,120),T.content.length>120?"…":""]}),a.jsxs("div",{className:"mobile-canvas-el-comments",children:[a.jsx(En,{size:10}),n.comments.filter(w=>w.elementId===T.id).length]})]},T.id))]}),h&&a.jsxs("div",{className:"mobile-canvas-comments",children:[a.jsxs("div",{className:"mobile-canvas-comments-header",children:[a.jsxs("h4",{children:["Comments (",n.comments.length,")"]}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>m(!1),children:a.jsx(Bn,{size:16})})]}),a.jsxs("div",{className:"mobile-canvas-comment-list",children:[n.comments.length===0&&a.jsx("p",{className:"mobile-empty-inline",children:"No comments yet."}),n.comments.map(T=>a.jsxs("div",{className:"mobile-canvas-comment",children:[a.jsxs("div",{className:"mobile-canvas-comment-head",children:[a.jsx("span",{className:"mono",children:T.author}),a.jsx("span",{className:"muted",children:fr(T.created)})]}),a.jsx("div",{className:"mobile-canvas-comment-text",children:T.text})]},T.id))]}),a.jsxs("div",{className:"mobile-canvas-comment-input",children:[a.jsx("textarea",{className:"mobile-input",rows:2,placeholder:"Add a comment…",value:y,onChange:T=>v(T.target.value)}),a.jsx("button",{type:"button",className:"mobile-btn",disabled:!y.trim(),onClick:()=>{R(y.trim(),null)},children:"Post"})]})]}),c&&a.jsx(Et,{open:!0,onClose:()=>f(null),title:`Edit ${c.title||c.type}`,actions:a.jsxs("div",{className:"mobile-task-detail-actions",children:[a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-danger",onClick:()=>A(c.id),children:[a.jsx(zi,{size:14})," Delete"]}),a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>g(!0),children:[a.jsx(En,{size:14})," Comment"]})]}),children:a.jsx(lC,{element:c,onSave:T=>N(c.id,T),onClose:()=>f(null)})}),a.jsx(sC,{open:p,onClose:()=>x(!1),onAdd:z}),a.jsx(xn,{open:k,onClose:()=>g(!1),title:"Add Comment",actions:a.jsxs("button",{type:"button",className:"mobile-btn",style:{width:"100%"},disabled:!y.trim(),onClick:()=>{R(y.trim(),(c==null?void 0:c.id)||null),g(!1)},children:[a.jsx(En,{size:14})," Post"]}),children:a.jsx("textarea",{className:"mobile-input",rows:3,placeholder:"Your comment…",value:y,onChange:T=>v(T.target.value),autoFocus:!0})})]})}function lC({element:e,onSave:t,onClose:n}){const[r,i]=S.useState(e.type),[l,s]=S.useState(e.title||""),[o,u]=S.useState(e.content||""),[d,c]=S.useState(e.status||"open");return a.jsxs("form",{className:"mobile-task-form",onSubmit:f=>{f.preventDefault(),t({type:r,title:l,content:o,status:d}),n()},children:[a.jsx("label",{className:"mobile-field-label",children:"Type"}),a.jsx("select",{className:"mobile-input",value:r,onChange:f=>i(f.target.value),children:Ru.map(f=>a.jsx("option",{value:f.id,children:f.label},f.id))}),a.jsx("label",{className:"mobile-field-label",children:"Title"}),a.jsx("input",{className:"mobile-input",type:"text",value:l,onChange:f=>s(f.target.value)}),a.jsx("label",{className:"mobile-field-label",children:"Status"}),a.jsx("input",{className:"mobile-input",type:"text",value:d,onChange:f=>c(f.target.value),placeholder:"open / done / blocked"}),a.jsx("label",{className:"mobile-field-label",children:"Content (markdown)"}),a.jsx("textarea",{className:"mobile-input",rows:4,value:o,onChange:f=>u(f.target.value)}),a.jsx("button",{type:"submit",className:"mobile-btn",style:{width:"100%",marginTop:8},children:"Save"})]})}function sC({open:e,onClose:t,onAdd:n}){const[r,i]=S.useState("task"),[l,s]=S.useState(""),[o,u]=S.useState(""),d=c=>{c.preventDefault(),l.trim()&&(n(r,l.trim(),o.trim()),s(""),u(""))};return a.jsx(xn,{open:e,onClose:t,title:"Add Element",actions:a.jsxs("button",{type:"submit",form:"add-el-form",className:"mobile-btn",style:{width:"100%"},children:[a.jsx(at,{size:14})," Add"]}),children:a.jsxs("form",{id:"add-el-form",onSubmit:d,className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Type"}),a.jsx("select",{className:"mobile-input",value:r,onChange:c=>i(c.target.value),children:Ru.map(c=>a.jsx("option",{value:c.id,children:c.label},c.id))}),a.jsx("label",{className:"mobile-field-label",children:"Title *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"Element title",value:l,onChange:c=>s(c.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Content (markdown)"}),a.jsx("textarea",{className:"mobile-input",rows:3,placeholder:"Description…",value:o,onChange:c=>u(c.target.value)})]})})}function oC({snapshot:e,onBack:t,onOpenArtifact:n}){const[r,i]=S.useState(e.artifacts||[]),[l,s]=S.useState(!e.artifacts),[o,u]=S.useState(""),[d,c]=S.useState(!1),[f,h]=S.useState(""),[m,p]=S.useState(""),x=async()=>{try{const y=await W.get("/artifacts");i(y.artifacts||[])}catch{}finally{s(!1)}},k=async()=>{if(f.trim())try{const y=await W.post("/artifacts",{slug:f.trim(),title:m.trim()||void 0});c(!1),h(""),p(""),n(y.slug)}catch{}},g=o.trim()?r.filter(y=>(y.title||y.slug||"").toLowerCase().includes(o.toLowerCase())):r;return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search artifacts…",value:o,onChange:y=>u(y.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>x(),"aria-label":"Refresh",children:a.jsx(Tt,{size:16})})]}),a.jsx("div",{style:{marginBottom:12},children:a.jsxs("button",{type:"button",className:"mobile-btn",style:{width:"100%"},onClick:()=>c(!0),children:[a.jsx(at,{size:14})," New Artifact"]})}),l?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):g.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(Dn,{size:40}),a.jsx("p",{children:"No artifacts yet."})]}):a.jsx("div",{className:"mobile-card-list",children:g.map(y=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>n(y.slug),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(Dn,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:y.title||y.slug}),a.jsxs("span",{className:"mobile-list-meta",children:[y.status," · ",y.source,y.elementCount!=null?` · ${y.elementCount} elements`:"",y.commentCount!=null?` · ${y.commentCount} comments`:""]})]}),a.jsx("span",{className:"mobile-list-badge","data-status":y.status,children:y.status})]},y.slug))}),a.jsx(xn,{open:d,onClose:()=>c(!1),title:"New Artifact",actions:a.jsxs("button",{type:"submit",form:"new-plan-form",className:"mobile-btn",style:{width:"100%"},children:[a.jsx(at,{size:14})," Create"]}),children:a.jsxs("form",{id:"new-plan-form",onSubmit:y=>{y.preventDefault(),k()},className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Slug *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"my-plan",pattern:"[a-z0-9][a-z0-9-]{0,63}",value:f,onChange:y=>h(y.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Title (optional)"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"My Artifact",value:m,onChange:y=>p(y.target.value)})]})})]})}const aC=["cron","interval","once"],uC=["command","agent","webhook"],lf=["UTC","America/New_York","America/Los_Angeles","Europe/London","Europe/Berlin","Asia/Tokyo"],Zp=Array.from({length:24},(e,t)=>({value:t,label:t===0?"12 AM":t<12?`${t} AM`:t===12?"12 PM":`${t-12} PM`})),cC=Array.from({length:12},(e,t)=>t*5),Jp=[{value:"*",label:"Every day"},{value:"0",label:"Sun"},{value:"1",label:"Mon"},{value:"2",label:"Tue"},{value:"3",label:"Wed"},{value:"4",label:"Thu"},{value:"5",label:"Fri"},{value:"6",label:"Sat"}],dC=[{value:"s",label:"sec"},{value:"m",label:"min"},{value:"h",label:"hr"},{value:"d",label:"day"}];function fC({snapshot:e}){var k;const[t,n]=S.useState(e.schedules||[]),[r,i]=S.useState(!e.schedules),[l,s]=S.useState(""),[o,u]=S.useState(null),[d,c]=S.useState({open:!1}),f=async()=>{try{const g=await W.get("/schedules");n(g.schedules||[])}catch{}finally{i(!1)}};S.useEffect(()=>{e.schedules?(n(e.schedules),i(!1)):f()},[e.schedules]);const h=async(g,y)=>{try{await W.patch(`/schedules/${encodeURIComponent(g)}`,{enabled:y}),n(v=>v.map(C=>C.id===g?{...C,enabled:y}:C)),(o==null?void 0:o.id)===g&&u(v=>v&&{...v,enabled:y})}catch{}},m=async g=>{if(confirm("Delete this schedule?"))try{await W.del(`/schedules/${encodeURIComponent(g)}`),n(y=>y.filter(v=>v.id!==g)),(o==null?void 0:o.id)===g&&u(null)}catch{}},p=async g=>{try{await W.post(`/schedules/${encodeURIComponent(g)}/trigger`)}catch{}},x=l.trim()?t.filter(g=>g.name.toLowerCase().includes(l.toLowerCase())):t;return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search schedules…",value:l,onChange:g=>s(g.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>f(),"aria-label":"Refresh",children:a.jsx(Tt,{size:16})}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>c({open:!0}),"aria-label":"New schedule",children:a.jsx(at,{size:16})})]}),r?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):x.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(ra,{size:40}),a.jsx("p",{children:"No schedules found."})]}):a.jsx("div",{className:"mobile-card-list",children:x.map(g=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>u(g),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(ra,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:g.name}),a.jsxs("span",{className:"mobile-list-meta",children:[af(g)," ·"," ",g.nextRun?`next ${of(g.nextRun,g.timezone)}`:"no next run"]})]}),a.jsx("span",{className:`mobile-list-badge ${g.enabled?"badge-on":"badge-off"}`,children:g.enabled?"on":"off"})]},g.id))}),o&&a.jsx(Et,{open:!0,onClose:()=>u(null),title:o.name,actions:a.jsxs("div",{className:"mobile-task-detail-actions",children:[a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>{o&&p(o.id)},children:[a.jsx(Bl,{size:14})," Trigger now"]}),a.jsx("button",{type:"button",className:`mobile-btn ${o.enabled?"mobile-btn-secondary":""}`,onClick:()=>{o&&h(o.id,!o.enabled)},children:o.enabled?"Disable":"Enable"}),a.jsxs("button",{type:"button",className:"mobile-btn",onClick:()=>{o&&(c({open:!0,initial:o}),u(null))},children:[a.jsx(jm,{size:14})," Edit"]}),a.jsx("button",{type:"button",className:"mobile-btn mobile-btn-danger",onClick:()=>{o&&m(o.id)},children:a.jsx(zi,{size:14})})]}),children:a.jsx("div",{className:"mobile-agent-detail",children:a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Type"}),a.jsx("span",{children:o.type})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Schedule"}),a.jsx("span",{className:"mono",children:af(o)||o.schedule})]}),o.timezone&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Timezone"}),a.jsx("span",{className:"mono",children:o.timezone})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Action"}),a.jsxs("span",{children:[o.action.type,": ",o.action.target]})]}),o.action.type==="agent"&&o.action.prompt&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Prompt"}),a.jsx("span",{style:{fontSize:12},children:o.action.prompt})]}),((k=o.budgetCheck)==null?void 0:k.skipIfBudgetLow)&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Budget gate"}),a.jsxs("span",{children:["skip if ≥ ",o.budgetCheck.maxConcurrent??6," concurrent"]})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Next run"}),a.jsx("span",{children:o.nextRun?of(o.nextRun,o.timezone):"—"})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Last run"}),a.jsx("span",{children:o.lastRun?pC(o.lastRun):"—"})]}),o.lastResult&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Last result"}),a.jsx("span",{style:{fontSize:12},children:o.lastResult})]}),o.lastError&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Last error"}),a.jsx("span",{style:{fontSize:12},children:o.lastError})]})]})})}),a.jsx(mC,{open:d.open,initial:d.initial,onClose:()=>c({open:!1}),onSaved:()=>{c({open:!1}),f()}})]})}function sf(e){var r,i;if(!e)return{name:"",type:"cron",cronMinute:0,cronHour:13,cronDow:"0",intervalN:30,intervalUnit:"m",onceAt:"",timezone:"UTC",actionType:"agent",actionTarget:"",actionPrompt:"",skipIfBudgetLow:!1,maxConcurrent:6,enabled:!0};const t=e.type==="cron"?eg(e.schedule):null,n=e.type==="interval"?gC(e.schedule):null;return{name:e.name||"",type:e.type,cronMinute:(t==null?void 0:t.minute)??0,cronHour:(t==null?void 0:t.hour)??9,cronDow:(t==null?void 0:t.dow)??"*",intervalN:(n==null?void 0:n.n)??30,intervalUnit:(n==null?void 0:n.unit)??"m",onceAt:e.type==="once"?yC(e.schedule):"",timezone:e.timezone||"UTC",actionType:e.action.type,actionTarget:e.action.target||"",actionPrompt:e.action.prompt||"",skipIfBudgetLow:!!((r=e.budgetCheck)!=null&&r.skipIfBudgetLow),maxConcurrent:Number.isFinite((i=e.budgetCheck)==null?void 0:i.maxConcurrent)?e.budgetCheck.maxConcurrent:6,enabled:e.enabled!==!1}}function hC(e){if(e.type==="cron")return`${e.cronMinute} ${e.cronHour} * * ${e.cronDow}`;if(e.type==="interval")return`${e.intervalN}${e.intervalUnit}`;if(!e.onceAt)return"";try{return new Date(e.onceAt).toISOString()}catch{return e.onceAt}}function mC({open:e,initial:t,onClose:n,onSaved:r}){const[i,l]=S.useState(()=>sf(t)),[s,o]=S.useState(!1);S.useEffect(()=>{e&&l(sf(t))},[e,t]);const u=(c,f)=>{l(h=>({...h,[c]:f}))},d=async c=>{if(c.preventDefault(),!i.name.trim())return;const f=hC(i);if(f){o(!0);try{const h={name:i.name.trim(),type:i.type,schedule:f,timezone:i.timezone,action:{type:i.actionType,target:i.actionTarget.trim(),...i.actionType==="agent"&&i.actionPrompt.trim()?{prompt:i.actionPrompt.trim()}:{}},budgetCheck:{maxConcurrent:i.maxConcurrent,skipIfBudgetLow:i.skipIfBudgetLow},enabled:i.enabled};t?await W.put(`/schedules/${encodeURIComponent(t.id)}`,h):await W.post("/schedules",h),r()}catch{}finally{o(!1)}}};return a.jsx(xn,{open:e,onClose:n,title:t?`Edit ${t.name}`:"New schedule",actions:a.jsxs("button",{type:"submit",form:"mobile-schedule-form",className:"mobile-btn",style:{width:"100%"},disabled:s,children:[a.jsx(at,{size:14})," ",t?"Save":"Create"]}),children:a.jsxs("form",{id:"mobile-schedule-form",onSubmit:d,className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Name *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"Weekly review",value:i.name,onChange:c=>u("name",c.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Type"}),a.jsx("select",{className:"mobile-input",value:i.type,onChange:c=>u("type",c.target.value),children:aC.map(c=>a.jsx("option",{value:c,children:c},c))}),i.type==="cron"&&a.jsxs(a.Fragment,{children:[a.jsx("label",{className:"mobile-field-label",children:"Day of week"}),a.jsx("select",{className:"mobile-input",value:i.cronDow,onChange:c=>u("cronDow",c.target.value),children:Jp.map(c=>a.jsx("option",{value:c.value,children:c.label},c.value))}),a.jsxs("div",{className:"mobile-form-row",children:[a.jsxs("div",{style:{flex:1},children:[a.jsx("label",{className:"mobile-field-label",children:"Hour"}),a.jsx("select",{className:"mobile-input",value:String(i.cronHour),onChange:c=>u("cronHour",parseInt(c.target.value,10)),children:Zp.map(c=>a.jsx("option",{value:String(c.value),children:c.label},c.value))})]}),a.jsxs("div",{style:{flex:1},children:[a.jsx("label",{className:"mobile-field-label",children:"Minute"}),a.jsx("select",{className:"mobile-input",value:String(i.cronMinute),onChange:c=>u("cronMinute",parseInt(c.target.value,10)),children:cC.map(c=>a.jsx("option",{value:String(c),children:String(c).padStart(2,"0")},c))})]})]})]}),i.type==="interval"&&a.jsxs("div",{className:"mobile-form-row",children:[a.jsxs("div",{style:{flex:1},children:[a.jsx("label",{className:"mobile-field-label",children:"Every"}),a.jsx("input",{className:"mobile-input",type:"number",min:1,value:i.intervalN,onChange:c=>u("intervalN",parseInt(c.target.value,10)||1)})]}),a.jsxs("div",{style:{flex:1},children:[a.jsx("label",{className:"mobile-field-label",children:"Unit"}),a.jsx("select",{className:"mobile-input",value:i.intervalUnit,onChange:c=>u("intervalUnit",c.target.value),children:dC.map(c=>a.jsx("option",{value:c.value,children:c.label},c.value))})]})]}),i.type==="once"&&a.jsxs(a.Fragment,{children:[a.jsx("label",{className:"mobile-field-label",children:"Run at"}),a.jsx("input",{className:"mobile-input",type:"datetime-local",value:i.onceAt,onChange:c=>u("onceAt",c.target.value)})]}),a.jsx("label",{className:"mobile-field-label",children:"Timezone"}),a.jsx("select",{className:"mobile-input",value:lf.includes(i.timezone)?i.timezone:"UTC",onChange:c=>u("timezone",c.target.value),children:lf.map(c=>a.jsx("option",{value:c,children:c},c))}),a.jsx("label",{className:"mobile-field-label",children:"Action type"}),a.jsx("select",{className:"mobile-input",value:i.actionType,onChange:c=>u("actionType",c.target.value),children:uC.map(c=>a.jsx("option",{value:c,children:c},c))}),a.jsx("label",{className:"mobile-field-label",children:"Target"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:i.actionType==="webhook"?"https://...":i.actionType==="agent"?"agent or task ref":"echo hello",value:i.actionTarget,onChange:c=>u("actionTarget",c.target.value)}),i.actionType==="agent"&&a.jsxs(a.Fragment,{children:[a.jsx("label",{className:"mobile-field-label",children:"Prompt"}),a.jsx("textarea",{className:"mobile-input",rows:3,placeholder:"What should the agent do?",value:i.actionPrompt,onChange:c=>u("actionPrompt",c.target.value)})]}),a.jsxs("fieldset",{className:"mobile-budget-card",children:[a.jsx("legend",{children:"Budget pre-flight"}),a.jsxs("label",{className:"mobile-checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:i.skipIfBudgetLow,onChange:c=>u("skipIfBudgetLow",c.target.checked)}),a.jsx("span",{children:"Skip if too many bg tasks are running"})]}),a.jsx("label",{className:"mobile-field-label",children:"Cap"}),a.jsx("input",{className:"mobile-input",type:"number",min:1,max:64,value:i.maxConcurrent,onChange:c=>u("maxConcurrent",parseInt(c.target.value,10)||6),disabled:!i.skipIfBudgetLow})]}),a.jsxs("label",{className:"mobile-checkbox-row",children:[a.jsx("input",{type:"checkbox",checked:i.enabled,onChange:c=>u("enabled",c.target.checked)}),a.jsx("span",{children:"Enabled"})]})]})})}function pC(e){const t=Date.now()-new Date(e).getTime();return t<6e4?"just now":t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:new Date(e).toLocaleDateString()}function of(e,t){try{return new Date(e).toLocaleString(void 0,{timeZone:t||void 0,weekday:"short",hour:"numeric",minute:"2-digit",month:"short",day:"numeric"})}catch{return new Date(e).toLocaleString()}}function eg(e){if(typeof e!="string")return null;const t=e.trim().split(/\s+/);if(t.length!==5)return null;const[n,r,,,i]=t,l=parseInt(n,10),s=parseInt(r,10);return!Number.isFinite(l)||!Number.isFinite(s)||n!==String(l)||r!==String(s)?null:{minute:l,hour:s,dow:i==="*"?"*":Number.isFinite(parseInt(i,10))?i:"*"}}function gC(e){if(typeof e!="string")return null;const t=/^(\d+)([smhd])$/i.exec(e.trim());return t?{n:parseInt(t[1],10),unit:t[2].toLowerCase()}:null}function yC(e){if(!e)return"";try{const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=r=>String(r).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}catch{return""}}function af(e){var l,s;if(e.type!=="cron")return e.schedule;const t=eg(e.schedule);if(!t)return e.schedule;const n=((l=Jp.find(o=>o.value===t.dow))==null?void 0:l.label)||t.dow,r=((s=Zp.find(o=>o.value===t.hour))==null?void 0:s.label)||`${t.hour}`,i=String(t.minute).padStart(2,"0");return n==="Every day"?`Every day ${r} :${i}`:`Every ${n} ${r} :${i}`}const xC=["all","tasks","agents","artifacts","projects","settings"],vC={tasks:Hl,agents:jr,plans:Dn,projects:mu,settings:kr};function kC({open:e,onClose:t,onNavigate:n}){const[r,i]=S.useState(""),[l,s]=S.useState("all"),[o,u]=S.useState([]),[d,c]=S.useState(!1),f=S.useRef(null);S.useEffect(()=>{e&&(i(""),u([]),requestAnimationFrame(()=>{var p;return(p=f.current)==null?void 0:p.focus()}))},[e]),S.useEffect(()=>{if(!r.trim()){u([]);return}const p=setTimeout(async()=>{c(!0);try{const x=await W.get(`/search?q=${encodeURIComponent(r)}&scope=${l}`);u(x.results||[])}catch{u([])}finally{c(!1)}},250);return()=>clearTimeout(p)},[r,l]);const h=p=>{const x=p.item,k=x.id||x.slug||x.name||"";n(p.type,k),t()},m=o.reduce((p,x)=>(p[x.type]||(p[x.type]=[]),p[x.type].push(x),p),{});return a.jsx(xn,{open:e,onClose:t,title:"Search",children:a.jsxs("div",{className:"mobile-search-container",children:[a.jsxs("div",{className:"mobile-search-input-row",children:[a.jsx(Jc,{size:16,style:{color:"var(--text-muted)",flexShrink:0}}),a.jsx("input",{ref:f,className:"mobile-search-field",type:"text",placeholder:"Search…",value:r,onChange:p=>i(p.target.value),enterKeyHint:"search",onKeyDown:p=>{p.key==="Escape"&&t(),p.key==="Enter"&&o.length>0&&h(o[0])}}),r&&a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>i(""),"aria-label":"Clear",children:a.jsx(Bn,{size:16})})]}),a.jsx("div",{className:"mobile-search-scopes",children:xC.map(p=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${l===p?"active":""}`,onClick:()=>s(p),children:p==="all"?"All":p.charAt(0).toUpperCase()+p.slice(1)},p))}),a.jsxs("div",{className:"mobile-search-results",children:[d&&a.jsx("div",{className:"mobile-search-loading",children:"Searching…"}),!d&&r&&o.length===0&&a.jsxs("div",{className:"mobile-empty",children:[a.jsx(Jc,{size:32}),a.jsx("p",{children:"No results found"})]}),!d&&!r&&a.jsx("div",{className:"mobile-empty",children:a.jsx("p",{children:"Type to search across tasks, agents, plans, and more."})}),Object.entries(m).map(([p,x])=>{const k=vC[p]||Dn;return a.jsxs("div",{className:"mobile-search-group",children:[a.jsxs("h4",{className:"mobile-search-group-title",children:[a.jsx(k,{size:12})," ",p.charAt(0).toUpperCase()+p.slice(1)," (",x.length,")"]}),x.map((g,y)=>{const v=g.item;return a.jsxs("button",{type:"button",className:"mobile-search-result-item",onClick:()=>h(g),children:[a.jsx("span",{className:"mobile-search-result-title",children:v.title||v.name||v.slug||"(unnamed)"}),v.description&&a.jsx("span",{className:"mobile-search-result-meta",children:v.description.slice(0,80)})]},y)})]},p)})]})]})})}const wC=[{id:"dark",label:"Dark",Icon:J1},{id:"light",label:"Light",Icon:ox},{id:"system",label:"System",Icon:Z1}],bC=[{name:"Purple",accent:"#8b5cf6"},{name:"Blue",accent:"#3b82f6"},{name:"Green",accent:"#10b981"},{name:"Orange",accent:"#f97316"},{name:"Red",accent:"#ef4444"},{name:"Pink",accent:"#ec4899"},{name:"Cyan",accent:"#06b6d4"},{name:"Mono",accent:"#6b7280"}];function SC(e){if(e<=0)return"expired";const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,"0")}`}function CC({settings:e,snapshot:t,onRefresh:n}){var z,N,A,R,T,w;const[r,i]=S.useState(e),[l,s]=S.useState(!1),[o,u]=S.useState(!1),[d,c]=S.useState(null),[f,h]=S.useState(!1),[m,p]=S.useState(Date.now());S.useEffect(()=>{i(e),s(!1),e.theme&&ti(e.theme)},[e]),S.useEffect(()=>{if(!d)return;const j=setInterval(()=>p(Date.now()),1e3);return()=>clearInterval(j)},[d]);const x=j=>{i(P=>{const L={...P,theme:{...P.theme,...j}};return Wl(L.theme),ti(L.theme),L}),s(!0)},k=(j,P)=>{i(L=>({...L,[j]:P})),s(!0)},g=async()=>{u(!0);try{const j=await W.put("/settings",r);i(j.data),s(!1),Wl(j.data.theme),ti(j.data.theme),n()}catch{}finally{u(!1)}},y=async()=>{h(!0);try{const j=await W.post("/pair/start");c(j)}catch{}finally{h(!1)}},v=d?d.expiresAt-m:0,C=d!=null&&v<=0;return a.jsxs("div",{className:"mobile-view",children:[l&&a.jsxs("div",{className:"mobile-settings-save-bar",children:[a.jsx("span",{children:"Unsaved changes"}),a.jsxs("button",{type:"button",className:"mobile-btn",disabled:o,onClick:g,children:[a.jsx(Em,{size:14})," ",o?"Saving…":"Save"]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Appearance"}),a.jsxs("div",{className:"mobile-card",children:[a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Theme"}),a.jsx("div",{className:"mobile-theme-btns",children:wC.map(({id:j,label:P,Icon:L})=>a.jsxs("button",{type:"button",className:`mobile-theme-btn ${r.theme.mode===j?"active":""}`,onClick:()=>x({mode:j}),children:[a.jsx(L,{size:14})," ",P]},j))})]}),a.jsxs("div",{className:"mobile-setting-row",style:{flexDirection:"column",alignItems:"flex-start",gap:8},children:[a.jsx("span",{className:"mobile-setting-label",children:"Accent color"}),a.jsx("div",{className:"mobile-accent-swatches",children:bC.map(j=>a.jsx("button",{type:"button",className:`mobile-accent-swatch ${r.theme.accent===j.accent?"active":""}`,style:{background:j.accent},onClick:()=>x({accent:j.accent}),title:j.name},j.name))})]}),a.jsxs("div",{className:"mobile-setting-row",style:{flexDirection:"column",alignItems:"flex-start",gap:8},children:[a.jsxs("span",{className:"mobile-setting-label",children:["Font size: ",r.theme.fontSize,"px"]}),a.jsx("input",{type:"range",min:12,max:20,value:r.theme.fontSize,onChange:j=>x({fontSize:Number(j.target.value)}),style:{width:"100%"}})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Compact mode"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:r.theme.compactMode,onChange:j=>x({compactMode:j.target.checked})}),a.jsx("span",{className:"mobile-toggle-slider"})]})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Animations"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:r.theme.animations,onChange:j=>x({animations:j.target.checked})}),a.jsx("span",{className:"mobile-toggle-slider"})]})]})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Chat Defaults"}),a.jsxs("div",{className:"mobile-card",children:[a.jsx("label",{className:"mobile-field-label",children:"Default Agent"}),a.jsx("select",{className:"mobile-input",value:r.defaultAgent||"odin",onChange:j=>k("defaultAgent",j.target.value),children:((t==null?void 0:t.agents)||[]).map(j=>a.jsxs("option",{value:j.name,children:["@",j.name]},j.name))}),a.jsx("label",{className:"mobile-field-label",style:{marginTop:8},children:"Default Model"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"(auto)",value:r.defaultModel||"",onChange:j=>k("defaultModel",j.target.value)})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Notifications"}),a.jsxs("div",{className:"mobile-card",children:[a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Agent completion"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:!!r.notifications.onAgentComplete,onChange:j=>{i(P=>({...P,notifications:{...P.notifications,onAgentComplete:j.target.checked}})),s(!0)}}),a.jsx("span",{className:"mobile-toggle-slider"})]})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Plan approval"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:!!r.notifications.onPlanApproval,onChange:j=>{i(P=>({...P,notifications:{...P.notifications,onPlanApproval:j.target.checked}})),s(!0)}}),a.jsx("span",{className:"mobile-toggle-slider"})]})]})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Agent Behavior"}),a.jsxs("div",{className:"mobile-card",children:[a.jsx("label",{className:"mobile-field-label",children:"Max parallel agents"}),a.jsx("input",{className:"mobile-input",type:"number",inputMode:"numeric",min:1,max:20,value:((z=r.agents)==null?void 0:z.maxParallel)??6,onChange:j=>{i(P=>({...P,agents:{...P.agents,maxParallel:Math.max(1,Math.min(20,parseInt(j.target.value,10)||6))}})),s(!0)}}),a.jsx("label",{className:"mobile-field-label",style:{marginTop:8},children:"Stuck threshold (ms)"}),a.jsx("input",{className:"mobile-input",type:"number",inputMode:"numeric",min:6e4,max:36e5,step:6e4,value:((N=r.agents)==null?void 0:N.stuckThresholdMs)??6e5,onChange:j=>{i(P=>({...P,agents:{...P.agents,stuckThresholdMs:Math.max(6e4,parseInt(j.target.value,10)||6e5)}})),s(!0)}}),a.jsxs("div",{className:"mobile-setting-row",style:{marginTop:8},children:[a.jsx("span",{className:"mobile-setting-label",children:"Auto-restart stuck agents"}),a.jsxs("label",{className:"mobile-toggle",children:[a.jsx("input",{type:"checkbox",checked:!!((A=r.agents)!=null&&A.autoRestart),onChange:j=>{i(P=>({...P,agents:{...P.agents,autoRestart:j.target.checked}})),s(!0)}}),a.jsx("span",{className:"mobile-toggle-slider"})]})]})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"Tailscale Serve"}),a.jsx("div",{className:"mobile-card",children:a.jsxs("p",{className:"muted",style:{fontSize:13},children:["Use ",a.jsx("code",{children:"bizar service"})," commands in the terminal to configure Tailscale serve."]})})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsxs("h3",{className:"mobile-section-title",children:[a.jsx(sx,{size:14})," Companion App"]}),a.jsxs("div",{className:"mobile-card",children:[!d&&a.jsxs("button",{type:"button",className:"mobile-btn",onClick:y,disabled:f,style:{width:"100%"},children:[a.jsx(nx,{size:14})," ",f?"Generating…":"Generate QR Code"]}),d&&!C&&a.jsxs("div",{style:{textAlign:"center"},children:[a.jsx("div",{style:{background:"#fff",padding:12,borderRadius:12,display:"inline-block"},children:a.jsx(Gp,{value:d.qrPayload,size:180,level:"M"})}),a.jsxs("div",{style:{marginTop:8,fontSize:12},children:["Expires in ",a.jsx("strong",{children:SC(v)})]}),a.jsx("div",{className:"mono",style:{fontSize:10,wordBreak:"break-all",marginTop:4},children:d.publicUrl})]}),d&&C&&a.jsxs("button",{type:"button",className:"mobile-btn",onClick:y,style:{width:"100%"},children:[a.jsx(Tt,{size:14})," Generate new QR"]})]})]}),a.jsxs("section",{className:"mobile-section",children:[a.jsx("h3",{className:"mobile-section-title",children:"About"}),a.jsxs("div",{className:"mobile-card",children:[a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Version"}),a.jsx("span",{className:"mobile-setting-value mono",children:((R=r.about)==null?void 0:R.version)||"—"})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Agents"}),a.jsx("span",{className:"mobile-setting-value",children:((T=t==null?void 0:t.agents)==null?void 0:T.length)||0})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Tasks"}),a.jsx("span",{className:"mobile-setting-value",children:((w=t==null?void 0:t.tasks)==null?void 0:w.length)||0})]}),a.jsxs("div",{className:"mobile-setting-row",children:[a.jsx("span",{className:"mobile-setting-label",children:"Plans"}),a.jsx("span",{className:"mobile-setting-value",children:(t==null?void 0:t.artifacts.length)||0})]})]})]}),a.jsx("div",{className:"mobile-view-footer",children:a.jsx("a",{href:"/?desktop=1",className:"mobile-btn mobile-btn-secondary",children:"Switch to Desktop"})})]})}const jC=["languages","framework","design","testing","devops","data","security","integration"];function NC({snapshot:e,onBack:t}){const[n,r]=S.useState([]),[i,l]=S.useState(!0),[s,o]=S.useState(""),[u,d]=S.useState(""),[c,f]=S.useState(null),h=async()=>{try{const x=await W.get("/skills");r(x.skills||[])}catch{}finally{l(!1)}};S.useEffect(()=>{h()},[]);const m=async(x,k)=>{try{await W.patch(`/skills/${encodeURIComponent(x)}`,{enabled:k}),r(g=>g.map(y=>y.id===x?{...y,enabled:k}:y)),(c==null?void 0:c.id)===x&&f(g=>g&&{...g,enabled:k})}catch{}},p=n.filter(x=>{if(u&&x.category!==u)return!1;if(s){const k=s.toLowerCase();return x.name.toLowerCase().includes(k)||x.description.toLowerCase().includes(k)}return!0});return a.jsxs("div",{className:"mobile-view",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search skills…",value:s,onChange:x=>o(x.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>h(),"aria-label":"Refresh",children:a.jsx(Tt,{size:16})})]}),a.jsxs("div",{className:"mobile-search-scopes",children:[a.jsx("button",{type:"button",className:`mobile-scope-chip ${u?"":"active"}`,onClick:()=>d(""),children:"All"}),jC.map(x=>a.jsx("button",{type:"button",className:`mobile-scope-chip ${u===x?"active":""}`,onClick:()=>d(x),children:x},x))]}),i?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):p.length===0?a.jsxs("div",{className:"mobile-empty",children:[a.jsx(Ul,{size:40}),a.jsx("p",{children:"No skills found."})]}):a.jsx("div",{className:"mobile-card-list",children:p.map(x=>a.jsxs("button",{type:"button",className:"mobile-list-item mobile-list-item-interactive",onClick:()=>f(x),children:[a.jsx("div",{className:"mobile-list-icon",children:a.jsx(Ul,{size:16})}),a.jsxs("div",{className:"mobile-list-content",children:[a.jsx("span",{className:"mobile-list-title",children:x.name}),a.jsxs("span",{className:"mobile-list-meta",children:[x.category," · v",x.version]})]}),a.jsx("span",{className:`mobile-list-badge ${x.enabled?"badge-on":"badge-off"}`,children:x.enabled?"on":"off"})]},x.id))}),c&&a.jsx(Et,{open:!0,onClose:()=>f(null),title:c.name,actions:a.jsxs("button",{type:"button",className:`mobile-btn ${c.enabled?"mobile-btn-secondary":""}`,style:{width:"100%"},onClick:()=>{c&&m(c.id,!c.enabled)},children:[a.jsx(Nm,{size:14})," ",c.enabled?"Disable":"Enable"]}),children:a.jsxs("div",{className:"mobile-agent-detail",children:[a.jsx("p",{className:"mobile-agent-detail-desc",children:c.description||"No description."}),a.jsxs("div",{className:"mobile-agent-detail-meta",children:[a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Category"}),a.jsx("span",{children:c.category})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Version"}),a.jsx("span",{className:"mono",children:c.version})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Source"}),a.jsx("span",{children:c.source})]}),c.tags.length>0&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Tags"}),a.jsx("span",{children:c.tags.join(", ")})]})]})]})})]})}const EC=["queued","doing","blocked","done"],el={queued:"Queued",doing:"Doing",blocked:"Blocked",done:"Done"},uf={queued:"doing",doing:"done",blocked:"queued",done:"queued"};function TC(e){const t=e.metadata??{};return!!(t.sessionId||t.bgInstanceId)}function zC(e){var n;const t=e.metadata??{};return!!((n=t.artifactIds)!=null&&n.length||t.artifactId)}function cf({snapshot:e,onRefresh:t,selectedTaskId:n,onCloseDetail:r,onOpenChat:i,onOpenArtifact:l}){var ae,et;const[s,o]=S.useState(e.tasks||[]),[u,d]=S.useState(!e.tasks),[c,f]=S.useState(""),[h,m]=S.useState("queued"),[p,x]=S.useState(null),[k,g]=S.useState(!1),[y,v]=S.useState(null),[C,z]=S.useState([]),[N,A]=S.useState(""),[R,T]=S.useState(null),[w,j]=S.useState(!1),[P,L]=S.useState(""),[F,I]=S.useState("updated");S.useEffect(()=>{var B;if(e.tasks&&(o(e.tasks),d(!1)),n){const re=(B=e.tasks)==null?void 0:B.find(J=>J.id===n);re&&x(re)}},[e.tasks,n]),S.useEffect(()=>{if(n){const B=s.find(re=>re.id===n);B&&x(B)}},[n,s]);const V=async()=>{try{const B=await W.get("/tasks");o(Array.isArray(B)?B:[])}catch{}finally{d(!1)}},G=async(B,re)=>{o(J=>J.map(be=>be.id===B?{...be,status:re}:be)),(p==null?void 0:p.id)===B&&x(J=>J&&{...J,status:re});try{await W.patch(`/tasks/${encodeURIComponent(B)}/status`,{status:re})}catch{await V()}},D=async B=>{if(confirm("Delete this task?"))try{await W.del(`/tasks/${encodeURIComponent(B)}`),o(re=>re.filter(J=>J.id!==B)),(p==null?void 0:p.id)===B&&x(null)}catch{await V()}},H=async B=>{try{await W.post(`/tasks/${encodeURIComponent(B)}/archive`),o(re=>re.filter(J=>J.id!==B)),(p==null?void 0:p.id)===B&&x(null)}catch{}},K=[...s.filter(B=>{var re,J;if(c.trim()){const be=c.toLowerCase();if(!(B.title||"").toLowerCase().includes(be)&&!(B.description||"").toLowerCase().includes(be))return!1}if(P.trim()){const be=P==="mine"?((J=(re=e.settings)==null?void 0:re.data)==null?void 0:J.defaultAgent)||PC(e):P.replace(/^@/,"");if((B.assignee||"").toLowerCase()!==be.toLowerCase())return!1}return!0})].sort((B,re)=>{switch(F){case"priority":{const J={high:0,normal:1,low:2};return(J[B.priority]??1)-(J[re.priority]??1)}case"created":return new Date(re.createdAt).getTime()-new Date(B.createdAt).getTime();case"updated":default:return new Date(re.updatedAt).getTime()-new Date(B.updatedAt).getTime()}}),Z=K.filter(B=>B.status===h),E=e.agents||[],he=async(B,re,J,be)=>{try{const Tr=await W.post("/tasks",{title:B,description:re,assignee:J||null,priority:be});o(zr=>[Tr,...zr]),g(!1)}catch{}},Je=async B=>{j(!0),A(""),T(null),v(B);try{const J=((await W.get(`/tasks/${encodeURIComponent(B)}/artifacts`)).artifacts||[]).map(be=>be.id);if(z(J),J.length>0){const[be,Tr]=await Promise.all([W.get(`/artifacts/${encodeURIComponent(J[0])}`),fetch(W.urlWithToken(`/artifacts/${encodeURIComponent(J[0])}/content`)).then(zr=>zr.text())]);T(be),A(Tr)}}catch{}finally{j(!1)}};return u?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading…"})}):a.jsxs("div",{className:"mobile-view mobile-view-tasks",children:[a.jsxs("div",{className:"mobile-tasks-toolbar",children:[a.jsx("input",{className:"mobile-search-input",type:"text",placeholder:"Search tasks…",value:c,onChange:B=>f(B.target.value),style:{flex:1}}),a.jsx("button",{type:"button",className:"mobile-icon-btn",onClick:()=>V(),"aria-label":"Refresh",children:a.jsx(Tt,{size:16})})]}),a.jsxs("div",{className:"mobile-tasks-filters",children:[a.jsxs("select",{className:"mobile-filter-select",value:P,onChange:B=>L(B.target.value),children:[a.jsx("option",{value:"",children:"All"}),a.jsx("option",{value:"mine",children:"Mine"}),E.map(B=>a.jsxs("option",{value:`@${B.name}`,children:["@",B.name]},B.name))]}),a.jsxs("select",{className:"mobile-filter-select",value:F,onChange:B=>I(B.target.value),children:[a.jsx("option",{value:"updated",children:"Updated"}),a.jsx("option",{value:"created",children:"Created"}),a.jsx("option",{value:"priority",children:"Priority"})]})]}),a.jsx("div",{className:"mobile-kanban-tabs",children:EC.map(B=>{const re=K.filter(J=>J.status===B).length;return a.jsxs("button",{type:"button",className:`mobile-kanban-tab ${h===B?"active":""}`,onClick:()=>m(B),children:[el[B]," (",re,")"]},B)})}),a.jsxs("div",{className:"mobile-card-list",children:[Z.length===0&&a.jsxs("div",{className:"mobile-empty mobile-empty-compact",children:[a.jsxs("p",{children:["No ",el[h].toLowerCase()," tasks."]}),a.jsx("p",{className:"muted",children:"Create one or switch columns."})]}),Z.map(B=>{var re;return a.jsxs("button",{type:"button",className:"mobile-task-card",onClick:()=>x(B),children:[a.jsx("div",{className:"priority-dot",style:{background:dx[B.priority]||"var(--info)"}}),a.jsxs("div",{className:"task-content",children:[a.jsx("div",{className:"task-title",children:B.title}),a.jsxs("div",{className:"task-meta",children:[B.assignee?`@${B.assignee}`:"unassigned"," · ",fr(B.updatedAt||B.createdAt),(re=B.dependencies)!=null&&re.length?` · ${B.dependencies.length} deps`:""]})]})]},B.id)})]}),a.jsx("button",{type:"button",className:"mobile-fab",onClick:()=>g(!0),"aria-label":"Add task",children:a.jsx(at,{size:24})}),a.jsx(Et,{open:!!p,onClose:()=>{x(null),r==null||r()},title:"Task Detail",actions:p&&a.jsxs("div",{className:"mobile-task-detail-actions",children:[p.status!=="done"&&a.jsxs("button",{type:"button",className:"mobile-btn",style:{flex:1},onClick:()=>{p&&G(p.id,uf[p.status])},children:["Move to ",el[uf[p.status]||"queued"]]}),a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",onClick:()=>{p&&H(p.id)},children:[a.jsx(F1,{size:14})," Archive"]}),TC(p)&&a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",onClick:()=>{i==null||i(p.id)},children:[a.jsx(En,{size:14})," Chat"]}),zC(p)&&a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",onClick:()=>{Je(p.id)},children:[a.jsx(Dn,{size:14})," Artifact"]}),a.jsx("button",{type:"button",className:"mobile-btn mobile-btn-danger",onClick:()=>{p&&D(p.id)},children:a.jsx(zi,{size:14})})]}),children:p&&a.jsxs("div",{className:"mobile-task-detail",children:[a.jsxs("div",{className:"mobile-task-detail-header",children:[a.jsx("span",{className:`mobile-task-status-badge status-${p.status}`,children:el[p.status]||p.status}),a.jsx("span",{className:`mobile-task-priority priority-${p.priority}`,children:p.priority})]}),a.jsx("h3",{className:"mobile-task-detail-title",children:p.title}),p.description&&a.jsx("p",{className:"mobile-task-detail-desc",children:p.description}),a.jsxs("div",{className:"mobile-task-detail-meta",children:[p.assignee&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Assignee"}),a.jsxs("span",{children:["@",p.assignee]})]}),p.dueDate&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Due"}),a.jsx("span",{children:new Date(p.dueDate).toLocaleDateString()})]}),p.timeSpent!=null&&a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Time spent"}),a.jsxs("span",{children:[Math.round(p.timeSpent/6e4),"min"]})]}),(ae=p.dependencies)!=null&&ae.length?a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Dependencies"}),a.jsx("span",{children:p.dependencies.length})]}):null,(et=p.comments)!=null&&et.length?a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Comments"}),a.jsx("span",{children:p.comments.length})]}):null,a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Created"}),a.jsx("span",{children:fr(p.createdAt)})]}),a.jsxs("div",{className:"mobile-task-detail-row",children:[a.jsx("span",{children:"Updated"}),a.jsx("span",{children:fr(p.updatedAt)})]})]})]})}),a.jsx(IC,{open:k,onClose:()=>g(!1),onCreate:he,agents:E}),a.jsx(Et,{open:!!y,onClose:()=>{v(null),A(""),T(null)},title:(R==null?void 0:R.name)||"Artifact",actions:C.length>1?a.jsx("div",{className:"mobile-task-detail-actions",children:C.map((B,re)=>a.jsxs("button",{type:"button",className:"mobile-btn mobile-btn-secondary",style:{flex:1},onClick:()=>{j(!0),Promise.all([W.get(`/artifacts/${encodeURIComponent(B)}`),fetch(W.urlWithToken(`/artifacts/${encodeURIComponent(B)}/content`)).then(J=>J.text())]).then(([J,be])=>{T(J),A(be),j(!1)}).catch(()=>j(!1))},children:["Artifact ",re+1]},B))}):null,children:a.jsx("div",{className:"mobile-artifact-viewer",children:w?a.jsx("div",{className:"mobile-loading",children:a.jsx("p",{children:"Loading artifact…"})}):N?a.jsx("iframe",{srcDoc:N,className:"mobile-artifact-iframe",sandbox:"allow-scripts allow-forms allow-popups allow-same-origin",title:(R==null?void 0:R.name)||"Artifact",loading:"lazy"}):a.jsxs("div",{className:"mobile-empty",children:[a.jsx(Dn,{size:32}),a.jsx("p",{className:"muted",children:"No artifact content available."})]})})})]})}function PC(e){var t,n;return((n=(t=e.settings)==null?void 0:t.data)==null?void 0:n.defaultAgent)||"odin"}function IC({open:e,onClose:t,onCreate:n,agents:r}){const[i,l]=S.useState(""),[s,o]=S.useState(""),[u,d]=S.useState(""),[c,f]=S.useState("normal"),h=m=>{m.preventDefault(),i.trim()&&(n(i.trim(),s.trim(),u,c),l(""),o(""),d(""),f("normal"))};return a.jsx(xn,{open:e,onClose:t,title:"New Task",actions:a.jsxs("button",{type:"submit",form:"new-task-form",className:"mobile-btn",style:{width:"100%"},children:[a.jsx(at,{size:14})," Create Task"]}),children:a.jsxs("form",{id:"new-task-form",onSubmit:h,className:"mobile-task-form",children:[a.jsx("label",{className:"mobile-field-label",children:"Title *"}),a.jsx("input",{className:"mobile-input",type:"text",placeholder:"Task title",value:i,onChange:m=>l(m.target.value),autoFocus:!0,required:!0}),a.jsx("label",{className:"mobile-field-label",children:"Description"}),a.jsx("textarea",{className:"mobile-input",rows:3,placeholder:"Optional description",value:s,onChange:m=>o(m.target.value)}),a.jsx("label",{className:"mobile-field-label",children:"Assignee"}),a.jsxs("select",{className:"mobile-input",value:u,onChange:m=>d(m.target.value),children:[a.jsx("option",{value:"",children:"Unassigned"}),r.map(m=>a.jsxs("option",{value:m.name,children:["@",m.name]},m.name))]}),a.jsx("label",{className:"mobile-field-label",children:"Priority"}),a.jsxs("select",{className:"mobile-input",value:c,onChange:m=>f(m.target.value),children:[a.jsx("option",{value:"low",children:"Low"}),a.jsx("option",{value:"normal",children:"Normal"}),a.jsx("option",{value:"high",children:"High"})]})]})})}const AC=[{id:"activity",label:"Activity",icon:na},{id:"chat",label:"Chat",icon:En},{id:"tasks",label:"Tasks",icon:Hl},{id:"settings",label:"Settings",icon:zm},{id:"more",label:"More",icon:Y1}];function MC(e){const t=e.meta??{},n=typeof t.taskId=="string"?t.taskId:null,r=typeof t.slug=="string"?t.slug:null,i=typeof t.agent=="string"?t.agent:null;if(n)return{id:"task-detail",taskId:n};if(r)return{id:"artifacts?-detail",slug:r};if(i)return{id:"agent-detail",name:i};const l=e.link??"";return l.startsWith("/artifacts?/")?{id:"artifacts?-detail",slug:decodeURIComponent(l.slice(12))}:l.startsWith("/tasks/")?{id:"task-detail",taskId:decodeURIComponent(l.slice(7))}:l.startsWith("/agents/")?{id:"agent-detail",name:decodeURIComponent(l.slice(8))}:null}function HC(){const[e,t]=S.useState("activity"),[n,r]=S.useState([]),[i,l]=S.useState(!1),[s,o]=S.useState(null),[u,d]=S.useState(null),[c,f]=S.useState(null),[h,m]=S.useState(null),[p,x]=S.useState(!0),[k,g]=S.useState(0),y=S.useMemo(()=>n[n.length-1]??{id:e},[e,n]),v=S.useCallback(w=>{r(j=>[...j,w])},[]),C=S.useCallback(()=>{r(w=>w.slice(0,-1))},[]),z=S.useCallback(w=>{r([]),t(w)},[]),N=S.useCallback(async()=>{var w;try{const j=await W.get("/snapshot");d(j),(w=j.settings)!=null&&w.data&&f(j.settings.data),m(null)}catch(j){throw m(j.message||"Dashboard server unreachable."),j}},[]);S.useEffect(()=>{let w=!1;return Promise.all([W.get("/snapshot").catch(()=>null),W.get("/settings").catch(()=>null),W.probeAuthStatus().catch(()=>null)]).then(([j,P])=>{var F;if(w)return;const L=(P==null?void 0:P.data)??((F=j==null?void 0:j.settings)==null?void 0:F.data)??null;j&&d(j),L&&f(L),m(!j&&!L?"Dashboard server unreachable.":null)}).catch(j=>{w||m(j.message||"Dashboard server unreachable.")}).finally(()=>{w||x(!1)}),()=>{w=!0}},[]),S.useEffect(()=>{c!=null&&c.theme&&(Wl(c.theme),ti(c.theme))},[c==null?void 0:c.theme]),S.useEffect(()=>{var P;if(((P=c==null?void 0:c.theme)==null?void 0:P.mode)!=="system")return;const w=window.matchMedia("(prefers-color-scheme: light)"),j=()=>{c!=null&&c.theme&&(Wl(c.theme),ti(c.theme))};return w.addEventListener("change",j),()=>w.removeEventListener("change",j)},[c==null?void 0:c.theme]),S.useEffect(()=>{const w=()=>{g(P=>P+1),N().catch(()=>{})},j=()=>{document.visibilityState==="visible"&&w()};return window.addEventListener("online",w),window.addEventListener("pageshow",w),document.addEventListener("visibilitychange",j),()=>{window.removeEventListener("online",w),window.removeEventListener("pageshow",w),document.removeEventListener("visibilitychange",j)}},[N]),S.useEffect(()=>{const w=new Am,j=w.on(P=>{if(P.type==="snapshot"&&"data"in P&&P.data)d(L=>({...L??{},...P.data}));else if(P.type==="change")N().catch(()=>{});else if(P.type==="tasks:change"){const L=P.task;d(F=>{if(!F)return F;const I=(F.tasks||[]).map(G=>G.id===L.id?L:G),V=I.some(G=>G.id===L.id);return{...F,tasks:V?I:[L,...I]}})}else P.type==="tasks:delete"?d(L=>L&&{...L,tasks:(L.tasks||[]).filter(F=>F.id!==P.id)}):P.type==="settings:change"?P.settings&&f(P.settings):P.type==="project:change"||P.type==="agents:change"||P.type==="schedules:change"||P.type==="artifact:change"?N().catch(()=>{}):(P.type==="agent:status"||P.type==="agent:restarted")&&d(L=>{if(!L)return L;const F=(L.agents||[]).map(I=>I.name===P.agent.name?P.agent:I);return{...L,agents:F}})});return()=>{j(),w.close()}},[N,k]);const A=S.useCallback(w=>{(w==="activity"||w==="chat"||w==="tasks"||w==="settings"||w==="more")&&z(w)},[z]),R=S.useCallback((w,j,P)=>{if(w==="notification"){const L=MC({link:j||null,meta:P??null});L&&v(L);return}if(w==="task"&&j){v({id:"task-detail",taskId:j});return}if(w==="artifacts?"&&j){v({id:"artifacts?-detail",slug:j});return}if(w==="agent"&&j){v({id:"agent-detail",name:j});return}if(w==="project"){z("activity");return}w==="setting"&&z("settings")},[z,v]),T=()=>{if(!u||!c)return null;if(n.length>0){const w=n[n.length-1];switch(w.id){case"artifacts?":return a.jsx(oC,{snapshot:u,onBack:C,onOpenArtifact:j=>v({id:"artifacts?-detail",slug:j})});case"agents":return a.jsx(rf,{snapshot:u,onBack:C,onOpenAgent:j=>v({id:"agent-detail",name:j}),onRefresh:N});case"skills":return a.jsx(NC,{snapshot:u,onBack:C});case"mods":return a.jsx(tC,{snapshot:u,onBack:C});case"schedules":return a.jsx(fC,{snapshot:u,onBack:C});case"history":return a.jsx(eC,{onBack:C});case"config":return a.jsx(J2,{onBack:C});case"artifacts?-detail":return a.jsx(iC,{slug:w.slug,onBack:C});case"agent-detail":return a.jsx(rf,{snapshot:u,onBack:C,onOpenAgent:()=>{},onRefresh:N,selectedAgent:w.name});case"task-detail":return a.jsx(cf,{snapshot:u,onRefresh:N,selectedTaskId:w.taskId,onCloseDetail:C,onOpenChat:j=>{o(j),z("chat")}});default:return null}}switch(e){case"activity":return a.jsx(K2,{snapshot:u,onRefresh:N});case"chat":return a.jsx(Z2,{snapshot:u,settings:c,initialTaskId:s,onClearTaskId:()=>o(null)});case"tasks":return a.jsx(cf,{snapshot:u,onRefresh:N,onOpenChat:w=>{o(w),z("chat")}});case"settings":return a.jsx(CC,{settings:c,snapshot:u,onRefresh:N});case"more":return a.jsx(nC,{snapshot:u,onNavigate:w=>{(w==="artifacts?"||w==="agents"||w==="skills"||w==="mods"||w==="schedules"||w==="history"||w==="config")&&v({id:w})}});default:return null}};return p?a.jsxs("div",{className:"mobile-loading",children:[a.jsx(Mm,{size:"lg"}),a.jsx("p",{children:"Loading Bizar…"})]}):h||!u||!c?a.jsxs("div",{className:"mobile-loading",children:[a.jsx("h2",{children:"Dashboard unavailable"}),a.jsx("p",{children:h||"Dashboard server unreachable."}),a.jsx("p",{className:"muted",children:"Make sure the Bizar dashboard server is running."})]}):a.jsxs("div",{className:"mobile-app",children:[a.jsx(q2,{activeTab:y.id,snapshot:u,onSearch:()=>l(!0),onNavigate:R}),a.jsx("main",{className:"mobile-content",children:T()}),n.length===0&&a.jsx(U2,{tabs:AC,activeTab:e,onChange:A}),n.length>0&&a.jsx("button",{type:"button",className:"mobile-back-btn",onClick:C,"aria-label":"Go back",children:"← Back"}),a.jsx(kC,{open:i,onClose:()=>l(!1),onNavigate:R})]})}export{Zc as $,na as A,jr as B,U1 as C,w2 as D,j2 as E,mu as F,N2 as G,ia as H,G1 as I,Em as J,RC as K,Bl as L,En as M,jm as N,ix as O,at as P,ed as Q,Tt as R,Hl as S,ux as T,sb as U,v2 as V,F1 as W,Bn as X,hx as Y,OC as Z,dx as _,W as a,Dn as a0,ex as a1,_C as a2,DC as a3,lx as a4,ti as a5,rx as a6,J1 as a7,ox as a8,Z1 as a9,Q1 as aa,Wl as ab,Am as ac,sx as ad,Gp as ae,nx as af,ax as ag,$1 as ah,q1 as ai,z2 as aj,W1 as ak,$C as al,FC as am,R1 as an,HC as ao,hs as b,q as c,Xc as d,Ul as e,ra as f,kr as g,Jc as h,pu as i,a as j,Vl as k,yx as l,Gc as m,H1 as n,fr as o,Mm as p,Tm as q,S as r,cx as s,zi as t,px as u,Nm as v,P2 as w,A2 as x,Sx as y,jx as z};
354
- //# sourceMappingURL=mobile-Dvq2d53Y.js.map