var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return T(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u{t.exports=d()})),p=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,E());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var ee=!1,S=-1,C=5,w=-1;function T(){return g?!0:!(e.unstable_now()-wt&&T());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?E():ee=!1}}}var E;if(typeof y==`function`)E=function(){y(te)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=te,E=function(){re.postMessage(null)}}else E=function(){_(te,0)};function ie(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,E()))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=o(((e,t)=>{t.exports=p()})),h=o((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=o((e=>{var t=m(),n=f(),r=g();function i(e){var t=`https://react.dev/errors/`+e;if(1ue||(e.current=le[ue],le[ue]=null,ue--)}function A(e,t){ue++,le[ue]=e.current,e.current=t}var pe=de(null),me=de(null),he=de(null),ge=de(null);function _e(e,t){switch(A(he,t),A(me,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(pe),A(pe,e)}function ve(){fe(pe),fe(me),fe(he)}function ye(e){e.memoizedState!==null&&A(ge,e);var t=pe.current,n=Hd(t,e.type);t!==n&&(A(me,e),A(pe,n))}function be(e){me.current===e&&(fe(pe),fe(me)),ge.current===e&&(fe(ge),Qf._currentValue=ce)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1)`:-1i||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(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 $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(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 nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),mn=!1;if(pn)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){mn=!0}}),window.addEventListener(`test`,hn,hn),window.removeEventListener(`test`,hn,hn)}catch{mn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.textContent,a=i.length;for(e=0;e=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=yn(),vn=_n=gn=null,ir=!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:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Bt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bt(e.document)}return t}function Or(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 kr=pn&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==Bt(r)||(r=Ar,`selectionStart`in r&&Or(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mr&&Cr(Mr,r)||(Mr=r,r=Ed(jr,`onSelect`),0>=o,i-=o,Ei=1<<32-Ge(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),B&&Oi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),B&&Oi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return B&&Oi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),B&&Oi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=pi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=fi(o.type,o.key,o.props,null,e.mode,c),Pa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=gi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Da(o),b(e,r,o,c)}if(se(o))return h(e,r,o,c);if(ae(o)){if(l=ae(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Na(o),c);if(o.$$typeof===S)return b(e,r,ta(e,o),c);Fa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=mi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(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 Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ai(e),ii(e,null,n),t}return ti(e,r,t,n),ai(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=fa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Y&f)===f:(r&f)===f){f!==0&&f===da&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:za=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=O.T,s={};O.T=s,Ps(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,ha(c,r),pu(e)):Ns(e,t,r,pu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,ce,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:ce},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},pu())}function Ds(){return ea(Qf)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(hu(r,t,n),Wa(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=ni(e,t,n,r),n!==null&&(hu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,pu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Sr(s,o))return ti(e,t,i,0),q===null&&ei(),!1}catch{}if(n=ni(e,t,i,r),n!==null)return hu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=ni(e,n,r,2),t!==null&&hu(t,e,2)}function Fs(e){var t=e.alternate;return e===V||t!==null&&t===V}function Is(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var Rs={readContext:ea,use:No,useCallback:U,useContext:U,useEffect:U,useImperativeHandle:U,useLayoutEffect:U,useInsertionEffect:U,useMemo:U,useReducer:U,useRef:U,useState:U,useDebugValue:U,useDeferredValue:U,useTransition:U,useSyncExternalStore:U,useId:U,useHostTransitionStatus:U,useFormState:U,useActionState:U,useOptimistic:U,useMemoCache:U,useCacheRefresh:U};Rs.useEffectEvent=U;var zs={readContext:ea,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:ea,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(go){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(go){We(!0);try{n(t)}finally{We(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,V,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=ko();if(B){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=q.identifierPrefix;if(B){var n=Di,r=Ei;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[mt]=t,o[ht]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return W(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=he.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ni,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Li(t,!0)}else e=Bd(e).createTextNode(r),e[mt]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[mt]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[mt]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),a=!1}else a=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),W(t),null);case 4:return ve(),e===null&&Sd(t.stateNode.containerInfo),W(t),null;case 10:return Ji(t.type),W(t),null;case 19:if(fe(lo),r=t.memoizedState,r===null)return W(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Lc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)di(n,e),n=n.sibling;return A(lo,lo.current&1|2),B&&Oi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>tu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!B)return W(t),null}else 2*Ne()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(W(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,n=lo.current,A(lo,a?n&1|2:n&1),B&&Oi(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&fe(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ji(oa),W(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(ji(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(oa),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(lo),null;case 4:return ve(),null;case 10:return Ji(t.type),null;case 22:case 23:return co(t),to(),e!==null&&fe(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(oa),null;case 25:return null;default:return null}}function Bc(e,t){switch(ji(t),t.tag){case 3:Ji(oa),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:fe(lo);break;case 10:Ji(t.type);break;case 22:case 23:co(t),to(),e!==null&&fe(_a);break;case 24:Ji(oa)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Z(e,e.return,t)}}}function Wc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ht]=t}catch(t){Z(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(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&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=rn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[mt]=e,t[ht]=n}catch(t){Z(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Rd=sp,e=Dr(e),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(o,r,n),o[mt]=e,Dt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Tr(s,h),v=Tr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,O.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{k.p=a,O.T=r,Vu(e,t)}}function Wu(e,t,n){t=vi(n,t),t=Qs(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(it(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=vi(n,e),n=$s(2),r=Ua(t,n,2),r!==null&&(ec(n,r,t,e),it(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ne()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=nt()),e=ri(e,t),e!==null&&(it(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return ke(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=$e(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ne(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Et(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Dt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=he.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Et(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Et(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Et(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Ht(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Dt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ht(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Dt(a),a):(r=n,(a=mf.get(o))&&(r=p({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Dt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=f(),b=v(),x=`data:image/svg+xml,%3csvg%20viewBox='0%200%20744%20896'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M386.8%20319.04%20386.47%20319.22%20503.32%20515.26c15.67%2023.24%2024.81%2050.92%2024.81%2080.67%200%2028.17-8.16%2054.52-22.35%2076.99l238.08-74.34L371.43%200l-89.7%20144.54L386.8%20319.04Z'/%3e%3cpath%20d='m186.58%20895.99%20187.05-151.33h-.48c-85.6%200-154.97-66.58-154.97-148.71%200-29.67%209.09-57.28%2024.69-80.49l110.53-185.79-91.87-152.56L0%20598.6l186.27%20297.39h.31Z'/%3e%3cpath%20d='m452.7%20723.59-.04.02-212.68%20172.38H555.6l159.96-252.69-262.86%2080.31v-.02Z'/%3e%3c/svg%3e`,ee=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),S=o(((e,t)=>{t.exports=ee()}))();function C(){return(0,S.jsxs)(`header`,{className:`relative z-10 mx-auto grid h-20 w-full max-w-screen-2xl grid-cols-2 items-center border-b border-stone-900/75 px-4 md:px-6`,children:[(0,S.jsxs)(`a`,{className:`inline-flex items-center justify-self-start gap-2 text-2xl font-bold tracking-tight text-inherit no-underline`,href:`https://www.liquid.ai/`,target:`_blank`,children:[(0,S.jsx)(`img`,{className:`h-6 w-5`,src:x,alt:``}),(0,S.jsx)(`span`,{children:`Liquid`})]}),(0,S.jsxs)(`div`,{className:`hidden items-center gap-1 text-xs font-bold tracking-widest text-stone-900/65 uppercase md:flex justify-end`,children:[(0,S.jsx)(`span`,{children:`powered by`}),(0,S.jsx)(`a`,{href:`https://huggingface.co/docs/transformers.js/index`,target:`_blank`,children:`Transformers.js`})]})]})}var w=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),T=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),te=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),E=e=>{let t=te(e);return t.charAt(0).toUpperCase()+t.slice(1)},ne={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`},re=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ie=(0,y.createContext)({}),ae=()=>(0,y.useContext)(ie),oe=(0,y.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ae()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,y.createElement)(`svg`,{ref:c,...ne,width:t??l??ne.width,height:t??l??ne.height,stroke:e??f,strokeWidth:m,className:w(`lucide`,p,i),...!a&&!re(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,y.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),D=(e,t)=>{let n=(0,y.forwardRef)(({className:n,...r},i)=>(0,y.createElement)(oe,{ref:i,iconNode:t,className:w(`lucide-${T(E(e))}`,`lucide-${e}`,n),...r}));return n.displayName=E(e),n},se=D(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),O=D(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),k=D(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),ce=D(`brain-circuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),le=D(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ue=D(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),de=D(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),fe=D(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),A=D(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),pe=D(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),me=D(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),he=D(`landmark`,[[`path`,{d:`M10 18v-7`,key:`wt116b`}],[`path`,{d:`M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z`,key:`yxxwt6`}],[`path`,{d:`M14 18v-7`,key:`vav6t3`}],[`path`,{d:`M18 18v-7`,key:`aexdmj`}],[`path`,{d:`M3 22h18`,key:`8prr45`}],[`path`,{d:`M6 18v-7`,key:`1ivflk`}]]),ge=D(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),_e=D(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),ve=D(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ye=D(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),be=D(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),xe=D(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Se=D(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Ce=D(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),we=D(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),Te=D(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`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-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),Ee=D(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),De=D(`shield-check`,[[`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`}]]),Oe=D(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),ke=D(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ae=D(`waves-horizontal`,[[`path`,{d:`M2 12q2.5 2 5 0t5 0 5 0 5 0`,key:`8ddzzs`}],[`path`,{d:`M2 19q2.5 2 5 0t5 0 5 0 5 0`,key:`1wj4st`}],[`path`,{d:`M2 5q2.5 2 5 0t5 0 5 0 5 0`,key:`69x50u`}]]),je=D(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),Me=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ne=D(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]);function Pe(e){if(Array.isArray(e))return e.map(String).map(e=>e.trim()).filter(Boolean);if(typeof e!=`string`)return[];let t=[...e.matchAll(/['"]([^'"]+)['"]/g)].map(e=>e[1]);return t.length>0?t:e.replace(/^\[|\]$/g,``).split(/;|\n/).map(e=>e.trim()).filter(Boolean)}function Fe(e,t){let n=String(e.goal??`Complete the current mission`),r=Pe(e.steps).slice(0,5),i=r.length>=1?r:[`Clarify the research scope`,`Gather reliable evidence`,`Synthesize the cited research answer`],a=String(e.priority??`medium`),o=[`low`,`medium`,`high`].includes(a)?a:`medium`,s={id:`local-plan-${crypto.randomUUID().slice(0,8)}`,goal:n,priority:o,status:`active`,currentStep:1,steps:i.map((e,t)=>({id:`step-${t+1}`,title:e,status:t===0?`in_progress`:`pending`})),updatedAt:Date.now()};return t.setActivePlan(s),{stored_in:`conversation memory`,plan:s}}function Ie(e,t){let n=t.getActivePlan();if(!n)return{error:`No active plan. Call create_action_plan first.`};let r=Math.max(0,Number(e.step_index??1)-1);if(!n.steps[r])return{error:`Step ${r+1} does not exist`,plan:n};let i=[`pending`,`in_progress`,`completed`,`blocked`],a=String(e.status??`in_progress`),o=i.includes(a)?a:`in_progress`,s=(e,t)=>o===`in_progress`?t({...t,status:s(t.status,n),...n===r&&e.note?{note:String(e.note)}:{}}));if(o===`completed`){c.forEach(e=>{e.status===`in_progress`&&(e.status=`pending`)});let e=c.findIndex(e=>e.status===`pending`);e>=0&&(c[e].status=`in_progress`)}let l=c.findIndex(e=>e.status===`in_progress`),u=c.every(e=>e.status===`completed`),d={...n,steps:c,currentStep:l>=0?l+1:r+1,status:u?`completed`:o===`blocked`?`blocked`:`active`,updatedAt:Date.now()};return t.setActivePlan(d),{stored_in:`conversation memory`,plan:d}}var Le=[{name:`create_action_plan`,label:`Create action plan`,summary:`Create the ordered agenda that controls the mission workflow.`,description:`Creates one to five execution steps based on the request and starts the first step before any other tool can run.`,returns:`The session plan, current step, priority, and plan ID.`,schema:{type:`function`,function:{name:`create_action_plan`,description:`Create the source-of-truth execution agenda before doing any other work. Steps must be agent actions that can finish in this conversation.`,parameters:{type:`object`,properties:{goal:{type:`string`,description:`Mission goal`},steps:{type:`array`,items:{type:`string`},minItems:1,maxItems:5},priority:{type:`string`,enum:[`low`,`medium`,`high`]}},required:[`goal`,`steps`,`priority`]}}},execute:async(e,t)=>Fe(e,t)},{name:`update_action_plan`,label:`Update action plan`,summary:`Advance the current step as evidence arrives.`,description:`Records evidence and step status. Starting a later step automatically completes all previous steps.`,returns:`The complete updated plan and current workflow position.`,schema:{type:`function`,function:{name:`update_action_plan`,description:`Update the action plan after starting or completing a workflow step.`,parameters:{type:`object`,properties:{step_index:{type:`integer`,description:`One-based step index`},status:{type:`string`,enum:[`pending`,`in_progress`,`completed`,`blocked`]},note:{type:`string`,description:`Evidence or progress note`}},required:[`step_index`,`status`,`note`]}}},execute:async(e,t)=>Ie(e,t)},{name:`ask_user`,label:`Ask user`,summary:`Narrow a broad request by asking about the user's preferred scope or perspective.`,description:`Use after objective context is known when the request still permits meaningfully different answers. Ask about preferences such as time period, theme, audience, perspective, or depth. For a broad country-history question, for example, clarify whether to focus on an era or aspect rather than choosing one silently.`,returns:`The user's selected or written answer.`,schema:{type:`function`,function:{name:`ask_user`,description:`Ask one focused question to narrow the user's preferred scope, perspective, audience, time period, theme, or level of detail. Use this even after factual context such as location is known when the research question remains broad. Prefer select when a short set of meaningful choices exists.`,parameters:{type:`object`,properties:{question:{type:`string`},response_type:{type:`string`,enum:[`text`,`select`]},options:{type:`array`,items:{type:`string`},maxItems:6},placeholder:{type:`string`},allow_custom:{type:`boolean`}},required:[`question`,`response_type`]}}},execute:async(e,t)=>{let n=Pe(e.options).slice(0,6),r=e.response_type===`select`&&n.length>0?`select`:`text`;return t.askUser({question:String(e.question??`What should I know?`),responseType:r,options:r===`select`?n:[],placeholder:e.placeholder?String(e.placeholder):void 0,allowCustom:!!e.allow_custom})}},{name:`search_wikipedia`,label:`Wikipedia research agent`,summary:`Delegate focused, cited research to an isolated local agent.`,description:`Searches and reads a bounded set of Wikipedia pages, then uses an isolated model turn to return only distilled evidence and canonical sources.`,returns:`A concise research brief, caveats, and source URLs without raw page text.`,schema:{type:`function`,function:{name:`search_wikipedia`,description:`Delegate a focused research question to an isolated Wikipedia research agent. It searches and reads relevant pages, then returns a concise cited brief. Ask a complete question; raw articles are not added to your context.`,parameters:{type:`object`,properties:{query:{type:`string`,description:`The complete research question to investigate`},language:{type:`string`,description:`Wikipedia language code`}},required:[`query`]}}},execute:async(e,t)=>{let n=String(e.query??``).trim();if(!n)return{error:`A research question is required.`};let r=String(e.language??`en`).toLowerCase(),i=/^[a-z]{2,3}$/.test(r)?r:`en`;return t.researchWikipedia(n,i)}},{name:`get_current_context`,label:`Get current context`,summary:`Read the user's current device context, including permission-gated physical location.`,description:`Uses browser APIs to read current date, time, timezone, language, connectivity, and device coordinates. With location permission, coordinates are reverse geocoded into country, region, city, and locality. For questions that depend on where the user currently is, call this tool with include_location=true instead of asking the user to select a location.`,returns:`Current device context and, when permission is granted, coordinates plus resolved country, country code, region, city, and locality.`,schema:{type:`function`,function:{name:`get_current_context`,description:`Get the user's current device context. When a request depends on the user's present physical location, set include_location=true to request and resolve the device location into country, region, city, and locality instead of asking the user where they are. Repeated calls return the same cached result for this run.`,parameters:{type:`object`,properties:{include_location:{type:`boolean`,description:`Whether to resolve the user's current physical location. Defaults to true when omitted; set false only when date and time context is sufficient.`}},required:[]}}},execute:async(e,t)=>{let n=new Date,r={iso_datetime:n.toISOString(),local_datetime:n.toLocaleString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,language:navigator.language,online:navigator.onLine};return e.include_location!==!1&&(r.location=await t.getLocation()),r}}],Re=(...e)=>e.map(e=>typeof e==`string`?e:Object.entries(e).filter(([,e])=>e).map(([e])=>e).join(` `)).filter(Boolean).join(` `);function ze({variant:e=`primary`,className:t=``,children:n,...r}){return(0,S.jsx)(`button`,{className:Re(`inline-flex min-h-12 cursor-pointer items-center justify-center gap-2.5 rounded-full border border-stone-900 px-5 text-base font-bold tracking-tight transition duration-150 enabled:hover:-translate-y-0.5 disabled:cursor-not-allowed disabled:opacity-40`,{"bg-stone-900 text-stone-100":e===`primary`,"bg-transparent text-stone-900":e===`secondary`,"border-transparent bg-transparent text-stone-900":e===`quiet`},t),...r,children:n})}function Be({summary:e,summaryClassName:t=``,contentClassName:n=``,className:r=``,children:i,...a}){return(0,S.jsxs)(`details`,{className:Re(`group overflow-hidden rounded-lg border`,r),...a,children:[(0,S.jsxs)(`summary`,{className:Re(`flex cursor-pointer list-none items-center [&::-webkit-details-marker]:hidden`,t),children:[e,(0,S.jsx)(ue,{className:`flex-none transition-transform duration-150 group-open:rotate-180`,size:16})]}),(0,S.jsx)(`div`,{className:n,children:i})]})}function Ve({tone:e=`light`,className:t=``,children:n,...r}){return(0,S.jsx)(`section`,{className:Re(`overflow-hidden rounded-2xl border border-stone-900 shadow-xl`,{"bg-stone-100/85 backdrop-blur-xl":e===`light`,"bg-stone-900 text-stone-100 shadow-2xl":e===`dark`},t),...r,children:n})}function He({number:e,tone:t=`light`,className:n=``,children:r,...i}){return(0,S.jsxs)(`div`,{className:Re(`flex items-center gap-3 text-sm font-bold tracking-widest uppercase`,{"text-stone-900/55":t===`light`,"text-stone-100/55":t===`dark`},n),...i,children:[(0,S.jsx)(`span`,{className:`grid size-7 place-items-center rounded-full border border-current text-xs`,children:e}),(0,S.jsx)(`span`,{children:r})]})}function Ue({className:e=``,children:t,...n}){return(0,S.jsx)(`span`,{className:Re(`block text-xs font-bold tracking-widest uppercase`,e),...n,children:t})}var We={eyebrow:`Evidence-led research`,title:`Local Research Agent`,summary:`Turn an open question into a concise, cited brief using an isolated Wikipedia research subagent.`,goal:`Clarify the scope when useful, run as many focused evidence-gathering passes as the question needs, and synthesize a grounded answer with canonical sources.`,outcome:`A structured research brief with key findings, relevant context, caveats, and cited Wikipedia sources.`,tools:[`ask_user`,`get_current_context`,`search_wikipedia`]},Ge=[{id:`country-history`,title:`What is the history of the country I'm currently in?`,summary:`Trace the major events, people, and changes that shaped the country around you.`,prompt:`What is the history of the country I'm currently in? Give me a focused overview of the events and changes that shaped it, and cite the sources you use.`},{id:`space-race`,title:`Why did the Space Race happen?`,summary:`Explain what the United States and Soviet Union were competing for beyond reaching space.`,prompt:`Why did the Space Race happen, and what were the United States and Soviet Union really competing for? Cite the sources you use.`},{id:`deep-ocean`,title:`How does life survive at the bottom of the ocean?`,summary:`Find out how organisms live without sunlight under extreme pressure and cold.`,prompt:`How does life survive at the bottom of the ocean without sunlight and under extreme pressure? Cite the sources you use.`},{id:`internet-origins`,title:`Who actually invented the World Wide Web?`,summary:`Untangle the people, proposals, and technologies behind the World Wide Web.`,prompt:`Who actually invented the World Wide Web? Give a clear answer and cite the sources you use.`}],Ke=g(),qe={create_action_plan:ge,update_action_plan:we,ask_user:xe,search_wikipedia:Ee,get_current_context:be};function Je({className:e=``,onClose:t}){let n=(0,y.useRef)(null),r=(0,y.useEffectEvent)(t);return(0,y.useEffect)(()=>{let e=document.body.style.overflow;document.body.style.overflow=`hidden`,n.current?.focus();let t=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,t),()=>{document.body.style.overflow=e,window.removeEventListener(`keydown`,t)}},[]),(0,Ke.createPortal)((0,S.jsx)(`div`,{className:`fixed inset-0 z-50 grid place-items-start overflow-y-auto bg-stone-950/70 p-2.5 backdrop-blur-xl md:place-items-center md:p-7 ${e}`,onMouseDown:e=>{e.currentTarget===e.target&&t()},role:`presentation`,children:(0,S.jsxs)(`section`,{"aria-labelledby":`tools-modal-title`,"aria-modal":`true`,className:`max-h-[calc(100vh-1.25rem)] w-full max-w-4xl overflow-y-auto rounded-xl border border-stone-900 bg-stone-100 p-6 text-stone-900 shadow-2xl md:max-h-[calc(100vh-3.5rem)] md:rounded-2xl md:p-8`,role:`dialog`,style:{backgroundImage:`linear-gradient(rgba(23,25,21,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(23,25,21,.045) 1px,transparent 1px)`,backgroundSize:`34px 34px`},children:[(0,S.jsxs)(`header`,{className:`flex items-start justify-between gap-4 border-b border-stone-900/40 pb-7 md:gap-8`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(Ue,{children:`On-device capabilities`}),(0,S.jsx)(`h2`,{className:`my-2.5 max-w-[640px] text-[clamp(34px,5vw,58px)] leading-[0.95] font-medium tracking-[-0.065em]`,id:`tools-modal-title`,children:`Tools available to the agent`}),(0,S.jsx)(`p`,{className:`m-0 max-w-2xl text-sm leading-relaxed text-stone-900/60`,children:`LFM decides when a tool is needed, supplies its arguments, reads the local result, and continues the mission with that evidence.`})]}),(0,S.jsx)(`button`,{"aria-label":`Close tools overview`,className:`grid size-10 cursor-pointer place-items-center rounded-full border border-stone-900/55 bg-transparent text-stone-900 transition-colors hover:bg-stone-900 hover:text-stone-100`,onClick:t,ref:n,type:`button`,children:(0,S.jsx)(Me,{size:18})})]}),(0,S.jsx)(`div`,{className:`mt-6 grid grid-cols-1 gap-3 md:grid-cols-2`,children:Le.map((e,t)=>{let n=qe[e.name];return(0,S.jsxs)(`article`,{className:`min-w-0 overflow-hidden rounded-xl border border-stone-900/35 bg-white/30`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between border-b border-stone-900/20 p-4 font-serif text-sm text-stone-900/55 italic`,children:[(0,S.jsxs)(`span`,{children:[`0`,t+1]}),(0,S.jsx)(n,{size:20,strokeWidth:1.5})]}),(0,S.jsxs)(`div`,{className:`p-4`,children:[(0,S.jsx)(`span`,{className:`block truncate font-mono text-xs text-stone-900/45`,children:e.name}),(0,S.jsx)(`h3`,{className:`my-2.5 text-xl leading-tight font-bold tracking-tight md:min-h-11`,children:e.label}),(0,S.jsx)(`p`,{className:`m-0 text-sm leading-relaxed text-stone-900/65 md:min-h-20`,children:e.description}),(0,S.jsxs)(`div`,{className:`mt-4 border-t border-stone-900/15 pt-3`,children:[(0,S.jsx)(`strong`,{className:`mb-1 block text-xs tracking-widest uppercase`,children:`Returns`}),(0,S.jsx)(`span`,{className:`text-sm leading-relaxed text-stone-900/65`,children:e.returns})]})]})]},e.name)})}),(0,S.jsxs)(`footer`,{className:`mt-5 flex items-center gap-2.5 rounded-lg bg-lime-300 px-4 py-4`,children:[(0,S.jsx)(De,{size:17}),(0,S.jsx)(`p`,{className:`m-0 text-sm leading-snug font-semibold`,children:`The model and workflow stay in your browser. Wikipedia search terms are sent only to Wikipedia when that tool runs. If you approve a location request, device coordinates are sent to BigDataCloud to resolve the country and locality.`})]})]})}),document.body)}var Ye={"country-history":he,"space-race":Te,"deep-ocean":Ae,"internet-origins":Se};function Xe({className:e=``,modelPhase:t,prompt:n,runPhase:r,onPromptChange:i,onRun:a,onStop:o,onTopicChange:s,topicId:c}){let[l,u]=(0,y.useState)(!1),d=r===`thinking`||r===`waiting`,f=t===`ready`&&n.trim().length>0,p=Ge.find(e=>e.id===c);return(0,S.jsxs)(Ve,{className:e,children:[(0,S.jsxs)(`header`,{className:`flex flex-col justify-between gap-5 border-b border-stone-900/30 px-6 py-5 md:flex-row md:items-center md:px-8`,children:[(0,S.jsx)(He,{number:`02`,children:`Research mission`}),(0,S.jsxs)(`button`,{className:`flex w-fit cursor-pointer items-center gap-2 border-b border-stone-900/45 text-sm font-bold tracking-wider uppercase`,onClick:()=>u(!0),type:`button`,children:[(0,S.jsx)(k,{size:15}),` Explore all `,Le.length,` tools`]})]}),(0,S.jsxs)(`div`,{className:`grid lg:grid-cols-12`,children:[(0,S.jsxs)(`div`,{className:`border-b border-stone-900/25 p-6 md:p-8 lg:col-span-3 lg:border-r lg:border-b-0`,children:[(0,S.jsx)(`h2`,{className:`font-serif text-2xl italic`,children:`Choose a topic`}),(0,S.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-stone-900/60`,children:`Start from a prepared inquiry, then edit the objective as needed.`}),(0,S.jsx)(`div`,{className:`mt-6 grid gap-3`,children:Ge.map(e=>{let t=Ye[e.id];return(0,S.jsxs)(`button`,{className:Re(`cursor-pointer rounded-xl border border-stone-900/20 bg-white/20 p-4 text-left transition-colors hover:border-stone-900/60`,{"border-stone-900 bg-lime-200/60":e.id===c}),onClick:()=>s(e.id),type:`button`,children:[(0,S.jsx)(t,{className:`mb-4`,size:20}),(0,S.jsx)(`strong`,{className:`block text-base leading-tight`,children:e.title}),(0,S.jsx)(`span`,{className:`mt-2 block text-sm leading-snug text-stone-900/60`,children:e.summary})]},e.id)})})]}),(0,S.jsxs)(`div`,{className:`border-b border-stone-900/25 p-6 md:p-8 lg:col-span-5 lg:border-r lg:border-b-0`,children:[(0,S.jsx)(Ue,{className:`text-stone-900/50`,children:We.eyebrow}),(0,S.jsx)(`h3`,{className:`mt-3 text-4xl leading-none font-medium tracking-tighter`,children:We.title}),(0,S.jsx)(`p`,{className:`mt-4 max-w-xl text-base leading-relaxed text-stone-900/65`,children:We.goal}),(0,S.jsxs)(`div`,{className:`mt-6 rounded-xl border border-stone-900 bg-lime-200/50 p-4`,children:[(0,S.jsx)(Ue,{className:`text-stone-900/50`,children:`Selected inquiry`}),(0,S.jsx)(`strong`,{className:`mt-2 block text-lg`,children:p.title}),(0,S.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-stone-900/65`,children:p.summary})]}),(0,S.jsxs)(`div`,{className:`mt-5 border-t border-stone-900/20 pt-5`,children:[(0,S.jsx)(Ue,{className:`text-stone-900/50`,children:`Expected outcome`}),(0,S.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-stone-900/65`,children:We.outcome})]})]}),(0,S.jsxs)(`div`,{className:`flex flex-col p-6 md:p-8 lg:col-span-4`,children:[(0,S.jsxs)(`label`,{className:`grid gap-3 text-xs font-bold tracking-widest text-stone-900/55 uppercase`,children:[(0,S.jsx)(`span`,{children:`Agent objective`}),(0,S.jsx)(`textarea`,{className:`min-h-48 w-full resize-y rounded-xl border border-stone-900/25 bg-white/25 p-4 text-base leading-relaxed tracking-normal text-stone-900 normal-case outline-none`,value:n,onChange:e=>i(e.target.value),rows:7})]}),(0,S.jsx)(`div`,{className:`mt-auto flex justify-end pt-6`,children:d?(0,S.jsxs)(ze,{variant:`secondary`,onClick:o,children:[(0,S.jsx)(ke,{size:14,fill:`currentColor`}),` Stop`]}):(0,S.jsxs)(ze,{disabled:!f,onClick:a,children:[`Run research agent `,(0,S.jsx)(O,{size:17})]})})]})]}),l&&(0,S.jsx)(Je,{onClose:()=>u(!1)})]})}function Ze(e){return e?`${(e/1024/1024).toFixed(0)} MB transferred`:`Preparing files`}function Qe(e){return e?`${(e/1e9).toFixed(1)} GB`:`size unavailable`}var $e=`LiquidAI/LFM2.5-2.6B-ONNX`,et=`text-generation`,tt={device:`webgpu`,dtype:`q4f16`},nt=new WeakSet;function rt(e){nt.has(e)||(e.experimental_useCrossOriginStorage=!0,nt.add(e))}var it=`modulepreload`,at=function(e){return`/`+e},ot={},st=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=at(t,n),t=s(t),t in ot)return;ot[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:it,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function ct(){try{let{env:e,ModelRegistry:t}=await st(async()=>{let{env:e,ModelRegistry:t}=await import(`./transformers.web-DtYh6Gfy.js`);return{env:e,ModelRegistry:t}},[]);rt(e);let[n,r]=await Promise.all([t.get_pipeline_files(et,$e,tt),t.is_pipeline_cached(et,$e,tt)]);return{status:`ready`,totalBytes:(await Promise.all(n.map(async e=>(await t.get_file_metadata(`LiquidAI/LFM2.5-2.6B-ONNX`,e)).size??0))).reduce((e,t)=>e+t,0),isPipelineCached:r}}catch{return{status:`error`}}}function lt(e,t,n){return t?`Initializing pipeline...`:e.status===`loading`?`Initializing...`:e.status===`error`?`Load model`:e.isPipelineCached?`Load model (already cached)`:`Download model (${n})`}var ut=[{icon:ce,title:`Reason`,description:`Break down an objective and decide what evidence is needed.`},{icon:k,title:`Use tools`,description:`Call a small, explicit registry and inspect every result.`},{icon:Oe,title:`Deliver`,description:`Turn the completed plan into a useful final response.`}];function dt({className:e=``,error:t,modelPhase:n,progress:r,webGpuAvailable:i,onLoad:a}){let[o,s]=(0,y.useState)(!1),[c,l]=(0,y.useState)({status:`loading`}),u=Math.max(0,Math.min(100,r?.progress??0)),d=n===`loading`;(0,y.useEffect)(()=>{let e=!1;return ct().then(t=>{e||l(t)}),()=>{e=!0}},[]);let f=c.status===`ready`?Qe(c.totalBytes):`size unavailable`,p=lt(c,d,f);return(0,S.jsxs)(Ve,{className:`min-h-22 shadow-2xl ${e}`,children:[(0,S.jsxs)(`header`,{className:`flex items-center justify-between gap-5 border-b border-stone-900/30 px-6 py-5 md:px-8`,children:[(0,S.jsx)(He,{number:`01`,children:`Runtime`}),(0,S.jsxs)(`span`,{className:`flex items-center gap-2 text-xs font-bold tracking-widest uppercase`,children:[(0,S.jsx)(`i`,{className:`size-1.5 rounded-full bg-stone-900`}),` Local browser`]})]}),(0,S.jsxs)(`div`,{className:`grid lg:grid-cols-12`,children:[(0,S.jsxs)(`div`,{className:`flex flex-col border-b border-stone-900/30 p-6 md:p-8 lg:col-span-5 lg:border-r lg:border-b-0 xl:col-span-4`,children:[(0,S.jsx)(`p`,{className:`mb-6 flex items-center gap-2.5 text-xs font-bold tracking-widest uppercase before:h-px before:w-8 before:bg-current`,children:`Agentic edge lab`}),(0,S.jsx)(`h1`,{className:`text-6xl leading-[0.86] font-medium tracking-tighter md:text-7xl`,children:`LFM2.5`}),(0,S.jsx)(`p`,{className:`mt-4 font-serif text-2xl italic`,children:`2.6B · q4f16`}),(0,S.jsx)(`p`,{className:`mt-7 max-w-md text-lg leading-relaxed text-stone-900/70`,children:`A compact model that plans, reasons, and calls tools directly in your browser. No inference server and no account required.`}),(0,S.jsxs)(`div`,{className:`mt-8 grid border-t border-stone-900/20 text-sm`,children:[(0,S.jsxs)(`div`,{className:`flex min-h-12 items-center gap-2 border-b border-stone-900/20`,children:[(0,S.jsx)(fe,{size:17}),(0,S.jsx)(`span`,{className:`flex-1 text-stone-900/65`,children:`Backend`}),(0,S.jsx)(`strong`,{children:i?`WebGPU`:`Unavailable`})]}),(0,S.jsxs)(`div`,{className:`flex min-h-12 items-center gap-2 border-b border-stone-900/20`,children:[(0,S.jsx)(me,{size:17}),(0,S.jsx)(`span`,{className:`flex-1 text-stone-900/65`,children:`Model assets`}),(0,S.jsx)(`strong`,{children:c.status===`loading`?`Inspecting...`:f})]}),(0,S.jsxs)(`div`,{className:`flex min-h-12 items-center gap-2 border-b border-stone-900/20`,children:[(0,S.jsx)(ye,{size:17}),(0,S.jsx)(`span`,{className:`flex-1 text-stone-900/65`,children:`Data path`}),(0,S.jsx)(`strong`,{children:`On-device`})]})]}),(0,S.jsxs)(`div`,{className:`mt-auto pt-8`,children:[t&&(0,S.jsx)(`p`,{className:`mb-4 border-l-2 border-orange-500 pl-3 text-sm leading-relaxed text-orange-800`,children:t}),d&&(0,S.jsxs)(`div`,{className:`mb-5`,"aria-live":`polite`,children:[(0,S.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,S.jsx)(`span`,{children:Ze(r?.loaded)}),(0,S.jsxs)(`strong`,{children:[u.toFixed(0),`%`]})]}),(0,S.jsx)(`div`,{className:`mt-2.5 h-1.5 overflow-hidden rounded-full bg-stone-900/15`,children:(0,S.jsx)(`span`,{className:`block h-full bg-stone-900 transition-[width] duration-200`,style:{width:`${u}%`}})})]}),(0,S.jsxs)(ze,{className:`w-full md:w-auto`,disabled:!i||d||c.status===`loading`,onClick:a,children:[(0,S.jsx)(Ne,{size:17}),p]}),(0,S.jsx)(`p`,{className:`mt-3 max-w-sm text-sm leading-relaxed text-stone-900/55`,children:`Weights are downloaded once and cached by your browser. Prompts and outputs stay in this tab.`})]})]}),(0,S.jsxs)(`div`,{className:`p-6 md:p-8 lg:col-span-7 xl:col-span-8`,children:[(0,S.jsx)(Ue,{className:`text-stone-900/55`,children:`What this project demonstrates`}),(0,S.jsxs)(`h2`,{className:`mt-3 max-w-3xl text-4xl leading-none font-medium tracking-tighter md:text-6xl`,children:[`One local research agent. `,Le.length,` visible tools.`]}),(0,S.jsx)(`div`,{className:`mt-8 grid gap-px overflow-hidden rounded-xl border border-stone-900/25 bg-stone-900/25 md:grid-cols-3`,children:ut.map(({description:e,icon:t,title:n},r)=>(0,S.jsxs)(`article`,{className:`bg-stone-100 p-5`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(t,{size:20,strokeWidth:1.5}),(0,S.jsxs)(`span`,{className:`font-serif text-sm italic text-stone-900/45`,children:[`0`,r+1]})]}),(0,S.jsx)(`h3`,{className:`mt-7 text-lg font-bold`,children:n}),(0,S.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-stone-900/60`,children:e})]},n))}),(0,S.jsxs)(`div`,{className:`mt-8 flex items-end justify-between gap-5 border-b border-stone-900/25 pb-4`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(Ue,{className:`text-stone-900/55`,children:`Prepared research topics`}),(0,S.jsx)(`p`,{className:`mt-1 font-serif text-lg italic`,children:`Start with a focused inquiry, then make it your own.`})]}),(0,S.jsxs)(`button`,{className:`hidden cursor-pointer items-center gap-2 border-b border-stone-900/50 text-sm font-bold tracking-wider uppercase md:flex`,onClick:()=>s(!0),type:`button`,children:[`Explore all tools `,(0,S.jsx)(O,{size:15})]})]}),(0,S.jsx)(`div`,{className:`grid gap-3 py-4 md:grid-cols-2`,children:Ge.map(e=>{let t=Ye[e.id];return(0,S.jsxs)(`article`,{className:`rounded-xl border border-stone-900/20 bg-white/25 p-5`,children:[(0,S.jsx)(t,{size:20}),(0,S.jsx)(Ue,{className:`mt-6 text-stone-900/50`,children:`Prepared inquiry`}),(0,S.jsx)(`h3`,{className:`mt-2 text-xl font-bold tracking-tight`,children:e.title}),(0,S.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-stone-900/60`,children:e.summary})]},e.id)})}),(0,S.jsxs)(`button`,{className:`mt-2 flex cursor-pointer items-center gap-2 border-b border-stone-900/50 text-sm font-bold tracking-wider uppercase md:hidden`,onClick:()=>s(!0),type:`button`,children:[`Explore all tools `,(0,S.jsx)(O,{size:15})]})]})]}),o&&(0,S.jsx)(Je,{onClose:()=>s(!1)})]})}var ft=new Intl.NumberFormat(`en-US`);function pt(e){let t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t/60),i=String(t%60).padStart(2,`0`);return n>0?`${n}:${String(r%60).padStart(2,`0`)}:${i}`:`${r}:${i}`}function mt(e){return ft.format(e)}function ht({artifact:e,className:t=``}){return(0,S.jsxs)(`section`,{className:`mt-4 flex items-center gap-3 rounded-xl border border-emerald-200/40 bg-emerald-200/10 p-4 ${t}`,children:[(0,S.jsx)(`div`,{className:`grid size-10 flex-none place-items-center rounded-full bg-emerald-200 text-stone-900`,children:(0,S.jsx)(pe,{size:18})}),(0,S.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,S.jsx)(`span`,{className:`text-xs font-bold tracking-wider text-emerald-200 uppercase`,children:`Downloadable paper`}),(0,S.jsx)(`h3`,{className:`truncate text-base font-bold`,children:e.title}),(0,S.jsx)(`p`,{className:`truncate text-sm text-stone-100/60`,children:e.filename})]}),(0,S.jsxs)(`button`,{className:`flex cursor-pointer items-center gap-2 rounded-full border border-emerald-200/40 px-3 py-2 text-sm font-bold text-emerald-200 hover:bg-emerald-200/10`,onClick:()=>{let t=URL.createObjectURL(new Blob([e.content],{type:`${e.mimeType};charset=utf-8`})),n=document.createElement(`a`);n.href=t,n.download=e.filename,n.click(),window.setTimeout(()=>URL.revokeObjectURL(t),0)},type:`button`,children:[(0,S.jsx)(A,{size:15}),` Download .md`]})]})}var gt={pending:de,in_progress:ve,completed:le,blocked:Ce};function _t({className:e=``,plan:t}){let n=t?.steps.filter(e=>e.status===`completed`).length??0;return(0,S.jsxs)(`section`,{className:`overflow-hidden rounded-lg border border-stone-100/20 bg-stone-100/5 ${e}`,"aria-live":`polite`,children:[(0,S.jsxs)(`header`,{className:`flex items-center justify-between gap-4 border-b border-stone-100/10 px-4 py-3`,children:[(0,S.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-sm font-bold tracking-widest text-lime-300 uppercase`,children:[(0,S.jsx)(_e,{size:14}),` Live agenda`]}),(0,S.jsx)(`strong`,{className:`text-sm tracking-wider text-stone-100/60 uppercase`,children:t?`${n}/${t.steps.length} complete`:`Not created`})]}),t?(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`border-b border-stone-100/10 p-4`,children:[(0,S.jsx)(`span`,{className:`text-sm font-bold tracking-widest text-stone-100/60 uppercase`,children:`Goal`}),(0,S.jsx)(`p`,{className:`mt-1.5 mb-0 text-sm leading-relaxed text-stone-100/75`,children:t.goal})]}),(0,S.jsx)(`ol`,{className:`m-0 list-none px-2.5 py-2`,children:t.steps.map((e,t)=>{let n=gt[e.status];return(0,S.jsxs)(`li`,{className:Re(`flex items-start gap-2 px-1 py-1.5 text-stone-100/60`,{"text-lime-300":e.status===`in_progress`,"text-emerald-200":e.status===`completed`,"text-orange-200":e.status===`blocked`}),children:[(0,S.jsx)(n,{className:e.status===`in_progress`?`animate-spin`:``,size:13}),(0,S.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,S.jsxs)(`span`,{className:Re(`block text-sm leading-snug`,{"line-through decoration-emerald-200/50":e.status===`completed`}),children:[t+1,`. `,e.title]}),e.note&&(0,S.jsx)(`small`,{className:`mt-1 block text-sm leading-snug text-stone-100/60`,children:e.note})]}),e.status===`in_progress`&&(0,S.jsx)(`strong`,{className:`rounded-full bg-lime-300 px-2 py-1 text-xs tracking-wide text-stone-900 uppercase`,children:`Now`})]},e.id)})})]}):(0,S.jsxs)(`div`,{className:`flex flex-col items-start gap-5 px-4 py-4`,children:[(0,S.jsx)(`p`,{className:`m-0 text-sm leading-relaxed text-stone-100/75`,children:`The agent will create a plan before it starts using evidence tools.`}),(0,S.jsx)(`span`,{className:`flex-none text-sm font-bold tracking-wider text-stone-100/50 uppercase`,children:`Session memory · cleared on reload`})]})]})}function vt({className:e=``,interaction:t,onSubmit:n}){let[r,i]=(0,y.useState)(``),[a,o]=(0,y.useState)(``),s=r===`__custom__`,c=t.responseType===`text`||s?a:r;return(0,S.jsxs)(`form`,{className:`mt-4 rounded-xl border border-lime-300/50 bg-lime-300/10 p-4 ${e}`,onSubmit:e=>{e.preventDefault(),c.trim()&&n(c)},children:[(0,S.jsxs)(`header`,{className:`flex items-center gap-2 text-sm font-bold tracking-wider text-lime-300 uppercase`,children:[(0,S.jsx)(xe,{size:17}),`The agent needs one detail`]}),(0,S.jsx)(`p`,{className:`my-3 text-base leading-relaxed text-stone-100`,children:t.question}),t.responseType===`select`&&(0,S.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[t.options.map(e=>(0,S.jsx)(`button`,{className:Re(`cursor-pointer rounded-lg border border-stone-100/20 bg-stone-100/5 p-3 text-left text-sm transition-colors hover:border-lime-300/60`,{"border-lime-300 bg-lime-300/15":r===e}),onClick:()=>i(e),type:`button`,children:e},e)),t.allowCustom&&(0,S.jsx)(`button`,{className:Re(`cursor-pointer rounded-lg border border-stone-100/20 bg-stone-100/5 p-3 text-left text-sm transition-colors hover:border-lime-300/60`,{"border-lime-300 bg-lime-300/15":s}),onClick:()=>i(`__custom__`),type:`button`,children:`Something else`})]}),(t.responseType===`text`||s)&&(0,S.jsx)(`textarea`,{autoFocus:!0,className:`mt-2 min-h-24 w-full resize-y rounded-lg border border-stone-100/20 bg-stone-950/50 p-3 text-base text-stone-100 outline-none placeholder:text-stone-100/40 focus:border-lime-300`,onChange:e=>o(e.target.value),placeholder:t.placeholder??`Type your answer...`,value:a}),(0,S.jsxs)(`button`,{className:`mt-3 ml-auto flex cursor-pointer items-center gap-2 rounded-full bg-lime-300 px-4 py-2.5 text-sm font-bold text-stone-900 disabled:cursor-not-allowed disabled:opacity-40`,disabled:!c.trim(),type:`submit`,children:[`Continue `,(0,S.jsx)(se,{size:15})]})]})}function yt(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var bt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,St={};function Ct(e,t){return((t||St).jsx?xt:bt).test(e)}var wt=/[ \t\n\f\r]/g;function Tt(e){return typeof e==`object`?e.type===`text`&&Et(e.value):Et(e)}function Et(e){return e.replace(wt,``)===``}var Dt=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Dt.prototype.normal={},Dt.prototype.property={},Dt.prototype.space=void 0;function Ot(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Dt(n,r,t)}function kt(e){return e.toLowerCase()}var At=class{constructor(e,t){this.attribute=t,this.property=e}};At.prototype.attribute=``,At.prototype.booleanish=!1,At.prototype.boolean=!1,At.prototype.commaOrSpaceSeparated=!1,At.prototype.commaSeparated=!1,At.prototype.defined=!1,At.prototype.mustUseProperty=!1,At.prototype.number=!1,At.prototype.overloadedBoolean=!1,At.prototype.property=``,At.prototype.spaceSeparated=!1,At.prototype.space=void 0;var jt=s({boolean:()=>j,booleanish:()=>Nt,commaOrSpaceSeparated:()=>P,commaSeparated:()=>Ft,number:()=>M,overloadedBoolean:()=>Pt,spaceSeparated:()=>N}),Mt=0,j=It(),Nt=It(),Pt=It(),M=It(),N=It(),Ft=It(),P=It();function It(){return 2**++Mt}var Lt=Object.keys(jt),Rt=class extends At{constructor(e,t,n,r){let i=-1;if(super(e,t),zt(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&Qt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Zt,tn);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Zt.test(e)){let n=e.replace(Xt,en);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Rt}return new i(r,t)}function en(e){return`-`+e.toLowerCase()}function tn(e){return e.charAt(1).toUpperCase()}var nn=Ot([Vt,Wt,Kt,qt,Jt],`html`),rn=Ot([Vt,Gt,Kt,qt,Jt],`svg`);function an(e){return e.join(` `).trim()}var on=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(!(e.charAt(0)!=`/`||e.charAt(1)!=`*`)){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),sn=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(on());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),cn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),ln=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(sn()),r=cn();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),un=fn(`end`),dn=fn(`start`);function fn(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function pn(e){let t=dn(e),n=un(e);if(t&&n)return{start:t,end:n}}function mn(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?gn(e.position):`start`in e||`end`in e?gn(e):`line`in e||`column`in e?hn(e):``}function hn(e){return _n(e&&e.line)+`:`+_n(e&&e.column)}function gn(e){return hn(e&&e.start)+`-`+hn(e&&e.end)}function _n(e){return e&&typeof e==`number`?e:1}var vn=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=mn(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};vn.prototype.file=``,vn.prototype.name=``,vn.prototype.reason=``,vn.prototype.message=``,vn.prototype.stack=``,vn.prototype.column=void 0,vn.prototype.line=void 0,vn.prototype.ancestors=void 0,vn.prototype.cause=void 0,vn.prototype.fatal=void 0,vn.prototype.place=void 0,vn.prototype.ruleId=void 0,vn.prototype.source=void 0;var yn=l(ln(),1),bn={}.hasOwnProperty,xn=new Map,Sn=/[A-Z]/g,Cn=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),wn=new Set([`td`,`th`]);function Tn(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=In(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Fn(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?rn:nn,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=En(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function En(e,t,n){if(t.type===`element`)return Dn(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return On(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return An(e,t,n);if(t.type===`mdxjsEsm`)return kn(e,t);if(t.type===`root`)return jn(e,t,n);if(t.type===`text`)return Mn(e,t)}function Dn(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=rn,e.schema=i),e.ancestors.push(t);let a=Hn(e,t.tagName,!1),o=Ln(e,t),s=zn(e,t);return Cn.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Tt(e)})),Nn(e,o,a,t),Pn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function On(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Un(e,t.position)}function kn(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Un(e,t.position)}function An(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=rn,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Hn(e,t.name,!0),o=Rn(e,t),s=zn(e,t);return Nn(e,o,a,t),Pn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function jn(e,t,n){let r={};return Pn(r,zn(e,t)),e.create(t,e.Fragment,r,n)}function Mn(e,t){return t.value}function Nn(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pn(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Fn(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function In(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=dn(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Ln(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&bn.call(t.properties,i)){let a=Bn(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&wn.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Rn(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Un(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Un(e,t.position);else a=r.value===null||r.value;n[i]=a}return n}function zn(e,t){let n=[],r=-1,i=e.passKeys?new Map:xn;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(tr(e,e.length,0,t),e):t}var rr={}.hasOwnProperty;function ir(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function cr(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var lr=vr(/[A-Za-z]/),ur=vr(/[\dA-Za-z]/),dr=vr(/[#-'*+\--9=?A-Z^-~]/);function fr(e){return e!==null&&(e<32||e===127)}var pr=vr(/\d/),mr=vr(/[\dA-Fa-f]/),hr=vr(/[!-/:-@[-`{-~]/);function F(e){return e!==null&&e<-2}function I(e){return e!==null&&(e<0||e===32)}function L(e){return e===-2||e===-1||e===32}var gr=vr(/\p{P}|\p{S}/u),_r=vr(/\s/);function vr(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function yr(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function R(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return L(r)?(e.enter(n),s(r)):t(r)}function s(r){return L(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Tr(e,t,n){return R(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Er(e){if(e===null||I(e)||_r(e))return 1;if(gr(e))return 2}function Dr(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};jr(d,-c),jr(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=nr(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=nr(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=nr(l,Dr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=nr(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=nr(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,tr(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&L(t)?R(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||F(t)?e.check(Wr,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||F(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),L(t)?R(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),L(t)?R(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||F(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function qr(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Jr={name:`codeIndented`,tokenize:Xr},Yr={partial:!0,tokenize:Zr};function Xr(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),R(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):F(t)?e.attempt(Yr,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||F(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Zr(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):F(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):R(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):F(e)?i(e):n(e)}}var Qr={name:`codeText`,previous:ei,resolve:$r,tokenize:ti};function $r(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ri(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ri(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ri(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function di(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||fr(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||F(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||I(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):F(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||F(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!L(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function pi(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):F(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),R(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||F(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function mi(e,t){let n;return r;function r(i){return F(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):L(i)?R(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var hi={name:`definition`,tokenize:_i},gi={partial:!0,tokenize:vi};function _i(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return fi.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return I(t)?mi(e,l)(t):l(t)}function l(t){return di(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(gi,d,d)(t)}function d(t){return L(t)?R(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||F(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function vi(e,t,n){return r;function r(t){return I(t)?mi(e,i)(t):n(t)}function i(t){return pi(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return L(t)?R(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||F(e)?t(e):n(e)}}var yi={name:`hardBreakEscape`,tokenize:bi};function bi(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return F(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var xi={name:`headingAtx`,resolve:Si,tokenize:Ci};function Si(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},tr(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ci(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||I(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||F(n)?(e.exit(`atxHeading`),t(n)):L(n)?R(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||I(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var wi=`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`.split(`.`),Ti=[`pre`,`script`,`style`,`textarea`],Ei={concrete:!0,name:`htmlFlow`,resolveTo:ki,tokenize:Ai},Di={partial:!0,tokenize:Mi},Oi={partial:!0,tokenize:ji};function ki(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ai(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:O):lr(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):lr(a)?(e.consume(a),i=4,r.interrupt?t:O):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:O):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:E:m):n(i)}function h(t){return lr(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||I(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ti.includes(l)?(i=1,r.interrupt?t(s):E(s)):wi.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):E(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||ur(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:E):n(i)}function v(t){return L(t)?(e.consume(t),v):T(t)}function y(t){return t===47?(e.consume(t),T):t===58||t===95||lr(t)?(e.consume(t),b):L(t)?(e.consume(t),y):T(t)}function b(t){return t===45||t===46||t===58||t===95||ur(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),ee):L(t)?(e.consume(t),x):y(t)}function ee(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,S):L(t)?(e.consume(t),ee):C(t)}function S(t){return t===c?(e.consume(t),c=null,w):t===null||F(t)?n(t):(e.consume(t),S)}function C(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||I(t)?x(t):(e.consume(t),C)}function w(e){return e===47||e===62||L(e)?y(e):n(e)}function T(t){return t===62?(e.consume(t),te):n(t)}function te(t){return t===null||F(t)?E(t):L(t)?(e.consume(t),te):n(t)}function E(t){return t===45&&i===2?(e.consume(t),ae):t===60&&i===1?(e.consume(t),oe):t===62&&i===4?(e.consume(t),k):t===63&&i===3?(e.consume(t),O):t===93&&i===5?(e.consume(t),se):F(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Di,ce,ne)(t)):t===null||F(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),E)}function ne(t){return e.check(Oi,re,ce)(t)}function re(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ie}function ie(t){return t===null||F(t)?ne(t):(e.enter(`htmlFlowData`),E(t))}function ae(t){return t===45?(e.consume(t),O):E(t)}function oe(t){return t===47?(e.consume(t),o=``,D):E(t)}function D(t){if(t===62){let n=o.toLowerCase();return Ti.includes(n)?(e.consume(t),k):E(t)}return lr(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),D):E(t)}function se(t){return t===93?(e.consume(t),O):E(t)}function O(t){return t===62?(e.consume(t),k):t===45&&i===2?(e.consume(t),O):E(t)}function k(t){return t===null||F(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),k)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function ji(e,t,n){let r=this;return i;function i(t){return F(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Mi(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Pr,t,n)}}var Ni={name:`htmlText`,tokenize:z};function z(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):lr(t)?(e.consume(t),C):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):lr(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):F(t)?(o=d,oe(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ae(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):F(t)?(o=h,oe(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ae(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ae(t):F(t)?(o=v,oe(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):F(t)?(o=y,oe(t)):(e.consume(t),y)}function b(e){return e===62?ae(e):y(e)}function x(t){return lr(t)?(e.consume(t),ee):n(t)}function ee(t){return t===45||ur(t)?(e.consume(t),ee):S(t)}function S(t){return F(t)?(o=S,oe(t)):L(t)?(e.consume(t),S):ae(t)}function C(t){return t===45||ur(t)?(e.consume(t),C):t===47||t===62||I(t)?w(t):n(t)}function w(t){return t===47?(e.consume(t),ae):t===58||t===95||lr(t)?(e.consume(t),T):F(t)?(o=w,oe(t)):L(t)?(e.consume(t),w):ae(t)}function T(t){return t===45||t===46||t===58||t===95||ur(t)?(e.consume(t),T):te(t)}function te(t){return t===61?(e.consume(t),E):F(t)?(o=te,oe(t)):L(t)?(e.consume(t),te):w(t)}function E(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ne):F(t)?(o=E,oe(t)):L(t)?(e.consume(t),E):(e.consume(t),re)}function ne(t){return t===i?(e.consume(t),i=void 0,ie):t===null?n(t):F(t)?(o=ne,oe(t)):(e.consume(t),ne)}function re(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||I(t)?w(t):(e.consume(t),re)}function ie(e){return e===47||e===62||I(e)?w(e):n(e)}function ae(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function oe(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),D}function D(t){return L(t)?R(e,se,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):se(t)}function se(t){return e.enter(`htmlTextData`),o(t)}}var B={name:`labelEnd`,resolveAll:Li,resolveTo:Ri,tokenize:zi},Pi={tokenize:Bi},Fi={tokenize:Vi},Ii={tokenize:Hi};function Li(e){let t=-1,n=[];for(;++t=3&&(a===null||F(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),L(t)?R(e,s,`whitespace`)(t):s(t))}}var Zi={continuation:{tokenize:ta},exit:ra,name:`list`,tokenize:ea},Qi={partial:!0,tokenize:ia},$i={partial:!0,tokenize:na};function ea(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:pr(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Yi,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return pr(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Pr,r.interrupt?n:u,e.attempt(Qi,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return L(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ta(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Pr,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,R(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!L(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($i,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,R(e,e.attempt(Zi,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function na(e,t,n){let r=this;return R(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function ra(e){e.exit(this.containerState.type)}function ia(e,t,n){let r=this;return R(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!L(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var aa={name:`setextUnderline`,resolveTo:oa,tokenize:sa};function oa(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function sa(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),L(t)?R(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||F(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var ca={tokenize:la};function la(e){let t=this,n=e.attempt(Pr,r,e.attempt(this.parser.constructs.flowInitial,i,R(e,e.attempt(this.parser.constructs.flow,i,e.attempt(oi,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ua={resolveAll:ma()},da=pa(`string`),fa=pa(`text`);function pa(e){return{resolveAll:ma(e===`text`?ha:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++iwa,contentInitial:()=>va,disable:()=>Ta,document:()=>_a,flow:()=>ba,flowInitial:()=>ya,insideSpan:()=>Ca,string:()=>xa,text:()=>Sa}),_a={42:Zi,43:Zi,45:Zi,48:Zi,49:Zi,50:Zi,51:Zi,52:Zi,53:Zi,54:Zi,55:Zi,56:Zi,57:Zi,62:Ir},va={91:hi},ya={[-2]:Jr,[-1]:Jr,32:Jr},ba={35:xi,42:Yi,45:[aa,Yi],60:Ei,61:aa,95:Yi,96:Gr,126:Gr},xa={38:Hr,92:Br},Sa={[-5]:qi,[-4]:qi,[-3]:qi,33:Ui,38:Hr,42:Or,60:[Mr,Ni],91:Gi,92:[yi,Br],93:B,95:Or,96:Qr},Ca={null:[Or,ua]},wa={null:[42,95]},Ta={null:[]};function Ea(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:S(x),check:S(ee),consume:v,enter:y,exit:b,interrupt:S(ee,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=nr(o,e),g(),o[o.length-1]===null?(C(t,0),l.events=Dr(a,l.events,l),l.events):[]}function f(e,t){return Oa(p(e),t)}function p(e){return Da(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,T()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Oa(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Ha).call(a,void 0,e[0])}for(r.position={start:za(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:za(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function qa(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ja(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ya(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=yr(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Xa(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Za(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Qa(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function $a(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qa(e,t);let i={src:yr(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function eo(e,t){let n={src:yr(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function to(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function no(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qa(e,t);let i={href:yr(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ro(e,t){let n={href:yr(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function io(e,t,n){let r=e.all(t),i=n?ao(n):oo(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}function so(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=dn(t.children[1]),o=un(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function V(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(go(t.slice(i),i>0,!1)),a.join(``)}function go(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===po||t===mo;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===po||t===mo;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function _o(e,t){let n={type:`text`,value:ho(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vo(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var yo={blockquote:Wa,break:Ga,code:Ka,delete:qa,emphasis:Ja,footnoteReference:Ya,heading:Xa,html:Za,imageReference:$a,image:eo,inlineCode:to,linkReference:no,link:ro,listItem:io,list:so,paragraph:co,root:lo,strong:uo,table:fo,tableCell:H,tableRow:V,text:_o,thematicBreak:vo,toml:bo,yaml:bo,definition:bo,footnoteDefinition:bo};function bo(){}var U=typeof self==`object`?self:globalThis,xo=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new U[e](t)},So=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof U[e]==`function`?xo(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(xo(a,o),i)};return r},Co=e=>So(new Map,e)(0),wo=``,{toString:To}={},{keys:Eo}=Object,Do=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=To.call(e).slice(8,-1);switch(n){case`Array`:return[1,wo];case`Object`:return[2,wo];case`Date`:return[3,wo];case`RegExp`:return[4,wo];case`Map`:return[5,wo];case`Set`:return[6,wo];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Oo=([e,t])=>e===0&&(t===`function`||t===`symbol`),ko=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Do(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Eo(r))(e||!Oo(Do(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?wo:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Oo(Do(n))||Oo(Do(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Oo(Do(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Ao=(e,{json:t,lossy:n}={})=>{let r=[];return ko(!(t||n),!!t,new Map,r)(e),r},jo=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Co(Ao(e,t)):structuredClone(e):(e,t)=>Co(Ao(e,t));function Mo(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function No(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Po(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Mo,r=e.options.footnoteBackLabel||No,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...jo(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` `}]}}var Fo=(function(e){if(e==null)return Bo;if(typeof e==`function`)return zo(e);if(typeof e==`object`)return Array.isArray(e)?Io(e):Lo(e);if(typeof e==`string`)return Ro(e);throw Error(`Expected function, string, or object as test`)});function Io(e){let t=[],n=-1;for(;++n`:``))+`)`})}return u;function u(){let l=Uo,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Go(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d0&&n.push({type:`text`,value:` `}),n}function es(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ts(e,t){let n=Yo(e,t),r=n.one(e,void 0),i=Po(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` `},i)),a}function ns(e,t){return e&&`run`in e?async function(n,r){let i=ts(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ts(n,{file:r,...e||t})}}function rs(e){if(e)throw e}var is=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var cs={basename:ls,dirname:us,extname:ds,join:fs,sep:`/`};function ls(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);hs(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function us(e){if(hs(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function ds(e){hs(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function fs(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ms(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function hs(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var gs={cwd:_s};function _s(){return`/`}function vs(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function ys(e){if(typeof e==`string`)e=new URL(e);else if(!vs(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return bs(e)}function bs(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];as(o)&&as(r)&&(r=(0,Os.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function js(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Ms(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Ns(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ps(e){if(!as(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Fs(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Is(e){return Ls(e)?e:new Ss(e)}function Ls(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Rs(e){return typeof e==`string`||zs(e)}function zs(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Bs=[],Vs={allowDangerousHtml:!0},Hs=/^(https?|ircs?|mailto|xmpp)$/i,Us=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Ws(e){let t=Gs(e),n=Ks(e);return qs(t.runSync(t.parse(n),n),e)}function Gs(e){let t=e.rehypePlugins||Bs,n=e.remarkPlugins||Bs,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Vs}:Vs;return As().use(Ua).use(n).use(ns,r).use(t)}function Ks(e){let t=e.children||``,n=new Ss;return typeof t==`string`?n.value=t:``+t,n}function qs(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Js;for(let e of Us)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Ko(e,l),Tn(e,{Fragment:S.Fragment,components:i,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in qn)if(Object.hasOwn(qn,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=qn[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Js(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Hs.test(e.slice(0,t))?e:``}function Ys(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Xs(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Zs(e,t,n){let r=Fo((n||{}).ignore||[]),i=Qs(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Ys(e,`(`),a=Ys(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function gc(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||_r(n)||gr(n))&&(!t||n!==47)}Ec.peek=Tc;function _c(){this.buffer()}function vc(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function yc(){this.buffer()}function bc(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function xc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Sc(e){this.exit(e)}function Cc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wc(e){this.exit(e)}function Tc(){return`[`}function Ec(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Dc(){return{enter:{gfmFootnoteCallString:_c,gfmFootnoteCall:vc,gfmFootnoteDefinitionLabelString:yc,gfmFootnoteDefinition:bc},exit:{gfmFootnoteCallString:xc,gfmFootnoteCall:Sc,gfmFootnoteDefinitionLabelString:Cc,gfmFootnoteDefinition:wc}}}function Oc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ec},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Ac:kc))),s(),o}}function kc(e,t,n){return t===0?e:Ac(e,t,n)}function Ac(e,t,n){return(n?``:` `)+e}var jc=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Ic.peek=Lc;function Mc(){return{canContainEols:[`delete`],enter:{strikethrough:Pc},exit:{strikethrough:Fc}}}function Nc(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:jc}],handlers:{delete:Ic}}}function Pc(e){this.enter({type:`delete`,children:[]},e)}function Fc(e){this.exit(e)}function Ic(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Lc(){return`~`}function W(e){return e.length}function Rc(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||W,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Hc);return i(),o}function Hc(e,t,n){return`>`+(n?``:` `)+e}function Uc(e,t){return Wc(e,t.inConstruct,!0)&&!Wc(e,t.notInConstruct,!1)}function Wc(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function qc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Jc(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Yc(e,t,n,r){let i=Jc(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(qc(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Xc);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Kc(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` `,encode:["`"],...s.current()})),t()}return u+=s.move(` `),a&&(u+=s.move(a+` `)),u+=s.move(c),l(),u}function Xc(e,t,n){return(n?``:` `)+e}function Zc(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Qc(e,t,n,r){let i=Zc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function $c(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function el(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function tl(e,t,n){let r=Er(e),i=Er(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}nl.peek=rl;function nl(e,t,n,r){let i=$c(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=tl(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=el(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=tl(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+el(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function rl(e,t,n){return n.options.emphasis||`*`}function il(e,t){let n=!1;return Ko(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Yn(e)&&(t.options.setext||n))}function al(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(il(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` `,after:` `});return r(),t(),o+` `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(` `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:` `,...a.current()});return/^[\t ]/.test(l)&&(l=el(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}ol.peek=sl;function ol(e){return e.value||``}function sl(){return`<`}G.peek=cl;function G(e,t,n,r){let i=Zc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function cl(){return`!`}ll.peek=ul;function ll(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function ul(){return`!`}dl.peek=fl;function dl(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}ml.peek=hl;function ml(e,t,n,r){let i=Zc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(pl(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function hl(e,t,n){return pl(e,n)?`<`:`[`}gl.peek=_l;function gl(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function _l(){return`[`}function vl(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function yl(e){let t=vl(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function bl(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function xl(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Sl(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?bl(n):vl(n),s=e.ordered?o===`.`?`)`:`.`:yl(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),xl(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Tl(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var El=Fo([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Dl(e,t,n,r){return(e.children.some(function(e){return El(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ol(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}kl.peek=Al;function kl(e,t,n,r){let i=Ol(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=tl(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=el(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=tl(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+el(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Al(e,t,n){return n.options.strong||`*`}function jl(e,t,n,r){return n.safe(e.value,r)}function Ml(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Nl(e,t,n){let r=(xl(n)+(n.options.ruleSpaces?` `:``)).repeat(Ml(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Pl={blockquote:Vc,break:Gc,code:Yc,definition:Qc,emphasis:nl,hardBreak:Gc,heading:al,html:ol,image:G,imageReference:ll,inlineCode:dl,link:ml,linkReference:gl,list:Sl,listItem:wl,paragraph:Tl,root:Dl,strong:kl,text:jl,thematicBreak:Nl};function Fl(){return{enter:{table:Il,tableData:q,tableHeader:q,tableRow:Rl},exit:{codeText:J,table:Ll,tableData:K,tableHeader:K,tableRow:K}}}function Il(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Ll(e){this.exit(e),this.data.inTable=void 0}function Rl(e){this.enter({type:`tableRow`,children:[]},e)}function K(e){this.exit(e)}function q(e){this.enter({type:`tableCell`,children:[]},e)}function J(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Y));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Y(e,t){return t===`|`?t:e}function X(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;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:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Rc(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var gu={tokenize:wu,partial:!0};function _u(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:xu,continuation:{tokenize:Su},exit:Cu}},text:{91:{name:`gfmFootnoteCall`,tokenize:bu},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:vu,resolveTo:yu}}}}function vu(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=cr(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function yu(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function bu(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||I(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(cr(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return I(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function xu(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||I(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=cr(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return I(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),R(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Su(e,t,n){return e.check(Pr,t,e.attempt(gu,t,n))}function Cu(e){e.exit(`gfmFootnoteDefinition`)}function wu(e,t,n){let r=this;return R(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Tu(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Er(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Eu=class{constructor(){this.map=[]}add(e,t,n){Du(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Du(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?ee:c;return a===ee&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):F(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):L(t)?R(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||I(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,L(t)?R(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return L(t)?R(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||F(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return L(t)?R(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||F(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function ee(t){return e.enter(`tableRow`),S(t)}function S(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),S):n===null||F(n)?(e.exit(`tableRow`),t(n)):L(n)?R(e,S,`whitespace`)(n):(e.enter(`data`),C(n))}function C(t){return t===null||t===124||I(t)?(e.exit(`data`),S(t)):(e.consume(t),t===92?w:C)}function w(t){return t===92||t===124?(e.consume(t),C):C(t)}}function ju(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Eu;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Pu(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Nu(e,t,n,r,i){let a=[],o=Pu(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Pu(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Fu={name:`tasklistCheck`,tokenize:Lu};function Iu(){return{text:{91:Fu}}}function Lu(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return I(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return F(r)?t(r):L(r)?e.check({tokenize:Ru},t,n)(r):n(r)}}function Ru(e,t,n){return R(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function zu(e){return ir([tu(),_u(),Tu(e),ku(),Iu()])}var Bu={};function Vu(e){let t=this,n=e||Bu,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(zu(n)),a.push(Wl()),o.push(Gl(n))}function Hu({event:e,className:t=``}){return!e.content||!e.isFinal?null:(0,S.jsxs)(`div`,{className:`px-1 pt-5 pb-1 text-stone-100 ${t}`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-bold tracking-widest text-lime-300 uppercase`,children:[(0,S.jsx)(Oe,{size:14}),(0,S.jsx)(`span`,{children:`Final response`})]}),(0,S.jsx)(`div`,{className:`mt-3 font-mono text-base leading-relaxed [&_a]:text-lime-300 [&_a]:underline [&_blockquote]:my-4 [&_blockquote]:border-l-2 [&_blockquote]:border-emerald-200 [&_blockquote]:bg-emerald-200/5 [&_blockquote]:px-3 [&_blockquote]:py-2 [&_code]:rounded [&_code]:border [&_code]:border-stone-100/15 [&_code]:bg-stone-100/5 [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:text-emerald-200 [&_em]:font-serif [&_h1]:my-4 [&_h1]:font-sans [&_h1]:text-xl [&_h2]:my-4 [&_h2]:font-sans [&_h2]:text-lg [&_h3]:my-3 [&_h3]:font-sans [&_h3]:text-base [&_li]:my-2 [&_li]:pl-1 [&_li::marker]:font-bold [&_li::marker]:text-lime-300 [&_ol]:my-4 [&_ol]:pl-6 [&_p]:mb-4 [&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:border [&_pre]:border-stone-100/15 [&_pre]:bg-stone-950 [&_pre]:p-4 [&_strong]:text-white [&_table]:my-4 [&_table]:w-full [&_table]:border-collapse [&_table]:text-sm [&_td]:border [&_td]:border-stone-100/15 [&_td]:p-2 [&_th]:border [&_th]:border-stone-100/15 [&_th]:bg-lime-300/5 [&_th]:p-2 [&_th]:text-left [&_th]:text-lime-300 [&_ul]:my-4 [&_ul]:pl-6`,children:(0,S.jsx)(Ws,{remarkPlugins:[Vu],children:e.content})})]})}function Uu({event:e,className:t=``}){return e.thinking?(0,S.jsx)(Be,{className:`relative border-stone-100/15 bg-emerald-200/5 before:absolute before:inset-y-0 before:left-0 before:w-0.5 before:bg-emerald-200 before:opacity-60 ${t}`,contentClassName:`border-t border-stone-100/10 px-4 py-4`,summary:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`span`,{className:`flex flex-none items-center gap-2 text-sm font-bold tracking-widest uppercase`,children:[(0,S.jsx)(ce,{size:14}),(0,S.jsxs)(`span`,{children:[`Thinking · turn `,e.turn]})]}),(0,S.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-serif text-sm text-stone-100/50 italic`,children:e.thinking})]}),summaryClassName:`gap-3 px-4 py-3`,children:(0,S.jsx)(`p`,{className:`m-0 whitespace-pre-wrap font-serif text-base leading-relaxed text-stone-100/60 italic`,children:e.thinking})}):null}function Wu({event:e,className:t=``}){let n=Le.find(t=>t.name===e.name),r=e.name===`search_wikipedia`,i=e.name===`create_research_paper`,a=e.status===`running`?r?`Researching`:i?`Publishing`:`Running`:`Complete`;return(0,S.jsxs)(Be,{className:`my-2.5 border-lime-300/35 bg-lime-300/5 ${t}`,contentClassName:`border-t border-lime-300/20`,summary:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`span`,{className:`flex flex-none items-center gap-2 text-sm font-bold tracking-widest text-lime-300 uppercase`,children:[e.status===`running`?(0,S.jsx)(ve,{className:`animate-spin`,size:14}):(0,S.jsx)(le,{size:14}),r?`Research subagent`:i?`System finalizer`:`Local tool`]}),(0,S.jsx)(`strong`,{className:`min-w-0 flex-1 truncate font-mono text-sm font-medium`,children:i?`Create research paper`:n?.label??e.name.replaceAll(`_`,` `)}),(0,S.jsx)(`span`,{className:`flex flex-none items-center gap-2 text-sm font-bold tracking-widest text-stone-100/50 uppercase`,children:a})]}),summaryClassName:`gap-4 px-4 py-3`,children:[(0,S.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 px-4 py-3`,children:[(0,S.jsx)(`span`,{className:`pt-0.5 text-sm font-bold tracking-widest text-stone-100/60 uppercase`,children:`Input`}),(0,S.jsx)(`code`,{className:`col-span-3 wrap-anywhere whitespace-pre-wrap font-mono text-sm leading-relaxed text-stone-100/75`,children:JSON.stringify(e.arguments,null,2)})]}),e.result&&(0,S.jsxs)(`div`,{className:`grid grid-cols-4 gap-3 border-t border-stone-100/10 px-4 py-3`,children:[(0,S.jsx)(`span`,{className:`pt-0.5 text-sm font-bold tracking-widest text-stone-100/60 uppercase`,children:`Result`}),(0,S.jsx)(`code`,{className:`col-span-3 wrap-anywhere whitespace-pre-wrap font-mono text-sm leading-relaxed text-emerald-200`,children:JSON.stringify(e.result,null,2)})]})]})}function Z({className:e=``,artifact:t,elapsedMs:n,error:r,interaction:i,modelPhase:a,plan:o,runPhase:s,stats:c,trace:l,onSubmitInteraction:u}){let d=(0,y.useRef)(null),f=s===`thinking`,p=l.length>0,m=l.some(e=>e.kind===`tool`),h=l.some(e=>e.kind===`tool`&&e.status===`running`);return(0,y.useEffect)(()=>{d.current?.scrollTo({top:d.current.scrollHeight,behavior:`auto`})},[l]),(0,S.jsxs)(Ve,{className:`min-h-128 min-w-0 p-6 lg:p-8 ${e}`,tone:`dark`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between gap-5`,children:[(0,S.jsx)(He,{number:`03`,tone:`dark`,children:`Agent trace`}),(0,S.jsxs)(`span`,{className:`flex items-center gap-2 text-sm font-bold tracking-widest uppercase`,children:[(0,S.jsx)(`i`,{className:Re(`size-1.5 rounded-full bg-stone-500`,{"animate-pulse bg-lime-300 ring-4 ring-lime-300/10":f})}),s===`waiting`?`Waiting for you`:f?`Live`:s===`complete`?`Complete`:`Standby`]})]}),(0,S.jsxs)(`div`,{className:`mt-7 grid grid-cols-1 gap-px overflow-hidden rounded-lg border border-stone-100/15 bg-stone-100/15 md:grid-cols-3`,children:[(0,S.jsxs)(`div`,{className:Re(`grid min-h-16 grid-cols-[auto_1fr] content-center gap-x-2 gap-y-1 bg-stone-900 p-3 text-stone-100/50`,{"text-stone-100":a===`ready`}),children:[a===`ready`?(0,S.jsx)(le,{size:14}):(0,S.jsx)(de,{size:14}),(0,S.jsx)(`span`,{className:`text-sm font-bold tracking-widest uppercase`,children:`Runtime`}),(0,S.jsx)(`strong`,{className:`col-start-2 text-sm font-medium`,children:a===`ready`?`WebGPU ready`:`Waiting`})]}),(0,S.jsxs)(`div`,{className:Re(`grid min-h-16 grid-cols-[auto_1fr] content-center gap-x-2 gap-y-1 bg-stone-900 p-3 text-stone-100/50`,{"text-stone-100":f||p}),children:[f&&!h?(0,S.jsx)(ve,{className:`animate-spin`,size:14}):p?(0,S.jsx)(le,{size:14}):(0,S.jsx)(de,{size:14}),(0,S.jsx)(`span`,{className:`text-sm font-bold tracking-widest uppercase`,children:`Reason`}),(0,S.jsx)(`strong`,{className:`col-start-2 text-sm font-medium`,children:p?`Structured trace`:`Waiting`})]}),(0,S.jsxs)(`div`,{className:Re(`grid min-h-16 grid-cols-[auto_1fr] content-center gap-x-2 gap-y-1 bg-stone-900 p-3 text-stone-100/50`,{"text-lime-300":m}),children:[h?(0,S.jsx)(ve,{className:`animate-spin`,size:14}):m?(0,S.jsx)(je,{size:14}):(0,S.jsx)(de,{size:14}),(0,S.jsx)(`span`,{className:`text-sm font-bold tracking-widest uppercase`,children:`Tool loop`}),(0,S.jsx)(`strong`,{className:`col-start-2 text-sm font-medium`,children:h?`Executing locally`:m?`Result returned`:`Watching`})]})]}),(0,S.jsxs)(`div`,{className:`mt-5 grid gap-5 lg:grid-cols-12`,children:[(0,S.jsxs)(`aside`,{className:`min-w-0 lg:col-span-4 xl:col-span-3`,children:[(0,S.jsx)(_t,{plan:o}),i&&(0,S.jsx)(vt,{interaction:i,onSubmit:u}),t&&(0,S.jsx)(ht,{artifact:t})]}),(0,S.jsxs)(`div`,{className:`min-w-0 lg:col-span-8 xl:col-span-9`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between border-b border-stone-100/15 pb-3 text-sm font-bold tracking-widest uppercase`,children:[(0,S.jsx)(`span`,{children:`Execution stream`}),(0,S.jsxs)(`span`,{className:`text-stone-100/45`,children:[l.length,` event`,l.length===1?``:`s`]})]}),(0,S.jsxs)(`div`,{className:`relative w-full overflow-auto border-b border-stone-100/15`,ref:d,children:[!p&&!r&&(0,S.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center text-center`,children:[(0,S.jsx)(fe,{size:30,strokeWidth:1.3}),(0,S.jsx)(`p`,{className:`mt-5 mb-1 font-serif text-lg italic`,children:`Your local agent trace will appear here.`}),(0,S.jsx)(`span`,{className:`text-sm tracking-wider text-stone-100/60 uppercase`,children:`No API. No round trip. No data exhaust.`})]}),r&&(0,S.jsx)(`p`,{className:`border-l-2 border-orange-300 p-5 font-mono text-xs leading-normal text-orange-200`,children:r}),l.map(e=>e.kind===`tool`?(0,S.jsx)(Wu,{event:e},e.id):(0,S.jsxs)(`div`,{className:`border-b border-stone-100/10 py-2.5`,children:[(0,S.jsx)(Uu,{event:e}),(0,S.jsx)(Hu,{event:e})]},e.id)),f&&p&&(0,S.jsx)(`span`,{className:`ml-1 inline-block h-4 w-2 animate-pulse bg-lime-300 align-middle`})]}),(0,S.jsxs)(`div`,{className:`flex flex-wrap justify-between gap-3 pt-4 text-sm font-bold tracking-widest text-stone-100/60 uppercase`,children:[(0,S.jsxs)(`span`,{children:[`Total time `,(0,S.jsx)(`strong`,{children:pt(n)})]}),(0,S.jsx)(`span`,{children:c?`${mt(c.tokens)} generated tokens`:`Private by design`}),(0,S.jsx)(`span`,{className:`text-lime-300`,children:c?`${c.tps.toFixed(1)} TPS`:`TPS --`})]})]})]})]})}function Gu(){let e=(0,y.useRef)(null),t=(0,y.useRef)(null),[n,r]=(0,y.useState)(`idle`),[i,a]=(0,y.useState)(`idle`),[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)([]),[u,d]=(0,y.useState)(``),[f,p]=(0,y.useState)(null),[m,h]=(0,y.useState)(null),[g,_]=(0,y.useState)(null),[v,b]=(0,y.useState)(null),[x,ee]=(0,y.useState)(0);(0,y.useEffect)(()=>{let n=new Worker(new URL(`/assets/agent.worker-CpBu8oF8.js`,``+import.meta.url),{type:`module`});return e.current=n,n.addEventListener(`message`,e=>{let i=e.data;i.type===`loading`?(r(`loading`),s(i.data)):i.type===`ready`?r(`ready`):i.type===`start`?a(`thinking`):i.type===`turn`||i.type===`tool`?l(e=>{let t=e.findIndex(e=>e.id===i.data.id);return t===-1?[...e,i.data]:e.map((e,n)=>n===t?i.data:e)}):i.type===`plan`?h(i.data):i.type===`interaction`?(_(i.data),a(`waiting`)):i.type===`location_request`?`geolocation`in navigator?navigator.geolocation.getCurrentPosition(e=>{n.postMessage({type:`location_response`,id:i.id,location:{latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy:e.coords.accuracy}})},e=>{n.postMessage({type:`location_response`,id:i.id,error:e.message})},{enableHighAccuracy:!1,maximumAge:3e5,timeout:1e4}):n.postMessage({type:`location_response`,id:i.id,error:`Geolocation is not supported by this browser.`}):i.type===`artifact`?b(i.data):i.type===`metrics`?p(i.data):i.type===`complete`?(a(`complete`),p(i.data),ee(t.current===null?i.data.elapsedMs:performance.now()-t.current)):(r(e=>e===`loading`?`error`:e),a(`error`),t.current!==null&&ee(performance.now()-t.current),d(i.message))}),()=>{n.terminate(),e.current=null}},[]),(0,y.useEffect)(()=>{if(i!==`thinking`&&i!==`waiting`||t.current===null)return;let e=()=>{t.current!==null&&ee(performance.now()-t.current)};e();let n=window.setInterval(e,500);return()=>window.clearInterval(n)},[i]);let S=t=>e.current?.postMessage(t);return{artifact:v,elapsedMs:x,error:u,generate:(e,n)=>{t.current=performance.now(),ee(0),d(``),l([]),p(null),h(null),_(null),b(null),a(`thinking`),S({type:`generate`,prompt:e,allowedTools:[...n]})},interaction:g,load:()=>{d(``),r(`loading`),S({type:`load`})},modelPhase:n,plan:m,progress:o,runPhase:i,stats:f,stop:()=>{S({type:`stop`}),_(null)},submitInteraction:e=>{!g||!e.trim()||(S({type:`interaction_response`,id:g.id,answer:e.trim()}),_(null),a(`thinking`))},trace:c}}function Ku(){let[e,t]=(0,y.useState)(Ge[0].id),[n,r]=(0,y.useState)(Ge[0].prompt),i=Gu(),a=`gpu`in navigator;return(0,S.jsxs)(`div`,{className:`relative min-h-screen overflow-hidden bg-stone-100 font-sans text-stone-900`,style:{backgroundImage:`linear-gradient(rgba(23,25,21,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(23,25,21,.045) 1px,transparent 1px)`,backgroundSize:`38px 38px`},children:[(0,S.jsx)(`div`,{className:`pointer-events-none absolute top-28 -right-48 size-128 rounded-full bg-emerald-200 opacity-50 blur-3xl`}),(0,S.jsx)(`div`,{className:`pointer-events-none absolute top-80 -left-64 size-96 rounded-full bg-orange-200 opacity-50 blur-3xl`}),(0,S.jsx)(C,{}),(0,S.jsxs)(`main`,{className:`relative z-1 mx-auto w-full max-w-screen-2xl px-4 md:px-6`,children:[i.modelPhase===`ready`?(0,S.jsxs)(`div`,{className:`grid gap-6 py-6 md:gap-8 md:py-10`,children:[(0,S.jsx)(Xe,{modelPhase:i.modelPhase,prompt:n,runPhase:i.runPhase,topicId:e,onPromptChange:r,onRun:()=>i.generate(n,We.tools),onStop:i.stop,onTopicChange:e=>{let n=Ge.find(t=>t.id===e);n&&(t(e),r(n.prompt))}}),(0,S.jsx)(Z,{artifact:i.artifact,elapsedMs:i.elapsedMs,error:i.error,interaction:i.interaction,modelPhase:i.modelPhase,plan:i.plan,runPhase:i.runPhase,stats:i.stats,trace:i.trace,onSubmitInteraction:i.submitInteraction})]}):(0,S.jsx)(dt,{className:`my-6 md:my-10`,error:i.error,modelPhase:i.modelPhase,progress:i.progress,webGpuAvailable:a,onLoad:i.load}),(0,S.jsx)(`section`,{className:`grid grid-cols-1 items-end gap-10 py-24 md:grid-cols-2 md:py-32`,children:(0,S.jsxs)(`p`,{className:`m-0 max-w-2xl text-[clamp(38px,5vw,70px)] leading-none tracking-tighter`,children:[`Built for agent harnesses.`,` `,(0,S.jsx)(`em`,{className:`font-serif font-normal`,children:`Made for constrained hardware.`})]})})]}),(0,S.jsxs)(`footer`,{className:`relative z-1 mx-auto grid w-full max-w-screen-2xl grid-cols-1 gap-5 border-t border-stone-900 px-4 py-8 text-xs font-bold tracking-wider text-stone-900/55 uppercase md:grid-cols-3 md:px-6`,children:[(0,S.jsx)(`span`,{children:`LFM2.5 edge agent demo`}),(0,S.jsx)(`span`,{children:`ONNX · q4f16 · WebGPU`}),(0,S.jsxs)(`a`,{href:`https://huggingface.co/${$e}`,target:`_blank`,className:`truncate md:text-right`,children:[`Model source: `,$e]})]})]})}(0,b.createRoot)(document.getElementById(`root`)).render((0,S.jsx)(y.StrictMode,{children:(0,S.jsx)(Ku,{})}));export{s as n,u as r,st as t};