pi-web-ui 0.2.13 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-web-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Web chat interface for the pi coding agent, powered by the pi SDK (@earendil-works/pi-coding-agent) — one-command run, Docker/systemd/launchd deployable",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
Error generating stack: `+_.message+`
|
|
40
40
|
`+_.stack}return{value:i,source:s,stack:g,digest:null}}function ku(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Eu(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var DS=typeof WeakMap=="function"?WeakMap:Map;function qp(i,s,c){c=qi(-1,c),c.tag=3,c.payload={element:null};var f=s.value;return c.callback=function(){cl||(cl=!0,Uu=f),Eu(i,s)},c}function Vp(i,s,c){c=qi(-1,c),c.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var g=s.value;c.payload=function(){return f(g)},c.callback=function(){Eu(i,s)}}var _=i.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(c.callback=function(){Eu(i,s),typeof f!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),c}function Gp(i,s,c){var f=i.pingCache;if(f===null){f=i.pingCache=new DS;var g=new Set;f.set(s,g)}else g=f.get(s),g===void 0&&(g=new Set,f.set(s,g));g.has(c)||(g.add(c),i=YS.bind(null,i,s,c),s.then(i,i))}function Yp(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Xp(i,s,c,f,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=qi(-1,1),s.tag=2,fr(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var PS=I.ReactCurrentOwner,Tn=!1;function vn(i,s,c,f){s.child=i===null?gp(s,null,c,f):As(s,i.child,c,f)}function Zp(i,s,c,f,g){c=c.render;var _=s.ref;return Os(s,g),f=gu(i,s,c,f,_,g),c=_u(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&c&&Jc(s),s.flags|=1,vn(i,s,f,g),s.child)}function Qp(i,s,c,f,g){if(i===null){var _=c.type;return typeof _=="function"&&!Vu(_)&&_.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=_,Jp(i,s,_,f,g)):(i=ml(c.type,null,f,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(_=i.child,(i.lanes&g)===0){var x=_.memoizedProps;if(c=c.compare,c=c!==null?c:fo,c(x,f)&&i.ref===s.ref)return Vi(i,s,g)}return s.flags|=1,i=yr(_,f),i.ref=s.ref,i.return=s,s.child=i}function Jp(i,s,c,f,g){if(i!==null){var _=i.memoizedProps;if(fo(_,f)&&i.ref===s.ref)if(Tn=!1,s.pendingProps=f=_,(i.lanes&g)!==0)(i.flags&131072)!==0&&(Tn=!0);else return s.lanes=i.lanes,Vi(i,s,g)}return Cu(i,s,c,f,g)}function em(i,s,c){var f=s.pendingProps,g=f.children,_=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ut(Ps,Un),Un|=c;else{if((c&1073741824)===0)return i=_!==null?_.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ut(Ps,Un),Un|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=_!==null?_.baseLanes:c,ut(Ps,Un),Un|=f}else _!==null?(f=_.baseLanes|c,s.memoizedState=null):f=c,ut(Ps,Un),Un|=f;return vn(i,s,g,c),s.child}function tm(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Cu(i,s,c,f,g){var _=Nn(c)?zr:cn.current;return _=Cs(s,_),Os(s,g),c=gu(i,s,c,f,_,g),f=_u(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&f&&Jc(s),s.flags|=1,vn(i,s,c,g),s.child)}function nm(i,s,c,f,g){if(Nn(c)){var _=!0;Ua(s)}else _=!1;if(Os(s,g),s.stateNode===null)rl(i,s),Wp(s,c,f),xu(s,c,f,g),f=!0;else if(i===null){var x=s.stateNode,T=s.memoizedProps;x.props=T;var P=x.context,V=c.contextType;typeof V=="object"&&V!==null?V=Zn(V):(V=Nn(c)?zr:cn.current,V=Cs(s,V));var se=c.getDerivedStateFromProps,ae=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function";ae||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(T!==f||P!==V)&&Kp(s,x,f,V),dr=!1;var re=s.memoizedState;x.state=re,Ya(s,f,x,g),P=s.memoizedState,T!==f||re!==P||Cn.current||dr?(typeof se=="function"&&(wu(s,c,se,f),P=s.memoizedState),(T=dr||jp(s,c,T,f,re,P,V))?(ae||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=P),x.props=f,x.state=P,x.context=V,f=T):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{x=s.stateNode,vp(i,s),T=s.memoizedProps,V=s.type===s.elementType?T:di(s.type,T),x.props=V,ae=s.pendingProps,re=x.context,P=c.contextType,typeof P=="object"&&P!==null?P=Zn(P):(P=Nn(c)?zr:cn.current,P=Cs(s,P));var ge=c.getDerivedStateFromProps;(se=typeof ge=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(T!==ae||re!==P)&&Kp(s,x,f,P),dr=!1,re=s.memoizedState,x.state=re,Ya(s,f,x,g);var xe=s.memoizedState;T!==ae||re!==xe||Cn.current||dr?(typeof ge=="function"&&(wu(s,c,ge,f),xe=s.memoizedState),(V=dr||jp(s,c,V,f,re,xe,P)||!1)?(se||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,xe,P),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,xe,P)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||T===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=xe),x.props=f,x.state=xe,x.context=P,f=V):(typeof x.componentDidUpdate!="function"||T===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),f=!1)}return Nu(i,s,c,f,_,g)}function Nu(i,s,c,f,g,_){tm(i,s);var x=(s.flags&128)!==0;if(!f&&!x)return g&&ap(s,c,!1),Vi(i,s,_);f=s.stateNode,PS.current=s;var T=x&&typeof c.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&x?(s.child=As(s,i.child,null,_),s.child=As(s,null,T,_)):vn(i,s,T,_),s.memoizedState=f.state,g&&ap(s,c,!0),s.child}function im(i){var s=i.stateNode;s.pendingContext?sp(i,s.pendingContext,s.pendingContext!==s.context):s.context&&sp(i,s.context,!1),uu(i,s.containerInfo)}function rm(i,s,c,f,g){return Rs(),iu(g),s.flags|=256,vn(i,s,c,f),s.child}var Tu={dehydrated:null,treeContext:null,retryLane:0};function Ru(i){return{baseLanes:i,cachePool:null,transitions:null}}function sm(i,s,c){var f=s.pendingProps,g=St.current,_=!1,x=(s.flags&128)!==0,T;if((T=x)||(T=i!==null&&i.memoizedState===null?!1:(g&2)!==0),T?(_=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ut(St,g&1),i===null)return nu(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=f.children,i=f.fallback,_?(f=s.mode,_=s.child,x={mode:"hidden",children:x},(f&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=x):_=gl(x,f,0,null),i=Yr(i,f,c,null),_.return=s,i.return=s,_.sibling=i,s.child=_,s.child.memoizedState=Ru(c),s.memoizedState=Tu,i):Au(s,x));if(g=i.memoizedState,g!==null&&(T=g.dehydrated,T!==null))return BS(i,s,x,f,T,g,c);if(_){_=f.fallback,x=s.mode,g=i.child,T=g.sibling;var P={mode:"hidden",children:f.children};return(x&1)===0&&s.child!==g?(f=s.child,f.childLanes=0,f.pendingProps=P,s.deletions=null):(f=yr(g,P),f.subtreeFlags=g.subtreeFlags&14680064),T!==null?_=yr(T,_):(_=Yr(_,x,c,null),_.flags|=2),_.return=s,f.return=s,f.sibling=_,s.child=f,f=_,_=s.child,x=i.child.memoizedState,x=x===null?Ru(c):{baseLanes:x.baseLanes|c,cachePool:null,transitions:x.transitions},_.memoizedState=x,_.childLanes=i.childLanes&~c,s.memoizedState=Tu,f}return _=i.child,i=_.sibling,f=yr(_,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=c),f.return=s,f.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=f,s.memoizedState=null,f}function Au(i,s){return s=gl({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function il(i,s,c,f){return f!==null&&iu(f),As(s,i.child,null,c),i=Au(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function BS(i,s,c,f,g,_,x){if(c)return s.flags&256?(s.flags&=-257,f=ku(Error(n(422))),il(i,s,x,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(_=f.fallback,g=s.mode,f=gl({mode:"visible",children:f.children},g,0,null),_=Yr(_,g,x,null),_.flags|=2,f.return=s,_.return=s,f.sibling=_,s.child=f,(s.mode&1)!==0&&As(s,i.child,null,x),s.child.memoizedState=Ru(x),s.memoizedState=Tu,_);if((s.mode&1)===0)return il(i,s,x,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var T=f.dgst;return f=T,_=Error(n(419)),f=ku(_,f,void 0),il(i,s,x,f)}if(T=(x&i.childLanes)!==0,Tn||T){if(f=Gt,f!==null){switch(x&-x){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|x))!==0?0:g,g!==0&&g!==_.retryLane&&(_.retryLane=g,Ki(i,g),mi(f,i,g,-1))}return qu(),f=ku(Error(n(421))),il(i,s,x,f)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=XS.bind(null,i),g._reactRetry=s,null):(i=_.treeContext,zn=lr(g.nextSibling),Fn=s,_t=!0,hi=null,i!==null&&(Yn[Xn++]=ji,Yn[Xn++]=Wi,Yn[Xn++]=Ur,ji=i.id,Wi=i.overflow,Ur=s),s=Au(s,f.children),s.flags|=4096,s)}function om(i,s,c){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),au(i.return,s,c)}function Mu(i,s,c,f,g){var _=i.memoizedState;_===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:g}:(_.isBackwards=s,_.rendering=null,_.renderingStartTime=0,_.last=f,_.tail=c,_.tailMode=g)}function am(i,s,c){var f=s.pendingProps,g=f.revealOrder,_=f.tail;if(vn(i,s,f.children,c),f=St.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&om(i,c,s);else if(i.tag===19)om(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ut(St,f),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(c=s.child,g=null;c!==null;)i=c.alternate,i!==null&&Xa(i)===null&&(g=c),c=c.sibling;c=g,c===null?(g=s.child,s.child=null):(g=c.sibling,c.sibling=null),Mu(s,!1,g,c,_);break;case"backwards":for(c=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Xa(i)===null){s.child=g;break}i=g.sibling,g.sibling=c,c=g,g=i}Mu(s,!0,c,null,_);break;case"together":Mu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function rl(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Vi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Kr|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=yr(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=yr(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function FS(i,s,c){switch(s.tag){case 3:im(s),Rs();break;case 5:Sp(s);break;case 1:Nn(s.type)&&Ua(s);break;case 4:uu(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,g=s.memoizedProps.value;ut(qa,f._currentValue),f._currentValue=g;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ut(St,St.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?sm(i,s,c):(ut(St,St.current&1),i=Vi(i,s,c),i!==null?i.sibling:null);ut(St,St.current&1);break;case 19:if(f=(c&s.childLanes)!==0,(i.flags&128)!==0){if(f)return am(i,s,c);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ut(St,St.current),f)break;return null;case 22:case 23:return s.lanes=0,em(i,s,c)}return Vi(i,s,c)}var lm,Ou,cm,um;lm=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Ou=function(){},cm=function(i,s,c,f){var g=i.memoizedProps;if(g!==f){i=s.stateNode,jr(ki.current);var _=null;switch(c){case"input":g=Dn(i,g),f=Dn(i,f),_=[];break;case"select":g=C({},g,{value:void 0}),f=C({},f,{value:void 0}),_=[];break;case"textarea":g=Rr(i,g),f=Rr(i,f),_=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Ba)}Ut(c,f);var x;c=null;for(V in g)if(!f.hasOwnProperty(V)&&g.hasOwnProperty(V)&&g[V]!=null)if(V==="style"){var T=g[V];for(x in T)T.hasOwnProperty(x)&&(c||(c={}),c[x]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(o.hasOwnProperty(V)?_||(_=[]):(_=_||[]).push(V,null));for(V in f){var P=f[V];if(T=g!=null?g[V]:void 0,f.hasOwnProperty(V)&&P!==T&&(P!=null||T!=null))if(V==="style")if(T){for(x in T)!T.hasOwnProperty(x)||P&&P.hasOwnProperty(x)||(c||(c={}),c[x]="");for(x in P)P.hasOwnProperty(x)&&T[x]!==P[x]&&(c||(c={}),c[x]=P[x])}else c||(_||(_=[]),_.push(V,c)),c=P;else V==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,T=T?T.__html:void 0,P!=null&&T!==P&&(_=_||[]).push(V,P)):V==="children"?typeof P!="string"&&typeof P!="number"||(_=_||[]).push(V,""+P):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(o.hasOwnProperty(V)?(P!=null&&V==="onScroll"&&ft("scroll",i),_||T===P||(_=[])):(_=_||[]).push(V,P))}c&&(_=_||[]).push("style",c);var V=_;(s.updateQueue=V)&&(s.flags|=4)}},um=function(i,s,c,f){c!==f&&(s.flags|=4)};function To(i,s){if(!_t)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function hn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(s)for(var g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=f,i.childLanes=c,s}function zS(i,s,c){var f=s.pendingProps;switch(eu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(s),null;case 1:return Nn(s.type)&&za(),hn(s),null;case 3:return f=s.stateNode,Ls(),pt(Cn),pt(cn),fu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Wa(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,hi!==null&&(ju(hi),hi=null))),Ou(i,s),hn(s),null;case 5:hu(s);var g=jr(xo.current);if(c=s.type,i!==null&&s.stateNode!=null)cm(i,s,c,f,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return hn(s),null}if(i=jr(ki.current),Wa(s)){f=s.stateNode,c=s.type;var _=s.memoizedProps;switch(f[xi]=s,f[vo]=_,i=(s.mode&1)!==0,c){case"dialog":ft("cancel",f),ft("close",f);break;case"iframe":case"object":case"embed":ft("load",f);break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],f);break;case"source":ft("error",f);break;case"img":case"image":case"link":ft("error",f),ft("load",f);break;case"details":ft("toggle",f);break;case"input":Pi(f,_),ft("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!_.multiple},ft("invalid",f);break;case"textarea":Ar(f,_),ft("invalid",f)}Ut(c,_),g=null;for(var x in _)if(_.hasOwnProperty(x)){var T=_[x];x==="children"?typeof T=="string"?f.textContent!==T&&(_.suppressHydrationWarning!==!0&&Pa(f.textContent,T,i),g=["children",T]):typeof T=="number"&&f.textContent!==""+T&&(_.suppressHydrationWarning!==!0&&Pa(f.textContent,T,i),g=["children",""+T]):o.hasOwnProperty(x)&&T!=null&&x==="onScroll"&&ft("scroll",f)}switch(c){case"input":Ft(f),Kn(f,_,!0);break;case"textarea":Ft(f),Mr(f);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(f.onclick=Ba)}f=g,s.updateQueue=f,f!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Q(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=x.createElement(c,{is:f.is}):(i=x.createElement(c),c==="select"&&(x=i,f.multiple?x.multiple=!0:f.size&&(x.size=f.size))):i=x.createElementNS(i,c),i[xi]=s,i[vo]=f,lm(i,s,!1,!1),s.stateNode=i;e:{switch(x=Vn(c,f),c){case"dialog":ft("cancel",i),ft("close",i),g=f;break;case"iframe":case"object":case"embed":ft("load",i),g=f;break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],i);g=f;break;case"source":ft("error",i),g=f;break;case"img":case"image":case"link":ft("error",i),ft("load",i),g=f;break;case"details":ft("toggle",i),g=f;break;case"input":Pi(i,f),g=Dn(i,f),ft("invalid",i);break;case"option":g=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},g=C({},f,{value:void 0}),ft("invalid",i);break;case"textarea":Ar(i,f),g=Rr(i,f),ft("invalid",i);break;default:g=f}Ut(c,g),T=g;for(_ in T)if(T.hasOwnProperty(_)){var P=T[_];_==="style"?li(i,P):_==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,P!=null&&je(i,P)):_==="children"?typeof P=="string"?(c!=="textarea"||P!=="")&&Xe(i,P):typeof P=="number"&&Xe(i,""+P):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(o.hasOwnProperty(_)?P!=null&&_==="onScroll"&&ft("scroll",i):P!=null&&R(i,_,P,x))}switch(c){case"input":Ft(i),Kn(i,f,!1);break;case"textarea":Ft(i),Mr(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Ie(f.value));break;case"select":i.multiple=!!f.multiple,_=f.value,_!=null?yi(i,!!f.multiple,_,!1):f.defaultValue!=null&&yi(i,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=Ba)}switch(c){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return hn(s),null;case 6:if(i&&s.stateNode!=null)um(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(c=jr(xo.current),jr(ki.current),Wa(s)){if(f=s.stateNode,c=s.memoizedProps,f[xi]=s,(_=f.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:Pa(f.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Pa(f.nodeValue,c,(i.mode&1)!==0)}_&&(s.flags|=4)}else f=(c.nodeType===9?c:c.ownerDocument).createTextNode(f),f[xi]=s,s.stateNode=f}return hn(s),null;case 13:if(pt(St),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&zn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)fp(),Rs(),s.flags|=98560,_=!1;else if(_=Wa(s),f!==null&&f.dehydrated!==null){if(i===null){if(!_)throw Error(n(318));if(_=s.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(n(317));_[xi]=s}else Rs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;hn(s),_=!1}else hi!==null&&(ju(hi),hi=null),_=!0;if(!_)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(St.current&1)!==0?$t===0&&($t=3):qu())),s.updateQueue!==null&&(s.flags|=4),hn(s),null);case 4:return Ls(),Ou(i,s),i===null&&go(s.stateNode.containerInfo),hn(s),null;case 10:return ou(s.type._context),hn(s),null;case 17:return Nn(s.type)&&za(),hn(s),null;case 19:if(pt(St),_=s.memoizedState,_===null)return hn(s),null;if(f=(s.flags&128)!==0,x=_.rendering,x===null)if(f)To(_,!1);else{if($t!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Xa(i),x!==null){for(s.flags|=128,To(_,!1),f=x.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=c,c=s.child;c!==null;)_=c,i=f,_.flags&=14680066,x=_.alternate,x===null?(_.childLanes=0,_.lanes=i,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=x.childLanes,_.lanes=x.lanes,_.child=x.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=x.memoizedProps,_.memoizedState=x.memoizedState,_.updateQueue=x.updateQueue,_.type=x.type,i=x.dependencies,_.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ut(St,St.current&1|2),s.child}i=i.sibling}_.tail!==null&&yt()>Bs&&(s.flags|=128,f=!0,To(_,!1),s.lanes=4194304)}else{if(!f)if(i=Xa(x),i!==null){if(s.flags|=128,f=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),To(_,!0),_.tail===null&&_.tailMode==="hidden"&&!x.alternate&&!_t)return hn(s),null}else 2*yt()-_.renderingStartTime>Bs&&c!==1073741824&&(s.flags|=128,f=!0,To(_,!1),s.lanes=4194304);_.isBackwards?(x.sibling=s.child,s.child=x):(c=_.last,c!==null?c.sibling=x:s.child=x,_.last=x)}return _.tail!==null?(s=_.tail,_.rendering=s,_.tail=s.sibling,_.renderingStartTime=yt(),s.sibling=null,c=St.current,ut(St,f?c&1|2:c&1),s):(hn(s),null);case 22:case 23:return Ku(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Un&1073741824)!==0&&(hn(s),s.subtreeFlags&6&&(s.flags|=8192)):hn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function US(i,s){switch(eu(s),s.tag){case 1:return Nn(s.type)&&za(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ls(),pt(Cn),pt(cn),fu(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return hu(s),null;case 13:if(pt(St),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Rs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return pt(St),null;case 4:return Ls(),null;case 10:return ou(s.type._context),null;case 22:case 23:return Ku(),null;case 24:return null;default:return null}}var sl=!1,dn=!1,HS=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ds(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(f){Ct(i,s,f)}else c.current=null}function Lu(i,s,c){try{c()}catch(f){Ct(i,s,f)}}var hm=!1;function $S(i,s){if(Kc=Ea,i=jf(),Bc(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var g=f.anchorOffset,_=f.focusNode;f=f.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var x=0,T=-1,P=-1,V=0,se=0,ae=i,re=null;t:for(;;){for(var ge;ae!==c||g!==0&&ae.nodeType!==3||(T=x+g),ae!==_||f!==0&&ae.nodeType!==3||(P=x+f),ae.nodeType===3&&(x+=ae.nodeValue.length),(ge=ae.firstChild)!==null;)re=ae,ae=ge;for(;;){if(ae===i)break t;if(re===c&&++V===g&&(T=x),re===_&&++se===f&&(P=x),(ge=ae.nextSibling)!==null)break;ae=re,re=ae.parentNode}ae=ge}c=T===-1||P===-1?null:{start:T,end:P}}else c=null}c=c||{start:0,end:0}}else c=null;for(qc={focusedElem:i,selectionRange:c},Ea=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var xe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ke=xe.memoizedProps,Mt=xe.memoizedState,j=s.stateNode,F=j.getSnapshotBeforeUpdate(s.elementType===s.type?ke:di(s.type,ke),Mt);j.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var W=s.stateNode.containerInfo;W.nodeType===1?W.textContent="":W.nodeType===9&&W.documentElement&&W.removeChild(W.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ue){Ct(s,s.return,ue)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return xe=hm,hm=!1,xe}function Ro(i,s,c){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&i)===i){var _=g.destroy;g.destroy=void 0,_!==void 0&&Lu(s,c,_)}g=g.next}while(g!==f)}}function ol(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var f=c.create;c.destroy=f()}c=c.next}while(c!==s)}}function Iu(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function dm(i){var s=i.alternate;s!==null&&(i.alternate=null,dm(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[xi],delete s[vo],delete s[Xc],delete s[kS],delete s[ES])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function fm(i){return i.tag===5||i.tag===3||i.tag===4}function pm(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||fm(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Du(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Ba));else if(f!==4&&(i=i.child,i!==null))for(Du(i,s,c),i=i.sibling;i!==null;)Du(i,s,c),i=i.sibling}function Pu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Pu(i,s,c),i=i.sibling;i!==null;)Pu(i,s,c),i=i.sibling}var sn=null,fi=!1;function pr(i,s,c){for(c=c.child;c!==null;)mm(i,s,c),c=c.sibling}function mm(i,s,c){if(Ge&&typeof Ge.onCommitFiberUnmount=="function")try{Ge.onCommitFiberUnmount(We,c)}catch{}switch(c.tag){case 5:dn||Ds(c,s);case 6:var f=sn,g=fi;sn=null,pr(i,s,c),sn=f,fi=g,sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):sn.removeChild(c.stateNode));break;case 18:sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?Yc(i.parentNode,c):i.nodeType===1&&Yc(i,c),oo(i)):Yc(sn,c.stateNode));break;case 4:f=sn,g=fi,sn=c.stateNode.containerInfo,fi=!0,pr(i,s,c),sn=f,fi=g;break;case 0:case 11:case 14:case 15:if(!dn&&(f=c.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var _=g,x=_.destroy;_=_.tag,x!==void 0&&((_&2)!==0||(_&4)!==0)&&Lu(c,s,x),g=g.next}while(g!==f)}pr(i,s,c);break;case 1:if(!dn&&(Ds(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=c.memoizedProps,f.state=c.memoizedState,f.componentWillUnmount()}catch(T){Ct(c,s,T)}pr(i,s,c);break;case 21:pr(i,s,c);break;case 22:c.mode&1?(dn=(f=dn)||c.memoizedState!==null,pr(i,s,c),dn=f):pr(i,s,c);break;default:pr(i,s,c)}}function gm(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new HS),s.forEach(function(f){var g=ZS.bind(null,i,f);c.has(f)||(c.add(f),f.then(g,g))})}}function pi(i,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var g=c[f];try{var _=i,x=s,T=x;e:for(;T!==null;){switch(T.tag){case 5:sn=T.stateNode,fi=!1;break e;case 3:sn=T.stateNode.containerInfo,fi=!0;break e;case 4:sn=T.stateNode.containerInfo,fi=!0;break e}T=T.return}if(sn===null)throw Error(n(160));mm(_,x,g),sn=null,fi=!1;var P=g.alternate;P!==null&&(P.return=null),g.return=null}catch(V){Ct(g,s,V)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)_m(s,i),s=s.sibling}function _m(i,s){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pi(s,i),Ci(i),f&4){try{Ro(3,i,i.return),ol(3,i)}catch(ke){Ct(i,i.return,ke)}try{Ro(5,i,i.return)}catch(ke){Ct(i,i.return,ke)}}break;case 1:pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return);break;case 5:if(pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return),i.flags&32){var g=i.stateNode;try{Xe(g,"")}catch(ke){Ct(i,i.return,ke)}}if(f&4&&(g=i.stateNode,g!=null)){var _=i.memoizedProps,x=c!==null?c.memoizedProps:_,T=i.type,P=i.updateQueue;if(i.updateQueue=null,P!==null)try{T==="input"&&_.type==="radio"&&_.name!=null&&Qe(g,_),Vn(T,x);var V=Vn(T,_);for(x=0;x<P.length;x+=2){var se=P[x],ae=P[x+1];se==="style"?li(g,ae):se==="dangerouslySetInnerHTML"?je(g,ae):se==="children"?Xe(g,ae):R(g,se,ae,V)}switch(T){case"input":Pn(g,_);break;case"textarea":qn(g,_);break;case"select":var re=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!_.multiple;var ge=_.value;ge!=null?yi(g,!!_.multiple,ge,!1):re!==!!_.multiple&&(_.defaultValue!=null?yi(g,!!_.multiple,_.defaultValue,!0):yi(g,!!_.multiple,_.multiple?[]:"",!1))}g[vo]=_}catch(ke){Ct(i,i.return,ke)}}break;case 6:if(pi(s,i),Ci(i),f&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,_=i.memoizedProps;try{g.nodeValue=_}catch(ke){Ct(i,i.return,ke)}}break;case 3:if(pi(s,i),Ci(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{oo(s.containerInfo)}catch(ke){Ct(i,i.return,ke)}break;case 4:pi(s,i),Ci(i);break;case 13:pi(s,i),Ci(i),g=i.child,g.flags&8192&&(_=g.memoizedState!==null,g.stateNode.isHidden=_,!_||g.alternate!==null&&g.alternate.memoizedState!==null||(zu=yt())),f&4&&gm(i);break;case 22:if(se=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(V=dn)||se,pi(s,i),dn=V):pi(s,i),Ci(i),f&8192){if(V=i.memoizedState!==null,(i.stateNode.isHidden=V)&&!se&&(i.mode&1)!==0)for(we=i,se=i.child;se!==null;){for(ae=we=se;we!==null;){switch(re=we,ge=re.child,re.tag){case 0:case 11:case 14:case 15:Ro(4,re,re.return);break;case 1:Ds(re,re.return);var xe=re.stateNode;if(typeof xe.componentWillUnmount=="function"){f=re,c=re.return;try{s=f,xe.props=s.memoizedProps,xe.state=s.memoizedState,xe.componentWillUnmount()}catch(ke){Ct(f,c,ke)}}break;case 5:Ds(re,re.return);break;case 22:if(re.memoizedState!==null){bm(ae);continue}}ge!==null?(ge.return=re,we=ge):bm(ae)}se=se.sibling}e:for(se=null,ae=i;;){if(ae.tag===5){if(se===null){se=ae;try{g=ae.stateNode,V?(_=g.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(T=ae.stateNode,P=ae.memoizedProps.style,x=P!=null&&P.hasOwnProperty("display")?P.display:null,T.style.display=En("display",x))}catch(ke){Ct(i,i.return,ke)}}}else if(ae.tag===6){if(se===null)try{ae.stateNode.nodeValue=V?"":ae.memoizedProps}catch(ke){Ct(i,i.return,ke)}}else if((ae.tag!==22&&ae.tag!==23||ae.memoizedState===null||ae===i)&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===i)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===i)break e;se===ae&&(se=null),ae=ae.return}se===ae&&(se=null),ae.sibling.return=ae.return,ae=ae.sibling}}break;case 19:pi(s,i),Ci(i),f&4&&gm(i);break;case 21:break;default:pi(s,i),Ci(i)}}function Ci(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(fm(c)){var f=c;break e}c=c.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(Xe(g,""),f.flags&=-33);var _=pm(i);Pu(i,_,g);break;case 3:case 4:var x=f.stateNode.containerInfo,T=pm(i);Du(i,T,x);break;default:throw Error(n(161))}}catch(P){Ct(i,i.return,P)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function jS(i,s,c){we=i,vm(i)}function vm(i,s,c){for(var f=(i.mode&1)!==0;we!==null;){var g=we,_=g.child;if(g.tag===22&&f){var x=g.memoizedState!==null||sl;if(!x){var T=g.alternate,P=T!==null&&T.memoizedState!==null||dn;T=sl;var V=dn;if(sl=x,(dn=P)&&!V)for(we=g;we!==null;)x=we,P=x.child,x.tag===22&&x.memoizedState!==null?Sm(g):P!==null?(P.return=x,we=P):Sm(g);for(;_!==null;)we=_,vm(_),_=_.sibling;we=g,sl=T,dn=V}ym(i)}else(g.subtreeFlags&8772)!==0&&_!==null?(_.return=g,we=_):ym(i)}}function ym(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||ol(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!dn)if(c===null)f.componentDidMount();else{var g=s.elementType===s.type?c.memoizedProps:di(s.type,c.memoizedProps);f.componentDidUpdate(g,c.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var _=s.updateQueue;_!==null&&bp(s,_,f);break;case 3:var x=s.updateQueue;if(x!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}bp(s,x,c)}break;case 5:var T=s.stateNode;if(c===null&&s.flags&4){c=T;var P=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":P.autoFocus&&c.focus();break;case"img":P.src&&(c.src=P.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var V=s.alternate;if(V!==null){var se=V.memoizedState;if(se!==null){var ae=se.dehydrated;ae!==null&&oo(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&Iu(s)}catch(re){Ct(s,s.return,re)}}if(s===i){we=null;break}if(c=s.sibling,c!==null){c.return=s.return,we=c;break}we=s.return}}function bm(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var c=s.sibling;if(c!==null){c.return=s.return,we=c;break}we=s.return}}function Sm(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{ol(4,s)}catch(P){Ct(s,c,P)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var g=s.return;try{f.componentDidMount()}catch(P){Ct(s,g,P)}}var _=s.return;try{Iu(s)}catch(P){Ct(s,_,P)}break;case 5:var x=s.return;try{Iu(s)}catch(P){Ct(s,x,P)}}}catch(P){Ct(s,s.return,P)}if(s===i){we=null;break}var T=s.sibling;if(T!==null){T.return=s.return,we=T;break}we=s.return}}var WS=Math.ceil,al=I.ReactCurrentDispatcher,Bu=I.ReactCurrentOwner,Jn=I.ReactCurrentBatchConfig,tt=0,Gt=null,It=null,on=0,Un=0,Ps=cr(0),$t=0,Ao=null,Kr=0,ll=0,Fu=0,Mo=null,Rn=null,zu=0,Bs=1/0,Gi=null,cl=!1,Uu=null,mr=null,ul=!1,gr=null,hl=0,Oo=0,Hu=null,dl=-1,fl=0;function yn(){return(tt&6)!==0?yt():dl!==-1?dl:dl=yt()}function _r(i){return(i.mode&1)===0?1:(tt&2)!==0&&on!==0?on&-on:NS.transition!==null?(fl===0&&(fl=wa()),fl):(i=et,i!==0||(i=window.event,i=i===void 0?16:xf(i.type)),i)}function mi(i,s,c,f){if(50<Oo)throw Oo=0,Hu=null,Error(n(185));rr(i,c,f),((tt&2)===0||i!==Gt)&&(i===Gt&&((tt&2)===0&&(ll|=c),$t===4&&vr(i,on)),An(i,f),c===1&&tt===0&&(s.mode&1)===0&&(Bs=yt()+500,Ha&&hr()))}function An(i,s){var c=i.callbackNode;kc(i,s);var f=Dr(i,i===Gt?on:0);if(f===0)c!==null&&ci(c),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(c!=null&&ci(c),s===1)i.tag===0?CS(xm.bind(null,i)):lp(xm.bind(null,i)),wS(function(){(tt&6)===0&&hr()}),c=null;else{switch(Fe(f)){case 1:c=eo;break;case 4:c=Lr;break;case 16:c=ms;break;case 536870912:c=Ce;break;default:c=ms}c=Mm(c,wm.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function wm(i,s){if(dl=-1,fl=0,(tt&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Fs()&&i.callbackNode!==c)return null;var f=Dr(i,i===Gt?on:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=pl(i,f);else{s=f;var g=tt;tt|=2;var _=Em();(Gt!==i||on!==s)&&(Gi=null,Bs=yt()+500,Vr(i,s));do try{VS();break}catch(T){km(i,T)}while(!0);su(),al.current=_,tt=g,It!==null?s=0:(Gt=null,on=0,s=$t)}if(s!==0){if(s===2&&(g=to(i),g!==0&&(f=g,s=$u(i,g))),s===1)throw c=Ao,Vr(i,0),vr(i,f),An(i,yt()),c;if(s===6)vr(i,f);else{if(g=i.current.alternate,(f&30)===0&&!KS(g)&&(s=pl(i,f),s===2&&(_=to(i),_!==0&&(f=_,s=$u(i,_))),s===1))throw c=Ao,Vr(i,0),vr(i,f),An(i,yt()),c;switch(i.finishedWork=g,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Gr(i,Rn,Gi);break;case 3:if(vr(i,f),(f&130023424)===f&&(s=zu+500-yt(),10<s)){if(Dr(i,0)!==0)break;if(g=i.suspendedLanes,(g&f)!==f){yn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Gc(Gr.bind(null,i,Rn,Gi),s);break}Gr(i,Rn,Gi);break;case 4:if(vr(i,f),(f&4194240)===f)break;for(s=i.eventTimes,g=-1;0<f;){var x=31-bt(f);_=1<<x,x=s[x],x>g&&(g=x),f&=~_}if(f=g,f=yt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*WS(f/1960))-f,10<f){i.timeoutHandle=Gc(Gr.bind(null,i,Rn,Gi),f);break}Gr(i,Rn,Gi);break;case 5:Gr(i,Rn,Gi);break;default:throw Error(n(329))}}}return An(i,yt()),i.callbackNode===c?wm.bind(null,i):null}function $u(i,s){var c=Mo;return i.current.memoizedState.isDehydrated&&(Vr(i,s).flags|=256),i=pl(i,s),i!==2&&(s=Rn,Rn=c,s!==null&&ju(s)),i}function ju(i){Rn===null?Rn=i:Rn.push.apply(Rn,i)}function KS(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var f=0;f<c.length;f++){var g=c[f],_=g.getSnapshot;g=g.value;try{if(!ui(_(),g))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function vr(i,s){for(s&=~Fu,s&=~ll,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-bt(s),f=1<<c;i[c]=-1,s&=~f}}function xm(i){if((tt&6)!==0)throw Error(n(327));Fs();var s=Dr(i,0);if((s&1)===0)return An(i,yt()),null;var c=pl(i,s);if(i.tag!==0&&c===2){var f=to(i);f!==0&&(s=f,c=$u(i,f))}if(c===1)throw c=Ao,Vr(i,0),vr(i,s),An(i,yt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Gr(i,Rn,Gi),An(i,yt()),null}function Wu(i,s){var c=tt;tt|=1;try{return i(s)}finally{tt=c,tt===0&&(Bs=yt()+500,Ha&&hr())}}function qr(i){gr!==null&&gr.tag===0&&(tt&6)===0&&Fs();var s=tt;tt|=1;var c=Jn.transition,f=et;try{if(Jn.transition=null,et=1,i)return i()}finally{et=f,Jn.transition=c,tt=s,(tt&6)===0&&hr()}}function Ku(){Un=Ps.current,pt(Ps)}function Vr(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,SS(c)),It!==null)for(c=It.return;c!==null;){var f=c;switch(eu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&za();break;case 3:Ls(),pt(Cn),pt(cn),fu();break;case 5:hu(f);break;case 4:Ls();break;case 13:pt(St);break;case 19:pt(St);break;case 10:ou(f.type._context);break;case 22:case 23:Ku()}c=c.return}if(Gt=i,It=i=yr(i.current,null),on=Un=s,$t=0,Ao=null,Fu=ll=Kr=0,Rn=Mo=null,$r!==null){for(s=0;s<$r.length;s++)if(c=$r[s],f=c.interleaved,f!==null){c.interleaved=null;var g=f.next,_=c.pending;if(_!==null){var x=_.next;_.next=g,f.next=x}c.pending=f}$r=null}return i}function km(i,s){do{var c=It;try{if(su(),Za.current=tl,Qa){for(var f=wt.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}Qa=!1}if(Wr=0,Vt=Ht=wt=null,ko=!1,Eo=0,Bu.current=null,c===null||c.return===null){$t=1,Ao=s,It=null;break}e:{var _=i,x=c.return,T=c,P=s;if(s=on,T.flags|=32768,P!==null&&typeof P=="object"&&typeof P.then=="function"){var V=P,se=T,ae=se.tag;if((se.mode&1)===0&&(ae===0||ae===11||ae===15)){var re=se.alternate;re?(se.updateQueue=re.updateQueue,se.memoizedState=re.memoizedState,se.lanes=re.lanes):(se.updateQueue=null,se.memoizedState=null)}var ge=Yp(x);if(ge!==null){ge.flags&=-257,Xp(ge,x,T,_,s),ge.mode&1&&Gp(_,V,s),s=ge,P=V;var xe=s.updateQueue;if(xe===null){var ke=new Set;ke.add(P),s.updateQueue=ke}else xe.add(P);break e}else{if((s&1)===0){Gp(_,V,s),qu();break e}P=Error(n(426))}}else if(_t&&T.mode&1){var Mt=Yp(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),Xp(Mt,x,T,_,s),iu(Is(P,T));break e}}_=P=Is(P,T),$t!==4&&($t=2),Mo===null?Mo=[_]:Mo.push(_),_=x;do{switch(_.tag){case 3:_.flags|=65536,s&=-s,_.lanes|=s;var j=qp(_,P,s);yp(_,j);break e;case 1:T=P;var F=_.type,W=_.stateNode;if((_.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||W!==null&&typeof W.componentDidCatch=="function"&&(mr===null||!mr.has(W)))){_.flags|=65536,s&=-s,_.lanes|=s;var ue=Vp(_,T,s);yp(_,ue);break e}}_=_.return}while(_!==null)}Nm(c)}catch(Ee){s=Ee,It===c&&c!==null&&(It=c=c.return);continue}break}while(!0)}function Em(){var i=al.current;return al.current=tl,i===null?tl:i}function qu(){($t===0||$t===3||$t===2)&&($t=4),Gt===null||(Kr&268435455)===0&&(ll&268435455)===0||vr(Gt,on)}function pl(i,s){var c=tt;tt|=2;var f=Em();(Gt!==i||on!==s)&&(Gi=null,Vr(i,s));do try{qS();break}catch(g){km(i,g)}while(!0);if(su(),tt=c,al.current=f,It!==null)throw Error(n(261));return Gt=null,on=0,$t}function qS(){for(;It!==null;)Cm(It)}function VS(){for(;It!==null&&!ba();)Cm(It)}function Cm(i){var s=Am(i.alternate,i,Un);i.memoizedProps=i.pendingProps,s===null?Nm(i):It=s,Bu.current=null}function Nm(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=zS(c,s,Un),c!==null){It=c;return}}else{if(c=US(c,s),c!==null){c.flags&=32767,It=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{$t=6,It=null;return}}if(s=s.sibling,s!==null){It=s;return}It=s=i}while(s!==null);$t===0&&($t=5)}function Gr(i,s,c){var f=et,g=Jn.transition;try{Jn.transition=null,et=1,GS(i,s,c,f)}finally{Jn.transition=g,et=f}return null}function GS(i,s,c,f){do Fs();while(gr!==null);if((tt&6)!==0)throw Error(n(327));c=i.finishedWork;var g=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var _=c.lanes|c.childLanes;if(Gn(i,_),i===Gt&&(It=Gt=null,on=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||ul||(ul=!0,Mm(ms,function(){return Fs(),null})),_=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||_){_=Jn.transition,Jn.transition=null;var x=et;et=1;var T=tt;tt|=4,Bu.current=null,$S(i,c),_m(c,i),pS(qc),Ea=!!Kc,qc=Kc=null,i.current=c,jS(c),Sa(),tt=T,et=x,Jn.transition=_}else i.current=c;if(ul&&(ul=!1,gr=i,hl=g),_=i.pendingLanes,_===0&&(mr=null),Rt(c.stateNode),An(i,yt()),s!==null)for(f=i.onRecoverableError,c=0;c<s.length;c++)g=s[c],f(g.value,{componentStack:g.stack,digest:g.digest});if(cl)throw cl=!1,i=Uu,Uu=null,i;return(hl&1)!==0&&i.tag!==0&&Fs(),_=i.pendingLanes,(_&1)!==0?i===Hu?Oo++:(Oo=0,Hu=i):Oo=0,hr(),null}function Fs(){if(gr!==null){var i=Fe(hl),s=Jn.transition,c=et;try{if(Jn.transition=null,et=16>i?16:i,gr===null)var f=!1;else{if(i=gr,gr=null,hl=0,(tt&6)!==0)throw Error(n(331));var g=tt;for(tt|=4,we=i.current;we!==null;){var _=we,x=_.child;if((we.flags&16)!==0){var T=_.deletions;if(T!==null){for(var P=0;P<T.length;P++){var V=T[P];for(we=V;we!==null;){var se=we;switch(se.tag){case 0:case 11:case 15:Ro(8,se,_)}var ae=se.child;if(ae!==null)ae.return=se,we=ae;else for(;we!==null;){se=we;var re=se.sibling,ge=se.return;if(dm(se),se===V){we=null;break}if(re!==null){re.return=ge,we=re;break}we=ge}}}var xe=_.alternate;if(xe!==null){var ke=xe.child;if(ke!==null){xe.child=null;do{var Mt=ke.sibling;ke.sibling=null,ke=Mt}while(ke!==null)}}we=_}}if((_.subtreeFlags&2064)!==0&&x!==null)x.return=_,we=x;else e:for(;we!==null;){if(_=we,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:Ro(9,_,_.return)}var j=_.sibling;if(j!==null){j.return=_.return,we=j;break e}we=_.return}}var F=i.current;for(we=F;we!==null;){x=we;var W=x.child;if((x.subtreeFlags&2064)!==0&&W!==null)W.return=x,we=W;else e:for(x=F;we!==null;){if(T=we,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:ol(9,T)}}catch(Ee){Ct(T,T.return,Ee)}if(T===x){we=null;break e}var ue=T.sibling;if(ue!==null){ue.return=T.return,we=ue;break e}we=T.return}}if(tt=g,hr(),Ge&&typeof Ge.onPostCommitFiberRoot=="function")try{Ge.onPostCommitFiberRoot(We,i)}catch{}f=!0}return f}finally{et=c,Jn.transition=s}}return!1}function Tm(i,s,c){s=Is(c,s),s=qp(i,s,1),i=fr(i,s,1),s=yn(),i!==null&&(rr(i,1,s),An(i,s))}function Ct(i,s,c){if(i.tag===3)Tm(i,i,c);else for(;s!==null;){if(s.tag===3){Tm(s,i,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(mr===null||!mr.has(f))){i=Is(c,i),i=Vp(s,i,1),s=fr(s,i,1),i=yn(),s!==null&&(rr(s,1,i),An(s,i));break}}s=s.return}}function YS(i,s,c){var f=i.pingCache;f!==null&&f.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Gt===i&&(on&c)===c&&($t===4||$t===3&&(on&130023424)===on&&500>yt()-zu?Vr(i,0):Fu|=c),An(i,s)}function Rm(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var c=yn();i=Ki(i,s),i!==null&&(rr(i,s,c),An(i,c))}function XS(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),Rm(i,c)}function ZS(i,s){var c=0;switch(i.tag){case 13:var f=i.stateNode,g=i.memoizedState;g!==null&&(c=g.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Rm(i,c)}var Am;Am=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)Tn=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return Tn=!1,FS(i,s,c);Tn=(i.flags&131072)!==0}else Tn=!1,_t&&(s.flags&1048576)!==0&&cp(s,ja,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;rl(i,s),i=s.pendingProps;var g=Cs(s,cn.current);Os(s,c),g=gu(null,s,f,i,g,c);var _=_u();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Nn(f)?(_=!0,Ua(s)):_=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,cu(s),g.updater=nl,s.stateNode=g,g._reactInternals=s,xu(s,f,i,c),s=Nu(null,s,f,!0,_,c)):(s.tag=0,_t&&_&&Jc(s),vn(null,s,g,c),s=s.child),s;case 16:f=s.elementType;e:{switch(rl(i,s),i=s.pendingProps,g=f._init,f=g(f._payload),s.type=f,g=s.tag=JS(f),i=di(f,i),g){case 0:s=Cu(null,s,f,i,c);break e;case 1:s=nm(null,s,f,i,c);break e;case 11:s=Zp(null,s,f,i,c);break e;case 14:s=Qp(null,s,f,di(f.type,i),c);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),Cu(i,s,f,g,c);case 1:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),nm(i,s,f,g,c);case 3:e:{if(im(s),i===null)throw Error(n(387));f=s.pendingProps,_=s.memoizedState,g=_.element,vp(i,s),Ya(s,f,null,c);var x=s.memoizedState;if(f=x.element,_.isDehydrated)if(_={element:f,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){g=Is(Error(n(423)),s),s=rm(i,s,f,c,g);break e}else if(f!==g){g=Is(Error(n(424)),s),s=rm(i,s,f,c,g);break e}else for(zn=lr(s.stateNode.containerInfo.firstChild),Fn=s,_t=!0,hi=null,c=gp(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Rs(),f===g){s=Vi(i,s,c);break e}vn(i,s,f,c)}s=s.child}return s;case 5:return Sp(s),i===null&&nu(s),f=s.type,g=s.pendingProps,_=i!==null?i.memoizedProps:null,x=g.children,Vc(f,g)?x=null:_!==null&&Vc(f,_)&&(s.flags|=32),tm(i,s),vn(i,s,x,c),s.child;case 6:return i===null&&nu(s),null;case 13:return sm(i,s,c);case 4:return uu(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=As(s,null,f,c):vn(i,s,f,c),s.child;case 11:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),Zp(i,s,f,g,c);case 7:return vn(i,s,s.pendingProps,c),s.child;case 8:return vn(i,s,s.pendingProps.children,c),s.child;case 12:return vn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(f=s.type._context,g=s.pendingProps,_=s.memoizedProps,x=g.value,ut(qa,f._currentValue),f._currentValue=x,_!==null)if(ui(_.value,x)){if(_.children===g.children&&!Cn.current){s=Vi(i,s,c);break e}}else for(_=s.child,_!==null&&(_.return=s);_!==null;){var T=_.dependencies;if(T!==null){x=_.child;for(var P=T.firstContext;P!==null;){if(P.context===f){if(_.tag===1){P=qi(-1,c&-c),P.tag=2;var V=_.updateQueue;if(V!==null){V=V.shared;var se=V.pending;se===null?P.next=P:(P.next=se.next,se.next=P),V.pending=P}}_.lanes|=c,P=_.alternate,P!==null&&(P.lanes|=c),au(_.return,c,s),T.lanes|=c;break}P=P.next}}else if(_.tag===10)x=_.type===s.type?null:_.child;else if(_.tag===18){if(x=_.return,x===null)throw Error(n(341));x.lanes|=c,T=x.alternate,T!==null&&(T.lanes|=c),au(x,c,s),x=_.sibling}else x=_.child;if(x!==null)x.return=_;else for(x=_;x!==null;){if(x===s){x=null;break}if(_=x.sibling,_!==null){_.return=x.return,x=_;break}x=x.return}_=x}vn(i,s,g.children,c),s=s.child}return s;case 9:return g=s.type,f=s.pendingProps.children,Os(s,c),g=Zn(g),f=f(g),s.flags|=1,vn(i,s,f,c),s.child;case 14:return f=s.type,g=di(f,s.pendingProps),g=di(f.type,g),Qp(i,s,f,g,c);case 15:return Jp(i,s,s.type,s.pendingProps,c);case 17:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),rl(i,s),s.tag=1,Nn(f)?(i=!0,Ua(s)):i=!1,Os(s,c),Wp(s,f,g),xu(s,f,g,c),Nu(null,s,f,!0,i,c);case 19:return am(i,s,c);case 22:return em(i,s,c)}throw Error(n(156,s.tag))};function Mm(i,s){return ya(i,s)}function QS(i,s,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(i,s,c,f){return new QS(i,s,c,f)}function Vu(i){return i=i.prototype,!(!i||!i.isReactComponent)}function JS(i){if(typeof i=="function")return Vu(i)?1:0;if(i!=null){if(i=i.$$typeof,i===K)return 11;if(i===z)return 14}return 2}function yr(i,s){var c=i.alternate;return c===null?(c=ei(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function ml(i,s,c,f,g,_){var x=2;if(f=i,typeof i=="function")Vu(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case Z:return Yr(c.children,g,_,s);case q:x=8,g|=8;break;case H:return i=ei(12,c,s,g|2),i.elementType=H,i.lanes=_,i;case L:return i=ei(13,c,s,g),i.elementType=L,i.lanes=_,i;case $:return i=ei(19,c,s,g),i.elementType=$,i.lanes=_,i;case oe:return gl(c,g,_,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case B:x=10;break e;case X:x=9;break e;case K:x=11;break e;case z:x=14;break e;case J:x=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ei(x,c,s,g),s.elementType=i,s.type=f,s.lanes=_,s}function Yr(i,s,c,f){return i=ei(7,i,f,s),i.lanes=c,i}function gl(i,s,c,f){return i=ei(22,i,f,s),i.elementType=oe,i.lanes=c,i.stateNode={isHidden:!1},i}function Gu(i,s,c){return i=ei(6,i,null,s),i.lanes=c,i}function Yu(i,s,c){return s=ei(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function ew(i,s,c,f,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ir(0),this.expirationTimes=ir(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ir(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Xu(i,s,c,f,g,_,x,T,P){return i=new ew(i,s,c,T,P),s===1?(s=1,_===!0&&(s|=8)):s=0,_=ei(3,null,null,s),i.current=_,_.stateNode=i,_.memoizedState={element:f,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},cu(_),i}function tw(i,s,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:f==null?null:""+f,children:i,containerInfo:s,implementation:c}}function Om(i){if(!i)return ur;i=i._reactInternals;e:{if(Ui(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Nn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Nn(c))return op(i,c,s)}return s}function Lm(i,s,c,f,g,_,x,T,P){return i=Xu(c,f,!0,i,g,_,x,T,P),i.context=Om(null),c=i.current,f=yn(),g=_r(c),_=qi(f,g),_.callback=s??null,fr(c,_,g),i.current.lanes=g,rr(i,g,f),An(i,f),i}function _l(i,s,c,f){var g=s.current,_=yn(),x=_r(g);return c=Om(c),s.context===null?s.context=c:s.pendingContext=c,s=qi(_,x),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=fr(g,s,x),i!==null&&(mi(i,g,x,_),Ga(i,g,x)),x}function vl(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Im(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Zu(i,s){Im(i,s),(i=i.alternate)&&Im(i,s)}function nw(){return null}var Dm=typeof reportError=="function"?reportError:function(i){console.error(i)};function Qu(i){this._internalRoot=i}yl.prototype.render=Qu.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));_l(i,s,null,null)},yl.prototype.unmount=Qu.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;qr(function(){_l(null,i,null,null)}),s[Hi]=null}};function yl(i){this._internalRoot=i}yl.prototype.unstable_scheduleHydration=function(i){if(i){var s=Pr();i={blockedOn:null,target:i,priority:s};for(var c=0;c<qt.length&&s!==0&&s<qt[c].priority;c++);qt.splice(c,0,i),c===0&&Sf(i)}};function Ju(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function bl(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Pm(){}function iw(i,s,c,f,g){if(g){if(typeof f=="function"){var _=f;f=function(){var V=vl(x);_.call(V)}}var x=Lm(s,f,i,0,null,!1,!1,"",Pm);return i._reactRootContainer=x,i[Hi]=x.current,go(i.nodeType===8?i.parentNode:i),qr(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof f=="function"){var T=f;f=function(){var V=vl(P);T.call(V)}}var P=Xu(i,0,!1,null,null,!1,!1,"",Pm);return i._reactRootContainer=P,i[Hi]=P.current,go(i.nodeType===8?i.parentNode:i),qr(function(){_l(s,P,c,f)}),P}function Sl(i,s,c,f,g){var _=c._reactRootContainer;if(_){var x=_;if(typeof g=="function"){var T=g;g=function(){var P=vl(x);T.call(P)}}_l(s,x,i,g)}else x=iw(c,s,i,g,f);return vl(x)}io=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=nr(s.pendingLanes);c!==0&&(no(s,c|1),An(s,yt()),(tt&6)===0&&(Bs=yt()+500,hr()))}break;case 13:qr(function(){var f=Ki(i,1);if(f!==null){var g=yn();mi(f,i,1,g)}}),Zu(i,1)}},At=function(i){if(i.tag===13){var s=Ki(i,134217728);if(s!==null){var c=yn();mi(s,i,134217728,c)}Zu(i,134217728)}},rt=function(i){if(i.tag===13){var s=_r(i),c=Ki(i,s);if(c!==null){var f=yn();mi(c,i,s,f)}Zu(i,s)}},Pr=function(){return et},wi=function(i,s){var c=et;try{return et=i,s()}finally{et=c}},fs=function(i,s,c){switch(s){case"input":if(Pn(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==i&&f.form===i.form){var g=Fa(f);if(!g)throw Error(n(90));nn(f),Pn(f,g)}}}break;case"textarea":qn(i,c);break;case"select":s=c.value,s!=null&&yi(i,!!c.multiple,s,!1)}},pe=Wu,De=qr;var rw={usingClientEntryPoint:!1,Events:[yo,ks,Fa,O,te,Wu]},Lo={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sw={bundleType:Lo.bundleType,version:Lo.version,rendererPackageName:Lo.rendererPackageName,rendererConfig:Lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=_a(i),i===null?null:i.stateNode},findFiberByHostInstance:Lo.findFiberByHostInstance||nw,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 wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wl.isDisabled&&wl.supportsFiber)try{We=wl.inject(sw),Ge=wl}catch{}}return Mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rw,Mn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ju(s))throw Error(n(200));return tw(i,s,null,c)},Mn.createRoot=function(i,s){if(!Ju(i))throw Error(n(299));var c=!1,f="",g=Dm;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Xu(i,1,!1,null,null,c,!1,f,g),i[Hi]=s.current,go(i.nodeType===8?i.parentNode:i),new Qu(s)},Mn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=_a(s),i=i===null?null:i.stateNode,i},Mn.flushSync=function(i){return qr(i)},Mn.hydrate=function(i,s,c){if(!bl(s))throw Error(n(200));return Sl(null,i,s,!0,c)},Mn.hydrateRoot=function(i,s,c){if(!Ju(i))throw Error(n(405));var f=c!=null&&c.hydratedSources||null,g=!1,_="",x=Dm;if(c!=null&&(c.unstable_strictMode===!0&&(g=!0),c.identifierPrefix!==void 0&&(_=c.identifierPrefix),c.onRecoverableError!==void 0&&(x=c.onRecoverableError)),s=Lm(s,null,i,1,c??null,g,!1,_,x),i[Hi]=s.current,go(i),f)for(i=0;i<f.length;i++)c=f[i],g=c._getVersion,g=g(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,g]:s.mutableSourceEagerHydrationData.push(c,g);return new yl(s)},Mn.render=function(i,s,c){if(!bl(s))throw Error(n(200));return Sl(null,i,s,!1,c)},Mn.unmountComponentAtNode=function(i){if(!bl(i))throw Error(n(40));return i._reactRootContainer?(qr(function(){Sl(null,null,i,!1,function(){i._reactRootContainer=null,i[Hi]=null})}),!0):!1},Mn.unstable_batchedUpdates=Wu,Mn.unstable_renderSubtreeIntoContainer=function(i,s,c,f){if(!bl(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Sl(i,s,c,!1,f)},Mn.version="18.3.1-next-f1338f8080-20240426",Mn}var Wm;function fw(){if(Wm)return nh.exports;Wm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),nh.exports=dw(),nh.exports}var Km;function pw(){if(Km)return xl;Km=1;var e=fw();return xl.createRoot=e.createRoot,xl.hydrateRoot=e.hydrateRoot,xl}var mw=pw(),ev={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},qm=ns.createContext&&ns.createContext(ev),gw=["attr","size","title"];function _w(e,t){if(e==null)return{};var n,r,o=vw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function vw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Vl(){return Vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vl.apply(null,arguments)}function Vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Gl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vm(Object(n),!0).forEach(function(r){yw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yw(e,t,n){return(t=bw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bw(e){var t=Sw(e,"string");return typeof t=="symbol"?t:t+""}function Sw(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tv(e){return e&&e.map((t,n)=>ns.createElement(t.tag,Gl({key:n},t.attr),tv(t.child)))}function ht(e){return t=>ns.createElement(ww,Vl({attr:Gl({},e.attr)},t),tv(e.child))}function ww(e){var t=n=>{var r=e.attr,o=e.size,a=e.title,l=_w(e,gw),u=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),ns.createElement("svg",Vl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,l,{className:d,style:Gl(Gl({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),a&&ns.createElement("title",null,a),e.children)};return qm!==void 0?ns.createElement(qm.Consumer,null,n=>t(n)):t(ev)}function xw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}function lc(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function nv(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function Hh(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function Hd(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"4 17 10 11 4 5"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"20",y2:"19"},child:[]}]})(e)}function iv(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]}]})(e)}function kw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}function $d(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function ss(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Ew(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 3 19 12 5 21 5 3"},child:[]}]})(e)}function rv(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function $h(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},child:[]},{tag:"path",attr:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},child:[]}]})(e)}function Cw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"},child:[]}]})(e)}function Nw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"},child:[]},{tag:"path",attr:{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"},child:[]}]})(e)}function jh(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"},child:[]}]})(e)}function sv(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"},child:[]},{tag:"polyline",attr:{points:"13 2 13 9 20 9"},child:[]}]})(e)}function Tw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"16",y1:"13",x2:"8",y2:"13"},child:[]},{tag:"line",attr:{x1:"16",y1:"17",x2:"8",y2:"17"},child:[]},{tag:"polyline",attr:{points:"10 9 9 9 8 9"},child:[]}]})(e)}function Rw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]}]})(e)}function ov(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"},child:[]}]})(e)}function jd(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"},child:[]},{tag:"rect",attr:{x:"9",y:"9",width:"6",height:"6"},child:[]},{tag:"line",attr:{x1:"9",y1:"1",x2:"9",y2:"4"},child:[]},{tag:"line",attr:{x1:"15",y1:"1",x2:"15",y2:"4"},child:[]},{tag:"line",attr:{x1:"9",y1:"20",x2:"9",y2:"23"},child:[]},{tag:"line",attr:{x1:"15",y1:"20",x2:"15",y2:"23"},child:[]},{tag:"line",attr:{x1:"20",y1:"9",x2:"23",y2:"9"},child:[]},{tag:"line",attr:{x1:"20",y1:"14",x2:"23",y2:"14"},child:[]},{tag:"line",attr:{x1:"1",y1:"9",x2:"4",y2:"9"},child:[]},{tag:"line",attr:{x1:"1",y1:"14",x2:"4",y2:"14"},child:[]}]})(e)}function av(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(e)}function cc(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function uc(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function lv(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(e)}function Aw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function Mw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"polyline",attr:{points:"19 12 12 19 5 12"},child:[]}]})(e)}function kl({trigger:e,open:t,onOpenChange:n,children:r,align:o="right"}){const a=ee.useRef(null);return ee.useEffect(()=>{if(!t)return;const l=d=>{a.current&&!a.current.contains(d.target)&&n(!1)},u=d=>{d.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",l),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",u)}},[t,n]),b.jsxs("div",{className:`dropdown ${o}`,ref:a,children:[b.jsxs("button",{type:"button",className:"chip",onClick:()=>n(!t),"aria-expanded":t,children:[e,b.jsx(uc,{className:`dd-caret ${t?"up":""}`})]}),t&&b.jsx("div",{className:"dd-menu",children:r})]})}function sh({active:e,onClick:t,children:n}){return b.jsx("button",{type:"button",className:`dd-item ${e?"active":""}`,onClick:t,children:n})}const cv="pi-web-ui:lang",Ow={cancel:"取消",ok:"确定",save:"保存",close:"关闭",loading:"加载中…",connected:"已连接",connecting:"连接中…",reconnecting:"重连中…",language:"语言",langZh:"中文",langEn:"English",copy:"复制",viewSwitch:"视图切换",chat:"对话",terminal:"终端",selectModel:"选择模型",availableModels:"可用模型",noModels:"暂无可用模型(请先配置 API 密钥)",reasoning:"推理",refreshModels:"刷新模型列表",manageModels:"⚙ 管理模型(新增 / 修改)",manageModelsTitle:"管理模型",thinkingLevel:"思考强度",thinking:"思考",thinkingChip:"思考:{level}",sound:"声音",newChat:"新对话",newChatTip:"新建对话(每个浏览器独立保存会话)","thinking.off":"关闭","thinking.minimal":"极简","thinking.low":"低","thinking.medium":"中","thinking.high":"高","thinking.xhigh":"极高","thinking.max":"最大",context:"上下文",contextUsage:"上下文用量",cumulativeCost:"累计成本",sessionMessages:"会话消息数",messages:"消息",pluginStatus:"插件状态",working:"工作中",queued:"排队",enterPath:"输入路径,Enter 切换",cwdTip:"工作目录:{path}(点击切换)",folderRef:"文件夹引用:{path}",refOnly:"仅引用:{path}",attachContent:"附加内容:{path}",attachLines:"附加选中行:{path}(第 {start}-{end} 行)",removeAttachment:"移除附件",attachHint:"将随下一条消息发送",followUpQueued:"⏳ {n} 条跟进消息排队中",steeringQueued:"⏳ {n} 条转向消息排队中",placeholderStreaming:"智能体正在工作中…(消息可排队发送)",placeholderIdle:"给 pi 发送消息 — Enter 发送,Shift+Enter 换行",placeholderConnecting:"正在连接服务器…",stopAgent:"停止智能体",stop:"停止",sendTip:"发送(Enter)",noHistory:"还没有历史对话",current:"当前",messageCount:"{n} 条消息",tuiTip:"pi 终端(TUI)中的对话",refreshList:"刷新列表",emptyChat:"空对话",files:"文件",refreshFiles:"刷新文件列表",rootDir:"根目录",noFiles:"暂无文件",linkFolderTip:"链接文件夹路径到对话",attachInlineTip:"附加内容到对话",referenceTip:"仅引用路径(AI 按需读取)",previewFile:"预览",selectLinesHint:"点击选择行;拖拽或 Shift+点击选择范围",selectedRange:"已选 {n} 行(第 {start}-{end} 行)",fileLines:"{n} 行",selectAll:"全选",clearSelection:"清除",addToChat:"添加到对话",addedToChat:"已添加",previewTruncated:"⚠ 文件过大,仅预览前 512KB",previewLinesTruncated:"… 文件行数过多,仅显示前 {n} 行",binaryFile:"二进制文件,无法预览",emptyFile:"(空文件)",pluginRequest:"插件请求",noOptions:"(无选项)",inputPlaceholder:"输入内容",soundHeader:"声音提示",enableSound:"启用声音",preview:"试听",volume:"音量","sound.question":"问卷弹出","sound.question.desc":"ask_user_question 出现时","sound.done":"回复结束","sound.done.desc":"智能体完成一轮回答时","sound.start":"回复开始","sound.start.desc":"智能体开始新一轮时","sound.error":"出错","sound.error.desc":"出现错误提示时",setupTitle:"未检测到 pi agent 配置",setupDesc:"pi-web-ui 需要 pi 的配置目录(~/.pi/agent)和至少一个 API 密钥才能运行智能体。pi 内置了 openai、anthropic、deepseek 等服务商——选一个填密钥即可,全程无需打开终端。",installFailed:"✖ pi agent 安装失败:",retryInstall:"重试安装",skip:"跳过",installDone:"✅ pi agent CLI 已安装。选择服务商并填入 API 密钥即可开始对话:",provider:"服务商",configured:"已配置",providerKeyReady:"该服务商已配置密钥,可直接使用或更换新密钥。",apiKey:"API 密钥",saving:"保存中…",saveAndStart:"保存并开始使用",recheck:"重新检测",installing:"正在安装 pi agent CLI…",autoInstall:"自动安装 pi agent",attachment:"附件",plugin:"插件",unknown:"未知",thinkingWait:"正在思考",exitCode:"退出码 {code}",cancelled:"已取消",truncated:"… 内容过长,当前视图已截断",outputTruncated:"… 输出过长,当前视图已截断",refOnlyShort:"仅引用",folderRefShort:"文件夹 · 仅引用",inlineLines:"内联 · {n} 行",inlineLinesRange:"行 {start}-{end}",image:"🖼 图片",folderNotExpanded:"文件夹,未展开内容 —— 智能体会按需浏览目录",fileNotExpanded:"文件较大({size}),未展开内容 —— 智能体会按需读取","role.user":"你","role.assistant":"pi","role.tool":"工具","role.bash":"终端","role.branch":"分支摘要","role.compaction":"上下文已压缩",welcomeTitle:"pi 编码智能体",welcomeSub:"检查、编辑、运行 —— 随时待命",directory:"目录",clickToFill:"点击填入输入框",waitingResponse:"正在等待模型响应…",backToBottom:"回到底部","ex.understand":"了解这个项目","ex.understand.prompt":"介绍一下这个项目:整体结构、主要模块和如何运行?","ex.debug":"排查一个问题","ex.debug.prompt":"帮我排查一个 bug,请先说明问题现象,我会补充细节。","ex.test":"编写测试","ex.test.prompt":"为项目的核心模块编写单元测试。","ex.review":"代码审查","ex.review.prompt":"审查最近改动的代码,指出潜在问题和改进建议。",error:"出错",done:"完成",running:"执行中…",toolQueued:"排队中",copyArgs:"复制参数",errorOutput:"错误输出",output:"输出",waitingOutput:"等待输出…",thinkingNow:"思考中",thinkingPreview:"思考:{preview}",commands:"命令",newCommand:"新建命令",newTerminal:"新建终端",name:"名称",command:"命令",cwdHint:"(${pwd} = 当前工作目录)",noCommands:"还没有命令,点 + 添加一个",clickToRun:"点击运行",edit:"编辑",delete:"删除",confirmQ:"确认?",commandsFileHint:"${pwd} 指代当前工作目录",builtinTerminal:"内置终端",termEmptySub:"点击左侧命令运行,或点右侧 + 新建终端",noTerminal:"暂无终端",exited:"(已退出{code})",closeTerminal:"关闭终端",rerun:"重新读取 .pi/commands.json",terminalTitle:"终端 {n}",exampleName:"例如:启动开发服务器",exampleCommand:"例如:npm run dev",editProvider:"编辑服务商",builtinProviders:"内置服务商",hintKeyOnly:"只需填入 API 密钥",configuredBadge:"✓ 已配置",keyReady:"密钥已就绪",pasteKey:"粘贴 API 密钥…",savingKey:"保存中",saveKey:"保存密钥",customProviders:"自定义服务商",customDesc:"用于 Ollama / vLLM / 兼容 OpenAI 的代理等,写入 pi 的 models.json,保存后热重载、立即生效。",noCustomProviders:"还没有自定义服务商",modelsCount:"{n} 个模型",addProvider:"新增服务商",providerId:"服务商 ID",providerIdHint:"(必填,如 ollama / my-proxy)",displayName:"显示名",displayNamePh:"我的代理",apiType:"API 类型",baseUrlHint:"(OpenAI 兼容端点)",apiKeyHint:"sk-…(可留空,用 auth.json 的密钥)",authHeader:"自动添加 Authorization 请求头",modelsTitle:"模型",modelIdReq:"模型 ID(必填)",text:"文本",textImage:"文本+图片",contextWindow:"上下文",maxOutput:"最大输出",removeModel:"移除模型",addModel:"添加模型",deleteProviderConfirm:"删除服务商 {id} 及其 {n} 个模型?",loadingSession:"正在加载会话…",connectingServer:"正在连接 pi-web-ui 服务器…"},Lw={cancel:"Cancel",ok:"OK",save:"Save",close:"Close",loading:"Loading…",connected:"Connected",connecting:"Connecting…",reconnecting:"Reconnecting…",language:"Language",langZh:"中文",langEn:"English",copy:"Copy",viewSwitch:"Switch view",chat:"Chat",terminal:"Terminal",selectModel:"Select model",availableModels:"Available models",noModels:"No models available (configure an API key first)",reasoning:"reasoning",refreshModels:"Refresh model list",manageModels:"⚙ Manage models (add / edit)",manageModelsTitle:"Manage models",thinkingLevel:"Thinking level",thinking:"Thinking",thinkingChip:"Thinking: {level}",sound:"Sound",newChat:"New chat",newChatTip:"New chat (sessions are saved per browser)","thinking.off":"Off","thinking.minimal":"Minimal","thinking.low":"Low","thinking.medium":"Medium","thinking.high":"High","thinking.xhigh":"Extra high","thinking.max":"Max",context:"Context",contextUsage:"Context usage",cumulativeCost:"Cumulative cost",sessionMessages:"Session messages",messages:"messages",pluginStatus:"Plugin status",working:"Working",queued:"queued",enterPath:"Type a path, Enter to switch",cwdTip:"Working directory: {path} (click to switch)",folderRef:"Folder reference: {path}",refOnly:"Reference only: {path}",attachContent:"Attached content: {path}",attachLines:"Attached selected lines: {path} (lines {start}-{end})",removeAttachment:"Remove attachment",attachHint:"Will be sent with the next message",followUpQueued:"⏳ {n} follow-up message(s) queued",steeringQueued:"⏳ {n} steering message(s) queued",placeholderStreaming:"The agent is working… (messages will queue)",placeholderIdle:"Message pi — Enter to send, Shift+Enter for newline",placeholderConnecting:"Connecting to server…",stopAgent:"Stop agent",stop:"Stop",sendTip:"Send (Enter)",noHistory:"No previous chats",current:"Current",messageCount:"{n} messages",tuiTip:"Chat in the pi terminal (TUI)",refreshList:"Refresh list",emptyChat:"Empty chat",files:"Files",refreshFiles:"Refresh file list",rootDir:"Root",noFiles:"No files",linkFolderTip:"Link folder path to chat",attachInlineTip:"Attach content to chat",referenceTip:"Reference path only (AI reads on demand)",previewFile:"Preview",selectLinesHint:"Click a line to select; drag or Shift+click for a range",selectedRange:"Selected {n} lines (lines {start}-{end})",fileLines:"{n} lines",selectAll:"Select all",clearSelection:"Clear",addToChat:"Add to chat",addedToChat:"Added",previewTruncated:"⚠ File too large — previewing the first 512KB",previewLinesTruncated:"… too many lines — showing the first {n}",binaryFile:"Binary file — preview not available",emptyFile:"(empty file)",pluginRequest:"Plugin request",noOptions:"(no options)",inputPlaceholder:"Enter content",soundHeader:"Sound notifications",enableSound:"Enable sound",preview:"Preview",volume:"Volume","sound.question":"Question popup","sound.question.desc":"When ask_user_question appears","sound.done":"Reply finished","sound.done.desc":"When the agent finishes a turn","sound.start":"Reply started","sound.start.desc":"When the agent starts a new turn","sound.error":"Error","sound.error.desc":"When an error notice appears",setupTitle:"pi agent config not detected",setupDesc:"pi-web-ui needs pi's config directory (~/.pi/agent) and at least one API key to run the agent. pi has built-in providers such as openai, anthropic, and deepseek — just pick one and enter a key, no terminal needed.",installFailed:"✖ pi agent installation failed:",retryInstall:"Retry install",skip:"Skip",installDone:"✅ pi agent CLI installed. Pick a provider and enter an API key to start chatting:",provider:"Provider",configured:"configured",providerKeyReady:"This provider already has a key — use it or replace it.",apiKey:"API key",saving:"Saving…",saveAndStart:"Save and start using",recheck:"Recheck",installing:"Installing pi agent CLI…",autoInstall:"Auto-install pi agent",attachment:"Attachment",plugin:"plugin",unknown:"unknown",thinkingWait:"Thinking",exitCode:"Exit code {code}",cancelled:"Cancelled",truncated:"… content too long, truncated in this view",outputTruncated:"… output too long, truncated in this view",refOnlyShort:"Reference only",folderRefShort:"Folder · reference only",inlineLines:"Inline · {n} lines",inlineLinesRange:"Lines {start}-{end}",image:"🖼 Image",folderNotExpanded:"Folder — content not expanded, the agent will browse it as needed",fileNotExpanded:"Large file ({size}) — content not expanded, the agent will read it as needed","role.user":"You","role.assistant":"pi","role.tool":"Tool","role.bash":"Terminal","role.branch":"Branch summary","role.compaction":"Context compacted",welcomeTitle:"pi coding agent",welcomeSub:"Inspect, edit, run — always ready",directory:"Directory",clickToFill:"Click to fill input",waitingResponse:"Waiting for model response…",backToBottom:"Back to bottom","ex.understand":"Understand this project","ex.understand.prompt":"Introduce this project: overall structure, main modules, and how to run it?","ex.debug":"Debug an issue","ex.debug.prompt":"Help me debug a bug — describe the symptom first, and I'll add details.","ex.test":"Write tests","ex.test.prompt":"Write unit tests for the core modules.","ex.review":"Code review","ex.review.prompt":"Review the recently changed code and point out potential issues and improvements.",error:"Error",done:"Done",running:"Running…",toolQueued:"Queued",copyArgs:"Copy args",errorOutput:"Error output",output:"Output",waitingOutput:"Waiting for output…",thinkingNow:"Thinking",thinkingPreview:"Thinking: {preview}",commands:"Commands",newCommand:"New command",newTerminal:"New terminal",name:"Name",command:"Command",cwdHint:"(${pwd} = current working directory)",noCommands:"No commands yet — click + to add one",clickToRun:"Click to run",edit:"Edit",delete:"Delete",confirmQ:"Confirm?",commandsFileHint:"${pwd} refers to the current working directory",builtinTerminal:"Built-in terminal",termEmptySub:"Click a command on the left to run it, or + on the right for a new terminal",noTerminal:"No terminals",exited:"(exited{code})",closeTerminal:"Close terminal",rerun:"Reload .pi/commands.json",terminalTitle:"Terminal {n}",exampleName:"e.g. start dev server",exampleCommand:"e.g. npm run dev",editProvider:"Edit provider",builtinProviders:"Built-in providers",hintKeyOnly:"Just enter an API key",configuredBadge:"✓ Configured",keyReady:"Key ready",pasteKey:"Paste API key…",savingKey:"Saving",saveKey:"Save key",customProviders:"Custom providers",customDesc:"For Ollama / vLLM / OpenAI-compatible proxies, etc. Written to pi's models.json — hot-reloaded immediately.",noCustomProviders:"No custom providers yet",modelsCount:"{n} models",addProvider:"Add provider",providerId:"Provider ID",providerIdHint:"(required, e.g. ollama / my-proxy)",displayName:"Display name",displayNamePh:"My proxy",apiType:"API type",baseUrlHint:"(OpenAI-compatible endpoint)",apiKeyHint:"sk-… (optional — uses the auth.json key)",authHeader:"Auto-add Authorization header",modelsTitle:"Models",modelIdReq:"Model ID (required)",text:"Text",textImage:"Text+image",contextWindow:"Context",maxOutput:"Max output",removeModel:"Remove model",addModel:"Add model",deleteProviderConfirm:"Delete provider {id} and its {n} models?",loadingSession:"Loading session…",connectingServer:"Connecting to pi-web-ui server…"},uv=ee.createContext(null);function Iw(){try{const e=localStorage.getItem(cv);if(e==="zh"||e==="en")return e}catch{}return"zh"}function Dw({children:e}){const[t,n]=ee.useState(Iw),r=ee.useCallback(l=>{n(l);try{localStorage.setItem(cv,l)}catch{}},[]),o=ee.useCallback((l,u)=>{let d=Lw[l];if(t==="zh"&&(d=Ow[l]),u)for(const[h,p]of Object.entries(u))d=d.replaceAll(`{${h}}`,String(p));return d},[t]);ee.useEffect(()=>{document.documentElement.lang=t==="zh"?"zh-CN":"en"},[t]);const a=ee.useMemo(()=>({locale:t,setLocale:r,t:o}),[t,r,o]);return b.jsx(uv.Provider,{value:a,children:e})}function hv(){const e=ee.useContext(uv);if(!e)throw new Error("useI18n must be used within LanguageProvider");return e}function en(){return hv().t}const Pw=[{kind:"question",labelKey:"sound.question",descKey:"sound.question.desc"},{kind:"done",labelKey:"sound.done",descKey:"sound.done.desc"},{kind:"start",labelKey:"sound.start",descKey:"sound.start.desc"},{kind:"error",labelKey:"sound.error",descKey:"sound.error.desc"}];function Bw({settings:e,onChange:t,onPreview:n}){const r=en(),o=a=>t({...e,...a});return b.jsxs("div",{className:"sound-menu",children:[b.jsx("div",{className:"dd-header",children:r("soundHeader")}),b.jsxs("label",{className:"sound-row sound-master",children:[b.jsxs("span",{className:"sound-label",children:[b.jsx(nv,{className:"sound-icon"}),b.jsx("span",{children:r("enableSound")})]}),b.jsx("input",{type:"checkbox",checked:e.enabled,onChange:a=>o({enabled:a.target.checked})})]}),Pw.map(({kind:a,labelKey:l,descKey:u})=>b.jsxs("label",{className:`sound-row ${e.enabled?"":"disabled"}`,children:[b.jsxs("span",{className:"sound-label",children:[b.jsx("span",{className:"sound-name",children:r(l)}),b.jsx("span",{className:"sound-desc",children:r(u)})]}),b.jsxs("span",{className:"sound-right",children:[b.jsx("button",{type:"button",className:"sound-preview",title:r("preview"),disabled:!e.enabled,onClick:d=>{d.preventDefault(),n(a)},children:r("preview")}),b.jsx("input",{type:"checkbox",checked:e[a],disabled:!e.enabled,onChange:d=>o({[a]:d.target.checked})})]})]},a)),b.jsxs("div",{className:`sound-volume ${e.enabled?"":"disabled"}`,children:[b.jsx("span",{className:"sound-name",children:r("volume")}),b.jsx("input",{type:"range",min:0,max:100,step:5,value:e.volume,disabled:!e.enabled,onChange:a=>o({volume:Number(a.target.value)})}),b.jsxs("span",{className:"sound-vol-num",children:[e.volume,"%"]})]})]})}const Fw=["off","minimal","low","medium","high","xhigh","max"];function zw({chat:e,send:t,view:n,onViewChange:r,onManageModels:o,sound:a,onSoundChange:l,onSoundPreview:u}){const{locale:d,setLocale:h,t:p}=hv(),m=e.state,v=m==null?void 0:m.model,y=v?`${v.provider}/${v.id}`:null,[w,S]=ee.useState(!1),[E,k]=ee.useState(!1),[A,R]=ee.useState(!1),[I,G]=ee.useState(!1),[M,Z]=ee.useState(!1),q=Fw.map(L=>({value:L,label:p(`thinking.${L}`)})),H=L=>{var $;return(($=q.find(z=>z.value===L))==null?void 0:$.label)??L},B=[{value:"zh",label:p("langZh")},{value:"en",label:p("langEn")}];ee.useEffect(()=>{w&&e.models.length===0&&!M&&(Z(!0),t({type:"list_models"}))},[w,e.models.length,M,t]),ee.useEffect(()=>{e.models.length>0&&Z(!1)},[e.models.length]);const X=e.ready?p("connected"):e.status==="closed"?p("reconnecting"):p("connecting"),K=e.ready?"ok":"busy";return b.jsxs("header",{className:"topbar",children:[b.jsxs("div",{className:"brand",children:[b.jsx("span",{className:"brand-logo",children:"π"}),b.jsx("span",{className:"brand-name",children:"pi-web-ui"}),b.jsx("span",{className:`conn-dot ${K}`,title:X}),b.jsx("span",{className:"conn-label",children:X})]}),b.jsxs("div",{className:"topbar-actions",children:[b.jsxs("div",{className:"view-switch",role:"tablist","aria-label":p("viewSwitch"),children:[b.jsxs("button",{type:"button",role:"tab","aria-selected":n==="chat",className:n==="chat"?"active":"",onClick:()=>r("chat"),children:[b.jsx(rv,{}),b.jsx("span",{children:p("chat")})]}),b.jsxs("button",{type:"button",role:"tab","aria-selected":n==="terminal",className:n==="terminal"?"active":"",onClick:()=>r("terminal"),children:[b.jsx(Hd,{}),b.jsx("span",{children:p("terminal")})]})]}),b.jsxs(kl,{trigger:b.jsxs(b.Fragment,{children:[b.jsx(jd,{}),b.jsx("span",{className:"chip-model",children:v?v.name:p("selectModel")}),v&&b.jsx("span",{className:"chip-sub",children:v.provider})]}),open:w,onOpenChange:S,children:[b.jsx("div",{className:"dd-header",children:p("availableModels")}),(M||e.modelsLoading)&&b.jsx("div",{className:"dd-loading",children:p("loading")}),e.models.length===0&&!M&&!e.modelsLoading&&b.jsx("div",{className:"dd-loading",children:p("noModels")}),e.models.map(L=>b.jsxs(sh,{active:y===L.id,onClick:()=>{y!==L.id&&t({type:"set_model",modelId:L.id}),S(!1)},children:[b.jsx("span",{className:"dd-model-name",children:L.name}),b.jsxs("span",{className:"dd-model-sub",children:[L.provider,L.reasoning?` · ${p("reasoning")}`:""]})]},L.id)),b.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"list_models"}),children:p("refreshModels")}),b.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>{S(!1),o()},children:p("manageModels")})]}),b.jsxs(kl,{trigger:b.jsxs(b.Fragment,{children:[b.jsx(xw,{}),b.jsx("span",{className:"chip-sub",children:p("thinkingChip",{level:m?H(m.thinkingLevel):"—"})})]}),open:E,onOpenChange:k,children:[b.jsx("div",{className:"dd-header",children:p("thinkingLevel")}),q.map(L=>b.jsx(sh,{active:(m==null?void 0:m.thinkingLevel)===L.value,onClick:()=>{(m==null?void 0:m.thinkingLevel)!==L.value&&t({type:"set_thinking",level:L.value}),k(!1)},children:L.label},L.value))]}),b.jsx(kl,{trigger:b.jsxs(b.Fragment,{children:[b.jsx(nv,{}),b.jsx("span",{className:"chip-sub",children:p("sound")})]}),open:A,onOpenChange:R,children:b.jsx(Bw,{settings:a,onChange:l,onPreview:u})}),b.jsxs(kl,{trigger:b.jsxs(b.Fragment,{children:[b.jsx(Nw,{}),b.jsx("span",{className:"chip-sub",children:d==="zh"?p("langZh"):"EN"})]}),open:I,onOpenChange:G,children:[b.jsx("div",{className:"dd-header",children:p("language")}),B.map(L=>b.jsx(sh,{active:d===L.value,onClick:()=>{h(L.value),G(!1)},children:L.label},L.value))]}),b.jsxs("button",{type:"button",className:"chip newchat","data-tip":p("newChatTip"),onClick:()=>t({type:"new_chat"}),children:[b.jsx(ss,{}),b.jsx("span",{children:p("newChat")})]})]})]})}function Uw(e){const t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:`${t.getMonth()+1}/${t.getDate()}`}function Hw({chat:e,send:t}){var l;const n=en(),r=(l=e.state)==null?void 0:l.sessionFile,o=e.sessions,a=u=>{const d=u.name||u.firstMessage.trim();return d.length>0?d:n("emptyChat")};return b.jsxs("aside",{className:"panel panel-left",children:[b.jsxs("div",{className:"panel-header",children:[b.jsx("span",{className:"panel-title",children:n("chat")}),b.jsx("button",{type:"button",className:"panel-new",title:n("newChat"),onClick:()=>t({type:"new_chat"}),children:b.jsx(iv,{})})]}),b.jsxs("div",{className:"panel-body",children:[o.length===0&&b.jsx("div",{className:"panel-empty",children:n("noHistory")}),o.map(u=>{const d=r===u.path;return b.jsxs("button",{type:"button",className:`session-item ${d?"active":""}`,title:u.path,onClick:()=>{d||t({type:"switch_session",path:u.path})},children:[b.jsx(rv,{className:"session-icon"}),b.jsxs("span",{className:"session-info",children:[b.jsx("span",{className:"session-title",children:a(u)}),b.jsxs("span",{className:"session-sub",children:[d?n("current"):n("messageCount",{n:u.messageCount}),u.source==="tui"&&b.jsx("span",{className:"session-src",title:n("tuiTip"),children:"TUI"})]})]}),b.jsx("span",{className:"session-time",children:Uw(u.modified)})]},u.path)})]}),b.jsx("div",{className:"panel-footer",children:b.jsx("button",{type:"button",className:"panel-refresh",onClick:()=>t({type:"list_sessions"}),children:n("refreshList")})})]})}function $w({chat:e,send:t,onAttach:n,onPreview:r}){const o=en(),[a,l]=ee.useState(""),[u,d]=ee.useState(!1),h=e.files,p=ee.useRef(0),m=ee.useCallback(S=>{const E=++p.current;l(S),d(!0),t({type:"list_files",path:S===""?void 0:S})||p.current===E&&d(!1)},[t]);ee.useEffect(()=>{h&&h.path===a&&d(!1)},[h,a]);const v=S=>m(S),y=()=>{(h==null?void 0:h.parent)!==null&&(h==null?void 0:h.parent)!==void 0&&m(h.parent)},w=a.split("/").filter(Boolean);return b.jsxs("aside",{className:"panel panel-right",children:[b.jsxs("div",{className:"panel-header",children:[b.jsx("span",{className:"panel-title",children:o("files")}),b.jsx("button",{type:"button",className:"panel-refresh",title:o("refreshFiles"),onClick:()=>m(a),children:b.jsx($d,{})})]}),b.jsxs("div",{className:"panel-crumbs",children:[b.jsx("button",{type:"button",className:`crumb ${a===""?"active":""}`,onClick:()=>m(""),children:o("rootDir")}),w.map((S,E)=>{const k=w.slice(0,E+1).join("/");return b.jsxs("span",{className:"crumb-seg",children:[b.jsx(cc,{}),b.jsx("button",{type:"button",className:`crumb ${k===a?"active":""}`,onClick:()=>m(k),children:S})]},k)})]}),b.jsxs("div",{className:"panel-body",children:[u&&b.jsx("div",{className:"panel-empty",children:o("loading")}),!u&&h&&h.path===a&&b.jsxs(b.Fragment,{children:[h.path!==""&&b.jsxs("button",{type:"button",className:"file-item dir",onClick:y,children:[b.jsx(jh,{className:"file-icon"}),b.jsx("span",{className:"file-name",children:".."})]}),h.entries.map(S=>S.type==="dir"?b.jsxs("div",{className:"file-item dir",children:[b.jsxs("button",{type:"button",className:"file-dir-main",onClick:()=>v(S.path),children:[b.jsx(jh,{className:"file-icon"}),b.jsx("span",{className:"file-name",children:S.name})]}),b.jsx("button",{type:"button",className:"file-attach ref","data-tip":o("linkFolderTip"),onClick:()=>n(S.path,S.name,"reference",!0),children:b.jsx($h,{})})]},S.path):b.jsxs("div",{className:"file-item file",children:[b.jsxs("button",{type:"button",className:"file-name",title:`${S.path} — ${o("previewFile")}`,onClick:()=>r(S.path,S.name),children:[b.jsx(sv,{className:"file-icon"}),b.jsx("span",{className:"file-name-text",children:S.name})]}),b.jsx("button",{type:"button",className:"file-attach preview","data-tip":o("previewFile"),onClick:()=>r(S.path,S.name),children:b.jsx(Rw,{})}),b.jsx("button",{type:"button",className:"file-attach inline","data-tip":o("attachInlineTip"),onClick:()=>n(S.path,S.name,"inline"),children:b.jsx(ss,{})}),b.jsx("button",{type:"button",className:"file-attach ref","data-tip":o("referenceTip"),onClick:()=>n(S.path,S.name,"reference"),children:b.jsx($h,{})})]},S.path))]}),!u&&!h&&b.jsx("div",{className:"panel-empty",children:o("noFiles")})]}),e.widgets.filter(S=>S.lines.length>0).length>0&&b.jsx("div",{className:"panel-widgets",children:e.widgets.filter(S=>S.lines.length>0).map(S=>b.jsxs("div",{className:"widget",children:[b.jsx("div",{className:"widget-title",children:S.key}),b.jsx("pre",{className:"widget-lines",children:S.lines.join(`
|
|
41
41
|
`)})]},S.key))})]})}function jw(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ww=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Kw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qw={};function Gm(e,t){return(qw.jsx?Kw:Ww).test(e)}const Vw=/[ \t\n\f\r]/g;function Gw(e){return typeof e=="object"?e.type==="text"?Ym(e.value):!1:Ym(e)}function Ym(e){return e.replace(Vw,"")===""}class la{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}la.prototype.normal={};la.prototype.property={};la.prototype.space=void 0;function dv(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new la(n,r,t)}function Wh(e){return e.toLowerCase()}class In{constructor(t,n){this.attribute=n,this.property=t}}In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;let Yw=0;const ze=cs(),Dt=cs(),Kh=cs(),le=cs(),at=cs(),is=cs(),jn=cs();function cs(){return 2**++Yw}const qh=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Dt,commaOrSpaceSeparated:jn,commaSeparated:is,number:le,overloadedBoolean:Kh,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),oh=Object.keys(qh);class Wd extends In{constructor(t,n,r,o){let a=-1;if(super(t,n),Xm(this,"space",o),typeof r=="number")for(;++a<oh.length;){const l=oh[a];Xm(this,oh[a],(r&qh[l])===qh[l])}}}Wd.prototype.defined=!0;function Xm(e,t,n){n&&(e[t]=n)}function Gs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Wd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Wh(r)]=r,n[Wh(a.attribute)]=r}return new la(t,n,e.space)}const fv=Gs({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:at,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:le,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:at,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Dt,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function pv(e,t){return t in e?e[t]:t}function mv(e,t){return pv(e,t.toLowerCase())}const Xw=Gs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alpha:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:at,autoFocus:ze,autoPlay:ze,blocking:at,capture:null,charSet:null,checked:ze,cite:null,className:at,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:Dt,controls:ze,controlsList:at,coords:le|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:Kh,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:at,height:le,hidden:Kh,high:le,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:at,itemRef:at,itemScope:ze,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:le,pattern:null,ping:at,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:at,required:ze,reversed:ze,rows:le,rowSpan:le,sandbox:at,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootCustomElementRegistry:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shadowRootSerializable:ze,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Dt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ze,disablePictureInPicture:ze,disableRemotePlayback:ze,exportParts:is,part:at,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:mv}),Zw=Gs({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:jn,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:at,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:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,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:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,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:le,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:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,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:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:pv}),gv=Gs({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()}}),_v=Gs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mv}),vv=Gs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Qw={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"},Jw=/[A-Z]/g,Zm=/-[a-z]/g,e0=/^data[-\w.:]+$/i;function t0(e,t){const n=Wh(t);let r=t,o=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&e0.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Zm,i0);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Zm.test(a)){let l=a.replace(Jw,n0);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=Wd}return new o(r,t)}function n0(e){return"-"+e.toLowerCase()}function i0(e){return e.charAt(1).toUpperCase()}const r0=dv([fv,Xw,gv,_v,vv],"html"),Kd=dv([fv,Zw,gv,_v,vv],"svg");function s0(e){return e.join(" ").trim()}var zs={},ah,Qm;function o0(){if(Qm)return ah;Qm=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
42
|
-
`,h="/",p="*",m="",v="comment",y="declaration";function w(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var A=1,R=1;function I($){var z=$.match(t);z&&(A+=z.length);var J=$.lastIndexOf(d);R=~J?$.length-J:R+$.length}function G(){var $={line:A,column:R};return function(z){return z.position=new M($),H(),z}}function M($){this.start=$,this.end={line:A,column:R},this.source=k.source}M.prototype.content=E;function Z($){var z=new Error(k.source+":"+A+":"+R+": "+$);if(z.reason=$,z.filename=k.source,z.line=A,z.column=R,z.source=E,!k.silent)throw z}function q($){var z=$.exec(E);if(z){var J=z[0];return I(J),E=E.slice(J.length),z}}function H(){q(n)}function B($){var z;for($=$||[];z=X();)z!==!1&&$.push(z);return $}function X(){var $=G();if(!(h!=E.charAt(0)||p!=E.charAt(1))){for(var z=2;m!=E.charAt(z)&&(p!=E.charAt(z)||h!=E.charAt(z+1));)++z;if(z+=2,m===E.charAt(z-1))return Z("End of comment missing");var J=E.slice(2,z-2);return R+=2,I(J),E=E.slice(z),R+=2,$({type:v,comment:J})}}function K(){var $=G(),z=q(r);if(z){if(X(),!q(o))return Z("property missing ':'");var J=q(a),oe=$({type:y,property:S(z[0].replace(e,m)),value:J?S(J[0].replace(e,m)):m});return q(l),oe}}function L(){var $=[];B($);for(var z;z=K();)z!==!1&&($.push(z),B($));return $}return H(),L()}function S(E){return E?E.replace(u,m):m}return ah=w,ah}var Jm;function a0(){if(Jm)return zs;Jm=1;var e=zs&&zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zs,"__esModule",{value:!0}),zs.default=n;const t=e(o0());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),u=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:p}=d;u?o(h,p,d):p&&(a=a||{},a[h]=p)}),a}return zs}var Do={},eg;function l0(){if(eg)return Do;eg=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},u=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,u):h=h.replace(r,u),h.replace(t,l))};return Do.camelCase=d,Do}var Po,tg;function c0(){if(tg)return Po;tg=1;var e=Po&&Po.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(a0()),n=l0();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(l[(0,n.camelCase)(u,a)]=d)}),l}return r.default=r,Po=r,Po}var u0=c0();const h0=ac(u0),yv=bv("end"),qd=bv("start");function bv(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 d0(e){const t=qd(e),n=yv(e);if(t&&n)return{start:t,end:n}}function Jo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ng(e.position):"start"in e||"end"in e?ng(e):"line"in e||"column"in e?Vh(e):""}function Vh(e){return ig(e&&e.line)+":"+ig(e&&e.column)}function ng(e){return Vh(e&&e.start)+"-"+Vh(e&&e.end)}function ig(e){return e&&typeof e=="number"?e:1}class mn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=Jo(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}mn.prototype.file="";mn.prototype.name="";mn.prototype.reason="";mn.prototype.message="";mn.prototype.stack="";mn.prototype.column=void 0;mn.prototype.line=void 0;mn.prototype.ancestors=void 0;mn.prototype.cause=void 0;mn.prototype.fatal=void 0;mn.prototype.place=void 0;mn.prototype.ruleId=void 0;mn.prototype.source=void 0;const Vd={}.hasOwnProperty,f0=new Map,p0=/[A-Z]/g,m0=new Set(["table","tbody","thead","tfoot","tr"]),g0=new Set(["td","th"]),Sv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _0(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=E0(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=k0(n,t.jsx,t.jsxs)}const o={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"?Kd:r0,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=wv(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function wv(e,t,n){if(t.type==="element")return v0(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return y0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return S0(e,t,n);if(t.type==="mdxjsEsm")return b0(e,t);if(t.type==="root")return w0(e,t,n);if(t.type==="text")return x0(e,t)}function v0(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Kd,e.schema=o),e.ancestors.push(t);const a=kv(e,t.tagName,!1),l=C0(e,t);let u=Yd(e,t);return m0.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!Gw(d):!0})),xv(e,l,a,t),Gd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function y0(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)}ia(e,t.position)}function b0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ia(e,t.position)}function S0(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Kd,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:kv(e,t.name,!0),l=N0(e,t),u=Yd(e,t);return xv(e,l,a,t),Gd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function w0(e,t,n){const r={};return Gd(r,Yd(e,t)),e.create(t,e.Fragment,r,n)}function x0(e,t){return t.value}function xv(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function k0(e,t,n){return r;function r(o,a,l,u){const h=Array.isArray(l.children)?n:t;return u?h(a,l,u):h(a,l)}}function E0(e,t){return n;function n(r,o,a,l){const u=Array.isArray(a.children),d=qd(r);return t(o,a,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function C0(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Vd.call(t.properties,o)){const a=T0(e,o,t.properties[o]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&g0.has(t.tagName)?r=u:n[l]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function N0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else ia(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else ia(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Yd(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:f0;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const h=o.get(d)||0;l=d+"-"+h,o.set(d,h+1)}}const u=wv(e,a,l);u!==void 0&&n.push(u)}return n}function T0(e,t,n){const r=t0(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?jw(n):s0(n)),r.property==="style"){let o=typeof n=="object"?n:R0(e,String(n));return e.stylePropertyNameCase==="css"&&(o=A0(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Qw[r.property]||r.property:r.attribute,n]}}function R0(e,t){try{return h0(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Sv+"#cannot-parse-style-attribute",o}}function kv(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const u=Gm(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=l}else r=Gm(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Vd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ia(e)}function ia(e,t){const n=new mn("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=Sv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function A0(e){const t={};let n;for(n in e)Vd.call(e,n)&&(t[M0(n)]=e[n]);return t}function M0(e){let t=e.replace(p0,O0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function O0(e){return"-"+e.toLowerCase()}const lh={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"]},L0={};function Xd(e,t){const n=L0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ev(e,r,o)}function Ev(e,t,n){if(I0(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 rg(e.children,t,n)}return Array.isArray(e)?rg(e,t,n):""}function rg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ev(e[o],t,n);return r.join("")}function I0(e){return!!(e&&typeof e=="object")}const sg=document.createElement("i");function Zd(e){const t="&"+e+";";sg.innerHTML=t;const n=sg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Wn(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function ri(e,t){return e.length>0?(Wn(e,e.length,0,t),e):t}const og={}.hasOwnProperty;function Cv(e){const t={};let n=-1;for(;++n<e.length;)D0(t,e[n]);return t}function D0(e,t){let n;for(n in t){const o=(og.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){og.call(o,l)||(o[l]=[]);const u=a[l];P0(o[l],Array.isArray(u)?u:u?[u]:[])}}}function P0(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Wn(e,0,0,r)}function Nv(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 _i(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wn=Tr(/[A-Za-z]/),pn=Tr(/[\dA-Za-z]/),B0=Tr(/[#-'*+\--9=?A-Z^-~]/);function Yl(e){return e!==null&&(e<32||e===127)}const Gh=Tr(/\d/),F0=Tr(/[\dA-Fa-f]/),z0=Tr(/[!-/:-@[-`{-~]/);function Me(e){return e!==null&&e<-2}function lt(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const hc=Tr(new RegExp("\\p{P}|\\p{S}","u")),os=Tr(/\s/);function Tr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ys(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Je(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Ye(d)?(e.enter(n),u(d)):t(d)}function u(d){return Ye(d)&&a++<o?(e.consume(d),u):(e.exit(n),t(d))}}const U0={tokenize:H0};function H0(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),a(u)}function a(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Me(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const $0={tokenize:j0},ag={tokenize:W0};function j0(e){const t=this,n=[];let r=0,o,a,l;return u;function u(R){if(r<n.length){const I=n[r];return t.containerState=I[1],e.attempt(I[0].continuation,d,h)(R)}return h(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&A();const I=t.events.length;let G=I,M;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){M=t.events[G][1].end;break}k(r);let Z=I;for(;Z<t.events.length;)t.events[Z][1].end={...M},Z++;return Wn(t.events,G+1,0,t.events.slice(I)),t.events.length=Z,h(R)}return u(R)}function h(R){if(r===n.length){if(!o)return v(R);if(o.currentConstruct&&o.currentConstruct.concrete)return w(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ag,p,m)(R)}function p(R){return o&&A(),k(r),v(R)}function m(R){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,w(R)}function v(R){return t.containerState={},e.attempt(ag,y,w)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),v(R)}function w(R){if(R===null){o&&A(),k(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(R)}function S(R){if(R===null){E(e.exit("chunkFlow"),!0),k(0),e.consume(R);return}return Me(R)?(e.consume(R),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(R),S)}function E(R,I){const G=t.sliceStream(R);if(I&&G.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(G),t.parser.lazy[R.start.line]){let M=o.events.length;for(;M--;)if(o.events[M][1].start.offset<l&&(!o.events[M][1].end||o.events[M][1].end.offset>l))return;const Z=t.events.length;let q=Z,H,B;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(H){B=t.events[q][1].end;break}H=!0}for(k(r),M=Z;M<t.events.length;)t.events[M][1].end={...B},M++;Wn(t.events,q+1,0,t.events.slice(Z)),t.events.length=M}}function k(R){let I=n.length;for(;I-- >R;){const G=n[I];t.containerState=G[1],G[0].exit.call(t,e)}n.length=R}function A(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function W0(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qs(e){if(e===null||lt(e)||os(e))return 1;if(hc(e))return 2}function dc(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Yh={name:"attention",resolveAll:K0,tokenize:q0};function K0(e,t){let n=-1,r,o,a,l,u,d,h,p;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;d=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 m={...e[r][1].end},v={...e[n][1].start};lg(m,-d),lg(v,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=ri(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=ri(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",a,t]]),h=ri(h,dc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=ri(h,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=ri(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Wn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function q0(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=qs(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===a)return e.consume(d),u;const h=e.exit("attentionSequence"),p=qs(d),m=!p||p===2&&o||n.includes(d),v=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?m:m&&(o||!v)),h._close=!!(a===42?v:v&&(p||!m)),t(d)}}function lg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const V0={name:"autolink",tokenize:G0};function G0(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return wn(y)?(e.consume(y),l):y===64?n(y):h(y)}function l(y){return y===43||y===45||y===46||pn(y)?(r=1,u(y)):h(y)}function u(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||pn(y))&&r++<32?(e.consume(y),u):(r=0,h(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Yl(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):B0(y)?(e.consume(y),h):n(y)}function p(y){return pn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):v(y)}function v(y){if((y===45||pn(y))&&r++<63){const w=y===45?v:m;return e.consume(y),w}return n(y)}}const ca={partial:!0,tokenize:Y0};function Y0(e,t,n){return r;function r(a){return Ye(a)?Je(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Me(a)?t(a):n(a)}}const Tv={continuation:{tokenize:Z0},exit:Q0,name:"blockQuote",tokenize:X0};function X0(e,t,n){const r=this;return o;function o(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ye(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Z0(e,t,n){const r=this;return o;function o(l){return Ye(l)?Je(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(Tv,t,n)(l)}}function Q0(e){e.exit("blockQuote")}const Rv={name:"characterEscape",tokenize:J0};function J0(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return z0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Av={name:"characterReference",tokenize:e1};function e1(e,t,n){const r=this;let o=0,a,l;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,l=pn,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=F0,p):(e.enter("characterReferenceValue"),a=7,l=Gh,p(m))}function p(m){if(m===59&&o){const v=e.exit("characterReferenceValue");return l===pn&&!Zd(r.sliceSerialize(v))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&o++<a?(e.consume(m),p):n(m)}}const cg={partial:!0,tokenize:n1},ug={concrete:!0,name:"codeFenced",tokenize:t1};function t1(e,t,n){const r=this,o={partial:!0,tokenize:G};let a=0,l=0,u;return d;function d(M){return h(M)}function h(M){const Z=r.events[r.events.length-1];return a=Z&&Z[1].type==="linePrefix"?Z[2].sliceSerialize(Z[1],!0).length:0,u=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(M)}function p(M){return M===u?(l++,e.consume(M),p):l<3?n(M):(e.exit("codeFencedFenceSequence"),Ye(M)?Je(e,m,"whitespace")(M):m(M))}function m(M){return M===null||Me(M)?(e.exit("codeFencedFence"),r.interrupt?t(M):e.check(cg,S,I)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===null||Me(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(M)):Ye(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,y,"whitespace")(M)):M===96&&M===u?n(M):(e.consume(M),v)}function y(M){return M===null||Me(M)?m(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(M))}function w(M){return M===null||Me(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(M)):M===96&&M===u?n(M):(e.consume(M),w)}function S(M){return e.attempt(o,I,E)(M)}function E(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),k}function k(M){return a>0&&Ye(M)?Je(e,A,"linePrefix",a+1)(M):A(M)}function A(M){return M===null||Me(M)?e.check(cg,S,I)(M):(e.enter("codeFlowValue"),R(M))}function R(M){return M===null||Me(M)?(e.exit("codeFlowValue"),A(M)):(e.consume(M),R)}function I(M){return e.exit("codeFenced"),t(M)}function G(M,Z,q){let H=0;return B;function B(z){return M.enter("lineEnding"),M.consume(z),M.exit("lineEnding"),X}function X(z){return M.enter("codeFencedFence"),Ye(z)?Je(M,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):K(z)}function K(z){return z===u?(M.enter("codeFencedFenceSequence"),L(z)):q(z)}function L(z){return z===u?(H++,M.consume(z),L):H>=l?(M.exit("codeFencedFenceSequence"),Ye(z)?Je(M,$,"whitespace")(z):$(z)):q(z)}function $(z){return z===null||Me(z)?(M.exit("codeFencedFence"),Z(z)):q(z)}}}function n1(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const ch={name:"codeIndented",tokenize:r1},i1={partial:!0,tokenize:s1};function r1(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Je(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Me(h)?e.attempt(i1,l,d)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||Me(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function d(h){return e.exit("codeIndented"),t(h)}}function s1(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):Me(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Je(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Me(l)?o(l):n(l)}}const o1={name:"codeText",previous:l1,resolve:a1,tokenize:c1};function a1(e){let t=e.length-4,n=3,r,o;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;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function l1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function c1(e,t,n){let r=0,o,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),r++,u):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),o=0,p(m)):Me(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Me(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",h(m))}}class u1{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 o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Bo(this.left,r),a.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),Bo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Bo(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);Bo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Bo(this.left,n.reverse())}}}function Bo(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 Mv(e){const t={};let n=-1,r,o,a,l,u,d,h;const p=new u1(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,h1(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=p.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...p.get(o)[1].start},u=p.slice(o,n),u.unshift(r),p.splice(o,n-o+1,u))}}return Wn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function h1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],h={};let p,m,v=-1,y=n,w=0,S=0;const E=[S];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++v<u.length;)u[v][0]==="exit"&&u[v-1][0]==="enter"&&u[v][1].type===u[v-1][1].type&&u[v][1].start.line!==u[v][1].end.line&&(S=v+1,E.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):E.pop(),v=E.length;v--;){const k=u.slice(E[v],E[v+1]),A=a.pop();d.push([A,A+k.length-1]),e.splice(A,2,k)}for(d.reverse(),v=-1;++v<d.length;)h[w+d[v][0]]=w+d[v][1],w+=d[v][1]-d[v][0]-1;return h}const d1={resolve:p1,tokenize:m1},f1={partial:!0,tokenize:g1};function p1(e){return Mv(e),e}function m1(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?a(u):Me(u)?e.check(f1,l,a)(u):(e.consume(u),o)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function g1(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Je(e,a,"linePrefix")}function a(l){if(l===null||Me(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Ov(e,t,n,r,o,a,l,u,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(k){return k===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(k),e.exit(a),v):k===null||k===32||k===41||Yl(k)?n(k):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),S(k))}function v(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===62?(e.exit("chunkString"),e.exit(u),v(k)):k===null||k===60||Me(k)?n(k):(e.consume(k),k===92?w:y)}function w(k){return k===60||k===62||k===92?(e.consume(k),y):y(k)}function S(k){return!p&&(k===null||k===41||lt(k))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(k)):p<h&&k===40?(e.consume(k),p++,S):k===41?(e.consume(k),p--,S):k===null||k===32||k===40||Yl(k)?n(k):(e.consume(k),k===92?E:S)}function E(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function Lv(e,t,n,r,o,a){const l=this;let u=0,d;return h;function h(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return u>999||y===null||y===91||y===93&&!d||y===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Me(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Me(y)||u++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ye(y)),y===92?v:m)}function v(y){return y===91||y===92||y===93?(e.consume(y),u++,m):m(y)}}function Iv(e,t,n,r,o,a){let l;return u;function u(v){return v===34||v===39||v===40?(e.enter(r),e.enter(o),e.consume(v),e.exit(o),l=v===40?41:v,d):n(v)}function d(v){return v===l?(e.enter(o),e.consume(v),e.exit(o),e.exit(r),t):(e.enter(a),h(v))}function h(v){return v===l?(e.exit(a),d(l)):v===null?n(v):Me(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===l||v===null||Me(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?m:p)}function m(v){return v===l||v===92?(e.consume(v),p):p(v)}}function ea(e,t){let n;return r;function r(o){return Me(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ye(o)?Je(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const _1={name:"definition",tokenize:y1},v1={partial:!0,tokenize:b1};function y1(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return Lv.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return o=_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return lt(y)?ea(e,h)(y):h(y)}function h(y){return Ov(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(v1,m,m)(y)}function m(y){return Ye(y)?Je(e,v,"whitespace")(y):v(y)}function v(y){return y===null||Me(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function b1(e,t,n){return r;function r(u){return lt(u)?ea(e,o)(u):n(u)}function o(u){return Iv(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Ye(u)?Je(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Me(u)?t(u):n(u)}}const S1={name:"hardBreakEscape",tokenize:w1};function w1(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Me(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const x1={name:"headingAtx",resolve:k1,tokenize:E1};function k1(e,t){let n=e.length-2,r=3,o,a;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&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Wn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function E1(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||lt(p)?(e.exit("atxHeadingSequence"),u(p)):n(p)}function u(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Me(p)?(e.exit("atxHeading"),t(p)):Ye(p)?Je(e,u,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),u(p))}function h(p){return p===null||p===35||lt(p)?(e.exit("atxHeadingText"),u(p)):(e.consume(p),h)}}const C1=["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"],hg=["pre","script","style","textarea"],N1={concrete:!0,name:"htmlFlow",resolveTo:A1,tokenize:M1},T1={partial:!0,tokenize:L1},R1={partial:!0,tokenize:O1};function A1(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 M1(e,t,n){const r=this;let o,a,l,u,d;return h;function h(N){return p(N)}function p(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),m}function m(N){return N===33?(e.consume(N),v):N===47?(e.consume(N),a=!0,S):N===63?(e.consume(N),o=3,r.interrupt?t:C):wn(N)?(e.consume(N),l=String.fromCharCode(N),E):n(N)}function v(N){return N===45?(e.consume(N),o=2,y):N===91?(e.consume(N),o=5,u=0,w):wn(N)?(e.consume(N),o=4,r.interrupt?t:C):n(N)}function y(N){return N===45?(e.consume(N),r.interrupt?t:C):n(N)}function w(N){const ye="CDATA[";return N===ye.charCodeAt(u++)?(e.consume(N),u===ye.length?r.interrupt?t:K:w):n(N)}function S(N){return wn(N)?(e.consume(N),l=String.fromCharCode(N),E):n(N)}function E(N){if(N===null||N===47||N===62||lt(N)){const ye=N===47,Ne=l.toLowerCase();return!ye&&!a&&hg.includes(Ne)?(o=1,r.interrupt?t(N):K(N)):C1.includes(l.toLowerCase())?(o=6,ye?(e.consume(N),k):r.interrupt?t(N):K(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):a?A(N):R(N))}return N===45||pn(N)?(e.consume(N),l+=String.fromCharCode(N),E):n(N)}function k(N){return N===62?(e.consume(N),r.interrupt?t:K):n(N)}function A(N){return Ye(N)?(e.consume(N),A):B(N)}function R(N){return N===47?(e.consume(N),B):N===58||N===95||wn(N)?(e.consume(N),I):Ye(N)?(e.consume(N),R):B(N)}function I(N){return N===45||N===46||N===58||N===95||pn(N)?(e.consume(N),I):G(N)}function G(N){return N===61?(e.consume(N),M):Ye(N)?(e.consume(N),G):R(N)}function M(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),d=N,Z):Ye(N)?(e.consume(N),M):q(N)}function Z(N){return N===d?(e.consume(N),d=null,H):N===null||Me(N)?n(N):(e.consume(N),Z)}function q(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||lt(N)?G(N):(e.consume(N),q)}function H(N){return N===47||N===62||Ye(N)?R(N):n(N)}function B(N){return N===62?(e.consume(N),X):n(N)}function X(N){return N===null||Me(N)?K(N):Ye(N)?(e.consume(N),X):n(N)}function K(N){return N===45&&o===2?(e.consume(N),J):N===60&&o===1?(e.consume(N),oe):N===62&&o===4?(e.consume(N),D):N===63&&o===3?(e.consume(N),C):N===93&&o===5?(e.consume(N),ie):Me(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(T1,Y,L)(N)):N===null||Me(N)?(e.exit("htmlFlowData"),L(N)):(e.consume(N),K)}function L(N){return e.check(R1,$,Y)(N)}function $(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),z}function z(N){return N===null||Me(N)?L(N):(e.enter("htmlFlowData"),K(N))}function J(N){return N===45?(e.consume(N),C):K(N)}function oe(N){return N===47?(e.consume(N),l="",U):K(N)}function U(N){if(N===62){const ye=l.toLowerCase();return hg.includes(ye)?(e.consume(N),D):K(N)}return wn(N)&&l.length<8?(e.consume(N),l+=String.fromCharCode(N),U):K(N)}function ie(N){return N===93?(e.consume(N),C):K(N)}function C(N){return N===62?(e.consume(N),D):N===45&&o===2?(e.consume(N),C):K(N)}function D(N){return N===null||Me(N)?(e.exit("htmlFlowData"),Y(N)):(e.consume(N),D)}function Y(N){return e.exit("htmlFlow"),t(N)}}function O1(e,t,n){const r=this;return o;function o(l){return Me(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function L1(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ca,t,n)}}const I1={name:"htmlText",tokenize:D1};function D1(e,t,n){const r=this;let o,a,l;return u;function u(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),G):C===63?(e.consume(C),R):wn(C)?(e.consume(C),q):n(C)}function h(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,w):wn(C)?(e.consume(C),A):n(C)}function p(C){return C===45?(e.consume(C),y):n(C)}function m(C){return C===null?n(C):C===45?(e.consume(C),v):Me(C)?(l=m,oe(C)):(e.consume(C),m)}function v(C){return C===45?(e.consume(C),y):m(C)}function y(C){return C===62?J(C):C===45?v(C):m(C)}function w(C){const D="CDATA[";return C===D.charCodeAt(a++)?(e.consume(C),a===D.length?S:w):n(C)}function S(C){return C===null?n(C):C===93?(e.consume(C),E):Me(C)?(l=S,oe(C)):(e.consume(C),S)}function E(C){return C===93?(e.consume(C),k):S(C)}function k(C){return C===62?J(C):C===93?(e.consume(C),k):S(C)}function A(C){return C===null||C===62?J(C):Me(C)?(l=A,oe(C)):(e.consume(C),A)}function R(C){return C===null?n(C):C===63?(e.consume(C),I):Me(C)?(l=R,oe(C)):(e.consume(C),R)}function I(C){return C===62?J(C):R(C)}function G(C){return wn(C)?(e.consume(C),M):n(C)}function M(C){return C===45||pn(C)?(e.consume(C),M):Z(C)}function Z(C){return Me(C)?(l=Z,oe(C)):Ye(C)?(e.consume(C),Z):J(C)}function q(C){return C===45||pn(C)?(e.consume(C),q):C===47||C===62||lt(C)?H(C):n(C)}function H(C){return C===47?(e.consume(C),J):C===58||C===95||wn(C)?(e.consume(C),B):Me(C)?(l=H,oe(C)):Ye(C)?(e.consume(C),H):J(C)}function B(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),B):X(C)}function X(C){return C===61?(e.consume(C),K):Me(C)?(l=X,oe(C)):Ye(C)?(e.consume(C),X):H(C)}function K(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),o=C,L):Me(C)?(l=K,oe(C)):Ye(C)?(e.consume(C),K):(e.consume(C),$)}function L(C){return C===o?(e.consume(C),o=void 0,z):C===null?n(C):Me(C)?(l=L,oe(C)):(e.consume(C),L)}function $(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||lt(C)?H(C):(e.consume(C),$)}function z(C){return C===47||C===62||lt(C)?H(C):n(C)}function J(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function oe(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),U}function U(C){return Ye(C)?Je(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):ie(C)}function ie(C){return e.enter("htmlTextData"),l(C)}}const Qd={name:"labelEnd",resolveAll:z1,resolveTo:U1,tokenize:H1},P1={tokenize:$1},B1={tokenize:j1},F1={tokenize:W1};function z1(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 o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Wn(e,0,e.length,n),e}function U1(e,t){let n=e.length,r=0,o,a,l,u;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",h,t]],u=ri(u,e.slice(a+1,a+r+3)),u=ri(u,[["enter",p,t]]),u=ri(u,dc(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),u=ri(u,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),u=ri(u,e.slice(l+1)),u=ri(u,[["exit",d,t]]),Wn(e,a,e.length,u),e}function H1(e,t,n){const r=this;let o=r.events.length,a,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return u;function u(v){return a?a._inactive?m(v):(l=r.parser.defined.includes(_i(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):n(v)}function d(v){return v===40?e.attempt(P1,p,l?p:m)(v):v===91?e.attempt(B1,p,l?h:m)(v):l?p(v):m(v)}function h(v){return e.attempt(F1,p,m)(v)}function p(v){return t(v)}function m(v){return a._balanced=!0,n(v)}}function $1(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return lt(m)?ea(e,a)(m):a(m)}function a(m){return m===41?p(m):Ov(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return lt(m)?ea(e,d)(m):p(m)}function u(m){return n(m)}function d(m){return m===34||m===39||m===40?Iv(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return lt(m)?ea(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function j1(e,t,n){const r=this;return o;function o(u){return Lv.call(r,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function W1(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const K1={name:"labelStartImage",resolveAll:Qd.resolveAll,tokenize:q1};function q1(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const V1={name:"labelStartLink",resolveAll:Qd.resolveAll,tokenize:G1};function G1(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const uh={name:"lineEnding",tokenize:Y1};function Y1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const Ul={name:"thematicBreak",tokenize:X1};function X1(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,u(h)}function u(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Me(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ye(h)?Je(e,u,"whitespace")(h):u(h))}}const Ln={continuation:{tokenize:ex},exit:nx,name:"list",tokenize:J1},Z1={partial:!0,tokenize:ix},Q1={partial:!0,tokenize:tx};function J1(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return u;function u(y){const w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Gh(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Ul,n,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Gh(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ca,r.interrupt?n:p,e.attempt(Z1,v,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,v(y)}function m(y){return Ye(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),v):n(y)}function v(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function ex(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ca,o,a);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Ye(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Q1,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(Ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function tx(e,t,n){const r=this;return Je(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function nx(e){e.exit(this.containerState.type)}function ix(e,t,n){const r=this;return Je(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!Ye(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const dg={name:"setextUnderline",resolveTo:rx,tokenize:sx};function rx(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function sx(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===o?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),Ye(h)?Je(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Me(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ox={tokenize:ax};function ax(e){const t=this,n=e.attempt(ca,r,e.attempt(this.parser.constructs.flowInitial,o,Je(e,e.attempt(this.parser.constructs.flow,o,e.attempt(d1,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lx={resolveAll:Pv()},cx=Dv("string"),ux=Dv("text");function Dv(e){return{resolveAll:Pv(e==="text"?hx:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,u);return l;function l(p){return h(p)?a(p):u(p)}function u(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const m=o[p];let v=-1;if(m)for(;++v<m.length;){const y=m[v];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function Pv(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function hx(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],o=t.sliceStream(r);let a=o.length,l=-1,u=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)d=!0,u++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const dx={42:Ln,43:Ln,45:Ln,48:Ln,49:Ln,50:Ln,51:Ln,52:Ln,53:Ln,54:Ln,55:Ln,56:Ln,57:Ln,62:Tv},fx={91:_1},px={[-2]:ch,[-1]:ch,32:ch},mx={35:x1,42:Ul,45:[dg,Ul],60:N1,61:dg,95:Ul,96:ug,126:ug},gx={38:Av,92:Rv},_x={[-5]:uh,[-4]:uh,[-3]:uh,33:K1,38:Av,42:Yh,60:[V0,I1],91:V1,92:[S1,Rv],93:Qd,95:Yh,96:o1},vx={null:[Yh,lx]},yx={null:[42,95]},bx={null:[]},Sx=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yx,contentInitial:fx,disable:bx,document:dx,flow:mx,flowInitial:px,insideSpan:vx,string:gx,text:_x},Symbol.toStringTag,{value:"Module"}));function wx(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 o={},a=[];let l=[],u=[];const d={attempt:Z(G),check:Z(M),consume:A,enter:R,exit:I,interrupt:Z(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:v,sliceStream:y,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function m(X){return l=ri(l,X),E(),l[l.length-1]!==null?[]:(q(t,0),h.events=dc(a,h.events,h),h.events)}function v(X,K){return kx(y(X),K)}function y(X){return xx(l,X)}function w(){const{_bufferIndex:X,_index:K,line:L,column:$,offset:z}=r;return{_bufferIndex:X,_index:K,line:L,column:$,offset:z}}function S(X){o[X.line]=X.column,B()}function E(){let X;for(;r._index<l.length;){const K=l[r._index];if(typeof K=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<K.length;)k(K.charCodeAt(r._bufferIndex));else k(K)}}function k(X){p=p(X)}function A(X){Me(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,B()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=X}function R(X,K){const L=K||{};return L.type=X,L.start=w(),h.events.push(["enter",L,h]),u.push(L),L}function I(X){const K=u.pop();return K.end=w(),h.events.push(["exit",K,h]),K}function G(X,K){q(X,K.from)}function M(X,K){K.restore()}function Z(X,K){return L;function L($,z,J){let oe,U,ie,C;return Array.isArray($)?Y($):"tokenize"in $?Y([$]):D($);function D(_e){return Ue;function Ue(Ie){const He=Ie!==null&&_e[Ie],nt=Ie!==null&&_e.null,Ft=[...Array.isArray(He)?He:He?[He]:[],...Array.isArray(nt)?nt:nt?[nt]:[]];return Y(Ft)(Ie)}}function Y(_e){return oe=_e,U=0,_e.length===0?J:N(_e[U])}function N(_e){return Ue;function Ue(Ie){return C=H(),ie=_e,_e.partial||(h.currentConstruct=_e),_e.name&&h.parser.constructs.disable.null.includes(_e.name)?Ne():_e.tokenize.call(K?Object.assign(Object.create(h),K):h,d,ye,Ne)(Ie)}}function ye(_e){return X(ie,C),z}function Ne(_e){return C.restore(),++U<oe.length?N(oe[U]):J}}}function q(X,K){X.resolveAll&&!a.includes(X)&&a.push(X),X.resolve&&Wn(h.events,K,h.events.length-K,X.resolve(h.events.slice(K),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function H(){const X=w(),K=h.previous,L=h.currentConstruct,$=h.events.length,z=Array.from(u);return{from:$,restore:J};function J(){r=X,h.previous=K,h.currentConstruct=L,h.events.length=$,u=z,B()}}function B(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function xx(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function kx(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
42
|
+
`,h="/",p="*",m="",v="comment",y="declaration";function w(E,k){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];k=k||{};var A=1,R=1;function I($){var z=$.match(t);z&&(A+=z.length);var J=$.lastIndexOf(d);R=~J?$.length-J:R+$.length}function G(){var $={line:A,column:R};return function(z){return z.position=new M($),H(),z}}function M($){this.start=$,this.end={line:A,column:R},this.source=k.source}M.prototype.content=E;function Z($){var z=new Error(k.source+":"+A+":"+R+": "+$);if(z.reason=$,z.filename=k.source,z.line=A,z.column=R,z.source=E,!k.silent)throw z}function q($){var z=$.exec(E);if(z){var J=z[0];return I(J),E=E.slice(J.length),z}}function H(){q(n)}function B($){var z;for($=$||[];z=X();)z!==!1&&$.push(z);return $}function X(){var $=G();if(!(h!=E.charAt(0)||p!=E.charAt(1))){for(var z=2;m!=E.charAt(z)&&(p!=E.charAt(z)||h!=E.charAt(z+1));)++z;if(z+=2,m===E.charAt(z-1))return Z("End of comment missing");var J=E.slice(2,z-2);return R+=2,I(J),E=E.slice(z),R+=2,$({type:v,comment:J})}}function K(){var $=G(),z=q(r);if(z){if(X(),!q(o))return Z("property missing ':'");var J=q(a),oe=$({type:y,property:S(z[0].replace(e,m)),value:J?S(J[0].replace(e,m)):m});return q(l),oe}}function L(){var $=[];B($);for(var z;z=K();)z!==!1&&($.push(z),B($));return $}return H(),L()}function S(E){return E?E.replace(u,m):m}return ah=w,ah}var Jm;function a0(){if(Jm)return zs;Jm=1;var e=zs&&zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zs,"__esModule",{value:!0}),zs.default=n;const t=e(o0());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),u=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:p}=d;u?o(h,p,d):p&&(a=a||{},a[h]=p)}),a}return zs}var Do={},eg;function l0(){if(eg)return Do;eg=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},u=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,u):h=h.replace(r,u),h.replace(t,l))};return Do.camelCase=d,Do}var Po,tg;function c0(){if(tg)return Po;tg=1;var e=Po&&Po.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(a0()),n=l0();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(l[(0,n.camelCase)(u,a)]=d)}),l}return r.default=r,Po=r,Po}var u0=c0();const h0=ac(u0),yv=bv("end"),qd=bv("start");function bv(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 d0(e){const t=qd(e),n=yv(e);if(t&&n)return{start:t,end:n}}function Jo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ng(e.position):"start"in e||"end"in e?ng(e):"line"in e||"column"in e?Vh(e):""}function Vh(e){return ig(e&&e.line)+":"+ig(e&&e.column)}function ng(e){return Vh(e&&e.start)+"-"+Vh(e&&e.end)}function ig(e){return e&&typeof e=="number"?e:1}class mn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=Jo(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}mn.prototype.file="";mn.prototype.name="";mn.prototype.reason="";mn.prototype.message="";mn.prototype.stack="";mn.prototype.column=void 0;mn.prototype.line=void 0;mn.prototype.ancestors=void 0;mn.prototype.cause=void 0;mn.prototype.fatal=void 0;mn.prototype.place=void 0;mn.prototype.ruleId=void 0;mn.prototype.source=void 0;const Vd={}.hasOwnProperty,f0=new Map,p0=/[A-Z]/g,m0=new Set(["table","tbody","thead","tfoot","tr"]),g0=new Set(["td","th"]),Sv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _0(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=E0(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=k0(n,t.jsx,t.jsxs)}const o={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"?Kd:r0,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=wv(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function wv(e,t,n){if(t.type==="element")return v0(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return y0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return S0(e,t,n);if(t.type==="mdxjsEsm")return b0(e,t);if(t.type==="root")return w0(e,t,n);if(t.type==="text")return x0(e,t)}function v0(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Kd,e.schema=o),e.ancestors.push(t);const a=kv(e,t.tagName,!1),l=C0(e,t);let u=Yd(e,t);return m0.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!Gw(d):!0})),xv(e,l,a,t),Gd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function y0(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)}ia(e,t.position)}function b0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ia(e,t.position)}function S0(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Kd,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:kv(e,t.name,!0),l=N0(e,t),u=Yd(e,t);return xv(e,l,a,t),Gd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function w0(e,t,n){const r={};return Gd(r,Yd(e,t)),e.create(t,e.Fragment,r,n)}function x0(e,t){return t.value}function xv(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function k0(e,t,n){return r;function r(o,a,l,u){const h=Array.isArray(l.children)?n:t;return u?h(a,l,u):h(a,l)}}function E0(e,t){return n;function n(r,o,a,l){const u=Array.isArray(a.children),d=qd(r);return t(o,a,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function C0(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Vd.call(t.properties,o)){const a=T0(e,o,t.properties[o]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&g0.has(t.tagName)?r=u:n[l]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function N0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else ia(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else ia(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Yd(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:f0;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const h=o.get(d)||0;l=d+"-"+h,o.set(d,h+1)}}const u=wv(e,a,l);u!==void 0&&n.push(u)}return n}function T0(e,t,n){const r=t0(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?jw(n):s0(n)),r.property==="style"){let o=typeof n=="object"?n:R0(e,String(n));return e.stylePropertyNameCase==="css"&&(o=A0(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Qw[r.property]||r.property:r.attribute,n]}}function R0(e,t){try{return h0(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Sv+"#cannot-parse-style-attribute",o}}function kv(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const u=Gm(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=l}else r=Gm(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Vd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ia(e)}function ia(e,t){const n=new mn("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=Sv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function A0(e){const t={};let n;for(n in e)Vd.call(e,n)&&(t[M0(n)]=e[n]);return t}function M0(e){let t=e.replace(p0,O0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function O0(e){return"-"+e.toLowerCase()}const lh={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"]},L0={};function Xd(e,t){const n=L0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ev(e,r,o)}function Ev(e,t,n){if(I0(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 rg(e.children,t,n)}return Array.isArray(e)?rg(e,t,n):""}function rg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ev(e[o],t,n);return r.join("")}function I0(e){return!!(e&&typeof e=="object")}const sg=document.createElement("i");function Zd(e){const t="&"+e+";";sg.innerHTML=t;const n=sg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Wn(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function ri(e,t){return e.length>0?(Wn(e,e.length,0,t),e):t}const og={}.hasOwnProperty;function Cv(e){const t={};let n=-1;for(;++n<e.length;)D0(t,e[n]);return t}function D0(e,t){let n;for(n in t){const o=(og.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){og.call(o,l)||(o[l]=[]);const u=a[l];P0(o[l],Array.isArray(u)?u:u?[u]:[])}}}function P0(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Wn(e,0,0,r)}function Nv(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 _i(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wn=Tr(/[A-Za-z]/),pn=Tr(/[\dA-Za-z]/),B0=Tr(/[#-'*+\--9=?A-Z^-~]/);function Yl(e){return e!==null&&(e<32||e===127)}const Gh=Tr(/\d/),F0=Tr(/[\dA-Fa-f]/),z0=Tr(/[!-/:-@[-`{-~]/);function Me(e){return e!==null&&e<-2}function lt(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const hc=Tr(new RegExp("\\p{P}|\\p{S}","u")),os=Tr(/\s/);function Tr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ys(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Je(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Ye(d)?(e.enter(n),u(d)):t(d)}function u(d){return Ye(d)&&a++<o?(e.consume(d),u):(e.exit(n),t(d))}}const U0={tokenize:H0};function H0(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),a(u)}function a(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Me(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const $0={tokenize:j0},ag={tokenize:W0};function j0(e){const t=this,n=[];let r=0,o,a,l;return u;function u(R){if(r<n.length){const I=n[r];return t.containerState=I[1],e.attempt(I[0].continuation,d,h)(R)}return h(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&A();const I=t.events.length;let G=I,M;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){M=t.events[G][1].end;break}k(r);let Z=I;for(;Z<t.events.length;)t.events[Z][1].end={...M},Z++;return Wn(t.events,G+1,0,t.events.slice(I)),t.events.length=Z,h(R)}return u(R)}function h(R){if(r===n.length){if(!o)return v(R);if(o.currentConstruct&&o.currentConstruct.concrete)return w(R);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ag,p,m)(R)}function p(R){return o&&A(),k(r),v(R)}function m(R){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,w(R)}function v(R){return t.containerState={},e.attempt(ag,y,w)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),v(R)}function w(R){if(R===null){o&&A(),k(0),e.consume(R);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(R)}function S(R){if(R===null){E(e.exit("chunkFlow"),!0),k(0),e.consume(R);return}return Me(R)?(e.consume(R),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(R),S)}function E(R,I){const G=t.sliceStream(R);if(I&&G.push(null),R.previous=a,a&&(a.next=R),a=R,o.defineSkip(R.start),o.write(G),t.parser.lazy[R.start.line]){let M=o.events.length;for(;M--;)if(o.events[M][1].start.offset<l&&(!o.events[M][1].end||o.events[M][1].end.offset>l))return;const Z=t.events.length;let q=Z,H,B;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(H){B=t.events[q][1].end;break}H=!0}for(k(r),M=Z;M<t.events.length;)t.events[M][1].end={...B},M++;Wn(t.events,q+1,0,t.events.slice(Z)),t.events.length=M}}function k(R){let I=n.length;for(;I-- >R;){const G=n[I];t.containerState=G[1],G[0].exit.call(t,e)}n.length=R}function A(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function W0(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qs(e){if(e===null||lt(e)||os(e))return 1;if(hc(e))return 2}function dc(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Yh={name:"attention",resolveAll:K0,tokenize:q0};function K0(e,t){let n=-1,r,o,a,l,u,d,h,p;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;d=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 m={...e[r][1].end},v={...e[n][1].start};lg(m,-d),lg(v,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=ri(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=ri(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",a,t]]),h=ri(h,dc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=ri(h,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=ri(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Wn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function q0(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=qs(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===a)return e.consume(d),u;const h=e.exit("attentionSequence"),p=qs(d),m=!p||p===2&&o||n.includes(d),v=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?m:m&&(o||!v)),h._close=!!(a===42?v:v&&(p||!m)),t(d)}}function lg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const V0={name:"autolink",tokenize:G0};function G0(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return wn(y)?(e.consume(y),l):y===64?n(y):h(y)}function l(y){return y===43||y===45||y===46||pn(y)?(r=1,u(y)):h(y)}function u(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||pn(y))&&r++<32?(e.consume(y),u):(r=0,h(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Yl(y)?n(y):(e.consume(y),d)}function h(y){return y===64?(e.consume(y),p):B0(y)?(e.consume(y),h):n(y)}function p(y){return pn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):v(y)}function v(y){if((y===45||pn(y))&&r++<63){const w=y===45?v:m;return e.consume(y),w}return n(y)}}const ca={partial:!0,tokenize:Y0};function Y0(e,t,n){return r;function r(a){return Ye(a)?Je(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Me(a)?t(a):n(a)}}const Tv={continuation:{tokenize:Z0},exit:Q0,name:"blockQuote",tokenize:X0};function X0(e,t,n){const r=this;return o;function o(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ye(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Z0(e,t,n){const r=this;return o;function o(l){return Ye(l)?Je(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(Tv,t,n)(l)}}function Q0(e){e.exit("blockQuote")}const Rv={name:"characterEscape",tokenize:J0};function J0(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return z0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Av={name:"characterReference",tokenize:ex};function ex(e,t,n){const r=this;let o=0,a,l;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,l=pn,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=F0,p):(e.enter("characterReferenceValue"),a=7,l=Gh,p(m))}function p(m){if(m===59&&o){const v=e.exit("characterReferenceValue");return l===pn&&!Zd(r.sliceSerialize(v))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&o++<a?(e.consume(m),p):n(m)}}const cg={partial:!0,tokenize:nx},ug={concrete:!0,name:"codeFenced",tokenize:tx};function tx(e,t,n){const r=this,o={partial:!0,tokenize:G};let a=0,l=0,u;return d;function d(M){return h(M)}function h(M){const Z=r.events[r.events.length-1];return a=Z&&Z[1].type==="linePrefix"?Z[2].sliceSerialize(Z[1],!0).length:0,u=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(M)}function p(M){return M===u?(l++,e.consume(M),p):l<3?n(M):(e.exit("codeFencedFenceSequence"),Ye(M)?Je(e,m,"whitespace")(M):m(M))}function m(M){return M===null||Me(M)?(e.exit("codeFencedFence"),r.interrupt?t(M):e.check(cg,S,I)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===null||Me(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(M)):Ye(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,y,"whitespace")(M)):M===96&&M===u?n(M):(e.consume(M),v)}function y(M){return M===null||Me(M)?m(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(M))}function w(M){return M===null||Me(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(M)):M===96&&M===u?n(M):(e.consume(M),w)}function S(M){return e.attempt(o,I,E)(M)}function E(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),k}function k(M){return a>0&&Ye(M)?Je(e,A,"linePrefix",a+1)(M):A(M)}function A(M){return M===null||Me(M)?e.check(cg,S,I)(M):(e.enter("codeFlowValue"),R(M))}function R(M){return M===null||Me(M)?(e.exit("codeFlowValue"),A(M)):(e.consume(M),R)}function I(M){return e.exit("codeFenced"),t(M)}function G(M,Z,q){let H=0;return B;function B(z){return M.enter("lineEnding"),M.consume(z),M.exit("lineEnding"),X}function X(z){return M.enter("codeFencedFence"),Ye(z)?Je(M,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):K(z)}function K(z){return z===u?(M.enter("codeFencedFenceSequence"),L(z)):q(z)}function L(z){return z===u?(H++,M.consume(z),L):H>=l?(M.exit("codeFencedFenceSequence"),Ye(z)?Je(M,$,"whitespace")(z):$(z)):q(z)}function $(z){return z===null||Me(z)?(M.exit("codeFencedFence"),Z(z)):q(z)}}}function nx(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const ch={name:"codeIndented",tokenize:rx},ix={partial:!0,tokenize:sx};function rx(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Je(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Me(h)?e.attempt(ix,l,d)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||Me(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function d(h){return e.exit("codeIndented"),t(h)}}function sx(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):Me(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Je(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Me(l)?o(l):n(l)}}const ox={name:"codeText",previous:lx,resolve:ax,tokenize:cx};function ax(e){let t=e.length-4,n=3,r,o;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;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function lx(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function cx(e,t,n){let r=0,o,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),r++,u):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),o=0,p(m)):Me(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Me(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",h(m))}}class ux{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 o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Bo(this.left,r),a.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),Bo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Bo(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);Bo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Bo(this.left,n.reverse())}}}function Bo(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 Mv(e){const t={};let n=-1,r,o,a,l,u,d,h;const p=new ux(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,hx(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=p.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...p.get(o)[1].start},u=p.slice(o,n),u.unshift(r),p.splice(o,n-o+1,u))}}return Wn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function hx(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],h={};let p,m,v=-1,y=n,w=0,S=0;const E=[S];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++v<u.length;)u[v][0]==="exit"&&u[v-1][0]==="enter"&&u[v][1].type===u[v-1][1].type&&u[v][1].start.line!==u[v][1].end.line&&(S=v+1,E.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):E.pop(),v=E.length;v--;){const k=u.slice(E[v],E[v+1]),A=a.pop();d.push([A,A+k.length-1]),e.splice(A,2,k)}for(d.reverse(),v=-1;++v<d.length;)h[w+d[v][0]]=w+d[v][1],w+=d[v][1]-d[v][0]-1;return h}const dx={resolve:px,tokenize:mx},fx={partial:!0,tokenize:gx};function px(e){return Mv(e),e}function mx(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?a(u):Me(u)?e.check(fx,l,a)(u):(e.consume(u),o)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function gx(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Je(e,a,"linePrefix")}function a(l){if(l===null||Me(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Ov(e,t,n,r,o,a,l,u,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(k){return k===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(k),e.exit(a),v):k===null||k===32||k===41||Yl(k)?n(k):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),S(k))}function v(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===62?(e.exit("chunkString"),e.exit(u),v(k)):k===null||k===60||Me(k)?n(k):(e.consume(k),k===92?w:y)}function w(k){return k===60||k===62||k===92?(e.consume(k),y):y(k)}function S(k){return!p&&(k===null||k===41||lt(k))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(k)):p<h&&k===40?(e.consume(k),p++,S):k===41?(e.consume(k),p--,S):k===null||k===32||k===40||Yl(k)?n(k):(e.consume(k),k===92?E:S)}function E(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function Lv(e,t,n,r,o,a){const l=this;let u=0,d;return h;function h(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return u>999||y===null||y===91||y===93&&!d||y===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):Me(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Me(y)||u++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ye(y)),y===92?v:m)}function v(y){return y===91||y===92||y===93?(e.consume(y),u++,m):m(y)}}function Iv(e,t,n,r,o,a){let l;return u;function u(v){return v===34||v===39||v===40?(e.enter(r),e.enter(o),e.consume(v),e.exit(o),l=v===40?41:v,d):n(v)}function d(v){return v===l?(e.enter(o),e.consume(v),e.exit(o),e.exit(r),t):(e.enter(a),h(v))}function h(v){return v===l?(e.exit(a),d(l)):v===null?n(v):Me(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===l||v===null||Me(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?m:p)}function m(v){return v===l||v===92?(e.consume(v),p):p(v)}}function ea(e,t){let n;return r;function r(o){return Me(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ye(o)?Je(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const _x={name:"definition",tokenize:yx},vx={partial:!0,tokenize:bx};function yx(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return Lv.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return o=_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return lt(y)?ea(e,h)(y):h(y)}function h(y){return Ov(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(vx,m,m)(y)}function m(y){return Ye(y)?Je(e,v,"whitespace")(y):v(y)}function v(y){return y===null||Me(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function bx(e,t,n){return r;function r(u){return lt(u)?ea(e,o)(u):n(u)}function o(u){return Iv(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Ye(u)?Je(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Me(u)?t(u):n(u)}}const Sx={name:"hardBreakEscape",tokenize:wx};function wx(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Me(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const xx={name:"headingAtx",resolve:kx,tokenize:Ex};function kx(e,t){let n=e.length-2,r=3,o,a;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&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Wn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function Ex(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||lt(p)?(e.exit("atxHeadingSequence"),u(p)):n(p)}function u(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Me(p)?(e.exit("atxHeading"),t(p)):Ye(p)?Je(e,u,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),u(p))}function h(p){return p===null||p===35||lt(p)?(e.exit("atxHeadingText"),u(p)):(e.consume(p),h)}}const Cx=["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"],hg=["pre","script","style","textarea"],Nx={concrete:!0,name:"htmlFlow",resolveTo:Ax,tokenize:Mx},Tx={partial:!0,tokenize:Lx},Rx={partial:!0,tokenize:Ox};function Ax(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 Mx(e,t,n){const r=this;let o,a,l,u,d;return h;function h(N){return p(N)}function p(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),m}function m(N){return N===33?(e.consume(N),v):N===47?(e.consume(N),a=!0,S):N===63?(e.consume(N),o=3,r.interrupt?t:C):wn(N)?(e.consume(N),l=String.fromCharCode(N),E):n(N)}function v(N){return N===45?(e.consume(N),o=2,y):N===91?(e.consume(N),o=5,u=0,w):wn(N)?(e.consume(N),o=4,r.interrupt?t:C):n(N)}function y(N){return N===45?(e.consume(N),r.interrupt?t:C):n(N)}function w(N){const ye="CDATA[";return N===ye.charCodeAt(u++)?(e.consume(N),u===ye.length?r.interrupt?t:K:w):n(N)}function S(N){return wn(N)?(e.consume(N),l=String.fromCharCode(N),E):n(N)}function E(N){if(N===null||N===47||N===62||lt(N)){const ye=N===47,Ne=l.toLowerCase();return!ye&&!a&&hg.includes(Ne)?(o=1,r.interrupt?t(N):K(N)):Cx.includes(l.toLowerCase())?(o=6,ye?(e.consume(N),k):r.interrupt?t(N):K(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):a?A(N):R(N))}return N===45||pn(N)?(e.consume(N),l+=String.fromCharCode(N),E):n(N)}function k(N){return N===62?(e.consume(N),r.interrupt?t:K):n(N)}function A(N){return Ye(N)?(e.consume(N),A):B(N)}function R(N){return N===47?(e.consume(N),B):N===58||N===95||wn(N)?(e.consume(N),I):Ye(N)?(e.consume(N),R):B(N)}function I(N){return N===45||N===46||N===58||N===95||pn(N)?(e.consume(N),I):G(N)}function G(N){return N===61?(e.consume(N),M):Ye(N)?(e.consume(N),G):R(N)}function M(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),d=N,Z):Ye(N)?(e.consume(N),M):q(N)}function Z(N){return N===d?(e.consume(N),d=null,H):N===null||Me(N)?n(N):(e.consume(N),Z)}function q(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||lt(N)?G(N):(e.consume(N),q)}function H(N){return N===47||N===62||Ye(N)?R(N):n(N)}function B(N){return N===62?(e.consume(N),X):n(N)}function X(N){return N===null||Me(N)?K(N):Ye(N)?(e.consume(N),X):n(N)}function K(N){return N===45&&o===2?(e.consume(N),J):N===60&&o===1?(e.consume(N),oe):N===62&&o===4?(e.consume(N),D):N===63&&o===3?(e.consume(N),C):N===93&&o===5?(e.consume(N),ie):Me(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Tx,Y,L)(N)):N===null||Me(N)?(e.exit("htmlFlowData"),L(N)):(e.consume(N),K)}function L(N){return e.check(Rx,$,Y)(N)}function $(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),z}function z(N){return N===null||Me(N)?L(N):(e.enter("htmlFlowData"),K(N))}function J(N){return N===45?(e.consume(N),C):K(N)}function oe(N){return N===47?(e.consume(N),l="",U):K(N)}function U(N){if(N===62){const ye=l.toLowerCase();return hg.includes(ye)?(e.consume(N),D):K(N)}return wn(N)&&l.length<8?(e.consume(N),l+=String.fromCharCode(N),U):K(N)}function ie(N){return N===93?(e.consume(N),C):K(N)}function C(N){return N===62?(e.consume(N),D):N===45&&o===2?(e.consume(N),C):K(N)}function D(N){return N===null||Me(N)?(e.exit("htmlFlowData"),Y(N)):(e.consume(N),D)}function Y(N){return e.exit("htmlFlow"),t(N)}}function Ox(e,t,n){const r=this;return o;function o(l){return Me(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Lx(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ca,t,n)}}const Ix={name:"htmlText",tokenize:Dx};function Dx(e,t,n){const r=this;let o,a,l;return u;function u(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),G):C===63?(e.consume(C),R):wn(C)?(e.consume(C),q):n(C)}function h(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,w):wn(C)?(e.consume(C),A):n(C)}function p(C){return C===45?(e.consume(C),y):n(C)}function m(C){return C===null?n(C):C===45?(e.consume(C),v):Me(C)?(l=m,oe(C)):(e.consume(C),m)}function v(C){return C===45?(e.consume(C),y):m(C)}function y(C){return C===62?J(C):C===45?v(C):m(C)}function w(C){const D="CDATA[";return C===D.charCodeAt(a++)?(e.consume(C),a===D.length?S:w):n(C)}function S(C){return C===null?n(C):C===93?(e.consume(C),E):Me(C)?(l=S,oe(C)):(e.consume(C),S)}function E(C){return C===93?(e.consume(C),k):S(C)}function k(C){return C===62?J(C):C===93?(e.consume(C),k):S(C)}function A(C){return C===null||C===62?J(C):Me(C)?(l=A,oe(C)):(e.consume(C),A)}function R(C){return C===null?n(C):C===63?(e.consume(C),I):Me(C)?(l=R,oe(C)):(e.consume(C),R)}function I(C){return C===62?J(C):R(C)}function G(C){return wn(C)?(e.consume(C),M):n(C)}function M(C){return C===45||pn(C)?(e.consume(C),M):Z(C)}function Z(C){return Me(C)?(l=Z,oe(C)):Ye(C)?(e.consume(C),Z):J(C)}function q(C){return C===45||pn(C)?(e.consume(C),q):C===47||C===62||lt(C)?H(C):n(C)}function H(C){return C===47?(e.consume(C),J):C===58||C===95||wn(C)?(e.consume(C),B):Me(C)?(l=H,oe(C)):Ye(C)?(e.consume(C),H):J(C)}function B(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),B):X(C)}function X(C){return C===61?(e.consume(C),K):Me(C)?(l=X,oe(C)):Ye(C)?(e.consume(C),X):H(C)}function K(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),o=C,L):Me(C)?(l=K,oe(C)):Ye(C)?(e.consume(C),K):(e.consume(C),$)}function L(C){return C===o?(e.consume(C),o=void 0,z):C===null?n(C):Me(C)?(l=L,oe(C)):(e.consume(C),L)}function $(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||lt(C)?H(C):(e.consume(C),$)}function z(C){return C===47||C===62||lt(C)?H(C):n(C)}function J(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function oe(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),U}function U(C){return Ye(C)?Je(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):ie(C)}function ie(C){return e.enter("htmlTextData"),l(C)}}const Qd={name:"labelEnd",resolveAll:zx,resolveTo:Ux,tokenize:Hx},Px={tokenize:$x},Bx={tokenize:jx},Fx={tokenize:Wx};function zx(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 o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Wn(e,0,e.length,n),e}function Ux(e,t){let n=e.length,r=0,o,a,l,u;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",h,t]],u=ri(u,e.slice(a+1,a+r+3)),u=ri(u,[["enter",p,t]]),u=ri(u,dc(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),u=ri(u,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),u=ri(u,e.slice(l+1)),u=ri(u,[["exit",d,t]]),Wn(e,a,e.length,u),e}function Hx(e,t,n){const r=this;let o=r.events.length,a,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return u;function u(v){return a?a._inactive?m(v):(l=r.parser.defined.includes(_i(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):n(v)}function d(v){return v===40?e.attempt(Px,p,l?p:m)(v):v===91?e.attempt(Bx,p,l?h:m)(v):l?p(v):m(v)}function h(v){return e.attempt(Fx,p,m)(v)}function p(v){return t(v)}function m(v){return a._balanced=!0,n(v)}}function $x(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return lt(m)?ea(e,a)(m):a(m)}function a(m){return m===41?p(m):Ov(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return lt(m)?ea(e,d)(m):p(m)}function u(m){return n(m)}function d(m){return m===34||m===39||m===40?Iv(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return lt(m)?ea(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function jx(e,t,n){const r=this;return o;function o(u){return Lv.call(r,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function Wx(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Kx={name:"labelStartImage",resolveAll:Qd.resolveAll,tokenize:qx};function qx(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Vx={name:"labelStartLink",resolveAll:Qd.resolveAll,tokenize:Gx};function Gx(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const uh={name:"lineEnding",tokenize:Yx};function Yx(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const Ul={name:"thematicBreak",tokenize:Xx};function Xx(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,u(h)}function u(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Me(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ye(h)?Je(e,u,"whitespace")(h):u(h))}}const Ln={continuation:{tokenize:e1},exit:n1,name:"list",tokenize:Jx},Zx={partial:!0,tokenize:i1},Qx={partial:!0,tokenize:t1};function Jx(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return u;function u(y){const w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Gh(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Ul,n,h)(y):h(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Gh(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ca,r.interrupt?n:p,e.attempt(Zx,v,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,v(y)}function m(y){return Ye(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),v):n(y)}function v(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function e1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ca,o,a);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Ye(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Qx,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(Ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function t1(e,t,n){const r=this;return Je(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function n1(e){e.exit(this.containerState.type)}function i1(e,t,n){const r=this;return Je(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!Ye(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const dg={name:"setextUnderline",resolveTo:r1,tokenize:s1};function r1(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function s1(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===o?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),Ye(h)?Je(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Me(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const o1={tokenize:a1};function a1(e){const t=this,n=e.attempt(ca,r,e.attempt(this.parser.constructs.flowInitial,o,Je(e,e.attempt(this.parser.constructs.flow,o,e.attempt(dx,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const l1={resolveAll:Pv()},c1=Dv("string"),u1=Dv("text");function Dv(e){return{resolveAll:Pv(e==="text"?h1:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,u);return l;function l(p){return h(p)?a(p):u(p)}function u(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const m=o[p];let v=-1;if(m)for(;++v<m.length;){const y=m[v];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function Pv(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function h1(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],o=t.sliceStream(r);let a=o.length,l=-1,u=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)d=!0,u++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const d1={42:Ln,43:Ln,45:Ln,48:Ln,49:Ln,50:Ln,51:Ln,52:Ln,53:Ln,54:Ln,55:Ln,56:Ln,57:Ln,62:Tv},f1={91:_x},p1={[-2]:ch,[-1]:ch,32:ch},m1={35:xx,42:Ul,45:[dg,Ul],60:Nx,61:dg,95:Ul,96:ug,126:ug},g1={38:Av,92:Rv},_1={[-5]:uh,[-4]:uh,[-3]:uh,33:Kx,38:Av,42:Yh,60:[V0,Ix],91:Vx,92:[Sx,Rv],93:Qd,95:Yh,96:ox},v1={null:[Yh,l1]},y1={null:[42,95]},b1={null:[]},S1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:y1,contentInitial:f1,disable:b1,document:d1,flow:m1,flowInitial:p1,insideSpan:v1,string:g1,text:_1},Symbol.toStringTag,{value:"Module"}));function w1(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 o={},a=[];let l=[],u=[];const d={attempt:Z(G),check:Z(M),consume:A,enter:R,exit:I,interrupt:Z(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:v,sliceStream:y,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function m(X){return l=ri(l,X),E(),l[l.length-1]!==null?[]:(q(t,0),h.events=dc(a,h.events,h),h.events)}function v(X,K){return k1(y(X),K)}function y(X){return x1(l,X)}function w(){const{_bufferIndex:X,_index:K,line:L,column:$,offset:z}=r;return{_bufferIndex:X,_index:K,line:L,column:$,offset:z}}function S(X){o[X.line]=X.column,B()}function E(){let X;for(;r._index<l.length;){const K=l[r._index];if(typeof K=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<K.length;)k(K.charCodeAt(r._bufferIndex));else k(K)}}function k(X){p=p(X)}function A(X){Me(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,B()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=X}function R(X,K){const L=K||{};return L.type=X,L.start=w(),h.events.push(["enter",L,h]),u.push(L),L}function I(X){const K=u.pop();return K.end=w(),h.events.push(["exit",K,h]),K}function G(X,K){q(X,K.from)}function M(X,K){K.restore()}function Z(X,K){return L;function L($,z,J){let oe,U,ie,C;return Array.isArray($)?Y($):"tokenize"in $?Y([$]):D($);function D(_e){return Ue;function Ue(Ie){const He=Ie!==null&&_e[Ie],nt=Ie!==null&&_e.null,Ft=[...Array.isArray(He)?He:He?[He]:[],...Array.isArray(nt)?nt:nt?[nt]:[]];return Y(Ft)(Ie)}}function Y(_e){return oe=_e,U=0,_e.length===0?J:N(_e[U])}function N(_e){return Ue;function Ue(Ie){return C=H(),ie=_e,_e.partial||(h.currentConstruct=_e),_e.name&&h.parser.constructs.disable.null.includes(_e.name)?Ne():_e.tokenize.call(K?Object.assign(Object.create(h),K):h,d,ye,Ne)(Ie)}}function ye(_e){return X(ie,C),z}function Ne(_e){return C.restore(),++U<oe.length?N(oe[U]):J}}}function q(X,K){X.resolveAll&&!a.includes(X)&&a.push(X),X.resolve&&Wn(h.events,K,h.events.length-K,X.resolve(h.events.slice(K),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function H(){const X=w(),K=h.previous,L=h.currentConstruct,$=h.events.length,z=Array.from(u);return{from:$,restore:J};function J(){r=X,h.previous=K,h.currentConstruct=L,h.events.length=$,u=z,B()}}function B(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function x1(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function k1(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
43
43
|
`;break}case-3:{l=`\r
|
|
44
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(a)}o=a===-2,r.push(l)}return r.join("")}function Ex(e){const r={constructs:Cv([Sx,...(e||{}).extensions||[]]),content:o(U0),defined:[],document:o($0),flow:o(ox),lazy:{},string:o(cx),text:o(ux)};return r;function o(a){return l;function l(u){return wx(r,a,u)}}}function Cx(e){for(;!Mv(e););return e}const fg=/[\0\t\n\r]/g;function Nx(){let e=1,t="",n=!0,r;return o;function o(a,l,u){const d=[];let h,p,m,v,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(fg.lastIndex=m,h=fg.exec(a),v=h&&h.index!==void 0?h.index:a.length,y=a.charCodeAt(v),!h){t=a.slice(m);break}if(y===10&&m===v&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<v&&(d.push(a.slice(m,v)),e+=v-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=v+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Tx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Rx(e){return e.replace(Tx,Ax)}function Ax(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return Nv(n.slice(a?2:1),a?16:10)}return Zd(n)||e}const Bv={}.hasOwnProperty;function Mx(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ox(n)(Cx(Ex(n).document().write(Nx()(e,t,!0))))}function Ox(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(vi),autolinkProtocol:H,autolinkEmail:H,atxHeading:a(Pi),blockQuote:a(nt),characterEscape:H,characterReference:H,codeFenced:a(Ft),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Ft,l),codeText:a(nn,l),codeTextData:H,data:H,codeFlowValue:H,definition:a($e),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Dn),hardBreakEscape:a(Qe),hardBreakTrailing:a(Qe),htmlFlow:a(Pn,l),htmlFlowData:H,htmlText:a(Pn,l),htmlTextData:H,image:a(Kn),label:l,link:a(vi),listItem:a(yi),listItemValue:v,listOrdered:a(oi,m),listUnordered:a(oi),paragraph:a(Rr),reference:N,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Pi),strong:a(Ar),thematicBreak:a(Mr)},exit:{atxHeading:d(),atxHeadingSequence:G,autolink:d(),autolinkEmail:He,autolinkProtocol:Ie,blockQuote:d(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:_e,characterReference:Ue,codeFenced:d(E),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:B,codeIndented:d(k),codeText:d(z),codeTextData:B,data:B,definition:d(),definitionDestinationString:I,definitionLabelString:A,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(K),hardBreakTrailing:d(K),htmlFlow:d(L),htmlFlowData:B,htmlText:d($),htmlTextData:B,image:d(oe),label:ie,labelText:U,lineEnding:X,link:d(J),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ye,resourceDestinationString:C,resourceTitleString:D,resource:Y,setextHeading:d(q),setextHeadingLineSequence:Z,setextHeadingText:M,strong:d(),thematicBreak:d()}};Fv(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Q){let he={type:"root",children:[]};const Oe={stack:[he],tokenStack:[],config:t,enter:u,exit:h,buffer:l,resume:p,data:n},je=[];let Xe=-1;for(;++Xe<Q.length;)if(Q[Xe][1].type==="listOrdered"||Q[Xe][1].type==="listUnordered")if(Q[Xe][0]==="enter")je.push(Xe);else{const zt=je.pop();Xe=o(Q,zt,Xe)}for(Xe=-1;++Xe<Q.length;){const zt=t[Q[Xe][0]];Bv.call(zt,Q[Xe][1].type)&&zt[Q[Xe][1].type].call(Object.assign({sliceSerialize:Q[Xe][2].sliceSerialize},Oe),Q[Xe][1])}if(Oe.tokenStack.length>0){const zt=Oe.tokenStack[Oe.tokenStack.length-1];(zt[1]||pg).call(Oe,void 0,zt[0])}for(he.position={start:Sr(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Sr(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)he=t.transforms[Xe](he)||he;return he}function o(Q,he,Oe){let je=he-1,Xe=-1,zt=!1,ai,En,li,Bi;for(;++je<=Oe;){const Ut=Q[je];switch(Ut[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ut[0]==="enter"?Xe++:Xe--,Bi=void 0;break}case"lineEndingBlank":{Ut[0]==="enter"&&(ai&&!Bi&&!Xe&&!li&&(li=je),Bi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bi=void 0}if(!Xe&&Ut[0]==="enter"&&Ut[1].type==="listItemPrefix"||Xe===-1&&Ut[0]==="exit"&&(Ut[1].type==="listUnordered"||Ut[1].type==="listOrdered")){if(ai){let Vn=je;for(En=void 0;Vn--;){const rn=Q[Vn];if(rn[1].type==="lineEnding"||rn[1].type==="lineEndingBlank"){if(rn[0]==="exit")continue;En&&(Q[En][1].type="lineEndingBlank",zt=!0),rn[1].type="lineEnding",En=Vn}else if(!(rn[1].type==="linePrefix"||rn[1].type==="blockQuotePrefix"||rn[1].type==="blockQuotePrefixWhitespace"||rn[1].type==="blockQuoteMarker"||rn[1].type==="listItemIndent"))break}li&&(!En||li<En)&&(ai._spread=!0),ai.end=Object.assign({},En?Q[En][1].start:Ut[1].end),Q.splice(En||je,0,["exit",ai,Ut[2]]),je++,Oe++}if(Ut[1].type==="listItemPrefix"){const Vn={type:"listItem",_spread:!1,start:Object.assign({},Ut[1].start),end:void 0};ai=Vn,Q.splice(je,0,["enter",Vn,Ut[2]]),je++,Oe++,li=void 0,Bi=!0}}}return Q[he][1]._spread=zt,Oe}function a(Q,he){return Oe;function Oe(je){u.call(this,Q(je),je),he&&he.call(this,je)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(Q,he,Oe){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([he,Oe||void 0]),Q.position={start:Sr(he.start),end:void 0}}function d(Q){return he;function he(Oe){Q&&Q.call(this,Oe),h.call(this,Oe)}}function h(Q,he){const Oe=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==Q.type&&(he?he.call(this,Q,je[0]):(je[1]||pg).call(this,Q,je[0]));else throw new Error("Cannot close `"+Q.type+"` ("+Jo({start:Q.start,end:Q.end})+"): it’s not open");Oe.position.end=Sr(Q.end)}function p(){return Xd(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v(Q){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.lang=Q}function w(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.meta=Q}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q.replace(/(\r?\n|\r)$/g,"")}function A(Q){const he=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=he,Oe.identifier=_i(this.sliceSerialize(Q)).toLowerCase()}function R(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.title=Q}function I(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.url=Q}function G(Q){const he=this.stack[this.stack.length-1];if(!he.depth){const Oe=this.sliceSerialize(Q).length;he.depth=Oe}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function Z(Q){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function H(Q){const Oe=this.stack[this.stack.length-1].children;let je=Oe[Oe.length-1];(!je||je.type!=="text")&&(je=qn(),je.position={start:Sr(Q.start),end:void 0},Oe.push(je)),this.stack.push(je)}function B(Q){const he=this.stack.pop();he.value+=this.sliceSerialize(Q),he.position.end=Sr(Q.end)}function X(Q){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=he.children[he.children.length-1];Oe.position.end=Sr(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(he.type)&&(H.call(this,Q),B.call(this,Q))}function K(){this.data.atHardBreak=!0}function L(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q}function $(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q}function z(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q}function J(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=he,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function oe(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=he,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function U(Q){const he=this.sliceSerialize(Q),Oe=this.stack[this.stack.length-2];Oe.label=Rx(he),Oe.identifier=_i(he).toLowerCase()}function ie(){const Q=this.stack[this.stack.length-1],he=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const je=Q.children;Oe.children=je}else Oe.alt=he}function C(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.url=Q}function D(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.title=Q}function Y(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ye(Q){const he=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=he,Oe.identifier=_i(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function Ne(Q){this.data.characterReferenceType=Q.type}function _e(Q){const he=this.sliceSerialize(Q),Oe=this.data.characterReferenceType;let je;Oe?(je=Nv(he,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=Zd(he);const Xe=this.stack[this.stack.length-1];Xe.value+=je}function Ue(Q){const he=this.stack.pop();he.position.end=Sr(Q.end)}function Ie(Q){B.call(this,Q);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(Q)}function He(Q){B.call(this,Q);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(Q)}function nt(){return{type:"blockquote",children:[]}}function Ft(){return{type:"code",lang:null,meta:null,value:""}}function nn(){return{type:"inlineCode",value:""}}function $e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Dn(){return{type:"emphasis",children:[]}}function Pi(){return{type:"heading",depth:0,children:[]}}function Qe(){return{type:"break"}}function Pn(){return{type:"html",value:""}}function Kn(){return{type:"image",title:null,url:"",alt:null}}function vi(){return{type:"link",title:null,url:"",children:[]}}function oi(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function yi(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Rr(){return{type:"paragraph",children:[]}}function Ar(){return{type:"strong",children:[]}}function qn(){return{type:"text",value:""}}function Mr(){return{type:"thematicBreak"}}}function Sr(e){return{line:e.line,column:e.column,offset:e.offset}}function Fv(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Fv(e,r):Lx(e,r)}}function Lx(e,t){let n;for(n in t)if(Bv.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 pg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Jo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is still open")}function Ix(e){const t=this;t.parser=n;function n(r){return Mx(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Dx(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 Px(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
45
|
-
`}]}function
|
|
46
|
-
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function
|
|
44
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(a)}o=a===-2,r.push(l)}return r.join("")}function E1(e){const r={constructs:Cv([S1,...(e||{}).extensions||[]]),content:o(U0),defined:[],document:o($0),flow:o(o1),lazy:{},string:o(c1),text:o(u1)};return r;function o(a){return l;function l(u){return w1(r,a,u)}}}function C1(e){for(;!Mv(e););return e}const fg=/[\0\t\n\r]/g;function N1(){let e=1,t="",n=!0,r;return o;function o(a,l,u){const d=[];let h,p,m,v,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(fg.lastIndex=m,h=fg.exec(a),v=h&&h.index!==void 0?h.index:a.length,y=a.charCodeAt(v),!h){t=a.slice(m);break}if(y===10&&m===v&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<v&&(d.push(a.slice(m,v)),e+=v-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=v+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const T1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function R1(e){return e.replace(T1,A1)}function A1(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return Nv(n.slice(a?2:1),a?16:10)}return Zd(n)||e}const Bv={}.hasOwnProperty;function M1(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),O1(n)(C1(E1(n).document().write(N1()(e,t,!0))))}function O1(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(vi),autolinkProtocol:H,autolinkEmail:H,atxHeading:a(Pi),blockQuote:a(nt),characterEscape:H,characterReference:H,codeFenced:a(Ft),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Ft,l),codeText:a(nn,l),codeTextData:H,data:H,codeFlowValue:H,definition:a($e),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Dn),hardBreakEscape:a(Qe),hardBreakTrailing:a(Qe),htmlFlow:a(Pn,l),htmlFlowData:H,htmlText:a(Pn,l),htmlTextData:H,image:a(Kn),label:l,link:a(vi),listItem:a(yi),listItemValue:v,listOrdered:a(oi,m),listUnordered:a(oi),paragraph:a(Rr),reference:N,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Pi),strong:a(Ar),thematicBreak:a(Mr)},exit:{atxHeading:d(),atxHeadingSequence:G,autolink:d(),autolinkEmail:He,autolinkProtocol:Ie,blockQuote:d(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:_e,characterReference:Ue,codeFenced:d(E),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:B,codeIndented:d(k),codeText:d(z),codeTextData:B,data:B,definition:d(),definitionDestinationString:I,definitionLabelString:A,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(K),hardBreakTrailing:d(K),htmlFlow:d(L),htmlFlowData:B,htmlText:d($),htmlTextData:B,image:d(oe),label:ie,labelText:U,lineEnding:X,link:d(J),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ye,resourceDestinationString:C,resourceTitleString:D,resource:Y,setextHeading:d(q),setextHeadingLineSequence:Z,setextHeadingText:M,strong:d(),thematicBreak:d()}};Fv(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Q){let he={type:"root",children:[]};const Oe={stack:[he],tokenStack:[],config:t,enter:u,exit:h,buffer:l,resume:p,data:n},je=[];let Xe=-1;for(;++Xe<Q.length;)if(Q[Xe][1].type==="listOrdered"||Q[Xe][1].type==="listUnordered")if(Q[Xe][0]==="enter")je.push(Xe);else{const zt=je.pop();Xe=o(Q,zt,Xe)}for(Xe=-1;++Xe<Q.length;){const zt=t[Q[Xe][0]];Bv.call(zt,Q[Xe][1].type)&&zt[Q[Xe][1].type].call(Object.assign({sliceSerialize:Q[Xe][2].sliceSerialize},Oe),Q[Xe][1])}if(Oe.tokenStack.length>0){const zt=Oe.tokenStack[Oe.tokenStack.length-1];(zt[1]||pg).call(Oe,void 0,zt[0])}for(he.position={start:Sr(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Sr(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)he=t.transforms[Xe](he)||he;return he}function o(Q,he,Oe){let je=he-1,Xe=-1,zt=!1,ai,En,li,Bi;for(;++je<=Oe;){const Ut=Q[je];switch(Ut[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ut[0]==="enter"?Xe++:Xe--,Bi=void 0;break}case"lineEndingBlank":{Ut[0]==="enter"&&(ai&&!Bi&&!Xe&&!li&&(li=je),Bi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bi=void 0}if(!Xe&&Ut[0]==="enter"&&Ut[1].type==="listItemPrefix"||Xe===-1&&Ut[0]==="exit"&&(Ut[1].type==="listUnordered"||Ut[1].type==="listOrdered")){if(ai){let Vn=je;for(En=void 0;Vn--;){const rn=Q[Vn];if(rn[1].type==="lineEnding"||rn[1].type==="lineEndingBlank"){if(rn[0]==="exit")continue;En&&(Q[En][1].type="lineEndingBlank",zt=!0),rn[1].type="lineEnding",En=Vn}else if(!(rn[1].type==="linePrefix"||rn[1].type==="blockQuotePrefix"||rn[1].type==="blockQuotePrefixWhitespace"||rn[1].type==="blockQuoteMarker"||rn[1].type==="listItemIndent"))break}li&&(!En||li<En)&&(ai._spread=!0),ai.end=Object.assign({},En?Q[En][1].start:Ut[1].end),Q.splice(En||je,0,["exit",ai,Ut[2]]),je++,Oe++}if(Ut[1].type==="listItemPrefix"){const Vn={type:"listItem",_spread:!1,start:Object.assign({},Ut[1].start),end:void 0};ai=Vn,Q.splice(je,0,["enter",Vn,Ut[2]]),je++,Oe++,li=void 0,Bi=!0}}}return Q[he][1]._spread=zt,Oe}function a(Q,he){return Oe;function Oe(je){u.call(this,Q(je),je),he&&he.call(this,je)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(Q,he,Oe){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([he,Oe||void 0]),Q.position={start:Sr(he.start),end:void 0}}function d(Q){return he;function he(Oe){Q&&Q.call(this,Oe),h.call(this,Oe)}}function h(Q,he){const Oe=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==Q.type&&(he?he.call(this,Q,je[0]):(je[1]||pg).call(this,Q,je[0]));else throw new Error("Cannot close `"+Q.type+"` ("+Jo({start:Q.start,end:Q.end})+"): it’s not open");Oe.position.end=Sr(Q.end)}function p(){return Xd(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v(Q){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.lang=Q}function w(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.meta=Q}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q.replace(/(\r?\n|\r)$/g,"")}function A(Q){const he=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=he,Oe.identifier=_i(this.sliceSerialize(Q)).toLowerCase()}function R(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.title=Q}function I(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.url=Q}function G(Q){const he=this.stack[this.stack.length-1];if(!he.depth){const Oe=this.sliceSerialize(Q).length;he.depth=Oe}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function Z(Q){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function H(Q){const Oe=this.stack[this.stack.length-1].children;let je=Oe[Oe.length-1];(!je||je.type!=="text")&&(je=qn(),je.position={start:Sr(Q.start),end:void 0},Oe.push(je)),this.stack.push(je)}function B(Q){const he=this.stack.pop();he.value+=this.sliceSerialize(Q),he.position.end=Sr(Q.end)}function X(Q){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=he.children[he.children.length-1];Oe.position.end=Sr(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(he.type)&&(H.call(this,Q),B.call(this,Q))}function K(){this.data.atHardBreak=!0}function L(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q}function $(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q}function z(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.value=Q}function J(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=he,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function oe(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=he,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function U(Q){const he=this.sliceSerialize(Q),Oe=this.stack[this.stack.length-2];Oe.label=R1(he),Oe.identifier=_i(he).toLowerCase()}function ie(){const Q=this.stack[this.stack.length-1],he=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const je=Q.children;Oe.children=je}else Oe.alt=he}function C(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.url=Q}function D(){const Q=this.resume(),he=this.stack[this.stack.length-1];he.title=Q}function Y(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ye(Q){const he=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=he,Oe.identifier=_i(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function Ne(Q){this.data.characterReferenceType=Q.type}function _e(Q){const he=this.sliceSerialize(Q),Oe=this.data.characterReferenceType;let je;Oe?(je=Nv(he,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=Zd(he);const Xe=this.stack[this.stack.length-1];Xe.value+=je}function Ue(Q){const he=this.stack.pop();he.position.end=Sr(Q.end)}function Ie(Q){B.call(this,Q);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(Q)}function He(Q){B.call(this,Q);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(Q)}function nt(){return{type:"blockquote",children:[]}}function Ft(){return{type:"code",lang:null,meta:null,value:""}}function nn(){return{type:"inlineCode",value:""}}function $e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Dn(){return{type:"emphasis",children:[]}}function Pi(){return{type:"heading",depth:0,children:[]}}function Qe(){return{type:"break"}}function Pn(){return{type:"html",value:""}}function Kn(){return{type:"image",title:null,url:"",alt:null}}function vi(){return{type:"link",title:null,url:"",children:[]}}function oi(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function yi(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Rr(){return{type:"paragraph",children:[]}}function Ar(){return{type:"strong",children:[]}}function qn(){return{type:"text",value:""}}function Mr(){return{type:"thematicBreak"}}}function Sr(e){return{line:e.line,column:e.column,offset:e.offset}}function Fv(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Fv(e,r):L1(e,r)}}function L1(e,t){let n;for(n in t)if(Bv.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 pg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Jo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is still open")}function I1(e){const t=this;t.parser=n;function n(r){return M1(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function D1(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 P1(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
45
|
+
`}]}function B1(e,t){const n=t.value?t.value+`
|
|
46
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function F1(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function z1(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function U1(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Ys(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function H1(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 $1(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function zv(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 o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function j1(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zv(e,t);const o={src:Ys(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function W1(e,t){const n={src:Ys(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 K1(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 q1(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zv(e,t);const o={href:Ys(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function V1(e,t){const n={href:Ys(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 G1(e,t,n){const r=e.all(t),o=n?Y1(n):Uv(t),a={},l=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const p=r[u];(o||u!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
|
|
47
47
|
`}),p.type==="element"&&p.tagName==="p"&&!o?l.push(...p.children):l.push(p)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
48
|
-
`});const h={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,h),e.applyData(t,h)}function
|
|
48
|
+
`});const h={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,h),e.applyData(t,h)}function Y1(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=Uv(n[r])}return t}function Uv(e){const t=e.spread;return t??e.children.length>1}function X1(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Z1(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Q1(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function J1(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ek(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=qd(t.children[1]),d=yv(t.children[t.children.length-1]);u&&d&&(l.position={start:u,end:d}),o.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function tk(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<u;){const m=t.children[d],v={},y=l?l[d]:void 0;y&&(v.align=y);let w={type:"element",tagName:a,properties:v,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(m,w)),h.push(w)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function nk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const mg=9,gg=32;function ik(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(_g(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(_g(t.slice(o),o>0,!1)),a.join("")}function _g(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===mg||a===gg;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===mg||a===gg;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function rk(e,t){const n={type:"text",value:ik(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ok={blockquote:D1,break:P1,code:B1,delete:F1,emphasis:z1,footnoteReference:U1,heading:H1,html:$1,imageReference:j1,image:W1,inlineCode:K1,linkReference:q1,link:V1,listItem:G1,list:X1,paragraph:Z1,root:Q1,strong:J1,table:ek,tableCell:nk,tableRow:tk,text:rk,thematicBreak:sk,toml:El,yaml:El,definition:El,footnoteDefinition:El};function El(){}const Hv=-1,fc=0,ta=1,Xl=2,Jd=3,ef=4,tf=5,nf=6,$v=7,jv=8,Wv=typeof self=="object"?self:globalThis,vg=(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 Wv[e](t)},ak=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,l]=t[o];switch(a){case fc:case Hv:return n(l,o);case ta:{const u=n([],o);for(const d of l)u.push(r(d));return u}case Xl:{const u=n({},o);for(const[d,h]of l)u[r(d)]=r(h);return u}case Jd:return n(new Date(l),o);case ef:{const{source:u,flags:d}=l;return n(new RegExp(u,d),o)}case tf:{const u=n(new Map,o);for(const[d,h]of l)u.set(r(d),r(h));return u}case nf:{const u=n(new Set,o);for(const d of l)u.add(r(d));return u}case $v:{const{name:u,message:d}=l;return n(typeof Wv[u]=="function"?vg(u,d):new Error(d),o)}case jv:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(vg(a,l),o)};return r},yg=e=>ak(new Map,e)(0),Qr="",{toString:lk}={},{keys:ck}=Object,Fo=e=>{const t=typeof e;if(t!=="object"||!e)return[fc,t];const n=lk.call(e).slice(8,-1);switch(n){case"Array":return[ta,Qr];case"Object":return[Xl,Qr];case"Date":return[Jd,Qr];case"RegExp":return[ef,Qr];case"Map":return[tf,Qr];case"Set":return[nf,Qr];case"DataView":return[ta,n]}return n.includes("Array")?[ta,n]:e instanceof Error?[$v,e.name||"Error"]:[Xl,n]},Cl=([e,t])=>e===fc&&(t==="function"||t==="symbol"),uk=(e,t,n,r)=>{const o=(l,u)=>{const d=r.push(l)-1;return n.set(u,d),d},a=l=>{if(n.has(l))return n.get(l);let[u,d]=Fo(l);switch(u){case fc:{let p=l;switch(d){case"bigint":u=jv,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([Hv],l)}return o([u,p],l)}case ta:{if(d){let v=l;return d==="DataView"?v=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(l)),o([d,[...v]],l)}const p=[],m=o([u,p],l);for(const v of l)p.push(a(v));return m}case Xl:{if(d)switch(d){case"BigInt":return o([d,l.toString()],l);case"Boolean":case"Number":case"String":return o([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const p=[],m=o([u,p],l);for(const v of ck(l))(e||!Cl(Fo(l[v])))&&p.push([a(v),a(l[v])]);return m}case Jd:return o([u,isNaN(l.getTime())?Qr:l.toISOString()],l);case ef:{const{source:p,flags:m}=l;return o([u,{source:p,flags:m}],l)}case tf:{const p=[],m=o([u,p],l);for(const[v,y]of l)(e||!(Cl(Fo(v))||Cl(Fo(y))))&&p.push([a(v),a(y)]);return m}case nf:{const p=[],m=o([u,p],l);for(const v of l)(e||!Cl(Fo(v)))&&p.push(a(v));return m}}const{message:h}=l;return o([u,{name:d,message:h}],l)};return a},bg=(e,{json:t,lossy:n}={})=>{const r=[];return uk(!(t||n),!!t,new Map,r)(e),r},Zl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?yg(bg(e,t)):structuredClone(e):(e,t)=>yg(bg(e,t));function hk(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 dk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function fk(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||hk,r=e.options.footnoteBackLabel||dk,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),m=String(h.identifier).toUpperCase(),v=Ys(m.toLowerCase());let y=0;const w=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){w.length>0&&w.push({type:"text",value:" "});let A=typeof n=="string"?n:n(d,y);typeof A=="string"&&(A={type:"text",value:A}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const E=p[p.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const A=E.children[E.children.length-1];A&&A.type==="text"?A.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...w)}else p.push(...w);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(p,!0)};e.patch(h,k),u.push(k)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Zl(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
49
49
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
50
50
|
`}]}}const ua=(function(e){if(e==null)return _k;if(typeof e=="function")return pc(e);if(typeof e=="object")return Array.isArray(e)?pk(e):mk(e);if(typeof e=="string")return gk(e);throw new Error("Expected function, string, or object as test")});function pk(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ua(e[n]);return pc(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function mk(e){const t=e;return pc(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function gk(e){return pc(t);function t(n){return n&&n.type===e}}function pc(e){return t;function t(n,r,o){return!!(vk(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function _k(){return!0}function vk(e){return e!==null&&typeof e=="object"&&"type"in e}const Kv=[],yk=!0,Xh=!1,bk="skip";function qv(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=ua(o),l=r?-1:1;u(e,void 0,[])();function u(d,h,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return v;function v(){let y=Kv,w,S,E;if((!t||a(d,h,p[p.length-1]||void 0))&&(y=Sk(n(d,p)),y[0]===Xh))return y;if("children"in d&&d.children){const k=d;if(k.children&&y[0]!==bk)for(S=(r?k.children.length:-1)+l,E=p.concat(k);S>-1&&S<k.children.length;){const A=k.children[S];if(w=u(A,S,E)(),w[0]===Xh)return w;S=typeof w[1]=="number"?w[1]:S+l}}return y}}}function Sk(e){return Array.isArray(e)?e:typeof e=="number"?[yk,e]:e==null?Kv:[e]}function mc(e,t,n,r){let o,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,o=n):(a=t,l=n,o=r),qv(e,a,u,o);function u(d,h){const p=h[h.length-1],m=p?p.children.indexOf(d):void 0;return l(d,m,p)}}const Zh={}.hasOwnProperty,wk={};function xk(e,t){const n=t||wk,r=new Map,o=new Map,a=new Map,l={...ok,...n.handlers},u={all:h,applyData:Ek,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:kk,wrap:Nk};return mc(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:o,v=String(p.identifier).toUpperCase();m.has(v)||m.set(v,p)}}),u;function d(p,m){const v=p.type,y=u.handlers[v];if(Zh.call(u.handlers,v)&&y)return y(u,p,m);if(u.options.passThrough&&u.options.passThrough.includes(v)){if("children"in p){const{children:S,...E}=p,k=Zl(E);return k.children=u.all(p),k}return Zl(p)}return(u.options.unknownHandler||Ck)(u,p,m)}function h(p){const m=[];if("children"in p){const v=p.children;let y=-1;for(;++y<v.length;){const w=u.one(v[y],p);if(w){if(y&&v[y-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=Sg(w.value)),!Array.isArray(w)&&w.type==="element")){const S=w.children[0];S&&S.type==="text"&&(S.value=Sg(S.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function kk(e,t){e.position&&(t.position=d0(e))}function Ek(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,Zl(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Ck(e,t){const n=t.data||{},r="value"in t&&!(Zh.call(n,"hProperties")||Zh.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 Nk(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
51
51
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
52
52
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
53
53
|
`}),n}function Sg(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function wg(e,t){const n=xk(e,t),r=n.one(e,void 0),o=fk(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
54
|
-
`},o),a}function Tk(e,t){return e&&"run"in e?async function(n,r){const o=wg(n,{file:r,...t});await e.run(o,r)}:function(n,r){return wg(n,{file:r,...e||t})}}function xg(e){if(e)throw e}var hh,kg;function Rk(){if(kg)return hh;kg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},u=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return hh=function d(){var h,p,m,v,y,w,S=arguments[0],E=1,k=arguments.length,A=!1;for(typeof S=="boolean"&&(A=S,S=arguments[1]||{},E=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});E<k;++E)if(h=arguments[E],h!=null)for(p in h)m=u(S,p),v=u(h,p),S!==v&&(A&&v&&(a(v)||(y=o(v)))?(y?(y=!1,w=m&&o(m)?m:[]):w=m&&a(m)?m:{},l(S,{name:p,newValue:d(A,w,v)})):typeof v<"u"&&l(S,{name:p,newValue:v}));return S},hh}var Ak=Rk();const dh=ac(Ak);function Qh(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 Mk(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...o);function u(d,...h){const p=e[++a];let m=-1;if(d){l(d);return}for(;++m<o.length;)(h[m]===null||h[m]===void 0)&&(h[m]=o[m]);o=h,p?Ok(p,u)(...h):l(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Ok(e,t){let n;return r;function r(...l){const u=e.length>l.length;let d;u&&l.push(o);try{d=e.apply(this,l)}catch(h){const p=h;if(u&&n)throw p;return o(p)}u||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(l,...u){n||(n=!0,t(l,...u))}function a(l){o(null,l)}}const Mi={basename:Lk,dirname:Ik,extname:Dk,join:Pk,sep:"/"};function Lk(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ha(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else l<0&&(a=!0,l=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(r=o):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Ik(e){if(ha(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 Dk(e){ha(e);let t=e.length,n=-1,r=0,o=-1,a=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function Pk(...e){let t=-1,n;for(;++t<e.length;)ha(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Bk(n)}function Bk(e){ha(e);const t=e.codePointAt(0)===47;let n=Fk(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Fk(e,t){let n="",r=0,o=-1,a=0,l=-1,u,d;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(o===l-1||a===1))if(o!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=l,a=0;continue}}else if(n.length>0){n="",r=0,o=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,a=0}else u===46&&a>-1?a++:a=-1}return n}function ha(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const zk={cwd:Uk};function Uk(){return"/"}function Jh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Hk(e){if(typeof e=="string")e=new URL(e);else if(!Jh(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 $k(e)}function $k(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const fh=["history","path","basename","stem","extname","dirname"];class Vv{constructor(t){let n;t?Jh(t)?n={path:t}:typeof t=="string"||jk(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":zk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<fh.length;){const a=fh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)fh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Mi.basename(this.path):void 0}set basename(t){mh(t,"basename"),ph(t,"basename"),this.path=Mi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Mi.dirname(this.path):void 0}set dirname(t){Eg(this.basename,"dirname"),this.path=Mi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Mi.extname(this.path):void 0}set extname(t){if(ph(t,"extname"),Eg(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=Mi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Jh(t)&&(t=Hk(t)),mh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Mi.basename(this.path,this.extname):void 0}set stem(t){mh(t,"stem"),ph(t,"stem"),this.path=Mi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new mn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ph(e,t){if(e&&e.includes(Mi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Mi.sep+"`")}function mh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Eg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function jk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wk=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Kk={}.hasOwnProperty;class rf extends Wk{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=Mk()}copy(){const t=new rf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(dh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(vh("data",this.frozen),this.namespace[t]=n,this):Kk.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vh("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Nl(t),r=this.parser||this.Parser;return gh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gh("process",this.parser||this.Parser),_h("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,l){const u=Nl(t),d=r.parse(u);r.run(d,u,function(p,m,v){if(p||!m||!v)return h(p);const y=m,w=r.stringify(y,v);Gk(w)?v.value=w:v.result=w,h(p,v)});function h(p,m){p||!m?l(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),gh("processSync",this.parser||this.Parser),_h("processSync",this.compiler||this.Compiler),this.process(t,o),Ng("processSync","process",n),r;function o(a,l){n=!0,xg(a),r=l}}run(t,n,r){Cg(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,u){const d=Nl(n);o.run(t,d,h);function h(p,m,v){const y=m||t;p?u(p):l?l(y):r(void 0,y,v)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),Ng("runSync","run",r),o;function a(l,u){xg(l),o=u,r=!0}}stringify(t,n){this.freeze();const r=Nl(n),o=this.compiler||this.Compiler;return _h("stringify",o),Cg(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(vh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;d(p,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(h.plugins),h.settings&&(o.settings=dh(!0,o.settings,h.settings))}function u(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let m=-1,v=-1;for(;++m<r.length;)if(r[m][0]===h){v=m;break}if(v===-1)r.push([h,...p]);else if(p.length>0){let[y,...w]=p;const S=r[v][1];Qh(S)&&Qh(y)&&(y=dh(!0,S,y)),r[v]=[h,y,...w]}}}}const qk=new rf().freeze();function gh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function _h(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vh(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 Cg(e){if(!Qh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ng(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Nl(e){return Vk(e)?e:new Vv(e)}function Vk(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Gk(e){return typeof e=="string"||Yk(e)}function Yk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xk="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Tg=[],Rg={allowDangerousHtml:!0},Zk=/^(https?|ircs?|mailto|xmpp)$/i,Qk=[{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 Jk(e){const t=eE(e),n=tE(e);return nE(t.runSync(t.parse(n),n),e)}function eE(e){const t=e.rehypePlugins||Tg,n=e.remarkPlugins||Tg,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Rg}:Rg;return qk().use(Ix).use(n).use(Tk,r).use(t)}function tE(e){const t=e.children||"",n=new Vv;return typeof t=="string"&&(n.value=t),n}function nE(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||iE;for(const p of Qk)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+Xk+p.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),mc(e,h),_0(e,{Fragment:b.Fragment,components:o,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function h(p,m,v){if(p.type==="raw"&&v&&typeof m=="number")return l?v.children.splice(m,1):v.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in lh)if(Object.hasOwn(lh,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],S=lh[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(w||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,v)),y&&v&&typeof m=="number")return u&&p.children?v.children.splice(m,1,...p.children):v.children.splice(m,1),m}}}function iE(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||Zk.test(e.slice(0,t))?e:""}function Ag(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function rE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function sE(e,t,n){const o=ua((n||{}).ignore||[]),a=oE(t);let l=-1;for(;++l<a.length;)qv(e,"text",u);function u(h,p){let m=-1,v;for(;++m<p.length;){const y=p[m],w=v?v.children:void 0;if(o(y,w?w.indexOf(y):void 0,v))return;v=y}if(v)return d(h,p)}function d(h,p){const m=p[p.length-1],v=a[l][0],y=a[l][1];let w=0;const E=m.children.indexOf(h);let k=!1,A=[];v.lastIndex=0;let R=v.exec(h.value);for(;R;){const I=R.index,G={index:R.index,input:R.input,stack:[...p,h]};let M=y(...R,G);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?v.lastIndex=I+1:(w!==I&&A.push({type:"text",value:h.value.slice(w,I)}),Array.isArray(M)?A.push(...M):M&&A.push(M),w=I+R[0].length,k=!0),!v.global)break;R=v.exec(h.value)}return k?(w<h.value.length&&A.push({type:"text",value:h.value.slice(w)}),m.children.splice(E,1,...A)):A=[h],E+A.length}}function oE(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 o=n[r];t.push([aE(o[0]),lE(o[1])])}return t}function aE(e){return typeof e=="string"?new RegExp(rE(e),"g"):e}function lE(e){return typeof e=="function"?e:function(){return e}}const yh="phrasing",bh=["autolink","link","image","label"];function cE(){return{transforms:[gE],enter:{literalAutolink:hE,literalAutolinkEmail:Sh,literalAutolinkHttp:Sh,literalAutolinkWww:Sh},exit:{literalAutolink:mE,literalAutolinkEmail:pE,literalAutolinkHttp:dE,literalAutolinkWww:fE}}}function uE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yh,notInConstruct:bh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yh,notInConstruct:bh},{character:":",before:"[ps]",after:"\\/",inConstruct:yh,notInConstruct:bh}]}}function hE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sh(e){this.config.enter.autolinkProtocol.call(this,e)}function dE(e){this.config.exit.autolinkProtocol.call(this,e)}function fE(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 pE(e){this.config.exit.autolinkEmail.call(this,e)}function mE(e){this.exit(e)}function gE(e){sE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,_E],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),vE]],{ignore:["link","linkReference"]})}function _E(e,t,n,r,o){let a="";if(!Gv(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!yE(n)))return!1;const l=bE(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function vE(e,t,n,r){return!Gv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function yE(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 bE(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 o=Ag(e,"(");let a=Ag(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Gv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||os(n)||hc(n))&&(!t||n!==47)}Yv.peek=RE;function SE(){this.buffer()}function wE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function xE(){this.buffer()}function kE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function EE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function CE(e){this.exit(e)}function NE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function TE(e){this.exit(e)}function RE(){return"["}function Yv(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),l(),a+=o.move("]"),a}function AE(){return{enter:{gfmFootnoteCallString:SE,gfmFootnoteCall:wE,gfmFootnoteDefinitionLabelString:xE,gfmFootnoteDefinition:kE},exit:{gfmFootnoteCallString:EE,gfmFootnoteCall:CE,gfmFootnoteDefinitionLabelString:NE,gfmFootnoteDefinition:TE}}}function ME(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Yv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,l){const u=a.createTracker(l);let d=u.move("[^");const h=a.enter("footnoteDefinition"),p=a.enter("label");return d+=u.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
|
|
54
|
+
`},o),a}function Tk(e,t){return e&&"run"in e?async function(n,r){const o=wg(n,{file:r,...t});await e.run(o,r)}:function(n,r){return wg(n,{file:r,...e||t})}}function xg(e){if(e)throw e}var hh,kg;function Rk(){if(kg)return hh;kg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},u=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return hh=function d(){var h,p,m,v,y,w,S=arguments[0],E=1,k=arguments.length,A=!1;for(typeof S=="boolean"&&(A=S,S=arguments[1]||{},E=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});E<k;++E)if(h=arguments[E],h!=null)for(p in h)m=u(S,p),v=u(h,p),S!==v&&(A&&v&&(a(v)||(y=o(v)))?(y?(y=!1,w=m&&o(m)?m:[]):w=m&&a(m)?m:{},l(S,{name:p,newValue:d(A,w,v)})):typeof v<"u"&&l(S,{name:p,newValue:v}));return S},hh}var Ak=Rk();const dh=ac(Ak);function Qh(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 Mk(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...o);function u(d,...h){const p=e[++a];let m=-1;if(d){l(d);return}for(;++m<o.length;)(h[m]===null||h[m]===void 0)&&(h[m]=o[m]);o=h,p?Ok(p,u)(...h):l(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Ok(e,t){let n;return r;function r(...l){const u=e.length>l.length;let d;u&&l.push(o);try{d=e.apply(this,l)}catch(h){const p=h;if(u&&n)throw p;return o(p)}u||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(l,...u){n||(n=!0,t(l,...u))}function a(l){o(null,l)}}const Mi={basename:Lk,dirname:Ik,extname:Dk,join:Pk,sep:"/"};function Lk(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ha(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else l<0&&(a=!0,l=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(r=o):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Ik(e){if(ha(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 Dk(e){ha(e);let t=e.length,n=-1,r=0,o=-1,a=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function Pk(...e){let t=-1,n;for(;++t<e.length;)ha(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Bk(n)}function Bk(e){ha(e);const t=e.codePointAt(0)===47;let n=Fk(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Fk(e,t){let n="",r=0,o=-1,a=0,l=-1,u,d;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(o===l-1||a===1))if(o!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=l,a=0;continue}}else if(n.length>0){n="",r=0,o=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,a=0}else u===46&&a>-1?a++:a=-1}return n}function ha(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const zk={cwd:Uk};function Uk(){return"/"}function Jh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Hk(e){if(typeof e=="string")e=new URL(e);else if(!Jh(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 $k(e)}function $k(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 o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const fh=["history","path","basename","stem","extname","dirname"];class Vv{constructor(t){let n;t?Jh(t)?n={path:t}:typeof t=="string"||jk(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":zk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<fh.length;){const a=fh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)fh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Mi.basename(this.path):void 0}set basename(t){mh(t,"basename"),ph(t,"basename"),this.path=Mi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Mi.dirname(this.path):void 0}set dirname(t){Eg(this.basename,"dirname"),this.path=Mi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Mi.extname(this.path):void 0}set extname(t){if(ph(t,"extname"),Eg(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=Mi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Jh(t)&&(t=Hk(t)),mh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Mi.basename(this.path,this.extname):void 0}set stem(t){mh(t,"stem"),ph(t,"stem"),this.path=Mi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new mn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ph(e,t){if(e&&e.includes(Mi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Mi.sep+"`")}function mh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Eg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function jk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wk=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Kk={}.hasOwnProperty;class rf extends Wk{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=Mk()}copy(){const t=new rf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(dh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(vh("data",this.frozen),this.namespace[t]=n,this):Kk.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vh("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 o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Nl(t),r=this.parser||this.Parser;return gh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gh("process",this.parser||this.Parser),_h("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,l){const u=Nl(t),d=r.parse(u);r.run(d,u,function(p,m,v){if(p||!m||!v)return h(p);const y=m,w=r.stringify(y,v);Gk(w)?v.value=w:v.result=w,h(p,v)});function h(p,m){p||!m?l(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),gh("processSync",this.parser||this.Parser),_h("processSync",this.compiler||this.Compiler),this.process(t,o),Ng("processSync","process",n),r;function o(a,l){n=!0,xg(a),r=l}}run(t,n,r){Cg(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,u){const d=Nl(n);o.run(t,d,h);function h(p,m,v){const y=m||t;p?u(p):l?l(y):r(void 0,y,v)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),Ng("runSync","run",r),o;function a(l,u){xg(l),o=u,r=!0}}stringify(t,n){this.freeze();const r=Nl(n),o=this.compiler||this.Compiler;return _h("stringify",o),Cg(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(vh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;d(p,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(h.plugins),h.settings&&(o.settings=dh(!0,o.settings,h.settings))}function u(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let m=-1,v=-1;for(;++m<r.length;)if(r[m][0]===h){v=m;break}if(v===-1)r.push([h,...p]);else if(p.length>0){let[y,...w]=p;const S=r[v][1];Qh(S)&&Qh(y)&&(y=dh(!0,S,y)),r[v]=[h,y,...w]}}}}const qk=new rf().freeze();function gh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function _h(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vh(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 Cg(e){if(!Qh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ng(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Nl(e){return Vk(e)?e:new Vv(e)}function Vk(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Gk(e){return typeof e=="string"||Yk(e)}function Yk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xk="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Tg=[],Rg={allowDangerousHtml:!0},Zk=/^(https?|ircs?|mailto|xmpp)$/i,Qk=[{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 Jk(e){const t=eE(e),n=tE(e);return nE(t.runSync(t.parse(n),n),e)}function eE(e){const t=e.rehypePlugins||Tg,n=e.remarkPlugins||Tg,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Rg}:Rg;return qk().use(I1).use(n).use(Tk,r).use(t)}function tE(e){const t=e.children||"",n=new Vv;return typeof t=="string"&&(n.value=t),n}function nE(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||iE;for(const p of Qk)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+Xk+p.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),mc(e,h),_0(e,{Fragment:b.Fragment,components:o,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function h(p,m,v){if(p.type==="raw"&&v&&typeof m=="number")return l?v.children.splice(m,1):v.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in lh)if(Object.hasOwn(lh,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],S=lh[y];(S===null||S.includes(p.tagName))&&(p.properties[y]=d(String(w||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,v)),y&&v&&typeof m=="number")return u&&p.children?v.children.splice(m,1,...p.children):v.children.splice(m,1),m}}}function iE(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||Zk.test(e.slice(0,t))?e:""}function Ag(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function rE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function sE(e,t,n){const o=ua((n||{}).ignore||[]),a=oE(t);let l=-1;for(;++l<a.length;)qv(e,"text",u);function u(h,p){let m=-1,v;for(;++m<p.length;){const y=p[m],w=v?v.children:void 0;if(o(y,w?w.indexOf(y):void 0,v))return;v=y}if(v)return d(h,p)}function d(h,p){const m=p[p.length-1],v=a[l][0],y=a[l][1];let w=0;const E=m.children.indexOf(h);let k=!1,A=[];v.lastIndex=0;let R=v.exec(h.value);for(;R;){const I=R.index,G={index:R.index,input:R.input,stack:[...p,h]};let M=y(...R,G);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?v.lastIndex=I+1:(w!==I&&A.push({type:"text",value:h.value.slice(w,I)}),Array.isArray(M)?A.push(...M):M&&A.push(M),w=I+R[0].length,k=!0),!v.global)break;R=v.exec(h.value)}return k?(w<h.value.length&&A.push({type:"text",value:h.value.slice(w)}),m.children.splice(E,1,...A)):A=[h],E+A.length}}function oE(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 o=n[r];t.push([aE(o[0]),lE(o[1])])}return t}function aE(e){return typeof e=="string"?new RegExp(rE(e),"g"):e}function lE(e){return typeof e=="function"?e:function(){return e}}const yh="phrasing",bh=["autolink","link","image","label"];function cE(){return{transforms:[gE],enter:{literalAutolink:hE,literalAutolinkEmail:Sh,literalAutolinkHttp:Sh,literalAutolinkWww:Sh},exit:{literalAutolink:mE,literalAutolinkEmail:pE,literalAutolinkHttp:dE,literalAutolinkWww:fE}}}function uE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yh,notInConstruct:bh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yh,notInConstruct:bh},{character:":",before:"[ps]",after:"\\/",inConstruct:yh,notInConstruct:bh}]}}function hE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sh(e){this.config.enter.autolinkProtocol.call(this,e)}function dE(e){this.config.exit.autolinkProtocol.call(this,e)}function fE(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 pE(e){this.config.exit.autolinkEmail.call(this,e)}function mE(e){this.exit(e)}function gE(e){sE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,_E],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),vE]],{ignore:["link","linkReference"]})}function _E(e,t,n,r,o){let a="";if(!Gv(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!yE(n)))return!1;const l=bE(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function vE(e,t,n,r){return!Gv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function yE(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 bE(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 o=Ag(e,"(");let a=Ag(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Gv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||os(n)||hc(n))&&(!t||n!==47)}Yv.peek=RE;function SE(){this.buffer()}function wE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function xE(){this.buffer()}function kE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function EE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function CE(e){this.exit(e)}function NE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function TE(e){this.exit(e)}function RE(){return"["}function Yv(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),l(),a+=o.move("]"),a}function AE(){return{enter:{gfmFootnoteCallString:SE,gfmFootnoteCall:wE,gfmFootnoteDefinitionLabelString:xE,gfmFootnoteDefinition:kE},exit:{gfmFootnoteCallString:EE,gfmFootnoteCall:CE,gfmFootnoteDefinitionLabelString:NE,gfmFootnoteDefinition:TE}}}function ME(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Yv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,l){const u=a.createTracker(l);let d=u.move("[^");const h=a.enter("footnoteDefinition"),p=a.enter("label");return d+=u.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
|
|
55
55
|
`:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Xv:OE))),h(),d}}function OE(e,t,n){return t===0?e:Xv(e,t,n)}function Xv(e,t,n){return(n?"":" ")+e}const LE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Zv.peek=FE;function IE(){return{canContainEols:["delete"],enter:{strikethrough:PE},exit:{strikethrough:BE}}}function DE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:LE}],handlers:{delete:Zv}}}function PE(e){this.enter({type:"delete",children:[]},e)}function BE(e){this.exit(e)}function Zv(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let l=o.move("~~");return l+=n.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),a(),l}function FE(){return"~"}function zE(e){return e.length}function UE(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||zE,a=[],l=[],u=[],d=[];let h=0,p=-1;for(;++p<e.length;){const S=[],E=[];let k=-1;for(e[p].length>h&&(h=e[p].length);++k<e[p].length;){const A=HE(e[p][k]);if(n.alignDelimiters!==!1){const R=o(A);E[k]=R,(d[k]===void 0||R>d[k])&&(d[k]=R)}S.push(A)}l[p]=S,u[p]=E}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<h;)a[m]=Mg(r[m]);else{const S=Mg(r);for(;++m<h;)a[m]=S}m=-1;const v=[],y=[];for(;++m<h;){const S=a[m];let E="",k="";S===99?(E=":",k=":"):S===108?E=":":S===114&&(k=":");let A=n.alignDelimiters===!1?1:Math.max(1,d[m]-E.length-k.length);const R=E+"-".repeat(A)+k;n.alignDelimiters!==!1&&(A=E.length+A+k.length,A>d[m]&&(d[m]=A),y[m]=A),v[m]=R}l.splice(1,0,v),u.splice(1,0,y),p=-1;const w=[];for(;++p<l.length;){const S=l[p],E=u[p];m=-1;const k=[];for(;++m<h;){const A=S[m]||"";let R="",I="";if(n.alignDelimiters!==!1){const G=d[m]-(E[m]||0),M=a[m];M===114?R=" ".repeat(G):M===99?G%2?(R=" ".repeat(G/2+.5),I=" ".repeat(G/2-.5)):(R=" ".repeat(G/2),I=R):I=" ".repeat(G)}n.delimiterStart!==!1&&!m&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||m)&&k.push(" "),n.alignDelimiters!==!1&&k.push(R),k.push(A),n.alignDelimiters!==!1&&k.push(I),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||m!==h-1)&&k.push("|")}w.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return w.join(`
|
|
56
56
|
`)}function HE(e){return e==null?"":String(e)}function Mg(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 $E(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),jE);return o(),l}function jE(e,t,n){return">"+(n?"":" ")+e}function WE(e,t){return Og(e,t.inConstruct,!0)&&!Og(e,t.notInConstruct,!1)}function Og(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 Lg(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
57
57
|
`&&WE(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
@@ -112,6 +112,6 @@ WARNING: This link could potentially be dangerous`)){let n=window.open();if(n){t
|
|
|
112
112
|
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
113
113
|
* http://bellard.org/jslinux/
|
|
114
114
|
* Copyright (c) 2011 Fabrice Bellard
|
|
115
|
-
*/var DM=2,PM=1,BM=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var m;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((m=this._terminal.options.overviewRuler)==null?void 0:m.width)||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue("height")),o=Math.max(0,parseInt(n.getPropertyValue("width"))),a=window.getComputedStyle(this._terminal.element),l={top:parseInt(a.getPropertyValue("padding-top")),bottom:parseInt(a.getPropertyValue("padding-bottom")),right:parseInt(a.getPropertyValue("padding-right")),left:parseInt(a.getPropertyValue("padding-left"))},u=l.top+l.bottom,d=l.right+l.left,h=r-u,p=o-d-t;return{cols:Math.max(DM,Math.floor(p/e.css.cell.width)),rows:Math.max(PM,Math.floor(h/e.css.cell.height))}}};const FM={background:"#0b0d12",foreground:"#e6e8ef",cursor:"#8b5cf6",cursorAccent:"#0b0d12",selectionBackground:"rgba(139, 92, 246, 0.35)",black:"#1a1d26",red:"#f87171",green:"#34d399",yellow:"#fbbf24",blue:"#60a5fa",magenta:"#c084fc",cyan:"#22d3ee",white:"#e6e8ef",brightBlack:"#6b7284",brightRed:"#f87171",brightGreen:"#34d399",brightYellow:"#fbbf24",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#ffffff"};function zM({terminalId:e,command:t,cwd:n,active:r,send:o,register:a}){const l=ee.useRef(null),u=ee.useRef(null);return ee.useEffect(()=>{const d=l.current;if(!d)return;const h=new IM({theme:FM,fontFamily:'"SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace',fontSize:13,cursorBlink:!0,scrollback:8e3}),p=new BM;h.loadAddon(p),h.open(d),u.current={term:h,fit:p},r&&h.focus();const m=a(e,{write:E=>h.write(E),dispose:()=>h.dispose()}),v=()=>{try{p.fit(),o({type:"terminal_resize",terminalId:e,cols:h.cols,rows:h.rows})}catch{}},y=requestAnimationFrame(()=>{try{p.fit()}catch{}o(t?{type:"run_command",terminalId:e,command:t,cols:h.cols,rows:h.rows}:{type:"terminal_create",terminalId:e,cwd:n,cols:h.cols,rows:h.rows})}),w=h.onData(E=>{o({type:"terminal_input",terminalId:e,data:E})});let S=null;return typeof ResizeObserver<"u"&&(S=new ResizeObserver(()=>{d.offsetWidth>0&&d.offsetHeight>0&&v()}),S.observe(d)),()=>{cancelAnimationFrame(y),w.dispose(),S==null||S.disconnect(),m(),o({type:"terminal_kill",terminalId:e}),h.dispose(),u.current=null}},[e,t,o,a]),ee.useEffect(()=>{if(!r)return;const d=requestAnimationFrame(()=>{const h=u.current;if(h){try{h.fit.fit(),o({type:"terminal_resize",terminalId:e,cols:h.term.cols,rows:h.term.rows})}catch{}h.term.focus()}});return()=>cancelAnimationFrame(d)},[r]),b.jsx("div",{ref:l,className:`term-xterm ${r?"":"hidden"}`})}const G_={name:"",command:"",cwd:"${pwd}"};function UM({chat:e,send:t,terminal:n}){const r=en(),[o,a]=ee.useState(null),[l,u]=ee.useState(!1),[d,h]=ee.useState(null),[p,m]=ee.useState(G_),[v,y]=ee.useState(null),w=ee.useRef(null);ee.useEffect(()=>{e.terminals.length===0?a(null):e.terminals.some(H=>H.id===o)||a(e.terminals[e.terminals.length-1].id)},[e.terminals,o]),ee.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]);const S=H=>{if(!e.ready)return;const B=crypto.randomUUID();n.create({...H,id:B,running:!0,exitCode:null}),a(B)},E=()=>{var H;return S({title:r("terminalTitle",{n:e.terminals.length+1}),cwd:((H=e.state)==null?void 0:H.cwd)??""})},k=H=>{var K;const B=H.name||H.command,X=e.terminals.find(L=>L.title===B);if(X){n.restart(X.id),a(X.id),t({type:"run_command",terminalId:X.id,command:H,cols:80,rows:24});return}S({title:B,cwd:((K=e.state)==null?void 0:K.cwd)??"",command:H})},A=H=>{if(n.close(H),o===H){const B=e.terminals.filter(X=>X.id!==H);a(B.length>0?B[B.length-1].id:null)}},R=()=>{u(!0),h(null),m(G_)},I=H=>{const B=e.commands[H];B&&(u(!1),h(H),m({name:B.name,command:B.command,cwd:B.cwd??""}))},G=()=>{u(!1),h(null)},M=()=>{const H=p.name.trim(),B=p.command.trim();if(!H||!B)return;const X=p.cwd.trim(),K={name:H,command:B,cwd:X||void 0},L=l?[...e.commands,K]:d!==null?e.commands.map(($,z)=>z===d?K:$):e.commands;t({type:"save_commands",commands:L}),G()},Z=H=>{if(v===H){const B=e.commands.filter((X,K)=>K!==H);t({type:"save_commands",commands:B}),y(null),w.current&&clearTimeout(w.current)}else y(H),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>y(null),2500)},q=l||d!==null;return b.jsxs("div",{className:"terminal-view",children:[b.jsxs("aside",{className:"term-side term-commands",children:[b.jsxs("div",{className:"panel-header",children:[b.jsx("span",{className:"panel-title",children:r("commands")}),b.jsxs("div",{className:"panel-header-actions",children:[b.jsx("button",{type:"button",className:"panel-refresh",title:r("rerun"),onClick:()=>t({type:"list_commands"}),children:b.jsx($d,{})}),b.jsx("button",{type:"button",className:"panel-new",title:r("newCommand"),onClick:R,children:b.jsx(ss,{})})]})]}),b.jsx("div",{className:"panel-body",children:q?b.jsxs("div",{className:"cmd-form",children:[b.jsx("label",{htmlFor:"cmd-name",children:r("name")}),b.jsx("input",{id:"cmd-name",className:"cmd-input",value:p.name,placeholder:r("exampleName"),autoFocus:!0,onChange:H=>m({...p,name:H.target.value})}),b.jsx("label",{htmlFor:"cmd-command",children:r("command")}),b.jsx("input",{id:"cmd-command",className:"cmd-input",value:p.command,placeholder:r("exampleCommand"),onChange:H=>m({...p,command:H.target.value}),onKeyDown:H=>{H.key==="Enter"&&!H.nativeEvent.isComposing&&M()}}),b.jsxs("label",{htmlFor:"cmd-cwd",children:[r("directory")," ",b.jsx("span",{className:"cmd-hint",children:r("cwdHint")})]}),b.jsx("input",{id:"cmd-cwd",className:"cmd-input",value:p.cwd,placeholder:"${pwd}",onChange:H=>m({...p,cwd:H.target.value}),onKeyDown:H=>{H.key==="Enter"&&!H.nativeEvent.isComposing&&M()}}),b.jsxs("div",{className:"cmd-form-actions",children:[b.jsx("button",{type:"button",className:"btn",onClick:G,children:r("cancel")}),b.jsx("button",{type:"button",className:"btn primary",disabled:!p.name.trim()||!p.command.trim(),onClick:M,children:r("save")})]})]}):b.jsxs(b.Fragment,{children:[e.commands.length===0&&b.jsx("div",{className:"panel-empty",children:r("noCommands")}),e.commands.map((H,B)=>b.jsxs("div",{className:"cmd-item",children:[b.jsx("button",{type:"button",className:"cmd-run",title:r("clickToRun"),onClick:()=>k(H),children:b.jsx(Ew,{})}),b.jsxs("button",{type:"button",className:"cmd-main",title:r("clickToRun"),onClick:()=>k(H),children:[b.jsx("span",{className:"cmd-name",children:H.name}),b.jsx("span",{className:"cmd-command",children:H.command}),H.cwd&&b.jsx("span",{className:"cmd-cwd",children:H.cwd})]}),b.jsx("button",{type:"button",className:"cmd-act",title:r("edit"),onClick:()=>I(B),children:b.jsx(ov,{})}),b.jsx("button",{type:"button",className:`cmd-act del ${v===B?"confirm":""}`,title:r("delete"),onClick:()=>Z(B),children:v===B?r("confirmQ"):b.jsx(Hh,{})})]},B))]})}),b.jsxs("div",{className:"panel-footer",children:[b.jsxs("div",{className:"cmd-file",title:e.commandsPath,children:[b.jsx(Tw,{className:"cmd-file-icon"}),b.jsx("span",{className:"cmd-file-path",children:e.commandsPath||".pi/commands.json"})]}),b.jsx("div",{className:"cmd-file-hint",children:r("commandsFileHint")})]})]}),b.jsx("div",{className:"term-main",children:e.terminals.length===0?b.jsxs("div",{className:"term-empty",children:[b.jsx(Hd,{className:"term-empty-icon"}),b.jsx("div",{className:"term-empty-title",children:r("builtinTerminal")}),b.jsx("div",{className:"term-empty-sub",children:r("termEmptySub")})]}):e.terminals.map(H=>b.jsx(zM,{terminalId:H.id,command:H.command,cwd:H.cwd,active:H.id===o,send:t,register:n.register},H.id))}),b.jsxs("aside",{className:"term-side term-tabs",children:[b.jsxs("div",{className:"panel-header",children:[b.jsx("span",{className:"panel-title",children:r("terminal")}),b.jsx("button",{type:"button",className:"panel-new",title:r("newTerminal"),onClick:E,children:b.jsx(ss,{})})]}),b.jsxs("div",{className:"panel-body",children:[e.terminals.length===0&&b.jsx("div",{className:"panel-empty",children:r("noTerminal")}),e.terminals.map(H=>b.jsxs("div",{className:`term-tab ${H.id===o?"active":""}`,children:[b.jsxs("button",{type:"button",className:"term-tab-main",title:`${H.cwd}${H.command?`
|
|
115
|
+
*/var DM=2,PM=1,BM=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var m;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((m=this._terminal.options.overviewRuler)==null?void 0:m.width)||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue("height")),o=Math.max(0,parseInt(n.getPropertyValue("width"))),a=window.getComputedStyle(this._terminal.element),l={top:parseInt(a.getPropertyValue("padding-top")),bottom:parseInt(a.getPropertyValue("padding-bottom")),right:parseInt(a.getPropertyValue("padding-right")),left:parseInt(a.getPropertyValue("padding-left"))},u=l.top+l.bottom,d=l.right+l.left,h=r-u,p=o-d-t;return{cols:Math.max(DM,Math.floor(p/e.css.cell.width)),rows:Math.max(PM,Math.floor(h/e.css.cell.height))}}};const FM={background:"#0b0d12",foreground:"#e6e8ef",cursor:"#8b5cf6",cursorAccent:"#0b0d12",selectionBackground:"rgba(139, 92, 246, 0.35)",black:"#1a1d26",red:"#f87171",green:"#34d399",yellow:"#fbbf24",blue:"#60a5fa",magenta:"#c084fc",cyan:"#22d3ee",white:"#e6e8ef",brightBlack:"#6b7284",brightRed:"#f87171",brightGreen:"#34d399",brightYellow:"#fbbf24",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#ffffff"};function zM({terminalId:e,command:t,cwd:n,active:r,send:o,register:a}){const l=ee.useRef(null),u=ee.useRef(null);return ee.useEffect(()=>{const d=l.current;if(!d)return;const h=new IM({theme:FM,fontFamily:'"SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace',fontSize:13,cursorBlink:!0,scrollback:8e3}),p=new BM;h.loadAddon(p),h.open(d),u.current={term:h,fit:p},r&&h.focus(),h.attachCustomKeyEventHandler(E=>{var A;if(E.type!=="keydown")return!0;const k=(A=E.key)==null?void 0:A.toLowerCase();if((E.ctrlKey||E.metaKey)&&k==="v")return!1;if(E.ctrlKey&&!E.shiftKey&&!E.altKey&&k==="c"&&h.hasSelection()){const R=h.textarea;return R&&(R.value=h.getSelection(),R.select()),!1}return!0});const m=a(e,{write:E=>h.write(E),dispose:()=>h.dispose()}),v=()=>{try{p.fit(),o({type:"terminal_resize",terminalId:e,cols:h.cols,rows:h.rows})}catch{}},y=requestAnimationFrame(()=>{try{p.fit()}catch{}o(t?{type:"run_command",terminalId:e,command:t,cols:h.cols,rows:h.rows}:{type:"terminal_create",terminalId:e,cwd:n,cols:h.cols,rows:h.rows})}),w=h.onData(E=>{o({type:"terminal_input",terminalId:e,data:E})});let S=null;return typeof ResizeObserver<"u"&&(S=new ResizeObserver(()=>{d.offsetWidth>0&&d.offsetHeight>0&&v()}),S.observe(d)),()=>{cancelAnimationFrame(y),w.dispose(),S==null||S.disconnect(),m(),o({type:"terminal_kill",terminalId:e}),h.dispose(),u.current=null}},[e,t,o,a]),ee.useEffect(()=>{if(!r)return;const d=requestAnimationFrame(()=>{const h=u.current;if(h){try{h.fit.fit(),o({type:"terminal_resize",terminalId:e,cols:h.term.cols,rows:h.term.rows})}catch{}h.term.focus()}});return()=>cancelAnimationFrame(d)},[r]),b.jsx("div",{ref:l,className:`term-xterm ${r?"":"hidden"}`})}const G_={name:"",command:"",cwd:"${pwd}"};function UM({chat:e,send:t,terminal:n}){const r=en(),[o,a]=ee.useState(null),[l,u]=ee.useState(!1),[d,h]=ee.useState(null),[p,m]=ee.useState(G_),[v,y]=ee.useState(null),w=ee.useRef(null);ee.useEffect(()=>{e.terminals.length===0?a(null):e.terminals.some(H=>H.id===o)||a(e.terminals[e.terminals.length-1].id)},[e.terminals,o]),ee.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]);const S=H=>{if(!e.ready)return;const B=crypto.randomUUID();n.create({...H,id:B,running:!0,exitCode:null}),a(B)},E=()=>{var H;return S({title:r("terminalTitle",{n:e.terminals.length+1}),cwd:((H=e.state)==null?void 0:H.cwd)??""})},k=H=>{var K;const B=H.name||H.command,X=e.terminals.find(L=>L.title===B);if(X){n.restart(X.id),a(X.id),t({type:"run_command",terminalId:X.id,command:H,cols:80,rows:24});return}S({title:B,cwd:((K=e.state)==null?void 0:K.cwd)??"",command:H})},A=H=>{if(n.close(H),o===H){const B=e.terminals.filter(X=>X.id!==H);a(B.length>0?B[B.length-1].id:null)}},R=()=>{u(!0),h(null),m(G_)},I=H=>{const B=e.commands[H];B&&(u(!1),h(H),m({name:B.name,command:B.command,cwd:B.cwd??""}))},G=()=>{u(!1),h(null)},M=()=>{const H=p.name.trim(),B=p.command.trim();if(!H||!B)return;const X=p.cwd.trim(),K={name:H,command:B,cwd:X||void 0},L=l?[...e.commands,K]:d!==null?e.commands.map(($,z)=>z===d?K:$):e.commands;t({type:"save_commands",commands:L}),G()},Z=H=>{if(v===H){const B=e.commands.filter((X,K)=>K!==H);t({type:"save_commands",commands:B}),y(null),w.current&&clearTimeout(w.current)}else y(H),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>y(null),2500)},q=l||d!==null;return b.jsxs("div",{className:"terminal-view",children:[b.jsxs("aside",{className:"term-side term-commands",children:[b.jsxs("div",{className:"panel-header",children:[b.jsx("span",{className:"panel-title",children:r("commands")}),b.jsxs("div",{className:"panel-header-actions",children:[b.jsx("button",{type:"button",className:"panel-refresh",title:r("rerun"),onClick:()=>t({type:"list_commands"}),children:b.jsx($d,{})}),b.jsx("button",{type:"button",className:"panel-new",title:r("newCommand"),onClick:R,children:b.jsx(ss,{})})]})]}),b.jsx("div",{className:"panel-body",children:q?b.jsxs("div",{className:"cmd-form",children:[b.jsx("label",{htmlFor:"cmd-name",children:r("name")}),b.jsx("input",{id:"cmd-name",className:"cmd-input",value:p.name,placeholder:r("exampleName"),autoFocus:!0,onChange:H=>m({...p,name:H.target.value})}),b.jsx("label",{htmlFor:"cmd-command",children:r("command")}),b.jsx("input",{id:"cmd-command",className:"cmd-input",value:p.command,placeholder:r("exampleCommand"),onChange:H=>m({...p,command:H.target.value}),onKeyDown:H=>{H.key==="Enter"&&!H.nativeEvent.isComposing&&M()}}),b.jsxs("label",{htmlFor:"cmd-cwd",children:[r("directory")," ",b.jsx("span",{className:"cmd-hint",children:r("cwdHint")})]}),b.jsx("input",{id:"cmd-cwd",className:"cmd-input",value:p.cwd,placeholder:"${pwd}",onChange:H=>m({...p,cwd:H.target.value}),onKeyDown:H=>{H.key==="Enter"&&!H.nativeEvent.isComposing&&M()}}),b.jsxs("div",{className:"cmd-form-actions",children:[b.jsx("button",{type:"button",className:"btn",onClick:G,children:r("cancel")}),b.jsx("button",{type:"button",className:"btn primary",disabled:!p.name.trim()||!p.command.trim(),onClick:M,children:r("save")})]})]}):b.jsxs(b.Fragment,{children:[e.commands.length===0&&b.jsx("div",{className:"panel-empty",children:r("noCommands")}),e.commands.map((H,B)=>b.jsxs("div",{className:"cmd-item",children:[b.jsx("button",{type:"button",className:"cmd-run",title:r("clickToRun"),onClick:()=>k(H),children:b.jsx(Ew,{})}),b.jsxs("button",{type:"button",className:"cmd-main",title:r("clickToRun"),onClick:()=>k(H),children:[b.jsx("span",{className:"cmd-name",children:H.name}),b.jsx("span",{className:"cmd-command",children:H.command}),H.cwd&&b.jsx("span",{className:"cmd-cwd",children:H.cwd})]}),b.jsx("button",{type:"button",className:"cmd-act",title:r("edit"),onClick:()=>I(B),children:b.jsx(ov,{})}),b.jsx("button",{type:"button",className:`cmd-act del ${v===B?"confirm":""}`,title:r("delete"),onClick:()=>Z(B),children:v===B?r("confirmQ"):b.jsx(Hh,{})})]},B))]})}),b.jsxs("div",{className:"panel-footer",children:[b.jsxs("div",{className:"cmd-file",title:e.commandsPath,children:[b.jsx(Tw,{className:"cmd-file-icon"}),b.jsx("span",{className:"cmd-file-path",children:e.commandsPath||".pi/commands.json"})]}),b.jsx("div",{className:"cmd-file-hint",children:r("commandsFileHint")})]})]}),b.jsx("div",{className:"term-main",children:e.terminals.length===0?b.jsxs("div",{className:"term-empty",children:[b.jsx(Hd,{className:"term-empty-icon"}),b.jsx("div",{className:"term-empty-title",children:r("builtinTerminal")}),b.jsx("div",{className:"term-empty-sub",children:r("termEmptySub")})]}):e.terminals.map(H=>b.jsx(zM,{terminalId:H.id,command:H.command,cwd:H.cwd,active:H.id===o,send:t,register:n.register},H.id))}),b.jsxs("aside",{className:"term-side term-tabs",children:[b.jsxs("div",{className:"panel-header",children:[b.jsx("span",{className:"panel-title",children:r("terminal")}),b.jsx("button",{type:"button",className:"panel-new",title:r("newTerminal"),onClick:E,children:b.jsx(ss,{})})]}),b.jsxs("div",{className:"panel-body",children:[e.terminals.length===0&&b.jsx("div",{className:"panel-empty",children:r("noTerminal")}),e.terminals.map(H=>b.jsxs("div",{className:`term-tab ${H.id===o?"active":""}`,children:[b.jsxs("button",{type:"button",className:"term-tab-main",title:`${H.cwd}${H.command?`
|
|
116
116
|
> ${H.command.command}`:""}`,onClick:()=>a(H.id),children:[b.jsx("span",{className:`term-tab-dot ${H.running?"run":"exit"}`}),b.jsxs("span",{className:"term-tab-title",children:[H.title,!H.running&&b.jsx("span",{className:"term-tab-exit",children:r("exited",{code:H.exitCode===null?"":` ${H.exitCode}`})})]})]}),b.jsx("button",{type:"button",className:"term-tab-close",title:r("closeTerminal"),onClick:()=>A(H.id),children:b.jsx(lc,{})})]},H.id))]})]})]})}function HM({send:e,piConfigured:t,providers:n,installResult:r,onClose:o}){const a=en(),[l,u]=ee.useState(!1),[d,h]=ee.useState(""),[p,m]=ee.useState(""),[v,y]=ee.useState(!1);ee.useEffect(()=>{e({type:"list_providers"})},[e]),ee.useEffect(()=>{t&&o()},[t,o]),ee.useEffect(()=>{r&&u(!1)},[r]),ee.useEffect(()=>{var R;!d&&n.length>0&&h(((R=n.find(I=>!I.configured))==null?void 0:R.id)??n[0].id)},[n,d]);const w=()=>{l||(u(!0),e({type:"install_pi_agent"}))},S=()=>{!p.trim()||v||(y(!0),e({type:"set_provider_api_key",provider:d.trim(),apiKey:p.trim()}),setTimeout(()=>y(!1),3e3))},E=()=>{e({type:"get_state"}),e({type:"list_providers"})},k=n.find(R=>R.id===d),A=r!==null&&!r.ok;return b.jsx("div",{className:"modal-backdrop",children:b.jsxs("div",{className:"modal setup-modal",children:[b.jsx("button",{type:"button",className:"modal-close","aria-label":a("close"),onClick:o,children:b.jsx(lc,{})}),b.jsxs("div",{className:"modal-head",children:[b.jsx(jd,{className:"modal-head-icon"}),b.jsx("h2",{children:a("setupTitle")})]}),b.jsx("p",{className:"modal-desc",children:a("setupDesc")}),A?b.jsxs("div",{className:"setup-failed",children:[b.jsx("div",{className:"setup-done",children:a("installFailed")}),b.jsx("pre",{className:"setup-detail",children:r.detail}),b.jsxs("div",{className:"setup-actions",children:[b.jsx("button",{type:"button",className:"btn primary",disabled:l,onClick:w,children:a("retryInstall")}),b.jsx("button",{type:"button",className:"btn",onClick:o,children:a("skip")})]})]}):r!=null&&r.ok?b.jsxs("div",{className:"setup-key-form",children:[b.jsx("div",{className:"setup-done",children:a("installDone")}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:a("provider")}),b.jsxs("select",{value:d,onChange:R=>h(R.target.value),children:[n.length===0&&b.jsx("option",{value:"",children:a("loading")}),n.map(R=>b.jsxs("option",{value:R.id,children:[R.name,"(",R.id,")",R.configured?` · ${a("configured")}`:""]},R.id))]}),(k==null?void 0:k.configured)&&b.jsx("div",{className:"field-hint",children:a("providerKeyReady")})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:a("apiKey")}),b.jsx("input",{type:"password",value:p,onChange:R=>m(R.target.value),placeholder:"sk-…"})]}),b.jsxs("div",{className:"setup-actions",children:[b.jsx("button",{type:"button",className:"btn primary",disabled:!p.trim()||v||!d,onClick:S,children:a(v?"saving":"saveAndStart")}),b.jsxs("button",{type:"button",className:"btn",onClick:E,children:[b.jsx($d,{})," ",a("recheck")]})]})]}):b.jsxs("div",{className:"setup-actions",children:[b.jsx("button",{type:"button",className:"btn primary",disabled:l,onClick:w,children:a(l?"installing":"autoInstall")}),b.jsx("button",{type:"button",className:"btn",onClick:o,children:a("skip")})]})]})})}const $M=["openai-completions","openai-responses","anthropic-messages","google-generative-ai"],bf=()=>({id:"",name:"",reasoning:!1,input:"text",contextWindow:"",maxTokens:""}),jM=()=>({providerId:"",name:"",api:"openai-completions",baseUrl:"",apiKey:"",authHeader:!0,models:[bf()]});function WM(e){return{providerId:e.providerId,name:e.name??"",api:e.api??"openai-completions",baseUrl:e.baseUrl??"",apiKey:e.apiKey??"",authHeader:e.authHeader??!1,models:(e.models.length?e.models:[bf()]).map(t=>{var n;return{id:t.id,name:t.name??"",reasoning:t.reasoning??!1,input:(n=t.input)!=null&&n.includes("image")?"text-image":"text",contextWindow:t.contextWindow?String(t.contextWindow):"",maxTokens:t.maxTokens?String(t.maxTokens):""}})}}function KM({send:e,providers:t,providerStatus:n,onClose:r}){const o=en(),[a,l]=ee.useState(null),[u,d]=ee.useState({}),[h,p]=ee.useState(null);ee.useEffect(()=>{e({type:"list_models_config"}),e({type:"list_providers"})},[e]);const m=S=>{const E=(u[S.id]??"").trim();!E||h||(p(S.id),e({type:"set_provider_api_key",provider:S.id,apiKey:E}),setTimeout(()=>{p(null),d(k=>({...k,[S.id]:""})),e({type:"list_providers"})},1500))},v=()=>{if(!a)return;const S=a.providerId.trim(),E=a.models.filter(A=>A.id.trim()).map(A=>({id:A.id.trim(),name:A.name.trim()||void 0,reasoning:A.reasoning||void 0,input:A.input==="text-image"?["text","image"]:void 0,contextWindow:A.contextWindow?Number(A.contextWindow):void 0,maxTokens:A.maxTokens?Number(A.maxTokens):void 0})),k={providerId:S,name:a.name.trim()||void 0,api:a.api.trim()||void 0,baseUrl:a.baseUrl.trim()||void 0,apiKey:a.apiKey.trim()||void 0,authHeader:a.authHeader||void 0,models:E};e({type:"save_model_config",providerId:S,config:k}),r()},y=S=>{window.confirm(o("deleteProviderConfirm",{id:S.providerId,n:S.models.length}))&&e({type:"delete_model_config",providerId:S.providerId})},w=(S,E)=>{a&&l({...a,models:a.models.map((k,A)=>A===S?{...k,...E}:k)})};return b.jsx("div",{className:"modal-backdrop",children:b.jsxs("div",{className:"modal model-modal",children:[b.jsx("button",{type:"button",className:"modal-close","aria-label":o("close"),onClick:r,children:b.jsx(lc,{})}),b.jsx("div",{className:"modal-head",children:b.jsx("h2",{children:o(a?"editProvider":"manageModelsTitle")})}),a?b.jsxs("div",{className:"provider-form",children:[b.jsxs("div",{className:"form-grid",children:[b.jsxs("label",{className:"field",children:[b.jsxs("span",{className:"field-label",children:[o("providerId")," ",b.jsx("em",{children:o("providerIdHint")})]}),b.jsx("input",{type:"text",value:a.providerId,disabled:t.some(S=>S.providerId===a.providerId),onChange:S=>l({...a,providerId:S.target.value}),placeholder:"my-proxy"})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:o("displayName")}),b.jsx("input",{type:"text",value:a.name,onChange:S=>l({...a,name:S.target.value}),placeholder:o("displayNamePh")})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:o("apiType")}),b.jsx("select",{value:a.api,onChange:S=>l({...a,api:S.target.value}),children:$M.map(S=>b.jsx("option",{value:S,children:S},S))})]}),b.jsxs("label",{className:"field",children:[b.jsxs("span",{className:"field-label",children:["baseUrl ",b.jsx("em",{children:o("baseUrlHint")})]}),b.jsx("input",{type:"text",value:a.baseUrl,onChange:S=>l({...a,baseUrl:S.target.value}),placeholder:"http://localhost:11434/v1"})]}),b.jsxs("label",{className:"field",children:[b.jsx("span",{className:"field-label",children:o("apiKey")}),b.jsx("input",{type:"password",value:a.apiKey,onChange:S=>l({...a,apiKey:S.target.value}),placeholder:o("apiKeyHint")})]}),b.jsxs("label",{className:"field check",children:[b.jsx("input",{type:"checkbox",checked:a.authHeader,onChange:S=>l({...a,authHeader:S.target.checked})}),b.jsx("span",{children:o("authHeader")})]})]}),b.jsx("div",{className:"form-section-title",children:o("modelsTitle")}),a.models.map((S,E)=>b.jsxs("div",{className:"model-row",children:[b.jsx("input",{type:"text",value:S.id,onChange:k=>w(E,{id:k.target.value}),placeholder:o("modelIdReq")}),b.jsx("input",{type:"text",value:S.name,onChange:k=>w(E,{name:k.target.value}),placeholder:o("displayName")}),b.jsxs("select",{value:S.input,onChange:k=>w(E,{input:k.target.value}),children:[b.jsx("option",{value:"text",children:o("text")}),b.jsx("option",{value:"text-image",children:o("textImage")})]}),b.jsxs("label",{className:"check",children:[b.jsx("input",{type:"checkbox",checked:S.reasoning,onChange:k=>w(E,{reasoning:k.target.checked})}),b.jsx("span",{children:o("reasoning")})]}),b.jsx("input",{type:"number",value:S.contextWindow,onChange:k=>w(E,{contextWindow:k.target.value}),placeholder:o("contextWindow"),title:"contextWindow"}),b.jsx("input",{type:"number",value:S.maxTokens,onChange:k=>w(E,{maxTokens:k.target.value}),placeholder:o("maxOutput"),title:"maxTokens"}),b.jsx("button",{type:"button",className:"iconbtn danger",title:o("removeModel"),onClick:()=>l({...a,models:a.models.filter((k,A)=>A!==E)}),children:b.jsx(Hh,{})})]},E)),b.jsxs("button",{type:"button",className:"btn",onClick:()=>l({...a,models:[...a.models,bf()]}),children:[b.jsx(ss,{})," ",o("addModel")]}),b.jsxs("div",{className:"modal-actions",children:[b.jsx("button",{type:"button",className:"btn",onClick:()=>l(null),children:o("cancel")}),b.jsx("button",{type:"button",className:"btn primary",disabled:!a.providerId.trim()||!a.models.some(S=>S.id.trim()),onClick:v,children:o("save")})]})]}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"form-section-title",children:[o("builtinProviders")," ",b.jsx("em",{className:"section-hint",children:o("hintKeyOnly")})]}),b.jsxs("div",{className:"provider-list",children:[n.length===0&&b.jsx("div",{className:"dd-loading",children:o("loading")}),n.map(S=>b.jsxs("div",{className:"provider-row",children:[b.jsxs("div",{className:"provider-info",children:[b.jsx("span",{className:"provider-name",children:S.name}),b.jsxs("span",{className:"provider-sub",children:[S.id,S.configured&&b.jsx("span",{className:"auth-badge",children:o("configuredBadge")}),S.source&&!S.configured&&b.jsx("span",{className:"auth-badge dim",children:S.source})]})]}),b.jsx("div",{className:"provider-actions",children:S.configured?b.jsx("span",{className:"auth-badge",children:o("keyReady")}):b.jsxs(b.Fragment,{children:[b.jsx("input",{type:"password",className:"key-input",placeholder:o("pasteKey"),value:u[S.id]??"",onChange:E=>d(k=>({...k,[S.id]:E.target.value}))}),b.jsxs("button",{type:"button",className:"btn primary sm",disabled:!(u[S.id]??"").trim()||h===S.id,onClick:()=>m(S),children:[b.jsx(Cw,{})," ",h===S.id?o("savingKey"):o("saveKey")]})]})})]},S.id))]}),b.jsx("div",{className:"form-section-title",children:o("customProviders")}),b.jsx("p",{className:"modal-desc",children:o("customDesc")}),t.length===0&&b.jsx("div",{className:"dd-loading",children:o("noCustomProviders")}),b.jsx("div",{className:"provider-list",children:t.map(S=>b.jsxs("div",{className:"provider-row",children:[b.jsxs("div",{className:"provider-info",children:[b.jsx("span",{className:"provider-name",children:S.providerId}),b.jsxs("span",{className:"provider-sub",children:[S.api??"—",S.baseUrl?` · ${S.baseUrl}`:"",S.models.length>0&&` · ${o("modelsCount",{n:S.models.length})}`]})]}),b.jsxs("div",{className:"provider-actions",children:[b.jsx("button",{type:"button",className:"iconbtn",title:o("edit"),onClick:()=>l(WM(S)),children:b.jsx(ov,{})}),b.jsx("button",{type:"button",className:"iconbtn danger",title:o("delete"),onClick:()=>y(S),children:b.jsx(Hh,{})})]})]},S.providerId))}),b.jsx("div",{className:"modal-actions",children:b.jsxs("button",{type:"button",className:"btn primary",onClick:()=>l(jM()),children:[b.jsx(ss,{})," ",o("addProvider")]})})]})]})})}const zh=5e3;function qM({file:e,content:t,send:n,onAddLines:r,onAttach:o,onClose:a}){const l=en(),[u,d]=ee.useState(null),[h,p]=ee.useState(!1),[m,v]=ee.useState(null),[y,w]=ee.useState(!1),[S,E]=ee.useState(!1),k=ee.useRef(0),A=ee.useRef(!1),R=ee.useRef(null);ee.useEffect(()=>{p(!0),d(null),v(null),n({type:"read_file",path:e.path})},[e.path,n]),ee.useEffect(()=>{t&&t.path===e.path&&(d(t),p(!1))},[t,e.path]),ee.useEffect(()=>{const L=$=>{if($.key==="Escape"){a();return}const z=$.target,J=z&&(z.tagName==="INPUT"||z.tagName==="TEXTAREA"||z.isContentEditable);($.ctrlKey||$.metaKey)&&$.key.toLowerCase()==="a"&&!J&&($.preventDefault(),q())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[a,u]),ee.useEffect(()=>{const L=()=>{A.current=!1,w(!1)};return window.addEventListener("mouseup",L),()=>window.removeEventListener("mouseup",L)},[]);const I=ee.useMemo(()=>{if(!u)return[];const L=u.text.split(`
|
|
117
117
|
`);return L.length>0&&L[L.length-1]===""&&L.pop(),L.slice(0,zh)},[u]),G=(u==null?void 0:u.lines)??0,M=G>zh,Z=(L,$)=>{if($){const z=k.current>0?k.current:L;v({start:Math.min(z,L),end:Math.max(z,L)})}else k.current=L,v({start:L,end:L})},q=()=>{I.length!==0&&(k.current=1,v({start:1,end:I.length}))},H=()=>{m&&(r(e.path,e.name,m.start,m.end),E(!0),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>E(!1),1400))},B=m?m.end-m.start+1:0,X=(u==null?void 0:u.binary)??!1,K=(u==null?void 0:u.truncated)??!1;return b.jsx("div",{className:"fp-overlay",onMouseDown:L=>{L.target===L.currentTarget&&a()},children:b.jsxs("div",{className:"fp",children:[b.jsxs("div",{className:"fp-head",children:[b.jsx("span",{className:"fp-name",title:e.path,children:e.name}),b.jsx("span",{className:"fp-path",children:e.path}),b.jsxs("span",{className:"fp-meta",children:[u&&!X&&l("fileLines",{n:G}),u&&` · ${VM(u.size)}`]}),b.jsxs("span",{className:"fp-head-actions",children:[b.jsx("button",{type:"button",className:"fp-attach inline","data-tip":l("attachInlineTip"),onClick:()=>o(e.path,e.name,"inline"),children:b.jsx(ss,{})}),b.jsx("button",{type:"button",className:"fp-attach ref","data-tip":l("referenceTip"),onClick:()=>o(e.path,e.name,"reference"),children:b.jsx($h,{})}),b.jsx("button",{type:"button",className:"fp-close",title:l("close"),onClick:a,children:b.jsx(lc,{})})]})]}),K&&!X&&b.jsx("div",{className:"fp-notice",children:l("previewTruncated")}),h&&!u&&b.jsx("div",{className:"fp-empty",children:l("loading")}),!h&&X&&b.jsx("div",{className:"fp-empty",children:l("binaryFile")}),!h&&!X&&u&&I.length===0&&b.jsx("div",{className:"fp-empty",children:l("emptyFile")}),!h&&!X&&I.length>0&&b.jsxs("div",{className:`fp-code ${y?"dragging":""}`,onMouseDown:L=>{L.button===0&&L.preventDefault()},children:[I.map((L,$)=>{const z=$+1,J=m!==null&&z>=m.start&&z<=m.end;return b.jsxs("div",{className:`fp-line ${J?"sel":""}`,onMouseDown:oe=>{oe.button===0&&(Z(z,oe.shiftKey),A.current=!0,w(!0))},onMouseEnter:()=>{A.current&&Z(z,!0)},children:[b.jsx("span",{className:"fp-num",children:z}),b.jsx("span",{className:"fp-code-text",children:L})]},z)}),M&&b.jsx("div",{className:"fp-lines-note",children:l("previewLinesTruncated",{n:zh})})]}),b.jsxs("div",{className:"fp-foot",children:[b.jsx("span",{className:"fp-hint",children:m?l("selectedRange",{n:B,start:m.start,end:m.end}):l("selectLinesHint")}),b.jsxs("div",{className:"fp-actions",children:[b.jsx("button",{type:"button",className:"btn",disabled:I.length===0,onClick:q,children:l("selectAll")}),b.jsx("button",{type:"button",className:"btn",disabled:!m,onClick:()=>v(null),children:l("clearSelection")}),b.jsxs("button",{type:"button",className:"btn primary",disabled:!m||X,onClick:H,children:[S?b.jsx(lv,{}):null,l(S?"addedToChat":"addToChat")]})]})]})]})})}function VM(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}const Y_=2e5,GM=2e5;function YM(){const e=new Map,t=new Map;return{write(n,r){const o=e.get(n);if(o){o.write(r);return}const a=t.get(n)??"",l=a.length+r.length>GM?r:a+r;t.set(n,l)},register(n,r){e.set(n,r);const o=t.get(n);if(o){try{r.write(o)}catch{}t.delete(n)}return()=>{e.get(n)===r&&e.delete(n),t.delete(n)}},clear(){e.clear(),t.clear()}}}function XM(e,t){const n=new Set;for(const o of t.messages)o.role==="toolResult"&&o.toolCallId&&n.add(o.toolCallId),o.role==="bashExecution"&&n.add(`bash-${o.id}`);let r=!1;for(const o of e.keys())n.has(o)&&(e.delete(o),r=!0);return r?new Map(e):e}function ZM(e,t){switch(t.type){case"status":return{...e,status:t.status,ready:t.status==="open"?e.ready:!1,terminals:t.status==="open"?e.terminals:[]};case"ready":return{...e,serverVersion:t.serverVersion,ready:!0};case"snapshot":return{...e,ready:!0,state:t.state,liveOutputs:XM(e.liveOutputs,t.state)};case"tool_delta":{const n=e.liveOutputs.get(t.toolCallId),r=((n==null?void 0:n.text)??"")+t.delta,o=r.length>Y_?r.slice(0,Y_):r,a=new Map(e.liveOutputs);return a.set(t.toolCallId,{toolName:t.toolName,text:o}),{...e,liveOutputs:a}}case"notice":return{...e,notices:[...e.notices,t.notice].slice(-6)};case"dismiss_notice":return{...e,notices:e.notices.filter(n=>n.id!==t.id)};case"sessions":return{...e,sessions:t.sessions};case"files":return{...e,files:t.files};case"file_content":return{...e,fileContent:t.content};case"models":return{...e,models:t.models,modelsLoading:t.loading};case"models_config":return{...e,modelsConfig:t.providers};case"providers_status":return{...e,providers:t.providers};case"install_result":return{...e,installResult:t.result};case"path_completions":return{...e,pathCompletions:t.completions};case"widgets":return{...e,widgets:t.widgets};case"statuses":return{...e,statuses:t.statuses};case"dialog":return{...e,dialog:t.dialog};case"commands":return{...e,commands:t.commands,commandsPath:t.path};case"terminal_add":return{...e,terminals:[...e.terminals,t.meta]};case"terminal_remove":return{...e,terminals:e.terminals.filter(n=>n.id!==t.id)};case"terminal_exit":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!1,exitCode:t.exitCode}:n)};case"terminal_restart":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!0,exitCode:null}:n)};default:return e}}const X_="pi-web-client-id";function QM(){let e=localStorage.getItem(X_);return e||(e=crypto.randomUUID(),localStorage.setItem(X_,e)),e}function JM(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`}function eO(){const[e,t]=ee.useReducer(ZM,{status:"connecting",ready:!1,state:null,liveOutputs:new Map,notices:[],sessions:[],files:null,fileContent:null,models:[],modelsLoading:!1,modelsConfig:[],providers:[],installResult:null,pathCompletions:[],widgets:[],statuses:[],dialog:null,commands:[],commandsPath:"",terminals:[]}),n=ee.useRef(null),r=ee.useRef(YM()),o=ee.useRef(0),a=ee.useRef(null),l=ee.useRef(!0),u=ee.useRef(0),d=ee.useRef(0),h=ee.useCallback((A,R)=>{const I=++d.current;t({type:"notice",notice:{id:I,level:A,text:R}}),setTimeout(()=>t({type:"dismiss_notice",id:I}),A==="error"?12e3:7e3)},[]),p=ee.useCallback(A=>{const R=n.current;return R&&R.readyState===WebSocket.OPEN?(R.send(JSON.stringify(A)),!0):!1},[]),m=ee.useCallback(()=>{if(!l.current)return;t({type:"status",status:"connecting"});const A=new WebSocket(JM());n.current=A,A.onopen=()=>{n.current===A&&(t({type:"status",status:"open"}),o.current=0,u.current=Date.now(),A.send(JSON.stringify({type:"hello",clientId:QM()})))},A.onmessage=R=>{if(n.current!==A)return;u.current=Date.now();let I;try{I=JSON.parse(R.data)}catch{return}switch(I.type){case"ready":t({type:"ready",serverVersion:I.serverVersion}),A.send(JSON.stringify({type:"get_state"})),A.send(JSON.stringify({type:"list_sessions"})),A.send(JSON.stringify({type:"list_files"})),A.send(JSON.stringify({type:"list_models"})),A.send(JSON.stringify({type:"list_commands"}));break;case"snapshot":t({type:"snapshot",state:I.state});break;case"tool_delta":t({type:"tool_delta",toolCallId:I.toolCallId,toolName:I.toolName,delta:I.delta});break;case"notice":{const G=++d.current;t({type:"notice",notice:{id:G,level:I.level,text:I.text}}),setTimeout(()=>t({type:"dismiss_notice",id:G}),I.level==="error"?12e3:7e3);break}case"sessions":t({type:"sessions",sessions:I.sessions});break;case"files":t({type:"files",files:I});break;case"file_content":t({type:"file_content",content:I});break;case"models":t({type:"models",models:I.models,loading:!1});break;case"models_config":t({type:"models_config",providers:I.providers});break;case"providers_status":t({type:"providers_status",providers:I.providers});break;case"install_result":t({type:"install_result",result:I});break;case"path_completions":t({type:"path_completions",completions:I.completions});break;case"widgets":t({type:"widgets",widgets:I.widgets});break;case"statuses":t({type:"statuses",statuses:I.statuses});break;case"dialog":t({type:"dialog",dialog:{id:I.id,kind:I.kind,title:I.title,args:I.args}});break;case"dialog_closed":t({type:"dialog",dialog:null});break;case"terminal_output":r.current.write(I.terminalId,I.data);break;case"terminal_exit":t({type:"terminal_exit",terminalId:I.terminalId,exitCode:I.exitCode});break;case"commands":t({type:"commands",commands:I.commands,path:I.path});break}},A.onclose=()=>{if(n.current===A&&(n.current=null),r.current.clear(),!l.current)return;t({type:"status",status:"closed"});const R=Math.min(1e3*2**o.current,1e4);o.current+=1,a.current=setTimeout(()=>{a.current=null,m()},R)},A.onerror=()=>{A.close()}},[]);ee.useEffect(()=>{l.current=!0,m();const A=setInterval(()=>{if(!l.current)return;const R=n.current;R&&R.readyState===WebSocket.OPEN&&Date.now()-u.current>3e4&&R.close()},5e3);return()=>{var R;l.current=!1,clearInterval(A),a.current&&(clearTimeout(a.current),a.current=null),(R=n.current)==null||R.close(),n.current=null}},[m]);const v=ee.useCallback(A=>t({type:"dismiss_notice",id:A}),[]),y=ee.useCallback(A=>t({type:"terminal_add",meta:A}),[]),w=ee.useCallback(A=>t({type:"terminal_remove",id:A}),[]),S=ee.useCallback(A=>t({type:"terminal_restart",terminalId:A}),[]),E=ee.useCallback((A,R)=>r.current.register(A,R),[]),k=ee.useRef({chat:e,send:p,pushNotice:h,dismissNotice:v,terminal:{create:y,close:w,register:E,restart:S}});return k.current={chat:e,send:p,pushNotice:h,dismissNotice:v,terminal:{create:y,close:w,register:E,restart:S}},k.current}const Tb="pi-web-sounds",Uh={enabled:!0,question:!0,done:!0,start:!1,error:!0,volume:60};function Rb(){try{const e=localStorage.getItem(Tb);if(!e)return{...Uh};const t=JSON.parse(e);return{...Uh,...t}}catch{return{...Uh}}}function tO(e){try{localStorage.setItem(Tb,JSON.stringify(e))}catch{}}let qo=null;function nO(){try{if(!qo){const e=window.AudioContext??window.webkitAudioContext;if(!e)return null;qo=new e}return qo.state==="suspended"&&qo.resume(),qo}catch{return null}}const iO=[{type:"sine",freq:587.33,start:0,dur:.13,peak:.5},{type:"sine",freq:880,start:.11,dur:.24,peak:.5}],rO=[{type:"sine",freq:880,start:0,dur:.15,peak:.35},{type:"sine",freq:587.33,start:.15,dur:.32,peak:.35}],sO=[{type:"triangle",freq:660,start:0,dur:.08,peak:.22}],oO=[{type:"square",freq:220,start:0,dur:.16,peak:.18},{type:"square",freq:174.61,start:.18,dur:.26,peak:.18}],aO={question:iO,done:rO,start:sO,error:oO};function lO(e,t,n){const r=e.createOscillator(),o=e.createGain();r.type=t.type,r.frequency.value=t.freq;const a=e.currentTime+t.start,l=Math.max(1e-4,t.peak*n);o.gain.setValueAtTime(1e-4,a),o.gain.exponentialRampToValueAtTime(l,a+.012),o.gain.exponentialRampToValueAtTime(1e-4,a+t.dur),r.connect(o),o.connect(e.destination),r.start(a),r.stop(a+t.dur+.05)}function Vo(e,t=Rb()){if(!t.enabled||!t[e])return;const n=nO();if(!n)return;const r=Math.max(0,Math.min(1,t.volume/100));for(const o of aO[e])lO(n,o,r)}function cO(){var M;const e=en(),{chat:t,send:n,dismissNotice:r,terminal:o}=eO(),[a,l]=ee.useState([]),[u,d]=ee.useState(null),[h,p]=ee.useState("chat"),[m,v]=ee.useState(!1),[y,w]=ee.useState(!1),[S,E]=ee.useState(Rb),k=ee.useRef(null),A=ee.useRef(null),R=ee.useRef(0);ee.useEffect(()=>{tO(S)},[S]),ee.useEffect(()=>{var H;const Z=((H=t.state)==null?void 0:H.isStreaming)??!1,q=k.current;k.current=Z,q!==null&&(!q&&Z?Vo("start",S):q&&!Z&&Vo("done",S))},[(M=t.state)==null?void 0:M.isStreaming,S]),ee.useEffect(()=>{var q;const Z=((q=t.dialog)==null?void 0:q.id)??null;Z!==null&&Z!==A.current&&Vo("question",S),A.current=Z},[t.dialog,S]),ee.useEffect(()=>{const Z=[...t.notices].reverse().find(q=>q.level==="error");Z&&Z.id!==R.current&&(R.current=Z.id,Vo("error",S))},[t.notices,S]);const I=(Z,q,H,B=!1,X)=>{const K=`${Z}|${H}|${X?`${X.start}-${X.end}`:""}`;l(L=>L.some($=>`${$.path}|${$.mode}|${$.lines?`${$.lines.start}-${$.lines.end}`:""}`===K)?L:[...L,{path:Z,name:q,mode:H,isDir:B,...X?{lines:X}:{}}])},G=Z=>l(q=>q.filter(H=>H.path!==Z));return b.jsxs("div",{className:"app",children:[b.jsx(zw,{chat:t,send:n,view:h,onViewChange:p,onManageModels:()=>w(!0),sound:S,onSoundChange:E,onSoundPreview:Z=>Vo(Z,S)}),b.jsx("div",{className:"notices",children:t.notices.map(Z=>b.jsx("button",{type:"button",className:`notice notice-${Z.level}`,onClick:()=>r(Z.id),children:Z.text},Z.id))}),b.jsxs("div",{className:"layout",children:[b.jsxs("div",{className:`view-pane ${h==="chat"?"":"hidden"}`,children:[b.jsx(Hw,{chat:t,send:n}),b.jsxs("main",{className:"main",children:[t.state?b.jsx(SR,{state:t.state,liveOutputs:t.liveOutputs}):b.jsx("div",{className:"boot-wait",children:t.ready?e("loadingSession"):e("connectingServer")}),b.jsx(wR,{chat:t,send:n,attachments:a,onRemoveAttachment:G,onSent:()=>l([])})]}),b.jsx($w,{chat:t,send:n,onAttach:I,onPreview:(Z,q)=>d({path:Z,name:q})})]}),b.jsx("div",{className:`view-pane ${h==="terminal"?"":"hidden"}`,children:b.jsx(UM,{chat:t,send:n,terminal:o})})]}),b.jsx(xR,{chat:t,send:n}),t.dialog&&b.jsx(ER,{dialog:t.dialog,send:n}),u&&b.jsx(qM,{file:u,content:t.fileContent,send:n,onAddLines:(Z,q,H,B)=>I(Z,q,"lines",!1,{start:H,end:B}),onAttach:(Z,q,H)=>I(Z,q,H),onClose:()=>d(null)}),t.ready&&t.state&&t.state.piConfigured===!1&&!m&&!y&&b.jsx(HM,{send:n,piConfigured:t.state.piConfigured,providers:t.providers,installResult:t.installResult,onClose:()=>v(!0)}),y&&b.jsx(KM,{send:n,providers:t.modelsConfig,providerStatus:t.providers,onClose:()=>w(!1)})]})}mw.createRoot(document.getElementById("root")).render(b.jsx(ee.StrictMode,{children:b.jsx(Dw,{children:b.jsx(cO,{})})}));
|
package/web/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<meta name="color-scheme" content="dark" />
|
|
7
7
|
<title>pi-web-ui — pi 编码智能体</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Tt1wcNur.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Cjz-c1Wr.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|