diff --git a/.prettierignore b/.prettierignore index 577c8ec..4ee2cbd 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,3 +12,6 @@ dist/ # curated skill content consumed verbatim by agents backend/cli/skills/ .astro/ + +# built docs, embedded so openscience.sh/docs serves them (regenerate with: bun run --cwd frontend/landing sync:docs) +frontend/landing/public/docs/ diff --git a/frontend/landing/package.json b/frontend/landing/package.json index 82efd06..058a87b 100644 --- a/frontend/landing/package.json +++ b/frontend/landing/package.json @@ -6,7 +6,8 @@ "scripts": { "dev": "vite", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview", + "sync:docs": "bun run --cwd ../docs build && rm -rf public/docs && cp -r ../docs/dist public/docs" }, "dependencies": { "@vercel/analytics": "^2.0.1", diff --git a/frontend/landing/public/docs/assets/index-BZ3vGriT.css b/frontend/landing/public/docs/assets/index-BZ3vGriT.css new file mode 100644 index 0000000..99c9e53 --- /dev/null +++ b/frontend/landing/public/docs/assets/index-BZ3vGriT.css @@ -0,0 +1 @@ +@font-face{font-family:Computer Modern Concrete;font-style:normal;font-weight:400;font-display:swap;src:url(/docs/fonts/cmc/cmunorm.woff2) format("woff2")}@font-face{font-family:Computer Modern Concrete;font-style:normal;font-weight:700;font-display:swap;src:url(/docs/fonts/cmc/cmunobx.woff2) format("woff2")}:root{color-scheme:light}html,body{margin:0;padding:0;min-height:100dvh;background:#fafbfc;color:#0f172a;font-family:Computer Modern Concrete,Concrete Roman,Georgia,Times New Roman,serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"kern","liga"}#root{min-height:100dvh;display:flex;flex-direction:column;isolation:isolate}*{box-sizing:border-box}a{color:inherit} diff --git a/frontend/landing/public/docs/assets/index-CdJSFNGj.js b/frontend/landing/public/docs/assets/index-CdJSFNGj.js new file mode 100644 index 0000000..61b12cb --- /dev/null +++ b/frontend/landing/public/docs/assets/index-CdJSFNGj.js @@ -0,0 +1,1533 @@ +(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))u(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function a(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function u(c){if(c.ep)return;c.ep=!0;const h=a(c);fetch(c.href,h)}})();function yc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var js={exports:{}},va={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Bp;function fb(){if(Bp)return va;Bp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(u,c,h){var f=null;if(h!==void 0&&(f=""+h),c.key!==void 0&&(f=""+c.key),"key"in c){h={};for(var p in c)p!=="key"&&(h[p]=c[p])}else h=c;return c=h.ref,{$$typeof:n,type:u,key:f,ref:c!==void 0?c:null,props:h}}return va.Fragment=r,va.jsx=a,va.jsxs=a,va}var Hp;function hb(){return Hp||(Hp=1,js.exports=fb()),js.exports}var H=hb(),Ls={exports:{}},ye={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var qp;function db(){if(qp)return ye;qp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function x(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,K={};function D(A,Y,k){this.props=A,this.context=Y,this.refs=K,this.updater=k||T}D.prototype.isReactComponent={},D.prototype.setState=function(A,Y){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,Y,"setState")},D.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function F(){}F.prototype=D.prototype;function Q(A,Y,k){this.props=A,this.context=Y,this.refs=K,this.updater=k||T}var ue=Q.prototype=new F;ue.constructor=Q,U(ue,D.prototype),ue.isPureReactComponent=!0;var re=Array.isArray;function L(){}var P={H:null,A:null,T:null,S:null},de=Object.prototype.hasOwnProperty;function me(A,Y,k){var ee=k.ref;return{$$typeof:n,type:A,key:Y,ref:ee!==void 0?ee:null,props:k}}function N(A,Y){return me(A.type,Y,A.props)}function te(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function B(A){var Y={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(k){return Y[k]})}var le=/\/+/g;function J(A,Y){return typeof A=="object"&&A!==null&&A.key!=null?B(""+A.key):Y.toString(36)}function $(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(L,L):(A.status="pending",A.then(function(Y){A.status==="pending"&&(A.status="fulfilled",A.value=Y)},function(Y){A.status==="pending"&&(A.status="rejected",A.reason=Y)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function _(A,Y,k,ee,he){var oe=typeof A;(oe==="undefined"||oe==="boolean")&&(A=null);var Ae=!1;if(A===null)Ae=!0;else switch(oe){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(A.$$typeof){case n:case r:Ae=!0;break;case b:return Ae=A._init,_(Ae(A._payload),Y,k,ee,he)}}if(Ae)return he=he(A),Ae=ee===""?"."+J(A,0):ee,re(he)?(k="",Ae!=null&&(k=Ae.replace(le,"$&/")+"/"),_(he,Y,k,"",function(Yt){return Yt})):he!=null&&(te(he)&&(he=N(he,k+(he.key==null||A&&A.key===he.key?"":(""+he.key).replace(le,"$&/")+"/")+Ae)),Y.push(he)),1;Ae=0;var Ke=ee===""?".":ee+":";if(re(A))for(var Le=0;Le>>1,w=_[xe];if(0>>1;xec(k,ae))eec(he,k)?(_[xe]=he,_[ee]=ae,xe=ee):(_[xe]=k,_[Y]=ae,xe=Y);else if(eec(he,ae))_[xe]=he,_[ee]=ae,xe=ee;else break e}}return Z}function c(_,Z){var ae=_.sortIndex-Z.sortIndex;return ae!==0?ae:_.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var m=[],d=[],b=1,y=null,S=3,x=!1,T=!1,U=!1,K=!1,D=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function ue(_){for(var Z=a(d);Z!==null;){if(Z.callback===null)u(d);else if(Z.startTime<=_)u(d),Z.sortIndex=Z.expirationTime,r(m,Z);else break;Z=a(d)}}function re(_){if(U=!1,ue(_),!T)if(a(m)!==null)T=!0,L||(L=!0,B());else{var Z=a(d);Z!==null&&$(re,Z.startTime-_)}}var L=!1,P=-1,de=5,me=-1;function N(){return K?!0:!(n.unstable_now()-me_&&N());){var xe=y.callback;if(typeof xe=="function"){y.callback=null,S=y.priorityLevel;var w=xe(y.expirationTime<=_);if(_=n.unstable_now(),typeof w=="function"){y.callback=w,ue(_),Z=!0;break t}y===a(m)&&u(m),ue(_)}else u(m);y=a(m)}if(y!==null)Z=!0;else{var A=a(d);A!==null&&$(re,A.startTime-_),Z=!1}}break e}finally{y=null,S=ae,x=!1}Z=void 0}}finally{Z?B():L=!1}}}var B;if(typeof Q=="function")B=function(){Q(te)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,J=le.port2;le.port1.onmessage=te,B=function(){J.postMessage(null)}}else B=function(){D(te,0)};function $(_,Z){P=D(function(){_(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(_){_.callback=null},n.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<_?Math.floor(1e3/_):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(_){switch(S){case 1:case 2:case 3:var Z=3;break;default:Z=S}var ae=S;S=Z;try{return _()}finally{S=ae}},n.unstable_requestPaint=function(){K=!0},n.unstable_runWithPriority=function(_,Z){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var ae=S;S=_;try{return Z()}finally{S=ae}},n.unstable_scheduleCallback=function(_,Z,ae){var xe=n.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0xe?(_.sortIndex=ae,r(d,_),a(m)===null&&_===a(d)&&(U?(F(P),P=-1):U=!0,$(re,ae-xe))):(_.sortIndex=w,r(m,_),T||x||(T=!0,L||(L=!0,B()))),_},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(_){var Z=S;return function(){var ae=S;S=Z;try{return _.apply(this,arguments)}finally{S=ae}}}})(Hs)),Hs}var Vp;function gb(){return Vp||(Vp=1,Bs.exports=mb()),Bs.exports}var qs={exports:{}},pt={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xp;function yb(){if(Xp)return pt;Xp=1;var n=bc();function r(m){var d="https://react.dev/errors/"+m;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),qs.exports=yb(),qs.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Kp;function vb(){if(Kp)return xa;Kp=1;var n=gb(),r=bc(),a=bb();function u(e){var t="https://react.dev/errors/"+e;if(1w||(e.current=xe[w],xe[w]=null,w--)}function k(e,t){w++,xe[w]=e.current,e.current=t}var ee=A(null),he=A(null),oe=A(null),Ae=A(null);function Ke(e,t){switch(k(oe,t),k(he,e),k(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=op(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(ee),k(ee,e)}function Le(){Y(ee),Y(he),Y(oe)}function Yt(e){e.memoizedState!==null&&k(Ae,e);var t=ee.current,l=op(t,e.type);t!==l&&(k(he,e),k(ee,l))}function pn(e){he.current===e&&(Y(ee),Y(he)),Ae.current===e&&(Y(Ae),ma._currentValue=ae)}var Ci,La;function mn(e){if(Ci===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Ci=t&&t[1]||"",La=-1)":-1o||E[i]!==M[o]){var q=` +`+E[i].replace(" at new "," at ");return e.displayName&&q.includes("")&&(q=q.replace("",e.displayName)),q}while(1<=i&&0<=o);break}}}finally{Ml=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?mn(l):""}function Ua(e,t){switch(e.tag){case 26:case 27:case 5:return mn(e.type);case 16:return mn("Lazy");case 13:return e.child!==t&&t!==null?mn("Suspense Fallback"):mn("Suspense");case 19:return mn("SuspenseList");case 0:case 15:return Dl(e.type,!1);case 11:return Dl(e.type.render,!1);case 1:return Dl(e.type,!0);case 31:return mn("Activity");default:return""}}function Ba(e){try{var t="",l=null;do t+=Ua(e,l),l=e,e=e.return;while(e);return t}catch(i){return` +Error generating stack: `+i.message+` +`+i.stack}}var Rl=Object.prototype.hasOwnProperty,Nl=n.unstable_scheduleCallback,Ti=n.unstable_cancelCallback,vu=n.unstable_shouldYield,xu=n.unstable_requestPaint,yt=n.unstable_now,Su=n.unstable_getCurrentPriorityLevel,G=n.unstable_ImmediatePriority,W=n.unstable_UserBlockingPriority,pe=n.unstable_NormalPriority,Se=n.unstable_LowPriority,Re=n.unstable_IdlePriority,Mt=n.log,gn=n.unstable_setDisableYieldValue,bt=null,it=null;function St(e){if(typeof Mt=="function"&&gn(e),it&&typeof it.setStrictMode=="function")try{it.setStrictMode(bt,e)}catch{}}var qe=Math.clz32?Math.clz32:$g,Ln=Math.log,en=Math.LN2;function $g(e){return e>>>=0,e===0?32:31-(Ln(e)/en|0)|0}var Ha=256,qa=262144,Ya=4194304;function sl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ga(e,t,l){var i=e.pendingLanes;if(i===0)return 0;var o=0,s=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var v=i&134217727;return v!==0?(i=v&~s,i!==0?o=sl(i):(g&=v,g!==0?o=sl(g):l||(l=v&~e,l!==0&&(o=sl(l))))):(v=i&~s,v!==0?o=sl(v):g!==0?o=sl(g):l||(l=i&~e,l!==0&&(o=sl(l)))),o===0?0:t!==0&&t!==o&&(t&s)===0&&(s=o&-o,l=t&-t,s>=l||s===32&&(l&4194048)!==0)?t:o}function zi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Wg(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Yc(){var e=Ya;return Ya<<=1,(Ya&62914560)===0&&(Ya=4194304),e}function ku(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function _i(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Pg(e,t,l,i,o,s){var g=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var v=e.entanglements,E=e.expirationTimes,M=e.hiddenUpdates;for(l=g&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ay=/[\n"\\]/g;function Vt(e){return e.replace(ay,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zu(e,t,l,i,o,s,g,v){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Gt(t)):e.value!==""+Gt(t)&&(e.value=""+Gt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?_u(e,g,Gt(t)):l!=null?_u(e,g,Gt(l)):i!=null&&e.removeAttribute("value"),o==null&&s!=null&&(e.defaultChecked=!!s),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+Gt(v):e.removeAttribute("name")}function ef(e,t,l,i,o,s,g,v){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||l!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Tu(e);return}l=l!=null?""+Gt(l):"",t=t!=null?""+Gt(t):l,v||t===e.value||(e.value=t),e.defaultValue=t}i=i??o,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=v?e.checked:!!i,e.defaultChecked=!!i,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Tu(e)}function _u(e,t,l){t==="number"&&Qa(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ql(e,t,l,i){if(e=e.options,t){t={};for(var o=0;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nu=!1;if(vn)try{var Ri={};Object.defineProperty(Ri,"passive",{get:function(){Nu=!0}}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{Nu=!1}var Bn=null,ju=null,Za=null;function of(){if(Za)return Za;var e,t=ju,l=t.length,i,o="value"in Bn?Bn.value:Bn.textContent,s=o.length;for(e=0;e=Li),pf=" ",mf=!1;function gf(e,t){switch(e){case"keyup":return Ry.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xl=!1;function jy(e,t){switch(e){case"compositionend":return yf(t);case"keypress":return t.which!==32?null:(mf=!0,pf);case"textInput":return e=t.data,e===pf&&mf?null:e;default:return null}}function Ly(e,t){if(Xl)return e==="compositionend"||!qu&&gf(e,t)?(e=of(),Za=ju=Bn=null,Xl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:l,offset:t-e};e=i}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Af(l)}}function Tf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qa(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Qa(e.document)}return t}function Vu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Xy=vn&&"documentMode"in document&&11>=document.documentMode,Ql=null,Xu=null,qi=null,Qu=!1;function _f(e,t,l){var i=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Qu||Ql==null||Ql!==Qa(i)||(i=Ql,"selectionStart"in i&&Vu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),qi&&Hi(qi,i)||(qi=i,i=qr(Xu,"onSelect"),0>=g,o-=g,on=1<<32-qe(t)+o|l<ve?(Te=ie,ie=null):Te=ie.sibling;var Me=R(z,ie,O[ve],V);if(Me===null){ie===null&&(ie=Te);break}e&&ie&&Me.alternate===null&&t(z,ie),C=s(Me,C,ve),Oe===null?se=Me:Oe.sibling=Me,Oe=Me,ie=Te}if(ve===O.length)return l(z,ie),ze&&Sn(z,ve),se;if(ie===null){for(;veve?(Te=ie,ie=null):Te=ie.sibling;var rl=R(z,ie,Me.value,V);if(rl===null){ie===null&&(ie=Te);break}e&&ie&&rl.alternate===null&&t(z,ie),C=s(rl,C,ve),Oe===null?se=rl:Oe.sibling=rl,Oe=rl,ie=Te}if(Me.done)return l(z,ie),ze&&Sn(z,ve),se;if(ie===null){for(;!Me.done;ve++,Me=O.next())Me=X(z,Me.value,V),Me!==null&&(C=s(Me,C,ve),Oe===null?se=Me:Oe.sibling=Me,Oe=Me);return ze&&Sn(z,ve),se}for(ie=i(ie);!Me.done;ve++,Me=O.next())Me=j(ie,z,ve,Me.value,V),Me!==null&&(e&&Me.alternate!==null&&ie.delete(Me.key===null?ve:Me.key),C=s(Me,C,ve),Oe===null?se=Me:Oe.sibling=Me,Oe=Me);return e&&ie.forEach(function(cb){return t(z,cb)}),ze&&Sn(z,ve),se}function He(z,C,O,V){if(typeof O=="object"&&O!==null&&O.type===U&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case x:e:{for(var se=O.key;C!==null;){if(C.key===se){if(se=O.type,se===U){if(C.tag===7){l(z,C.sibling),V=o(C,O.props.children),V.return=z,z=V;break e}}else if(C.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===de&&xl(se)===C.type){l(z,C.sibling),V=o(C,O.props),Ki(V,O),V.return=z,z=V;break e}l(z,C);break}else t(z,C);C=C.sibling}O.type===U?(V=ml(O.props.children,z.mode,V,O.key),V.return=z,z=V):(V=lr(O.type,O.key,O.props,null,z.mode,V),Ki(V,O),V.return=z,z=V)}return g(z);case T:e:{for(se=O.key;C!==null;){if(C.key===se)if(C.tag===4&&C.stateNode.containerInfo===O.containerInfo&&C.stateNode.implementation===O.implementation){l(z,C.sibling),V=o(C,O.children||[]),V.return=z,z=V;break e}else{l(z,C);break}else t(z,C);C=C.sibling}V=Wu(O,z.mode,V),V.return=z,z=V}return g(z);case de:return O=xl(O),He(z,C,O,V)}if($(O))return ne(z,C,O,V);if(B(O)){if(se=B(O),typeof se!="function")throw Error(u(150));return O=se.call(O),fe(z,C,O,V)}if(typeof O.then=="function")return He(z,C,cr(O),V);if(O.$$typeof===Q)return He(z,C,rr(z,O),V);fr(z,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,C!==null&&C.tag===6?(l(z,C.sibling),V=o(C,O),V.return=z,z=V):(l(z,C),V=$u(O,z.mode,V),V.return=z,z=V),g(z)):l(z,C)}return function(z,C,O,V){try{Qi=0;var se=He(z,C,O,V);return ni=null,se}catch(ie){if(ie===ti||ie===or)throw ie;var Oe=Rt(29,ie,null,z.mode);return Oe.lanes=V,Oe.return=z,Oe}finally{}}}var kl=Wf(!0),Pf=Wf(!1),Vn=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Qn(e,t,l){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(De&2)!==0){var o=i.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),i.pending=t,t=nr(e),Lf(e,null,l),t}return tr(e,i,t,l),nr(e)}function Zi(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,Vc(e,l)}}function ho(e,t){var l=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,l===i)){var o=null,s=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};s===null?o=s=g:s=s.next=g,l=l.next}while(l!==null);s===null?o=s=t:s=s.next=t}else o=s=t;l={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:i.shared,callbacks:i.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var po=!1;function Fi(){if(po){var e=ei;if(e!==null)throw e}}function Ii(e,t,l,i){po=!1;var o=e.updateQueue;Vn=!1;var s=o.firstBaseUpdate,g=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var E=v,M=E.next;E.next=null,g===null?s=M:g.next=M,g=E;var q=e.alternate;q!==null&&(q=q.updateQueue,v=q.lastBaseUpdate,v!==g&&(v===null?q.firstBaseUpdate=M:v.next=M,q.lastBaseUpdate=E))}if(s!==null){var X=o.baseState;g=0,q=M=E=null,v=s;do{var R=v.lane&-536870913,j=R!==v.lane;if(j?(Ce&R)===R:(i&R)===R){R!==0&&R===Pl&&(po=!0),q!==null&&(q=q.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var ne=e,fe=v;R=t;var He=l;switch(fe.tag){case 1:if(ne=fe.payload,typeof ne=="function"){X=ne.call(He,X,R);break e}X=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=fe.payload,R=typeof ne=="function"?ne.call(He,X,R):ne,R==null)break e;X=y({},X,R);break e;case 2:Vn=!0}}R=v.callback,R!==null&&(e.flags|=64,j&&(e.flags|=8192),j=o.callbacks,j===null?o.callbacks=[R]:j.push(R))}else j={lane:R,tag:v.tag,payload:v.payload,callback:v.callback,next:null},q===null?(M=q=j,E=X):q=q.next=j,g|=R;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;j=v,v=j.next,j.next=null,o.lastBaseUpdate=j,o.shared.pending=null}}while(!0);q===null&&(E=X),o.baseState=E,o.firstBaseUpdate=M,o.lastBaseUpdate=q,s===null&&(o.shared.lanes=0),Jn|=g,e.lanes=g,e.memoizedState=X}}function eh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function th(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;es?s:8;var g=_.T,v={};_.T=v,Ro(e,!1,t,l);try{var E=o(),M=_.S;if(M!==null&&M(v,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var q=Py(E,i);Wi(e,t,q,Bt(e))}else Wi(e,t,i,Bt(e))}catch(X){Wi(e,t,{then:function(){},status:"rejected",reason:X},Bt())}finally{Z.p=s,g!==null&&v.types!==null&&(g.types=v.types),_.T=g}}function a1(){}function Mo(e,t,l,i){if(e.tag!==5)throw Error(u(476));var o=Rh(e).queue;Dh(e,o,t,ae,l===null?a1:function(){return Nh(e),l(i)})}function Rh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Nh(e){var t=Rh(e);t.next===null&&(t=e.alternate.memoizedState),Wi(e,t.next.queue,{},Bt())}function Do(){return ft(ma)}function jh(){return $e().memoizedState}function Lh(){return $e().memoizedState}function r1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Bt();e=Xn(l);var i=Qn(t,e,l);i!==null&&(zt(i,t,l),Zi(i,t,l)),t={cache:ro()},e.payload=t;return}t=t.return}}function u1(e,t,l){var i=Bt();l={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Sr(e)?Bh(t,l):(l=Iu(e,t,l,i),l!==null&&(zt(l,e,i),Hh(l,t,i)))}function Uh(e,t,l){var i=Bt();Wi(e,t,l,i)}function Wi(e,t,l,i){var o={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Sr(e))Bh(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var g=t.lastRenderedState,v=s(g,l);if(o.hasEagerState=!0,o.eagerState=v,Dt(v,g))return tr(e,t,o,0),Ye===null&&er(),!1}catch{}finally{}if(l=Iu(e,t,o,i),l!==null)return zt(l,e,i),Hh(l,t,i),!0}return!1}function Ro(e,t,l,i){if(i={lane:2,revertLane:fs(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Sr(e)){if(t)throw Error(u(479))}else t=Iu(e,l,i,2),t!==null&&zt(t,e,2)}function Sr(e){var t=e.alternate;return e===be||t!==null&&t===be}function Bh(e,t){ii=pr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Hh(e,t,l){if((l&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,Vc(e,l)}}var Pi={readContext:ft,use:yr,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};Pi.useEffectEvent=Fe;var qh={readContext:ft,use:yr,useCallback:function(e,t){return vt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:wh,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,vr(4194308,4,Th.bind(null,t,e),l)},useLayoutEffect:function(e,t){return vr(4194308,4,e,t)},useInsertionEffect:function(e,t){vr(4,2,e,t)},useMemo:function(e,t){var l=vt();t=t===void 0?null:t;var i=e();if(wl){St(!0);try{e()}finally{St(!1)}}return l.memoizedState=[i,t],i},useReducer:function(e,t,l){var i=vt();if(l!==void 0){var o=l(t);if(wl){St(!0);try{l(t)}finally{St(!1)}}}else o=t;return i.memoizedState=i.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},i.queue=e,e=e.dispatch=u1.bind(null,be,e),[i.memoizedState,e]},useRef:function(e){var t=vt();return e={current:e},t.memoizedState=e},useState:function(e){e=Co(e);var t=e.queue,l=Uh.bind(null,be,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:_o,useDeferredValue:function(e,t){var l=vt();return Oo(l,e,t)},useTransition:function(){var e=Co(!1);return e=Dh.bind(null,be,e.queue,!0,!1),vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var i=be,o=vt();if(ze){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),Ye===null)throw Error(u(349));(Ce&127)!==0||uh(i,t,l)}o.memoizedState=l;var s={value:l,getSnapshot:t};return o.queue=s,wh(sh.bind(null,i,s,e),[e]),i.flags|=2048,ri(9,{destroy:void 0},oh.bind(null,i,s,l,t),null),l},useId:function(){var e=vt(),t=Ye.identifierPrefix;if(ze){var l=sn,i=on;l=(i&~(1<<32-qe(i)-1)).toString(32)+l,t="_"+t+"R_"+l,l=mr++,0<\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof i.is=="string"?g.createElement("select",{is:i.is}):g.createElement("select"),i.multiple?s.multiple=!0:i.size&&(s.size=i.size);break;default:s=typeof i.is=="string"?g.createElement(o,{is:i.is}):g.createElement(o)}}s[st]=t,s[kt]=i;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)s.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=s;e:switch(dt(s,o,i),o){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Tn(t)}}return Qe(t),Zo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Tn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(u(166));if(e=oe.current,$l(t)){if(e=t.stateNode,l=t.memoizedProps,i=null,o=ct,o!==null)switch(o.tag){case 27:case 5:i=o.memoizedProps}e[st]=t,e=!!(e.nodeValue===l||i!==null&&i.suppressHydrationWarning===!0||ap(e.nodeValue,l)),e||Yn(t,!0)}else e=Yr(e).createTextNode(i),e[st]=t,t.stateNode=e}return Qe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(i=$l(t),l!==null){if(e===null){if(!i)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[st]=t}else gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),e=!1}else l=no(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(jt(t),t):(jt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Qe(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=$l(t),i!==null&&i.dehydrated!==null){if(e===null){if(!o)throw Error(u(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(u(317));o[st]=t}else gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),o=!1}else o=no(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(jt(t),t):(jt(t),null)}return jt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=i!==null,e=e!==null&&e.memoizedState!==null,l&&(i=t.child,o=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(o=i.alternate.memoizedState.cachePool.pool),s=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),s!==o&&(i.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Cr(t,t.updateQueue),Qe(t),null);case 4:return Le(),e===null&&ms(t.stateNode.containerInfo),Qe(t),null;case 10:return wn(t.type),Qe(t),null;case 19:if(Y(Je),i=t.memoizedState,i===null)return Qe(t),null;if(o=(t.flags&128)!==0,s=i.rendering,s===null)if(o)ta(i,!1);else{if(Ie!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=dr(e),s!==null){for(t.flags|=128,ta(i,!1),e=s.updateQueue,t.updateQueue=e,Cr(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Uf(l,e),l=l.sibling;return k(Je,Je.current&1|2),ze&&Sn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&yt()>Mr&&(t.flags|=128,o=!0,ta(i,!1),t.lanes=4194304)}else{if(!o)if(e=dr(s),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Cr(t,e),ta(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!ze)return Qe(t),null}else 2*yt()-i.renderingStartTime>Mr&&l!==536870912&&(t.flags|=128,o=!0,ta(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(e=i.last,e!==null?e.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=yt(),e.sibling=null,l=Je.current,k(Je,o?l&1|2:l&1),ze&&Sn(t,i.treeForkCount),e):(Qe(t),null);case 22:case 23:return jt(t),go(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(l&536870912)!==0&&(t.flags&128)===0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),l=t.updateQueue,l!==null&&Cr(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==l&&(t.flags|=2048),e!==null&&Y(vl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),wn(Pe),Qe(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function h1(e,t){switch(eo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wn(Pe),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pn(t),null;case 31:if(t.memoizedState!==null){if(jt(t),t.alternate===null)throw Error(u(340));gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Je),null;case 4:return Le(),null;case 10:return wn(t.type),null;case 22:case 23:return jt(t),go(),e!==null&&Y(vl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return wn(Pe),null;case 25:return null;default:return null}}function cd(e,t){switch(eo(t),t.tag){case 3:wn(Pe),Le();break;case 26:case 27:case 5:pn(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&jt(t);break;case 13:jt(t);break;case 19:Y(Je);break;case 10:wn(t.type);break;case 22:case 23:jt(t),go(),e!==null&&Y(vl);break;case 24:wn(Pe)}}function na(e,t){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var o=i.next;l=o;do{if((l.tag&e)===e){i=void 0;var s=l.create,g=l.inst;i=s(),g.destroy=i}l=l.next}while(l!==o)}}catch(v){je(t,t.return,v)}}function Fn(e,t,l){try{var i=t.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var s=o.next;i=s;do{if((i.tag&e)===e){var g=i.inst,v=g.destroy;if(v!==void 0){g.destroy=void 0,o=t;var E=l,M=v;try{M()}catch(q){je(o,E,q)}}}i=i.next}while(i!==s)}}catch(q){je(t,t.return,q)}}function fd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{th(t,l)}catch(i){je(e,e.return,i)}}}function hd(e,t,l){l.props=El(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(i){je(e,t,i)}}function la(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof l=="function"?e.refCleanup=l(i):l.current=i}}catch(o){je(e,t,o)}}function cn(e,t){var l=e.ref,i=e.refCleanup;if(l!==null)if(typeof i=="function")try{i()}catch(o){je(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(o){je(e,t,o)}else l.current=null}function dd(e){var t=e.type,l=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&i.focus();break e;case"img":l.src?i.src=l.src:l.srcSet&&(i.srcset=l.srcSet)}}catch(o){je(e,e.return,o)}}function Fo(e,t,l){try{var i=e.stateNode;N1(i,e.type,l,t),i[kt]=t}catch(o){je(e,e.return,o)}}function pd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&tl(e.type)||e.tag===4}function Io(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&tl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jo(e,t,l){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=bn));else if(i!==4&&(i===27&&tl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Jo(e,t,l),e=e.sibling;e!==null;)Jo(e,t,l),e=e.sibling}function Tr(e,t,l){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(i!==4&&(i===27&&tl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Tr(e,t,l),e=e.sibling;e!==null;)Tr(e,t,l),e=e.sibling}function md(e){var t=e.stateNode,l=e.memoizedProps;try{for(var i=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);dt(t,i,l),t[st]=e,t[kt]=l}catch(s){je(e,e.return,s)}}var zn=!1,nt=!1,$o=!1,gd=typeof WeakSet=="function"?WeakSet:Set,ut=null;function d1(e,t){if(e=e.containerInfo,bs=Fr,e=zf(e),Vu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var i=l.getSelection&&l.getSelection();if(i&&i.rangeCount!==0){l=i.anchorNode;var o=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{l.nodeType,s.nodeType}catch{l=null;break e}var g=0,v=-1,E=-1,M=0,q=0,X=e,R=null;t:for(;;){for(var j;X!==l||o!==0&&X.nodeType!==3||(v=g+o),X!==s||i!==0&&X.nodeType!==3||(E=g+i),X.nodeType===3&&(g+=X.nodeValue.length),(j=X.firstChild)!==null;)R=X,X=j;for(;;){if(X===e)break t;if(R===l&&++M===o&&(v=g),R===s&&++q===i&&(E=g),(j=X.nextSibling)!==null)break;X=R,R=X.parentNode}X=j}l=v===-1||E===-1?null:{start:v,end:E}}else l=null}l=l||{start:0,end:0}}else l=null;for(vs={focusedElem:e,selectionRange:l},Fr=!1,ut=t;ut!==null;)if(t=ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ut=e;else for(;ut!==null;){switch(t=ut,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l title"))),dt(s,i,l),s[st]=e,rt(s),i=s;break e;case"link":var g=kp("link","href",o).get(i+(l.href||""));if(g){for(var v=0;vHe&&(g=He,He=fe,fe=g);var z=Cf(v,fe),C=Cf(v,He);if(z&&C&&(j.rangeCount!==1||j.anchorNode!==z.node||j.anchorOffset!==z.offset||j.focusNode!==C.node||j.focusOffset!==C.offset)){var O=X.createRange();O.setStart(z.node,z.offset),j.removeAllRanges(),fe>He?(j.addRange(O),j.extend(C.node,C.offset)):(O.setEnd(C.node,C.offset),j.addRange(O))}}}}for(X=[],j=v;j=j.parentNode;)j.nodeType===1&&X.push({element:j,left:j.scrollLeft,top:j.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;vl?32:l,_.T=null,l=is,is=null;var s=Wn,g=Rn;if(at=0,fi=Wn=null,Rn=0,(De&6)!==0)throw Error(u(331));var v=De;if(De|=4,Td(s.current),Ed(s,s.current,g,l),De=v,sa(0,!1),it&&typeof it.onPostCommitFiberRoot=="function")try{it.onPostCommitFiberRoot(bt,s)}catch{}return!0}finally{Z.p=o,_.T=i,Qd(e,t)}}function Zd(e,t,l){t=Qt(l,t),t=Uo(e.stateNode,t,2),e=Qn(e,t,2),e!==null&&(_i(e,2),fn(e))}function je(e,t,l){if(e.tag===3)Zd(e,e,l);else for(;t!==null;){if(t.tag===3){Zd(t,e,l);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&($n===null||!$n.has(i))){e=Qt(l,e),l=Fh(2),i=Qn(t,l,2),i!==null&&(Ih(l,i,t,e),_i(i,2),fn(i));break}}t=t.return}}function os(e,t,l){var i=e.pingCache;if(i===null){i=e.pingCache=new g1;var o=new Set;i.set(t,o)}else o=i.get(t),o===void 0&&(o=new Set,i.set(t,o));o.has(l)||(es=!0,o.add(l),e=S1.bind(null,e,t,l),t.then(e,e))}function S1(e,t,l){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ye===e&&(Ce&l)===l&&(Ie===4||Ie===3&&(Ce&62914560)===Ce&&300>yt()-Or?(De&2)===0&&hi(e,0):ts|=l,ci===Ce&&(ci=0)),fn(e)}function Fd(e,t){t===0&&(t=Yc()),e=pl(e,t),e!==null&&(_i(e,t),fn(e))}function k1(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Fd(e,l)}function w1(e,t){var l=0;switch(e.tag){case 31:case 13:var i=e.stateNode,o=e.memoizedState;o!==null&&(l=o.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(u(314))}i!==null&&i.delete(t),Fd(e,l)}function E1(e,t){return Nl(e,t)}var Ur=null,pi=null,ss=!1,Br=!1,cs=!1,el=0;function fn(e){e!==pi&&e.next===null&&(pi===null?Ur=pi=e:pi=pi.next=e),Br=!0,ss||(ss=!0,C1())}function sa(e,t){if(!cs&&Br){cs=!0;do for(var l=!1,i=Ur;i!==null;){if(e!==0){var o=i.pendingLanes;if(o===0)var s=0;else{var g=i.suspendedLanes,v=i.pingedLanes;s=(1<<31-qe(42|e)+1)-1,s&=o&~(g&~v),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,Wd(i,s))}else s=Ce,s=Ga(i,i===Ye?s:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(s&3)===0||zi(i,s)||(l=!0,Wd(i,s));i=i.next}while(l);cs=!1}}function A1(){Id()}function Id(){Br=ss=!1;var e=0;el!==0&&L1()&&(e=el);for(var t=yt(),l=null,i=Ur;i!==null;){var o=i.next,s=Jd(i,t);s===0?(i.next=null,l===null?Ur=o:l.next=o,o===null&&(pi=l)):(l=i,(e!==0||(s&3)!==0)&&(Br=!0)),i=o}at!==0&&at!==5||sa(e),el!==0&&(el=0)}function Jd(e,t){for(var l=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes&-62914561;0v)break;var q=E.transferSize,X=E.initiatorType;q&&rp(X)&&(E=E.responseEnd,g+=q*(E"u"?null:document;function bp(e,t,l){var i=mi;if(i&&typeof t=="string"&&t){var o=Vt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),yp.has(o)||(yp.add(o),e={rel:e,crossOrigin:l,href:t},i.querySelector(o)===null&&(t=i.createElement("link"),dt(t,"link",e),rt(t),i.head.appendChild(t)))}}function Q1(e){Nn.D(e),bp("dns-prefetch",e,null)}function K1(e,t){Nn.C(e,t),bp("preconnect",e,t)}function Z1(e,t,l){Nn.L(e,t,l);var i=mi;if(i&&e&&t){var o='link[rel="preload"][as="'+Vt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+Vt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+Vt(l.imageSizes)+'"]')):o+='[href="'+Vt(e)+'"]';var s=o;switch(t){case"style":s=gi(e);break;case"script":s=yi(e)}$t.has(s)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),$t.set(s,e),i.querySelector(o)!==null||t==="style"&&i.querySelector(da(s))||t==="script"&&i.querySelector(pa(s))||(t=i.createElement("link"),dt(t,"link",e),rt(t),i.head.appendChild(t)))}}function F1(e,t){Nn.m(e,t);var l=mi;if(l&&e){var i=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Vt(i)+'"][href="'+Vt(e)+'"]',s=o;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=yi(e)}if(!$t.has(s)&&(e=y({rel:"modulepreload",href:e},t),$t.set(s,e),l.querySelector(o)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(pa(s)))return}i=l.createElement("link"),dt(i,"link",e),rt(i),l.head.appendChild(i)}}}function I1(e,t,l){Nn.S(e,t,l);var i=mi;if(i&&e){var o=Bl(i).hoistableStyles,s=gi(e);t=t||"default";var g=o.get(s);if(!g){var v={loading:0,preload:null};if(g=i.querySelector(da(s)))v.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=$t.get(s))&&Cs(e,l);var E=g=i.createElement("link");rt(E),dt(E,"link",e),E._p=new Promise(function(M,q){E.onload=M,E.onerror=q}),E.addEventListener("load",function(){v.loading|=1}),E.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Vr(g,t,i)}g={type:"stylesheet",instance:g,count:1,state:v},o.set(s,g)}}}function J1(e,t){Nn.X(e,t);var l=mi;if(l&&e){var i=Bl(l).hoistableScripts,o=yi(e),s=i.get(o);s||(s=l.querySelector(pa(o)),s||(e=y({src:e,async:!0},t),(t=$t.get(o))&&Ts(e,t),s=l.createElement("script"),rt(s),dt(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(o,s))}}function $1(e,t){Nn.M(e,t);var l=mi;if(l&&e){var i=Bl(l).hoistableScripts,o=yi(e),s=i.get(o);s||(s=l.querySelector(pa(o)),s||(e=y({src:e,async:!0,type:"module"},t),(t=$t.get(o))&&Ts(e,t),s=l.createElement("script"),rt(s),dt(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(o,s))}}function vp(e,t,l,i){var o=(o=oe.current)?Gr(o):null;if(!o)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=gi(l.href),l=Bl(o).hoistableStyles,i=l.get(t),i||(i={type:"style",instance:null,count:0,state:null},l.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=gi(l.href);var s=Bl(o).hoistableStyles,g=s.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,g),(s=o.querySelector(da(e)))&&!s._p&&(g.instance=s,g.state.loading=5),$t.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},$t.set(e,l),s||W1(o,e,l,g.state))),t&&i===null)throw Error(u(528,""));return g}if(t&&i!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=yi(l),l=Bl(o).hoistableScripts,i=l.get(t),i||(i={type:"script",instance:null,count:0,state:null},l.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function gi(e){return'href="'+Vt(e)+'"'}function da(e){return'link[rel="stylesheet"]['+e+"]"}function xp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function W1(e,t,l,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),dt(t,"link",l),rt(t),e.head.appendChild(t))}function yi(e){return'[src="'+Vt(e)+'"]'}function pa(e){return"script[async]"+e}function Sp(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Vt(l.href)+'"]');if(i)return t.instance=i,rt(i),i;var o=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),rt(i),dt(i,"style",o),Vr(i,l.precedence,e),t.instance=i;case"stylesheet":o=gi(l.href);var s=e.querySelector(da(o));if(s)return t.state.loading|=4,t.instance=s,rt(s),s;i=xp(l),(o=$t.get(o))&&Cs(i,o),s=(e.ownerDocument||e).createElement("link"),rt(s);var g=s;return g._p=new Promise(function(v,E){g.onload=v,g.onerror=E}),dt(s,"link",i),t.state.loading|=4,Vr(s,l.precedence,e),t.instance=s;case"script":return s=yi(l.src),(o=e.querySelector(pa(s)))?(t.instance=o,rt(o),o):(i=l,(o=$t.get(s))&&(i=y({},l),Ts(i,o)),e=e.ownerDocument||e,o=e.createElement("script"),rt(o),dt(o,"link",i),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Vr(i,l.precedence,e));return t.instance}function Vr(e,t,l){for(var i=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=i.length?i[i.length-1]:null,s=o,g=0;g title"):null)}function P1(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ep(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function eb(e,t,l,i){if(l.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var o=gi(i.href),s=t.querySelector(da(o));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Qr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=s,rt(s);return}s=t.ownerDocument||t,i=xp(i),(o=$t.get(o))&&Cs(i,o),s=s.createElement("link"),rt(s);var g=s;g._p=new Promise(function(v,E){g.onload=v,g.onerror=E}),dt(s,"link",i),l.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Qr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var zs=0;function tb(e,t){return e.stylesheets&&e.count===0&&Zr(e,e.stylesheets),0zs?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(o)}}:null}function Qr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Kr=null;function Zr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Kr=new Map,t.forEach(nb,e),Kr=null,Qr.call(e))}function nb(e,t){if(!(t.state.loading&4)){var l=Kr.get(e);if(l)var i=l.get(null);else{l=new Map,Kr.set(e,l);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Us.exports=vb(),Us.exports}var Sb=xb();const kb='---\ntitle: "Agents"\ndescription: "The research agent roster — a default research agent, three domain specialists, critique sub-agents, and a read-only plan mode — plus how to build your own."\nicon: "bot"\n---\n\nThe default agent is `research`, a scientific research agent that runs the whole loop: literature review, hypothesis, code, experiments on real compute, analysis, and write-up. Three domain specialists ship alongside it, backed by read-only critique sub-agents and a `plan` mode that cannot edit files.\n\n## Built-in roster\n\n| Agent | Role | What it does |\n| --- | --- | --- |\n| `research` | Default | Scientific research across the full skill library — literature, data analysis, GPU compute, and synthesis. |\n| `biology` | Specialist | Computational biology: bioinformatics workflows and 30+ biological database integrations. |\n| `physics` | Specialist | Computational physics: simulation, PDE solving, dynamical systems, symbolic regression. |\n| `ml` | Specialist | Trains, evaluates, and analyzes models end to end — deep learning, LLMs, classical ML, RL. |\n| `plan` | Mode | Read-only planning. Edit tools are disabled except for plan files. |\n\nTwo sub-agents back the roster. The main agent delegates to them like tools:\n\n| Sub-agent | What it does |\n| --- | --- |\n| `critique` | Read-only scientific critique. Finds blocking errors — data leakage, wrong statistics, unsupported claims — before expensive or irreversible actions. |\n| `literature-review` | Full PRISMA literature review: systematic search, screening, eligibility, synthesis, verification. |\n\nRun `openscience agent list` to print the complete set on your install, including utility sub-agents like `explore` and `reviewer`.\n\n## Pick an agent\n\n```bash\n# one-shot run with a specific agent\nopenscience run --agent physics "Fit the dispersion relation in data/spectra.csv"\n```\n\nIn the workspace, switch agents from the session picker. To change the default, set `default_agent` in `openscience.json`. Only agents with mode `primary` or `all` can lead a session; `subagent` profiles are reachable only by delegation.\n\n## Create a custom agent\n\n`openscience agent create` walks you through it interactively. The non-interactive form:\n\n```bash\nopenscience agent create \\\n --path .openscience \\\n --description "Reviews analysis notebooks for data leakage and unsound statistics" \\\n --mode subagent \\\n --tools "read,grep,glob" \\\n --model anthropic/claude-sonnet-5\n```\n\n| Flag | Use |\n| --- | --- |\n| `--path ` | Where to write the definition; an `agent/` folder is created inside it. Omit to choose project or global interactively. |\n| `--description ` | What the agent is for. A model expands this into the name, system prompt, and delegation description. |\n| `--mode ` | `primary`: leads a session. `subagent`: only reachable by delegation. `all`: both. |\n| `--tools ` | Allow-list of tools. Anything left off the list is disabled. |\n| `--model ` | Default model for this agent. |\n\nThe result is a Markdown file: YAML frontmatter (description, mode, tools) plus a body that is the system prompt. Edit it like any prose file.\n\n## Tool restrictions\n\n`--tools "read,grep,glob"` produces a read-only agent that cannot be tricked into editing files. The available tools are `bash`, `read`, `write`, `edit`, `list`, `glob`, `grep`, `webfetch`, `task`, `todowrite`, and `todoread` — run `openscience agent create --help` for the list on your version.\n\n## Where agents live\n\n```text\n.openscience/agent/ # project-scoped\n~/.config/openscience/agent/ # user-global\n # ships with OpenScience\n```\n\nResolution is project-local, then user-global, then built-in.\n\n## What\'s next\n\n\n \n The 250+ skill library the agents draw on.\n \n \n Start, resume, and share sessions with any agent.\n \n \n Per-agent default models and provider routing.\n \n \n Full `agent create` and `agent list` reference.\n \n\n',wb=`--- +title: "Connect to Atlas" +description: "Optionally link OpenScience to the Atlas managed platform for wallet-billed frontier models, synced credentials, and research recorded into Atlas Graphs." +icon: "link" +--- + +OpenScience never requires an account: bring-your-own-key usage is free and never gated. Atlas is the managed platform, and connecting to it is optional. Atlas only meters the models it serves. + +## What connecting adds + +- **A managed model route.** Curated frontier models billed from a prepaid wallet, so you do not need per-provider keys. The default endpoint is \`app.syntheticsciences.ai\` (override with \`OPENSCIENCE_API_BASE\`). +- **Spend controls.** Managed/BYOK toggles for LLM and compute spend, per surface, in **Settings → Billing** on the dashboard. +- **Synced service credentials.** Store cloud and ML keys (Hugging Face, W&B, Modal, and others) once on your account and pull them to any machine. +- **Research graphs.** Record sessions and findings into Atlas Graphs, the durable research map. + +## Link your account + + + + \`\`\`bash + openscience connect login + \`\`\` + Opens your browser to approve the device. On headless or CI machines, pass \`--no-browser\` and paste a key, or run \`openscience connect login --key thk_...\` with a key created at \`app.syntheticsciences.ai/cli\`. + + + \`\`\`bash + openscience connect status + \`\`\` + Shows the connected user, this device, and how many service credentials synced. + + + \`\`\`bash + openscience connect sync + \`\`\` + Refreshes synced service credentials after you change them on the dashboard. + + + +## Model routing and billing + +Key routing is per-provider and automatic: if you set a BYOK key for a provider, OpenScience uses it; otherwise the request goes through the Atlas managed route and debits your wallet. + +\`\`\`bash +openscience billing # wallet balance and current key routing +openscience billing topup # opens the Plan tab — $50 or $200, one-time or recurring monthly +\`\`\` + +Flip managed versus BYOK per surface (LLM and compute) in **Settings → Billing**. BYOK works on every plan. + +## Where credentials live + +Connected, your account holds the canonical copy of every synced credential; the local \`~/.config/openscience/credentials.json\` is a mirror you can delete and re-pull with \`openscience connect sync\`. In BYOK mode, keys exist only on your machine — see [Security](/openscience/security) for the storage and subprocess rules. + +## \`connect\` commands + +| Command | Use | +| --- | --- | +| \`openscience connect login\` | Authenticate via browser; \`--key thk_...\` or \`--no-browser\` for headless machines. | +| \`openscience connect status\` | Connection, user, device, and synced credential count. | +| \`openscience connect sync\` | Re-pull synced service credentials from the dashboard. | +| \`openscience connect devices\` | List authenticated devices; revoke from the Devices tab on the dashboard. | +| \`openscience connect logout\` | Disconnect this machine. BYOK keeps working. | + +## What's next + + + + Run one continuous research session end to end. + + + Every subcommand, including connect and billing. + + + BYOK provider setup and model selection. + + + What leaves your machine in each mode. + + +`,Eb='---\ntitle: "Command reference"\ndescription: "Every openscience subcommand: workspace, run, sessions, models, agents, skills, and lifecycle."\nicon: "terminal"\n---\n\nThe OpenScience command surface. For live help, run `openscience --help` and `openscience --help`.\n\nThe bare `openscience` (no arguments) starts the local server and opens the **browser workspace** in your working directory. Everything else is grouped below.\n\n## Global flags\n\n| Flag | Use |\n| --- | --- |\n| `-v, --version` | Print the installed version. |\n| `-h, --help` | Print help for a command. |\n| `--print-logs` | Stream agent diagnostics to stderr. |\n| `--log-level ` | Override the log threshold. |\n\n## Workspace and runs\n\n| Command | Use |\n| --- | --- |\n| `openscience` | Start the server and open the browser workspace. |\n| `openscience run [message..]` | One-shot prompt in the terminal; streams, then exits. |\n| `openscience session list` | List recent sessions (`-n`, `--format`). |\n\n`run` flags: `-c/--continue`, `-s/--session `, `-m/--model `, `--variant ` (provider-specific reasoning effort), `--agent `, `--format `, `-f/--file `, `--attach ` (attach to a running server, e.g. `http://localhost:4096`), `--port`, `--title `.\n\n```bash\nopenscience run "Plot the attention entropy across layers for this checkpoint"\nopenscience run -c "Now sweep the temperature and re-plot"\nopenscience run --format json "Summarize the experiment in results/" > summary.json\n```\n\n## Account\n\nConnecting an Atlas account is optional — see [Atlas](/openscience/atlas). OpenScience runs fully standalone with your own provider keys.\n\n| Command | Use |\n| --- | --- |\n| `openscience connect login` | Connect your Atlas account (browser flow, or `--key thk_…`). |\n| `openscience connect status` | Show the active account, default model, synced services, and credit. |\n| `openscience connect sync` | Re-pull synced credentials. |\n| `openscience connect devices` | List authorized devices. |\n| `openscience connect logout` | Disconnect this device from Atlas. |\n\n## Providers and routing\n\n| Command | Use |\n| --- | --- |\n| `openscience auth` | Interactive provider sign-in (BYOK keys; OAuth where supported). |\n| `openscience logout [provider]` | Log out of a connected provider. |\n| `openscience models` | List configured providers and their models. |\n| `openscience billing show` | Credit and recent managed-route usage (Atlas-connected mode). |\n| `openscience billing topup` | Open the app to add credit. |\n\n## Agent profiles\n\n| Command | Use |\n| --- | --- |\n| `openscience agent list` | Print the agent roster on this install. |\n| `openscience agent create` | Scaffold a custom agent (system prompt + tool set + routing policy). |\n\nFlags: `--path`, `--description`, `--mode `, `--tools`, `--model`. See [Agents](/openscience/agents).\n\n## Skills\n\n| Command | Use |\n| --- | --- |\n| `openscience skill list` | Show installed skills (`--all` for the bundled set). |\n| `openscience skill show ` | Print a skill\'s metadata and entrypoints. |\n| `openscience skill add ` | Install a skill (URL or `gh:owner/repo`). |\n| `openscience skill new` / `edit` / `validate` | Author, edit, and check user skills. |\n| `openscience skill remove ` | Uninstall a skill. |\n| `openscience skill set-entries ` | Update which skills surface in the `/` picker. |\n\n## Local server and protocols\n\n| Command | Use |\n| --- | --- |\n| `openscience web` | Start the server and open the browser workspace (prints the URL, e.g. `http://localhost:4096`). |\n| `openscience serve` | Headless local server — loopback-only (`127.0.0.1`), no browser. |\n| `openscience acp` | Start an Agent Client Protocol server for editors like Zed. |\n| `openscience mcp` | Manage MCP servers (`list`, `add`, `remove`, `auth`). |\n\n`web` and `serve` take `--port` and `--cors`. See [Workspace](/openscience/workspace).\n\n## GitHub and PRs\n\n| Command | Use |\n| --- | --- |\n| `openscience github` | GitHub agent for CI/Actions (`install`, `run`). |\n| `openscience pr ` | Check out a PR branch, then launch the agent on it. |\n\n## Project and lifecycle\n\n| Command | Use |\n| --- | --- |\n| `openscience project` | Pin the Atlas project root for this folder (`merge`). |\n| `openscience export` / `openscience import` | Export or import a session as JSON. |\n| `openscience generate` | Emit the OpenAPI spec for the local server to stdout. |\n| `openscience stats` | Local token-usage and cost stats. |\n| `openscience debug` | Structured diagnostics for support (`debug paths` shows data/config dirs). |\n| `openscience upgrade` | Update to the latest version. |\n| `openscience uninstall` | Remove the binary and local config. |\n| `openscience completion` | Shell completion for bash, zsh, or fish. |\n\n```bash\nopenscience upgrade\nopenscience completion zsh > ~/.zsh/completions/_openscience\n```\n\n## What\'s next\n\n\n \n The browser workspace: files, editor, terminal, inline scientific rendering.\n \n \n Credential boundary, env hygiene, the trust boundary.\n \n \n 250+ research skills and the scientific databases.\n \n \n The research agent, the specialists, and custom profiles.\n \n\n',Ab=`--- +title: "OpenScience" +description: "The open-source AI workbench for scientific research. Give it a goal — it reads the literature, writes and runs code, runs the experiments, and writes up what it found." +icon: "flask-conical" +--- + + + +OpenScience is an AI workbench for scientific research. You give it a goal, and it works through the research loop the way a capable collaborator would: it reads the papers that matter, forms a hypothesis, writes and runs code, runs experiments on real compute, queries the major scientific databases, and writes up the result. + +It runs as a workspace in your browser, works with any frontier or open-weight model using your own API keys, and requires no account. It is model-agnostic, Apache-2.0 licensed, and built to do real work in machine learning, biology, physics, and chemistry. + +\`\`\`bash +npm install -g @synsci/openscience +openscience +\`\`\` + +That's the whole install. The command is \`openscience\`, and it opens the workspace in your browser. Prefer not to install globally? \`npx synsci\` does the same thing in one step. + +## What we built + +Everything below ships in the open-source CLI — no gated tiers, no server-side magic you can't read. + + + + Literature review, hypothesis, code, experiment, analysis, and write-up in one continuous session. Queue follow-up prompts while it streams; rewind with undo-from-here. + + + A \`research\` agent by default, plus \`biology\`, \`physics\`, and \`ml\` specialists — with critique and literature-review sub-agents and a read-only plan mode. + + + Training (DeepSpeed, PEFT, TRL), evaluation, dataset work, molecular and clinical biology, cheminformatics, papers and LaTeX, figures, and cloud compute. + + + UniProt, PDB, Ensembl, ChEMBL, PubChem, arXiv, OpenAlex, Semantic Scholar, and around 30 more, queryable directly by the agent. + + + A browser UI with a file tree, an editor, a terminal, session history, and inline rendering for molecules, structures, genomes, and plots. + + + LSP integration, MCP servers, plugins, custom agents and commands, and a TypeScript SDK. + + + +## Any model, your keys + +Set an API key from any provider and start working. Keys stay on your machine. + +\`\`\`bash +export ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEY, GEMINI_API_KEY, ... +openscience +\`\`\` + +OpenScience routes to frontier and open-weight models from Anthropic, OpenAI, Google, and dozens of other providers. Reasoning-effort tiers are first-class: \`--variant high|max|minimal\` on any run. See [Models](/openscience/models). + +## Open source, all the way down + +The workbench is [Apache-2.0 on GitHub](https://github.com/synthetic-sciences/openscience). No account, no telemetry wall, no closed core: the agent loop, the skills, the database tools, and the workspace are all in the repo. Read it, fork it, extend it — and if it does real work for you, [star it](https://github.com/synthetic-sciences/openscience) so other researchers find it. + +- **Site** — [openscience.sh](https://openscience.sh) +- **Issues and ideas** — [github.com/synthetic-sciences/openscience/issues](https://github.com/synthetic-sciences/openscience/issues) +- **Releases and platform binaries** — [GitHub Releases](https://github.com/synthetic-sciences/openscience/releases) +- **Package** — [\`@synsci/openscience\` on npm](https://www.npmjs.com/package/@synsci/openscience) + +## Works with Atlas, never requires it + +Connect an Atlas account and OpenScience records its research into [Atlas graphs](/openscience/atlas) — durable hypotheses, runs, and decisions your whole team can audit — plus an optional managed model route with spend controls. Standalone mode keeps everything local. See [Connect to Atlas](/openscience/atlas). + +## Start here + + + + Install, set a key, and run your first research session in five minutes. + + + A tour of the browser workspace and the local server behind it. + + +`,Cb=`--- +title: "Models & providers" +description: "Bring your own keys for any provider, switch models per run, and optionally route through Atlas managed." +icon: "package-check" +--- + +OpenScience is model-agnostic. A **model** is one inference endpoint the agent routes through; a **provider** is a vendor that exposes models. Routing happens on your machine: with your own keys (the default), each call goes straight from your machine to the provider — no gateway in the middle, no account required. + +## Bring your own keys + +Set a key from any provider and start working: + +\`\`\`bash +export ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEY, GEMINI_API_KEY, ... +openscience +\`\`\` + +Keys stay on your machine. Anthropic, OpenAI, Google, OpenRouter, Groq, Mistral, xAI, DeepSeek, and dozens more work the same way — the catalogue is models.dev-backed, so any \`provider/model\` id a provider currently exposes is addressable. You can also paste keys into the Credentials panel in the [workspace](/openscience/workspace) instead of exporting them, and OpenAI Codex signs in via OAuth. + +## List what is configured + +\`\`\`bash +openscience models # grouped by provider, with a routing label per provider +openscience models anthropic # one provider +\`\`\` + +Each provider is labeled \`your key\`, \`managed\`, \`Signed in with Codex\`, or \`unconfigured\`, so you always know which route a model takes. \`--verbose\` adds per-model metadata like costs, \`--refresh\` refetches the catalogue, and \`--flat\` prints one \`provider/model\` id per line for scripting. + +## Pick a model per run + +\`\`\`bash +openscience run --model anthropic/claude-opus-4-8 --variant xhigh "Design the ablation study" +openscience run --model anthropic/claude-sonnet-5 "Clean up the plotting code" +\`\`\` + +\`--model /\` overrides the default for one run; in the workspace, use the model selector per session. \`--variant\` picks a reasoning-effort tier — \`minimal\`, \`high\`, \`max\`, and so on. Available tiers depend on the model: Claude Opus 4.8 exposes the full range up to \`xhigh\` and \`max\`; other adaptive Claude models cap at \`max\`. + +## Atlas managed (optional) + +[Atlas](/openscience/atlas) is the managed platform. Connecting adds a curated set of frontier models billed from a prepaid wallet, so you can skip per-provider keys entirely: + +\`\`\`bash +openscience connect login # defaults to app.syntheticsciences.ai +\`\`\` + +Once connected, launching the workspace syncs your provider config and credentials, and Settings → Billing has independent managed/BYOK spend toggles for LLM calls and compute — mix routes freely, per concern. BYOK usage is always free and never gated; Atlas only meters the models it serves. + +| Path | What runs where | Billing | +| --- | --- | --- | +| BYOK (default) | Your machine calls the provider directly. | Your provider account. | +| Atlas managed | Your machine calls Atlas, which calls the provider. | Prepaid wallet. See [Connect to Atlas](/openscience/atlas). | + +## Key hygiene + +Provider keys and synced credentials are filtered out of the environment of every subprocess the agent spawns and redacted from output. The agent talks to providers itself; the code it runs never needs your keys. Credentials are stored per user in your home directory, never in the project's \`.openscience/\` directory, so they cannot end up in a commit. See [Security](/openscience/security). + +## What's next + + + + First key to first result. + + + Per-run model and variant flags in context. + + + What connecting to Atlas adds. + + + The env allow-list and trust boundary. + + +`,Tb=`--- +title: "Quickstart" +description: "Install OpenScience, set a provider key, and run your first research session." +icon: "rocket" +--- + +Five minutes from zero to a running research session. No account required. + + + + \`\`\`bash + npm install -g @synsci/openscience + \`\`\` + + Or without a global install, \`npx synsci\` runs the same workbench in one step. The install script (\`curl -fsSL https://openscience.sh/install | bash\`) drops a standalone \`openscience\` binary into \`~/.openscience/bin\`, and platform binaries are attached to every [GitHub release](https://github.com/synthetic-sciences/openscience/releases). + + + \`\`\`bash + export ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEY, GEMINI_API_KEY, ... + \`\`\` + + Any provider works — bring your own key and it stays on your machine. \`openscience auth\` gives you an interactive sign-in for providers that support it. See [Models](/openscience/models) for routing and reasoning-effort tiers. + + + \`\`\`bash + openscience + \`\`\` + + The command starts a local server and opens the browser workspace: file tree, editor, terminal, and session history, with inline rendering for molecules, structures, genomes, and plots. See [Workspace](/openscience/workspace). + + + Ask for the outcome, not the steps. The default \`research\` agent plans, reads, codes, runs, and reports: + + \`\`\`text + Reproduce the headline result of arXiv:2305.13245 on a small model + and tell me whether it holds at 125M parameters. + \`\`\` + + Prefer the terminal? One-shot runs work without the browser: + + \`\`\`bash + openscience run "Profile train.py and find the input-pipeline bottleneck" + \`\`\` + + + \`\`\`bash + openscience connect login + \`\`\` + + Connecting an [Atlas](/openscience/atlas) account records your research into durable graphs and unlocks a managed model route with spend controls. OpenScience never requires it. See [Connect to Atlas](/openscience/atlas). + + + +## Verify the install + +\`\`\`bash +openscience --version +openscience models # configured providers and models +openscience skill list # installed skills +\`\`\` + +## Where next + + + + The research agent, the biology / physics / ml specialists, and plan mode. + + + Every subcommand: runs, sessions, skills, server, lifecycle. + + +`,zb='---\ntitle: "Security"\ndescription: "The trust boundary, credential storage, and subprocess environment hygiene — in an open-source agent you can audit end to end."\nicon: "shield-check"\n---\n\nOpenScience is open source under Apache-2.0, so the whole security model below is auditable in the [repository](https://github.com/synthetic-sciences/openscience). The agent runs locally with the same filesystem and shell access you have. Two principles anchor the design: keep credentials out of subprocesses that do not need them, and make the trust boundary explicit instead of pretending the agent is a sandbox.\n\n## The agent is not a sandbox\n\nThe permission system prompts you before the agent runs a command or writes a file. That keeps you aware of what it is doing — it is not an isolation boundary. The agent can read, write, and execute anywhere your user can. For real isolation, run OpenScience inside a container or a VM.\n\n## Credential storage\n\n| Surface | Where | Notes |\n| --- | --- | --- |\n| BYOK provider keys | Environment variables or the local credential store | Never leave your machine; requests go straight to the provider. No account required. |\n| Atlas session | `~/.config/openscience/config.json` | `thk_*` key created by `openscience connect login`; revocable from the dashboard. |\n| Synced service credentials | `~/.config/openscience/credentials.json` | Present only when [connected to Atlas](/openscience/atlas); refresh with `openscience connect sync`. |\n| Native binary (curl install) | `~/.openscience/bin/openscience` | Added to PATH through your shell rc. |\n\nOverride the config parent directory with `XDG_CONFIG_HOME`.\n\n## Subprocess environment allow-list\n\nWhen the agent shells out, it rebuilds the subprocess environment from a curated allow-list rather than inheriting your full shell. Provider keys stay out of commands that have no business seeing them.\n\n**Always passed through:** `PATH`, `HOME`, `USER`, `SHELL`, `TERM`, `LANG`, `LC_*`, `TMPDIR`, `XDG_*`, `EDITOR`, `VISUAL`.\n\n**Passed through only when a subprocess needs them:** `HF_TOKEN`, `WANDB_API_KEY`, `MODAL_TOKEN_ID`, `MODAL_TOKEN_SECRET`, `LAMBDA_API_KEY`, `RUNPOD_API_KEY`, `PRIME_INTELLECT_API_KEY`, `TENSORPOOL_API_KEY`, `VAST_API_KEY`, `TINKER_API_KEY`, `LANGSMITH_API_KEY`, `PINECONE_API_KEY`, `TOGETHER_API_KEY`, `GROQ_API_KEY`, `FIREWORKS_API_KEY`, `OPENROUTER_API_KEY`.\n\n**Explicitly filtered out, even if set in your shell:** `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_GENERATIVE_AI_API_KEY`, `GEMINI_API_KEY`. The agent talks to model providers itself; subprocesses do not need these keys.\n\n## Output redaction\n\nKnown credential patterns are redacted from agent output before it lands in a transcript. If you spot an unredacted secret, report it (see below).\n\n## Server mode\n\nServer mode is opt-in. The server binds to localhost (127.0.0.1) only and enforces a Host and Origin allowlist to block DNS-rebinding and cross-origin requests. It is not built for remote exposure — if you tunnel or reverse-proxy it, securing that exposure is on you.\n\n## What leaves your machine\n\n- Prompts and responses sent to your model provider, governed by that provider\'s policy.\n- Nothing else, in BYOK mode. If you [connect to Atlas](/openscience/atlas), synced credentials and usage metering are held against your account.\n\nSource files stay local unless the agent explicitly uploads them through a tool you approve, and local environment variables outside the allow-list above are never forwarded.\n\n## Reporting a vulnerability\n\nReport security issues through the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/synthetic-sciences/openscience/security/advisories/new) form — not on public issue trackers. If you do not hear back within six business days, email security@syntheticsciences.ai.\n',_b='---\ntitle: "Sessions & one-shot runs"\ndescription: "One agent conversation: history, tool calls, and a working directory. Create, resume, attach, and export."\nicon: "layers"\n---\n\nA **session** is a single agent conversation: a thread of prompts and replies, the tool calls the agent made, and the working directory those calls ran against. Sessions are stored on disk, so everything below works offline and without an account.\n\n## Start a session\n\n| Entrypoint | Use |\n| --- | --- |\n| `openscience` | Open the [browser workspace](/openscience/workspace) in the current directory. |\n| `openscience run [message..]` | Send one prompt from the terminal, stream the result, and exit. Good for pipelines, CI, and git hooks. |\n| `openscience serve` | Start a headless server (no browser) for `run --attach` to target. |\n\nThe workspace is interactive; `openscience run` is the one to script. Each produces a session you can resume from either surface.\n\n## One-shot runs\n\n```bash\nopenscience run "Set up a DFT optimization for this structure" -f data/sample.cif\ngit diff | openscience run "Review this diff for race conditions"\n```\n\nPiped stdin is appended to the message. `openscience run` supports:\n\n| Flag | Use |\n| --- | --- |\n| `-c, --continue` | Continue the most recent session. |\n| `-s, --session ` | Continue a specific session by id. |\n| `-m, --model ` | Model for this run, e.g. `anthropic/claude-opus-4-8`. See [Models](/openscience/models). |\n| `--variant ` | Reasoning-effort tier (`high`, `max`, `minimal`; model-dependent). |\n| `--agent ` | Run a specific primary agent. See [Agents](/openscience/agents). |\n| `--command ` | Run a custom command, with the message as its arguments. |\n| `-f, --file ` | Attach a local file to the message (repeatable). |\n| `--title ` | Title for the session in `session list`. |\n| `--format ` | `json` emits one JSON event per line (`tool_use`, `step_start`, `step_finish`, `text`, `error`), tagged with the session id — pipe it to a file and parse line by line. |\n| `--attach ` | Send the prompt to a running server instead of starting one. |\n| `--port ` | Port for the throwaway local server (random by default). |\n\nTo pick up a file, always use `-f`; `--attach` targets a server, it does not fetch documents.\n\n## Continue or resume\n\n```bash\nopenscience session list # recent sessions (-n 10 to cap, --format json)\nopenscience run -c "Now add tests for the refactored module"\nopenscience run -s ses_8f2ka91xk "Rerun the sweep with lr=3e-4"\n```\n\n`session list` prints a table of ids, titles, and update times (paged through `less` in a terminal). In the workspace, the same sessions appear in the session history pane, where you can also queue prompts and undo from any message.\n\n## Attach to a running server\n\nLeave `openscience serve` (or the workspace) running and drive it from another terminal:\n\n```bash\nopenscience run --attach http://localhost:4096 "Summarize today\'s results" # new session on the server\nopenscience run --attach http://localhost:4096 -s ses_8f2ka91xk "Continue" # a specific session (-c: latest)\n```\n\nThe run shares the server\'s sessions, so work started in the browser continues from the terminal and vice versa.\n\n## Export and import\n\n```bash\nopenscience export ses_8f2ka91xk > session.json # no id: interactive picker\nopenscience import session.json\n```\n\n`export` writes the full session as JSON to stdout; `import` loads it on another machine. Useful for sharing reproductions or attaching a transcript to an issue.\n\n## What\'s next\n\n\n \n The browser surface for the same sessions.\n \n \n Per-run and per-session model choice.\n \n \n Primary agents, specialists, and plan mode.\n \n \n The full command reference.\n \n\n',Ob=`--- +title: "Skills" +description: "250+ bundled research skills, direct access to around 30 scientific databases, and commands for installing, writing, and pinning skills." +icon: "book-open" +--- + +A **skill** is a portable instruction bundle the agent loads into a session to prime it for a domain. OpenScience ships more than 250 of them, spanning the surface a working scientist actually hits. + +## Built-in categories + +| Category | Covers | +| --- | --- | +| Training | DeepSpeed, PEFT, TRL, distributed and parameter-efficient fine-tuning. | +| Evaluation | Harnesses, benchmarks, regression suites. | +| Datasets | Acquisition, cleaning, splits, augmentation. | +| Molecular & clinical biology | Sequence analysis, structures, omics, clinical data workflows. | +| Cheminformatics | Molecule handling, descriptors, property prediction. | +| Papers & LaTeX | Manuscript drafting, citations, submission-ready LaTeX. | +| Figures | Publication-quality plots and layouts. | +| Cloud compute | Modal, Tinker, and other GPU backends. | + +Run \`openscience skill list --all\` to print the full bundled set, grouped by category. + +## Scientific databases + +The major scientific databases are wired in as tools, not skills: UniProt, PDB, Ensembl, ChEMBL, PubChem, arXiv, OpenAlex, Semantic Scholar, and around 30 in total. The agent queries them directly during a session — no API keys, no manual downloads — and the specialist agents lean on them heavily (see [Agents](/openscience/agents)). + +## Skill commands + +| Command | Use | +| --- | --- | +| \`openscience skill list\` | Show learned and installed skills; \`--all\` includes the bundled set. | +| \`openscience skill show [/]\` | Namespace summary, or a single skill's full \`SKILL.md\`. | +| \`openscience skill add \` | Install every skill from a public git repo; \`gh:owner/repo\` shorthand works. Runs a safety review. | +| \`openscience skill new \` | Scaffold a local user skill. | +| \`openscience skill edit \` | Open a user skill in \`$EDITOR\`. | +| \`openscience skill validate \` | Check a skill's frontmatter and safety (\`--strict\` fails on warnings). | +| \`openscience skill set-entries \` | Choose which skills in a namespace surface in the \`/\` picker. | +| \`openscience skill remove \` | Uninstall a skill or a whole namespace. | + +## Install third-party skills + +\`\`\`bash +openscience skill add gh:anthropics/superpowers +openscience skill list +\`\`\` + +Each skill in the repo passes a static safety check and an LLM safety review before it installs; rejected skills are skipped and reported. Installed skills are namespaced by repo, so \`remove \` uninstalls the whole set. + +## Write your own + +\`\`\`bash +openscience skill new leakage-checks --description "Checklists for spotting data leakage" --editor +\`\`\` + +A skill is a \`SKILL.md\` file with \`name\`, \`description\`, and \`category\` frontmatter and an instruction body. Iterate with \`openscience skill edit\` and check it with \`openscience skill validate\`. + +## Pin skills to a project + +Point the project config at extra skill folders with \`skills.paths\` in \`openscience.json\` at the project root: + +\`\`\`json +{ + "skills": { "paths": ["./skills", "../shared-skills"] } +} +\`\`\` + +Sessions started in that directory load those skills, so teammates and CI get the same primed agent. Existing \`.claude/skills/\` directories are picked up unchanged. + +## What's next + + + + Pair skills with custom agent profiles to build specialists. + + + Full \`skill\` subcommand reference. + + + How the safety review and the subprocess allow-list protect you. + + + Sync the cloud and ML credentials a skill needs. + + +`,Mb=`--- +title: "Workspace" +description: "The bare openscience command opens the browser workspace: files, editor, terminal, sessions, and inline scientific rendering." +icon: "app-window" +--- + +The workspace is how you use OpenScience. Run the bare command and it starts a local server, opens your browser, and gives you the full research surface: a file tree, an editor, a terminal, session history, and inline rendering for molecules, structures, genomes, and plots. + +\`\`\`bash +openscience # open the workspace in the current directory +openscience ~/code/my-project # open it in a specific project +\`\`\` + +The server is local by design: it binds \`127.0.0.1\`, holds the agent in its own process, and serves the UI from the same port (\`http://localhost:4096\` by default; if 4096 is taken it falls back to a free port and prints the URL). Closing the browser tab does not kill the agent — reopen the URL to pick up where you left off. + +| Flag | Use | +| --- | --- | +| \`--port \` | Bind a specific local port instead of the default 4096. | +| \`--cors \` | Allow an extra CORS origin (repeatable). | + +The server always binds localhost — the deprecated \`server.hostname\` / \`server.mdns\` config keys are parsed but ignored. Persistent settings live in \`~/.config/openscience/openscience.json\` under \`server.port\` and \`server.cors\`. + +## What the workspace gives you + +- **File tree and editor.** Browse and edit the project the agent is working in; edits and diffs render inline. +- **Terminal.** A real shell in the project directory, alongside the agent's own tool calls. +- **Session history.** Every conversation is a session; switch between them without losing context. +- **Inline scientific rendering.** Molecules, protein structures, genomes, and plots render directly in the transcript instead of as file paths. +- **Prompt queueing.** Type your next prompt while the agent is still streaming; queued prompts run in order. +- **Undo from here.** Roll the session back to any message and take a different path from that point. +- **Model selector and credentials panel.** Pick any configured model per session and add provider keys without leaving the browser. See [Models](/openscience/models). + +## Headless server + +\`openscience serve\` starts the same server without opening a browser — useful for keeping a long-lived agent running that other terminals attach to. It takes the same \`--port\` and \`--cors\` flags and is loopback-only (\`127.0.0.1\`). + +\`\`\`bash +openscience serve --port 4096 +openscience run --attach http://localhost:4096 "Continue the ablation sweep" +\`\`\` + +There is no separate attach subcommand: \`openscience run --attach \` sends a one-shot prompt to the running server. See [Sessions](/openscience/sessions). + + +The workspace is intended for local use on a machine you control. The server binds \`127.0.0.1\` only and has no remote-access mode; do not reverse-proxy it to the public internet. + + +## macOS Full Disk Access + +On macOS, launching the workspace probes whether the binary can read \`~/Desktop\`. Without Full Disk Access, macOS silently returns empty listings for \`~/Desktop\`, \`~/Documents\`, and \`~/Downloads\`, so the folder picker and file tree look empty. If the probe fails, OpenScience opens System Settings on the Privacy & Security pane and prints the binary path to add: + +1. In **Full Disk Access**, click **+**, press ⌘⇧G, and paste the printed path. +2. Toggle the \`openscience\` entry on. +3. Quit (Ctrl+C) and relaunch \`openscience\`. + +## What's next + + + + Resume, attach, export, and one-shot runs. + + + BYOK providers and per-session model switching. + + + The research agent and its specialists. + + + The trust boundary and credential handling. + + +`,Db="https://mintlify.com/docs.json",Rb="OpenScience",Nb={tabs:[{tab:"Guides",groups:[{group:"Start",pages:["index","quickstart","workspace"]},{group:"Use the agent",pages:["agents","models","skills","sessions","atlas"]}]},{tab:"Reference",groups:[{group:"CLI",pages:["commands","security"]}]}],global:{anchors:[{anchor:"openscience.sh",href:"https://openscience.sh"},{anchor:"GitHub",href:"https://github.com/synthetic-sciences/openscience"},{anchor:"npm",href:"https://www.npmjs.com/package/@synsci/openscience"},{anchor:"Releases",href:"https://github.com/synthetic-sciences/openscience/releases"}]}},jb={primary:{type:"button",label:"Star on GitHub",href:"https://github.com/synthetic-sciences/openscience"}},Lb={$schema:Db,name:Rb,navigation:Nb,navbar:jb};function Ub(n,r){const a={};return(n[n.length-1]===""?[...n,""]:n).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const Bb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qb={};function Fp(n,r){return(qb.jsx?Hb:Bb).test(n)}const Yb=/[ \t\n\f\r]/g;function Gb(n){return typeof n=="object"?n.type==="text"?Ip(n.value):!1:Ip(n)}function Ip(n){return n.replace(Yb,"")===""}class Ra{constructor(r,a,u){this.normal=a,this.property=r,u&&(this.space=u)}}Ra.prototype.normal={};Ra.prototype.property={};Ra.prototype.space=void 0;function Vm(n,r){const a={},u={};for(const c of n)Object.assign(a,c.property),Object.assign(u,c.normal);return new Ra(a,u,r)}function ac(n){return n.toLowerCase()}class Ot{constructor(r,a){this.attribute=a,this.property=r}}Ot.prototype.attribute="";Ot.prototype.booleanish=!1;Ot.prototype.boolean=!1;Ot.prototype.commaOrSpaceSeparated=!1;Ot.prototype.commaSeparated=!1;Ot.prototype.defined=!1;Ot.prototype.mustUseProperty=!1;Ot.prototype.number=!1;Ot.prototype.overloadedBoolean=!1;Ot.prototype.property="";Ot.prototype.spaceSeparated=!1;Ot.prototype.space=void 0;let Vb=0;const ge=Ol(),lt=Ol(),rc=Ol(),I=Ol(),Ge=Ol(),zl=Ol(),Ht=Ol();function Ol(){return 2**++Vb}const uc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ge,booleanish:lt,commaOrSpaceSeparated:Ht,commaSeparated:zl,number:I,overloadedBoolean:rc,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),Ys=Object.keys(uc);class vc extends Ot{constructor(r,a,u,c){let h=-1;if(super(r,a),Jp(this,"space",c),typeof u=="number")for(;++h4&&a.slice(0,4)==="data"&&Fb.test(r)){if(r.charAt(4)==="-"){const h=r.slice(5).replace($p,$b);u="data"+h.charAt(0).toUpperCase()+h.slice(1)}else{const h=r.slice(4);if(!$p.test(h)){let f=h.replace(Zb,Jb);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}c=vc}return new c(u,r)}function Jb(n){return"-"+n.toLowerCase()}function $b(n){return n.charAt(1).toUpperCase()}const Wb=Vm([Xm,Xb,Zm,Fm,Im],"html"),xc=Vm([Xm,Qb,Zm,Fm,Im],"svg");function Pb(n){return n.join(" ").trim()}var vi={},Gs,Wp;function e0(){if(Wp)return Gs;Wp=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,a=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,h=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,p=/^\s+|\s+$/g,m=` +`,d="/",b="*",y="",S="comment",x="declaration";function T(K,D){if(typeof K!="string")throw new TypeError("First argument must be a string");if(!K)return[];D=D||{};var F=1,Q=1;function ue(J){var $=J.match(r);$&&(F+=$.length);var _=J.lastIndexOf(m);Q=~_?J.length-_:Q+J.length}function re(){var J={line:F,column:Q};return function($){return $.position=new L(J),me(),$}}function L(J){this.start=J,this.end={line:F,column:Q},this.source=D.source}L.prototype.content=K;function P(J){var $=new Error(D.source+":"+F+":"+Q+": "+J);if($.reason=J,$.filename=D.source,$.line=F,$.column=Q,$.source=K,!D.silent)throw $}function de(J){var $=J.exec(K);if($){var _=$[0];return ue(_),K=K.slice(_.length),$}}function me(){de(a)}function N(J){var $;for(J=J||[];$=te();)$!==!1&&J.push($);return J}function te(){var J=re();if(!(d!=K.charAt(0)||b!=K.charAt(1))){for(var $=2;y!=K.charAt($)&&(b!=K.charAt($)||d!=K.charAt($+1));)++$;if($+=2,y===K.charAt($-1))return P("End of comment missing");var _=K.slice(2,$-2);return Q+=2,ue(_),K=K.slice($),Q+=2,J({type:S,comment:_})}}function B(){var J=re(),$=de(u);if($){if(te(),!de(c))return P("property missing ':'");var _=de(h),Z=J({type:x,property:U($[0].replace(n,y)),value:_?U(_[0].replace(n,y)):y});return de(f),Z}}function le(){var J=[];N(J);for(var $;$=B();)$!==!1&&(J.push($),N(J));return J}return me(),le()}function U(K){return K?K.replace(p,y):y}return Gs=T,Gs}var Pp;function t0(){if(Pp)return vi;Pp=1;var n=vi&&vi.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(vi,"__esModule",{value:!0}),vi.default=a;const r=n(e0());function a(u,c){let h=null;if(!u||typeof u!="string")return h;const f=(0,r.default)(u),p=typeof c=="function";return f.forEach(m=>{if(m.type!=="declaration")return;const{property:d,value:b}=m;p?c(d,b,m):b&&(h=h||{},h[d]=b)}),h}return vi}var Sa={},em;function n0(){if(em)return Sa;em=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,a=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,c=/^-(ms)-/,h=function(d){return!d||a.test(d)||n.test(d)},f=function(d,b){return b.toUpperCase()},p=function(d,b){return"".concat(b,"-")},m=function(d,b){return b===void 0&&(b={}),h(d)?d:(d=d.toLowerCase(),b.reactCompat?d=d.replace(c,p):d=d.replace(u,p),d.replace(r,f))};return Sa.camelCase=m,Sa}var ka,tm;function l0(){if(tm)return ka;tm=1;var n=ka&&ka.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},r=n(t0()),a=n0();function u(c,h){var f={};return!c||typeof c!="string"||(0,r.default)(c,function(p,m){p&&m&&(f[(0,a.camelCase)(p,h)]=m)}),f}return u.default=u,ka=u,ka}var i0=l0();const a0=yc(i0),Jm=$m("end"),Sc=$m("start");function $m(n){return r;function r(a){const u=a&&a.position&&a.position[n]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function r0(n){const r=Sc(n),a=Jm(n);if(r&&a)return{start:r,end:a}}function Aa(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?nm(n.position):"start"in n||"end"in n?nm(n):"line"in n||"column"in n?oc(n):""}function oc(n){return lm(n&&n.line)+":"+lm(n&&n.column)}function nm(n){return oc(n&&n.start)+"-"+oc(n&&n.end)}function lm(n){return n&&typeof n=="number"?n:1}class gt extends Error{constructor(r,a,u){super(),typeof a=="string"&&(u=a,a=void 0);let c="",h={},f=!1;if(a&&("line"in a&&"column"in a?h={place:a}:"start"in a&&"end"in a?h={place:a}:"type"in a?h={ancestors:[a],place:a.position}:h={...a}),typeof r=="string"?c=r:!h.cause&&r&&(f=!0,c=r.message,h.cause=r),!h.ruleId&&!h.source&&typeof u=="string"){const m=u.indexOf(":");m===-1?h.ruleId=u:(h.source=u.slice(0,m),h.ruleId=u.slice(m+1))}if(!h.place&&h.ancestors&&h.ancestors){const m=h.ancestors[h.ancestors.length-1];m&&(h.place=m.position)}const p=h.place&&"start"in h.place?h.place.start:h.place;this.ancestors=h.ancestors||void 0,this.cause=h.cause||void 0,this.column=p?p.column:void 0,this.fatal=void 0,this.file="",this.message=c,this.line=p?p.line:void 0,this.name=Aa(h.place)||"1:1",this.place=h.place||void 0,this.reason=this.message,this.ruleId=h.ruleId||void 0,this.source=h.source||void 0,this.stack=f&&h.cause&&typeof h.cause.stack=="string"?h.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gt.prototype.file="";gt.prototype.name="";gt.prototype.reason="";gt.prototype.message="";gt.prototype.stack="";gt.prototype.column=void 0;gt.prototype.line=void 0;gt.prototype.ancestors=void 0;gt.prototype.cause=void 0;gt.prototype.fatal=void 0;gt.prototype.place=void 0;gt.prototype.ruleId=void 0;gt.prototype.source=void 0;const kc={}.hasOwnProperty,u0=new Map,o0=/[A-Z]/g,s0=new Set(["table","tbody","thead","tfoot","tr"]),c0=new Set(["td","th"]),Wm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function f0(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=r.filePath||void 0;let u;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=v0(a,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=b0(a,r.jsx,r.jsxs)}const c={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:u,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?xc:Wb,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},h=Pm(c,n,void 0);return h&&typeof h!="string"?h:c.create(n,c.Fragment,{children:h||void 0},void 0)}function Pm(n,r,a){if(r.type==="element")return h0(n,r,a);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return d0(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return m0(n,r,a);if(r.type==="mdxjsEsm")return p0(n,r);if(r.type==="root")return g0(n,r,a);if(r.type==="text")return y0(n,r)}function h0(n,r,a){const u=n.schema;let c=u;r.tagName.toLowerCase()==="svg"&&u.space==="html"&&(c=xc,n.schema=c),n.ancestors.push(r);const h=tg(n,r.tagName,!1),f=x0(n,r);let p=Ec(n,r);return s0.has(r.tagName)&&(p=p.filter(function(m){return typeof m=="string"?!Gb(m):!0})),eg(n,f,h,r),wc(f,p),n.ancestors.pop(),n.schema=u,n.create(r,h,f,a)}function d0(n,r){if(r.data&&r.data.estree&&n.evaluater){const u=r.data.estree.body[0];return u.type,n.evaluater.evaluateExpression(u.expression)}Ma(n,r.position)}function p0(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);Ma(n,r.position)}function m0(n,r,a){const u=n.schema;let c=u;r.name==="svg"&&u.space==="html"&&(c=xc,n.schema=c),n.ancestors.push(r);const h=r.name===null?n.Fragment:tg(n,r.name,!0),f=S0(n,r),p=Ec(n,r);return eg(n,f,h,r),wc(f,p),n.ancestors.pop(),n.schema=u,n.create(r,h,f,a)}function g0(n,r,a){const u={};return wc(u,Ec(n,r)),n.create(r,n.Fragment,u,a)}function y0(n,r){return r.value}function eg(n,r,a,u){typeof a!="string"&&a!==n.Fragment&&n.passNode&&(r.node=u)}function wc(n,r){if(r.length>0){const a=r.length>1?r:r[0];a&&(n.children=a)}}function b0(n,r,a){return u;function u(c,h,f,p){const d=Array.isArray(f.children)?a:r;return p?d(h,f,p):d(h,f)}}function v0(n,r){return a;function a(u,c,h,f){const p=Array.isArray(h.children),m=Sc(u);return r(c,h,f,p,{columnNumber:m?m.column-1:void 0,fileName:n,lineNumber:m?m.line:void 0},void 0)}}function x0(n,r){const a={};let u,c;for(c in r.properties)if(c!=="children"&&kc.call(r.properties,c)){const h=k0(n,c,r.properties[c]);if(h){const[f,p]=h;n.tableCellAlignToStyle&&f==="align"&&typeof p=="string"&&c0.has(r.tagName)?u=p:a[f]=p}}if(u){const h=a.style||(a.style={});h[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return a}function S0(n,r){const a={};for(const u of r.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&n.evaluater){const h=u.data.estree.body[0];h.type;const f=h.expression;f.type;const p=f.properties[0];p.type,Object.assign(a,n.evaluater.evaluateExpression(p.argument))}else Ma(n,r.position);else{const c=u.name;let h;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&n.evaluater){const p=u.value.data.estree.body[0];p.type,h=n.evaluater.evaluateExpression(p.expression)}else Ma(n,r.position);else h=u.value===null?!0:u.value;a[c]=h}return a}function Ec(n,r){const a=[];let u=-1;const c=n.passKeys?new Map:u0;for(;++uc?0:c+r:r=r>c?c:r,a=a>0?a:0,u.length<1e4)f=Array.from(u),f.unshift(r,a),n.splice(...f);else for(a&&n.splice(r,a);h0?(qt(n,n.length,0,r),n):r}const rm={}.hasOwnProperty;function lg(n){const r={};let a=-1;for(;++a13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function un(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xt=ol(/[A-Za-z]/),mt=ol(/[\dA-Za-z]/),M0=ol(/[#-'*+\--9=?A-Z^-~]/);function ou(n){return n!==null&&(n<32||n===127)}const sc=ol(/\d/),D0=ol(/[\dA-Fa-f]/),R0=ol(/[!-/:-@[-`{-~]/);function ce(n){return n!==null&&n<-2}function Ve(n){return n!==null&&(n<0||n===32)}function Ee(n){return n===-2||n===-1||n===32}const pu=ol(new RegExp("\\p{P}|\\p{S}","u")),_l=ol(/\s/);function ol(n){return r;function r(a){return a!==null&&a>-1&&n.test(String.fromCharCode(a))}}function Ai(n){const r=[];let a=-1,u=0,c=0;for(;++a55295&&h<57344){const p=n.charCodeAt(a+1);h<56320&&p>56319&&p<57344?(f=String.fromCharCode(h,p),c=1):f="�"}else f=String.fromCharCode(h);f&&(r.push(n.slice(u,a),encodeURIComponent(f)),u=a+c+1,f=""),c&&(a+=c,c=0)}return r.join("")+n.slice(u)}function _e(n,r,a,u){const c=u?u-1:Number.POSITIVE_INFINITY;let h=0;return f;function f(m){return Ee(m)?(n.enter(a),p(m)):r(m)}function p(m){return Ee(m)&&h++f))return;const P=r.events.length;let de=P,me,N;for(;de--;)if(r.events[de][0]==="exit"&&r.events[de][1].type==="chunkFlow"){if(me){N=r.events[de][1].end;break}me=!0}for(D(u),L=P;LQ;){const re=a[ue];r.containerState=re[1],re[0].exit.call(r,n)}a.length=Q}function F(){c.write([null]),h=void 0,c=void 0,r.containerState._closeFlow=void 0}}function B0(n,r,a){return _e(n,n.attempt(this.parser.constructs.document,r,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wi(n){if(n===null||Ve(n)||_l(n))return 1;if(pu(n))return 2}function mu(n,r,a){const u=[];let c=-1;for(;++c1&&n[a][1].end.offset-n[a][1].start.offset>1?2:1;const y={...n[u][1].end},S={...n[a][1].start};om(y,-m),om(S,m),f={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...n[u][1].end}},p={type:m>1?"strongSequence":"emphasisSequence",start:{...n[a][1].start},end:S},h={type:m>1?"strongText":"emphasisText",start:{...n[u][1].end},end:{...n[a][1].start}},c={type:m>1?"strong":"emphasis",start:{...f.start},end:{...p.end}},n[u][1].end={...f.start},n[a][1].start={...p.end},d=[],n[u][1].end.offset-n[u][1].start.offset&&(d=Pt(d,[["enter",n[u][1],r],["exit",n[u][1],r]])),d=Pt(d,[["enter",c,r],["enter",f,r],["exit",f,r],["enter",h,r]]),d=Pt(d,mu(r.parser.constructs.insideSpan.null,n.slice(u+1,a),r)),d=Pt(d,[["exit",h,r],["enter",p,r],["exit",p,r],["exit",c,r]]),n[a][1].end.offset-n[a][1].start.offset?(b=2,d=Pt(d,[["enter",n[a][1],r],["exit",n[a][1],r]])):b=0,qt(n,u-1,a-u+3,d),a=u+d.length-b-2;break}}for(a=-1;++a0&&Ee(L)?_e(n,F,"linePrefix",h+1)(L):F(L)}function F(L){return L===null||ce(L)?n.check(sm,U,ue)(L):(n.enter("codeFlowValue"),Q(L))}function Q(L){return L===null||ce(L)?(n.exit("codeFlowValue"),F(L)):(n.consume(L),Q)}function ue(L){return n.exit("codeFenced"),r(L)}function re(L,P,de){let me=0;return N;function N($){return L.enter("lineEnding"),L.consume($),L.exit("lineEnding"),te}function te($){return L.enter("codeFencedFence"),Ee($)?_e(L,B,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):B($)}function B($){return $===p?(L.enter("codeFencedFenceSequence"),le($)):de($)}function le($){return $===p?(me++,L.consume($),le):me>=f?(L.exit("codeFencedFenceSequence"),Ee($)?_e(L,J,"whitespace")($):J($)):de($)}function J($){return $===null||ce($)?(L.exit("codeFencedFence"),P($)):de($)}}}function J0(n,r,a){const u=this;return c;function c(f){return f===null?a(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),h)}function h(f){return u.parser.lazy[u.now().line]?a(f):r(f)}}const Xs={name:"codeIndented",tokenize:W0},$0={partial:!0,tokenize:P0};function W0(n,r,a){const u=this;return c;function c(d){return n.enter("codeIndented"),_e(n,h,"linePrefix",5)(d)}function h(d){const b=u.events[u.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?f(d):a(d)}function f(d){return d===null?m(d):ce(d)?n.attempt($0,f,m)(d):(n.enter("codeFlowValue"),p(d))}function p(d){return d===null||ce(d)?(n.exit("codeFlowValue"),f(d)):(n.consume(d),p)}function m(d){return n.exit("codeIndented"),r(d)}}function P0(n,r,a){const u=this;return c;function c(f){return u.parser.lazy[u.now().line]?a(f):ce(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),c):_e(n,h,"linePrefix",5)(f)}function h(f){const p=u.events[u.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?r(f):ce(f)?c(f):a(f)}}const ev={name:"codeText",previous:nv,resolve:tv,tokenize:lv};function tv(n){let r=n.length-4,a=3,u,c;if((n[a][1].type==="lineEnding"||n[a][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(u=a;++u=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(r,a,u){const c=a||0;this.setCursor(Math.trunc(r));const h=this.right.splice(this.right.length-c,Number.POSITIVE_INFINITY);return u&&wa(this.left,u),h.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),wa(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),wa(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(f):n.interrupt(u.parser.constructs.flow,a,r)(f)}}function sg(n,r,a,u,c,h,f,p,m){const d=m||Number.POSITIVE_INFINITY;let b=0;return y;function y(D){return D===60?(n.enter(u),n.enter(c),n.enter(h),n.consume(D),n.exit(h),S):D===null||D===32||D===41||ou(D)?a(D):(n.enter(u),n.enter(f),n.enter(p),n.enter("chunkString",{contentType:"string"}),U(D))}function S(D){return D===62?(n.enter(h),n.consume(D),n.exit(h),n.exit(c),n.exit(u),r):(n.enter(p),n.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===62?(n.exit("chunkString"),n.exit(p),S(D)):D===null||D===60||ce(D)?a(D):(n.consume(D),D===92?T:x)}function T(D){return D===60||D===62||D===92?(n.consume(D),x):x(D)}function U(D){return!b&&(D===null||D===41||Ve(D))?(n.exit("chunkString"),n.exit(p),n.exit(f),n.exit(u),r(D)):b999||x===null||x===91||x===93&&!m||x===94&&!p&&"_hiddenFootnoteSupport"in f.parser.constructs?a(x):x===93?(n.exit(h),n.enter(c),n.consume(x),n.exit(c),n.exit(u),r):ce(x)?(n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),b):(n.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||x===91||x===93||ce(x)||p++>999?(n.exit("chunkString"),b(x)):(n.consume(x),m||(m=!Ee(x)),x===92?S:y)}function S(x){return x===91||x===92||x===93?(n.consume(x),p++,y):y(x)}}function fg(n,r,a,u,c,h){let f;return p;function p(S){return S===34||S===39||S===40?(n.enter(u),n.enter(c),n.consume(S),n.exit(c),f=S===40?41:S,m):a(S)}function m(S){return S===f?(n.enter(c),n.consume(S),n.exit(c),n.exit(u),r):(n.enter(h),d(S))}function d(S){return S===f?(n.exit(h),m(f)):S===null?a(S):ce(S)?(n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),_e(n,d,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===f||S===null||ce(S)?(n.exit("chunkString"),d(S)):(n.consume(S),S===92?y:b)}function y(S){return S===f||S===92?(n.consume(S),b):b(S)}}function Ca(n,r){let a;return u;function u(c){return ce(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),a=!0,u):Ee(c)?_e(n,u,a?"linePrefix":"lineSuffix")(c):r(c)}}const fv={name:"definition",tokenize:dv},hv={partial:!0,tokenize:pv};function dv(n,r,a){const u=this;let c;return h;function h(x){return n.enter("definition"),f(x)}function f(x){return cg.call(u,n,p,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function p(x){return c=un(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),x===58?(n.enter("definitionMarker"),n.consume(x),n.exit("definitionMarker"),m):a(x)}function m(x){return Ve(x)?Ca(n,d)(x):d(x)}function d(x){return sg(n,b,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return n.attempt(hv,y,y)(x)}function y(x){return Ee(x)?_e(n,S,"whitespace")(x):S(x)}function S(x){return x===null||ce(x)?(n.exit("definition"),u.parser.defined.push(c),r(x)):a(x)}}function pv(n,r,a){return u;function u(p){return Ve(p)?Ca(n,c)(p):a(p)}function c(p){return fg(n,h,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(p)}function h(p){return Ee(p)?_e(n,f,"whitespace")(p):f(p)}function f(p){return p===null||ce(p)?r(p):a(p)}}const mv={name:"hardBreakEscape",tokenize:gv};function gv(n,r,a){return u;function u(h){return n.enter("hardBreakEscape"),n.consume(h),c}function c(h){return ce(h)?(n.exit("hardBreakEscape"),r(h)):a(h)}}const yv={name:"headingAtx",resolve:bv,tokenize:vv};function bv(n,r){let a=n.length-2,u=3,c,h;return n[u][1].type==="whitespace"&&(u+=2),a-2>u&&n[a][1].type==="whitespace"&&(a-=2),n[a][1].type==="atxHeadingSequence"&&(u===a-1||a-4>u&&n[a-2][1].type==="whitespace")&&(a-=u+1===a?2:4),a>u&&(c={type:"atxHeadingText",start:n[u][1].start,end:n[a][1].end},h={type:"chunkText",start:n[u][1].start,end:n[a][1].end,contentType:"text"},qt(n,u,a-u+1,[["enter",c,r],["enter",h,r],["exit",h,r],["exit",c,r]])),n}function vv(n,r,a){let u=0;return c;function c(b){return n.enter("atxHeading"),h(b)}function h(b){return n.enter("atxHeadingSequence"),f(b)}function f(b){return b===35&&u++<6?(n.consume(b),f):b===null||Ve(b)?(n.exit("atxHeadingSequence"),p(b)):a(b)}function p(b){return b===35?(n.enter("atxHeadingSequence"),m(b)):b===null||ce(b)?(n.exit("atxHeading"),r(b)):Ee(b)?_e(n,p,"whitespace")(b):(n.enter("atxHeadingText"),d(b))}function m(b){return b===35?(n.consume(b),m):(n.exit("atxHeadingSequence"),p(b))}function d(b){return b===null||b===35||Ve(b)?(n.exit("atxHeadingText"),p(b)):(n.consume(b),d)}}const xv=["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"],fm=["pre","script","style","textarea"],Sv={concrete:!0,name:"htmlFlow",resolveTo:Ev,tokenize:Av},kv={partial:!0,tokenize:Tv},wv={partial:!0,tokenize:Cv};function Ev(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function Av(n,r,a){const u=this;let c,h,f,p,m;return d;function d(k){return b(k)}function b(k){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(k),y}function y(k){return k===33?(n.consume(k),S):k===47?(n.consume(k),h=!0,U):k===63?(n.consume(k),c=3,u.interrupt?r:w):xt(k)?(n.consume(k),f=String.fromCharCode(k),K):a(k)}function S(k){return k===45?(n.consume(k),c=2,x):k===91?(n.consume(k),c=5,p=0,T):xt(k)?(n.consume(k),c=4,u.interrupt?r:w):a(k)}function x(k){return k===45?(n.consume(k),u.interrupt?r:w):a(k)}function T(k){const ee="CDATA[";return k===ee.charCodeAt(p++)?(n.consume(k),p===ee.length?u.interrupt?r:B:T):a(k)}function U(k){return xt(k)?(n.consume(k),f=String.fromCharCode(k),K):a(k)}function K(k){if(k===null||k===47||k===62||Ve(k)){const ee=k===47,he=f.toLowerCase();return!ee&&!h&&fm.includes(he)?(c=1,u.interrupt?r(k):B(k)):xv.includes(f.toLowerCase())?(c=6,ee?(n.consume(k),D):u.interrupt?r(k):B(k)):(c=7,u.interrupt&&!u.parser.lazy[u.now().line]?a(k):h?F(k):Q(k))}return k===45||mt(k)?(n.consume(k),f+=String.fromCharCode(k),K):a(k)}function D(k){return k===62?(n.consume(k),u.interrupt?r:B):a(k)}function F(k){return Ee(k)?(n.consume(k),F):N(k)}function Q(k){return k===47?(n.consume(k),N):k===58||k===95||xt(k)?(n.consume(k),ue):Ee(k)?(n.consume(k),Q):N(k)}function ue(k){return k===45||k===46||k===58||k===95||mt(k)?(n.consume(k),ue):re(k)}function re(k){return k===61?(n.consume(k),L):Ee(k)?(n.consume(k),re):Q(k)}function L(k){return k===null||k===60||k===61||k===62||k===96?a(k):k===34||k===39?(n.consume(k),m=k,P):Ee(k)?(n.consume(k),L):de(k)}function P(k){return k===m?(n.consume(k),m=null,me):k===null||ce(k)?a(k):(n.consume(k),P)}function de(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Ve(k)?re(k):(n.consume(k),de)}function me(k){return k===47||k===62||Ee(k)?Q(k):a(k)}function N(k){return k===62?(n.consume(k),te):a(k)}function te(k){return k===null||ce(k)?B(k):Ee(k)?(n.consume(k),te):a(k)}function B(k){return k===45&&c===2?(n.consume(k),_):k===60&&c===1?(n.consume(k),Z):k===62&&c===4?(n.consume(k),A):k===63&&c===3?(n.consume(k),w):k===93&&c===5?(n.consume(k),xe):ce(k)&&(c===6||c===7)?(n.exit("htmlFlowData"),n.check(kv,Y,le)(k)):k===null||ce(k)?(n.exit("htmlFlowData"),le(k)):(n.consume(k),B)}function le(k){return n.check(wv,J,Y)(k)}function J(k){return n.enter("lineEnding"),n.consume(k),n.exit("lineEnding"),$}function $(k){return k===null||ce(k)?le(k):(n.enter("htmlFlowData"),B(k))}function _(k){return k===45?(n.consume(k),w):B(k)}function Z(k){return k===47?(n.consume(k),f="",ae):B(k)}function ae(k){if(k===62){const ee=f.toLowerCase();return fm.includes(ee)?(n.consume(k),A):B(k)}return xt(k)&&f.length<8?(n.consume(k),f+=String.fromCharCode(k),ae):B(k)}function xe(k){return k===93?(n.consume(k),w):B(k)}function w(k){return k===62?(n.consume(k),A):k===45&&c===2?(n.consume(k),w):B(k)}function A(k){return k===null||ce(k)?(n.exit("htmlFlowData"),Y(k)):(n.consume(k),A)}function Y(k){return n.exit("htmlFlow"),r(k)}}function Cv(n,r,a){const u=this;return c;function c(f){return ce(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),h):a(f)}function h(f){return u.parser.lazy[u.now().line]?a(f):r(f)}}function Tv(n,r,a){return u;function u(c){return n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),n.attempt(Na,r,a)}}const zv={name:"htmlText",tokenize:_v};function _v(n,r,a){const u=this;let c,h,f;return p;function p(w){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(w),m}function m(w){return w===33?(n.consume(w),d):w===47?(n.consume(w),re):w===63?(n.consume(w),Q):xt(w)?(n.consume(w),de):a(w)}function d(w){return w===45?(n.consume(w),b):w===91?(n.consume(w),h=0,T):xt(w)?(n.consume(w),F):a(w)}function b(w){return w===45?(n.consume(w),x):a(w)}function y(w){return w===null?a(w):w===45?(n.consume(w),S):ce(w)?(f=y,Z(w)):(n.consume(w),y)}function S(w){return w===45?(n.consume(w),x):y(w)}function x(w){return w===62?_(w):w===45?S(w):y(w)}function T(w){const A="CDATA[";return w===A.charCodeAt(h++)?(n.consume(w),h===A.length?U:T):a(w)}function U(w){return w===null?a(w):w===93?(n.consume(w),K):ce(w)?(f=U,Z(w)):(n.consume(w),U)}function K(w){return w===93?(n.consume(w),D):U(w)}function D(w){return w===62?_(w):w===93?(n.consume(w),D):U(w)}function F(w){return w===null||w===62?_(w):ce(w)?(f=F,Z(w)):(n.consume(w),F)}function Q(w){return w===null?a(w):w===63?(n.consume(w),ue):ce(w)?(f=Q,Z(w)):(n.consume(w),Q)}function ue(w){return w===62?_(w):Q(w)}function re(w){return xt(w)?(n.consume(w),L):a(w)}function L(w){return w===45||mt(w)?(n.consume(w),L):P(w)}function P(w){return ce(w)?(f=P,Z(w)):Ee(w)?(n.consume(w),P):_(w)}function de(w){return w===45||mt(w)?(n.consume(w),de):w===47||w===62||Ve(w)?me(w):a(w)}function me(w){return w===47?(n.consume(w),_):w===58||w===95||xt(w)?(n.consume(w),N):ce(w)?(f=me,Z(w)):Ee(w)?(n.consume(w),me):_(w)}function N(w){return w===45||w===46||w===58||w===95||mt(w)?(n.consume(w),N):te(w)}function te(w){return w===61?(n.consume(w),B):ce(w)?(f=te,Z(w)):Ee(w)?(n.consume(w),te):me(w)}function B(w){return w===null||w===60||w===61||w===62||w===96?a(w):w===34||w===39?(n.consume(w),c=w,le):ce(w)?(f=B,Z(w)):Ee(w)?(n.consume(w),B):(n.consume(w),J)}function le(w){return w===c?(n.consume(w),c=void 0,$):w===null?a(w):ce(w)?(f=le,Z(w)):(n.consume(w),le)}function J(w){return w===null||w===34||w===39||w===60||w===61||w===96?a(w):w===47||w===62||Ve(w)?me(w):(n.consume(w),J)}function $(w){return w===47||w===62||Ve(w)?me(w):a(w)}function _(w){return w===62?(n.consume(w),n.exit("htmlTextData"),n.exit("htmlText"),r):a(w)}function Z(w){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),ae}function ae(w){return Ee(w)?_e(n,xe,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):xe(w)}function xe(w){return n.enter("htmlTextData"),f(w)}}const Tc={name:"labelEnd",resolveAll:Rv,resolveTo:Nv,tokenize:jv},Ov={tokenize:Lv},Mv={tokenize:Uv},Dv={tokenize:Bv};function Rv(n){let r=-1;const a=[];for(;++r=3&&(d===null||ce(d))?(n.exit("thematicBreak"),r(d)):a(d)}function m(d){return d===c?(n.consume(d),u++,m):(n.exit("thematicBreakSequence"),Ee(d)?_e(n,p,"whitespace")(d):p(d))}}const _t={continuation:{tokenize:Fv},exit:Jv,name:"list",tokenize:Zv},Qv={partial:!0,tokenize:$v},Kv={partial:!0,tokenize:Iv};function Zv(n,r,a){const u=this,c=u.events[u.events.length-1];let h=c&&c[1].type==="linePrefix"?c[2].sliceSerialize(c[1],!0).length:0,f=0;return p;function p(x){const T=u.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!u.containerState.marker||x===u.containerState.marker:sc(x)){if(u.containerState.type||(u.containerState.type=T,n.enter(T,{_container:!0})),T==="listUnordered")return n.enter("listItemPrefix"),x===42||x===45?n.check(ru,a,d)(x):d(x);if(!u.interrupt||x===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(x)}return a(x)}function m(x){return sc(x)&&++f<10?(n.consume(x),m):(!u.interrupt||f<2)&&(u.containerState.marker?x===u.containerState.marker:x===41||x===46)?(n.exit("listItemValue"),d(x)):a(x)}function d(x){return n.enter("listItemMarker"),n.consume(x),n.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||x,n.check(Na,u.interrupt?a:b,n.attempt(Qv,S,y))}function b(x){return u.containerState.initialBlankLine=!0,h++,S(x)}function y(x){return Ee(x)?(n.enter("listItemPrefixWhitespace"),n.consume(x),n.exit("listItemPrefixWhitespace"),S):a(x)}function S(x){return u.containerState.size=h+u.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(x)}}function Fv(n,r,a){const u=this;return u.containerState._closeFlow=void 0,n.check(Na,c,h);function c(p){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,_e(n,r,"listItemIndent",u.containerState.size+1)(p)}function h(p){return u.containerState.furtherBlankLines||!Ee(p)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,f(p)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,n.attempt(Kv,r,f)(p))}function f(p){return u.containerState._closeFlow=!0,u.interrupt=void 0,_e(n,n.attempt(_t,r,a),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p)}}function Iv(n,r,a){const u=this;return _e(n,c,"listItemIndent",u.containerState.size+1);function c(h){const f=u.events[u.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===u.containerState.size?r(h):a(h)}}function Jv(n){n.exit(this.containerState.type)}function $v(n,r,a){const u=this;return _e(n,c,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function c(h){const f=u.events[u.events.length-1];return!Ee(h)&&f&&f[1].type==="listItemPrefixWhitespace"?r(h):a(h)}}const hm={name:"setextUnderline",resolveTo:Wv,tokenize:Pv};function Wv(n,r){let a=n.length,u,c,h;for(;a--;)if(n[a][0]==="enter"){if(n[a][1].type==="content"){u=a;break}n[a][1].type==="paragraph"&&(c=a)}else n[a][1].type==="content"&&n.splice(a,1),!h&&n[a][1].type==="definition"&&(h=a);const f={type:"setextHeading",start:{...n[u][1].start},end:{...n[n.length-1][1].end}};return n[c][1].type="setextHeadingText",h?(n.splice(c,0,["enter",f,r]),n.splice(h+1,0,["exit",n[u][1],r]),n[u][1].end={...n[h][1].end}):n[u][1]=f,n.push(["exit",f,r]),n}function Pv(n,r,a){const u=this;let c;return h;function h(d){let b=u.events.length,y;for(;b--;)if(u.events[b][1].type!=="lineEnding"&&u.events[b][1].type!=="linePrefix"&&u.events[b][1].type!=="content"){y=u.events[b][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||y)?(n.enter("setextHeadingLine"),c=d,f(d)):a(d)}function f(d){return n.enter("setextHeadingLineSequence"),p(d)}function p(d){return d===c?(n.consume(d),p):(n.exit("setextHeadingLineSequence"),Ee(d)?_e(n,m,"lineSuffix")(d):m(d))}function m(d){return d===null||ce(d)?(n.exit("setextHeadingLine"),r(d)):a(d)}}const ex={tokenize:tx};function tx(n){const r=this,a=n.attempt(Na,u,n.attempt(this.parser.constructs.flowInitial,c,_e(n,n.attempt(this.parser.constructs.flow,c,n.attempt(rv,c)),"linePrefix")));return a;function u(h){if(h===null){n.consume(h);return}return n.enter("lineEndingBlank"),n.consume(h),n.exit("lineEndingBlank"),r.currentConstruct=void 0,a}function c(h){if(h===null){n.consume(h);return}return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),r.currentConstruct=void 0,a}}const nx={resolveAll:dg()},lx=hg("string"),ix=hg("text");function hg(n){return{resolveAll:dg(n==="text"?ax:void 0),tokenize:r};function r(a){const u=this,c=this.parser.constructs[n],h=a.attempt(c,f,p);return f;function f(b){return d(b)?h(b):p(b)}function p(b){if(b===null){a.consume(b);return}return a.enter("data"),a.consume(b),m}function m(b){return d(b)?(a.exit("data"),h(b)):(a.consume(b),m)}function d(b){if(b===null)return!0;const y=c[b];let S=-1;if(y)for(;++S-1){const p=f[0];typeof p=="string"?f[0]=p.slice(u):f.shift()}h>0&&f.push(n[c].slice(0,h))}return f}function bx(n,r){let a=-1;const u=[];let c;for(;++a0){const Mt=pe.tokenStack[pe.tokenStack.length-1];(Mt[1]||pm).call(pe,void 0,Mt[0])}for(W.position={start:ul(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:ul(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Re=-1;++Re0&&(u.className=["language-"+c[0]]);let h={type:"element",tagName:"code",properties:u,children:[{type:"text",value:a}]};return r.meta&&(h.data={meta:r.meta}),n.patch(r,h),h=n.applyData(r,h),h={type:"element",tagName:"pre",properties:{},children:[h]},n.patch(r,h),h}function Dx(n,r){const a={type:"element",tagName:"del",properties:{},children:n.all(r)};return n.patch(r,a),n.applyData(r,a)}function Rx(n,r){const a={type:"element",tagName:"em",properties:{},children:n.all(r)};return n.patch(r,a),n.applyData(r,a)}function Nx(n,r){const a=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",u=String(r.identifier).toUpperCase(),c=Ai(u.toLowerCase()),h=n.footnoteOrder.indexOf(u);let f,p=n.footnoteCounts.get(u);p===void 0?(p=0,n.footnoteOrder.push(u),f=n.footnoteOrder.length):f=h+1,p+=1,n.footnoteCounts.set(u,p);const m={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+c,id:a+"fnref-"+c+(p>1?"-"+p:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(r,m);const d={type:"element",tagName:"sup",properties:{},children:[m]};return n.patch(r,d),n.applyData(r,d)}function jx(n,r){const a={type:"element",tagName:"h"+r.depth,properties:{},children:n.all(r)};return n.patch(r,a),n.applyData(r,a)}function Lx(n,r){if(n.options.allowDangerousHtml){const a={type:"raw",value:r.value};return n.patch(r,a),n.applyData(r,a)}}function gg(n,r){const a=r.referenceType;let u="]";if(a==="collapsed"?u+="[]":a==="full"&&(u+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+u}];const c=n.all(r),h=c[0];h&&h.type==="text"?h.value="["+h.value:c.unshift({type:"text",value:"["});const f=c[c.length-1];return f&&f.type==="text"?f.value+=u:c.push({type:"text",value:u}),c}function Ux(n,r){const a=String(r.identifier).toUpperCase(),u=n.definitionById.get(a);if(!u)return gg(n,r);const c={src:Ai(u.url||""),alt:r.alt};u.title!==null&&u.title!==void 0&&(c.title=u.title);const h={type:"element",tagName:"img",properties:c,children:[]};return n.patch(r,h),n.applyData(r,h)}function Bx(n,r){const a={src:Ai(r.url)};r.alt!==null&&r.alt!==void 0&&(a.alt=r.alt),r.title!==null&&r.title!==void 0&&(a.title=r.title);const u={type:"element",tagName:"img",properties:a,children:[]};return n.patch(r,u),n.applyData(r,u)}function Hx(n,r){const a={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};n.patch(r,a);const u={type:"element",tagName:"code",properties:{},children:[a]};return n.patch(r,u),n.applyData(r,u)}function qx(n,r){const a=String(r.identifier).toUpperCase(),u=n.definitionById.get(a);if(!u)return gg(n,r);const c={href:Ai(u.url||"")};u.title!==null&&u.title!==void 0&&(c.title=u.title);const h={type:"element",tagName:"a",properties:c,children:n.all(r)};return n.patch(r,h),n.applyData(r,h)}function Yx(n,r){const a={href:Ai(r.url)};r.title!==null&&r.title!==void 0&&(a.title=r.title);const u={type:"element",tagName:"a",properties:a,children:n.all(r)};return n.patch(r,u),n.applyData(r,u)}function Gx(n,r,a){const u=n.all(r),c=a?Vx(a):yg(r),h={},f=[];if(typeof r.checked=="boolean"){const b=u[0];let y;b&&b.type==="element"&&b.tagName==="p"?y=b:(y={type:"element",tagName:"p",properties:{},children:[]},u.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),h.className=["task-list-item"]}let p=-1;for(;++p1}function Xx(n,r){const a={},u=n.all(r);let c=-1;for(typeof r.start=="number"&&r.start!==1&&(a.start=r.start);++c0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(a,!0)},p=Sc(r.children[1]),m=Jm(r.children[r.children.length-1]);p&&m&&(f.position={start:p,end:m}),c.push(f)}const h={type:"element",tagName:"table",properties:{},children:n.wrap(c,!0)};return n.patch(r,h),n.applyData(r,h)}function Ix(n,r,a){const u=a?a.children:void 0,h=(u?u.indexOf(r):1)===0?"th":"td",f=a&&a.type==="table"?a.align:void 0,p=f?f.length:r.children.length;let m=-1;const d=[];for(;++m0,!0),u[0]),c=u.index+u[0].length,u=a.exec(r);return h.push(ym(r.slice(c),c>0,!1)),h.join("")}function ym(n,r,a){let u=0,c=n.length;if(r){let h=n.codePointAt(u);for(;h===mm||h===gm;)u++,h=n.codePointAt(u)}if(a){let h=n.codePointAt(c-1);for(;h===mm||h===gm;)c--,h=n.codePointAt(c-1)}return c>u?n.slice(u,c):""}function Wx(n,r){const a={type:"text",value:$x(String(r.value))};return n.patch(r,a),n.applyData(r,a)}function Px(n,r){const a={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(r,a),n.applyData(r,a)}const eS={blockquote:_x,break:Ox,code:Mx,delete:Dx,emphasis:Rx,footnoteReference:Nx,heading:jx,html:Lx,imageReference:Ux,image:Bx,inlineCode:Hx,linkReference:qx,link:Yx,listItem:Gx,list:Xx,paragraph:Qx,root:Kx,strong:Zx,table:Fx,tableCell:Jx,tableRow:Ix,text:Wx,thematicBreak:Px,toml:tu,yaml:tu,definition:tu,footnoteDefinition:tu};function tu(){}const bg=-1,gu=0,Ta=1,su=2,zc=3,_c=4,Oc=5,Mc=6,vg=7,xg=8,tS=typeof self=="object"?self:globalThis,bm=(n,r)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new tS[n](r)},nS=(n,r)=>{const a=(c,h)=>(n.set(h,c),c),u=c=>{if(n.has(c))return n.get(c);const[h,f]=r[c];switch(h){case gu:case bg:return a(f,c);case Ta:{const p=a([],c);for(const m of f)p.push(u(m));return p}case su:{const p=a({},c);for(const[m,d]of f)p[u(m)]=u(d);return p}case zc:return a(new Date(f),c);case _c:{const{source:p,flags:m}=f;return a(new RegExp(p,m),c)}case Oc:{const p=a(new Map,c);for(const[m,d]of f)p.set(u(m),u(d));return p}case Mc:{const p=a(new Set,c);for(const m of f)p.add(u(m));return p}case vg:{const{name:p,message:m}=f;return a(bm(p,m),c)}case xg:return a(BigInt(f),c);case"BigInt":return a(Object(BigInt(f)),c);case"ArrayBuffer":return a(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:p}=new Uint8Array(f);return a(new DataView(p),f)}}return a(bm(h,f),c)};return u},vm=n=>nS(new Map,n)(0),xi="",{toString:lS}={},{keys:iS}=Object,Ea=n=>{const r=typeof n;if(r!=="object"||!n)return[gu,r];const a=lS.call(n).slice(8,-1);switch(a){case"Array":return[Ta,xi];case"Object":return[su,xi];case"Date":return[zc,xi];case"RegExp":return[_c,xi];case"Map":return[Oc,xi];case"Set":return[Mc,xi];case"DataView":return[Ta,a]}return a.includes("Array")?[Ta,a]:a.includes("Error")?[vg,a]:[su,a]},nu=([n,r])=>n===gu&&(r==="function"||r==="symbol"),aS=(n,r,a,u)=>{const c=(f,p)=>{const m=u.push(f)-1;return a.set(p,m),m},h=f=>{if(a.has(f))return a.get(f);let[p,m]=Ea(f);switch(p){case gu:{let b=f;switch(m){case"bigint":p=xg,b=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+m);b=null;break;case"undefined":return c([bg],f)}return c([p,b],f)}case Ta:{if(m){let S=f;return m==="DataView"?S=new Uint8Array(f.buffer):m==="ArrayBuffer"&&(S=new Uint8Array(f)),c([m,[...S]],f)}const b=[],y=c([p,b],f);for(const S of f)b.push(h(S));return y}case su:{if(m)switch(m){case"BigInt":return c([m,f.toString()],f);case"Boolean":case"Number":case"String":return c([m,f.valueOf()],f)}if(r&&"toJSON"in f)return h(f.toJSON());const b=[],y=c([p,b],f);for(const S of iS(f))(n||!nu(Ea(f[S])))&&b.push([h(S),h(f[S])]);return y}case zc:return c([p,f.toISOString()],f);case _c:{const{source:b,flags:y}=f;return c([p,{source:b,flags:y}],f)}case Oc:{const b=[],y=c([p,b],f);for(const[S,x]of f)(n||!(nu(Ea(S))||nu(Ea(x))))&&b.push([h(S),h(x)]);return y}case Mc:{const b=[],y=c([p,b],f);for(const S of f)(n||!nu(Ea(S)))&&b.push(h(S));return y}}const{message:d}=f;return c([p,{name:m,message:d}],f)};return h},xm=(n,{json:r,lossy:a}={})=>{const u=[];return aS(!(r||a),!!r,new Map,u)(n),u},cu=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?vm(xm(n,r)):structuredClone(n):(n,r)=>vm(xm(n,r));function rS(n,r){const a=[{type:"text",value:"↩"}];return r>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),a}function uS(n,r){return"Back to reference "+(n+1)+(r>1?"-"+r:"")}function oS(n){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",a=n.options.footnoteBackContent||rS,u=n.options.footnoteBackLabel||uS,c=n.options.footnoteLabel||"Footnotes",h=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},p=[];let m=-1;for(;++m0&&T.push({type:"text",value:" "});let F=typeof a=="string"?a:a(m,x);typeof F=="string"&&(F={type:"text",value:F}),T.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+S+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(m,x),className:["data-footnote-backref"]},children:Array.isArray(F)?F:[F]})}const K=b[b.length-1];if(K&&K.type==="element"&&K.tagName==="p"){const F=K.children[K.children.length-1];F&&F.type==="text"?F.value+=" ":K.children.push({type:"text",value:" "}),K.children.push(...T)}else b.push(...T);const D={type:"element",tagName:"li",properties:{id:r+"fn-"+S},children:n.wrap(b,!0)};n.patch(d,D),p.push(D)}if(p.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:h,properties:{...cu(f),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:n.wrap(p,!0)},{type:"text",value:` +`}]}}const yu=(function(n){if(n==null)return hS;if(typeof n=="function")return bu(n);if(typeof n=="object")return Array.isArray(n)?sS(n):cS(n);if(typeof n=="string")return fS(n);throw new Error("Expected function, string, or object as test")});function sS(n){const r=[];let a=-1;for(;++a":""))+")"})}return S;function S(){let x=Sg,T,U,K;if((!r||h(m,d,b[b.length-1]||void 0))&&(x=gS(a(m,b)),x[0]===fc))return x;if("children"in m&&m.children){const D=m;if(D.children&&x[0]!==mS)for(U=(u?D.children.length:-1)+f,K=b.concat(D);U>-1&&U0&&a.push({type:"text",value:` +`}),a}function Sm(n){let r=0,a=n.charCodeAt(r);for(;a===9||a===32;)r++,a=n.charCodeAt(r);return n.slice(r)}function km(n,r){const a=bS(n,r),u=a.one(n,void 0),c=oS(a),h=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return c&&h.children.push({type:"text",value:` +`},c),h}function wS(n,r){return n&&"run"in n?async function(a,u){const c=km(a,{file:u,...r});await n.run(c,u)}:function(a,u){return km(a,{file:u,...n||r})}}function wm(n){if(n)throw n}var Ks,Em;function ES(){if(Em)return Ks;Em=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=function(d){return typeof Array.isArray=="function"?Array.isArray(d):r.call(d)==="[object Array]"},h=function(d){if(!d||r.call(d)!=="[object Object]")return!1;var b=n.call(d,"constructor"),y=d.constructor&&d.constructor.prototype&&n.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!b&&!y)return!1;var S;for(S in d);return typeof S>"u"||n.call(d,S)},f=function(d,b){a&&b.name==="__proto__"?a(d,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):d[b.name]=b.newValue},p=function(d,b){if(b==="__proto__")if(n.call(d,b)){if(u)return u(d,b).value}else return;return d[b]};return Ks=function m(){var d,b,y,S,x,T,U=arguments[0],K=1,D=arguments.length,F=!1;for(typeof U=="boolean"&&(F=U,U=arguments[1]||{},K=2),(U==null||typeof U!="object"&&typeof U!="function")&&(U={});Kf.length;let m;p&&f.push(c);try{m=n.apply(this,f)}catch(d){const b=d;if(p&&a)throw b;return c(b)}p||(m&&m.then&&typeof m.then=="function"?m.then(h,c):m instanceof Error?c(m):h(m))}function c(f,...p){a||(a=!0,r(f,...p))}function h(f){c(null,f)}}const hn={basename:zS,dirname:_S,extname:OS,join:MS,sep:"/"};function zS(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');ja(n);let a=0,u=-1,c=n.length,h;if(r===void 0||r.length===0||r.length>n.length){for(;c--;)if(n.codePointAt(c)===47){if(h){a=c+1;break}}else u<0&&(h=!0,u=c+1);return u<0?"":n.slice(a,u)}if(r===n)return"";let f=-1,p=r.length-1;for(;c--;)if(n.codePointAt(c)===47){if(h){a=c+1;break}}else f<0&&(h=!0,f=c+1),p>-1&&(n.codePointAt(c)===r.codePointAt(p--)?p<0&&(u=c):(p=-1,u=f));return a===u?u=f:u<0&&(u=n.length),n.slice(a,u)}function _S(n){if(ja(n),n.length===0)return".";let r=-1,a=n.length,u;for(;--a;)if(n.codePointAt(a)===47){if(u){r=a;break}}else u||(u=!0);return r<0?n.codePointAt(0)===47?"/":".":r===1&&n.codePointAt(0)===47?"//":n.slice(0,r)}function OS(n){ja(n);let r=n.length,a=-1,u=0,c=-1,h=0,f;for(;r--;){const p=n.codePointAt(r);if(p===47){if(f){u=r+1;break}continue}a<0&&(f=!0,a=r+1),p===46?c<0?c=r:h!==1&&(h=1):c>-1&&(h=-1)}return c<0||a<0||h===0||h===1&&c===a-1&&c===u+1?"":n.slice(c,a)}function MS(...n){let r=-1,a;for(;++r0&&n.codePointAt(n.length-1)===47&&(a+="/"),r?"/"+a:a}function RS(n,r){let a="",u=0,c=-1,h=0,f=-1,p,m;for(;++f<=n.length;){if(f2){if(m=a.lastIndexOf("/"),m!==a.length-1){m<0?(a="",u=0):(a=a.slice(0,m),u=a.length-1-a.lastIndexOf("/")),c=f,h=0;continue}}else if(a.length>0){a="",u=0,c=f,h=0;continue}}r&&(a=a.length>0?a+"/..":"..",u=2)}else a.length>0?a+="/"+n.slice(c+1,f):a=n.slice(c+1,f),u=f-c-1;c=f,h=0}else p===46&&h>-1?h++:h=-1}return a}function ja(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const NS={cwd:jS};function jS(){return"/"}function pc(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function LS(n){if(typeof n=="string")n=new URL(n);else if(!pc(n)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(n.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return US(n)}function US(n){if(n.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const r=n.pathname;let a=-1;for(;++a0){let[x,...T]=b;const U=u[S][1];dc(U)&&dc(x)&&(x=Zs(!0,U,x)),u[S]=[d,x,...T]}}}}const YS=new Rc().freeze();function $s(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Ws(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Ps(n,r){if(r)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Cm(n){if(!dc(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Tm(n,r,a){if(!a)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function lu(n){return GS(n)?n:new wg(n)}function GS(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function VS(n){return typeof n=="string"||XS(n)}function XS(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const QS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zm=[],_m={allowDangerousHtml:!0},KS=/^(https?|ircs?|mailto|xmpp)$/i,ZS=[{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 FS(n){const r=IS(n),a=JS(n);return $S(r.runSync(r.parse(a),a),n)}function IS(n){const r=n.rehypePlugins||zm,a=n.remarkPlugins||zm,u=n.remarkRehypeOptions?{...n.remarkRehypeOptions,..._m}:_m;return YS().use(zx).use(a).use(wS,u).use(r)}function JS(n){const r=n.children||"",a=new wg;return typeof r=="string"&&(a.value=r),a}function $S(n,r){const a=r.allowedElements,u=r.allowElement,c=r.components,h=r.disallowedElements,f=r.skipHtml,p=r.unwrapDisallowed,m=r.urlTransform||WS;for(const b of ZS)Object.hasOwn(r,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+QS+b.id,void 0);return r.className&&(n={type:"element",tagName:"div",properties:{className:r.className},children:n.type==="root"?n.children:[n]}),Dc(n,d),f0(n,{Fragment:H.Fragment,components:c,ignoreInvalidStyle:!0,jsx:H.jsx,jsxs:H.jsxs,passKeys:!0,passNode:!0});function d(b,y,S){if(b.type==="raw"&&S&&typeof y=="number")return f?S.children.splice(y,1):S.children[y]={type:"text",value:b.value},y;if(b.type==="element"){let x;for(x in Vs)if(Object.hasOwn(Vs,x)&&Object.hasOwn(b.properties,x)){const T=b.properties[x],U=Vs[x];(U===null||U.includes(b.tagName))&&(b.properties[x]=m(String(T||""),x,b))}}if(b.type==="element"){let x=a?!a.includes(b.tagName):h?h.includes(b.tagName):!1;if(!x&&u&&typeof y=="number"&&(x=!u(b,y,S)),x&&S&&typeof y=="number")return p&&b.children?S.children.splice(y,1,...b.children):S.children.splice(y,1),y}}}function WS(n){const r=n.indexOf(":"),a=n.indexOf("?"),u=n.indexOf("#"),c=n.indexOf("/");return r===-1||c!==-1&&r>c||a!==-1&&r>a||u!==-1&&r>u||KS.test(n.slice(0,r))?n:""}function Om(n,r){const a=String(n);if(typeof r!="string")throw new TypeError("Expected character");let u=0,c=a.indexOf(r);for(;c!==-1;)u++,c=a.indexOf(r,c+r.length);return u}function PS(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ek(n,r,a){const c=yu((a||{}).ignore||[]),h=tk(r);let f=-1;for(;++f0?{type:"text",value:L}:void 0),L===!1?S.lastIndex=ue+1:(T!==ue&&F.push({type:"text",value:d.value.slice(T,ue)}),Array.isArray(L)?F.push(...L):L&&F.push(L),T=ue+Q[0].length,D=!0),!S.global)break;Q=S.exec(d.value)}return D?(T?\]}]+$/.exec(n);if(!r)return[n,void 0];n=n.slice(0,r.index);let a=r[0],u=a.indexOf(")");const c=Om(n,"(");let h=Om(n,")");for(;u!==-1&&c>h;)n+=a.slice(0,u+1),a=a.slice(u+1),u=a.indexOf(")"),h++;return[n,a]}function Eg(n,r){const a=n.input.charCodeAt(n.index-1);return(n.index===0||_l(a)||pu(a))&&(!r||a!==47)}Ag.peek=Ek;function gk(){this.buffer()}function yk(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function bk(){this.buffer()}function vk(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function xk(n){const r=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=un(this.sliceSerialize(n)).toLowerCase(),a.label=r}function Sk(n){this.exit(n)}function kk(n){const r=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=un(this.sliceSerialize(n)).toLowerCase(),a.label=r}function wk(n){this.exit(n)}function Ek(){return"["}function Ag(n,r,a,u){const c=a.createTracker(u);let h=c.move("[^");const f=a.enter("footnoteReference"),p=a.enter("reference");return h+=c.move(a.safe(a.associationId(n),{after:"]",before:h})),p(),f(),h+=c.move("]"),h}function Ak(){return{enter:{gfmFootnoteCallString:gk,gfmFootnoteCall:yk,gfmFootnoteDefinitionLabelString:bk,gfmFootnoteDefinition:vk},exit:{gfmFootnoteCallString:xk,gfmFootnoteCall:Sk,gfmFootnoteDefinitionLabelString:kk,gfmFootnoteDefinition:wk}}}function Ck(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:a,footnoteReference:Ag},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(u,c,h,f){const p=h.createTracker(f);let m=p.move("[^");const d=h.enter("footnoteDefinition"),b=h.enter("label");return m+=p.move(h.safe(h.associationId(u),{before:m,after:"]"})),b(),m+=p.move("]:"),u.children&&u.children.length>0&&(p.shift(4),m+=p.move((r?` +`:" ")+h.indentLines(h.containerFlow(u,p.current()),r?Cg:Tk))),d(),m}}function Tk(n,r,a){return r===0?n:Cg(n,r,a)}function Cg(n,r,a){return(a?"":" ")+n}const zk=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Tg.peek=Rk;function _k(){return{canContainEols:["delete"],enter:{strikethrough:Mk},exit:{strikethrough:Dk}}}function Ok(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zk}],handlers:{delete:Tg}}}function Mk(n){this.enter({type:"delete",children:[]},n)}function Dk(n){this.exit(n)}function Tg(n,r,a,u){const c=a.createTracker(u),h=a.enter("strikethrough");let f=c.move("~~");return f+=a.containerPhrasing(n,{...c.current(),before:f,after:"~"}),f+=c.move("~~"),h(),f}function Rk(){return"~"}function Nk(n){return n.length}function jk(n,r){const a=r||{},u=(a.align||[]).concat(),c=a.stringLength||Nk,h=[],f=[],p=[],m=[];let d=0,b=-1;for(;++bd&&(d=n[b].length);++Dm[D])&&(m[D]=Q)}U.push(F)}f[b]=U,p[b]=K}let y=-1;if(typeof u=="object"&&"length"in u)for(;++ym[y]&&(m[y]=F),x[y]=F),S[y]=Q}f.splice(1,0,S),p.splice(1,0,x),b=-1;const T=[];for(;++b "),h.shift(2);const f=a.indentLines(a.containerFlow(n,h.current()),Bk);return c(),f}function Bk(n,r,a){return">"+(a?"":" ")+n}function Hk(n,r){return Dm(n,r.inConstruct,!0)&&!Dm(n,r.notInConstruct,!1)}function Dm(n,r,a){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return a;let u=-1;for(;++uf&&(f=h):h=1,c=u+r.length,u=a.indexOf(r,c);return f}function Yk(n,r){return!!(r.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function Gk(n){const r=n.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function Vk(n,r,a,u){const c=Gk(a),h=n.value||"",f=c==="`"?"GraveAccent":"Tilde";if(Yk(n,a)){const y=a.enter("codeIndented"),S=a.indentLines(h,Xk);return y(),S}const p=a.createTracker(u),m=c.repeat(Math.max(qk(h,c)+1,3)),d=a.enter("codeFenced");let b=p.move(m);if(n.lang){const y=a.enter(`codeFencedLang${f}`);b+=p.move(a.safe(n.lang,{before:b,after:" ",encode:["`"],...p.current()})),y()}if(n.lang&&n.meta){const y=a.enter(`codeFencedMeta${f}`);b+=p.move(" "),b+=p.move(a.safe(n.meta,{before:b,after:` +`,encode:["`"],...p.current()})),y()}return b+=p.move(` +`),h&&(b+=p.move(h+` +`)),b+=p.move(m),d(),b}function Xk(n,r,a){return(a?"":" ")+n}function Nc(n){const r=n.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function Qk(n,r,a,u){const c=Nc(a),h=c==='"'?"Quote":"Apostrophe",f=a.enter("definition");let p=a.enter("label");const m=a.createTracker(u);let d=m.move("[");return d+=m.move(a.safe(a.associationId(n),{before:d,after:"]",...m.current()})),d+=m.move("]: "),p(),!n.url||/[\0- \u007F]/.test(n.url)?(p=a.enter("destinationLiteral"),d+=m.move("<"),d+=m.move(a.safe(n.url,{before:d,after:">",...m.current()})),d+=m.move(">")):(p=a.enter("destinationRaw"),d+=m.move(a.safe(n.url,{before:d,after:n.title?" ":` +`,...m.current()}))),p(),n.title&&(p=a.enter(`title${h}`),d+=m.move(" "+c),d+=m.move(a.safe(n.title,{before:d,after:c,...m.current()})),d+=m.move(c),p()),f(),d}function Kk(n){const r=n.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Da(n){return"&#x"+n.toString(16).toUpperCase()+";"}function fu(n,r,a){const u=wi(n),c=wi(r);return u===void 0?c===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:c===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?c===void 0?{inside:!1,outside:!1}:c===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:c===void 0?{inside:!1,outside:!1}:c===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}zg.peek=Zk;function zg(n,r,a,u){const c=Kk(a),h=a.enter("emphasis"),f=a.createTracker(u),p=f.move(c);let m=f.move(a.containerPhrasing(n,{after:c,before:p,...f.current()}));const d=m.charCodeAt(0),b=fu(u.before.charCodeAt(u.before.length-1),d,c);b.inside&&(m=Da(d)+m.slice(1));const y=m.charCodeAt(m.length-1),S=fu(u.after.charCodeAt(0),y,c);S.inside&&(m=m.slice(0,-1)+Da(y));const x=f.move(c);return h(),a.attentionEncodeSurroundingInfo={after:S.outside,before:b.outside},p+m+x}function Zk(n,r,a){return a.options.emphasis||"*"}function Fk(n,r){let a=!1;return Dc(n,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return a=!0,fc}),!!((!n.depth||n.depth<3)&&Ac(n)&&(r.options.setext||a))}function Ik(n,r,a,u){const c=Math.max(Math.min(6,n.depth||1),1),h=a.createTracker(u);if(Fk(n,a)){const b=a.enter("headingSetext"),y=a.enter("phrasing"),S=a.containerPhrasing(n,{...h.current(),before:` +`,after:` +`});return y(),b(),S+` +`+(c===1?"=":"-").repeat(S.length-(Math.max(S.lastIndexOf("\r"),S.lastIndexOf(` +`))+1))}const f="#".repeat(c),p=a.enter("headingAtx"),m=a.enter("phrasing");h.move(f+" ");let d=a.containerPhrasing(n,{before:"# ",after:` +`,...h.current()});return/^[\t ]/.test(d)&&(d=Da(d.charCodeAt(0))+d.slice(1)),d=d?f+" "+d:f,a.options.closeAtx&&(d+=" "+f),m(),p(),d}_g.peek=Jk;function _g(n){return n.value||""}function Jk(){return"<"}Og.peek=$k;function Og(n,r,a,u){const c=Nc(a),h=c==='"'?"Quote":"Apostrophe",f=a.enter("image");let p=a.enter("label");const m=a.createTracker(u);let d=m.move("![");return d+=m.move(a.safe(n.alt,{before:d,after:"]",...m.current()})),d+=m.move("]("),p(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(p=a.enter("destinationLiteral"),d+=m.move("<"),d+=m.move(a.safe(n.url,{before:d,after:">",...m.current()})),d+=m.move(">")):(p=a.enter("destinationRaw"),d+=m.move(a.safe(n.url,{before:d,after:n.title?" ":")",...m.current()}))),p(),n.title&&(p=a.enter(`title${h}`),d+=m.move(" "+c),d+=m.move(a.safe(n.title,{before:d,after:c,...m.current()})),d+=m.move(c),p()),d+=m.move(")"),f(),d}function $k(){return"!"}Mg.peek=Wk;function Mg(n,r,a,u){const c=n.referenceType,h=a.enter("imageReference");let f=a.enter("label");const p=a.createTracker(u);let m=p.move("![");const d=a.safe(n.alt,{before:m,after:"]",...p.current()});m+=p.move(d+"]["),f();const b=a.stack;a.stack=[],f=a.enter("reference");const y=a.safe(a.associationId(n),{before:m,after:"]",...p.current()});return f(),a.stack=b,h(),c==="full"||!d||d!==y?m+=p.move(y+"]"):c==="shortcut"?m=m.slice(0,-1):m+=p.move("]"),m}function Wk(){return"!"}Dg.peek=Pk;function Dg(n,r,a){let u=n.value||"",c="`",h=-1;for(;new RegExp("(^|[^`])"+c+"([^`]|$)").test(u);)c+="`";for(/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^`|`$/.test(u))&&(u=" "+u+" ");++h\u007F]/.test(n.url))}Ng.peek=e2;function Ng(n,r,a,u){const c=Nc(a),h=c==='"'?"Quote":"Apostrophe",f=a.createTracker(u);let p,m;if(Rg(n,a)){const b=a.stack;a.stack=[],p=a.enter("autolink");let y=f.move("<");return y+=f.move(a.containerPhrasing(n,{before:y,after:">",...f.current()})),y+=f.move(">"),p(),a.stack=b,y}p=a.enter("link"),m=a.enter("label");let d=f.move("[");return d+=f.move(a.containerPhrasing(n,{before:d,after:"](",...f.current()})),d+=f.move("]("),m(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(m=a.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(a.safe(n.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(m=a.enter("destinationRaw"),d+=f.move(a.safe(n.url,{before:d,after:n.title?" ":")",...f.current()}))),m(),n.title&&(m=a.enter(`title${h}`),d+=f.move(" "+c),d+=f.move(a.safe(n.title,{before:d,after:c,...f.current()})),d+=f.move(c),m()),d+=f.move(")"),p(),d}function e2(n,r,a){return Rg(n,a)?"<":"["}jg.peek=t2;function jg(n,r,a,u){const c=n.referenceType,h=a.enter("linkReference");let f=a.enter("label");const p=a.createTracker(u);let m=p.move("[");const d=a.containerPhrasing(n,{before:m,after:"]",...p.current()});m+=p.move(d+"]["),f();const b=a.stack;a.stack=[],f=a.enter("reference");const y=a.safe(a.associationId(n),{before:m,after:"]",...p.current()});return f(),a.stack=b,h(),c==="full"||!d||d!==y?m+=p.move(y+"]"):c==="shortcut"?m=m.slice(0,-1):m+=p.move("]"),m}function t2(){return"["}function jc(n){const r=n.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function n2(n){const r=jc(n),a=n.options.bulletOther;if(!a)return r==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+a+"`) to be different");return a}function l2(n){const r=n.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function Lg(n){const r=n.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function i2(n,r,a,u){const c=a.enter("list"),h=a.bulletCurrent;let f=n.ordered?l2(a):jc(a);const p=n.ordered?f==="."?")":".":n2(a);let m=r&&a.bulletLastUsed?f===a.bulletLastUsed:!1;if(!n.ordered){const b=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&b&&(!b.children||!b.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(m=!0),Lg(a)===f&&b){let y=-1;for(;++y-1?r.start:1)+(a.options.incrementListMarker===!1?0:r.children.indexOf(n))+h);let f=h.length+1;(c==="tab"||c==="mixed"&&(r&&r.type==="list"&&r.spread||n.spread))&&(f=Math.ceil(f/4)*4);const p=a.createTracker(u);p.move(h+" ".repeat(f-h.length)),p.shift(f);const m=a.enter("listItem"),d=a.indentLines(a.containerFlow(n,p.current()),b);return m(),d;function b(y,S,x){return S?(x?"":" ".repeat(f))+y:(x?h:h+" ".repeat(f-h.length))+y}}function u2(n,r,a,u){const c=a.enter("paragraph"),h=a.enter("phrasing"),f=a.containerPhrasing(n,u);return h(),c(),f}const o2=yu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function s2(n,r,a,u){return(n.children.some(function(f){return o2(f)})?a.containerPhrasing:a.containerFlow).call(a,n,u)}function c2(n){const r=n.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}Ug.peek=f2;function Ug(n,r,a,u){const c=c2(a),h=a.enter("strong"),f=a.createTracker(u),p=f.move(c+c);let m=f.move(a.containerPhrasing(n,{after:c,before:p,...f.current()}));const d=m.charCodeAt(0),b=fu(u.before.charCodeAt(u.before.length-1),d,c);b.inside&&(m=Da(d)+m.slice(1));const y=m.charCodeAt(m.length-1),S=fu(u.after.charCodeAt(0),y,c);S.inside&&(m=m.slice(0,-1)+Da(y));const x=f.move(c+c);return h(),a.attentionEncodeSurroundingInfo={after:S.outside,before:b.outside},p+m+x}function f2(n,r,a){return a.options.strong||"*"}function h2(n,r,a,u){return a.safe(n.value,u)}function d2(n){const r=n.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function p2(n,r,a){const u=(Lg(a)+(a.options.ruleSpaces?" ":"")).repeat(d2(a));return a.options.ruleSpaces?u.slice(0,-1):u}const Bg={blockquote:Uk,break:Rm,code:Vk,definition:Qk,emphasis:zg,hardBreak:Rm,heading:Ik,html:_g,image:Og,imageReference:Mg,inlineCode:Dg,link:Ng,linkReference:jg,list:i2,listItem:r2,paragraph:u2,root:s2,strong:Ug,text:h2,thematicBreak:p2};function m2(){return{enter:{table:g2,tableData:Nm,tableHeader:Nm,tableRow:b2},exit:{codeText:v2,table:y2,tableData:lc,tableHeader:lc,tableRow:lc}}}function g2(n){const r=n._align;this.enter({type:"table",align:r.map(function(a){return a==="none"?null:a}),children:[]},n),this.data.inTable=!0}function y2(n){this.exit(n),this.data.inTable=void 0}function b2(n){this.enter({type:"tableRow",children:[]},n)}function lc(n){this.exit(n)}function Nm(n){this.enter({type:"tableCell",children:[]},n)}function v2(n){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,x2));const a=this.stack[this.stack.length-1];a.type,a.value=r,this.exit(n)}function x2(n,r){return r==="|"?r:n}function S2(n){const r=n||{},a=r.tableCellPadding,u=r.tablePipeAlign,c=r.stringLength,h=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:S,table:f,tableCell:m,tableRow:p}};function f(x,T,U,K){return d(b(x,U,K),x.align)}function p(x,T,U,K){const D=y(x,U,K),F=d([D]);return F.slice(0,F.indexOf(` +`))}function m(x,T,U,K){const D=U.enter("tableCell"),F=U.enter("phrasing"),Q=U.containerPhrasing(x,{...K,before:h,after:h});return F(),D(),Q}function d(x,T){return jk(x,{align:T,alignDelimiters:u,padding:a,stringLength:c})}function b(x,T,U){const K=x.children;let D=-1;const F=[],Q=T.enter("table");for(;++D0&&!a&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const H2={tokenize:Z2,partial:!0};function q2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:X2,continuation:{tokenize:Q2},exit:K2}},text:{91:{name:"gfmFootnoteCall",tokenize:V2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Y2,resolveTo:G2}}}}function Y2(n,r,a){const u=this;let c=u.events.length;const h=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let f;for(;c--;){const m=u.events[c][1];if(m.type==="labelImage"){f=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return p;function p(m){if(!f||!f._balanced)return a(m);const d=un(u.sliceSerialize({start:f.end,end:u.now()}));return d.codePointAt(0)!==94||!h.includes(d.slice(1))?a(m):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(m),n.exit("gfmFootnoteCallLabelMarker"),r(m))}}function G2(n,r){let a=n.length;for(;a--;)if(n[a][1].type==="labelImage"&&n[a][0]==="enter"){n[a][1];break}n[a+1][1].type="data",n[a+3][1].type="gfmFootnoteCallLabelMarker";const u={type:"gfmFootnoteCall",start:Object.assign({},n[a+3][1].start),end:Object.assign({},n[n.length-1][1].end)},c={type:"gfmFootnoteCallMarker",start:Object.assign({},n[a+3][1].end),end:Object.assign({},n[a+3][1].end)};c.end.column++,c.end.offset++,c.end._bufferIndex++;const h={type:"gfmFootnoteCallString",start:Object.assign({},c.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},h.start),end:Object.assign({},h.end)},p=[n[a+1],n[a+2],["enter",u,r],n[a+3],n[a+4],["enter",c,r],["exit",c,r],["enter",h,r],["enter",f,r],["exit",f,r],["exit",h,r],n[n.length-2],n[n.length-1],["exit",u,r]];return n.splice(a,n.length-a+1,...p),n}function V2(n,r,a){const u=this,c=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let h=0,f;return p;function p(y){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),m}function m(y){return y!==94?a(y):(n.enter("gfmFootnoteCallMarker"),n.consume(y),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",d)}function d(y){if(h>999||y===93&&!f||y===null||y===91||Ve(y))return a(y);if(y===93){n.exit("chunkString");const S=n.exit("gfmFootnoteCallString");return c.includes(un(u.sliceSerialize(S)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):a(y)}return Ve(y)||(f=!0),h++,n.consume(y),y===92?b:d}function b(y){return y===91||y===92||y===93?(n.consume(y),h++,d):d(y)}}function X2(n,r,a){const u=this,c=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let h,f=0,p;return m;function m(T){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(T),n.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(T){return T===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(T),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",b):a(T)}function b(T){if(f>999||T===93&&!p||T===null||T===91||Ve(T))return a(T);if(T===93){n.exit("chunkString");const U=n.exit("gfmFootnoteDefinitionLabelString");return h=un(u.sliceSerialize(U)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(T),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),S}return Ve(T)||(p=!0),f++,n.consume(T),T===92?y:b}function y(T){return T===91||T===92||T===93?(n.consume(T),f++,b):b(T)}function S(T){return T===58?(n.enter("definitionMarker"),n.consume(T),n.exit("definitionMarker"),c.includes(h)||c.push(h),_e(n,x,"gfmFootnoteDefinitionWhitespace")):a(T)}function x(T){return r(T)}}function Q2(n,r,a){return n.check(Na,r,n.attempt(H2,r,a))}function K2(n){n.exit("gfmFootnoteDefinition")}function Z2(n,r,a){const u=this;return _e(n,c,"gfmFootnoteDefinitionIndent",5);function c(h){const f=u.events[u.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(h):a(h)}}function F2(n){let a=(n||{}).singleTilde;const u={name:"strikethrough",tokenize:h,resolveAll:c};return a==null&&(a=!0),{text:{126:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function c(f,p){let m=-1;for(;++m1?m(T):(f.consume(T),y++,x);if(y<2&&!a)return m(T);const K=f.exit("strikethroughSequenceTemporary"),D=wi(T);return K._open=!D||D===2&&!!U,K._close=!U||U===2&&!!D,p(T)}}}class I2{constructor(){this.map=[]}add(r,a,u){J2(this,r,a,u)}consume(r){if(this.map.sort(function(h,f){return h[0]-f[0]}),this.map.length===0)return;let a=this.map.length;const u=[];for(;a>0;)a-=1,u.push(r.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),r.length=this.map[a][0];u.push(r.slice()),r.length=0;let c=u.pop();for(;c;){for(const h of c)r.push(h);c=u.pop()}this.map.length=0}}function J2(n,r,a,u){let c=0;if(!(a===0&&u.length===0)){for(;c-1;){const J=u.events[te][1].type;if(J==="lineEnding"||J==="linePrefix")te--;else break}const B=te>-1?u.events[te][1].type:null,le=B==="tableHead"||B==="tableRow"?L:m;return le===L&&u.parser.lazy[u.now().line]?a(N):le(N)}function m(N){return n.enter("tableHead"),n.enter("tableRow"),d(N)}function d(N){return N===124||(f=!0,h+=1),b(N)}function b(N){return N===null?a(N):ce(N)?h>1?(h=0,u.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),x):a(N):Ee(N)?_e(n,b,"whitespace")(N):(h+=1,f&&(f=!1,c+=1),N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),f=!0,b):(n.enter("data"),y(N)))}function y(N){return N===null||N===124||Ve(N)?(n.exit("data"),b(N)):(n.consume(N),N===92?S:y)}function S(N){return N===92||N===124?(n.consume(N),y):y(N)}function x(N){return u.interrupt=!1,u.parser.lazy[u.now().line]?a(N):(n.enter("tableDelimiterRow"),f=!1,Ee(N)?_e(n,T,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):T(N))}function T(N){return N===45||N===58?K(N):N===124?(f=!0,n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),U):re(N)}function U(N){return Ee(N)?_e(n,K,"whitespace")(N):K(N)}function K(N){return N===58?(h+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),D):N===45?(h+=1,D(N)):N===null||ce(N)?ue(N):re(N)}function D(N){return N===45?(n.enter("tableDelimiterFiller"),F(N)):re(N)}function F(N){return N===45?(n.consume(N),F):N===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),Q):(n.exit("tableDelimiterFiller"),Q(N))}function Q(N){return Ee(N)?_e(n,ue,"whitespace")(N):ue(N)}function ue(N){return N===124?T(N):N===null||ce(N)?!f||c!==h?re(N):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(N)):re(N)}function re(N){return a(N)}function L(N){return n.enter("tableRow"),P(N)}function P(N){return N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),P):N===null||ce(N)?(n.exit("tableRow"),r(N)):Ee(N)?_e(n,P,"whitespace")(N):(n.enter("data"),de(N))}function de(N){return N===null||N===124||Ve(N)?(n.exit("data"),P(N)):(n.consume(N),N===92?me:de)}function me(N){return N===92||N===124?(n.consume(N),de):de(N)}}function ew(n,r){let a=-1,u=!0,c=0,h=[0,0,0,0],f=[0,0,0,0],p=!1,m=0,d,b,y;const S=new I2;for(;++aa[2]+1){const T=a[2]+1,U=a[3]-a[2]-1;n.add(T,U,[])}}n.add(a[3]+1,0,[["exit",y,r]])}return c!==void 0&&(h.end=Object.assign({},ki(r.events,c)),n.add(c,0,[["exit",h,r]]),h=void 0),h}function Lm(n,r,a,u,c){const h=[],f=ki(r.events,a);c&&(c.end=Object.assign({},f),h.push(["exit",c,r])),u.end=Object.assign({},f),h.push(["exit",u,r]),n.add(a+1,0,h)}function ki(n,r){const a=n[r],u=a[0]==="enter"?"start":"end";return a[1][u]}const tw={name:"tasklistCheck",tokenize:lw};function nw(){return{text:{91:tw}}}function lw(n,r,a){const u=this;return c;function c(m){return u.previous!==null||!u._gfmTasklistFirstContentOfListItem?a(m):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(m),n.exit("taskListCheckMarker"),h)}function h(m){return Ve(m)?(n.enter("taskListCheckValueUnchecked"),n.consume(m),n.exit("taskListCheckValueUnchecked"),f):m===88||m===120?(n.enter("taskListCheckValueChecked"),n.consume(m),n.exit("taskListCheckValueChecked"),f):a(m)}function f(m){return m===93?(n.enter("taskListCheckMarker"),n.consume(m),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),p):a(m)}function p(m){return ce(m)?r(m):Ee(m)?n.check({tokenize:iw},r,a)(m):a(m)}}function iw(n,r,a){return _e(n,u,"whitespace");function u(c){return c===null?a(c):r(c)}}function aw(n){return lg([O2(),q2(),F2(n),W2(),nw()])}const rw={};function uw(n){const r=this,a=n||rw,u=r.data(),c=u.micromarkExtensions||(u.micromarkExtensions=[]),h=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),f=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);c.push(aw(a)),h.push(C2()),f.push(T2(a))}/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ow=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zg=(...n)=>n.filter((r,a,u)=>!!r&&u.indexOf(r)===a).join(" ");/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var sw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cw=We.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:u,className:c="",children:h,iconNode:f,...p},m)=>We.createElement("svg",{ref:m,...sw,width:r,height:r,stroke:n,strokeWidth:u?Number(a)*24/Number(r):a,className:Zg("lucide",c),...p},[...f.map(([d,b])=>We.createElement(d,b)),...Array.isArray(h)?h:[h]]));/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ot=(n,r)=>{const a=We.forwardRef(({className:u,...c},h)=>We.createElement(cw,{ref:h,iconNode:r,className:Zg(`lucide-${ow(n)}`,u),...c}));return a.displayName=`${n}`,a};/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hu=ot("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fg=ot("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fw=ot("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hw=ot("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dw=ot("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Um=ot("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pw=ot("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mw=ot("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bm=ot("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gw=ot("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yw=ot("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bw=ot("PackageCheck",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vw=ot("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xw=ot("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sw=ot("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kw=ot("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ww=ot("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + * @license lucide-react v0.453.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hm=ot("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);function Ew(){if(typeof window>"u")return"light";try{const n=window.localStorage.getItem("docs-theme");if(n==="light"||n==="dark")return n}catch{}return"light"}function Aw(n){typeof document>"u"||(document.documentElement.classList.toggle("dark",n==="dark"),document.documentElement.style.colorScheme=n)}function Cw(){const[n,r]=We.useState(Ew);return We.useEffect(()=>{Aw(n);try{window.localStorage.setItem("docs-theme",n)}catch{}},[n]),{theme:n,toggle:()=>r(u=>u==="dark"?"light":"dark")}}const an='"JetBrains Mono", "SF Mono", ui-monospace, monospace',Wt='"Computer Modern Concrete", "Concrete Roman", Georgia, "Times New Roman", serif',uu=[{key:"openscience",label:"OpenScience",short:"OpenScience",tagline:"Open-source AI workbench",lead:!1}],Uc=uu.map(n=>n.key),Tw=Object.assign({"./content/openscience/agents.mdx":kb,"./content/openscience/atlas.mdx":wb,"./content/openscience/commands.mdx":Eb,"./content/openscience/index.mdx":Ab,"./content/openscience/models.mdx":Cb,"./content/openscience/quickstart.mdx":Tb,"./content/openscience/security.mdx":zb,"./content/openscience/sessions.mdx":_b,"./content/openscience/skills.mdx":Ob,"./content/openscience/workspace.mdx":Mb}),zw=Object.assign({"./content/openscience/docs.json":Lb}),qm={index:H.jsx(Bm,{size:17,strokeWidth:1.8}),quickstart:H.jsx(vw,{size:17,strokeWidth:1.8}),workspace:H.jsx(gw,{size:17,strokeWidth:1.8}),agents:H.jsx(fw,{size:17,strokeWidth:1.8}),models:H.jsx(bw,{size:17,strokeWidth:1.8}),skills:H.jsx(Fg,{size:17,strokeWidth:1.8}),sessions:H.jsx(Hm,{size:17,strokeWidth:1.8}),atlas:H.jsx(Bm,{size:17,strokeWidth:1.8}),commands:H.jsx(Hm,{size:17,strokeWidth:1.8}),security:H.jsx(Sw,{size:17,strokeWidth:1.8})},_w={openscience:H.jsx(mw,{size:17,strokeWidth:1.8})},Ow=/^---\n([\s\S]*?)\n---\n?/;function Mw(n){const r=n.match(Ow);if(!r)return{title:"Untitled",description:"",body:n};const a=r[1],u=n.slice(r[0].length),c=h=>{const f=a.split(` +`).find(p=>p.trim().startsWith(`${h}:`));return f?f.split(":").slice(1).join(":").trim().replace(/^["']|["']$/g,""):""};return{title:c("title")||"Untitled",description:c("description"),body:u}}function Dw(n){return n.split(` +`).filter(r=>r.startsWith("## ")).map(r=>r.replace(/^##\s+/,"").trim()).slice(0,10)}function Si(n){return n.flatMap(r=>typeof r=="string"?[r]:r.pages)}function Rw(n,r){const a=n.split("/").pop()??n;return qm[n]??qm[a]??_w[r]}function Nw(n){const r=`./content/${n}/`,a={};for(const[u,c]of Object.entries(Tw)){if(!u.startsWith(r))continue;const h=u.slice(r.length).replace(/\.(mdx|md)$/,""),f=Mw(c);a[h]={path:h,title:f.title,description:f.description,icon:Rw(h,n),body:f.body,headings:Dw(f.body)}}return a}const za={openscience:Nw("openscience")},Ym={openscience:zw["./content/openscience/docs.json"]};function _a(n,r){var a;return!!((a=za[n])!=null&&a[r])}const jw={"agent-cli":"openscience"},Lw={"first-session":"sessions","sub-agents":"agents","web-ui":"workspace",credentials:"atlas"},Uw={"cli:index":{section:"openscience",path:"index"},"cli:installation":{section:"openscience",path:"quickstart"},"cli:quickstart":{section:"openscience",path:"quickstart"},"cli:first-session":{section:"openscience",path:"sessions"},"cli:sessions":{section:"openscience",path:"sessions"},"cli:models":{section:"openscience",path:"models"},"cli:codex":{section:"openscience",path:"models"},"cli:sub-agents":{section:"openscience",path:"agents"},"cli:skills":{section:"openscience",path:"skills"},"cli:cli-runtime":{section:"openscience",path:"commands"},"cli:connect":{section:"openscience",path:"atlas"},"cli:credentials":{section:"openscience",path:"atlas"},"cli:security":{section:"openscience",path:"security"},"cli:feature-map":{section:"openscience",path:"commands"},"cli:commands":{section:"openscience",path:"commands"},"cli:web-ui":{section:"openscience",path:"workspace"},"cli:server-mode":{section:"openscience",path:"workspace"}};function ic(){return{section:"openscience",path:"index"}}function Gm(){if(typeof window>"u")return ic();const n=decodeURIComponent(window.location.hash.replace(/^#\/?/,"")).replace(/\/$/,"");if(!n)return ic();const r=n.split("/"),a=r[0];if(Uc.includes(a)){const h=r.slice(1).join("/")||"index";return _a(a,h)?{section:a,path:h}:{section:a,path:"index"}}const u=jw[r[0]];if(u){const h=r.slice(1).join("/")||"index",f=Lw[h]??h;return _a(u,f)?{section:u,path:f}:{section:u,path:"index"}}const c=Uw[`cli:${n}`];return c&&_a(c.section,c.path)?c:ic()}function rn(n,r){return`#/${n}/${r}`}let Oa="openscience";function Bc(n){if(!n||n.startsWith("http")||n.startsWith("#")||n.startsWith("mailto:"))return n;if(n.startsWith("/")){const r=n.slice(1).replace(/\/$/,"");if(!r)return rn(Oa,"index");const a=r.split("/"),u=a[0];if(Uc.includes(u)){const c=a.slice(1).join("/")||"index";if(_a(u,c))return rn(u,c)}if(_a(Oa,r))return rn(Oa,r)}return n}function Bw(n){const u=n.replace(/^#\/?/,"").replace(/\/$/,"").split("/")[0];return Uc.includes(u)?u:Oa}function Hc(n){const r={};for(const a of n.matchAll(/([\w-]+)(?:=(?:"([^"]*)"|'([^']*)'|\{([^}]*)\}))?/g)){const u=a[1];u&&(r[u]=a[2]??a[3]??a[4]??!0)}return r}function qc(n){const r=n.replace(/\t/g," ").split(` +`);let a=1/0;for(const u of r){if(u.trim()==="")continue;const c=u.match(/^( *)/);c&&(a=Math.min(a,c[1].length))}return!Number.isFinite(a)||a===0?n:r.map(u=>u.length>=a?u.slice(a):u).join(` +`)}function Ig(n){return Array.from(n.matchAll(/]*)>\s*([\s\S]*?)\s*<\/Card>/g)).map(r=>{const a=Hc(r[1]??"");return{title:String(a.title??"Untitled"),href:String(a.href??"#"),icon:a.icon?String(a.icon):void 0,horizontal:!!a.horizontal,body:qc(r[2]??"").trim()}})}function Hw(n){var a;const r=Bc(n.href);if(r&&r.startsWith("#/")){const u=Bw(r),c=r.replace(/^#\/?/,"").replace(/\/$/,"").split("/").slice(1).join("/"),h=(a=za[u])==null?void 0:a[c];if(h)return h.icon}return H.jsx(Fg,{size:17,strokeWidth:1.8})}const au="synthetic-sciences/openscience";function qw(n){return n>=1e3?`${(n/1e3).toFixed(1).replace(/\.0$/,"")}k`:String(n)}function Yw(){const[n,r]=We.useState(null);return We.useEffect(()=>{let a=!1;const u=`docs-gh-stars:${au}`;try{const c=JSON.parse(window.localStorage.getItem(u)??"null");if(c&&Date.now()-c.at<3600*1e3){r(c.stars);return}}catch{}return fetch(`https://api.github.com/repos/${au}`).then(c=>c.ok?c.json():null).then(c=>{const h=c==null?void 0:c.stargazers_count;if(!(typeof h!="number"||a)){r(h);try{window.localStorage.setItem(u,JSON.stringify({stars:h,at:Date.now()}))}catch{}}}).catch(()=>{}),()=>{a=!0}},[]),H.jsxs("div",{className:"docs-ghstars",children:[H.jsxs("a",{className:"docs-ghstars-primary",href:`https://github.com/${au}`,target:"_blank",rel:"noreferrer",children:[H.jsx(kw,{size:13,strokeWidth:1.8}),H.jsx("span",{children:"Star on GitHub"}),n!==null?H.jsx("em",{children:qw(n)}):null]}),H.jsx("a",{href:`https://github.com/${au}/blob/main/LICENSE`,target:"_blank",rel:"noreferrer",children:"Apache-2.0"}),H.jsx("a",{href:"https://www.npmjs.com/package/@synsci/openscience",target:"_blank",rel:"noreferrer",children:"npm · @synsci/openscience"})]})}function Gw({text:n}){const[r,a]=We.useState(!1);return H.jsxs("button",{type:"button",className:"docs-copy",onClick:()=>{navigator.clipboard.writeText(n),a(!0),window.setTimeout(()=>a(!1),1200)},"aria-label":"copy code",title:"copy code",children:[r?H.jsx(hw,{size:13,strokeWidth:1.8}):H.jsx(pw,{size:13,strokeWidth:1.8}),H.jsx("span",{children:r?"copied":"copy"})]})}const Vw={h2({children:n}){const r=String(n).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return H.jsx("h2",{id:r,children:n})},a({href:n,children:r}){const a=n==null?void 0:n.startsWith("http"),u=n?Bc(n):void 0;return H.jsxs("a",{href:u,target:a?"_blank":void 0,rel:a?"noreferrer":void 0,children:[r,a?H.jsx(hu,{size:12,strokeWidth:1.8}):null]})},pre({children:n}){const r=gc(n);return H.jsxs("div",{className:"docs-code-wrap",children:[H.jsx(Gw,{text:r}),H.jsx("pre",{children:n})]})},code({className:n,children:r}){const a=n==null?void 0:n.startsWith("language-");return H.jsx("code",{className:a?n:"docs-inline-code",children:r})},table({children:n}){return H.jsx("div",{className:"docs-table-wrap",children:H.jsx("table",{children:n})})},blockquote({children:n}){return H.jsx("blockquote",{className:"docs-callout",children:n})}};function gc(n){if(typeof n=="string")return n;if(Array.isArray(n))return n.map(gc).join("");if(n&&typeof n=="object"&&"props"in n){const r=n.props;return gc((r==null?void 0:r.children)??"")}return""}function du({children:n}){return n.trim()?H.jsx(FS,{remarkPlugins:[uw],components:Vw,children:n}):null}function Jg({card:n}){const r=n.href.startsWith("http");return H.jsxs("a",{className:n.horizontal?"docs-card docs-card-horizontal":"docs-card",href:Bc(n.href),target:r?"_blank":void 0,rel:r?"noreferrer":void 0,children:[H.jsx("span",{className:"docs-card-icon",children:Hw(n)}),H.jsxs("span",{className:"docs-card-copy",children:[H.jsx("strong",{children:n.title}),H.jsx("small",{children:n.body})]}),H.jsx(hu,{size:14,strokeWidth:1.8})]})}function Xw({source:n,cols:r}){const a=Ig(n);return a.length===0?null:H.jsx("div",{className:"docs-card-grid",style:{"--docs-card-cols":String(r)},children:a.map(u=>H.jsx(Jg,{card:u},`${u.title}-${u.href}`))})}function Qw({source:n}){const r=Array.from(n.matchAll(/]*)>\s*([\s\S]*?)\s*<\/Step>/g)).map(a=>{const u=Hc(a[1]??"");return{title:String(u.title??"Step"),body:qc(a[2]??"").trim()}});return r.length===0?null:H.jsx("div",{className:"docs-step-list",children:r.map((a,u)=>H.jsxs("section",{className:"docs-step",children:[H.jsx("span",{children:u+1}),H.jsxs("div",{children:[H.jsx("h3",{children:a.title}),H.jsx(du,{children:a.body})]})]},`${a.title}-${u}`))})}function Kw({children:n}){return H.jsx("blockquote",{className:"docs-callout docs-callout-warning",children:H.jsx(du,{children:qc(n).trim()})})}function Zw(n){const r=[],a=/<(Columns|CardGroup)\b([^>]*)>\s*([\s\S]*?)\s*<\/\1>|]*)>\s*([\s\S]*?)\s*<\/Card>|\s*([\s\S]*?)\s*<\/Steps>|\s*([\s\S]*?)\s*<\/Warning>|/g;let u=0,c=0;for(const f of n.matchAll(a)){const p=f.index??0,m=n.slice(u,p);if(m.trim()&&r.push(H.jsx(du,{children:m},`md-${c++}`)),f[1]){const d=Hc(f[2]??""),b=Number(d.cols??2);r.push(H.jsx(Xw,{source:f[3]??"",cols:Number.isFinite(b)&&b>0?b:2},`cards-${c++}`))}else if(f[4]!==void 0){const d=Ig(`${f[5]??""}`)[0];d&&r.push(H.jsx(Jg,{card:d},`card-${c++}`))}else f[6]!==void 0?r.push(H.jsx(Qw,{source:f[6]??""},`steps-${c++}`)):f[7]!==void 0?r.push(H.jsx(Kw,{children:f[7]??""},`warning-${c++}`)):f[0].startsWith("Gm()),c=a.section;Oa=c;const h=za[c],f=Ym[c],p=uu.find(B=>B.key===c)??uu[0],m=h[a.path]??h.index,[d,b]=We.useState(""),[y,S]=We.useState(!1),x=f.navigation.tabs,T=We.useMemo(()=>x.flatMap(B=>B.groups.flatMap(le=>Si(le.pages))).filter(B=>h[B]),[x,h]),U=We.useMemo(()=>x.find(B=>B.groups.some(le=>Si(le.pages).includes(m.path)))??x[0],[m.path,x]),K=We.useMemo(()=>U==null?void 0:U.groups.find(B=>Si(B.pages).includes(m.path)),[m.path,U]),D=T.indexOf(m.path),F=D>0?h[T[D-1]]:null,Q=D>=0&&D{const B=uu.flatMap(J=>Ym[J.key].navigation.tabs.flatMap(_=>_.groups.flatMap(Z=>Si(Z.pages))).map(_=>za[J.key][_]).filter(Boolean).map(_=>({path:_.path,title:_.title,description:_.description,icon:_.icon,section:J.key,sectionLabel:J.label}))),le=d.trim().toLowerCase();return le?B.filter(J=>{var Z;const $=((Z=za[J.section][J.path])==null?void 0:Z.body)??"";return`${J.title} ${J.description} ${J.sectionLabel} ${$}`.toLowerCase().includes(le)}).slice(0,8):B.filter(J=>J.section===c).slice(0,6)},[d,c]),re=B=>{window.location.hash=rn(B.section,B.path),u(B)};return We.useEffect(()=>{const B=()=>u(Gm());return window.addEventListener("hashchange",B),()=>window.removeEventListener("hashchange",B)},[]),We.useEffect(()=>{const B=rn(a.section,a.path);window.location.hash!==B&&window.history.replaceState(null,"",B)},[a.section,a.path]),We.useEffect(()=>{const B=le=>{var J;(le.metaKey||le.ctrlKey)&&le.key.toLowerCase()==="k"&&(le.preventDefault(),S(!0),(J=document.querySelector(".docs-search-input"))==null||J.focus())};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[]),H.jsxs("div",{className:"docs-page",children:[H.jsxs("header",{className:"docs-topbar",children:[H.jsxs("a",{href:"https://openscience.sh",className:"docs-brand",children:[H.jsx("img",{src:"/docs/favicon.svg",alt:""}),H.jsxs("span",{className:"docs-brand-text",children:[H.jsx("small",{children:"OpenScience"}),H.jsx("strong",{children:"Docs"})]})]}),H.jsxs("div",{className:"docs-search",role:"search",children:[H.jsx(xw,{size:14,strokeWidth:1.8}),H.jsx("input",{className:"docs-search-input","aria-label":"Search documentation",value:d,onBlur:()=>window.setTimeout(()=>S(!1),120),onChange:B=>{b(B.target.value),S(!0)},onFocus:()=>S(!0),placeholder:"Search all docs...",type:"search"}),H.jsx("kbd",{children:"⌘K"}),y?H.jsx("div",{className:"docs-search-results",role:"listbox","aria-label":"documentation search results",children:ue.length>0?ue.map(B=>H.jsxs("a",{href:rn(B.section,B.path),role:"option","aria-selected":c===B.section&&a.path===B.path,onMouseDown:le=>{le.preventDefault(),re({section:B.section,path:B.path}),b(""),S(!1)},children:[H.jsx("span",{children:B.icon}),H.jsx("strong",{children:B.title}),H.jsx("small",{children:B.sectionLabel})]},`${B.section}/${B.path}`)):H.jsx("span",{className:"docs-search-empty",children:"No docs match that query."})}):null]}),H.jsxs("nav",{className:"docs-actions","aria-label":"documentation actions",children:[H.jsxs("button",{type:"button",className:"docs-theme-toggle",onClick:r,"aria-label":n==="dark"?"switch to light mode":"switch to dark mode",title:n==="dark"?"light mode":"dark mode",children:[n==="dark"?H.jsx(ww,{size:14,strokeWidth:1.8}):H.jsx(yw,{size:14,strokeWidth:1.8}),H.jsx("span",{children:n==="dark"?"light":"dark"})]}),H.jsxs("a",{className:"docs-topbar-cta",href:((P=(L=f.navbar)==null?void 0:L.primary)==null?void 0:P.href)??"https://github.com/synthetic-sciences/openscience",children:[(((me=(de=f.navbar)==null?void 0:de.primary)==null?void 0:me.label)??"Star on GitHub").toLowerCase(),H.jsx(hu,{size:13,strokeWidth:1.8})]})]})]}),H.jsxs("div",{className:"docs-shell",children:[H.jsxs("aside",{className:"docs-sidebar","aria-label":"documentation navigation",children:[H.jsxs("div",{className:"docs-sidebar-title",children:[H.jsx("span",{children:p.label}),H.jsx("small",{children:p.tagline})]}),x.length>1?H.jsx("nav",{className:"docs-section-tabs","aria-label":"documentation sections",children:x.map(B=>{const le=B.groups.flatMap(J=>Si(J.pages)).find(J=>h[J]);return le?H.jsx("a",{className:(U==null?void 0:U.tab)===B.tab?"active":void 0,href:rn(c,le),onClick:()=>re({section:c,path:le}),children:B.tab},B.tab):null})}):null,U?H.jsx("div",{children:U.groups.map(B=>H.jsxs("div",{className:"docs-sidebar-group",children:[H.jsx("span",{children:B.group}),Si(B.pages).map(le=>{const J=h[le];return J?H.jsxs("a",{href:rn(c,le),className:a.path===le?"active":void 0,onClick:()=>re({section:c,path:le}),children:[H.jsx("span",{children:J.icon}),J.title]},le):null})]},B.group))},U.tab):null]}),H.jsxs("main",{className:"docs-main",children:[H.jsxs("nav",{className:"docs-breadcrumbs","aria-label":"breadcrumbs",children:[H.jsx("a",{href:rn(c,"index"),children:p.label}),H.jsx(Um,{size:13,strokeWidth:1.8}),K?H.jsx("span",{children:K.group}):null]}),H.jsxs("section",{className:"docs-hero",children:[H.jsx("h1",{children:m.title}),m.description?H.jsx("p",{children:m.description}):null]}),H.jsx("article",{className:"docs-markdown",children:Zw(m.body)}),H.jsxs("nav",{className:"docs-pagination","aria-label":"documentation pagination",children:[F?H.jsxs("a",{href:rn(c,F.path),onClick:()=>re({section:c,path:F.path}),children:[H.jsx(dw,{size:16,strokeWidth:1.8}),H.jsxs("span",{children:[H.jsx("small",{children:"Previous"}),F.title]})]}):H.jsx("span",{}),Q?H.jsxs("a",{href:rn(c,Q.path),onClick:()=>re({section:c,path:Q.path}),children:[H.jsxs("span",{children:[H.jsx("small",{children:"Next"}),Q.title]}),H.jsx(Um,{size:16,strokeWidth:1.8})]}):H.jsx("span",{})]})]}),H.jsxs("aside",{className:"docs-toc","aria-label":"on this page",children:[H.jsx("span",{children:"On this page"}),m.headings.length>0?m.headings.map(B=>H.jsx("a",{href:`#${B.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,children:B},B)):H.jsx("span",{className:"docs-toc-empty",children:"No sections"}),(((N=f.navigation.global)==null?void 0:N.anchors)??[]).length>0?H.jsxs("div",{className:"docs-agent-links",children:[H.jsx("span",{children:"Agent resources"}),(((te=f.navigation.global)==null?void 0:te.anchors)??[]).map(B=>H.jsxs("a",{href:B.href,target:B.href.startsWith("http")?"_blank":void 0,rel:"noreferrer",children:[B.anchor,H.jsx(hu,{size:11,strokeWidth:1.8})]},B.href))]}):null]})]}),H.jsx("style",{children:Iw})]})}const Iw=` + .docs-page { + --color-bg: #fafbfc; + --color-bg-subtle: #f1f3f5; + --color-bg-elevated: #ffffff; + --color-border: rgba(15, 23, 42, 0.10); + --color-text: #0f172a; + --color-text-muted: #475569; + --color-text-faint: #94a3b8; + --docs-accent: #2f6f54; + min-height: 100dvh; + color: var(--color-text); + background: var(--color-bg); + font-family: ${Wt}; + font-feature-settings: "kern", "liga"; + } + + /* No italics anywhere - the font family ships regular and bold only. */ + .docs-page em, + .docs-page i, + .docs-page cite, + .docs-page dfn, + .docs-page address { + font-style: normal; + } + + .dark .docs-page { + --color-bg: #0a0a0b; + --color-bg-subtle: #141417; + --color-bg-elevated: #1c1c20; + --color-border: rgba(255, 255, 255, 0.10); + --color-text: #f1f5f9; + --color-text-muted: #b8bbc4; + --color-text-faint: #6c7280; + --docs-accent: #9bd6b4; + } + + .docs-topbar { + height: 60px; + display: grid; + grid-template-columns: minmax(200px, 1fr) minmax(240px, 520px) minmax(200px, 1fr); + align-items: center; + gap: 20px; + padding: 0 28px; + border-bottom: 1px solid var(--color-border); + background: color-mix(in srgb, var(--color-bg) 94%, transparent); + backdrop-filter: blur(14px); + position: sticky; + top: 0; + z-index: 30; + } + + .docs-topbar nav, + .docs-topbar nav a, + .docs-search, + .docs-copy, + .docs-markdown a { + display: flex; + align-items: center; + } + + .docs-brand { + display: inline-flex; + align-items: center; + gap: 12px; + color: var(--color-text); + text-decoration: none; + min-width: 0; + padding: 4px 6px; + border-radius: 6px; + transition: background 120ms ease; + } + + .docs-brand:hover { + background: var(--color-bg-elevated); + } + + .docs-brand img { + width: 28px; + height: 28px; + flex-shrink: 0; + } + + .docs-brand-text { + display: flex; + flex-direction: column; + gap: 1px; + min-width: 0; + line-height: 1.1; + } + + .docs-brand-text small { + font-family: ${an}; + font-size: 9.5px; + font-weight: 500; + letter-spacing: 0.12em; + text-transform: uppercase; + color: var(--color-text-faint); + } + + .docs-brand-text strong { + font-family: ${Wt}; + font-size: 15px; + font-weight: 400; + letter-spacing: 0; + color: var(--color-text); + } + + .docs-search { + position: relative; + height: 34px; + gap: 9px; + border: 1px solid var(--color-border); + border-radius: 6px; + background: var(--color-bg-elevated); + padding: 0 8px 0 12px; + color: var(--color-text-faint); + transition: border-color 120ms ease, background 120ms ease; + } + + .docs-search:focus-within { + border-color: var(--color-text-faint); + background: var(--color-bg); + } + + .docs-search input { + min-width: 0; + flex: 1; + border: 0; + outline: 0; + background: transparent; + color: var(--color-text); + font-family: ${Wt}; + font-size: 14px; + } + + .docs-search input::placeholder { + color: var(--color-text-faint); + font-family: ${Wt}; + } + + .docs-search kbd { + min-width: 32px; + height: 20px; + display: inline-flex; + align-items: center; + justify-content: center; + border: 1px solid var(--color-border); + border-radius: 4px; + background: var(--color-bg); + color: var(--color-text-faint); + font-family: ${an}; + font-size: 10.5px; + font-weight: 500; + flex-shrink: 0; + } + + .docs-search-results { + position: absolute; + top: calc(100% + 8px); + left: 0; + right: 0; + display: flex; + flex-direction: column; + gap: 3px; + padding: 7px; + border: 1px solid var(--color-border); + border-radius: 8px; + background: var(--color-bg-elevated); + box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12); + z-index: 50; + } + + .docs-search-results a { + display: grid; + grid-template-columns: 24px minmax(0, 1fr); + gap: 1px 8px; + align-items: center; + padding: 8px; + border-radius: 7px; + color: var(--color-text); + text-decoration: none; + } + + .docs-search-results a:hover { + background: var(--color-bg-subtle); + } + + .docs-search-results a > span { + grid-row: span 2; + color: var(--color-text-faint); + } + + .docs-search-results strong { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 13px; + font-weight: 700; + } + + .docs-search-results small, + .docs-search-empty { + overflow: hidden; + color: var(--color-text-muted); + text-overflow: ellipsis; + white-space: nowrap; + font-size: 12px; + } + + .docs-search-empty { + padding: 10px; + } + + .docs-topbar nav { + gap: 8px; + justify-content: flex-end; + } + + .docs-actions { + justify-content: flex-end; + gap: 8px; + } + + .docs-topbar nav a { + gap: 6px; + height: 34px; + padding: 0 14px; + border-radius: 6px; + color: var(--color-text-muted); + text-decoration: none; + font-family: ${Wt}; + font-size: 14px; + font-weight: 400; + border: 1px solid transparent; + transition: background 120ms ease, color 120ms ease, border-color 120ms ease; + } + + .docs-topbar nav a:hover { + color: var(--color-text); + background: var(--color-bg-elevated); + border-color: var(--color-border); + } + + .docs-topbar-cta { + color: var(--color-text) !important; + border-color: var(--color-border) !important; + background: var(--color-bg-elevated); + } + + .docs-theme-toggle { + display: inline-flex; + align-items: center; + gap: 6px; + height: 34px; + padding: 0 12px; + border-radius: 6px; + border: 1px solid transparent; + background: transparent; + color: var(--color-text-muted); + font-family: ${Wt}; + font-size: 14px; + font-weight: 400; + line-height: 1; + cursor: pointer; + transition: background 120ms ease, color 120ms ease, border-color 120ms ease; + } + + .docs-theme-toggle:hover { + color: var(--color-text); + background: var(--color-bg-elevated); + border-color: var(--color-border); + } + + .docs-theme-toggle:focus-visible { + outline: 2px solid var(--docs-accent); + outline-offset: 2px; + } + + .docs-shell { + display: grid; + grid-template-columns: 236px minmax(0, 760px) 176px; + gap: 34px; + max-width: 1240px; + margin: 0 auto; + padding: 30px 28px 84px; + } + + .docs-sidebar, + .docs-toc { + position: sticky; + top: 84px; + align-self: start; + max-height: calc(100dvh - 104px); + overflow: auto; + } + + .docs-sidebar { + padding-right: 4px; + } + + .docs-sidebar-title { + display: flex; + flex-direction: column; + gap: 2px; + margin: 0 0 14px 4px; + } + + .docs-sidebar-title span { + font-size: 13px; + font-weight: 700; + } + + .docs-sidebar-title small { + color: var(--color-text-faint); + font-family: ${an}; + font-size: 11px; + } + + .docs-section-tabs { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 4px; + margin: 0 0 20px; + padding: 3px; + border: 1px solid var(--color-border); + border-radius: 8px; + background: var(--color-bg-subtle); + } + + .docs-section-tabs a { + display: flex; + min-height: 28px; + align-items: center; + justify-content: center; + border-radius: 6px; + color: var(--color-text-muted); + text-decoration: none; + font-size: 12px; + } + + .docs-section-tabs a.active { + color: var(--color-text); + background: var(--color-bg-elevated); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03); + } + + .docs-sidebar-group { + display: flex; + flex-direction: column; + gap: 2px; + margin-bottom: 20px; + } + + .docs-sidebar-group > span, + .docs-toc > span, + .docs-toc-empty, + .docs-copy { + font-family: ${an}; + font-size: 11px; + letter-spacing: 0; + } + + .docs-sidebar-group > span, + .docs-toc > span, + .docs-toc-empty { + color: var(--color-text-faint); + } + + .docs-sidebar-group > span { + margin: 0 0 7px 4px; + text-transform: uppercase; + } + + .docs-sidebar a, + .docs-toc a { + color: var(--color-text-muted); + text-decoration: none; + font-size: 13px; + line-height: 1.45; + } + + .docs-sidebar a { + display: flex; + align-items: center; + gap: 9px; + min-height: 30px; + padding: 0 6px; + border-radius: 6px; + } + + .docs-sidebar a span { + color: var(--color-text-faint); + line-height: 0; + } + + .docs-sidebar a:hover { + color: var(--color-text); + background: var(--color-bg-subtle); + } + + .docs-sidebar a.active { + color: var(--color-text); + background: color-mix(in srgb, var(--color-bg-subtle) 82%, var(--docs-accent) 8%); + font-weight: 700; + } + + .docs-sidebar a.active span { + color: var(--color-text); + } + + .docs-main { + min-width: 0; + } + + .docs-breadcrumbs { + display: flex; + align-items: center; + gap: 7px; + margin: 2px 0 16px; + color: var(--color-text-faint); + font-size: 13px; + } + + .docs-breadcrumbs a { + color: inherit; + text-decoration: none; + } + + .docs-breadcrumbs a:hover { + color: var(--color-text); + } + + .docs-hero { + padding: 0 0 24px; + border-bottom: 1px solid var(--color-border); + margin-bottom: 30px; + } + + .docs-hero h1 { + margin: 0; + font-family: ${Wt}; + font-size: 40px; + line-height: 1.08; + font-weight: 700; + letter-spacing: -0.005em; + color: var(--color-text); + } + + .docs-hero p { + max-width: 680px; + margin: 12px 0 0; + font-family: ${Wt}; + color: var(--color-text-muted); + font-size: 17px; + line-height: 1.55; + } + + .docs-markdown { + color: var(--color-text); + font-family: ${Wt}; + } + + .docs-markdown > *:first-child { + margin-top: 0; + } + + .docs-markdown p, + .docs-markdown li, + .docs-markdown td { + color: var(--color-text-muted); + font-family: ${Wt}; + font-size: 16px; + line-height: 1.7; + font-feature-settings: "kern", "liga", "onum"; + } + + .docs-markdown p { + margin: 0 0 16px; + } + + .docs-markdown h2 { + margin: 36px 0 12px; + padding-top: 6px; + font-family: ${Wt}; + font-size: 24px; + line-height: 1.2; + font-weight: 700; + letter-spacing: 0; + color: var(--color-text); + scroll-margin-top: 84px; + } + + .docs-markdown h3 { + margin: 26px 0 10px; + font-family: ${Wt}; + font-size: 18px; + line-height: 1.28; + font-weight: 700; + letter-spacing: 0; + color: var(--color-text); + } + + .docs-markdown strong { + font-weight: 700; + color: var(--color-text); + } + + .docs-markdown em { + font-style: normal; + color: var(--color-text); + font-weight: 700; + } + + .docs-markdown ul, + .docs-markdown ol { + margin: 0 0 18px; + padding-left: 20px; + } + + .docs-markdown a { + display: inline-flex; + gap: 5px; + color: var(--color-text); + text-decoration: underline; + text-decoration-color: var(--color-text-faint); + text-underline-offset: 3px; + } + + .docs-ghstars { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; + margin: 2px 0 26px; + } + + .docs-ghstars a { + display: inline-flex; + align-items: center; + gap: 7px; + height: 30px; + padding: 0 13px; + border: 1px solid var(--color-border); + border-radius: 999px; + background: var(--color-bg-elevated); + color: var(--color-text-muted); + text-decoration: none; + font-family: ${an}; + font-size: 12px; + transition: border-color 120ms ease, color 120ms ease, background 120ms ease; + } + + .docs-ghstars a:hover { + color: var(--color-text); + border-color: color-mix(in srgb, var(--docs-accent) 44%, var(--color-border)); + } + + .docs-ghstars-primary { + color: var(--color-text) !important; + font-weight: 500; + } + + .docs-ghstars-primary em { + font-style: normal; + font-weight: 700; + padding-left: 8px; + border-left: 1px solid var(--color-border); + color: var(--docs-accent); + } + + .docs-card-grid { + display: grid; + grid-template-columns: repeat(var(--docs-card-cols, 2), minmax(0, 1fr)); + gap: 10px; + margin: 18px 0 26px; + } + + .docs-card { + position: relative; + display: grid !important; + grid-template-columns: minmax(0, 1fr) 14px; + gap: 10px; + align-items: start !important; + min-height: 96px; + padding: 15px; + border: 1px solid var(--color-border); + border-radius: 8px; + background: var(--color-bg-elevated); + color: var(--color-text) !important; + text-decoration: none !important; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02); + } + + .docs-card:hover { + border-color: color-mix(in srgb, var(--docs-accent) 34%, var(--color-border)); + background: var(--color-bg-subtle); + } + + .docs-card-horizontal { + min-height: 78px; + } + + .docs-card-icon { + display: none; + align-items: center; + justify-content: center; + width: 32px; + height: 32px; + border: 1px solid var(--color-border); + border-radius: 8px; + color: var(--color-text); + background: var(--color-bg); + } + + .docs-card-copy { + display: flex; + flex-direction: column; + gap: 7px; + min-width: 0; + } + + .docs-card-copy strong { + font-size: 13.5px; + line-height: 1.25; + font-weight: 700; + } + + .docs-card-copy small { + color: var(--color-text-muted); + font-size: 12.75px; + line-height: 1.55; + } + + .docs-code-wrap { + position: relative; + margin: 16px 0 22px; + overflow: hidden; + border: 1px solid var(--color-border); + border-radius: 8px; + background: #11150f; + } + + .docs-code-wrap pre { + margin: 0; + padding: 18px 16px; + overflow: auto; + font-family: ${an}; + font-size: 12px; + line-height: 1.72; + color: #eef4ee; + } + + .docs-copy { + position: absolute; + top: 8px; + right: 8px; + gap: 6px; + min-height: 25px; + padding: 0 8px; + border: 1px solid rgba(255, 255, 255, 0.12); + border-radius: 6px; + background: rgba(255, 255, 255, 0.06); + color: rgba(238, 244, 238, 0.78); + cursor: pointer; + } + + .docs-inline-code { + font-family: ${an}; + font-size: 12px; + border: 1px solid var(--color-border); + background: var(--color-bg-subtle); + border-radius: 5px; + color: var(--color-text); + padding: 1px 5px; + } + + .docs-table-wrap { + overflow: auto; + border: 1px solid var(--color-border); + border-radius: 8px; + margin: 16px 0 22px; + } + + .docs-table-wrap table { + width: 100%; + border-collapse: collapse; + min-width: 560px; + } + + .docs-table-wrap th, + .docs-table-wrap td { + padding: 10px 13px; + border-bottom: 1px solid var(--color-border); + text-align: left; + vertical-align: top; + } + + .docs-table-wrap th { + font-family: ${an}; + font-size: 11px; + color: var(--color-text-faint); + background: var(--color-bg-subtle); + } + + .docs-callout { + margin: 18px 0; + padding: 14px 16px; + border: 1px solid rgba(164, 120, 48, 0.28); + border-left: 3px solid rgba(164, 120, 48, 0.64); + border-radius: 7px; + background: color-mix(in srgb, var(--color-bg-subtle) 74%, rgba(164, 120, 48, 0.12)); + } + + .docs-callout p { + margin: 0; + color: var(--color-text); + } + + .docs-callout .docs-markdown p { + margin: 0; + } + + .docs-step-list { + display: flex; + flex-direction: column; + gap: 10px; + margin: 18px 0 28px; + } + + .docs-step { + display: grid; + grid-template-columns: 30px minmax(0, 1fr); + gap: 13px; + padding: 15px; + border: 1px solid var(--color-border); + border-radius: 8px; + background: var(--color-bg-elevated); + } + + .docs-step > span { + width: 27px; + height: 27px; + display: inline-flex; + align-items: center; + justify-content: center; + border: 1px solid var(--color-border); + border-radius: 999px; + background: var(--color-bg-subtle); + color: var(--color-text); + font-family: ${an}; + font-size: 12px; + font-weight: 700; + } + + .docs-step h3 { + margin: 2px 0 8px; + } + + .docs-toc { + display: flex; + flex-direction: column; + gap: 7px; + padding-left: 4px; + } + + .docs-toc > span { + margin-bottom: 4px; + } + + .docs-toc a { + line-height: 1.45; + } + + .docs-agent-links { + display: flex; + flex-direction: column; + gap: 7px; + margin-top: 20px; + padding-top: 14px; + border-top: 1px solid var(--color-border); + } + + .docs-agent-links > span { + font-family: ${an}; + font-size: 11px; + color: var(--color-text-faint); + } + + .docs-agent-links a { + display: inline-flex; + gap: 5px; + align-items: center; + } + + .docs-pagination { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 12px; + margin-top: 48px; + padding-top: 24px; + border-top: 1px solid var(--color-border); + } + + .docs-pagination a { + display: flex; + align-items: center; + gap: 10px; + min-height: 68px; + padding: 13px 14px; + border: 1px solid var(--color-border); + border-radius: 8px; + color: var(--color-text); + text-decoration: none; + background: var(--color-bg); + } + + .docs-pagination a:hover { + background: var(--color-bg-subtle); + } + + .docs-pagination a:last-child { + justify-content: flex-end; + text-align: right; + } + + .docs-pagination small { + display: block; + margin-bottom: 4px; + color: var(--color-text-faint); + font-family: ${an}; + font-size: 11px; + } + + @media (max-width: 1180px) { + .docs-shell { + grid-template-columns: 224px minmax(0, 1fr); + gap: 30px; + } + .docs-toc { + display: none; + } + } + + @media (max-width: 860px) { + .docs-topbar { + grid-template-columns: minmax(0, 1fr) auto; + padding: 0 16px; + } + + .docs-search { + grid-column: 1 / -1; + order: 2; + display: none; + } + + .docs-topbar nav a:not(.docs-topbar-cta) { + display: none; + } + + .docs-shell { + display: block; + padding: 22px 16px 64px; + } + + .docs-sidebar { + position: static; + border: 1px solid var(--color-border); + border-radius: 10px; + padding: 14px 12px; + margin-bottom: 22px; + max-height: none; + } + + .docs-hero h1 { + font-size: 34px; + } + + .docs-pagination { + grid-template-columns: 1fr; + } + + .docs-card-grid { + grid-template-columns: 1fr; + } + } +`;function Jw(){return H.jsx(Fw,{})}Sb.createRoot(document.getElementById("root")).render(H.jsx(pb.StrictMode,{children:H.jsx(Jw,{})})); diff --git a/frontend/landing/public/docs/favicon.svg b/frontend/landing/public/docs/favicon.svg new file mode 100644 index 0000000..7410f40 --- /dev/null +++ b/frontend/landing/public/docs/favicon.svg @@ -0,0 +1,17 @@ + + + + + + diff --git a/frontend/landing/public/docs/fonts/cmc/OFL.txt b/frontend/landing/public/docs/fonts/cmc/OFL.txt new file mode 100644 index 0000000..a55bb6b --- /dev/null +++ b/frontend/landing/public/docs/fonts/cmc/OFL.txt @@ -0,0 +1,103 @@ +Copyright (C) Authors of original metafont fonts: +Donald Ervin Knuth (cm, concrete fonts) +1995, 1996, 1997 J"org Knappen, 1990, 1992 Norbert Schwarz (ec fonts) +1992-2006 A.Khodulev, O.Lapko, A.Berdnikov, V.Volovich (lh fonts) +1997-2005 Claudio Beccari (cb greek fonts) +2002 FUKUI Rei (tipa fonts) +2003-2005 Han The Thanh (Vietnamese fonts) +1996-2005 Walter Schmidt (cmbright fonts) + +Copyright (C) 2003-2009, Andrey V. Panov (panov@canopus.iacp.dvo.ru), +with Reserved Font Family Name "Computer Modern Unicode fonts". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/frontend/landing/public/docs/fonts/cmc/cmunobx.woff2 b/frontend/landing/public/docs/fonts/cmc/cmunobx.woff2 new file mode 100644 index 0000000..bd558fc Binary files /dev/null and b/frontend/landing/public/docs/fonts/cmc/cmunobx.woff2 differ diff --git a/frontend/landing/public/docs/fonts/cmc/cmunorm.woff2 b/frontend/landing/public/docs/fonts/cmc/cmunorm.woff2 new file mode 100644 index 0000000..75b62ec Binary files /dev/null and b/frontend/landing/public/docs/fonts/cmc/cmunorm.woff2 differ diff --git a/frontend/landing/public/docs/index.html b/frontend/landing/public/docs/index.html new file mode 100644 index 0000000..1cf3b63 --- /dev/null +++ b/frontend/landing/public/docs/index.html @@ -0,0 +1,23 @@ + + + + + + + OpenScience Docs + + + + + + + + + + +
+ + diff --git a/frontend/landing/vercel.json b/frontend/landing/vercel.json index 92b7a22..0342c8d 100644 --- a/frontend/landing/vercel.json +++ b/frontend/landing/vercel.json @@ -4,5 +4,9 @@ "buildCommand": "bun run build", "installCommand": "bun install", "outputDirectory": "dist", - "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] + "rewrites": [ + { "source": "/docs", "destination": "/docs/index.html" }, + { "source": "/docs/:path*", "destination": "/docs/index.html" }, + { "source": "/(.*)", "destination": "/index.html" } + ] }