@okhay-p/mivra 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
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,t.exports),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;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 ie(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,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=ie(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function A(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function se(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ce(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else se(ce.bind(null,e))}var le={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=le,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ce,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=se,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(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,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){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&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(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||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=o(((e,t)=>{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=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),ee=Symbol.for(`react.portal`),te=Symbol.for(`react.fragment`),ne=Symbol.for(`react.strict_mode`),re=Symbol.for(`react.profiler`),ie=Symbol.for(`react.consumer`),ae=Symbol.for(`react.context`),A=Symbol.for(`react.forward_ref`),oe=Symbol.for(`react.suspense`),se=Symbol.for(`react.suspense_list`),ce=Symbol.for(`react.memo`),le=Symbol.for(`react.lazy`),ue=Symbol.for(`react.activity`),de=Symbol.for(`react.legacy_hidden`),fe=Symbol.for(`react.memo_cache_sentinel`),pe=Symbol.for(`react.view_transition`),me=Symbol.for(`react.recoverable`),he=Symbol.iterator;function ge(e){return typeof e!=`object`||!e?null:(e=he&&e[he]||e[`@@iterator`],typeof e==`function`?e:null)}var _e=Symbol.for(`react.client.reference`);function ve(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case te:return`Fragment`;case re:return`Profiler`;case ne:return`StrictMode`;case oe:return`Suspense`;case se:return`SuspenseList`;case ue:return`Activity`;case pe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ee:return`Portal`;case ae:return e.displayName||`Context`;case ie:return(e._context.displayName||`Context`)+`.Consumer`;case A:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ce:return t=e.displayName||null,t===null?ve(e.type)||`Memo`:t;case le:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var ye=Array.isArray,be=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xe=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Se={pending:!1,data:null,method:null,action:null},Ce=[],we=-1;function Te(e){return{current:e}}function Ee(e){0>we||(e.current=Ce[we],Ce[we]=null,we--)}function De(e,t){we++,Ce[we]=e.current,e.current=t}var Oe=Te(null),ke=Te(null),Ae=Te(null),je=Te(null);function Me(e,t){switch(De(Ae,t),De(ke,e),De(Oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ap(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ap(t),e=jp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Ee(Oe),De(Oe,e)}function Ne(){Ee(Oe),Ee(ke),Ee(Ae)}function Pe(e){var t=e.memoizedState;t!==null&&(wh._currentValue=t.memoizedState,De(je,e)),t=Oe.current;var n=jp(t,e.type);t!==n&&(De(ke,e),De(Oe,n))}function Fe(e){ke.current===e&&(Ee(Oe),Ee(ke)),je.current===e&&(Ee(je),wh._currentValue=Se)}var Ie,Le;function Re(e){if(Ie===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ie=t&&t[1]||``,Le=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+Ie+e+Le}var ze=!1;function Be(e,t){if(!e||ze)return``;ze=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ze=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Re(n):``}function Ve(e,t){switch(e.tag){case 26:case 27:case 5:return Re(e.type);case 16:return Re(`Lazy`);case 13:return e.child!==t&&t!==null?Re(`Suspense Fallback`):Re(`Suspense`);case 19:return Re(`SuspenseList`);case 0:case 15:return Be(e.type,!1);case 11:return Be(e.type.render,!1);case 1:return Be(e.type,!0);case 31:return Re(`Activity`);case 30:return Re(`ViewTransition`);default:return``}}function He(e){try{var t=``,n=null;do t+=Ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Ue=Object.prototype.hasOwnProperty,We=t.unstable_scheduleCallback,Ge=t.unstable_cancelCallback,Ke=t.unstable_shouldYield,qe=t.unstable_requestPaint,Je=t.unstable_now,Ye=t.unstable_getCurrentPriorityLevel,Xe=t.unstable_ImmediatePriority,Ze=t.unstable_UserBlockingPriority,Qe=t.unstable_NormalPriority,$e=t.unstable_LowPriority,et=t.unstable_IdlePriority,tt=t.log,nt=t.unstable_setDisableYieldValue,rt=null,it=null;function at(e){if(typeof tt==`function`&&nt(e),it&&typeof it.setStrictMode==`function`)try{it.setStrictMode(rt,e)}catch{}}var ot=Math.clz32?Math.clz32:lt,st=Math.log,ct=Math.LN2;function lt(e){return e>>>=0,e===0?32:31-(st(e)/ct|0)|0}var ut=256,dt=262144,ft=4194304;function pt(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&-e;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 mt(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=pt(n))):i=pt(o):i=pt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=pt(n))):i=pt(o)):i=pt(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 ht(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function gt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-ot(n),i=1<<r;t|=e[r],n&=~i}return t}function _t(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 vt(){var e=ft;return ft<<=1,!(ft&62914560)&&(ft=4194304),e}function yt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function bt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xt(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<n;){var u=31-ot(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&St(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function St(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ot(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ct(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function wt(e,t){var n=t&-t;return n=n&42?1:Tt(n),(n&(e.suspendedLanes|t))===0?n:0}function Tt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Dt(){var e=xe.p;return e===0?(e=window.event,e===void 0?32:Bh(e.type)):e}function Ot(e,t){var n=xe.p;try{return xe.p=e,t()}finally{xe.p=n}}var kt=Math.random().toString(36).slice(2),At=`__reactFiber$`+kt,jt=`__reactProps$`+kt,Mt=`__reactContainer$`+kt,Nt=`__reactEvents$`+kt,Pt=`__reactListeners$`+kt,j=`__reactHandles$`+kt,Ft=`__reactResources$`+kt,It=`__reactMarker$`+kt,Lt=`__reactLoad$`+kt;function Rt(e){delete e[At],delete e[jt],delete e[Pt],delete e[j]}function zt(e){var t;if(t=e[At])return t;for(var n=e.parentNode;n;){if(t=n[Mt]||n[At]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=jm(e);e!==null;){if(n=e[At])return n;e=jm(e)}return t}e=n,n=e.parentNode}return null}function Bt(e){if(e=e[At]||e[Mt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ht(e){var t=e[Ft];return t||=e[Ft]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ut(e){e[It]=!0}function Wt(e){e[Lt]=void 0}var Gt=new Set,Kt={};function qt(e,t){Jt(e,t),Jt(e+`Capture`,t)}function Jt(e,t){for(Kt[e]=t,e=0;e<t.length;e++)Gt.add(t[e])}var Yt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Xt={},Zt={};function Qt(e){return Ue.call(Zt,e)?!0:Ue.call(Xt,e)?!1:Yt.test(e)?Zt[e]=!0:(Xt[e]=!0,!1)}var $t=!1;function en(){var e=$t;return $t=!1,e}function tn(e,t,n){if(Qt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function nn(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function rn(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function an(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function on(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function M(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sn(e){if(!e._valueTracker){var t=on(e)?`checked`:`value`;e._valueTracker=M(e,t,``+e[t])}}function cn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=on(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var ln=/[\n"\\]/g;function un(e){return e.replace(ln,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function dn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+an(t)):e.value!==``+an(t)&&(e.value=``+an(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):pn(e,an(n)):o===`number`&&e.value==t?pn(e,an(e.value)):pn(e,an(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+an(s):e.removeAttribute(`name`)}function fn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){sn(e);return}n=n==null?``:``+an(n),t=t==null?n:``+an(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),sn(e)}function pn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function mn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+an(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function hn(e,t,n){t!=null&&(t=``+an(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+an(n)}function gn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ye(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=an(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),sn(e)}function _n(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function yn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||vn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function bn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,$t=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(yn(e,a,r),$t=!0)}else for(var o in t)t.hasOwnProperty(o)&&yn(e,o,t[o])}function xn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Sn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Cn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wn(e){return Cn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Tn(){}var En=null;function Dn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var On=null,kn=null;function An(e){var t=Bt(e);if(t&&(e=t.stateNode)){var n=e[jt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(dn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+un(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[jt]||null;if(!a)throw Error(i(90));dn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&cn(r)}break a;case`textarea`:hn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&mn(e,!!n.multiple,t,!1)}}}var jn=!1;function Mn(e,t,n){if(jn)return e(t,n);jn=!0;try{return e(t)}finally{if(jn=!1,(On!==null||kn!==null)&&(nf(),On&&(t=On,e=kn,kn=On=null,An(t),e)))for(t=0;t<e.length;t++)An(e[t])}}function Nn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[jt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Pn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Fn=!1;if(Pn)try{var In={};Object.defineProperty(In,"passive",{get:function(){Fn=!0}}),window.addEventListener(`test`,In,In),window.removeEventListener(`test`,In,In)}catch{Fn=!1}var Ln=null,Rn=null,zn=null;function Bn(){if(zn)return zn;var e,t=Rn,n=t.length,r,i=`value`in Ln?Ln.value:Ln.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return zn=i.slice(e,1<r?1-r:void 0)}function Vn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hn(){return!0}function Un(){return!1}function Wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Hn:Un,this.isPropagationStopped=Un,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Hn)},persist:function(){},isPersistent:Hn}),t}var Gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kn=Wn(Gn),qn=D({},Gn,{view:0,detail:0}),Jn=Wn(qn),Yn,Xn,Zn,Qn=D({},qn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Zn&&(Zn&&e.type===`mousemove`?(Yn=e.screenX-Zn.screenX,Xn=e.screenY-Zn.screenY):Xn=Yn=0,Zn=e),Yn)},movementY:function(e){return`movementY`in e?e.movementY:Xn}}),$n=Wn(Qn),er=Wn(D({},Qn,{dataTransfer:0})),tr=Wn(D({},qn,{relatedTarget:0})),nr=Wn(D({},Gn,{animationName:0,elapsedTime:0,pseudoElement:0})),rr=Wn(D({},Gn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),ir=Wn(D({},Gn,{data:0})),ar={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},or={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},sr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function cr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sr[e])?!!t[e]:!1}function lr(){return cr}var ur=Wn(D({},qn,{key:function(e){if(e.key){var t=ar[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Vn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?or[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lr,charCode:function(e){return e.type===`keypress`?Vn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Vn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),dr=Wn(D({},Qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),fr=Wn(D({},Gn,{submitter:0})),pr=Wn(D({},qn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lr})),mr=Wn(D({},Gn,{propertyName:0,elapsedTime:0,pseudoElement:0})),hr=Wn(D({},Qn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),gr=Wn(D({},Gn,{newState:0,oldState:0,source:0})),_r=[9,13,27,32],vr=Pn&&`CompositionEvent`in window,yr=null;Pn&&`documentMode`in document&&(yr=document.documentMode);var eee=Pn&&`TextEvent`in window&&!yr,br=Pn&&(!vr||yr&&8<yr&&11>=yr),xr=` `,Sr=!1;function Cr(e,t){switch(e){case`keyup`:return _r.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function wr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Tr=!1;function Er(e,t){switch(e){case`compositionend`:return wr(t);case`keypress`:return t.which===32?(Sr=!0,xr):null;case`textInput`:return e=t.data,e===xr&&Sr?null:e;default:return null}}function Dr(e,t){if(Tr)return e===`compositionend`||!vr&&Cr(e,t)?(e=Bn(),zn=Rn=Ln=null,Tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return br&&t.locale!==`ko`?null:t.data;default:return null}}var Or={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Or[e.type]:t===`textarea`}function Ar(e,t,n,r){On?kn?kn.push(r):kn=[r]:On=r,t=pp(t,`onChange`),0<t.length&&(n=new Kn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var jr=null,Mr=null;function Nr(e){ap(e,0)}function Pr(e){if(cn(Vt(e)))return e}function Fr(e,t){if(e===`change`)return t}var Ir=!1;if(Pn){var Lr;if(Pn){var Rr=`oninput`in document;if(!Rr){var zr=document.createElement(`div`);zr.setAttribute(`oninput`,`return;`),Rr=typeof zr.oninput==`function`}Lr=Rr}else Lr=!1;Ir=Lr&&(!document.documentMode||9<document.documentMode)}function Br(){jr&&(jr.detachEvent(`onpropertychange`,Vr),Mr=jr=null)}function Vr(e){if(e.propertyName===`value`&&Pr(Mr)){var t=[];Ar(t,Mr,e,Dn(e)),Mn(Nr,t)}}function Hr(e,t,n){e===`focusin`?(Br(),jr=t,Mr=n,jr.attachEvent(`onpropertychange`,Vr)):e===`focusout`&&Br()}function Ur(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Pr(Mr)}function Wr(e,t){if(e===`click`)return Pr(t)}function Gr(e,t){if(e===`input`||e===`change`)return Pr(t)}function Kr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var qr=typeof Object.is==`function`?Object.is:Kr;function Jr(e,t){if(qr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ue.call(t,i)||!qr(e[i],t[i]))return!1}return!0}function Yr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zr(e,t){var n=Xr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Xr(n)}}function Qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $r(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yr(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=Yr(e.document)}return t}function ei(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 ti=Pn&&`documentMode`in document&&11>=document.documentMode,ni=null,ri=null,ii=null,ai=!1;function oi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ai||ni==null||ni!==Yr(r)||(r=ni,`selectionStart`in r&&ei(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}),ii&&Jr(ii,r)||(ii=r,r=pp(ri,`onSelect`),0<r.length&&(t=new Kn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=ni)))}function si(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ci={animationend:si(`Animation`,`AnimationEnd`),animationiteration:si(`Animation`,`AnimationIteration`),animationstart:si(`Animation`,`AnimationStart`),transitionrun:si(`Transition`,`TransitionRun`),transitionstart:si(`Transition`,`TransitionStart`),transitioncancel:si(`Transition`,`TransitionCancel`),transitionend:si(`Transition`,`TransitionEnd`)},li={},ui={};Pn&&(ui=document.createElement(`div`).style,`AnimationEvent`in window||(delete ci.animationend.animation,delete ci.animationiteration.animation,delete ci.animationstart.animation),`TransitionEvent`in window||delete ci.transitionend.transition);function di(e){if(li[e])return li[e];if(!ci[e])return e;var t=ci[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ui)return li[e]=t[n];return e}var fi=di(`animationend`),pi=di(`animationiteration`),mi=di(`animationstart`),hi=di(`transitionrun`),gi=di(`transitionstart`),_i=di(`transitioncancel`),vi=di(`transitionend`),yi=new Map,bi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);bi.push(`scrollEnd`);function xi(e,t){yi.set(e,t),qt(t,[e])}var Si=0;function Ci(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Ld.identifierPrefix;var n=Si++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function wi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Gd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function Ti(e,t){return e=wi(e),t=wi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Ei=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Di=[],Oi=0,ki=0;function Ai(){for(var e=Oi,t=ki=Oi=0;t<e;){var n=Di[t];Di[t++]=null;var r=Di[t];Di[t++]=null;var i=Di[t];Di[t++]=null;var a=Di[t];if(Di[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Pi(n,i,a)}}function ji(e,t,n,r){Di[Oi++]=e,Di[Oi++]=t,Di[Oi++]=n,Di[Oi++]=r,ki|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Mi(e,t,n,r){return ji(e,t,n,r),Fi(e)}function Ni(e,t){return ji(e,null,null,t),Fi(e)}function Pi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ot(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Fi(e){if(50<Kd)throw Kd=0,qd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ii={};function Li(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ri(e,t,n,r){return new Li(e,t,n,r)}function zi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bi(e,t){var n=e.alternate;return n===null?(n=Ri(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Vi(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)zi(r)&&(s=1);else if(typeof r==`string`)s=uh(e,n,Oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ue:return e=Ri(31,n,t,a),e.elementType=ue,e.lanes=o,e;case te:return Ui(n.children,a,o,t);case ne:s=8,a|=24;break;case re:return e=Ri(12,n,t,a|2),e.elementType=re,e.lanes=o,e;case oe:return e=Ri(13,n,t,a),e.elementType=oe,e.lanes=o,e;case se:return e=Ri(19,n,t,a),e.elementType=se,e.lanes=o,e;case de:case pe:return e=a|32,e=Ri(30,n,t,e),e.elementType=pe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ae:s=10;break a;case ie:s=9;break a;case A:s=11;break a;case ce:s=14;break a;case le:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ri(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ui(e,t,n,r){return e=Ri(7,e,r,t),e.lanes=n,e}function Wi(e,t,n){return e=Ri(6,e,null,t),e.lanes=n,e}function Gi(e){var t=Ri(18,null,null,0);return t.stateNode=e,t}function Ki(e,t,n){return t=Ri(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qi=new WeakMap;function Ji(e,t){if(typeof e==`object`&&e){var n=qi.get(e);return n===void 0?(t={value:e,source:t,stack:He(t)},qi.set(e,t),t):n}return{value:e,source:t,stack:He(t)}}var Yi=[],Xi=0,Zi=null,Qi=0,$i=[],ea=0,ta=null,na=1,ra=``;function ia(e,t){Yi[Xi++]=Qi,Yi[Xi++]=Zi,Zi=e,Qi=t}function aa(e,t,n){$i[ea++]=na,$i[ea++]=ra,$i[ea++]=ta,ta=e;var r=na;e=ra;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,na=1<<32-ot(t)+i|n<<i|r,ra=a+e}else na=1<<a|n<<i|r,ra=e}function oa(e){e.return!==null&&(ia(e,1),aa(e,1,0))}function sa(e){for(;e===Zi;)Zi=Yi[--Xi],Yi[Xi]=null,Qi=Yi[--Xi],Yi[Xi]=null;for(;e===ta;)ta=$i[--ea],$i[ea]=null,ra=$i[--ea],$i[ea]=null,na=$i[--ea],$i[ea]=null}function ca(e,t){$i[ea++]=na,$i[ea++]=ra,$i[ea++]=ta,na=t.id,ra=t.overflow,ta=e}var la=null,ua=null,da=!1,fa=null,pa=!1,ma=Error(i(519));function ha(e){throw xa(Ji(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ma}function ga(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[At]=e,t[jt]=r,n){case`dialog`:op(`cancel`,t),op(`close`,t);break;case`iframe`:case`object`:case`embed`:op(`load`,t);break;case`video`:case`audio`:for(n=0;n<rp.length;n++)op(rp[n],t);break;case`source`:op(`error`,t);break;case`img`:case`image`:case`link`:op(`error`,t),op(`load`,t);break;case`details`:op(`toggle`,t);break;case`input`:op(`invalid`,t),fn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:op(`invalid`,t);break;case`textarea`:op(`invalid`,t),gn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||yp(t.textContent,n)?(r.popover!=null&&(op(`beforetoggle`,t),op(`toggle`,t)),r.onScroll!=null&&op(`scroll`,t),r.onScrollEnd!=null&&op(`scrollend`,t),r.onClick!=null&&(t.onclick=Tn),t=!0):t=!1,t||ha(e,!0)}function _a(e){for(la=e.return;la;)switch(la.tag){case 5:case 31:case 13:pa=!1;return;case 27:case 3:pa=!0;return;default:la=la.return}}function va(e){if(e!==la)return!1;if(!da)return _a(e),da=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Np(e.type,e.memoizedProps)),n=!n),n&&ua&&ha(e),_a(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ua=Am(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ua=Am(e)}else t===27?(t=ua,Vp(e.type)?(e=km,km=null,ua=e):ua=t):ua=la?Om(e.stateNode.nextSibling):null;return!0}function ya(){ua=la=null,da=!1}function ba(){var e=fa;return e!==null&&(kd===null?kd=e:kd.push.apply(kd,e),fa=null),e}function xa(e){fa===null?fa=[e]:fa.push(e)}var Sa=Te(null),Ca=null,wa=null;function Ta(e,t,n){De(Sa,t._currentValue),t._currentValue=n}function Ea(e){e._currentValue=Sa.current,Ee(Sa)}function Da(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Oa(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Da(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Da(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Da(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ka(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;qr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===je.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[wh]:e.push(wh))}a=a.return}return e!==null&&Oa(t,e,n,r),t.flags|=262144,e!==null}function Aa(e){for(e=e.firstContext;e!==null;){if(!qr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ja(e){Ca=e,wa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ma(e){return Pa(Ca,e)}function Na(e,t){return Ca===null&&ja(e),Pa(e,t)}function Pa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},wa===null){if(e===null)throw Error(i(308));wa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wa=wa.next=t;return n}var Fa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ia=t.unstable_scheduleCallback,La=t.unstable_NormalPriority,Ra={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function za(){return{controller:new Fa,data:new Map,refCount:0}}function Ba(e){e.refCount--,e.refCount===0&&Ia(La,function(){e.controller.abort()})}function Va(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ha=null;function Ua(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Wa=null,Ga=0,Ka=0,qa=null;function Ja(e,t){if(Wa===null){var n=Wa=[];Ga=0,Ka=Qf(),qa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ga++,t.then(Ya,Ya),t}function Ya(){if(--Ga===0&&(Ha=null,Wa!==null)){qa!==null&&(qa.status=`fulfilled`);var e=Wa;Wa=null,Ka=0,qa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Xa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Za=be.S;be.S=function(e,t){if(Md=Je(),typeof t==`object`&&t&&typeof t.then==`function`&&Ja(e,t),Ha!==null)for(var n=Rf;n!==null;)Va(n,Ha),n=n.next;if(n=e.types,n!==null){for(var r=Rf;r!==null;)Va(r,n),r=r.next;if(Ka!==0){r=Ha,r===null&&(r=Ha=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Za!==null&&Za(e,t)};var Qa=Te(null);function $a(){var e=Qa.current;return e===null?pd.pooledCache:e}function eo(e,t){t===null?De(Qa,Qa.current):De(Qa,t.pool)}function to(){var e=$a();return e===null?null:{parent:Ra._currentValue,pool:e}}var no=Error(i(460)),ro=Error(i(474)),io=Error(i(542)),ao={then:function(){}};function oo(e){return e=e.status,e===`fulfilled`||e===`rejected`}function so(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Tn,Tn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,fo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(Tn,Tn);else{if(e=pd,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,fo(e),e}throw lo=t,no}}function co(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(lo=e,no):e}}var lo=null;function uo(){if(lo===null)throw Error(i(459));var e=lo;return lo=null,e}function fo(e){if(e===no||e===io)throw Error(i(483))}var po=null,mo=0;function ho(e){var t=mo;return mo+=1,po===null&&(po=[]),so(po,e,t)}function go(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function _o(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function vo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Bi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Wi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===te?(e=d(e,t,n.props.children,r,n.key),go(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===le&&co(i)===t.type)?(t=a(t,n.props),go(t,n),t.return=e,t):(t=Hi(n.type,n.key,n.props,null,e.mode,r),go(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ki(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ui(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Wi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Hi(t.type,t.key,t.props,null,e.mode,n),go(n,t),n.return=e,n;case ee:return t=Ki(t,e.mode,n),t.return=e,t;case le:return t=co(t),f(e,t,n)}if(ye(t)||ge(t))return t=Ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ho(t),n);if(t.$$typeof===ae)return f(e,Na(e,t),n);_o(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case ee:return n.key===i?u(e,t,n,r):null;case le:return n=co(n),p(e,t,n,r)}if(ye(n)||ge(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ho(n),r);if(n.$$typeof===ae)return p(e,t,Na(e,n),r);_o(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case ee:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case le:return r=co(r),m(e,t,n,r,i)}if(ye(r)||ge(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ho(r),i);if(r.$$typeof===ae)return m(e,t,n,Na(t,r),i);_o(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>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),da&&ia(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return da&&ia(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),da&&ia(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=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),da&&ia(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 da&&ia(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(_.key===null?g:_.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)}),da&&ia(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===te&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===te){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),go(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===le&&co(l)===r.type){n(e,r.sibling),c=a(r,o.props),go(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===te?(c=Ui(o.props.children,e.mode,c,o.key),go(c,o),c.return=e,e=c):(c=Hi(o.type,o.key,o.props,null,e.mode,c),go(c,o),c.return=e,e=c)}return s(e);case ee: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}n(e,r);break}t(e,r),r=r.sibling}c=Ki(o,e.mode,c),c.return=e,e=c}return s(e);case le:return o=co(o),_(e,r,o,c)}if(ye(o))return h(e,r,o,c);if(ge(o)){if(l=ge(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ho(o),c);if(o.$$typeof===ae)return _(e,r,Na(e,o),c);_o(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=Wi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{mo=0;var i=_(e,t,n,r);return po=null,i}catch(t){if(t===no||t===io)throw t;var a=Ri(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var yo=vo(!0),bo=vo(!1),xo=!1;function So(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Co(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 wo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function To(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,fd&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Fi(e),Pi(e,null,n),t}return ji(e,r,t,n),Fi(e)}function Eo(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,Ct(e,n)}}function Do(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}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Oo=!1;function ko(){if(Oo){var e=qa;if(e!==null)throw e}}function Ao(e,t,n,r){Oo=!1;var i=e.updateQueue;xo=!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,p=f!==s.lane;if(p?(hd&f)===f:(r&f)===f){f!==0&&f===Ka&&(Oo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:xo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,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),Cd|=o,e.lanes=o,e.memoizedState=d}}function jo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Mo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)jo(n[e],t)}var No=Te(null),Po=Te(0);function Fo(e,t){e=xd,De(Po,e),De(No,t),xd=e|t.baseLanes}function Io(){De(Po,xd),De(No,No.current)}function Lo(){xd=Po.current,Ee(No),Ee(Po)}var Ro=Te(null),zo=null;function Bo(e){var t=e.alternate;De(Go,Go.current&1),De(Ro,e),zo===null&&(t===null||No.current!==null||t.memoizedState!==null)&&(zo=e)}function Vo(e){De(Go,Go.current),De(Ro,e),zo===null&&(zo=e)}function Ho(e){e.tag===22?(De(Go,Go.current),De(Ro,e),zo===null&&(zo=e)):Uo()}function Uo(){De(Go,Go.current),De(Ro,Ro.current)}function Wo(e){Ee(Ro),zo===e&&(zo=null),Ee(Go)}var Go=Te(0);function Ko(e,t){De(Ro,Ro.current),De(Go,t)}function qo(e){Ee(Go),Ee(Ro),zo===e&&(zo=null)}function Jo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Tm(n)||Em(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Yo=0,Xo=null,Zo=null,Qo=null,$o=!1,es=!1,ts=!1,ns=0,rs=0,is=null,as=0;function os(){throw Error(i(321))}function ss(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qr(e[n],t[n]))return!1;return!0}function cs(e,t,n,r,i,a){return Yo=a,Xo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,be.H=e===null||e.memoizedState===null?Tc:Ec,ts=!1,a=n(r,i),ts=!1,es&&(a=us(t,n,r,i)),ls(e),a}function ls(e){be.H=wc;var t=Zo!==null&&Zo.next!==null;if(Yo=0,Qo=Zo=Xo=null,$o=!1,rs=0,is=null,t)throw Error(i(300));e===null||Uc||(e=e.dependencies,e!==null&&Aa(e)&&(Uc=!0))}function us(e,t,n,r){Xo=e;var a=0;do{if(es&&(is=null),rs=0,es=!1,25<=a)throw Error(i(301));if(a+=1,Qo=Zo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}be.H=Dc,o=t(n,r)}while(es);return o}function ds(){var e=be.H,t=e.useState()[0];return t=typeof t.then==`function`?vs(t):t,e=e.useState()[0],(Zo===null?null:Zo.memoizedState)!==e&&(Xo.flags|=1024),t}function fs(){var e=ns!==0;return ns=0,e}function ps(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ms(e){if($o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$o=!1}Yo=0,Qo=Zo=Xo=null,es=!1,rs=ns=0,is=null}function hs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qo===null?Xo.memoizedState=Qo=e:Qo=Qo.next=e,Qo}function gs(){if(Zo===null){var e=Xo.alternate;e=e===null?null:e.memoizedState}else e=Zo.next;var t=Qo===null?Xo.memoizedState:Qo.next;if(t!==null)Qo=t,Zo=e;else{if(e===null)throw Xo.alternate===null?Error(i(467)):Error(i(310));Zo=e,e={memoizedState:Zo.memoizedState,baseState:Zo.baseState,baseQueue:Zo.baseQueue,queue:Zo.queue,next:null},Qo===null?Xo.memoizedState=Qo=e:Qo=Qo.next=e}return Qo}function _s(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vs(e){var t=rs;return rs+=1,is===null&&(is=[]),e=so(is,e,t),t=Xo,(Qo===null?t.memoizedState:Qo.next)===null&&(t=t.alternate,be.H=t===null||t.memoizedState===null?Tc:Ec),e}function ys(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return vs(e);if(e.$$typeof===me)return;if(e.$$typeof===ae)return Ma(e)}throw Error(i(438,String(e)))}function bs(e){var t=null,n=Xo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Xo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=_s(),Xo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=fe;return t.index++,n}function xs(e,t){return typeof t==`function`?t(e):t}function Ss(e){return Cs(gs(),Zo,e)}function Cs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Yo&f)===f:(hd&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ka&&(d=!0);else if((Yo&p)===p){u=u.next,p===Ka&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,Xo.lanes|=p,Cd|=p;f=u.action,ts&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,Xo.lanes|=f,Cd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!qr(o,e.memoizedState)&&(Uc=!0,d&&(n=qa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ws(e){var t=gs(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);qr(o,t.memoizedState)||(Uc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ts(e,t,n){var r=Xo,a=gs(),o=da;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!qr((Zo||a).memoizedState,n);if(s&&(a.memoizedState=n,Uc=!0),a=a.queue,Xs(Os.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Qo!==null&&!!(Qo.memoizedState.tag&1),Gs(e?9:8,{destroy:void 0},Ds.bind(null,r,a,n,t),null),e){if(r.flags|=2048,pd===null)throw Error(i(349));o||Yo&127||Es(r,t,n)}return n}function Es(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Xo.updateQueue,t===null?(t=_s(),Xo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ds(e,t,n,r){t.value=n,t.getSnapshot=r,ks(t)&&As(e)}function Os(e,t,n){return n(function(){ks(t)&&As(e)})}function ks(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qr(e,n)}catch{return!0}}function As(e){var t=Ni(e,2);t!==null&&Zd(t,e,2)}function js(e){var t=hs();if(typeof e==`function`){var n=e;if(e=n(),ts){at(!0);try{n()}finally{at(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xs,lastRenderedState:e},t}function Ms(e,t,n,r){return e.baseState=n,Cs(e,Zo,typeof r==`function`?r:xs)}function Ns(e,t,n,r,a){if(xc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};be.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ps(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ps(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=be.T,o={};o.types=a===null?null:a.types,be.T=o;try{var s=n(i,r),c=be.S;c!==null&&c(o,s),Fs(e,t,s)}catch(n){Ls(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),be.T=a}}else try{a=n(i,r),Fs(e,t,a)}catch(n){Ls(e,t,n)}}function Fs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Is(e,t,n)},function(n){return Ls(e,t,n)}):Is(e,t,n)}function Is(e,t,n){t.status=`fulfilled`,t.value=n,Rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ps(e,n)))}function Ls(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Rs(t),t=t.next;while(t!==r)}e.action=null}function Rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function zs(e,t){return t}function Bs(e,t){if(da){var n=pd.formState;if(n!==null){a:{var r=Xo;if(da){if(ua){b:{for(var i=ua,a=pa;i.nodeType!==8;)if(!a||(i=Om(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ua=Om(i.nextSibling),r=i.data===`F!`;break a}}ha(r)}r=!1}r&&(t=n[0])}}return n=hs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:t},n.queue=r,n=vc.bind(null,Xo,r),r.dispatch=n,r=js(!1),a=bc.bind(null,Xo,!1,r.queue),r=hs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ns.bind(null,Xo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Vs(e){return Hs(gs(),Zo,e)}function Hs(e,t,n){if(t=Cs(e,t,zs)[0],e=Ss(xs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=vs(t)}catch(e){throw e===no?io:e}else r=t;t=gs();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Xo.flags|=2048,Gs(9,{destroy:void 0},Us.bind(null,i,n),null)),[r,a,e]}function Us(e,t){e.action=t}function Ws(e){var t=gs(),n=Zo;if(n!==null)return Hs(t,n,e);gs(),t=t.memoizedState,n=gs();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Gs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Xo.updateQueue,t===null&&(t=_s(),Xo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ks(){return gs().memoizedState}function qs(e,t,n,r){var i=hs();Xo.flags|=e,i.memoizedState=Gs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Js(e,t,n,r){var i=gs();r=r===void 0?null:r;var a=i.memoizedState.inst;Zo!==null&&r!==null&&ss(r,Zo.memoizedState.deps)?i.memoizedState=Gs(t,a,n,r):(Xo.flags|=e,i.memoizedState=Gs(1|t,a,n,r))}function Ys(e,t){qs(8390656,8,e,t)}function Xs(e,t){Js(2048,8,e,t)}function Zs(e){Xo.flags|=4;var t=Xo.updateQueue;if(t===null)t=_s(),Xo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Qs(e){var t=gs().memoizedState;return Zs({ref:t,nextImpl:e}),function(){if(fd&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function $s(e,t){return Js(4,2,e,t)}function ec(e,t){return Js(4,4,e,t)}function tc(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function nc(e,t,n){n=n==null?null:n.concat([e]),Js(4,4,tc.bind(null,t,e),n)}function rc(){}function ic(e,t){var n=gs();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ss(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ac(e,t){var n=gs();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ss(t,r[1]))return r[0];if(r=e(),ts){at(!0);try{e()}finally{at(!1)}}return n.memoizedState=[r,t],r}function oc(e,t,n){return n===void 0||Yo&1073741824&&!(hd&261930)?e.memoizedState=t:(e.memoizedState=n,e=Yd(),Xo.lanes|=e,Cd|=e,n)}function sc(e,t,n,r){return qr(n,t)?n:No.current===null?!(Yo&106)||Yo&1073741824&&!(hd&261930)?(Uc=!0,e.memoizedState=n):(e=Yd(),Xo.lanes|=e,Cd|=e,t):(e=oc(e,n,r),qr(e,t)||(Uc=!0),e)}function cc(e,t,n,r,i){var a=xe.p;xe.p=a!==0&&8>a?a:8;var o=be.T,s={};s.types=o===null?null:o.types,be.T=s,bc(e,!1,t,n);try{var c=i(),l=be.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?yc(e,t,Xa(c,r),Jd(e)):yc(e,t,r,Jd(e))}catch(n){yc(e,t,{then:function(){},status:`rejected`,reason:n},Jd())}finally{xe.p=a,o!==null&&s.types!==null&&(o.types=s.types),be.T=o}}function lc(){}function uc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=dc(e).queue;cc(e,a,t,Se,n===null?lc:function(){return fc(e),n(r)})}function dc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Se,baseState:Se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xs,lastRenderedState:Se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function fc(e){var t=dc(e);t.next===null&&(t=e.alternate.memoizedState),yc(e,t.next.queue,{},Jd())}function pc(){return Ma(wh)}function mc(){return gs().memoizedState}function hc(){return gs().memoizedState}function gc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Jd();e=wo(n);var r=To(t,e,n);r!==null&&(Zd(r,t,n),Eo(r,t,n)),t={cache:za()},e.payload=t;return}t=t.return}}function _c(e,t,n){var r=Jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},xc(e)?Sc(t,n):(n=Mi(e,t,n,r),n!==null&&(Zd(n,e,r),Cc(n,t,r)))}function vc(e,t,n){yc(e,t,n,Jd())}function yc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(xc(e))Sc(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,qr(s,o))return ji(e,t,i,0),pd===null&&Ai(),!1}catch{}if(n=Mi(e,t,i,r),n!==null)return Zd(n,e,r),Cc(n,t,r),!0}return!1}function bc(e,t,n,r){if(r={lane:2,revertLane:Qf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},xc(e)){if(t)throw Error(i(479))}else t=Mi(e,n,r,2),t!==null&&Zd(t,e,2)}function xc(e){var t=e.alternate;return e===Xo||t!==null&&t===Xo}function Sc(e,t){es=$o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ct(e,n)}}var wc={readContext:Ma,use:ys,useCallback:os,useContext:os,useEffect:os,useImperativeHandle:os,useLayoutEffect:os,useInsertionEffect:os,useMemo:os,useReducer:os,useRef:os,useState:os,useDebugValue:os,useDeferredValue:os,useTransition:os,useSyncExternalStore:os,useId:os,useHostTransitionStatus:os,useFormState:os,useActionState:os,useOptimistic:os,useMemoCache:os,useCacheRefresh:os,useEffectEvent:os},Tc={readContext:Ma,use:ys,useCallback:function(e,t){return hs().memoizedState=[e,t===void 0?null:t],e},useContext:Ma,useEffect:Ys,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),qs(4194308,4,tc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qs(4194308,4,e,t)},useInsertionEffect:function(e,t){qs(4,2,e,t)},useMemo:function(e,t){var n=hs();t=t===void 0?null:t;var r=e();if(ts){at(!0);try{e()}finally{at(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=hs();if(n!==void 0){var i=n(t);if(ts){at(!0);try{n(t)}finally{at(!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=_c.bind(null,Xo,e),[r.memoizedState,e]},useRef:function(e){var t=hs();return e={current:e},t.memoizedState=e},useState:function(e){e=js(e);var t=e.queue,n=vc.bind(null,Xo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:rc,useDeferredValue:function(e,t){return oc(hs(),e,t)},useTransition:function(){var e=js(!1);return e=cc.bind(null,Xo,e.queue,!0,!1),hs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Xo,a=hs();if(da){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),pd===null)throw Error(i(349));hd&127||Es(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ys(Os.bind(null,r,o,e),[e]),r.flags|=2048,Gs(9,{destroy:void 0},Ds.bind(null,r,o,n,t),null),n},useId:function(){var e=hs(),t=pd.identifierPrefix;if(da){var n=ra,r=na;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ns++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=as++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:pc,useFormState:Bs,useActionState:Bs,useOptimistic:function(e){var t=hs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=bc.bind(null,Xo,!0,n),n.dispatch=t,[e,t]},useMemoCache:bs,useCacheRefresh:function(){return hs().memoizedState=gc.bind(null,Xo)},useEffectEvent:function(e){var t=hs(),n={impl:e};return t.memoizedState=n,function(){if(fd&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ec={readContext:Ma,use:ys,useCallback:ic,useContext:Ma,useEffect:Xs,useImperativeHandle:nc,useInsertionEffect:$s,useLayoutEffect:ec,useMemo:ac,useReducer:Ss,useRef:Ks,useState:function(){return Ss(xs)},useDebugValue:rc,useDeferredValue:function(e,t){return sc(gs(),Zo.memoizedState,e,t)},useTransition:function(){var e=Ss(xs)[0],t=gs().memoizedState;return[typeof e==`boolean`?e:vs(e),t]},useSyncExternalStore:Ts,useId:mc,useHostTransitionStatus:pc,useFormState:Vs,useActionState:Vs,useOptimistic:function(e,t){return Ms(gs(),Zo,e,t)},useMemoCache:bs,useCacheRefresh:hc,useEffectEvent:Qs},Dc={readContext:Ma,use:ys,useCallback:ic,useContext:Ma,useEffect:Xs,useImperativeHandle:nc,useInsertionEffect:$s,useLayoutEffect:ec,useMemo:ac,useReducer:ws,useRef:Ks,useState:function(){return ws(xs)},useDebugValue:rc,useDeferredValue:function(e,t){var n=gs();return Zo===null?oc(n,e,t):sc(n,Zo.memoizedState,e,t)},useTransition:function(){var e=ws(xs)[0],t=gs().memoizedState;return[typeof e==`boolean`?e:vs(e),t]},useSyncExternalStore:Ts,useId:mc,useHostTransitionStatus:pc,useFormState:Ws,useActionState:Ws,useOptimistic:function(e,t){var n=gs();return Zo===null?(n.baseState=e,[e,n.queue.dispatch]):Ms(n,Zo,e,t)},useMemoCache:bs,useCacheRefresh:hc,useEffectEvent:Qs};function Oc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var kc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Jd(),i=wo(r);i.payload=t,n!=null&&(i.callback=n),t=To(e,i,r),t!==null&&(Zd(t,e,r),Eo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Jd(),i=wo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=To(e,i,r),t!==null&&(Zd(t,e,r),Eo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Jd(),r=wo(n);r.tag=2,t!=null&&(r.callback=t),t=To(e,r,n),t!==null&&(Zd(t,e,n),Eo(t,e,n))}};function Ac(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Jr(n,r)||!Jr(i,a):!0}function jc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&kc.enqueueReplaceState(t,t.state,null)}function Mc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Nc(e){Ei(e)}function Pc(e){console.error(e)}function Fc(e){Ei(e)}function Ic(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Lc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Rc(e,t,n){return n=wo(n),n.tag=3,n.payload={element:null},n.callback=function(){Ic(e,t)},n}function zc(e){return e=wo(e),e.tag=3,e}function Bc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Lc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Lc(t,n,r),typeof i!=`function`&&(Fd===null?Fd=new Set([this]):Fd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Vc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ka(t,n,a,!0),n=Ro.current,n!==null){switch(n.tag){case 31:case 13:case 19:return zo===null?uf():n.alternate===null&&Sd===0&&(Sd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ao?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Mf(e,r,a)),!1;case 22:return n.flags|=65536,r===ao?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Mf(e,r,a)),!1}throw Error(i(435,n.tag))}return Mf(e,r,a),uf(),!1}if(da)return t=Ro.current,t===null?(r!==ma&&(t=Error(i(423),{cause:r}),xa(Ji(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ji(r,n),a=Rc(e.stateNode,r,a),Do(e,a),Sd!==4&&(Sd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ma&&(e=Error(i(422),{cause:r}),xa(Ji(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ji(o,n),Od===null?Od=[o]:Od.push(o),Sd!==4&&(Sd=2),t===null)return!0;r=Ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Rc(n.stateNode,r,e),Do(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(Fd===null||!Fd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=zc(a),Bc(a,e,n,r),Do(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Hc=Error(i(461)),Uc=!1;function Wc(e,t,n,r){t.child=e===null?bo(t,null,n,r):yo(t,e.child,n,r)}function Gc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ja(t),r=cs(e,t,n,o,a,i),s=fs(),e!==null&&!Uc?(ps(e,t,i),yl(e,t,i)):(da&&s&&oa(t),t.flags|=1,Wc(e,t,r,i),t.child)}function Kc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!zi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,qc(e,t,a,r,i)):(e=Hi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!bl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Jr:n,n(o,r)&&e.ref===t.ref)return yl(e,t,i)}return t.flags|=1,e=Bi(a,r),e.ref=t.ref,e.return=t,t.child=e}function qc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Jr(a,r)&&e.ref===t.ref){if(Uc=!1,t.pendingProps=r=a,bl(e,i))e.flags&131072&&(Uc=!0);else return t.lanes=e.lanes,yl(e,t,i)}}return tl(e,t,n,r,i)}function Jc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Xc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&eo(t,a===null?null:a.cachePool),a===null?Io():Fo(t,a),Ho(t);else return r=t.lanes=536870912,Xc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&eo(t,null),Io(),Uo()):(eo(t,a.cachePool),Fo(t,a),Uo(),t.memoizedState=null);return Wc(e,t,i,n),t.child}function Yc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Xc(e,t,n,r,i){var a=$a();return a=a===null?null:{parent:Ra._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&eo(t,null),Io(),Ho(t),e!==null&&ka(e,t,r,!0),t.childLanes=i,null}function Zc(e,t){return t=ul({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Qc(e,t,n){return yo(t,e.child,null,n),e=Zc(t,t.pendingProps),e.flags|=2,Wo(t),t.memoizedState=null,e}function $c(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(da){if(r.mode===`hidden`)return e=Zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Yc(null,e);if(Vo(t),(e=ua)?(e=wm(e,pa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ta===null?null:{id:na,overflow:ra},retryLane:536870912,hydrationErrors:null},n=Gi(e),n.return=t,t.child=n,la=t,ua=null)):e=null,e===null)throw ha(t);return t.lanes=536870912,null}return Zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Vo(t),a){if(t.flags&256)t.flags&=-257,t=Qc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Uc||ka(e,t,n,!1),a=(n&e.childLanes)!==0,Uc||a){if(No.current===null){if(r=pd,r!==null&&(s=wt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ni(e,s),Zd(r,e,s),Hc;uf()}t=Qc(e,t,n)}else e=o.treeContext,ua=Om(s.nextSibling),la=t,da=!0,fa=null,pa=!1,e!==null&&ca(t,e),t=Zc(t,r),t.flags|=134221824;return t}return e=Bi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function el(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function tl(e,t,n,r,i){return ja(t),n=cs(e,t,n,r,void 0,i),r=fs(),e!==null&&!Uc?(ps(e,t,i),yl(e,t,i)):(da&&r&&oa(t),t.flags|=1,Wc(e,t,n,i),t.child)}function nl(e,t,n,r,i,a){return ja(t),t.updateQueue=null,n=us(t,r,n,i),ls(e),r=fs(),e!==null&&!Uc?(ps(e,t,a),yl(e,t,a)):(da&&r&&oa(t),t.flags|=1,Wc(e,t,n,a),t.child)}function rl(e,t,n,r,i){if(ja(t),t.stateNode===null){var a=Ii,o=n.contextType;typeof o==`object`&&o&&(a=Ma(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=kc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},So(t),o=n.contextType,a.context=typeof o==`object`&&o?Ma(o):Ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Oc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&kc.enqueueReplaceState(a,a.state,null),Ao(t,r,a,i),ko(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Mc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ii,typeof u==`object`&&u&&(o=Ma(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&jc(t,a,r,o),xo=!1;var f=t.memoizedState;a.state=f,Ao(t,r,a,i),ko(),l=t.memoizedState,s||f!==l||xo?(typeof d==`function`&&(Oc(t,n,d,r),l=t.memoizedState),(c=xo||Ac(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Co(e,t),o=t.memoizedProps,u=Mc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ii,typeof l==`object`&&l&&(c=Ma(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&jc(t,a,r,c),xo=!1,f=t.memoizedState,a.state=f,Ao(t,r,a,i),ko();var p=t.memoizedState;o!==d||f!==p||xo||e!==null&&e.dependencies!==null&&Aa(e.dependencies)?(typeof s==`function`&&(Oc(t,n,s,r),p=t.memoizedState),(u=xo||Ac(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Aa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,el(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=yo(t,e.child,null,i),t.child=yo(t,null,n,i)):Wc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=yl(e,t,i),e}function il(e,t,n,r){return ya(),t.flags|=256,Wc(e,t,n,r),t.child}var al={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ol(e){return{baseLanes:e,cachePool:to()}}function sl(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Ed),e}function cl(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Go.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(da){if(i?Bo(t):Uo(),(e=ua)?(e=wm(e,pa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ta===null?null:{id:na,overflow:ra},retryLane:536870912,hydrationErrors:null},n=Gi(e),n.return=t,t.child=n,la=t,ua=null)):e=null,e===null)throw ha(t);return t.lanes=Em(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Uo(),i=t.mode,a=ul({mode:`hidden`,children:a},i),r=Ui(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=ol(n),r.childLanes=sl(e,o,n),t.memoizedState=al,Yc(null,r)):(Bo(t),ll(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return fl(e,t,a,o,r,c,s,n)}return i?(Uo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Bi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ui(i,a,n,null),i.flags|=2):i=Bi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Yc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=ol(n):(a=i.cachePool,a===null?a=to():(s=Ra._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=sl(e,o,n),t.memoizedState=al,Yc(e.child,r)):(Bo(t),n=e.child,e=n.sibling,n=Bi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function ll(e,t){return t=ul({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function ul(e,t){return e=Ri(22,e,null,t),e.lanes=0,e}function dl(e,t,n){return yo(t,e.child,null,n),e=ll(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Bo(t),t.flags&=-257,dl(e,t,c)):t.memoizedState===null?(Uo(),o=a.fallback,s=t.mode,a=ul({mode:`visible`,children:a.children},s),o=Ui(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,yo(t,e.child,null,c),a=t.child,a.memoizedState=ol(c),a.childLanes=sl(e,r,c),t.memoizedState=al,Yc(null,a)):(Uo(),t.child=e.child,t.flags|=128,null);if(Bo(t),Em(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,xa({value:a,source:null,stack:null})),dl(e,t,c)}if(Uc||ka(e,t,c,!1),r=(c&e.childLanes)!==0,Uc||r){if(No.current!==null)return dl(e,t,c);if(r=pd,r!==null&&(a=wt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ni(e,a),Zd(r,e,a),Hc;return Tm(o)||uf(),dl(e,t,c)}return Tm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ua=Om(o.nextSibling),la=t,da=!0,fa=null,pa=!1,e!==null&&ca(t,e),t=ll(t,a.children),t.flags|=134221824,t)}function pl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Da(e.return,t,n)}function ml(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Jo(n)===null&&(t=e),e=e.sibling}return t}function hl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function gl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function _l(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Go.current;if(t.flags&128)return Ko(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ko(t,o),i===`backwards`&&e!==null?(gl(e),Wc(e,t,r,n),gl(e)):Wc(e,t,r,n),r=da?Qi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pl(e,n,t);else if(e.tag===19)pl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=ml(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,gl(t)),hl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Jo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}hl(t,!0,n,null,a,r);break;case`together`:hl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=ml(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),hl(t,!1,i,n,a,r)}return t.child}function vl(e,t,n){var r=t.pendingProps;return Ta(t,t.type,r.value),Wc(e,t,r.children,n),t.child}function yl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ka(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Bi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Bi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function bl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Aa(e)))}function xl(e,t,n){switch(t.tag){case 3:Me(t,t.stateNode.containerInfo),Ta(t,Ra,e.memoizedState.cache),ya();break;case 27:case 5:Pe(t);break;case 4:Me(t,t.stateNode.containerInfo);break;case 10:Ta(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Vo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Bo(t),t.flags|=128,null;r=ka(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?cl(e,t,n):(Bo(t),e=yl(e,t,n),e===null?null:e.sibling)}Bo(t);break;case 19:if(t.flags&128)return _l(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ka(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return _l(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ko(t,Go.current),r)break;return null;case 22:return t.lanes=0,Jc(e,t,n,t.pendingProps);case 24:Ta(t,Ra,e.memoizedState.cache)}return yl(e,t,n)}function Sl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Uc=!0;else{if(!bl(e,n)&&!(t.flags&128))return Uc=!1,xl(e,t,n);Uc=!!(e.flags&131072)}}else Uc=!1,da&&t.flags&1048576&&aa(t,Qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=co(t.elementType),t.type=e,typeof e==`function`)zi(e)?(r=Mc(e,r),t.tag=1,t=rl(null,t,e,r,n)):(t.tag=0,t=tl(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===A){t.tag=11,t=Gc(null,t,e,r,n);break a}if(a===ce){t.tag=14,t=Kc(null,t,e,r,n);break a}if(a===ae){t.tag=10,t.type=e,t=vl(null,t,n);break a}}throw t=ve(e)||e,Error(i(306,t,``))}}return t;case 0:return tl(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Mc(r,t.pendingProps),rl(e,t,r,a,n);case 3:a:{if(Me(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Co(e,t),Ao(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ta(t,Ra,r),r!==o.cache&&Oa(t,[Ra],n,!0),ko(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=il(e,t,r,n);break a}if(r!==a){a=Ji(Error(i(424)),t),xa(a),t=il(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ua=Om(e.firstChild),la=t,da=!0,fa=null,pa=!0,n=bo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ya(),r===a){t=yl(e,t,n);break a}Wc(e,t,r,n)}t=t.child}return t;case 26:return el(e,t),e===null?(n=Zm(t.type,null,t.pendingProps,null))?t.memoizedState=n:da||(t.stateNode=Mp(t.type,t.pendingProps,Ae.current,t)):t.memoizedState=Zm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pe(t),e===null&&da&&(r=t.stateNode=Pm(t.type,t.pendingProps,Ae.current),la=t,pa=!0,a=ua,Vp(t.type)?(km=a,ua=Om(r.firstChild)):ua=a),Wc(e,t,t.pendingProps.children,n),el(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&da&&((a=r=ua)&&(r=Sm(r,t.type,t.pendingProps,pa),r===null?a=!1:(t.stateNode=r,la=t,ua=Om(r.firstChild),pa=!1,a=!0)),a||ha(t)),Pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Np(a,o)?r=null:s!==null&&Np(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=cs(e,t,ds,null,null,n),wh._currentValue=a),el(e,t),Wc(e,t,r,n),t.child;case 6:return e===null&&da&&((e=n=ua)&&(n=Cm(n,t.pendingProps,pa),n===null?e=!1:(t.stateNode=n,la=t,ua=null,e=!0)),e||ha(t)),null;case 13:return cl(e,t,n);case 4:return Me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yo(t,null,r,n):Wc(e,t,r,n),t.child;case 11:return Gc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,el(e,t),Wc(e,t,r,n),t.child;case 8:return Wc(e,t,t.pendingProps.children,n),t.child;case 12:return Wc(e,t,t.pendingProps.children,n),t.child;case 10:return vl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ja(t),a=Ma(a),r=r(a),t.flags|=1,Wc(e,t,r,n),t.child;case 14:return Kc(e,t,t.type,t.pendingProps,n);case 15:return qc(e,t,t.type,t.pendingProps,n);case 19:return _l(e,t,n);case 31:return $c(e,t,n);case 22:return Jc(e,t,n,t.pendingProps);case 24:return ja(t),r=Ma(Ra),e===null?(a=$a(),a===null&&(a=pd,o=za(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},So(t),Ta(t,Ra,a)):((e.lanes&n)!==0&&(Co(e,t),Ao(t,null,null,n),ko()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ta(t,Ra,r),r!==a.cache&&Oa(t,[Ra],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ta(t,Ra,r))),Wc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:da&&oa(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:el(e,t),Wc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Cl(e){e.flags|=4}function wl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?dh(t,r):dh(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(sf())e.flags|=8192;else throw lo=ao,ro}}else e.flags&=-16777217}function Tl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!fh(t)){if(sf())e.flags|=8192;else throw lo=ao,ro}}function El(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:vt(),e.lanes|=t,Dd|=t)}function Dl(e,t){if(!da)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Ol(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function kl(e,t,n){var r=t.pendingProps;switch(sa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ol(t),null;case 1:return Ol(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ea(Ra),Ne(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(va(t)?Cl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ba())),Ol(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Cl(t),o===null?(Ol(t),wl(t,a,null,r,n)):(Ol(t),Tl(t,o))):o?o===e.memoizedState?(Ol(t),t.flags&=-16777217):(Cl(t),Ol(t),Tl(t,o)):(e=e.memoizedProps,e!==r&&Cl(t),Ol(t),wl(t,a,e,r,n)),null;case 27:if(Fe(t),n=Ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Cl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ol(t),t.subtreeFlags&=-33554433,null}e=Oe.current,va(t)?ga(t,e):(e=Pm(a,r,n),t.stateNode=e,Cl(t))}return Ol(t),t.subtreeFlags&=-33554433,null;case 5:if(Fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Cl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ol(t),t.subtreeFlags&=-33554433,null}if(o=Oe.current,va(t))ga(t,o);else{var s=kp(Ae.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/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[At]=t,o[jt]=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(Sp(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&&Cl(t)}}return Ol(t),t.subtreeFlags&=-33554433,wl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Cl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ae.current,va(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=la,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[At]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||yp(e.nodeValue,n)),e||ha(t,!0)}else e=kp(e).createTextNode(r),e[At]=t,t.stateNode=e}return Ol(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=va(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[At]=t}else ya(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ol(t),e=!1}else n=ba(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Wo(t),t):(Wo(t),null);if(t.flags&128)throw Error(i(558))}return Ol(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=va(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[At]=t}else ya(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ol(t),a=!1}else a=ba(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Wo(t),t):(Wo(t),null)}return Wo(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),El(t,t.updateQueue),Ol(t),null);case 4:return Ne(),e===null&&lp(t.stateNode.containerInfo),t.flags|=67108864,Ol(t),null;case 10:return Ea(t.type),Ol(t),null;case 19:if(qo(t),r=t.memoizedState,r===null)return Ol(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Dl(r,!1);else{if(Sd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Jo(e),o!==null){for(t.flags|=128,Dl(r,!1),e=o.updateQueue,t.updateQueue=e,El(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Vi(n,e),n=n.sibling;return Ko(t,Go.current&1|2),da&&ia(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Je()>Nd&&(t.flags|=128,a=!0,Dl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Jo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,El(t,e),Dl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!da)return Ol(t),null}else 2*Je()-r.renderingStartTime>Nd&&n!==536870912&&(t.flags|=128,a=!0,Dl(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Je(),e.sibling=null,o=Go.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||da?Ko(t,o):(n=o,De(Ro,t),De(Go,n),zo===null&&(zo=t)),da&&ia(t,r.treeForkCount),e}return Ol(t),null;case 22:case 23:return Wo(t),Lo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ol(t),t.subtreeFlags&6&&(t.flags|=8192)):Ol(t),n=t.updateQueue,n!==null&&El(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&&Ee(Qa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ea(Ra),Ol(t),null;case 25:return null;case 30:return t.flags|=33554432,Ol(t),null}throw Error(i(156,t.tag))}function Al(e,t){switch(sa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ea(Ra),Ne(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Fe(t),null;case 31:if(t.memoizedState!==null){if(Wo(t),t.alternate===null)throw Error(i(340));ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ne(),null;case 10:return Ea(t.type),null;case 22:case 23:return Wo(t),Lo(),e!==null&&Ee(Qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ea(Ra),null;case 25:return null;default:return null}}function jl(e,t){switch(sa(t),t.tag){case 3:Ea(Ra),Ne();break;case 26:case 27:case 5:Fe(t);break;case 4:Ne();break;case 31:t.memoizedState!==null&&Wo(t);break;case 13:Wo(t);break;case 19:qo(t);break;case 10:Ea(t.type);break;case 22:case 23:Wo(t),Lo(),e!==null&&Ee(Qa);break;case 24:Ea(Ra)}}function Ml(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){jf(t,t.return,e)}}function Nl(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){jf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){jf(t,t.return,e)}}function Pl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Mo(t,n)}catch(t){jf(e,e.return,t)}}}function Fl(e,t,n){n.props=Mc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){jf(e,t,n)}}function Il(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:var i=e.stateNode,a=Ci(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=$p(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new em(e);m(e.child,!1,_m,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){jf(e,t,n)}}function Ll(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){jf(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){jf(e,t,n)}else n.current=null}}function Rl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)ym(e.stateNode,t[n])}function zl(e){for(var t=e.return;t!==null&&(Hl(t)&&ym(e.stateNode,t.stateNode),!Vl(t));)t=t.return}function Bl(e){for(var t=e.return;t!==null&&(Hl(t)&&bm(e.stateNode,t.stateNode),!Vl(t));)t=t.return}function Vl(e){return e.tag===5||e.tag===3||e.tag===27}function Hl(e){return e&&e.tag===7&&e.stateNode!==null}function Ul(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){jf(e,e.return,t)}}function Wl(e,t,n){try{var r=e.stateNode;wp(r,e.type,n,t),r[jt]=t}catch(t){jf(e,e.return,t)}}function Gl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vp(e.type)||e.tag===4}function Kl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gl(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&&Vp(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 ql(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Tn)),Rl(e,r),$t=!0;else if(i!==4&&(i===27&&(Rl(e,r),r=null,Vp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(ql(e,t,n,r),e=e.sibling;e!==null;)ql(e,t,n,r),e=e.sibling}function Jl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Rl(e,r),$t=!0;else if(i!==4&&(i===27&&(Rl(e,r),r=null,Vp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Jl(e,t,n,r),e=e.sibling;e!==null;)Jl(e,t,n,r),e=e.sibling}function Yl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Sp(t,r,n),t[At]=e,t[jt]=n}catch(t){jf(e,e.return,t)}}var Xl=!1,Zl=null;function Ql(e){(e.tag===30||e.subtreeFlags&33554432)&&(Xl=!0)}var $l=null;function eu(){var e=$l;return $l=null,e}var tu=0;function nu(e,t,n,r,i){return tu=0,ru(e.child,t,n,r,i)}function ru(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=qp(o);r.push(s),s.view&&(a=!0)}else a||qp(o).view&&(a=!0);Xl=!0,Wp(o,tu===0?t:t+`_`+tu,n),tu++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||ru(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function iu(e,t){for(;e!==null;)e.tag===5?Gp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||iu(e.child,t),e=e.sibling}function au(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(au(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=Ti(t.default,t.share),t!==`none`&&(nu(e,n,t,null,!1)||iu(e.child,!1))}e=e.sibling}}function ou(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=Ci(r,n),a=Ti(r.default,n.paired?r.share:r.enter);a===`none`?au(e):nu(e,i,a,null,!1)?(au(e),n.paired||t||Xd(e,r.onEnter)):iu(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ou(e,t),e=e.sibling;else au(e)}function su(e){if(Zl!==null&&Zl.size!==0){var t=Zl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=Ti(n.default,n.share);if(a!==`none`&&(nu(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Xd(e,n.onShare)):iu(e.child,!1)),t.delete(r),t.size===0)break}}}su(e)}e=e.sibling}}}function cu(e){if(e.tag===30){var t=e.memoizedProps,n=Ci(t,e.stateNode),r=Zl===null?void 0:Zl.get(n),i=Ti(t.default,r===void 0?t.exit:t.share);i!==`none`&&(nu(e,n,i,null,!1)?r===void 0?Xd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Zl.delete(n),Xd(e,t.onShare)):iu(e.child,!1)),Zl!==null&&su(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)cu(e),e=e.sibling;else Zl!==null&&su(e)}function lu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Ci(t,e.stateNode);t=Ti(t.default,t.update),e.flags&=-5,t!==`none`&&nu(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&lu(e);e=e.sibling}}function uu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,iu(e.child,!1))}uu(e)}e=e.sibling}}function du(e){if(e.tag===30)e.stateNode.paired=null,iu(e.child,!1),uu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)du(e),e=e.sibling;else uu(e)}function fu(e){for(e=e.child;e!==null;)e.tag===30?iu(e.child,!1):e.subtreeFlags&33554432&&fu(e),e=e.sibling}function pu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&tu<a.length){var l=a[tu],u=qp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Wp(c,tu===0?n:n+`_`+tu,i),s&&e.flags&4||($l===null&&($l=[]),$l.push(c,tu===0?r:r+`_`+tu,t.memoizedProps)),tu++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:pu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function mu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=Ci(n,r),a=Ti(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Jp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;tu=0,i=pu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Xd(e,n.onUpdate))}else e.subtreeFlags&33554432&&mu(e,t);e=e.sibling}}var hu=!1,gu=!1,_u=!1,vu=!1,yu=typeof WeakSet==`function`?WeakSet:Set,bu=null,xu=!1,Su=!1,Cu=!1,wu=!1;function Tu(e,t,n){if(e=e.containerInfo,Dp=Nh,e=$r(e),ei(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(Op={focusedElem:e,selectionRange:r},Nh=!1,n=(n&335544064)===n,bu=t,t=n?9270:1024;bu!==null;){if(e=bu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&cu(r[a]);if(e.alternate===null&&e.flags&2)n&&Ql(e),Eu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&cu(r),Eu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Ql(e),Eu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,bu=r):(n&&lu(e),Eu(n))}}Zl=null}function Eu(e){for(;bu!==null;){var t=bu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Mc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){jf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)xm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:xm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=Ci(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=Ti(a.default,a.update),a!==`none`&&nu(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,bu=r;break}bu=t.return}}function Du(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:qu(e,n),r&4&&Ml(5,n);break;case 1:if(qu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){jf(n,n.return,e)}else{var i=Mc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){jf(n,n.return,e)}}}r&64&&Pl(n),r&512&&Il(n,n.return);break;case 3:if(qu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Mo(e,t)}catch(e){jf(n,n.return,e)}}break;case 27:t===null&&r&4&&Yl(n);case 26:case 5:qu(e,n),t===null&&r&4&&Ul(n),r&512&&Il(n,n.return);break;case 12:qu(e,n);break;case 31:qu(e,n),r&4&&Iu(e,n);break;case 13:qu(e,n),r&4&&Lu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ff.bind(null,n),Dm(e,n))));break;case 22:if(r=n.memoizedState!==null||hu,!r){var a=t!==null&&t.memoizedState!==null||gu;t=hu,i=gu,hu=r,(gu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Yu(e,n,r)):qu(e,n),hu=t,gu=i}break;case 30:qu(e,n),r&512&&Il(n,n.return);break;case 7:r&512&&Il(n,n.return);default:qu(e,n)}}function Ou(e,t){for(e=e.child;e!==null;)ku(e,t),e=e.sibling}function ku(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){jf(e,e.return,t)}Au(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,$t=!0}catch(t){jf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Up(s,!0):Up(e.stateNode,!1)}catch(t){jf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&Ou(e,t);break;default:Ou(e,t)}}function Au(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:ku(n,r);break a;case 22:n.memoizedState===null&&Au(n,r);break a;default:Au(n,r)}}e=e.sibling}}function ju(e){var t=e.alternate;t!==null&&(e.alternate=null,ju(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Rt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Mu=null,Nu=!1;function Pu(e,t,n){for(n=n.child;n!==null;)Fu(e,t,n),n=n.sibling}function Fu(e,t,n){if(it&&typeof it.onCommitFiberUnmount==`function`)try{it.onCommitFiberUnmount(rt,n)}catch{}switch(n.tag){case 26:gu||Ll(n,t),Pu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!gu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:gu||Ll(n,t),Bl(n);var r=Mu,i=Nu;Vp(n.type)&&(Mu=n.stateNode,Nu=!1),Pu(e,t,n),Fm(n.stateNode,n.type,n.memoizedProps),Mu=r,Nu=i;break;case 5:gu||Ll(n,t),Bl(n);case 6:if(n.tag===6&&Bl(n),r=Mu,i=Nu,Mu=null,Pu(e,t,n),Mu=r,Nu=i,Mu!==null){if(Nu)try{(Mu.nodeType===9?Mu.body:Mu.nodeName===`HTML`?Mu.ownerDocument.body:Mu).removeChild(n.stateNode),$t=!0}catch(e){jf(n,t,e)}else try{Mu.removeChild(n.stateNode),$t=!0}catch(e){jf(n,t,e)}}break;case 18:Mu!==null&&(Nu?(e=Mu,Hp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),ag(e)):Hp(Mu,n.stateNode));break;case 4:r=Mu,i=Nu,Mu=n.stateNode.containerInfo,Nu=!0,Pu(e,t,n),Mu=r,Nu=i;break;case 0:case 11:case 14:case 15:Nl(2,n,t),gu||Nl(4,n,t),Pu(e,t,n);break;case 1:gu||(Ll(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Fl(n,t,r)),Pu(e,t,n);break;case 21:Pu(e,t,n);break;case 22:gu=(r=gu)||n.memoizedState!==null,Pu(e,t,n),gu=r;break;case 30:Ll(n,t),Pu(e,t,n);break;case 7:gu||Ll(n,t),Pu(e,t,n);break;default:Pu(e,t,n)}}function Iu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ag(e)}catch(e){jf(t,t.return,e)}}}function Lu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ag(e)}catch(e){jf(t,t.return,e)}}function Ru(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new yu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new yu),t;default:throw Error(i(435,e.tag))}}function zu(e,t){var n=Ru(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=If.bind(null,e,t);t.then(r,r)}})}function Bu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Vp(l.type)){Mu=l.stateNode,Nu=!1;break a}break;case 5:Mu=l.stateNode,Nu=!1;break a;case 3:case 4:Mu=l.stateNode.containerInfo,Nu=!0;break a}l=l.return}if(Mu===null)throw Error(i(160));Fu(s,c,o),Mu=null,Nu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Hu(t,e,n),t=t.sibling}var Vu=null;function Hu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Bu(t,e,n),Uu(e),a&4&&(Nl(3,e,e.return),Ml(3,e),Nl(5,e,e.return));break;case 1:Bu(t,e,n),Uu(e),a&512&&(gu||r===null||Ll(r,r.return)),a&64&&hu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Vu,Bu(t,e,n),Uu(e),a&512&&(gu||r===null||Ll(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(hu)e.stateNode=Mp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[It]||r[At]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),Sp(r,t,n),r[At]=e,Ut(r),t=r;break a;case`link`:if(o=ch(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),Sp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=ch(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),Sp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[At]=e,Ut(r),t=r}e.stateNode=t}}else hu||lh(o,e.type,e.stateNode)}else e.stateNode=P(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Wl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||gu||t.parentNode.removeChild(t)):a.count--,n===null?hu||lh(o,e.type,e.stateNode):P(o,n,e.memoizedProps))}break;case 27:Bu(t,e,n),Uu(e),a&512&&(gu||r===null||Ll(r,r.return)),r!==null&&a&4&&Wl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=_u,_u=!1,Bu(t,e,n),_u=o,Uu(e),a&512&&(gu||r===null||Ll(r,r.return)),e.flags&32){t=e.stateNode;try{_n(t,``),$t=!0}catch(t){jf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Wl(e,t,r===null?t:r.memoizedProps)),a&1024&&(vu=!0);break;case 6:if(Bu(t,e,n),Uu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,$t=!0}catch(t){jf(e,e.return,t)}}break;case 3:if($t=!1,sh=null,o=Vu,Vu=zm(t.containerInfo),Bu(t,e,n),Vu=o,Uu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{ag(t.containerInfo)}catch(t){jf(e,e.return,t)}vu&&(vu=!1,Wu(e)),$t=!1;break;case 4:a=_u,_u=hu,r=en(),o=Vu,Vu=zm(e.stateNode.containerInfo),Bu(t,e,n),Uu(e),Vu=o,$t&&Su&&(Cu=!0),$t=r,_u=a;break;case 12:Bu(t,e,n),Uu(e);break;case 31:Bu(t,e,n),Uu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,zu(e,t)));break;case 13:Bu(t,e,n),Uu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(jd=Je()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,zu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=hu,l=gu,u=_u;hu=c||o,_u=u||o,gu=l||s,Bu(t,e,n),gu=l,_u=u,hu=c,Uu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||hu||gu||(t=s||gu,n=hu,r=gu,hu=o||hu,gu=t,Ju(e,2),hu=n,gu=r),!o&&_u||Ou(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,zu(e,n))));break;case 19:Bu(t,e,n),Uu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,zu(e,t)));break;case 30:a&512&&(gu||r===null||Ll(r,r.return)),a=en(),o=Su,s=(n&335544064)===n,c=e.memoizedProps,Su=s&&Ti(c.default,c.update)!==`none`,Bu(t,e,n),Uu(e),s&&r!==null&&$t&&(e.flags|=4),Su=o,$t=a;break;case 21:break;case 7:a&512&&(gu||r===null||Ll(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Bu(t,e,n),Uu(e)}}function Uu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Hl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Vl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Jl(e,Kl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(_n(l,``),n.flags&=-33),Jl(e,Kl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;ql(e,Kl(e),u,s);break;default:throw Error(i(161))}}catch(t){jf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Wu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Wu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Nh=!0,t.reset(),Nh=!1),e=e.sibling}}function Gu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ku(t,e),t=t.sibling;else mu(t,!1)}function Ku(e,t){var n=e.alternate;if(n===null)ou(e,!1);else switch(e.tag){case 3:if(wu=xu=!1,eu(),Gu(t,e),!xu&&!Cu){if(e=$l,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Gp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),wu=!0}$l=null;break;case 5:Gu(t,e);break;case 4:r=xu,xu=!1,Gu(t,e),xu&&(Cu=!0),xu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Gu(t,e):ou(e,!1));break;case 30:r=xu,i=eu(),xu=!1,Gu(t,e),xu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=Ci(a,o),o=Ci(n.memoizedProps,o);var s=Ti(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,tu=0,t=pu(e,n,t,o,s,a,!0),tu!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Xd(e,e.memoizedProps.onUpdate),$l=i):i!==null&&(i.push.apply(i,$l),$l=i),xu=e.flags&32?!0:r;break;default:Gu(t,e)}}function qu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Du(e,t.alternate,t),t=t.sibling}function Ju(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Nl(4,n,n.return),Ju(n,r);break;case 1:Ll(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Fl(n,n.return,i),Ju(n,r);break;case 27:r&2&&Fm(n.stateNode,n.type,n.memoizedProps);case 5:Ll(n,n.return),n.tag!==5&&n.tag!==27||Bl(n),Ju(n,r);break;case 6:Bl(n);break;case 26:Ll(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||gu||i.parentNode.removeChild(i),Ju(n,r);break;case 22:n.memoizedState===null&&Ju(n,r);break;case 30:Ll(n,n.return),Ju(n,r);break;case 7:Ll(n,n.return);default:Ju(n,r)}e=e.sibling}}function Yu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Yu(i,a,n),Ml(4,a);break;case 1:if(Yu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){jf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)jo(l[i],c)}catch(e){jf(r,r.return,e)}}s&&o&64&&Pl(a),Il(a,a.return);break;case 27:n&2&&Yl(a);case 5:a.tag!==5&&a.tag!==27||zl(a),Yu(i,a,n),s&&r===null&&o&4&&Ul(a),Il(a,a.return);break;case 6:zl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||hu||lh(zm(c.ownerDocument),a.type,c),Yu(i,a,n),s&&r===null&&o&4&&Ul(a),Il(a,a.return);break;case 12:Yu(i,a,n);break;case 31:Yu(i,a,n),s&&o&4&&Iu(i,a);break;case 13:Yu(i,a,n),s&&o&4&&Lu(i,a);break;case 22:a.memoizedState===null&&Yu(i,a,n),Il(a,a.return);break;case 30:Yu(i,a,n),Il(a,a.return);break;case 7:Il(a,a.return);default:Yu(i,a,n)}t=t.sibling}}function Xu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ba(n))}function Zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ba(e))}function Qu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)$u(e,t,n,r),t=t.sibling;else i&&fu(t)}function $u(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&du(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Qu(e,t,n,r),a&2048&&Ml(9,t);break;case 1:Qu(e,t,n,r);break;case 3:Qu(e,t,n,r),i&&wu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ba(a)));break;case 12:if(a&2048){Qu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){jf(t,t.return,e)}}else Qu(e,t,n,r);break;case 31:Qu(e,t,n,r);break;case 13:Qu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&du(t),o._visibility&2?Qu(e,t,n,r):(o._visibility|=2,ed(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&du(s),o._visibility&2?Qu(e,t,n,r):td(e,t)),a&2048&&Xu(s,t);break;case 24:Qu(e,t,n,r),a&2048&&Zu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(iu(a.child,!0),iu(t.child,!0))),Qu(e,t,n,r);break;default:Qu(e,t,n,r)}}function ed(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:ed(a,o,s,c,i),Ml(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,ed(a,o,s,c,i)):u._visibility&2?ed(a,o,s,c,i):td(a,o),i&&l&2048&&Xu(o.alternate,o);break;case 24:ed(a,o,s,c,i),i&&l&2048&&Zu(o.alternate,o);break;default:ed(a,o,s,c,i)}t=t.sibling}}function td(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:td(n,r),i&2048&&Xu(r.alternate,r);break;case 24:td(n,r),i&2048&&Zu(r.alternate,r);break;default:td(n,r)}t=t.sibling}}var nd=8192;function rd(e,t,n){if(e.subtreeFlags&nd)for(e=e.child;e!==null;)id(e,t,n),e=e.sibling}function id(e,t,n){switch(e.tag){case 26:rd(e,t,n),e.flags&nd&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&mh(n,e)):hh(n,Vu,e.memoizedState,e.memoizedProps));break;case 5:rd(e,t,n),e.flags&nd&&(e=e.stateNode,(t&335544128)===t&&mh(n,e));break;case 3:case 4:var r=Vu;Vu=zm(e.stateNode.containerInfo),rd(e,t,n),Vu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=nd,nd=16777216,rd(e,t,n),nd=r):rd(e,t,n));break;case 30:if((e.flags&nd)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Zl===null&&(Zl=new Map),Zl.set(r,i)}rd(e,t,n);break;default:rd(e,t,n)}}function ad(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function od(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];bu=r,ld(r,e)}ad(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)sd(e),e=e.sibling}function sd(e){switch(e.tag){case 0:case 11:case 15:od(e),e.flags&2048&&Nl(9,e,e.return);break;case 3:od(e);break;case 12:od(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cd(e)):od(e);break;default:od(e)}}function cd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];bu=r,ld(r,e)}ad(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nl(8,t,t.return),cd(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,cd(t));break;default:cd(t)}e=e.sibling}}function ld(e,t){for(;bu!==null;){var n=bu;switch(n.tag){case 0:case 11:case 15:Nl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ba(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,bu=r;else a:for(n=e;bu!==null;){r=bu;var i=r.sibling,a=r.return;if(ju(r),r===n){bu=null;break a}if(i!==null){i.return=a,bu=i;break a}bu=a}}}var ud={getCacheForType:function(e){var t=Ma(Ra),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ma(Ra).controller.signal}},dd=typeof WeakMap==`function`?WeakMap:Map,fd=0,pd=null,md=null,hd=0,gd=0,_d=null,vd=!1,yd=!1,bd=!1,xd=0,Sd=0,Cd=0,wd=0,Td=0,Ed=0,Dd=0,Od=null,kd=null,Ad=!1,jd=0,Md=0,Nd=1/0,Pd=null,Fd=null,Id=0,Ld=null,Rd=null,zd=0,Bd=0,Vd=null,Hd=null,Ud=null,Wd=null,Gd=null,Kd=0,qd=null;function Jd(){return fd&2&&hd!==0?hd&-hd:be.T===null?Dt():Qf()}function Yd(){if(Ed===0){if(!(hd&536870912)||da){var e=dt;dt<<=1,!(dt&3932160)&&(dt=262144),Ed=e}else Ed=536870912}return e=Ro.current,e!==null&&(e.flags|=32),Ed}function Xd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=$p(Ci(e.memoizedProps,n))),Wd===null&&(Wd=[]),Wd.push(t.bind(null,r))}}function Zd(e,t,n){(e===pd&&(gd===2||gd===9)||e.cancelPendingCommit!==null)&&(af(e,0),tf(e,hd,Ed,!1)),bt(e,n),fd&2&&e===pd||(e===pd&&(!(fd&2)&&(wd|=n),Sd===4&&tf(e,hd,Ed,!1)),Wf(e))}function Qd(e,t,n){if(fd&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ht(e,t),a=r?pf(e,t):df(e,t,!0),o=r;do{if(a===0){yd&&!r&&tf(e,t,0,!1);break}if(n=e.current.alternate,o&&!ef(n))a=df(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Od;var l=c.current.memoizedState.isDehydrated;if(l&&(af(c,s).flags|=256),s=df(c,s,!1),s!==2&&s!==6){if(bd&&!l){c.errorRecoveryDisabledLanes|=o,wd|=o,a=4;break a}o=kd,kd=a,o!==null&&(kd===null?kd=o:kd.push.apply(kd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){af(e,0),tf(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:tf(r,t,Ed,!vd);break a;case 2:kd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=jd+300-Je(),10<a)){if(tf(r,t,Ed,!vd),mt(r,0,!0)!==0)break a;zd=t,r.timeoutHandle=Ip($d.bind(null,r,n,kd,Pd,Ad,t,Ed,wd,Dd,vd,o,`Throttled`,-0,0),a);break a}$d(r,n,kd,Pd,Ad,t,Ed,wd,Dd,vd,o,null,-0,0)}break}}while(1);Wf(e)}function $d(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Tn},Zl=null,id(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=yh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?jd-Je():(a&4194048)===a?Md-Je():0,m=_h(d,m),m!==null)?(zd=a,e.cancelPendingCommit=m(bf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),tf(e,a,o,!l)):bf(e,t,a,n,r,i,o,s,c,l,u,d)}function ef(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!qr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function tf(e,t,n,r){t=gt(e,t),t&=~Td,t&=~wd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ot(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&St(e,n,t)}function nf(){return fd&6?!0:(Gf(0,!1),!1)}function rf(){if(md!==null){if(gd===0)var e=md.return;else e=md,wa=Ca=null,ms(e),po=null,mo=0,e=md;for(;e!==null;)jl(e.alternate,e),e=e.return;md=null}}function af(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,tee(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),zd=0,rf(),pd=e,md=n=Bi(e.current,null),hd=t,gd=0,_d=null,vd=!1,yd=ht(e,t),bd=!1,Dd=Ed=Td=wd=Cd=Sd=0,kd=Od=null,Ad=!1,xd=gt(e,t),Ai(),n}function of(e,t){Xo=null,be.H=wc,t===no||t===io?(t=uo(),gd=3):t===ro?(t=uo(),gd=4):gd=t===Hc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,_d=t,md===null&&(Sd=1,Ic(e,Ji(t,e.current)))}function sf(){var e=Ro.current;return e===null?!0:(hd&4194048)===hd?zo===null:(hd&62914560)===hd||hd&536870912?e===zo:!1}function cf(){var e=be.H;return be.H=wc,e===null?wc:e}function lf(){var e=be.A;return be.A=ud,e}function uf(){Sd=4,vd||(hd&4194048)!==hd&&Ro.current!==null||(yd=!0),!(Cd&134217727)&&!(wd&134217727)||pd===null||tf(pd,hd,Ed,!1)}function df(e,t,n){var r=fd;fd|=2;var i=cf(),a=lf();(pd!==e||hd!==t)&&(Pd=null,af(e,t)),t=!1;var o=Sd;a:do try{if(gd!==0&&md!==null){var s=md,c=_d;switch(gd){case 8:rf(),o=6;break a;case 3:case 2:case 9:case 6:Ro.current===null&&(t=!0);var l=gd;if(gd=0,_d=null,_f(e,s,c,l),n&&yd){o=0;break a}break;default:l=gd,gd=0,_d=null,_f(e,s,c,l)}}ff(),o=Sd;break}catch(t){of(e,t)}while(1);return t&&e.shellSuspendCounter++,wa=Ca=null,fd=r,be.H=i,be.A=a,md===null&&(pd=null,hd=0,Ai()),o}function ff(){for(;md!==null;)hf(md)}function pf(e,t){var n=fd;fd|=2;var r=cf(),a=lf();pd!==e||hd!==t?(Pd=null,Nd=Je()+500,af(e,t)):yd=ht(e,t);a:do try{if(gd!==0&&md!==null){t=md;var o=_d;b:switch(gd){case 1:gd=0,_d=null,_f(e,t,o,1);break;case 2:case 9:if(oo(o)){gd=0,_d=null,gf(t);break}t=function(){gd!==2&&gd!==9||pd!==e||(gd=7),Wf(e)},o.then(t,t);break a;case 3:gd=7;break a;case 4:gd=5;break a;case 7:oo(o)?(gd=0,_d=null,gf(t)):(gd=0,_d=null,_f(e,t,o,7));break;case 5:var s=null;switch(md.tag){case 26:s=md.memoizedState;case 5:case 27:var c=md;if(s?fh(s):c.stateNode.complete){gd=0,_d=null;var l=c.sibling;if(l!==null)md=l;else{var u=c.return;u===null?md=null:(md=u,vf(u))}break b}}gd=0,_d=null,_f(e,t,o,5);break;case 6:gd=0,_d=null,_f(e,t,o,6);break;case 8:rf(),Sd=6;break a;default:throw Error(i(462))}}mf();break}catch(t){of(e,t)}while(1);return wa=Ca=null,be.H=r,be.A=a,fd=n,md===null?(pd=null,hd=0,Ai(),Sd):0}function mf(){for(;md!==null&&!Ke();)hf(md)}function hf(e){var t=Sl(e.alternate,e,xd);e.memoizedProps=e.pendingProps,t===null?vf(e):md=t}function gf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=nl(n,t,t.pendingProps,t.type,void 0,hd);break;case 11:t=nl(n,t,t.pendingProps,t.type.render,t.ref,hd);break;case 5:ms(t);var r=t;r===la&&(da?(_a(r),r.tag===5&&r.stateNode!=null&&(ua=r.stateNode)):(_a(r),da=!0));default:jl(n,t),t=md=Vi(t,xd),t=Sl(n,t,xd)}e.memoizedProps=e.pendingProps,t===null?vf(e):md=t}function _f(e,t,n,r){wa=Ca=null,ms(t),po=null,mo=0;var i=t.return;try{if(Vc(e,i,t,n,hd)){Sd=1,Ic(e,Ji(n,e.current)),md=null;return}}catch(t){if(i!==null)throw md=i,t;Sd=1,Ic(e,Ji(n,e.current)),md=null;return}t.flags&32768?(da||r===1?e=!0:yd||hd&536870912?e=!1:(vd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),yf(t,e)):vf(t)}function vf(e){var t=e;do{if(t.flags&32768){yf(t,vd);return}e=t.return;var n=kl(t.alternate,t,xd);if(n!==null){md=n;return}if(t=t.sibling,t!==null){md=t;return}md=t=e}while(t!==null);Sd===0&&(Sd=5)}function yf(e,t){do{var n=Al(e.alternate,e);if(n!==null){n.flags&=32767,md=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){md=e;return}md=e=n}while(e!==null);Sd=6,md=null}function bf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do Of();while(Id!==0);if(fd&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===pd&&(md=pd=null,hd=0),Rd=t,Ld=e,zd=n,Vd=a,Hd=r,xf(e,t,n,s,c,l,f)}}function xf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Bd=s,s|=ki,xt(e,n,s,r,i,a),Wd=null,(n&335544064)===n?(Gd=Ua(e),r=10262):(Gd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Lf(Qe,function(){return kf(),null})):(e.callbackNode=null,e.callbackPriority=0),Xl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=be.T,be.T=null,i=xe.p,xe.p=2,a=fd,fd|=4;try{Tu(e,t,n)}finally{fd=a,xe.p=i,be.T=r}}Id=1,Xl?Ud=Zp(o,e.containerInfo,Gd,wf,Tf,Cf,Ef,kf,Sf,null,null):(wf(),Tf(),Ef())}function Sf(e){if(Id!==0){var t=Ld.onRecoverableError;t(e,{componentStack:null})}}function Cf(){Id===3&&(Id=0,Ku(Rd,Ld),Id=4)}function wf(){if(Id===1){Id=0;var e=Ld,t=Rd,n=zd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=be.T,be.T=null;var i=xe.p;xe.p=2;var a=fd;fd|=4;try{Su=Cu=!1,Hu(t,e,n),n=Op;var o=$r(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Qr(s.ownerDocument.documentElement,s)){if(c!==null&&ei(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Zr(s,h),v=Zr(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;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Nh=!!Dp,Op=Dp=null}finally{fd=a,xe.p=i,be.T=r}}e.current=t,Id=2}}function Tf(){if(Id===2){Id=0;var e=Ld,t=Rd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=be.T,be.T=null;var r=xe.p;xe.p=2;var i=fd;fd|=4;try{Du(e,t.alternate,t)}finally{fd=i,xe.p=r,be.T=n}}Id=3}}function Ef(){if(Id===4||Id===3){Id=0;var e=Ud;Ud=null,qe();var t=Ld,n=Rd,r=zd,i=Hd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Id=5:(Id=0,Rd=Ld=null,Df(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Fd=null),Et(r),n=n.stateNode,it&&typeof it.onCommitFiberRoot==`function`)try{it.onCommitFiberRoot(rt,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=be.T,a=xe.p,xe.p=2,be.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{be.T=n,xe.p=a}}if(i=Wd,o=Gd,Gd=null,i!==null&&(Wd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);zd&3&&Of(),Wf(t),a=t.pendingLanes,r&261930&&a&42?t===qd?Kd++:(Kd=0,qd=t):(Kd=0,qd=null),Gf(0,!1)}}function Df(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ba(t)))}function Of(){return Ud!==null&&(Ud.skipTransition(),Ud=null),wf(),Tf(),Ef(),kf()}function kf(){if(Id!==5)return!1;var e=Ld,t=Bd;Bd=0;var n=Et(zd),r=be.T,a=xe.p;try{xe.p=32>n?32:n,be.T=null,n=Vd,Vd=null;var o=Ld,s=zd;if(Id=0,Rd=Ld=null,zd=0,fd&6)throw Error(i(331));var c=fd;if(fd|=4,sd(o.current),$u(o,o.current,s,n),fd=c,Gf(0,!1),it&&typeof it.onPostCommitFiberRoot==`function`)try{it.onPostCommitFiberRoot(rt,o)}catch{}return!0}finally{xe.p=a,be.T=r,Df(e,t)}}function Af(e,t,n){t=Ji(n,t),t=Rc(e.stateNode,t,2),e=To(e,t,2),e!==null&&(bt(e,2),Wf(e))}function jf(e,t,n){if(e.tag===3)Af(e,e,n);else for(;t!==null;){if(t.tag===3){Af(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Fd===null||!Fd.has(r))){e=Ji(n,e),n=zc(2),r=To(t,n,2),r!==null&&(Bc(n,r,t,e),bt(r,2),Wf(r));break}}t=t.return}}function Mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new dd;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)||(bd=!0,i.add(n),e=Nf.bind(null,e,t,n),t.then(e,e))}function Nf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,pd===e&&(hd&n)===n&&(Sd===4||Sd===3&&(hd&62914560)===hd&&300>Je()-jd?fd&2?Td|=n:af(e,0):Td|=n,Dd===hd&&(Dd=0)),Wf(e)}function Pf(e,t){t===0&&(t=vt()),e=Ni(e,t),e!==null&&(bt(e,t),Wf(e))}function Ff(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Pf(e,n)}function If(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),Pf(e,n)}function Lf(e,t){return We(e,t)}var Rf=null,zf=null,Bf=!1,Vf=!1,Hf=!1,Uf=0;function Wf(e){e!==zf&&e.next===null&&(zf===null?Rf=zf=e:zf=zf.next=e),Vf=!0,Bf||(Bf=!0,Zf())}function Gf(e,t){if(!Hf&&Vf){Hf=!0;do for(var n=!1,r=Rf;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-ot(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Xf(r,a))}else a=hd,a=mt(r,r===pd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ht(r,a)||(n=!0,Xf(r,a))}r=r.next}while(n);Hf=!1}}function Kf(){qf()}function qf(){Vf=Bf=!1;var e=0;Uf!==0&&Fp()&&(e=Uf);for(var t=Je(),n=null,r=Rf;r!==null;){var i=r.next,a=Jf(r,t);a===0?(r.next=null,n===null?Rf=i:n.next=i,i===null&&(zf=n)):(n=r,(e!==0||a&3)&&(Vf=!0)),r=i}Id!==0&&Id!==5||Gf(e,!1),Uf!==0&&(Uf=0)}function Jf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ot(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=_t(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=pd,n=hd,n=mt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(gd===2||gd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ge(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ht(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ge(r),Et(n)){case 2:case 8:n=Ze;break;case 32:n=Qe;break;case 268435456:n=et;break;default:n=Qe}return r=Yf.bind(null,e),n=We(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ge(r),e.callbackPriority=2,e.callbackNode=null,2}function Yf(e,t){if(Id!==0&&Id!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Of()&&e.callbackNode!==n)return null;var r=hd;return r=mt(e,e===pd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Qd(e,r,t),Jf(e,Je()),e.callbackNode!=null&&e.callbackNode===n?Yf.bind(null,e):null)}function Xf(e,t){if(Of())return null;Qd(e,t,!0)}function Zf(){zp(function(){fd&6?We(Xe,Kf):qf()})}function Qf(){if(Uf===0){var e=Ka;e===0&&(e=ut,ut<<=1,!(ut&261888)&&(ut=256)),Uf=e}return Uf}function $f(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:wn(e)}function ep(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=$f((i[jt]||null).action),o=r.submitter;o&&(t=(t=o[jt]||null)?$f(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Kn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Uf!==0){var e=new FormData(i,o);uc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),uc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var tp=0;tp<bi.length;tp++){var np=bi[tp];xi(np.toLowerCase(),`on`+(np[0].toUpperCase()+np.slice(1)))}xi(fi,`onAnimationEnd`),xi(pi,`onAnimationIteration`),xi(mi,`onAnimationStart`),xi(`dblclick`,`onDoubleClick`),xi(`focusin`,`onFocus`),xi(`focusout`,`onBlur`),xi(hi,`onTransitionRun`),xi(gi,`onTransitionStart`),xi(_i,`onTransitionCancel`),xi(vi,`onTransitionEnd`),Jt(`onMouseEnter`,[`mouseout`,`mouseover`]),Jt(`onMouseLeave`,[`mouseout`,`mouseover`]),Jt(`onPointerEnter`,[`pointerout`,`pointerover`]),Jt(`onPointerLeave`,[`pointerout`,`pointerover`]),qt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),qt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),qt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),qt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),qt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),qt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var rp=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),ip=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(rp));function ap(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ei(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ei(e)}i.currentTarget=null,a=c}}}}function op(e,t){var n=t[Nt];n===void 0&&(n=t[Nt]=new Set);var r=e+`__bubble`;n.has(r)||(up(t,e,2,!1),n.add(r))}function sp(e,t,n){var r=0;t&&(r|=4),up(n,e,r,t)}var cp=`_reactListening`+Math.random().toString(36).slice(2);function lp(e){if(!e[cp]){e[cp]=!0,Gt.forEach(function(t){t!==`selectionchange`&&(ip.has(t)||sp(t,!1,e),sp(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cp]||(t[cp]=!0,sp(`selectionchange`,!1,t))}}function up(e,t,n,r){switch(Bh(t)){case 2:var i=Ph;break;case 8:i=Fh;break;default:i=Ih}n=i.bind(null,t,n,e),i=void 0,!Fn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function dp(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=zt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Mn(function(){var r=a,i=Dn(n),s=[];a:{var c=yi.get(e);if(c!==void 0){var l=Kn,u=e;switch(e){case`keypress`:if(Vn(n)===0)break a;case`keydown`:case`keyup`:l=ur;break;case`focusin`:u=`focus`,l=tr;break;case`focusout`:u=`blur`,l=tr;break;case`beforeblur`:case`afterblur`:l=tr;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=$n;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=er;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=pr;break;case fi:case pi:case mi:l=nr;break;case vi:l=mr;break;case`scroll`:case`scrollend`:l=Jn;break;case`wheel`:l=hr;break;case`copy`:case`cut`:case`paste`:l=rr;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=dr;break;case`submit`:l=fr;break;case`toggle`:case`beforetoggle`:l=gr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Nn(m,p),g!=null&&d.push(fp(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==En&&(u=n.relatedTarget||n.fromElement)&&(zt(u)||u[Mt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?zt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=$n,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=dr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Vt(c),h=l==null?u:Vt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,zt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,mp):null,c!==null&&hp(s,u,c,d,!1),l!==null&&f!==null&&hp(s,f,l,d,!0)))}a:{if(c=r?Vt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Fr;else if(kr(c)){if(Ir)_=Gr;else{_=Ur;var v=Hr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&xn(r.elementType)&&(_=Fr):_=Wr;if(_&&=_(e,r)){Ar(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Vt(r):window,e){case`focusin`:(kr(v)||v.contentEditable===`true`)&&(ni=v,ri=r,ii=null);break;case`focusout`:ii=ri=ni=null;break;case`mousedown`:ai=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ai=!1,oi(s,n,i);break;case`selectionchange`:if(ti)break;case`keydown`:case`keyup`:oi(s,n,i)}var y;if(vr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else Tr?Cr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(br&&n.locale!==`ko`&&(Tr||b!==`onCompositionStart`?b===`onCompositionEnd`&&Tr&&(y=Bn()):(Ln=i,Rn=`value`in Ln?Ln.value:Ln.textContent,Tr=!0)),v=pp(r,b),0<v.length&&(b=new ir(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=wr(n),y!==null&&(b.data=y)))),(y=eee?Er(e,n):Dr(e,n))&&(b=pp(r,`onBeforeInput`),0<b.length&&(v=new ir(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),ep(s,e,r,n,i)}ap(s,t)})}function fp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function pp(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Nn(e,n),i!=null&&r.unshift(fp(e,i,a)),i=Nn(e,t),i!=null&&r.push(fp(e,i,a))),e.tag===3)return r;e=e.return}return[]}function mp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function hp(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Nn(n,a),l!=null&&o.unshift(fp(n,l,c))):i||(l=Nn(n,a),l!=null&&o.push(fp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var gp=/\r\n?/g,_p=/\u0000|\uFFFD/g;function vp(e){return(typeof e==`string`?e:``+e).replace(gp,`
|
|
9
|
+
`).replace(_p,``)}function yp(e,t){return t=vp(t),vp(e)===t}function bp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||_n(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&_n(e,``+r);else return;break;case`className`:nn(e,`class`,r);break;case`tabIndex`:nn(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:nn(e,n,r);break;case`style`:bn(e,r,o);return;case`data`:if(t!==`object`){nn(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=wn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&bp(e,t,`name`,a.name,a,null),bp(e,t,`formEncType`,a.formEncType,a,null),bp(e,t,`formMethod`,a.formMethod,a,null),bp(e,t,`formTarget`,a.formTarget,a,null)):(bp(e,t,`encType`,a.encType,a,null),bp(e,t,`method`,a.method,a,null),bp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=wn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Tn);return;case`onScroll`:r!=null&&op(`scroll`,e);return;case`onScrollEnd`:r!=null&&op(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=wn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:op(`beforetoggle`,e),op(`toggle`,e),tn(e,`popover`,r);break;case`xlinkActuate`:rn(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:rn(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:rn(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:rn(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:rn(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:rn(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:rn(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:rn(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:rn(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:tn(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=Sn.get(n)||n,tn(e,n,r);else return}$t=!0}function xp(e,t,n,r,a,o){switch(n){case`style`:bn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)_n(e,r);else if(typeof r==`number`||typeof r==`bigint`)_n(e,``+r);else return;break;case`onScroll`:r!=null&&op(`scroll`,e);return;case`onScrollEnd`:r!=null&&op(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=Tn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Kt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[jt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}$t=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):tn(e,n,r)}return}$t=!0}function Sp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:op(`error`,e),op(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:bp(e,t,o,s,n,null)}}a&&bp(e,t,`srcSet`,n.srcSet,n,null),r&&bp(e,t,`src`,n.src,n,null);return;case`input`:op(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:bp(e,t,r,d,n,null)}}fn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in op(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:bp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&mn(e,!!r,n,!0):mn(e,!!r,t,!1);return;case`textarea`:for(s in op(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:bp(e,t,s,c,n,null)}gn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:bp(e,t,l,r,n,null)}return;case`dialog`:op(`beforetoggle`,e),op(`toggle`,e),op(`cancel`,e),op(`close`,e);break;case`iframe`:case`object`:op(`load`,e);break;case`video`:case`audio`:for(r=0;r<rp.length;r++)op(rp[r],e);break;case`image`:op(`error`,e),op(`load`,e);break;case`details`:op(`toggle`,e);break;case`embed`:case`source`:case`link`:op(`error`,e),op(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:bp(e,t,u,r,n,null)}return;default:if(xn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&xp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&bp(e,t,c,r,n,null))}var Cp={};function wp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||bp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&($t=!0),o=m;break;case`name`:m!==f&&($t=!0),a=m;break;case`checked`:m!==f&&($t=!0),u=m;break;case`defaultChecked`:m!==f&&($t=!0),d=m;break;case`value`:m!==f&&($t=!0),s=m;break;case`defaultValue`:m!==f&&($t=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&bp(e,t,p,m,r,f)}}dn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||bp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&($t=!0),p=o;break;case`defaultValue`:o!==l&&($t=!0),c=o;break;case`multiple`:o!==l&&($t=!0),s=o;default:o!==l&&bp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?mn(e,!!n,n?[]:``,!1):mn(e,!!n,t,!0)):mn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:bp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&($t=!0),p=a;break;case`defaultValue`:a!==o&&($t=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&bp(e,t,s,a,r,o)}hn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:bp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&($t=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:bp(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&bp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:bp(e,t,u,p,r,m)}return;default:if(xn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&xp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||xp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&bp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||bp(e,t,f,p,r,m)}function Tp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ep(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Tp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Tp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Dp=null,Op=null;function kp(e){return e.nodeType===9?e:e.ownerDocument}function Ap(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function jp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Mp(e,t,n,r){return n=kp(n).createElement(e),n[At]=r,n[jt]=t,Sp(n,e,t),Ut(n),n}function Np(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Pp=null;function Fp(){var e=window.event;return e&&e.type===`popstate`?e!==Pp&&(Pp=e,!0):(Pp=null,!1)}var Ip=typeof setTimeout==`function`?setTimeout:void 0,tee=typeof clearTimeout==`function`?clearTimeout:void 0,Lp=typeof Promise==`function`?Promise:void 0,Rp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Ip,zp=typeof queueMicrotask==`function`?queueMicrotask:Lp===void 0?Ip:function(e){return Lp.resolve(null).then(e).catch(Bp)};function Bp(e){setTimeout(function(){throw e})}function Vp(e){return e===`head`}function Hp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),ag(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Im(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Im(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[It]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Im(e.ownerDocument.body)}n=i}while(n);ag(t)}function Up(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Wp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Gp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function qp(e){return Kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Kp(t,n,e)}function Yp(e){return e.documentElement.clientHeight}function Xp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Zp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Yp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=ph(f),u>gh){s.length=o;break}f=new Promise(Xp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Qp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Qp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Qp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Qp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function $p(e){return{name:e,group:new Qp(`group`,e),imagePair:new Qp(`image-pair`,e),old:new Qp(`old`,e),new:new Qp(`new`,e)}}function em(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}em.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(am(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=rm(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,tm,e,s,r)}this._eventListeners=a}};function tm(e,t,n,r){return b(e).addEventListener(t,n,r),!1}em.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=am(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=rm(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,nm,e,n,i),r.splice(t,1),a!==null&&a()}};function nm(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function rm(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function im(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function am(e,t,n,r){if(e.length===0)return-1;r=im(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&im(a.optionsOrUseCapture)===r)return i}return-1}em.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,rm(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,rm(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},em.prototype.focus=function(e){m(this._fragmentFiber.child,!0,om,e,void 0,void 0)};function om(e,t){return e.tag!==6&&(e=b(e),Mm(e,t))}em.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,sm,t,void 0,void 0);for(var n=t.length-1;0<=n&&!om(t[n],e);n--);};function sm(e,t){return t.push(e),!1}em.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=kp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,cm,e,void 0,void 0))};function cm(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}em.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,lm,e,void 0,void 0)};function lm(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}em.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,um,e,void 0,void 0);for(var n=t=0;n<dm.length;n++){var r=dm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):dm[t++]=r}dm.length=t}};function um(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var dm=[],fm=!1;function pm(e,t,n){dm.push({fragmentInstance:e,observer:t,instance:n}),fm||(fm=!0,Nm(function(){fm=!1;var e=dm;dm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}em.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,mm,e,void 0,void 0),e};function mm(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}em.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},em.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,sm,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||hm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function hm(e,t,n,r,i){var a=zt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function gm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}em.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,sm,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),gm(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),gm(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function _m(e,t){return e=b(e),vm(e,t),!1}function vm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function ym(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,rm(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<dm.length;i++){var a=dm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(dm[r++]=a)}dm.length=r,n.observe(e)}),vm(e,t))}function bm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,rm(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?pm(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function xm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:xm(n),Rt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function Sm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[It])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Om(e.nextSibling),e===null)break}return null}function Cm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Om(e.nextSibling),e===null))return null;return e}function wm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Om(e.nextSibling),e===null))return null;return e}function Tm(e){return e.data===`$?`||e.data===`$~`}function Em(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function Dm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function Om(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var km=null;function Am(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Om(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function jm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Mm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function Nm(e){Rp(function(){Rp(function(t){return e(t)})})}function Pm(e,t,n){switch(t=kp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Fm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&bp(e,t,r,null,Cp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===Tn&&(e.onclick=null),Rt(e)}function Im(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Rt(e)}var Lm=new Map,Rm=new Set;function zm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Bm=xe.d;xe.d={f:Vm,r:Hm,D:N,C:Gm,L:Km,m:qm,X:Ym,S:Jm,M:Xm};function Vm(){var e=Bm.f(),t=nf();return e||t}function Hm(e){var t=Bt(e);t!==null&&t.tag===5&&t.type===`form`?fc(t):Bm.r(e)}var Um=typeof document>`u`?null:document;function Wm(e,t,n){var r=Um;if(r&&typeof t==`string`&&t){var i=un(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Rm.has(i)||(Rm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Sp(t,`link`,e),Ut(t),r.head.appendChild(t)))}}function N(e){Bm.D(e),Wm(`dns-prefetch`,e,null)}function Gm(e,t){Bm.C(e,t),Wm(`preconnect`,e,t)}function Km(e,t,n){Bm.L(e,t,n);var r=Um;if(r&&e&&t){var i=`link[rel="preload"][as="`+un(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+un(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+un(n.imageSizes)+`"]`)):i+=`[href="`+un(e)+`"]`;var a=i;switch(t){case`style`:a=Qm(e);break;case`script`:a=nh(e)}if(!(Lm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Lm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector($m(a))||t===`script`&&r.querySelector(rh(a))))){var o=r.createElement(`link`);Sp(o,`link`,e),t===`style`&&(o[Lt]=!0,o.onload=o.onerror=function(){Wt(o)}),Ut(o),r.head.appendChild(o)}}}function qm(e,t){Bm.m(e,t);var n=Um;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+un(r)+`"][href="`+un(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=nh(e)}if(!Lm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),Lm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(rh(a)))return}r=n.createElement(`link`),Sp(r,`link`,e),Ut(r),n.head.appendChild(r)}}}function Jm(e,t,n){Bm.S(e,t,n);var r=Um;if(r&&e){var i=Ht(r).hoistableStyles,a=Qm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector($m(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Lm.get(a))&&ah(e,n);var c=o=r.createElement(`link`);Ut(c),Sp(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,ih(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Ym(e,t){Bm.X(e,t);var n=Um;if(n&&e){var r=Ht(n).hoistableScripts,i=nh(e),a=r.get(i);a||(a=n.querySelector(rh(i)),a||(e=D({src:e,async:!0},t),(t=Lm.get(i))&&oh(e,t),a=n.createElement(`script`),Ut(a),Sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Xm(e,t){Bm.M(e,t);var n=Um;if(n&&e){var r=Ht(n).hoistableScripts,i=nh(e),a=r.get(i);a||(a=n.querySelector(rh(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=Lm.get(i))&&oh(e,t),a=n.createElement(`script`),Ut(a),Sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Zm(e,t,n,r){var a=(a=Ae.current)?zm(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`?(n=Qm(n.href),t=Ht(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Qm(n.href);var o=Ht(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($m(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Lm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Lm.set(e,o)),th(a,e,o,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`?(n=nh(n),t=Ht(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Qm(e){return`href="`+un(e)+`"`}function $m(e){return`link[rel="stylesheet"][`+e+`]`}function eh(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function th(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Lt]){r.loading=1;return}}else t=e.createElement(`link`),t[Lt]=!0,t.onload=t.onerror=Wt.bind(null,t),Sp(t,`link`,n),Ut(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function nh(e){return`[src="`+un(e)+`"]`}function rh(e){return`script[async]`+e}function P(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+un(n.href)+`"]`);if(r)return t.instance=r,Ut(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ut(r),Sp(r,`style`,a),ih(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Qm(n.href);var o=e.querySelector($m(a));if(o)return t.state.loading|=4,t.instance=o,Ut(o),o;r=eh(n),(a=Lm.get(a))&&ah(r,a),o=(e.ownerDocument||e).createElement(`link`),Ut(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Sp(o,`link`,r),t.state.loading|=4,ih(o,n.precedence,e),t.instance=o;case`script`:return o=nh(n.src),(a=e.querySelector(rh(o)))?(t.instance=a,Ut(a),a):(r=n,(a=Lm.get(o))&&(r=D({},n),oh(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ut(a),Sp(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,ih(r,n.precedence,e));return t.instance}function ih(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<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ah(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function oh(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var sh=null;function ch(e,t,n){if(sh===null){var r=new Map,i=sh=new Map;i.set(n,r)}else i=sh,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[It]||a[At]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function lh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function uh(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 dh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function fh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ph(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function mh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=ph(t),e.suspenseyImages.push(t)),e=bh.bind(e),t.decode().then(e,e))}function hh(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=Qm(r.href),a=t.querySelector($m(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=yh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ut(a);return}a=t.ownerDocument||t,r=eh(r),(i=Lm.get(i))&&ah(r,i),a=a.createElement(`link`),Ut(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Sp(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=yh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var gh=0;function _h(e,t){return e.stylesheets&&e.count===0&&Sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&gh===0&&(gh=62500*Ep());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>gh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function vh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function yh(){this.count--,vh(this)}function bh(){this.imgCount--,vh(this)}var xh=null;function Sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xh=new Map,t.forEach(Ch,e),xh=null,yh.call(e))}function Ch(e,t){if(!(t.state.loading&4)){var n=xh.get(e);if(n)var r=n.get(null);else{n=new Map,xh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=yh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var wh={$$typeof:ae,Provider:null,Consumer:null,_currentValue:Se,_currentValue2:Se,_threadCount:0};function Th(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=yt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yt(0),this.hiddenUpdates=yt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function Eh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new Th(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ri(3,null,null,t),e.current=a,a.stateNode=e,t=za(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},So(a),e}function Dh(e){return e?(e=Ii,e):Ii}function Oh(e,t,n,r,i,a){i=Dh(i),r.context===null?r.context=i:r.pendingContext=i,r=wo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=To(e,r,t),n!==null&&(Zd(n,e,t),Eo(n,e,t))}function kh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ah(e,t){kh(e,t),(e=e.alternate)&&kh(e,t)}function jh(e){if(e.tag===13||e.tag===31){var t=Ni(e,67108864);t!==null&&Zd(t,e,67108864),Ah(e,67108864)}}function Mh(e){if(e.tag===13||e.tag===31){var t=Jd();t=Tt(t);var n=Ni(e,t);n!==null&&Zd(n,e,t),Ah(e,t)}}var Nh=!0;function Ph(e,t,n,r){var i=be.T;be.T=null;var a=xe.p;try{xe.p=2,Ih(e,t,n,r)}finally{xe.p=a,be.T=i}}function Fh(e,t,n,r){var i=be.T;be.T=null;var a=xe.p;try{xe.p=8,Ih(e,t,n,r)}finally{xe.p=a,be.T=i}}function Ih(e,t,n,r){if(Nh){var i=Lh(r);if(i===null)dp(e,t,r,Rh,n),Yh(e,r);else if(Zh(i,e,t,n,r))r.stopPropagation();else if(Yh(e,r),t&4&&-1<Jh.indexOf(e)){for(;i!==null;){var a=Bt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=pt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ot(o);s.entanglements[1]|=c,o&=~c}Wf(a),!(fd&6)&&(Nd=Je()+500,Gf(0,!1))}}break;case 31:case 13:s=Ni(a,2),s!==null&&Zd(s,a,2),nf(),Ah(a,2)}if(a=Lh(r),a===null&&dp(e,t,r,Rh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else dp(e,t,r,null,n)}}function Lh(e){return e=Dn(e),zh(e)}var Rh=null;function zh(e){if(Rh=null,e=zt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Rh=e,null}function Bh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ye()){case Xe:return 2;case Ze:return 8;case Qe:case $e:return 32;case et:return 268435456;default:return 32}default:return 32}}var Vh=!1,Hh=null,Uh=null,Wh=null,Gh=new Map,Kh=new Map,qh=[],Jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Yh(e,t){switch(e){case`focusin`:case`focusout`:Hh=null;break;case`dragenter`:case`dragleave`:Uh=null;break;case`mouseover`:case`mouseout`:Wh=null;break;case`pointerover`:case`pointerout`:Gh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Kh.delete(t.pointerId)}}function Xh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Bt(t),t!==null&&jh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Zh(e,t,n,r,i){switch(t){case`focusin`:return Hh=Xh(Hh,e,t,n,r,i),!0;case`dragenter`:return Uh=Xh(Uh,e,t,n,r,i),!0;case`mouseover`:return Wh=Xh(Wh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Gh.set(a,Xh(Gh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Kh.set(a,Xh(Kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Qh(e){var t=zt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ot(e.priority,function(){Mh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ot(e.priority,function(){Mh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $h(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);En=r,n.target.dispatchEvent(r),En=null}else return t=Bt(n),t!==null&&jh(t),e.blockedOn=n,!1;t.shift()}return!0}function eg(e,t,n){$h(e)&&n.delete(t)}function tg(){Vh=!1,Hh!==null&&$h(Hh)&&(Hh=null),Uh!==null&&$h(Uh)&&(Uh=null),Wh!==null&&$h(Wh)&&(Wh=null),Gh.forEach(eg),Kh.forEach(eg)}function ng(e,n){e.blockedOn===n&&(e.blockedOn=null,Vh||(Vh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,tg)))}var rg=null;function ig(e){rg!==e&&(rg=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){rg===e&&(rg=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(zh(r||n)===null)continue;break}var a=Bt(n);a!==null&&(e.splice(t,3),t-=3,uc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function ag(e){function t(t){return ng(t,e)}Hh!==null&&ng(Hh,e),Uh!==null&&ng(Uh,e),Wh!==null&&ng(Wh,e),Gh.forEach(t),Kh.forEach(t);for(var n=0;n<qh.length;n++){var r=qh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<qh.length&&(n=qh[0],n.blockedOn===null);)Qh(n),n.blockedOn===null&&qh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[jt]||null;if(typeof a==`function`)o||ig(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[jt]||null)s=o.formAction;else if(zh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),ig(n)}}}function og(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function sg(e){this._internalRoot=e}cg.prototype.render=sg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;Oh(n,Jd(),e,t,null,null)},cg.prototype.unmount=sg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Oh(e.current,2,null,e,null,null),nf(),t[Mt]=null}};function cg(e){this._internalRoot=e}cg.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qh.length&&t!==0&&t<qh[n].priority;n++);qh.splice(n,0,e),n===0&&Qh(e)}};var lg=n.version;if(lg!==`19.3.1`)throw Error(i(527,lg,`19.3.1`));xe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var ug={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:be,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var dg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dg.isDisabled&&dg.supportsFiber)try{rt=dg.inject(ug),it=dg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Nc,s=Pc,c=Fc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Eh(e,1,!1,null,null,n,r,null,o,s,c,og),e[Mt]=t.current,lp(e),new sg(t)}})),_=o(((e,t)=>{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=g()})),v=l(d(),1),y={damping:.7,stiffness:.05,mass:1.25},b=70,x=1e3/60,S=350,C=!1;globalThis.document?.addEventListener(`mousedown`,()=>{C=!0}),globalThis.document?.addEventListener(`mouseup`,()=>{C=!1}),globalThis.document?.addEventListener(`click`,()=>{C=!1});var w=(e={})=>{let[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(e.initial!==!1),[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null);s.current=e;let c=(0,v.useCallback)(()=>{if(!C)return!1;let e=window.getSelection();if(!e||!e.rangeCount)return!1;let t=e.getRangeAt(0);return t.commonAncestorContainer.contains(g.current)||g.current?.contains(t.commonAncestorContainer)},[]),l=(0,v.useCallback)(e=>{d.isAtBottom=e,i(e)},[]),u=(0,v.useCallback)(e=>{d.escapedFromLock=e,n(e)},[]),d=(0,v.useMemo)(()=>{let n;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(e){if(g.current){let{scrollBehavior:t}=getComputedStyle(g.current);t!==`auto`&&(g.current.style.scrollBehavior=`auto`),g.current.scrollTop=e,d.ignoreScrollToTop=g.current.scrollTop,t!==`auto`&&(g.current.style.scrollBehavior=t)}},get targetScrollTop(){return!g.current||!_.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!_.current)return 0;let{targetScrollTop:t}=this;if(!e.targetScrollTop)return t;if(n?.targetScrollTop===t)return n.calculatedScrollTop;let r=Math.max(Math.min(e.targetScrollTop(t,{scrollElement:g.current,contentElement:_.current}),t),0);return n={targetScrollTop:t,calculatedScrollTop:r},requestAnimationFrame(()=>{n=void 0}),r},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=b}}},[]),f=(0,v.useCallback)((e={})=>{typeof e==`string`&&(e={animation:e}),e.preserveScrollPosition||l(!0);let t=Date.now()+(Number(e.wait)||0),n=D(s.current,e.animation),{ignoreEscapes:r=!1}=e,i,a=d.calculatedTargetScrollTop;e.duration instanceof Promise?e.duration.finally(()=>{i=Date.now()}):i=t+(e.duration??0);let o=async()=>{let e=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;let{scrollTop:l}=d,u=performance.now(),p=(u-(d.lastTick??u))/x;if(d.animation||={behavior:n,promise:e,ignoreEscapes:r},d.animation.behavior===n&&(d.lastTick=u),c()||t>Date.now())return o();if(l<Math.min(a,d.calculatedTargetScrollTop)){if(d.animation?.behavior===n){if(n===`instant`)return d.scrollTop=d.calculatedTargetScrollTop,o();d.velocity=(n.damping*d.velocity+n.stiffness*d.scrollDifference)/n.mass,d.accumulated+=d.velocity*p,d.scrollTop+=d.accumulated,d.scrollTop!==l&&(d.accumulated=0)}return o()}return i>Date.now()?(a=d.calculatedTargetScrollTop,o()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:D(s.current,s.current.resize),ignoreEscapes:r,duration:Math.max(0,i-Date.now())||void 0}):d.isAtBottom)});return e.then(e=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),e))};return e.wait!==!0&&(d.animation=void 0),d.animation?.behavior===n?d.animation.promise:o()},[l,c,d]),p=(0,v.useCallback)(()=>{u(!0),l(!1)},[u,l]),m=(0,v.useCallback)(({target:e})=>{if(e!==g.current)return;let{scrollTop:t,ignoreScrollToTop:n}=d,{lastScrollTop:r=t}=d;d.lastScrollTop=t,d.ignoreScrollToTop=void 0,n&&n>t&&(r=n),o(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||t===n)return;if(c()){u(!0),l(!1);return}let e=t>r,i=t<r;d.animation?.ignoreEscapes?d.scrollTop=r:(i&&(u(!0),l(!1)),e&&u(!1),!d.escapedFromLock&&d.isNearBottom&&l(!0))},1)},[u,l,c,d]),h=(0,v.useCallback)(({target:e,deltaY:t})=>{let n=e;for(;![`scroll`,`auto`].includes(getComputedStyle(n).overflow);){if(!n.parentElement)return;n=n.parentElement}n===g.current&&t<0&&g.current.scrollHeight>g.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),l(!1))},[u,l,d]),g=T(e=>{g.current?.removeEventListener(`scroll`,m),g.current?.removeEventListener(`wheel`,h),e?.addEventListener(`scroll`,m,{passive:!0}),e?.addEventListener(`wheel`,h,{passive:!0})},[]),_=T(e=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!e)return;let t;d.resizeObserver=new ResizeObserver(([e])=>{let{height:n}=e.contentRect,r=n-(t??n);if(d.resizeDifference=r,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),o(d.isNearBottom),r>=0){let e=D(s.current,t?s.current.resize:s.current.initial);f({animation:e,wait:!0,preserveScrollPosition:!0,duration:e===`instant`?void 0:S})}else d.isNearBottom&&(u(!1),l(!0));t=n,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===r&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(e)},[]);return{contentRef:_,scrollRef:g,scrollToBottom:f,stopScroll:p,isAtBottom:r||a,isNearBottom:a,escapedFromLock:t,state:d}};function T(e,t){let n=(0,v.useCallback)(t=>(n.current=t,e(t)),t);return n}var E=new Map;function D(...e){let t={...y},n=!1;for(let r of e)r===`instant`?n=!0:typeof r==`object`&&(n=!1,t.damping=r.damping??t.damping,t.stiffness=r.stiffness??t.stiffness,t.mass=r.mass??t.mass);let r=JSON.stringify(t);return E.has(r)||E.set(r,Object.freeze(t)),n?`instant`:E.get(r)}var O=(0,v.createContext)(null),k=typeof window<`u`?v.useLayoutEffect:v.useEffect;function ee({instance:e,children:t,resize:n,initial:r,mass:i,damping:a,stiffness:o,targetScrollTop:s,contextRef:c,...l}){let u=(0,v.useRef)(null),d=w({mass:i,damping:a,stiffness:o,resize:n,initial:r,targetScrollTop:v.useCallback((e,t)=>(b?.targetScrollTop??s)?.(e,t)??e,[s])}),{scrollRef:f,contentRef:p,scrollToBottom:m,stopScroll:h,isAtBottom:g,escapedFromLock:_,state:y}=e??d,b=(0,v.useMemo)(()=>({scrollToBottom:m,stopScroll:h,scrollRef:f,isAtBottom:g,escapedFromLock:_,contentRef:p,state:y,get targetScrollTop(){return u.current},set targetScrollTop(e){u.current=e}}),[m,g,p,f,h,_,y]);return(0,v.useImperativeHandle)(c,()=>b,[b]),k(()=>{f.current&&getComputedStyle(f.current).overflow===`visible`&&(f.current.style.overflow=`auto`)},[]),v.createElement(O.Provider,{value:b},v.createElement(`div`,{...l},typeof t==`function`?t(b):t))}(function(e){function t({children:e,scrollClassName:t,...n}){let r=te();return v.createElement(`div`,{ref:r.scrollRef,style:{height:`100%`,width:`100%`,scrollbarGutter:`stable both-edges`},className:t},v.createElement(`div`,{...n,ref:r.contentRef},typeof e==`function`?e(r):e))}e.Content=t})(ee||={});function te(){let e=(0,v.useContext)(O);if(!e)throw Error(`use-stick-to-bottom component context must be used within a StickToBottom component`);return e}var ne=_();function re(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=re(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ie(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=re(e))&&(r&&(r+=` `),r+=t);return r}var ae=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,A=ie,oe=(e,t)=>n=>{if(t?.variants==null)return A(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=ae(t)||ae(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return A(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},se=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ce=(e,t)=>({classGroupId:e,validator:t}),le=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ue=`-`,de=[],fe=`arbitrary..`,pe=e=>{let t=ge(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return he(e);let n=e.split(ue);return me(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?se(i,t):t:i||de}return n[e]||de}}},me=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=me(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ue):e.slice(t).join(ue),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},he=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?fe+r:void 0})(),ge=e=>{let{theme:t,classGroups:n}=e;return _e(n,t)},_e=(e,t)=>{let n=le();for(let r in e){let i=e[r];ve(i,n,r,t)}return n},ve=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ye(i,t,n,r)}},ye=(e,t,n,r)=>{typeof e==`string`?be(e,t,n):typeof e==`function`?xe(e,t,n,r):Se(e,t,n,r)},be=(e,t,n)=>{let r=e===``?t:Ce(t,e);r.classGroupId=n},xe=(e,t,n,r)=>{we(e)?ve(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(ce(n,e)))},Se=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ve(o,Ce(t,a),n,r)}},Ce=(e,t)=>{let n=e,r=t.split(ue),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=le(),n.nextPart.set(t,i)),n=i}return n},we=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Te=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ee=`!`,De=`:`,Oe=[],ke=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ae=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===De){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Ee)?(c=s.slice(0,-1),l=!0):s.startsWith(Ee)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ke(t,l,c,u)};if(t){let e=t+De,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ke(Oe,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},je=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Me=e=>({cache:Te(e.cacheSize),parseClassName:Ae(e),sortModifiers:je(e),postfixLookupClassGroupIds:Ne(e),...pe(e)}),Ne=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Pe=/\s+/,Fe=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Pe),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Ee:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Ie=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Le(n))&&(i&&(i+=` `),i+=r);return i},Le=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Le(e[r]))&&(n&&(n+=` `),n+=t);return n},Re=(e,...t)=>{let n,r,i,a,o=o=>(n=Me(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Fe(e,n);return i(e,a),a};return a=o,(...e)=>a(Ie(...e))},ze=[],Be=e=>{let t=t=>t[e]||ze;return t.isThemeGetter=!0,t.themeKey=e,t},Ve=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,He=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ue=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,We=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ge=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ke=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,qe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Je=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ye=e=>Ue.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Ze=e=>!!e&&Number.isInteger(Number(e)),Qe=e=>e.endsWith(`%`)&&Xe(e.slice(0,-1)),$e=e=>We.test(e),et=()=>!0,tt=e=>Ge.test(e)&&!Ke.test(e),nt=()=>!1,rt=e=>qe.test(e),it=e=>Je.test(e),at=e=>!ct(e)&&!gt(e),ot=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),st=e=>wt(e,Ot,nt),ct=e=>Ve.test(e),lt=e=>wt(e,kt,tt),ut=e=>wt(e,At,Xe),dt=e=>wt(e,Mt,et),ft=e=>wt(e,jt,nt),pt=e=>wt(e,Et,nt),mt=e=>wt(e,Dt,it),ht=e=>wt(e,Nt,rt),gt=e=>He.test(e),_t=e=>Tt(e,kt),vt=e=>Tt(e,jt),yt=e=>Tt(e,Et),bt=e=>Tt(e,Ot),xt=e=>Tt(e,Dt),St=e=>Tt(e,Nt,!0),Ct=e=>Tt(e,Mt,!0),wt=(e,t,n)=>{let r=Ve.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Tt=(e,t,n=!1)=>{let r=He.exec(e);return r?r[1]?t(r[1]):n:!1},Et=e=>e===`position`||e===`percentage`,Dt=e=>e===`image`||e===`url`,Ot=e=>e===`length`||e===`size`||e===`bg-size`,kt=e=>e===`length`,At=e=>e===`number`,jt=e=>e===`family-name`,Mt=e=>e===`number`||e===`weight`,Nt=e=>e===`shadow`,Pt=Re(()=>{let e=Be(`color`),t=Be(`font`),n=Be(`text`),r=Be(`font-weight`),i=Be(`tracking`),a=Be(`leading`),o=Be(`breakpoint`),s=Be(`container`),c=Be(`spacing`),l=Be(`radius`),u=Be(`shadow`),d=Be(`inset-shadow`),f=Be(`text-shadow`),p=Be(`drop-shadow`),m=Be(`blur`),h=Be(`perspective`),g=Be(`aspect`),_=Be(`ease`),v=Be(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),gt,ct],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[gt,ct,c],T=()=>[Ye,`full`,`auto`,...w()],E=()=>[Ze,`none`,`subgrid`,gt,ct],D=()=>[`auto`,{span:[`full`,Ze,gt,ct]},Ze,gt,ct],O=()=>[Ze,`auto`,gt,ct],k=()=>[`auto`,`min`,`max`,`fr`,gt,ct],ee=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],te=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ne=()=>[`auto`,...w()],re=()=>[Ye,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ie=()=>[s,Ye,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ae=()=>[Ye,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,gt,ct],oe=()=>[...b(),yt,pt,{position:[gt,ct]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,bt,st,{size:[gt,ct]}],le=()=>[Qe,_t,lt],ue=()=>[``,`none`,`full`,l,gt,ct],de=()=>[``,Xe,_t,lt],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[Xe,Qe,yt,pt],he=()=>[``,`none`,m,gt,ct],ge=()=>[`none`,Xe,gt,ct],_e=()=>[`none`,Xe,gt,ct],ve=()=>[Xe,gt,ct],ye=()=>[Ye,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[$e],breakpoint:[$e],color:[et],container:[$e],"drop-shadow":[$e],ease:[`in`,`out`,`in-out`],font:[at],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[$e],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[$e],shadow:[$e],spacing:[`px`,Xe],text:[$e],"text-shadow":[$e],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Ye,ct,gt,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,gt,ct]}],"container-named":[ot],columns:[{columns:[Xe,`auto`,ct,gt,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Ze,`auto`,gt,ct]}],basis:[{basis:[Ye,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Xe,Ye,`auto`,`initial`,`none`,ct]}],grow:[{grow:[``,Xe,gt,ct]}],shrink:[{shrink:[``,Xe,gt,ct]}],order:[{order:[Ze,`first`,`last`,`none`,gt,ct]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ee(),`normal`]}],"justify-items":[{"justify-items":[...te(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...te()]}],"align-content":[{content:[`normal`,...ee()]}],"align-items":[{items:[...te(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...te(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...te(),`baseline`]}],"place-self":[{"place-self":[`auto`,...te()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ne()}],mx:[{mx:ne()}],my:[{my:ne()}],ms:[{ms:ne()}],me:[{me:ne()}],mbs:[{mbs:ne()}],mbe:[{mbe:ne()}],mt:[{mt:ne()}],mr:[{mr:ne()}],mb:[{mb:ne()}],ml:[{ml:ne()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:re()}],"inline-size":[{inline:[`auto`,...ie()]}],"min-inline-size":[{"min-inline":[`auto`,...ie()]}],"max-inline-size":[{"max-inline":[`none`,...ie()]}],"block-size":[{block:[`auto`,...ae()]}],"min-block-size":[{"min-block":[`auto`,...ae()]}],"max-block-size":[{"max-block":[`none`,...ae()]}],w:[{w:[s,`screen`,...re()]}],"min-w":[{"min-w":[s,`screen`,`none`,...re()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...re()]}],h:[{h:[`screen`,`lh`,...re()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...re()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...re()]}],"font-size":[{text:[`base`,n,_t,lt]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ct,dt]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Qe,ct]}],"font-family":[{font:[vt,ft,t]}],"font-features":[{"font-features":[ct]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,gt,ct]}],"line-clamp":[{"line-clamp":[Xe,`none`,gt,ut]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,gt,ct]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,gt,ct]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Xe,`from-font`,`auto`,gt,lt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Xe,`auto`,gt,ct]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Ze,gt,ct]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,gt,ct]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,gt,ct]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ze,gt,ct],radial:[``,gt,ct],conic:[``,Ze,gt,ct]},xt,mt]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Xe,gt,ct]}],"outline-w":[{outline:[``,Xe,_t,lt]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`inner`,`none`,u,St,ht]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,St,ht]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Xe,lt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,St,ht]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Xe,gt,ct]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[gt,ct]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,gt,ct]}],filter:[{filter:[``,`none`,gt,ct]}],blur:[{blur:he()}],brightness:[{brightness:[Xe,gt,ct]}],contrast:[{contrast:[Xe,gt,ct]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,St,ht]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,Xe,gt,ct]}],"hue-rotate":[{"hue-rotate":[Xe,gt,ct]}],invert:[{invert:[``,Xe,gt,ct]}],saturate:[{saturate:[Xe,gt,ct]}],sepia:[{sepia:[``,Xe,gt,ct]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,gt,ct]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,gt,ct]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,gt,ct]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Xe,gt,ct]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,gt,ct]}],"backdrop-invert":[{"backdrop-invert":[``,Xe,gt,ct]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,gt,ct]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,gt,ct]}],"backdrop-sepia":[{"backdrop-sepia":[``,Xe,gt,ct]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,gt,ct]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Xe,`initial`,gt,ct]}],ease:[{ease:[`linear`,`initial`,_,gt,ct]}],delay:[{delay:[Xe,gt,ct]}],animate:[{animate:[`none`,v,gt,ct]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,gt,ct]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[gt,ct,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[Ze,gt,ct]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,gt,ct]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,gt,ct]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[Xe,_t,lt,ut]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function j(...e){return Pt(ie(e))}var Ft=l(h(),1),It=Object.defineProperty,Lt=(e,t)=>It(e,`name`,{value:t,configurable:!0});function Rt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Lt(Rt,`setRef`);function zt(...e){return t=>{let n=!1,r=e.map(e=>{let r=Rt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Rt(e[t],null)}}}}Lt(zt,`composeRefs`);function Bt(...e){return v.useCallback(zt(...e),e)}Lt(Bt,`useComposedRefs`);var Vt=Object.defineProperty,Ht=(e,t)=>Vt(e,`name`,{value:t,configurable:!0});function Ut(e){let t=v.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=en(r),v.Children.forEach(r,e=>{if(Xt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;Qt(n)&&typeof an==`function`;)n=an(n._payload);a=qt(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=v.cloneElement(a,void 0,s):!o&&v.Children.count(r)===1&&v.isValidElement(r)&&(a=r);let c=a?Yt(a):void 0,l=Bt(n,c);if(!a){if(r||r===0)throw Error(o?rn(e):nn(e));return r}let u=Jt(i,a.props??{});return a.type!==v.Fragment&&(u.ref=n?l:c),v.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Ht(Ut,`createSlot`);var Wt=Ut(`Slot`),Gt=Symbol.for(`radix.slottable`);function Kt(e){let t=Ht(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Gt,t}Ht(Kt,`createSlottable`);var qt=Ht((e,t)=>`child`in e.props?v.isValidElement(t)?v.cloneElement(t,void 0,e.props.children(t.props.children)):null:v.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function Jt(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=tn(a,i))}return{...e,...n}}Ht(Jt,`mergeProps`);function Yt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ht(Yt,`getElementRef`);function Xt(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Gt}Ht(Xt,`isSlottable`);var Zt=Symbol.for(`react.lazy`);function Qt(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Zt&&`_payload`in e&&$t(e._payload)}Ht(Qt,`isLazyComponent`);function $t(e){return typeof e==`object`&&!!e&&`then`in e}Ht($t,`isPromiseLike`);function en(e){let t=e;for(;Qt(t)&&typeof an==`function`;)t=an(t._payload);return t}Ht(en,`useUnwrappedLazy`);function tn(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ht(tn,`concatAriaDescribedby`);var nn=Ht(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),rn=Ht(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),an=v.use,on=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})),M=o(((e,t)=>{t.exports=on()}))(),sn=Object.defineProperty,cn=(e,t)=>sn(e,`name`,{value:t,configurable:!0}),ln=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ut(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function un(e,t){e&&Ft.flushSync(()=>e.dispatchEvent(t))}cn(un,`dispatchDiscreteCustomEvent`);var dn=Object.defineProperty,fn=(e,t)=>dn(e,`name`,{value:t,configurable:!0}),pn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),mn=v.forwardRef(fn(function(e,t){return(0,M.jsx)(ln.span,{...e,ref:t,style:{...pn,...e.style}})},`VisuallyHidden`)),hn=Object.defineProperty,gn=(e,t)=>hn(e,`name`,{value:t,configurable:!0});function _n(e,t){let n=v.createContext(t);n.displayName=e+`Context`;let r=gn(e=>{let{children:t,...r}=e,i=v.useMemo(()=>r,Object.values(r));return(0,M.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=v.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return gn(i,`useContext`),[r,i]}gn(_n,`createContext`);function vn(e,t=[]){let n=[];function r(t,r){let i=v.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=gn(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=v.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=v.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return gn(s,`useContext`),[o,s]}gn(r,`createContext`);let i=gn(()=>{let t=n.map(e=>v.createContext(e));return gn(function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,yn(i,...t)]}gn(vn,`createContextScope`);function yn(...e){let t=e[0];if(e.length===1)return t;let n=gn(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return gn(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}gn(yn,`composeContextScopes`);var bn=globalThis?.document?v.useLayoutEffect:()=>{},xn=Object.defineProperty,Sn=(e,t)=>xn(e,`name`,{value:t,configurable:!0});function Cn(e){let t=e+`CollectionProvider`,[n,r]=vn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Sn(e=>{let{scope:t,children:n}=e,r=v.useRef(null),a=v.useRef(new Map).current;return(0,M.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Ut(s),l=v.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Bt(t,a(s,n).collectionRef);return(0,M.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Ut(u),p=v.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=v.useRef(null),s=Bt(t,o),c=a(u,n);return v.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,M.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return v.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Sn(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Sn(Cn,`createCollection`);var wn=new WeakMap,Tn=class e extends Map{static{Sn(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],wn.set(this,!0)}set(e,t){return wn.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=On(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=En(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=En(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return En(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function En(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Dn(e,t);return n===-1?void 0:e[n]}Sn(En,`at`);function Dn(e,t){let n=e.length,r=On(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Sn(Dn,`toSafeIndex`);function On(e){return e!==e||e===0?0:Math.trunc(e)}Sn(On,`toSafeInteger`);function kn(e){let t=e+`CollectionProvider`,[n,r]=vn(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=Sn(({state:e,...t})=>e?(0,M.jsx)(u,{...t,state:e}):(0,M.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=Sn(e=>{let t=_();return(0,M.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let u=Sn(e=>{let{scope:t,children:n,state:r}=e,a=v.useRef(null),[s,c]=v.useState(null),l=Bt(a,c),[u,d]=r,f=v.useRef(new Tn),p=v.useCallback(()=>{let e=f.current;return Mn(e)||e.sort(Nn),e},[]);return v.useEffect(()=>{if(!s)return;let e=Pn(()=>{d(e=>{let t=e.toSorted(Nn);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,M.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,M.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);u.displayName=e+`CollectionProviderImpl`;let d=e+`CollectionSlot`,f=Ut(d),p=v.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Bt(t,a(d,n).collectionElementRef);return(0,M.jsx)(f,{ref:i,children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,h=Ut(m),g=v.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=v.useRef(null),{setCollection:s,registryRef:c}=a(m,n),l=v.useRef(i);An(l.current,i)||(l.current=i);let u=l.current,d=Bt(t,v.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),o);bn(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let f=v.useRef(null);return v.useEffect(()=>{let e=o.current,t=f.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(f.current=e?{element:e,itemData:u}:null,s(n=>{let r=new Tn(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(Nn)}))}),v.useEffect(()=>()=>{let e=f.current;f.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new Tn(t);return n.delete(e.element),n})},[s]),(0,M.jsx)(h,{"data-radix-collection-item":``,ref:d,children:r})});g.displayName=m;function _(){return v.useState(new Tn)}Sn(_,`useInitCollection`);function y(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}Sn(y,`useCollection`);function b(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return Sn(b,`useGetCollection`),[{Provider:c,Slot:p,ItemSlot:g},{createCollectionScope:r,useCollection:y,useGetCollection:b,useInitCollection:_}]}Sn(kn,`createCollection`);function An(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Sn(An,`shallowEqual`);function jn(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Sn(jn,`isElementPreceding`);function Mn(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}Sn(Mn,`isInDocumentOrder`);function Nn(e,t){return!e[1].element||!t[1].element?0:jn(e[1].element,t[1].element)?-1:1}Sn(Nn,`sortByDocumentPosition`);function Pn(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Sn(Pn,`getChildListObserver`);var Fn=Object.defineProperty,In=(e,t)=>Fn(e,`name`,{value:t,configurable:!0}),Ln=!!(typeof window<`u`&&window.document&&window.document.createElement);function Rn(e,t,{checkForDefaultPrevented:n=!0}={}){return In(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}In(Rn,`composeEventHandlers`);function zn(e){if(!Ln)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}In(zn,`getOwnerWindow`);function Bn(e){if(!Ln)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}In(Bn,`getOwnerDocument`);function Vn(e,t=!1){let{activeElement:n}=Bn(e);if(!n?.nodeName)return null;if(Hn(n)&&n.contentDocument)return Vn(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Bn(n).getElementById(e);if(t)return t}}return n}In(Vn,`getActiveElement`);function Hn(e){return e.tagName===`IFRAME`}In(Hn,`isFrame`);var Un=Object.defineProperty,Wn=(e,t)=>Un(e,`name`,{value:t,configurable:!0}),Gn=v.useEffectEvent,Kn=v.useInsertionEffect;function qn(e){if(typeof Gn==`function`)return Gn(e);let t=v.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Kn==`function`?Kn(()=>{t.current=e}):bn(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}Wn(qn,`useEffectEvent`);var Jn=Object.defineProperty,Yn=(e,t)=>Jn(e,`name`,{value:t,configurable:!0}),Xn=v.useInsertionEffect||bn;function Zn({prop:e,defaultProp:t,onChange:n=Yn(()=>{},`onChange`),caller:r}){let[i,a,o]=Qn({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,v.useCallback(t=>{if(s){let n=$n(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Yn(Zn,`useControllableState`);function Qn({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return Xn(()=>{a.current=t},[t]),v.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Yn(Qn,`useUncontrolledState`);function $n(e){return typeof e==`function`}Yn($n,`isFunction`);var er=Symbol(`RADIX:SYNC_STATE`);function tr(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=qn(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=v.useReducer((t,n)=>{if(n.type===er)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=v.useRef(p);v.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=v.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return v.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:er,state:i})},[i,d.state,c]),[h,f]}Yn(tr,`useControllableStateReducer`);var nr=Object.defineProperty,rr=(e,t)=>nr(e,`name`,{value:t,configurable:!0});function ir(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}rr(ir,`useStateMachine`);var ar=rr(e=>{let{present:t,children:n}=e,r=or(t),i=typeof n==`function`?n({present:r.isPresent}):v.Children.only(n),a=cr(r.ref,ur(i));return typeof n==`function`||r.isPresent?v.cloneElement(i,{ref:a}):null},`Presence`);function or(e){let[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),a=v.useRef(`none`),o=v.useRef(void 0),[s,c]=ir(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return v.useEffect(()=>{s===`mounted`?(a.current=o.current??lr(r.current),o.current=void 0):a.current=`none`},[s]),bn(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=lr(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),bn(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=rr(a=>{let o=lr(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=rr(e=>{e.target===t&&(a.current=lr(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:v.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=lr(t)}else r.current=null;n(e)},[])}}rr(or,`usePresence`);function sr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}rr(sr,`setRef`);function cr(...e){let t=v.useRef(e);return t.current=e,v.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=sr(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():sr(n[e],null)}}},[])}rr(cr,`useStableComposedRefs`);function lr(e){return e?.animationName||`none`}rr(lr,`getAnimationName`);function ur(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}rr(ur,`getElementRef`);var dr=Object.defineProperty,fr=(e,t)=>dr(e,`name`,{value:t,configurable:!0}),pr=v.useId||(()=>void 0),mr=0;function hr(e){let[t,n]=v.useState(pr());return bn(()=>{e||n(e=>e??String(mr++))},[e]),e||(t?`radix-${t}`:``)}fr(hr,`useId`);var gr=Object.defineProperty,_r=(e,t)=>gr(e,`name`,{value:t,configurable:!0}),vr=`Collapsible`,[yr,eee]=vn(vr),[br,xr]=yr(vr),Sr=v.forwardRef(_r(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Zn({prop:r,defaultProp:i??!1,onChange:o,caller:vr});return(0,M.jsx)(br,{scope:n,disabled:a,contentId:hr(),open:c,onOpenToggle:v.useCallback(()=>l(e=>!e),[l]),children:(0,M.jsx)(ln.div,{"data-state":Or(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),Cr=`CollapsibleTrigger`,wr=v.forwardRef(_r(function(e,t){let{__scopeCollapsible:n,...r}=e,i=xr(Cr,n);return(0,M.jsx)(ln.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":Or(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:Rn(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),Tr=`CollapsibleContent`,Er=v.forwardRef(_r(function(e,t){let{forceMount:n,...r}=e,i=xr(Tr,e.__scopeCollapsible);return(0,M.jsx)(ar,{present:n||i.open,children:({present:e})=>(0,M.jsx)(Dr,{...r,ref:t,present:e})})},`CollapsibleContent`)),Dr=v.forwardRef(_r(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=xr(Tr,n),[s,c]=v.useState(r),l=v.useRef(null),u=Bt(t,l),d=v.useRef(0),f=d.current,p=v.useRef(0),m=p.current,h=o.open||s,g=v.useRef(h),_=v.useRef(void 0);return v.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),bn(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,M.jsx)(ln.div,{"data-state":Or(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})},`CollapsibleContentImpl`));function Or(e){return e?`open`:`closed`}_r(Or,`getState`);var kr=Object.defineProperty,Ar=(e,t)=>kr(e,`name`,{value:t,configurable:!0}),jr={LTR:`ltr`,RTL:`rtl`},Mr=v.createContext(void 0);function Nr(e){let t=v.useContext(Mr);return e||t||jr.LTR}Ar(Nr,`useDirection`);var Pr=Object.defineProperty,Fr=(e,t)=>Pr(e,`name`,{value:t,configurable:!0}),Ir=v.useInsertionEffect;function Lr(e){let t=v.useRef(e);return typeof Ir==`function`?Ir(()=>{t.current=e}):bn(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}Fr(Lr,`useCallbackRef`);var Rr=Object.defineProperty,zr=(e,t)=>Rr(e,`name`,{value:t,configurable:!0}),Br=`dismissableLayer.update`,Vr=`dismissableLayer.pointerDownOutside`,Hr=`dismissableLayer.focusOutside`,Ur,Wr=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Gr=v.forwardRef(zr(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=v.useContext(Wr),[d,f]=v.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=v.useState({}),h=Bt(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=_?g.indexOf(_):-1,b=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=v.useRef(!1),w=Jr(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=Yr(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?b===g.length-1:!1,D=Lr(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return v.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),v.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ur=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Xr(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Ur))}},[d,p,n,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Xr())},[d,u]),v.useEffect(()=>{let e=zr(()=>m({}),`handleUpdate`);return document.addEventListener(Br,e),()=>document.removeEventListener(Br,e)},[]),(0,M.jsx)(ln.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Rn(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Rn(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Rn(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Kr(){let e=v.useContext(Wr),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}zr(Kr,`useDismissableLayerSurface`);var qr=zr(()=>!0,`IS_TRUE`);function Jr(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=qr}=t,s=Lr(e),c=v.useRef(!1),l=v.useRef(!1),u=v.useRef(new Map),d=v.useRef(()=>{});return v.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}zr(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}zr(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}zr(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}zr(p,`handleInteractionBubble`);let m=zr(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Zr(Vr,s,p,{discrete:!0})};if(zr(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:zr(()=>c.current=!0,`onPointerDownCapture`)}}zr(Jr,`usePointerDownOutside`);function Yr(e,t=globalThis?.document){let n=Lr(e),r=v.useRef(!1);return v.useEffect(()=>{let e=zr(e=>{e.target&&!r.current&&Zr(Hr,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:zr(()=>r.current=!0,`onFocusCapture`),onBlurCapture:zr(()=>r.current=!1,`onBlurCapture`)}}zr(Yr,`useFocusOutside`);function Xr(){let e=new CustomEvent(Br);document.dispatchEvent(e)}zr(Xr,`dispatchUpdate`);function Zr(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?un(i,a):i.dispatchEvent(a)}zr(Zr,`handleAndDispatchCustomEvent`);var Qr=Object.defineProperty,$r=(e,t)=>Qr(e,`name`,{value:t,configurable:!0}),ei=`focusScope.autoFocusOnMount`,ti=`focusScope.autoFocusOnUnmount`,ni={bubbles:!1,cancelable:!0},ri=v.forwardRef($r(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=v.useState(null),u=Lr(a),d=Lr(o),f=v.useRef(null),p=Bt(t,l),m=v.useRef(i);v.useEffect(()=>{m.current=i});let h=v.useCallback(e=>e?c?.contains(e)?!0:!!m.current?.some(t=>t.contains(e)):!1,[c]),g=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;h(t)?f.current=t:mi(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||mi(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&mi(c)};$r(e,`handleFocusIn`),$r(t,`handleFocusOut`),$r(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused,h]),v.useEffect(()=>{if(c){hi.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(ei,ni);c.addEventListener(ei,u),c.dispatchEvent(t),t.defaultPrevented||(ci(vi(ui(c)),{select:!0}),document.activeElement===e&&mi(c))}return()=>{c.removeEventListener(ei,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(ti,ni);c.addEventListener(ti,d),c.dispatchEvent(r),r.defaultPrevented||mi(e??t.body,{select:!0}),c.removeEventListener(ti,d),hi.remove(g)},0)}}},[c,u,d,g]);let _=v.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=li(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&mi(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&mi(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,M.jsx)(ln.div,{tabIndex:-1,...s,ref:p,onKeyDown:_})},`FocusScope`)),ii=v.createContext(null);function ai({registry:e,children:t}){return e?(0,M.jsx)(ii.Provider,{value:e,children:t}):t}$r(ai,`FocusScopeBranchProvider`);function oi(){let[e,t]=v.useState([]);return{nodes:e,registry:v.useMemo(()=>({add:$r(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:$r(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}$r(oi,`useFocusScopeBranchRegistry`);function si(e){let t=v.useContext(ii);v.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}$r(si,`useFocusScopeBranch`);function ci(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(mi(r,{select:t}),document.activeElement!==n)return}$r(ci,`focusFirst`);function li(e){let t=ui(e);return[di(t,e),di(t.reverse(),e)]}$r(li,`getTabbableEdges`);function ui(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:$r(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}$r(ui,`getTabbableCandidates`);function di(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):fi(r,{upTo:t})))return r}$r(di,`findVisible`);function fi(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}$r(fi,`isHidden`);function pi(e){return e.tagName===`INPUT`&&typeof e.select==`function`}$r(pi,`isSelectableInput`);function mi(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&pi(e)&&t&&e.select()}}$r(mi,`focus`);var hi=gi();function gi(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=_i(e,t),e.unshift(t)},remove(t){e=_i(e,t),e[0]?.resume()}}}$r(gi,`createFocusScopesStack`);function _i(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}$r(_i,`arrayRemove`);function vi(e){return e.filter(e=>e.tagName!==`A`)}$r(vi,`removeLinks`);var yi=Object.defineProperty,bi=v.forwardRef(((e,t)=>yi(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=v.useState(!1);bn(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Ft.createPortal((0,M.jsx)(ln.div,{...r,ref:t}),o):null},`Portal`)),xi=Object.defineProperty,Si=(e,t)=>xi(e,`name`,{value:t,configurable:!0}),Ci=0,wi=null;function Ti(e){return Ei(),e.children}Si(Ti,`FocusGuards`);function Ei(){v.useEffect(()=>{wi||={start:Di(),end:Di()};let{start:e,end:t}=wi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Ci++,()=>{Ci===1&&(wi?.start.remove(),wi?.end.remove(),wi=null),Ci=Math.max(0,Ci-1)}},[])}Si(Ei,`useFocusGuards`);function Di(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}Si(Di,`createFocusGuard`);var Oi=function(){return Oi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Oi.apply(this,arguments)};function ki(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ai(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ji=`right-scroll-bar-position`,Mi=`width-before-scroll-bar`,Ni=`with-scroll-bars-hidden`,Pi=`--removed-body-scroll-bar-size`;function Fi(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ii(e,t){var n=(0,v.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Li=typeof window<`u`?v.useLayoutEffect:v.useEffect,Ri=new WeakMap;function zi(e,t){var n=Ii(t||null,function(t){return e.forEach(function(e){return Fi(e,t)})});return Li(function(){var t=Ri.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Fi(e,null)}),i.forEach(function(e){r.has(e)||Fi(e,a)})}Ri.set(n,e)},[e]),n}function Bi(e){return e}function Vi(e,t){t===void 0&&(t=Bi);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Hi(e){e===void 0&&(e={});var t=Vi(null);return t.options=Oi({async:!0,ssr:!1},e),t}var Ui=function(e){var t=e.sideCar,n=ki(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return v.createElement(r,Oi({},n))};Ui.isSideCarExport=!0;function Wi(e,t){return e.useMedium(t),Ui}var Gi=Hi(),Ki=function(){},qi=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Ki,onWheelCapture:Ki,onTouchMoveCapture:Ki}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,y=_===void 0?`div`:_,b=e.gapMode,x=ki(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=zi([n,t]),w=Oi(Oi({},x),i);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:Gi,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?v.cloneElement(v.Children.only(s),Oi(Oi({},w),{ref:C})):v.createElement(y,Oi({},w,{className:c,ref:C}),s))});qi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},qi.classNames={fullWidth:Mi,zeroRight:ji};var Ji=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Yi(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ji();return t&&e.setAttribute(`nonce`,t),e}function Xi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zi(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Qi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Yi())&&(Xi(t,n),Zi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$i=function(){var e=Qi();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ea=function(){var e=$i();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ta={left:0,top:0,right:0,gap:0},na=function(e){return parseInt(e||``,10)||0},ra=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[na(n),na(r),na(i)]},ia=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ta;var t=ra(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},aa=ea(),oa=`data-scroll-locked`,sa=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
10
|
+
.${Ni} {
|
|
11
|
+
overflow: hidden ${r};
|
|
12
|
+
padding-right: ${s}px ${r};
|
|
13
|
+
}
|
|
14
|
+
body[${oa}] {
|
|
15
|
+
overflow: hidden ${r};
|
|
16
|
+
overscroll-behavior: contain;
|
|
17
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
18
|
+
padding-left: ${i}px;
|
|
19
|
+
padding-top: ${a}px;
|
|
20
|
+
padding-right: ${o}px;
|
|
21
|
+
margin-left:0;
|
|
22
|
+
margin-top:0;
|
|
23
|
+
margin-right: ${s}px ${r};
|
|
24
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.${ji} {
|
|
28
|
+
right: ${s}px ${r};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.${Mi} {
|
|
32
|
+
margin-right: ${s}px ${r};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.${ji} .${ji} {
|
|
36
|
+
right: 0 ${r};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.${Mi} .${Mi} {
|
|
40
|
+
margin-right: 0 ${r};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body[${oa}] {
|
|
44
|
+
${Pi}: ${s}px;
|
|
45
|
+
}
|
|
46
|
+
`},ca=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},la=function(){v.useEffect(function(){return document.body.setAttribute(oa,(ca()+1).toString()),function(){var e=ca()-1;e<=0?document.body.removeAttribute(oa):document.body.setAttribute(oa,e.toString())}},[])},ua=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;la();var a=v.useMemo(function(){return ia(i)},[i]);return v.createElement(aa,{styles:sa(a,!t,i,n?``:`!important`)})},da=!1;if(typeof window<`u`)try{var fa=Object.defineProperty({},"passive",{get:function(){return da=!0,!0}});window.addEventListener(`test`,fa,fa),window.removeEventListener(`test`,fa,fa)}catch{da=!1}var pa=da?{passive:!1}:!1,ma=function(e){return e.tagName===`TEXTAREA`},ha=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ma(e)&&n[t]===`visible`)},ga=function(e){return ha(e,`overflowY`)},_a=function(e){return ha(e,`overflowX`)},va=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),xa(e,r)){var i=Sa(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ya=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ba=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},xa=function(e,t){return e===`v`?ga(t):_a(t)},Sa=function(e,t){return e===`v`?ya(t):ba(t)},Ca=function(e,t){return e===`h`&&t===`rtl`?-1:1},wa=function(e,t,n,r,i){var a=Ca(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Sa(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&xa(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ta=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ea=function(e){return[e.deltaX,e.deltaY]},Da=function(e){return e&&`current`in e?e.current:e},Oa=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ka=function(e){return`
|
|
47
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
48
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
49
|
+
`},Aa=0,ja=[];function Ma(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(Aa++)[0],a=v.useState(ea)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Ai([e.lockRef.current],(e.shards||[]).map(Da),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ta(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=va(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=va(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return wa(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(ja.length&&ja[ja.length-1]===a){var r=`deltaY`in n?Ea(n):Ta(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Oa(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(Da).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Na(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=Ta(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,Ea(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,Ta(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return ja.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,pa),document.addEventListener(`touchmove`,c,pa),document.addEventListener(`touchstart`,u,pa),function(){ja=ja.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,pa),document.removeEventListener(`touchmove`,c,pa),document.removeEventListener(`touchstart`,u,pa)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:ka(i)}):null,p?v.createElement(ua,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Na(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Pa=Wi(Gi,Ma),Fa=v.forwardRef(function(e,t){return v.createElement(qi,Oi({},e,{ref:t,sideCar:Pa}))});Fa.classNames=qi.classNames;var Ia=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},La=new WeakMap,Ra=new WeakMap,za={},Ba=0,Va=function(e){return e&&(e.host||Va(e.parentNode))},Ha=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Va(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ua=function(e,t,n,r){var i=Ha(t,Array.isArray(e)?e:[e]);za[n]||(za[n]=new WeakMap);var a=za[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(La.get(e)||0)+1,l=(a.get(e)||0)+1;La.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ra.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ba++,function(){o.forEach(function(e){var t=La.get(e)-1,i=a.get(e)-1;La.set(e,t),a.set(e,i),t||(Ra.has(e)||e.removeAttribute(r),Ra.delete(e)),i||e.removeAttribute(n)}),Ba--,Ba||(La=new WeakMap,La=new WeakMap,Ra=new WeakMap,za={})}},Wa=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ia(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ua(r,i,n,`aria-hidden`)):function(){return null}},Ga=Object.defineProperty,Ka=(e,t)=>Ga(e,`name`,{value:t,configurable:!0}),qa=`Dialog`,[Ja,Ya]=vn(qa),[Xa,Za]=Ja(qa),Qa=Ka(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),{nodes:l,registry:u}=oi(),[d,f]=Zn({prop:r,defaultProp:i??!1,onChange:a,caller:qa}),[p,m]=v.useState(0),[h,g]=v.useState(0);return(0,M.jsx)(Xa,{scope:t,triggerRef:s,contentRef:c,contentId:hr(),titleId:hr(),descriptionId:hr(),titlePresent:p>0,descriptionPresent:h>0,setTitleCount:m,setDescriptionCount:g,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(e=>!e),[f]),modal:o,branchNodes:l,branchRegistry:u,children:n})},`Dialog`),$a=`DialogTrigger`,eo=v.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za($a,n),a=Bt(t,i.triggerRef);return(0,M.jsx)(ln.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":bo(i.open),...r,ref:a,onClick:Rn(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),to=`DialogPortal`,[no,ro]=Ja(to,{forceMount:void 0}),io=Ka(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Za(to,t);return(0,M.jsx)(no,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,M.jsx)(ar,{present:n||a.open,children:(0,M.jsx)(bi,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),ao=`DialogOverlay`,oo=v.forwardRef(Ka(function(e,t){let n=ro(ao,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Za(ao,e.__scopeDialog);return a.modal?(0,M.jsx)(ar,{present:r||a.open,children:(0,M.jsx)(co,{...i,ref:t})}):null},`DialogOverlay`)),so=Ut(`DialogOverlay.RemoveScroll`),co=v.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za(ao,n),a=Bt(t,Kr());return(0,M.jsx)(Fa,{as:so,allowPinchZoom:!0,shards:v.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,M.jsx)(ln.div,{"data-state":bo(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),lo=`DialogContent`,uo=v.forwardRef(Ka(function(e,t){let n=ro(lo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Za(lo,e.__scopeDialog);return(0,M.jsx)(ar,{present:r||a.open,children:a.modal?(0,M.jsx)(fo,{...i,ref:t}):(0,M.jsx)(po,{...i,ref:t})})},`DialogContent`)),fo=v.forwardRef(Ka(function(e,t){let n=Za(lo,e.__scopeDialog),r=v.useRef(null),i=Bt(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return Wa(e)},[]),(0,M.jsx)(mo,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Rn(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Rn(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Rn(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),po=v.forwardRef(Ka(function(e,t){let n=Za(lo,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,M.jsx)(mo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),mo=v.forwardRef(Ka(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=Za(lo,n);return Ei(),(0,M.jsx)(ai,{registry:l.branchRegistry,children:(0,M.jsx)(ri,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(Gr,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?yo(o,l.descriptionId):o,"data-state":bo(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),ho=v.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za(`DialogTitle`,n),{setTitleCount:a}=i;return bn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,M.jsx)(ln.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),go=v.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za(`DialogDescription`,n),{setDescriptionCount:a}=i;return bn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,M.jsx)(ln.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),_o=`DialogClose`,vo=v.forwardRef(Ka(function(e,t){let{__scopeDialog:n,...r}=e,i=Za(_o,n);return(0,M.jsx)(ln.button,{type:`button`,...r,ref:t,onClick:Rn(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function yo(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ka(yo,`concatAriaDescribedby`);function bo(e){return e?`open`:`closed`}Ka(bo,`getState`);var xo=Object.defineProperty,So=(e,t)=>xo(e,`name`,{value:t,configurable:!0}),[Co,wo]=vn(`AlertDialog`,[Ya]),To=Ya(),Eo=So(e=>{let{__scopeAlertDialog:t,...n}=e,r=To(t);return(0,M.jsx)(Qa,{...r,...n,modal:!0})},`AlertDialog`),Do=v.forwardRef(So(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=To(n);return(0,M.jsx)(eo,{...i,...r,ref:t})},`AlertDialogTrigger`)),Oo=So(e=>{let{__scopeAlertDialog:t,...n}=e,r=To(t);return(0,M.jsx)(io,{...r,...n})},`AlertDialogPortal`),ko=v.forwardRef(So(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=To(n);return(0,M.jsx)(oo,{...i,...r,ref:t})},`AlertDialogOverlay`)),[Ao,jo]=Co(`AlertDialogContent`),Mo=v.forwardRef(So(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=To(n),o=Bt(t,v.useRef(null)),s=v.useRef(null);return(0,M.jsx)(Ao,{scope:n,cancelRef:s,children:(0,M.jsx)(uo,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:Rn(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),No=v.forwardRef(So(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=To(n);return(0,M.jsx)(ho,{...i,...r,ref:t})},`AlertDialogTitle`)),Po=v.forwardRef(So(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=To(n);return(0,M.jsx)(go,{...i,...r,ref:t})},`AlertDialogDescription`)),Fo=v.forwardRef(So(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=To(n);return(0,M.jsx)(vo,{...i,...r,ref:t})},`AlertDialogAction`)),Io=`AlertDialogCancel`,Lo=v.forwardRef(So(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=jo(Io,n),a=To(n),o=Bt(t,i);return(0,M.jsx)(vo,{...a,...r,ref:o})},`AlertDialogCancel`)),Ro=Object.defineProperty,zo=(e,t)=>Ro(e,`name`,{value:t,configurable:!0});function Bo(e){let[t,n]=v.useState(void 0);return bn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}zo(Bo,`useSize`);var Vo=[`top`,`right`,`bottom`,`left`],Ho=Math.min,Uo=Math.max,Wo=Math.round,Go=Math.floor,Ko=e=>({x:e,y:e}),qo={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Jo(e,t,n){return Uo(e,Ho(t,n))}function Yo(e,t){return typeof e==`function`?e(t):e}function Xo(e){return e.split(`-`)[0]}function Zo(e){return e.split(`-`)[1]}function Qo(e){return e===`x`?`y`:`x`}function $o(e){return e===`y`?`height`:`width`}function es(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ts(e){return Qo(es(e))}function ns(e,t,n){n===void 0&&(n=!1);let r=Zo(e),i=ts(e),a=$o(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ds(o)),[o,ds(o)]}function rs(e){let t=ds(e);return[is(e),t,is(t)]}function is(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var as=[`left`,`right`],os=[`right`,`left`],ss=[`top`,`bottom`],cs=[`bottom`,`top`];function ls(e,t,n){switch(e){case`top`:case`bottom`:return n?t?os:as:t?as:os;case`left`:case`right`:return t?ss:cs;default:return[]}}function us(e,t,n,r){let i=Zo(e),a=ls(Xo(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(is)))),a}function ds(e){let t=Xo(e);return qo[t]+e.slice(t.length)}function fs(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function ps(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:fs(e)}function ms(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function hs(e,t,n){let{reference:r,floating:i}=e,a=es(t),o=ts(t),s=$o(o),c=Xo(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Zo(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function gs(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Yo(t,e),p=ps(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ms(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ms(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var _s=50,vs=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:gs},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=hs(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<_s&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=hs(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ys=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Yo(e,t)||{};if(l==null)return{};let d=ps(u),f={x:n,y:r},p=ts(i),m=$o(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ho(d[_],T),D=Ho(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,ee=Jo(E,k,O),te=!c.arrow&&Zo(i)!=null&&k!==ee&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,ne=te?k<E?k-E:k-O:0;return{[p]:f[p]+ne,data:{[p]:ee,centerOffset:k-ee-ne,...te&&{alignmentOffset:ne}},reset:te}}}),bs=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Yo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Xo(r),_=es(o),v=Xo(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ds(o)]:rs(o)),x=p!==`none`;!d&&x&&b.push(...us(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ns(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===es(t)||T.every(e=>es(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=es(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function xs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ss(e){return Vo.some(t=>e[t]>=0)}var Cs=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Yo(e,t);switch(i){case`referenceHidden`:{let e=xs(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ss(e)}}}case`escaped`:{let e=xs(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ss(e)}}}default:return{}}}}},ws=new Set([`left`,`top`]);async function Ts(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Xo(n),s=Zo(n),c=es(n)===`y`,l=ws.has(o)?-1:1,u=a&&c?-1:1,d=Yo(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Es=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ts(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ds=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Yo(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=es(i),p=Qo(f),m=u[p],h=u[f],g=(e,t)=>Jo(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Os=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Yo(e,t),u={x:n,y:r},d=es(i),f=Qo(d),p=u[f],m=u[d],h=Yo(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ws.has(Xo(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ks=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Yo(e,t),c=await i.detectOverflow(t,s),l=Xo(n),u=Zo(n),d=es(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ho(p-c[m],g),y=Ho(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Uo(c.left,c.right):S=p-2*Uo(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function As(){return typeof window<`u`}function js(e){return Ps(e)?(e.nodeName||``).toLowerCase():`#document`}function Ms(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ns(e){return((Ps(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ps(e){return As()?e instanceof Node||e instanceof Ms(e).Node:!1}function Fs(e){return As()?e instanceof Element||e instanceof Ms(e).Element:!1}function Is(e){return As()?e instanceof HTMLElement||e instanceof Ms(e).HTMLElement:!1}function Ls(e){return!As()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ms(e).ShadowRoot}function Rs(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ys(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function zs(e){return/^(table|td|th)$/.test(js(e))}function Bs(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Vs=/transform|translate|scale|rotate|perspective|filter/,Hs=/paint|layout|strict|content/,Us=e=>!!e&&e!==`none`,Ws;function Gs(e){let t=Fs(e)?Ys(e):e;return Us(t.transform)||Us(t.translate)||Us(t.scale)||Us(t.rotate)||Us(t.perspective)||!qs()&&(Us(t.backdropFilter)||Us(t.filter))||Vs.test(t.willChange||``)||Hs.test(t.contain||``)}function Ks(e){let t=Zs(e);for(;Is(t)&&!Js(t);){if(Gs(t))return t;if(Bs(t))return null;t=Zs(t)}return null}function qs(){return Ws??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ws}function Js(e){return/^(html|body|#document)$/.test(js(e))}function Ys(e){return Ms(e).getComputedStyle(e)}function Xs(e){return Fs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zs(e){if(js(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ls(e)&&e.host||Ns(e);return Ls(t)?t.host:t}function Qs(e){let t=Zs(e);return Js(t)?(e.ownerDocument||e).body:Is(t)&&Rs(t)?t:Qs(t)}function $s(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Qs(e),i=r===e.ownerDocument?.body,a=Ms(r);if(i){let e=ec(a);return t.concat(a,a.visualViewport||[],Rs(r)?r:[],e&&n?$s(e):[])}return t.concat(r,$s(r,[],n))}function ec(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tc(e){let t=Ys(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Is(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Wo(n)!==a||Wo(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function nc(e){return Fs(e)?e:e.contextElement}function rc(e){let t=nc(e);if(!Is(t))return Ko(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=tc(t),o=(a?Wo(n.width):n.width)/r,s=(a?Wo(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var ic=Ko(0);function ac(e){let t=Ms(e);return!qs()||!t.visualViewport?ic:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oc(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ms(e)}function sc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=nc(e),o=Ko(1);t&&(r?Fs(r)&&(o=rc(r)):o=rc(e));let s=oc(a,n,r)?ac(a):Ko(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ms(a),t=Fs(r)?Ms(r):r,n=e,i=ec(n);for(;i&&t!==n;){let e=rc(i),t=i.getBoundingClientRect(),r=Ys(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ms(i),i=ec(n)}}return ms({width:u,height:d,x:c,y:l})}function cc(e,t){let n=Xs(e).scrollLeft;return t?t.left+n:sc(Ns(e)).left+n}function lc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-cc(e,n),y:n.top+t.scrollTop}}function uc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ns(r),s=t?Bs(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ko(1),u=Ko(0),d=Is(r);if((d||!a)&&((js(r)!==`body`||Rs(o))&&(c=Xs(r)),d)){let e=sc(r);l=rc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?lc(o,c):Ko(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function dc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function fc(e){let t=Xs(e),n=e.ownerDocument.body,r=Uo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Uo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+cc(e),o=-t.scrollTop;return Ys(n).direction===`rtl`&&(a+=Uo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var pc=25;function mc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ms(e),a=Ns(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!qs()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(cc(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=pc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function hc(e,t){let n=sc(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=rc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function gc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=mc(e,n,t);else if(t===`document`)r=fc(Ns(e));else if(Fs(t))r=hc(t,n);else{let n=ac(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ms(r)}function _c(e,t){let n=t.get(e);if(n)return n;let r=$s(e,[],!1).filter(e=>Fs(e)&&js(e)!==`body`),i=null,a=Ys(e).position===`fixed`,o=a?Zs(e):e;for(;Fs(o)&&!Js(o);){let e=Ys(o),t=Gs(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Zs(o)}return t.set(e,r),r}function vc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Bs(t)?[]:_c(t,this._c):[].concat(n),r],o=gc(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=gc(t,a[e],i);s=Uo(n.top,s),c=Ho(n.right,c),l=Ho(n.bottom,l),u=Uo(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function yc(e){let{width:t,height:n}=tc(e);return{width:t,height:n}}function bc(e,t,n){let r=Is(t),i=Ns(t),a=n===`fixed`,o=sc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ko(0);if((r||!a)&&((js(t)!==`body`||Rs(i))&&(s=Xs(t)),r)){let e=sc(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=cc(i));let l=i&&!r&&!a?lc(i,s):Ko(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function xc(e){return Ys(e).position===`static`}function Sc(e,t){if(!Is(e)||Ys(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ns(e)===n&&(n=n.ownerDocument.body),n}function Cc(e,t){let n=Ms(e);if(Bs(e))return n;if(!Is(e)){let t=Zs(e);for(;t&&!Js(t);){if(Fs(t)&&!xc(t))return t;t=Zs(t)}return n}let r=Sc(e,t);for(;r&&zs(r)&&xc(r);)r=Sc(r,t);return r&&Js(r)&&xc(r)&&!Gs(r)?n:r||Ks(e)||n}var wc=async function(e){let t=this.getOffsetParent||Cc,n=this.getDimensions,r=await n(e.floating);return{reference:bc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tc(e){return Ys(e).direction===`rtl`}var Ec={convertOffsetParentRelativeRectToViewportRelativeRect:uc,getDocumentElement:Ns,getClippingRect:vc,getOffsetParent:Cc,getElementRects:wc,getClientRects:dc,getDimensions:yc,getScale:rc,isElement:Fs,isRTL:Tc};function Dc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Oc(e,t,n){let r=null,i,a=Ns(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Go(d),h=Go(a.clientWidth-(u+f)),g=Go(a.clientHeight-(d+p)),_=Go(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Uo(0,Ho(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Dc(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ms(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function kc(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=nc(e),u=i||a?[...l?$s(l):[],...t?$s(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Oc(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?sc(e):null;c&&g();function g(){let t=sc(e);h&&!Dc(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ac=Es,jc=Ds,Mc=bs,Nc=ks,Pc=Cs,Fc=ys,Ic=Os,Lc=(e,t,n)=>{let r=new Map,i=n??{},a={...Ec,...i.platform,_c:r};return vs(e,t,{...i,platform:a})},Rc=typeof document<`u`?v.useLayoutEffect:function(){};function zc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!zc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Bc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vc(e,t){let n=Bc(e);return Math.round(t*n)/n}function Hc(e){let t=v.useRef(e);return Rc(()=>{t.current=e}),t}function Uc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);zc(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=Hc(c),O=Hc(i),k=Hc(l),ee=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Lc(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};te.current&&!zc(T.current,t)&&(T.current=t,Ft.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Rc(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=v.useRef(!1);Rc(()=>(te.current=!0,()=>{te.current=!1}),[]),Rc(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,ee);ee()}},[x,S,ee,D,E]);let ne=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),re=v.useMemo(()=>({reference:x,floating:S}),[x,S]),ie=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!re.floating)return e;let t=Vc(re.floating,u.x),r=Vc(re.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Bc(re.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,re.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:ee,refs:ne,elements:re,floatingStyles:ie}),[u,ee,ne,re,ie])}var Wc=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Fc({element:r.current,padding:i}).fn(n):r?Fc({element:r,padding:i}).fn(n):{}}}},Gc=(e,t)=>{let n=Ac(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kc=(e,t)=>{let n=jc(e);return{name:n.name,fn:n.fn,options:[e,t]}},qc=(e,t)=>({fn:Ic(e).fn,options:[e,t]}),Jc=(e,t)=>{let n=Mc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yc=(e,t)=>{let n=Nc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xc=(e,t)=>{let n=Pc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zc=(e,t)=>{let n=Wc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qc=Object.defineProperty,$c=v.forwardRef(((e,t)=>Qc(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,M.jsx)(ln.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,M.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),el=Object.defineProperty,tl=(e,t)=>el(e,`name`,{value:t,configurable:!0}),nl={Partial:`partial`,Always:`always`},rl={Optimized:`optimized`,Always:`always`},il=`Popper`,[al,ol]=vn(il),[sl,cl]=al(il),ll=tl(e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[a,o]=v.useState(void 0);return(0,M.jsx)(sl,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),ul=`PopperAnchor`,dl=v.forwardRef(tl(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=cl(ul,n),o=v.useRef(null),s=a.onAnchorChange,c=Bt(t,v.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=v.useRef(null);v.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&xl(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,M.jsx)(ln.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),fl=`PopperContent`,[pl,ml]=al(fl),hl=v.forwardRef(tl(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=nl.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=rl.Optimized,onPlaced:m,...h}=e,g=cl(fl,n),[_,y]=v.useState(null),b=Bt(t,y),[x,S]=v.useState(null),C=Bo(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,ee={padding:D,boundary:O.filter(yl),altBoundary:k},{refs:te,floatingStyles:ne,placement:re,isPositioned:ie,middlewareData:ae}=Uc({strategy:`fixed`,placement:E,whileElementsMounted:tl((...e)=>kc(...e,{animationFrame:p===rl.Always}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Gc({mainAxis:i+T,alignmentAxis:o}),c&&Kc({mainAxis:!0,crossAxis:!1,...d===nl.Partial?{limiter:qc()}:{},...ee}),c&&Jc({...ee}),Yc({...ee,apply:tl(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&Zc({element:x,padding:s}),bl({arrowWidth:w,arrowHeight:T}),f&&Xc(k?{strategy:`referenceHidden`,...ee}:{strategy:`referenceHidden`,padding:ee.padding,altBoundary:ee.altBoundary})]}),A=g.setPlacementState;bn(()=>(A(re),()=>{A(void 0)}),[re,A]);let[oe,se]=xl(re),ce=Lr(m);bn(()=>{ie&&ce?.()},[ie,ce]);let le=ae.arrow?.x,ue=ae.arrow?.y,de=ae.arrow?.centerOffset!==0,[fe,pe]=v.useState();return bn(()=>{_&&pe(window.getComputedStyle(_).zIndex)},[_]),(0,M.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:ie?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:fe,"--radix-popper-transform-origin":[ae.transformOrigin?.x,ae.transformOrigin?.y].join(` `),...ae.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,M.jsx)(pl,{scope:n,placedSide:oe,placedAlign:se,onArrowChange:S,arrowX:le,arrowY:ue,shouldHideArrow:de,children:(0,M.jsx)(ln.div,{"data-side":oe,"data-align":se,...h,ref:b,style:{...h.style,animation:ie?h.style?.animation:`none`}})})})},`PopperContent`)),gl=`PopperArrow`,_l={top:`bottom`,right:`left`,bottom:`top`,left:`right`},vl=v.forwardRef(tl(function(e,t){let{__scopePopper:n,...r}=e,i=ml(gl,n),a=_l[i.placedSide];return(0,M.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,M.jsx)($c,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function yl(e){return e!==null}tl(yl,`isNotNull`);var bl=tl(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=xl(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function xl(e){let[t,n=`center`]=e.split(`-`);return[t,n]}tl(xl,`getSideAndAlignFromPlacement`);var Sl=Object.defineProperty,Cl=(e,t)=>Sl(e,`name`,{value:t,configurable:!0}),wl=!1;function Tl(){let[e,t]=v.useState(wl);return v.useEffect(()=>{wl||(wl=!0,t(!0))},[]),e}Cl(Tl,`useIsHydrated`);var El=v.useSyncExternalStore;function Dl(){return()=>{}}Cl(Dl,`subscribe`);function Ol(){return El(Dl,()=>!0,()=>!1)}Cl(Ol,`useIsHydratedModern`);var kl=typeof El==`function`?Ol:Tl,Al=Object.defineProperty,jl=(e,t)=>Al(e,`name`,{value:t,configurable:!0}),Ml=`rovingFocusGroup.onEntryFocus`,Nl={bubbles:!1,cancelable:!0},Pl=`RovingFocusGroup`,[Fl,Il,Ll]=Cn(Pl),[Rl,zl]=vn(Pl,[Ll]),Bl={Vertical:`vertical`,Horizontal:`horizontal`},Vl={LTR:`ltr`,RTL:`rtl`},[Hl,Ul]=Rl(Pl),Wl=v.forwardRef(jl(function(e,t){return(0,M.jsx)(Fl.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(Fl.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(Gl,{...e,ref:t})})})},`RovingFocusGroup`)),Gl=v.forwardRef(jl(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=v.useRef(null),p=Bt(t,f),m=Nr(a),[h,g]=Zn({prop:o,defaultProp:s??null,onChange:c,caller:Pl}),[_,y]=v.useState(!1),b=Lr(l),x=Il(n),S=v.useRef(!1),[C,w]=v.useState(0);return v.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Ml,b),()=>e.removeEventListener(Ml,b)},[b]),(0,M.jsx)(Hl,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:v.useCallback(e=>g(e),[g]),onItemShiftTab:v.useCallback(()=>y(!0),[]),onFocusableItemAdd:v.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:v.useCallback(()=>w(e=>e-1),[]),children:(0,M.jsx)(ln.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Rn(e.onMouseDown,()=>{S.current=!0}),onFocus:Rn(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Ml,Nl);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);Zl([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:Rn(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),Kl=`RovingFocusGroupItem`,ql=v.forwardRef(jl(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=hr(),l=a||c,u=Ul(Kl,n),d=u.currentTabStopId===l,f=Il(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=kl();return bn(()=>{if(g&&r)return p(),()=>m()},[g,r,p,m]),v.useEffect(()=>{if(!g&&r)return p(),()=>m()},[g,r,p,m]),(0,M.jsx)(Fl.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,M.jsx)(ln.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Rn(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Rn(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Rn(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Xl(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Ql(n,r+1):n.slice(r+1)}setTimeout(()=>Zl(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),Jl={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Yl(e,t){return t===Vl.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}jl(Yl,`getDirectionAwareKey`);function Xl(e,t,n){let r=Yl(e.key,n);if(!(t===Bl.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Bl.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return Jl[r]}jl(Xl,`getFocusIntent`);function Zl(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}jl(Zl,`focusFirst`);function Ql(e,t){return e.map((n,r)=>e[(t+r)%e.length])}jl(Ql,`wrapArray`);var $l=Object.defineProperty,eu=(e,t)=>$l(e,`name`,{value:t,configurable:!0}),tu=[`Enter`,` `],nu=[`ArrowDown`,`PageUp`,`Home`],ru=[`ArrowUp`,`PageDown`,`End`],iu=[...nu,...ru];[...tu],[...tu];var au=`Menu`,[ou,su,cu]=Cn(au),[lu,uu]=vn(au,[cu,ol,zl]),du=ol(),fu=zl(),[pu,mu]=lu(au),[hu,gu]=lu(au),_u=eu(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=du(t),[c,l]=v.useState(null),u=v.useRef(!1),d=Lr(a),f=Nr(i);return v.useEffect(()=>{let e=eu(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=eu(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),v.useEffect(()=>{if(!n)return;let e=eu(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,M.jsx)(ll,{...s,children:(0,M.jsx)(pu,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,M.jsx)(hu,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),vu=v.forwardRef(eu(function(e,t){let{__scopeMenu:n,...r}=e,i=du(n);return(0,M.jsx)(dl,{...i,...r,ref:t})},`MenuAnchor`)),yu=`MenuPortal`,[bu,xu]=lu(yu,{forceMount:void 0}),Su=eu(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=mu(yu,t);return(0,M.jsx)(bu,{scope:t,forceMount:n,children:(0,M.jsx)(ar,{present:n||a.open,children:(0,M.jsx)(bi,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Cu=`MenuContent`,[wu,Tu]=lu(Cu),Eu=v.forwardRef(eu(function(e,t){let n=xu(Cu,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=mu(Cu,e.__scopeMenu),o=gu(Cu,e.__scopeMenu);return(0,M.jsx)(ou.Provider,{scope:e.__scopeMenu,children:(0,M.jsx)(ar,{present:r||a.open,children:(0,M.jsx)(ou.Slot,{scope:e.__scopeMenu,children:o.modal?(0,M.jsx)(Du,{...i,ref:t}):(0,M.jsx)(Ou,{...i,ref:t})})})})},`MenuContent`)),Du=v.forwardRef(eu(function(e,t){let n=mu(Cu,e.__scopeMenu),r=v.useRef(null),i=Bt(t,r);return v.useEffect(()=>{let e=r.current;if(e)return Wa(e)},[]),(0,M.jsx)(Au,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Rn(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Ou=v.forwardRef(eu(function(e,t){let n=mu(Cu,e.__scopeMenu);return(0,M.jsx)(Au,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),ku=Ut(`MenuContent.ScrollLock`),Au=v.forwardRef(eu(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=mu(Cu,n),_=gu(Cu,n),y=du(n),b=fu(n),x=su(n),[S,C]=v.useState(null),w=v.useRef(null),[T,E]=v.useState(null);si(T);let{nodes:D,registry:O}=oi(),k=!!(i||m),ee=Bt(t,w,g.onContentChange,E),te=v.useRef(0),ne=v.useRef(``),re=v.useRef(0),ie=v.useRef(null),ae=v.useRef(`right`),A=v.useRef(0),oe=v.useMemo(()=>m?[w,...D.map(e=>({current:e}))]:[],[w,D,m]),se=m?Fa:v.Fragment,ce=m?{as:ku,allowPinchZoom:!0,shards:oe}:void 0,le=eu(e=>{let t=ne.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=ed(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){ne.current=e,window.clearTimeout(te.current),e!==``&&(te.current=window.setTimeout(()=>s(``),1e3))}eu(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);v.useEffect(()=>()=>window.clearTimeout(te.current),[]),Ei();let ue=v.useCallback(e=>ae.current===ie.current?.side&&nd(e,ie.current?.area),[]);return(0,M.jsx)(wu,{scope:n,searchRef:ne,onItemEnter:v.useCallback(e=>{ue(e)&&e.preventDefault()},[ue]),onItemLeave:v.useCallback(e=>{ue(e)||(w.current?.focus(),C(null))},[ue]),onTriggerLeave:v.useCallback(e=>{ue(e)&&e.preventDefault()},[ue]),pointerGraceTimerRef:re,onPointerGraceIntentChange:v.useCallback(e=>{ie.current=e},[]),children:(0,M.jsx)(ai,{registry:k?O:null,children:(0,M.jsx)(se,{...ce,children:(0,M.jsx)(ri,{asChild:!0,trapped:i,branches:D,onMountAutoFocus:Rn(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,M.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,M.jsx)(Wl,{asChild:!0,...b,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:Rn(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,M.jsx)(hl,{role:`menu`,"aria-orientation":`vertical`,"data-state":Yu(g.open),"data-radix-menu-content":``,dir:_.dir,...y,...h,ref:ee,style:{outline:`none`,...h.style},onKeyDown:Rn(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&le(e.key));let i=w.current;if(e.target!==i||!iu.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);ru.includes(e.key)&&a.reverse(),Qu(a)}),onBlur:Rn(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(te.current),ne.current=``)}),onPointerMove:Rn(e.onPointerMove,rd(e=>{let t=e.target,n=A.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>A.current?`right`:`left`;ae.current=t,A.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),ju=v.forwardRef(eu(function(e,t){let{__scopeMenu:n,...r}=e;return(0,M.jsx)(ln.div,{role:`group`,...r,ref:t})},`MenuGroup`)),Mu=v.forwardRef(eu(function(e,t){let{__scopeMenu:n,...r}=e;return(0,M.jsx)(ln.div,{...r,ref:t})},`MenuLabel`)),Nu=`MenuItem`,Pu=`menu.itemSelect`,Fu=v.forwardRef(eu(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=v.useRef(null),o=gu(Nu,e.__scopeMenu),s=Tu(Nu,e.__scopeMenu),c=Bt(t,a),l=v.useRef(!1),u=eu(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Pu,{bubbles:!0,cancelable:!0});e.addEventListener(Pu,e=>r?.(e),{once:!0}),un(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,M.jsx)(Iu,{...i,ref:c,disabled:n,onClick:Rn(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:Rn(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:Rn(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&tu.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Iu=v.forwardRef(eu(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Tu(Nu,n),s=fu(n),c=v.useRef(null),l=Bt(t,c),[u,d]=v.useState(!1),[f,p]=v.useState(``);return v.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,M.jsx)(ou.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,M.jsx)(ql,{asChild:!0,...s,focusable:!r,children:(0,M.jsx)(ln.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:Rn(e.onPointerMove,rd(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Rn(e.onPointerLeave,rd(e=>o.onItemLeave(e))),onFocus:Rn(e.onFocus,()=>d(!0)),onBlur:Rn(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[Lu,Ru]=lu(`MenuRadioGroup`,{value:void 0,onValueChange:eu(()=>{},`onValueChange`)}),zu=v.forwardRef(eu(function(e,t){let{value:n,onValueChange:r,...i}=e,a=Lr(r);return(0,M.jsx)(Lu,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,M.jsx)(ju,{...i,ref:t})})},`MenuRadioGroup`)),Bu=`MenuRadioItem`,Vu=v.forwardRef(eu(function(e,t){let{value:n,...r}=e,i=Ru(Bu,e.__scopeMenu),a=n===i.value;return(0,M.jsx)(Uu,{scope:e.__scopeMenu,checked:a,children:(0,M.jsx)(Fu,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Zu(a),onSelect:Rn(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),Hu=`MenuItemIndicator`,[Uu,Wu]=lu(Hu,{checked:!1}),Gu=v.forwardRef(eu(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=Wu(Hu,n);return(0,M.jsx)(ar,{present:r||Xu(a.checked)||a.checked===!0,children:(0,M.jsx)(ln.span,{...i,ref:t,"data-state":Zu(a.checked)})})},`MenuItemIndicator`)),Ku=v.forwardRef(eu(function(e,t){let{__scopeMenu:n,...r}=e;return(0,M.jsx)(ln.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[qu,Ju]=lu(`MenuSub`);function Yu(e){return e?`open`:`closed`}eu(Yu,`getOpenState`);function Xu(e){return e===`indeterminate`}eu(Xu,`isIndeterminate`);function Zu(e){return Xu(e)?`indeterminate`:e?`checked`:`unchecked`}eu(Zu,`getCheckedState`);function Qu(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}eu(Qu,`focusFirst`);function $u(e,t){return e.map((n,r)=>e[(t+r)%e.length])}eu($u,`wrapArray`);function ed(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=$u(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}eu(ed,`getNextMatch`);function td(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}eu(td,`isPointInPolygon`);function nd(e,t){return t?td({x:e.clientX,y:e.clientY},t):!1}eu(nd,`isPointerInGraceArea`);function rd(e){return t=>t.pointerType===`mouse`?e(t):void 0}eu(rd,`whenMouse`);var id=Object.defineProperty,ad=(e,t)=>id(e,`name`,{value:t,configurable:!0}),od=`DropdownMenu`,[sd,cd]=vn(od,[uu]),ld=uu(),[ud,dd]=sd(od),fd=ad(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=ld(t),l=v.useRef(null),[u,d]=Zn({prop:i,defaultProp:a??!1,onChange:o,caller:od});return(0,M.jsx)(ud,{scope:t,triggerId:hr(),triggerRef:l,contentId:hr(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,M.jsx)(_u,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),pd=`DropdownMenuTrigger`,md=v.forwardRef(ad(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=dd(pd,n),o=ld(n),s=Bt(t,a.triggerRef);return(0,M.jsx)(vu,{asChild:!0,...o,children:(0,M.jsx)(ln.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:Rn(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Rn(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),hd=ad(e=>{let{__scopeDropdownMenu:t,...n}=e,r=ld(t);return(0,M.jsx)(Su,{...r,...n})},`DropdownMenuPortal`),gd=`DropdownMenuContent`,_d=v.forwardRef(ad(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=dd(gd,n),a=ld(n),o=v.useRef(!1);return(0,M.jsx)(Eu,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Rn(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Rn(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),vd=v.forwardRef(ad(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=ld(n);return(0,M.jsx)(Mu,{...i,...r,ref:t})},`DropdownMenuLabel`)),yd=v.forwardRef(ad(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=ld(n);return(0,M.jsx)(Fu,{...i,...r,ref:t})},`DropdownMenuItem`)),bd=v.forwardRef(ad(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=ld(n);return(0,M.jsx)(zu,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),xd=v.forwardRef(ad(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=ld(n);return(0,M.jsx)(Vu,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),Sd=v.forwardRef(ad(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=ld(n);return(0,M.jsx)(Gu,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),Cd=v.forwardRef(ad(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=ld(n);return(0,M.jsx)(Ku,{...i,...r,ref:t})},`DropdownMenuSeparator`)),wd=Object.defineProperty,Td=v.forwardRef(((e,t)=>wd(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,M.jsx)(ln.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),Ed=Object.defineProperty,Dd=(e,t)=>Ed(e,`name`,{value:t,configurable:!0});function Od(e,[t,n]){return Math.min(n,Math.max(t,e))}Dd(Od,`clamp`);var kd=Object.defineProperty,Ad=(e,t)=>kd(e,`name`,{value:t,configurable:!0}),jd=`Popover`,[Md,Nd]=vn(jd,[ol]),Pd=ol(),[Fd,Id]=Md(jd),Ld=Ad(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Pd(t),c=v.useRef(null),[l,u]=v.useState(!1),[d,f]=v.useState(0),[p,m]=v.useState(0),[h,g]=Zn({prop:r,defaultProp:i??!1,onChange:a,caller:jd});return(0,M.jsx)(ll,{...s,children:(0,M.jsx)(Fd,{scope:t,contentId:hr(),titleId:hr(),descriptionId:hr(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,triggerRef:c,open:h,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:l,onCustomAnchorAdd:v.useCallback(()=>u(!0),[]),onCustomAnchorRemove:v.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),Rd=`PopoverTrigger`,zd=v.forwardRef(Ad(function(e,t){let{__scopePopover:n,...r}=e,i=Id(Rd,n),a=Pd(n),o=Bt(t,i.triggerRef),s=(0,M.jsx)(ln.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Xd(i.open),...r,ref:o,onClick:Rn(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,M.jsx)(dl,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Bd=`PopoverPortal`,[Vd,Hd]=Md(Bd,{forceMount:void 0}),Ud=Ad(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Id(Bd,t);return(0,M.jsx)(Vd,{scope:t,forceMount:n,children:(0,M.jsx)(ar,{present:n||a.open,children:(0,M.jsx)(bi,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),Wd=`PopoverContent`,Gd=v.forwardRef(Ad(function(e,t){let n=Hd(Wd,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Id(Wd,e.__scopePopover);return(0,M.jsx)(ar,{present:r||a.open,children:a.modal?(0,M.jsx)(qd,{...i,ref:t}):(0,M.jsx)(Jd,{...i,ref:t})})},`PopoverContent`)),Kd=Ut(`PopoverContent.RemoveScroll`),qd=v.forwardRef(Ad(function(e,t){let n=Id(Wd,e.__scopePopover),r=v.useRef(null),i=Bt(t,r),a=v.useRef(!1),{nodes:o,registry:s}=oi();return v.useEffect(()=>{let e=r.current;if(e)return Wa(e)},[]),(0,M.jsx)(Fa,{as:Kd,allowPinchZoom:!0,shards:v.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,M.jsx)(Yd,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Rn(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Rn(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:Rn(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Jd=v.forwardRef(Ad(function(e,t){let n=Id(Wd,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return(0,M.jsx)(Yd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Yd=v.forwardRef(Ad(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,"aria-describedby":d,branchNodes:f,branchRegistry:p,...m}=e,h=Id(Wd,n),g=Pd(n),[_,y]=v.useState(null),b=Bt(t,y);return si(_),Ei(),(0,M.jsx)(ai,{registry:p,children:(0,M.jsx)(ri,{asChild:!0,loop:!0,trapped:r,branches:f,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,M.jsx)(hl,{"data-state":Xd(h.open),role:`dialog`,id:h.contentId,"aria-labelledby":h.titlePresent?h.titleId:void 0,"aria-describedby":h.descriptionPresent?Zd(d,h.descriptionId):d,...g,...m,ref:b,style:{...m.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})})},`PopoverContentImpl`));function Xd(e){return e?`open`:`closed`}Ad(Xd,`getState`);function Zd(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ad(Zd,`concatAriaDescribedby`);var Qd=Object.defineProperty,$d=(e,t)=>Qd(e,`name`,{value:t,configurable:!0}),ef=`Progress`,tf=100,[nf,rf]=vn(ef),[af,of]=nf(ef),sf=v.forwardRef($d(function(e,t){let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=uf,...o}=e;(i||i===0)&&!pf(i)&&console.error(hf(`${i}`,`Progress`));let s=pf(i)?i:tf;r!==null&&!mf(r,s)&&console.error(gf(`${r}`,`Progress`));let c=mf(r,s)?r:null,l=ff(c)?a(c,s):void 0;return(0,M.jsx)(af,{scope:n,value:c,max:s,children:(0,M.jsx)(ln.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":ff(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":df(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})},`Progress`)),cf=`ProgressIndicator`,lf=v.forwardRef($d(function(e,t){let{__scopeProgress:n,...r}=e,i=of(cf,n);return(0,M.jsx)(ln.div,{"data-state":df(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})},`ProgressIndicator`));function uf(e,t){return`${Math.round(e/t*100)}%`}$d(uf,`defaultGetValueLabel`);function df(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}$d(df,`getProgressState`);function ff(e){return typeof e==`number`}$d(ff,`isNumber`);function pf(e){return ff(e)&&!isNaN(e)&&e>0}$d(pf,`isValidMaxNumber`);function mf(e,t){return ff(e)&&!isNaN(e)&&e<=t&&e>=0}$d(mf,`isValidValueNumber`);function hf(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${tf}\`.`}$d(hf,`getInvalidMaxError`);function gf(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
50
|
+
- a positive number
|
|
51
|
+
- less than the value passed to \`max\` (or ${tf} if no \`max\` prop is set)
|
|
52
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
53
|
+
|
|
54
|
+
Defaulting to \`null\`.`}$d(gf,`getInvalidValueError`);var _f=Object.defineProperty,vf=(e,t)=>_f(e,`name`,{value:t,configurable:!0}),yf=`Radio`,[bf,xf]=vn(yf),[Sf,Cf]=bf(yf);function wf(e){let{__scopeRadio:t,checked:n=!1,children:r,disabled:i,form:a,name:o,onCheck:s,required:c,value:l=`on`,internal_do_not_use_render:u}=e,[d,f]=v.useState(null),[p,m]=v.useState(null),[h,g]=v.useState(null),_={checked:n,disabled:i,required:c,name:o,form:a,value:l,control:d,setControl:f,userClick:h,onUserClick:g,isFormControl:!d||!!a||!!d.closest(`form`),bubbleInput:p,setBubbleInput:m,onCheck:vf(()=>s?.(),`onCheck`)};return(0,M.jsx)(Sf,{scope:t,..._,children:jf(u)?u(_):r})}vf(wf,`RadioProvider`);var Tf=`RadioTrigger`,Ef=v.forwardRef(vf(function({__scopeRadio:e,onClick:t,...n},r){let{checked:i,disabled:a,value:o,setControl:s,onCheck:c,onUserClick:l,isFormControl:u,bubbleInput:d}=Cf(Tf,e),f=Bt(r,s);return(0,M.jsx)(ln.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":Mf(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:f,onClick:Rn(t,e=>{let t=e.isPropagationStopped();i||(l({hasConsumerStoppedPropagation:t}),c()),d&&u&&(t||e.stopPropagation())})})},`RadioTrigger`)),Df=`RadioIndicator`,Of=v.forwardRef(vf(function(e,t){let{__scopeRadio:n,forceMount:r,...i}=e,a=Cf(Df,n);return(0,M.jsx)(ar,{present:r||a.checked,children:(0,M.jsx)(ln.span,{"data-state":Mf(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})},`RadioIndicator`)),kf=`RadioBubbleInput`,Af=v.forwardRef(vf(function({__scopeRadio:e,onClick:t,...n},r){let{control:i,checked:a,required:o,disabled:s,name:c,value:l,form:u,bubbleInput:d,setBubbleInput:f,userClick:p}=Cf(kf,e),m=Bt(r,f),h=Bo(i),g=v.useRef(!1),_=v.useRef(a),y=v.useRef(p),b=v.useRef(null);v.useEffect(()=>{let e=d;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=_.current!==a;_.current=a;let i=p!==null&&p!==y.current;if(y.current=p,i)b.current=r?null:p,r&&n.call(e,a),e.dispatchEvent(new Event(`click`,{bubbles:!p.hasConsumerStoppedPropagation}));else if(r){let t=b.current;b.current=null;let r=a&&t!==null;g.current=!0,n.call(e,a),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),g.current=!1}},[d,a,p]);let x=v.useRef(a);return(0,M.jsx)(ln.input,{type:`radio`,"aria-hidden":!0,defaultChecked:x.current,required:o,disabled:s,name:c,value:l,form:u,...n,tabIndex:-1,ref:m,onClick:Rn(t,e=>{g.current&&e.stopPropagation()}),style:{...n.style,...h,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`RadioBubbleInput`));function jf(e){return typeof e==`function`}vf(jf,`isFunction`);function Mf(e){return e?`checked`:`unchecked`}vf(Mf,`getState`);var Nf=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Pf=`RadioGroup`,[Ff,If]=vn(Pf,[zl,xf]),Lf=zl(),Rf=xf(),[zf,Bf]=Ff(Pf),Vf=v.forwardRef(vf(function(e,t){let{__scopeRadioGroup:n,name:r,form:i,defaultValue:a,value:o,required:s=!1,disabled:c=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...p}=e,m=Lf(n),h=Nr(u),[g,_]=Zn({prop:o,defaultProp:a??null,onChange:f,caller:Pf}),[y,b]=v.useState(null),x=Bt(t,b),S=v.useRef(g);return v.useEffect(()=>{let e=i?y?.ownerDocument.getElementById(i):y?.closest(`form`);if(e instanceof HTMLFormElement){let t=vf(()=>_(S.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[y,i,_]),(0,M.jsx)(zf,{scope:n,name:r,form:i,required:s,disabled:c,value:g,onValueChange:_,children:(0,M.jsx)(Wl,{asChild:!0,...m,orientation:l,dir:h,loop:d,children:(0,M.jsx)(ln.div,{role:`radiogroup`,"aria-required":s,"aria-orientation":l,"data-disabled":c?``:void 0,dir:h,...p,ref:x})})})},`RadioGroup`)),Hf=`RadioGroupItemProvider`,Uf=`RadioGroupItemTrigger`;function Wf(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=Bf(Hf,t),s=Rf(t),c=o.disabled||r;return(0,M.jsx)(wf,{...s,checked:o.value===n,disabled:c,required:o.required,name:o.name,form:o.form,value:n,onCheck:()=>o.onValueChange(n),internal_do_not_use_render:a,children:i})}vf(Wf,`RadioGroupItemProvider`);var Gf=v.forwardRef(vf(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=Lf(n),a=Rf(n),{checked:o,disabled:s}=Cf(Uf,a.__scopeRadio),c=v.useRef(null),l=Bt(t,c),u=v.useRef(!1);return v.useEffect(()=>{let e=vf(e=>{Nf.includes(e.key)&&(u.current=!0)},`handleKeyDown`),t=vf(()=>u.current=!1,`handleKeyUp`);return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,M.jsx)(ql,{asChild:!0,...i,focusable:!s,active:o,children:(0,M.jsx)(Ef,{...a,...r,ref:l,onKeyDown:Rn(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:Rn(r.onFocus,()=>{u.current&&c.current?.click()})})})},`RadioGroupItemTrigger`)),Kf=v.forwardRef(vf(function(e,t){let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,M.jsx)(Wf,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Gf,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,M.jsx)(qf,{__scopeRadioGroup:n})]})})},`RadioGroupItem`)),qf=v.forwardRef(vf(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=Rf(n);return(0,M.jsx)(Af,{...i,...r,ref:t})},`RadioGroupItemBubbleInput`)),Jf=v.forwardRef(vf(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=Rf(n);return(0,M.jsx)(Of,{...i,...r,ref:t})},`RadioGroupIndicator`)),Yf=Object.defineProperty,Xf=(e,t)=>Yf(e,`name`,{value:t,configurable:!0}),Zf={ItemAligned:`item-aligned`,Popper:`popper`},Qf={LTR:`ltr`,RTL:`rtl`},$f=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ep=[` `,`Enter`],tp=`Select`,[np,rp,ip]=Cn(tp),[ap,op]=vn(tp,[ip,ol]),sp=ol(),[cp,lp]=ap(tp),[up,dp]=ap(tp);function fp(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=sp(t),[_,y]=v.useState(null),[b,x]=v.useState(null),[S,C]=v.useState(!1),w=Nr(l),[T,E]=Zn({prop:r,defaultProp:i??!1,onChange:a,caller:tp}),[D,O]=Zn({prop:o,defaultProp:s,onChange:c,caller:tp}),k=v.useRef(null),ee=v.useRef(!1),[te,ne]=v.useState(null),re=Xf(e=>{ne({value:e,hasConsumerStoppedPropagation:ee.current}),O(e)},`handleUserSelect`),ie=v.useRef(D);v.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=Xf(()=>O(ie.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let ae=!_||!!m||!!_.closest(`form`),[A,oe]=v.useState(new Set),se=hr(),ce=Array.from(A).map(e=>e.props.value).join(`;`),le=v.useCallback(e=>{oe(t=>new Set(t).add(e))},[]),ue=v.useCallback(e=>{oe(t=>{let n=new Set(t);return n.delete(e),n})},[]),de={required:p,trigger:_,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:se,value:D,onValueChange:O,hasConsumerStoppedPropagationRef:ee,userSelection:te,onUserSelect:re,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:A,nativeSelectKey:ce,isFormControl:ae};return(0,M.jsx)(ll,{...g,children:(0,M.jsx)(cp,{scope:t,...de,children:(0,M.jsx)(np.Provider,{scope:t,children:(0,M.jsx)(up,{scope:t,onNativeOptionAdd:le,onNativeOptionRemove:ue,children:Qp(h)?h(de):n})})})})}Xf(fp,`SelectProvider`);var pp=Xf(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,M.jsx)(fp,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[n,e?(0,M.jsx)(Zp,{__scopeSelect:t}):null]})})},`Select`),mp=`SelectTrigger`,hp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=sp(n),o=lp(mp,n),s=o.disabled||r,c=Bt(t,o.onTriggerChange),l=rp(n),u=v.useRef(`touch`),[d,f,p]=em(e=>{let t=l().filter(e=>!e.disabled),n=tm(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),m=Xf(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,M.jsx)(dl,{asChild:!0,...a,children:(0,M.jsx)(ln.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":$p(o.value)?``:void 0,...i,ref:c,onClick:Rn(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Rn(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:Rn(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),!(t&&e.key===` `)&&$f.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),gp=`SelectValue`,_p=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=lp(gp,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Bt(t,c.onValueNodeChange);bn(()=>{l(u)},[l,u]);let f=$p(c.value);return(0,M.jsx)(ln.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,M.jsx)(v.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),vp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,M.jsx)(ln.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[yp,bp]=ap(`SelectPortal`,{forceMount:void 0}),xp=Xf(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,M.jsx)(yp,{scope:e.__scopeSelect,forceMount:n,children:(0,M.jsx)(bi,{asChild:!0,...r})})},`SelectPortal`),Sp=`SelectContent`,Cp=v.forwardRef(Xf(function(e,t){let n=bp(Sp,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=lp(Sp,e.__scopeSelect),[o,s]=v.useState();return bn(()=>{s(new DocumentFragment)},[]),(0,M.jsx)(ar,{present:r||a.open,children:({present:e})=>e?(0,M.jsx)(kp,{...i,ref:t}):(0,M.jsx)(wp,{...i,fragment:o})})},`SelectContent`)),wp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Ft.createPortal((0,M.jsx)(Ep,{scope:n,children:(0,M.jsx)(np.Slot,{scope:n,children:(0,M.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Tp=10,[Ep,Dp]=ap(Sp),Op=Ut(`SelectContent.RemoveScroll`),kp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n}=e,{position:r=Zf.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,y=lp(Sp,n),[b,x]=v.useState(null),[S,C]=v.useState(null),w=Bt(t,x),[T,E]=v.useState(null),[D,O]=v.useState(null),k=rp(n),[ee,te]=v.useState(!1),ne=v.useRef(!1),re=v.useRef(!1),ie=v.useRef(!1);v.useEffect(()=>{if(b)return Wa(b)},[b]),Ei();let ae=v.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),A=v.useCallback(()=>ae([T,b]),[ae,T,b]);v.useEffect(()=>{ee&&A()},[ee,A]);let{onOpenChange:oe,triggerPointerDownPosRef:se}=y;v.useEffect(()=>{if(b){let e={x:0,y:0},t=Xf(t=>{e={x:Math.abs(Math.round(t.pageX)-(se.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(se.current?.y??0))}},`handlePointerMove`),n=Xf(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||oe(!1),document.removeEventListener(`pointermove`,t),se.current=null},`handlePointerUp`);return se.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,oe,se]),v.useEffect(()=>{let e=Xf(()=>oe(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[oe]);let[ce,le]=em(e=>{let t=k().filter(e=>!e.disabled),n=tm(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ue=v.useCallback((e,t,n)=>{let r=!re.current;r&&(re.current=!0);let i=!ne.current&&!n;y.value!==void 0&&y.value===t||i?(E(e),i&&(ne.current=!0)):r&&E(e)},[y.value]),de=v.useCallback(()=>b?.focus(),[b]),fe=v.useCallback((e,t,n)=>{if(!e)return;let r=!ie.current;r&&(ie.current=!0);let i=!ne.current&&!n;(y.value!==void 0&&y.value===t||i||r)&&O(e)},[y.value]),pe=r===Zf.Popper?jp:Ap,me=pe===jp?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,M.jsx)(Ep,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ue,selectedItem:T,onItemLeave:de,itemTextRefCallback:fe,focusSelectedItem:A,selectedItemText:D,position:r,isPositioned:ee,searchRef:ce,children:(0,M.jsx)(Fa,{as:Op,allowPinchZoom:!0,children:(0,M.jsx)(ri,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Rn(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,M.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,M.jsx)(pe,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),..._,...me,onPlaced:()=>te(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:Rn(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&le(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ae(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),Ap=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=lp(Sp,n),o=Dp(Sp,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=Bt(t,u),f=rp(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:y}=o,b=v.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==Qf.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Tp,d=Od(a,[Tp,Math.max(Tp,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Tp,d=Od(a,[Tp,Math.max(Tp,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Tp*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Tp,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,ee=m+v+k,te=x-ee;if(ee<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=ee+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+te;s.style.height=t+`px`,h.scrollTop=ee-E+h.offsetTop}s.style.margin=`${Tp}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);bn(()=>b(),[b]);let[x,S]=v.useState();bn(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);let C=v.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]);return(0,M.jsx)(Mp,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,M.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,M.jsx)(ln.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),jp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Tp,...a}=e,o=sp(n);return(0,M.jsx)(hl,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[Mp,Np]=ap(Sp,{}),Pp=`SelectViewport`,Fp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Dp(Pp,n),o=Np(Pp,n),s=Bt(t,a.onViewportChange),c=v.useRef(0);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,M.jsx)(np.Slot,{scope:n,children:(0,M.jsx)(ln.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Rn(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Tp*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Ip,tee]=ap(`SelectGroup`),Lp=`SelectItem`,[Rp,zp]=ap(Lp),Bp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=lp(Lp,n),c=Dp(Lp,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=Bt(t,Lr(e=>c.itemRefCallback?.(e,r,i))),h=hr(),g=v.useRef(`touch`);function _(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return Xf(_,`handleSelect`),(0,M.jsx)(Rp,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,M.jsx)(np.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,M.jsx)(ln.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:Rn(o.onFocus,()=>p(!0)),onBlur:Rn(o.onBlur,()=>p(!1)),onClick:Rn(o.onClick,e=>{i||g.current!==`mouse`&&_(e)}),onPointerUp:Rn(o.onPointerUp,e=>{i||g.current===`mouse`&&_(e)}),onPointerDown:Rn(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:Rn(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Rn(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Rn(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(ep.includes(e.key)&&_(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Vp=`SelectItemText`,Hp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=lp(Vp,n),s=Dp(Vp,n),c=zp(Vp,n),l=dp(Vp,n),[u,d]=v.useState(null),f=Lr(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Bt(t,d,c.onItemTextChange,f),m=u?.textContent,h=v.useMemo(()=>(0,M.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return bn(()=>(g(h),()=>_(h)),[g,_,h]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(ln.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!$p(o.value)?Ft.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Up=`SelectItemIndicator`,Wp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,...r}=e;return zp(Up,n).isSelected?(0,M.jsx)(ln.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Gp=`SelectScrollUpButton`,Kp=v.forwardRef(Xf(function(e,t){let n=Dp(Gp,e.__scopeSelect),r=Np(Gp,e.__scopeSelect),[i,a]=v.useState(!1),o=Bt(t,r.onScrollButtonChange);return bn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};Xf(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,M.jsx)(Yp,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),qp=`SelectScrollDownButton`,Jp=v.forwardRef(Xf(function(e,t){let n=Dp(qp,e.__scopeSelect),r=Np(qp,e.__scopeSelect),[i,a]=v.useState(!1),o=Bt(t,r.onScrollButtonChange);return bn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};Xf(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,M.jsx)(Yp,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Yp=v.forwardRef(Xf(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Dp(`SelectScrollButton`,n),o=v.useRef(null),s=rp(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),bn(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,M.jsx)(ln.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Rn(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Rn(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Rn(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),Xp=`SelectBubbleInput`,Zp=v.forwardRef(Xf(function({__scopeSelect:e,...t},n){let r=lp(Xp,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=v.useRef(null),h=Bt(n,m),g=i??``,_=v.useRef(g),y=v.useRef(d),b=v.useRef(!1),x=Array.from(f).some(e=>(e.props.value??``)===``);return v.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==y.current;y.current=d;let i=_.current!==g;_.current=g;let a=r&&i;if(r&&!i&&d.value!==g&&!d.hasConsumerStoppedPropagation&&n){b.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{b.current=!1,n.call(e,g)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,g),e.dispatchEvent(t)}},[g,d]),(0,M.jsxs)(ln.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{b.current||a(e.target.value)},...t,style:{...pn,...t.style},ref:h,defaultValue:g,children:[$p(i)&&!x?(0,M.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function Qp(e){return typeof e==`function`}Xf(Qp,`isFunction`);function $p(e){return e===``||e===void 0}Xf($p,`shouldShowPlaceholder`);function em(e){let t=Lr(e),n=v.useRef(``),r=v.useRef(0),i=v.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}Xf(a,`updateSearch`),a(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}Xf(em,`useTypeaheadSearch`);function tm(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=nm(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Xf(tm,`findNextItem`);function nm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Xf(nm,`wrapArray`);var rm=Object.defineProperty,im=(e,t)=>rm(e,`name`,{value:t,configurable:!0}),am={Horizontal:`horizontal`,Vertical:`vertical`},om=am.Horizontal,sm=Object.values(am),cm=v.forwardRef(im(function(e,t){let{decorative:n,orientation:r=om,...i}=e,a=lm(r)?r:om,o=a===am.Vertical?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,M.jsx)(ln.div,{"data-orientation":a,...s,...i,ref:t})},`Separator`));function lm(e){return sm.includes(e)}im(lm,`isValidOrientation`);var um=Object.defineProperty,dm=(e,t)=>um(e,`name`,{value:t,configurable:!0}),[fm,pm]=vn(`Tooltip`,[ol]),mm=ol(),hm=`TooltipProvider`,gm=700,_m=`tooltip.open`,[vm,ym]=fm(hm),bm=dm(e=>{let{__scopeTooltip:t,delayDuration:n=gm,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=v.useRef(!0),s=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,M.jsx)(vm,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:v.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),xm=`Tooltip`,[Sm,Cm]=fm(xm),wm=dm(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=ym(xm,e.__scopeTooltip),l=mm(t),[u,d]=v.useState(null),[f,p]=v.useState(void 0),m=hr(),h=v.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,y=v.useRef(!1),[b,x]=Zn({prop:r,defaultProp:i??!1,onChange:dm(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(_m))):c.onClose(),a?.(e)},`onChange`),caller:xm}),S=v.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),C=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,x(!0)},[x]),w=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),T=v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,x(!0),h.current=0},_)},[_,x]);v.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let E=f??m;return(0,M.jsx)(ll,{...l,children:(0,M.jsx)(Sm,{scope:t,contentId:E,setContentId:p,open:b,stateAttribute:S,trigger:u,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayedRef.current?T():C()},[c.isOpenDelayedRef,T,C]),onTriggerLeave:v.useCallback(()=>{g?w():(window.clearTimeout(h.current),h.current=0)},[w,g]),onOpen:C,onClose:w,disableHoverableContent:g,children:n})})},`Tooltip`),Tm=`TooltipTrigger`,Em=v.forwardRef(dm(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=Cm(Tm,n),o=ym(Tm,n),s=mm(n),c=Bt(t,v.useRef(null),a.onTriggerChange),l=v.useRef(!1),u=v.useRef(!1),d=v.useCallback(()=>l.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,M.jsx)(dl,{asChild:!0,...s,children:(0,M.jsx)(ln.button,{"aria-describedby":a.open?Um(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:Rn(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:Rn(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:Rn(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:Rn(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:Rn(e.onBlur,a.onClose),onClick:Rn(e.onClick,a.onClose)})})},`TooltipTrigger`)),Dm=`TooltipPortal`,[Om,km]=fm(Dm,{forceMount:void 0}),Am=dm(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Cm(Dm,t);return(0,M.jsx)(Om,{scope:t,forceMount:n,children:(0,M.jsx)(ar,{present:n||a.open,children:(0,M.jsx)(bi,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),jm=`TooltipContent`,Mm=v.forwardRef(dm(function(e,t){let n=km(jm,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Cm(jm,e.__scopeTooltip);return(0,M.jsx)(ar,{present:r||o.open,children:o.disableHoverableContent?(0,M.jsx)(Fm,{side:i,...a,ref:t}):(0,M.jsx)(Nm,{side:i,...a,ref:t})})},`TooltipContent`)),Nm=v.forwardRef(dm(function(e,t){let n=Cm(jm,e.__scopeTooltip),r=ym(jm,e.__scopeTooltip),i=v.useRef(null),a=Bt(t,i),[o,s]=v.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{s(null),d(!1)},[d]),p=v.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Rm(r,Lm(r,n.getBoundingClientRect())),a=zm(t.getBoundingClientRect()),o=Vm([...i,...a]);s(o),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(c&&u){let e=dm(e=>p(e,u),`handleTriggerLeave`),t=dm(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),v.useEffect(()=>{if(o){let e=dm(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Bm(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,M.jsx)(Fm,{...e,ref:a})},`TooltipContentHoverable`)),Pm=Kt(`TooltipContent`),Fm=v.forwardRef(dm(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=Cm(jm,n),u=mm(n),{onClose:d}=l,[f,p]=v.useState(null),m=Bt(t,p);si(f),v.useEffect(()=>(document.addEventListener(_m,d),()=>document.removeEventListener(_m,d)),[d]),v.useEffect(()=>{if(l.trigger){let e=dm(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:h}=l;return bn(()=>(h(a),()=>{h(void 0)}),[a,h]),(0,M.jsx)(Gr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,M.jsxs)(hl,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:m,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,M.jsx)(Pm,{children:r}),i?(0,M.jsx)(mn,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),Im=v.forwardRef(dm(function(e,t){let{__scopeTooltip:n,...r}=e,i=mm(n);return(0,M.jsx)(vl,{...i,...r,ref:t})},`TooltipArrow`));function Lm(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}dm(Lm,`getExitSideFromRect`);function Rm(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}dm(Rm,`getPaddedExitPoints`);function zm(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}dm(zm,`getPointsFromRect`);function Bm(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}dm(Bm,`isPointInPolygon`);function Vm(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Hm(t)}dm(Vm,`getHull`);function Hm(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}dm(Hm,`getHullPresorted`);function Um(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}dm(Um,`concatAriaDescribedby`);var Wm=oe(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function N({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Wt:`button`;return(0,M.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:j(Wm({variant:t,size:n,className:e})),...i})}var Gm=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Km(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Gm(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var qm=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Jm=e=>{let t=qm(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ym=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Xm={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Zm(e){return e!=null}function Qm(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Xm.width,a=e.size??e.height??Xm.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Ym(...c):Ym(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Xm[`stroke-width`])*Number(e.size??e.width??Xm.width)/Number(t.size??t.width??Xm.width):t.strokeWidth??Xm[`stroke-width`];return[`svg`,{...Object.entries(Xm).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Zm(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Zm(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Zm(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function $m(e,t={}){return Qm(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var eh=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},th=(0,v.createContext)({}),nh=()=>(0,v.useContext)(th),rh=(0,v.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:y=``}=nh()??{},b=!!c||eh(d),[x,S,C=[]]=$m(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Ym(y,s),hasA11yProp:b,attributes:d});return(0,v.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function P(e,t=[],n=[]){let r=typeof e==`string`?Km(e,t,n):e,i=(0,v.forwardRef)(({className:e,...t},n)=>(0,v.createElement)(rh,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Jm(r.name)),i}var ih={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};ih.node;var ah=P(ih),oh={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};oh.node;var sh=P(oh),ch={name:`atom`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`path`,{d:`M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z`,key:`1l2ple`}],[`path`,{d:`M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z`,key:`1wam0m`}]]};ch.node;var lh=P(ch),uh={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};uh.node;var dh=P(uh),fh={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};fh.node;var ph=P(fh),mh={name:`briefcase`,size:24,node:[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]};mh.node;var hh=P(mh),gh={name:`calculator`,size:24,node:[[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,key:`1nb95v`}],[`line`,{x1:`8`,x2:`16`,y1:`6`,y2:`6`,key:`x4nwl0`}],[`line`,{x1:`16`,x2:`16`,y1:`14`,y2:`18`,key:`wjye3r`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M12 10h.01`,key:`1nrarc`}],[`path`,{d:`M8 10h.01`,key:`19clt8`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}]]};gh.node;var _h=P(gh),vh={name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]};vh.node;var yh=P(vh),bh={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};bh.node;var xh=P(bh),Sh={name:`chart-line`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]],aliases:[`line-chart`]};Sh.node;var Ch=P(Sh),wh={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};wh.node;var Th=P(wh),Eh={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Eh.node;var Dh=P(Eh),Oh={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};Oh.node;var kh=P(Oh),Ah={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Ah.node;var jh=P(Ah),Mh={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Mh.node;var Nh=P(Mh),Ph={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};Ph.node;var Fh=P(Ph),Ih={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Ih.node;var Lh=P(Ih),Rh={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};Rh.node;var zh=P(Rh),Bh={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};Bh.node;var Vh=P(Bh),Hh={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Hh.node;var Uh=P(Hh),Wh={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};Wh.node;var Gh=P(Wh),Kh={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Kh.node;var qh=P(Kh),Jh={name:`clipboard-paste`,size:24,node:[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]};Jh.node;var Yh=P(Jh),Xh={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};Xh.node;var Zh=P(Xh),Qh={name:`code`,size:24,node:[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]};Qh.node;var $h=P(Qh),eg={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};eg.node;var tg=P(eg),ng={name:`corner-up-left`,size:24,node:[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]};ng.node;var rg=P(ng),ig={name:`cpu`,size:24,node:[[`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`}]]};ig.node;var ag=P(ig),og={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};og.node;var sg=P(og),cg={name:`dna`,size:24,node:[[`path`,{d:`m10 16 1.5 1.5`,key:`11lckj`}],[`path`,{d:`m14 8-1.5-1.5`,key:`1ohn8i`}],[`path`,{d:`M15 2c-1.798 1.998-2.518 3.995-2.807 5.993`,key:`80uv8i`}],[`path`,{d:`m16.5 10.5 1 1`,key:`696xn5`}],[`path`,{d:`m17 6-2.891-2.891`,key:`xu6p2f`}],[`path`,{d:`M2 15c6.667-6 13.333 0 20-6`,key:`1pyr53`}],[`path`,{d:`m20 9 .891.891`,key:`3xwk7g`}],[`path`,{d:`M3.109 14.109 4 15`,key:`q76aoh`}],[`path`,{d:`m6.5 12.5 1 1`,key:`cs35ky`}],[`path`,{d:`m7 18 2.891 2.891`,key:`1sisit`}],[`path`,{d:`M9 22c1.798-1.998 2.518-3.995 2.807-5.993`,key:`q3hbxp`}]]};cg.node;var lg=P(cg),ug={name:`dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]};ug.node;var dg=P(ug),fg={name:`download`,size:24,node:[[`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`}]]};fg.node;var pg=P(fg),mg={name:`dumbbell`,size:24,node:[[`path`,{d:`M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z`,key:`9m4mmf`}],[`path`,{d:`m2.5 21.5 1.4-1.4`,key:`17g3f0`}],[`path`,{d:`m20.1 3.9 1.4-1.4`,key:`1qn309`}],[`path`,{d:`M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z`,key:`1t2c92`}],[`path`,{d:`m9.6 14.4 4.8-4.8`,key:`6umqxw`}]]};mg.node;var hg=P(mg),gg={name:`eighth-notes`,size:24,node:[[`path`,{d:`M21 16V3a1 1 0 0 0-1.28-.96l-10 2.917a1 1 0 0 0-.72.96V19`,key:`uy6ho8`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}],[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}]],aliases:[`music`]};gg.node;var _g=P(gg),vg={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};vg.node;var yg=P(vg),bg={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};bg.node;var xg=P(bg),Sg={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Sg.node;var Cg=P(Sg),wg={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};wg.node;var Tg=P(wg),Eg={name:`file-archive`,size:24,node:[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]};Eg.node;var Dg=P(Eg),Og={name:`file-text`,size:24,node:[[`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`}]]};Og.node;var kg=P(Og),Ag={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};Ag.node;var jg=P(Ag),Mg={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};Mg.node;var Ng=P(Mg),Pg={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Pg.node;var Fg=P(Pg),Ig={name:`graduation-cap`,size:24,node:[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]};Ig.node;var Lg=P(Ig),Rg={name:`heart-pulse`,size:24,node:[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}],[`path`,{d:`M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`,key:`auskq0`}]]};Rg.node;var zg=P(Rg),Bg={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};Bg.node;var Vg=P(Bg),Hg={name:`landmark`,size:24,node:[[`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`}]]};Hg.node;var nee=P(Hg),Ug={name:`languages`,size:24,node:[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]};Ug.node;var ree=P(Ug),Wg={name:`leaf`,size:24,node:[[`path`,{d:`M11 20a10 10 0 0010-10 25.9 25.9 0 00-1.04-7.281 1 1 0 00-1.755-.325C15.833 5.5 13 5.5 9.8 6.1A7 7 0 0011 20`,key:`1wjnjv`}],[`path`,{d:`M2 21a5 5 0 012.911-4.544C7.613 15.212 8.351 15.24 11 13`,key:`c1ejpn`}]]};Wg.node;var iee=P(Wg),Gg={name:`library`,size:24,node:[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]};Gg.node;var Kg=P(Gg),qg={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};qg.node;var aee=P(qg),Jg={name:`maximize`,size:24,node:[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]};Jg.node;var oee=P(Jg),Yg={name:`message-circle`,size:24,node:[[`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`}]]};Yg.node;var see=P(Yg),Xg={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};Xg.node;var Zg=P(Xg),Qg={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};Qg.node;var $g=P(Qg),e_={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};e_.node;var cee=P(e_),t_={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};t_.node;var lee=P(t_),n_={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};n_.node;var uee=P(n_),r_={name:`network`,size:24,node:[[`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`}]]};r_.node;var i_=P(r_),a_={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};a_.node;var o_=P(a_),s_={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};s_.node;var c_=P(s_),l_={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};l_.node;var u_=P(l_),d_={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};d_.node;var f_=P(d_),p_={name:`pen-tool`,size:24,node:[[`path`,{d:`m18 13-.654-4.736a4 4 0 00-2.756-3.266l-9.163-2.9a2 2 0 00-2.017.493l-.82.819a2 2 0 00-.492 2.017l2.9 9.163a4 4 0 003.266 2.756L13 18`,key:`93nyr4`}],[`path`,{d:`M18.648 12.352a1.205 1.205 0 011.704 0l1.296 1.296a1.205 1.205 0 010 1.704l-6.296 6.296a1.205 1.205 0 01-1.704 0l-1.296-1.296a1.205 1.205 0 010-1.704z`,key:`lnux7s`}],[`path`,{d:`m3 3 6.586 6.586`,key:`1igwcn`}],[`circle`,{cx:`11`,cy:`11`,r:`2`,key:`xmgehs`}]]};p_.node;var m_=P(p_),h_={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};h_.node;var g_=P(h_),__={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};__.node;var dee=P(__),v_={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};v_.node;var y_=P(v_),b_={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};b_.node;var x_=P(b_),S_={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};S_.node;var C_=P(S_),w_={name:`scale`,size:24,node:[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]};w_.node;var T_=P(w_),E_={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};E_.node;var D_=P(E_),O_={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};O_.node;var k_=P(O_),A_={name:`shield`,size:24,node:[[`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`}]]};A_.node;var j_=P(A_),M_={name:`sigma`,size:24,node:[[`path`,{d:`M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2`,key:`wuwx1p`}]]};M_.node;var N_=P(M_),P_={name:`square-plus`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]],aliases:[`plus-square`]};P_.node;var F_=P(P_),I_={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};I_.node;var L_=P(I_),R_={name:`stethoscope`,size:24,node:[[`path`,{d:`M11 2v2`,key:`1539x4`}],[`path`,{d:`M5 2v2`,key:`1yf1q8`}],[`path`,{d:`M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1`,key:`rb5t3r`}],[`path`,{d:`M8 15a6 6 0 0 0 12 0v-3`,key:`x18d4x`}],[`circle`,{cx:`20`,cy:`10`,r:`2`,key:`ts1r5v`}]]};R_.node;var z_=P(R_),B_={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};B_.node;var V_=P(B_),H_={name:`telescope`,size:24,node:[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]};H_.node;var U_=P(H_),W_={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};W_.node;var G_=P(W_),K_={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};K_.node;var q_=P(K_),J_={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};J_.node;var fee=P(J_),Y_={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};Y_.node;var pee=P(Y_),X_={name:`waypoints`,size:24,node:[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]};X_.node;var Z_=P(X_),Q_={name:`wrench`,size:24,node:[[`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`}]]};Q_.node;var mee=P(Q_),$_={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};$_.node;var ev=P($_),tv=({className:e,...t})=>(0,M.jsx)(ee,{className:j(`relative flex-1 overflow-y-hidden`,e),initial:`smooth`,resize:`smooth`,role:`log`,...t}),nv=({className:e,...t})=>(0,M.jsx)(ee.Content,{className:j(`flex flex-col gap-8 p-4`,e),...t}),rv=({className:e,...t})=>{let{isAtBottom:n,scrollToBottom:r}=te(),i=(0,v.useCallback)(()=>{r()},[r]);return!n&&(0,M.jsx)(N,{className:j(`absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full`,e),onClick:i,size:`icon`,type:`button`,variant:`outline`,...t,children:(0,M.jsx)(ah,{className:`size-4`})})},iv=`vercel.ai.error`,av=Symbol.for(iv),ov=class e extends Error{constructor({name:e,message:t,cause:n}){super(t),this[av]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,iv)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}},sv=`AI_APICallError`,cv=`vercel.ai.error.${sv}`,lv=Symbol.for(cv),uv=class extends ov{constructor({message:e,url:t,requestBodyValues:n,statusCode:r,responseHeaders:i,responseBody:a,cause:o,isRetryable:s=r!=null&&(r===408||r===409||r===429||r>=500),data:c}){super({name:sv,message:e,cause:o}),this[lv]=!0,this.url=t,this.requestBodyValues=n,this.statusCode=r,this.responseHeaders=i,this.responseBody=a,this.isRetryable=s,this.data=c}static isInstance(e){return ov.hasMarker(e,cv)}},dv=`AI_EmptyResponseBodyError`,fv=`vercel.ai.error.${dv}`,pv=Symbol.for(fv),mv=class extends ov{constructor({message:e=`Empty response body`}={}){super({name:dv,message:e}),this[pv]=!0}static isInstance(e){return ov.hasMarker(e,fv)}};function hv(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.toString():JSON.stringify(e)}var gv=`AI_InvalidArgumentError`,_v=`vercel.ai.error.${gv}`,vv=Symbol.for(_v),yv=class extends ov{constructor({message:e,cause:t,argument:n}){super({name:gv,message:e,cause:t}),this[vv]=!0,this.argument=n}static isInstance(e){return ov.hasMarker(e,_v)}},bv=`AI_JSONParseError`,xv=`vercel.ai.error.${bv}`,Sv=Symbol.for(xv),Cv=class extends ov{constructor({text:e,cause:t}){super({name:bv,message:`JSON parsing failed: Text: ${e}.\nError message: ${hv(t)}`,cause:t}),this[Sv]=!0,this.text=e}static isInstance(e){return ov.hasMarker(e,xv)}},wv=`AI_TypeValidationError`,Tv=`vercel.ai.error.${wv}`,Ev=Symbol.for(Tv),Dv=class e extends ov{constructor({value:e,cause:t,context:n}){let r=`Type validation failed`;if(n?.field&&(r+=` for ${n.field}`),n?.entityName||n?.entityId){r+=` (`;let e=[];n.entityName&&e.push(n.entityName),n.entityId&&e.push(`id: "${n.entityId}"`),r+=e.join(`, `),r+=`)`}super({name:wv,message:`${r}: Value: ${JSON.stringify(e)}.\nError message: ${hv(t)}`,cause:t}),this[Ev]=!0,this.value=e,this.context=n}static isInstance(e){return ov.hasMarker(e,Tv)}static wrap({value:t,cause:n,context:r}){return e.isInstance(n)&&n.value===t&&n.context?.field===r?.field&&n.context?.entityName===r?.entityName&&n.context?.entityId===r?.entityId?n:new e({value:t,cause:n,context:r})}},Ov=`AI_UnsupportedFunctionalityError`,kv=`vercel.ai.error.${Ov}`,Av=Symbol.for(kv),jv=class extends ov{constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:Ov,message:t}),this[Av]=!0,this.functionality=e}static isInstance(e){return ov.hasMarker(e,kv)}};function Mv(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Nv(e,t=`|`){return e.map(e=>sy(e)).join(t)}function Pv(e,t){return typeof t==`bigint`?t.toString():t}var Fv=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Iv(e){return new Fv(e)}function Lv(e){return e==null}function Rv(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function zv(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Bv=Symbol(`evaluating`);function Vv(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Bv)return r===void 0&&(r=Bv,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Hv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Uv(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function Wv(e){return Uv(e._zod.def)??e._zod.def.shape}function Gv(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Hv(this,t,e),e},enumerable:!0,configurable:!0})}function Kv(e,t,n){t in e?Hv(e,t,n):e[t]=n}function qv(e,t,n,r){let i=Wv(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Gv(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Kv(e,a,r?r(n.value,a):n.value))}}function Jv(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Gv(e,n,()=>t[n]):Kv(e,n,r.value))}}function Yv(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Xv(e){return JSON.stringify(e)}function Zv(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Qv=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function $v(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ey=Iv(()=>{if(Vy.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ty(e){if($v(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return $v(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ny(e){return ty(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ry=new Set([`string`,`number`,`symbol`]);function iy(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ay(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function oy(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function sy(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function cy(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ly={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},uy={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function dy(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return qv(i,e,fy(e,t)),ay(e,Yv(n,{shape:i,checks:[]}))}function fy(e,t){let n=Wv(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function py(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(fy(e,t)),a={};return qv(a,e,Reflect.ownKeys(Wv(e)).filter(e=>!i.has(e))),ay(e,Yv(n,{shape:a,checks:[]}))}function my(e,t){if(!ty(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=Wv(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ay(e,Yv(e._zod.def,{shape:hy(e,t)}))}function hy(e,t){let n={};return qv(n,e,Reflect.ownKeys(Wv(e))),Jv(n,t),n}function gy(e,t){if(!ty(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ay(e,Yv(e._zod.def,{shape:hy(e,t)}))}function _y(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return qv(n,e,Reflect.ownKeys(Wv(e))),qv(n,t,Reflect.ownKeys(Wv(t))),ay(e,Yv(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function vy(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(fy(t,n)):void 0,o={};return qv(o,t,Reflect.ownKeys(Wv(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),ay(t,Yv(t._zod.def,{shape:o,checks:[]}))}function yy(e,t,n){let r=n?new Set(fy(t,n)):void 0,i={};return qv(i,t,Reflect.ownKeys(Wv(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),ay(t,Yv(t._zod.def,{shape:i}))}function by(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function xy(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Sy(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Cy(e){return typeof e==`string`?e:e?.message}function wy(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Ty(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ey(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Cy(e.inst?._zod.def?.error?.(e))??Cy(a?.(e))??Cy(t?.error?.(e))??Cy(n.customError?.(e))??Cy(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var hee=/[\uD800-\uDBFF]/;function Dy(e){let t=e.length;if(!hee.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Oy(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function gee(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function ky(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function _ee(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):vee(e,n,r.value)}}function Ay(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function jy(e,t,n){return Ay(e,t,n,!1)}function My(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Ay(this,n,r(this))},set(e){Ay(this,n,e)}})}return t}function vee(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ay(this,t,n.bind(this))},set(e){Ay(this,t,e)}})}function yee(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ny,Py=!1,bee={configurable:!0,get(){Py=!0}};function Fy(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Ny!==e._zod?Ny=void 0:(Ny=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,bee);let e=Py;Py=!1;try{let r=n(this);return Py?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Py||=e,r}catch(n){throw delete this[t],Py||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function xee(e,t,n,r){let i=yee(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var See=`~constantCatch`;function Cee(e){let t=()=>e;return t[See]=!0,t}var Iy,Ly={value:void 0,enumerable:!1},Ry=`captureStackTrace`in Error?Error:null;function wee(e){let t=Ry;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ry=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function F(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ly.value=new a(r);try{Object.defineProperty(n,"_zod",Ly)}finally{Ly.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),_ee(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?wee(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var zy=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},By=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Iy=globalThis).__zod_globalConfig??(Iy.__zod_globalConfig={});var Vy=globalThis.__zod_globalConfig;function Hy(e){return e&&Object.assign(Vy,e),Vy}function Tee(){let e=this._zod;return e.message??=JSON.stringify(e.def,Pv,2),e.message}function Eee(e){this._zod.message=e}var Dee={get:Tee,set:Eee,enumerable:!0,configurable:!0},Uy={value:void 0,enumerable:!1},Wy=new WeakSet([Object.prototype,Error.prototype]),Oee=F(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Uy.value=t,Object.defineProperty(e,"issues",Uy),Uy.value=void 0,Object.defineProperty(e,"message",Dee);let n=Object.getPrototypeOf(e);Wy.has(n)||(Wy.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function kee(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Aee(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?kee(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function jee(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Gy(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Ky=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new zy;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ey(e,o,Hy())));throw Qv(n,a?.callee??t),n}return s.value};return t},qy=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ey(e,o,Hy())));throw Qv(n,a?.callee??t),n}return s.value};return t},Jy=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new zy;return a.issues.length?Yy(e,a.issues,i):{success:!0,data:a.value}};function Yy(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ey(e,n,Hy()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Xy=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Yy(e,a.issues,i):{success:!0,data:a.value}},Mee=Symbol.for(`zod.compile.invalid`),Nee=Symbol.for(`zod.compile.fallback`),Pee=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Mee)return!0;if(r.definite===!0&&n===void 0)return!1}return Fee(e,t,n)});function Fee(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Nee]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new zy;return a.issues.length===0}var Iee=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Lee=e=>{let t=Ky(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Gy(n,a))};return n},Ree=e=>{let t=Ky(e),n=(e,r,i,a)=>t(e,r,i,Gy(n,a));return n},zee=e=>{let t=qy(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Gy(n,a))};return n},Bee=e=>{let t=qy(e),n=async(e,r,i,a)=>await t(e,r,i,Gy(n,a));return n},Vee=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Jy(e)(t,n,i)},Hee=e=>(t,n,r)=>Jy(e)(t,n,r),Uee=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Xy(e)(t,n,i)},Wee=e=>async(t,n,r)=>Xy(e)(t,n,r),Gee=/^[cC][0-9a-z]{6,}$/,Kee=/^[0-9a-z]+$/,qee=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Jee=/^[0-9a-vA-V]{20}$/,Yee=/^[A-Za-z0-9]{27}$/,Xee=/^[a-zA-Z0-9_-]{21}$/;function Zee(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Qee=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$ee=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Zy=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ete=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tte=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function nte(){return new RegExp(tte,`u`)}var rte=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ite=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ate=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ote=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ste=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cte=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,lte=/^https?$/,ute=/^\+[1-9]\d{6,14}$/,Qy=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function dte(e){return RegExp(`^${e}$`)}var $y=dte(Qy);function eb(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tb(e){return RegExp(`^${eb(e)}$`)}function nb(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${eb({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${eb({precision:e.precision})}`:n;return RegExp(`^${Qy}T(?:${r})$`)}var rb=/^[\s\S]{0,}$/,ib=/^-?\d+$/,ab=/^-?\d+(?:\.\d+)?$/,ob=/^(?:true|false)$/i,sb=/^null$/i,cb=/^[^A-Z]*$/,lb=/^[^a-z]*$/,ub=F(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),db=e=>{let t=e.value;return!Lv(t)&&t.length!==void 0},fb={number:`number`,bigint:`bigint`,object:`date`},pb=F(`$ZodCheckLessThan`,(e,t)=>{ub.init(e,t);let n=fb[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:fb[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mb=F(`$ZodCheckGreaterThan`,(e,t)=>{ub.init(e,t);let n=fb[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:fb[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),hb=F(`$ZodCheckMultipleOf`,(e,t)=>{ub.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):zv(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),gb=F(`$ZodCheckNumberFormat`,(e,t)=>{ub.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ly[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),_b=F(`$ZodCheckMaxLength`,(e,t)=>{var n;ub.init(e,t),(n=e._zod.def).when??(n.when=db),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Dy(r):i)<=t.maximum)return;let a=Oy(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vb=F(`$ZodCheckMinLength`,(e,t)=>{var n;ub.init(e,t),(n=e._zod.def).when??(n.when=db),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Dy(r):i)>=t.minimum)return;let a=Oy(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yb=F(`$ZodCheckLengthEquals`,(e,t)=>{var n;ub.init(e,t),(n=e._zod.def).when??(n.when=db),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Dy(r):i;if(a===t.length)return;let o=Oy(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),bb=F(`$ZodCheckStringFormat`,(e,t)=>{var n,r;ub.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),xb=F(`$ZodCheckRegex`,(e,t)=>{bb.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Sb=F(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=cb,bb.init(e,t)}),Cb=F(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=lb,bb.init(e,t)}),wb=F(`$ZodCheckIncludes`,(e,t)=>{ub.init(e,t);let n=iy(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Tb=F(`$ZodCheckStartsWith`,(e,t)=>{ub.init(e,t);let n=RegExp(`^${iy(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Eb=F(`$ZodCheckEndsWith`,(e,t)=>{ub.init(e,t);let n=RegExp(`.*${iy(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Db(e,t,n){e.issues.length&&t.issues.push(...Sy(n,e.issues))}var Ob=F(`$ZodCheckProperties`,(e,t)=>{ub.init(e,t),jy(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:`object`,code:`invalid_type`,input:r.value,inst:e});return}n??=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]);let i=r.value,a;for(let[e,t]of n){let n=t._zod.run({value:i[e],issues:[]},{});n instanceof Promise?(a??=[],a.push(n.then(t=>Db(t,r,e)))):Db(n,r,e)}if(a)return Promise.all(a).then(()=>void 0)}}),kb=F(`$ZodCheckOverwrite`,(e,t)=>{ub.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Ab=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
55
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
56
|
+
`)}\n};`)(...Object.values(this.closed))}},jb={major:4,minor:6,patch:7},Mb=F(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jb;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=by(t),a;for(let o of n){if(o._zod.def.when){if(xy(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new zy;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ty(t.issues,n,e),i||=by(t,n))});else{if(t.issues.length===n)continue;Ty(t.issues,n,e),i||=by(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(by(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new zy;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new zy;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return jy(this,`~standard`,Fb(this))},set"~standard"(e){Ay(this,`~standard`,e)}}),Nb=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ey(e,t,Hy()))}:{value:e.value};async function Pb(e,t){let n={async:!0};return Nb(await e._zod.run({value:t,issues:[]},n),n)}function Fb(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Nb(r,n)}catch{}return Pb(e,t)},vendor:`zod`,version:1}}var Ib=F(`$ZodString`,(e,t)=>{Mb.init(e,t),e._zod.pattern=t.pattern??rb,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Lb=F(`$ZodStringFormat`,(e,t)=>{bb.init(e,t),Ib.init(e,t)}),Rb=F(`$ZodGUID`,(e,t)=>{t.pattern??=$ee,Lb.init(e,t)}),zb=F(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Zy(e)}else t.pattern??=Zy();Lb.init(e,t)}),Bb=F(`$ZodEmail`,(e,t)=>{t.pattern??=ete,Lb.init(e,t)});function Vb(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Hb(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Vb(e)||2:Ub(e,t)}function Ub(e,t){if(!t.normalize&&t.protocol?.source===lte.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Wb=/[\t\n\r]/g;function Gb(e){return e.replace(Wb,``)}function Kb(e,t){return t.lastIndex=0,t.test(e.hostname)}function qb(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Jb=F(`$ZodURL`,(e,t)=>{Lb.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Hb(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Gb(r);return}t.hostname&&!Kb(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!qb(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Gb(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Yb=F(`$ZodEmoji`,(e,t)=>{t.pattern??=nte(),Lb.init(e,t)}),Xb=F(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Xee:Zee(t.length),Lb.init(e,t)}),Zb=F(`$ZodCUID`,(e,t)=>{t.pattern??=Gee,Lb.init(e,t)}),Qb=F(`$ZodCUID2`,(e,t)=>{t.pattern??=Kee,Lb.init(e,t)}),$b=F(`$ZodULID`,(e,t)=>{t.pattern??=qee,Lb.init(e,t)}),ex=F(`$ZodXID`,(e,t)=>{t.pattern??=Jee,Lb.init(e,t)}),tx=F(`$ZodKSUID`,(e,t)=>{t.pattern??=Yee,Lb.init(e,t)}),nx=F(`$ZodISODateTime`,(e,t)=>{t.pattern??=nb(t),Lb.init(e,t)}),rx=F(`$ZodISODate`,(e,t)=>{t.pattern??=$y,Lb.init(e,t)}),ix=F(`$ZodISOTime`,(e,t)=>{t.pattern??=tb(t),Lb.init(e,t)}),ax=F(`$ZodISODuration`,(e,t)=>{t.pattern??=Qee,Lb.init(e,t)}),ox=F(`$ZodIPv4`,(e,t)=>{t.pattern??=rte,Lb.init(e,t)}),sx=/^[0-9a-fA-F:.]+$/;function cx(e){return sx.test(e)?Vb(`http://[${e}]`):!1}var lx=F(`$ZodIPv6`,(e,t)=>{t.pattern??=ite,Lb.init(e,t),e._zod.check=n=>{cx(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),ux=F(`$ZodCIDRv4`,(e,t)=>{t.pattern??=ate,Lb.init(e,t)});function dx(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:cx(n)}var fx=F(`$ZodCIDRv6`,(e,t)=>{t.pattern??=ote,Lb.init(e,t),e._zod.check=n=>{dx(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function px(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var mx=/^[0-9a-zA-Z+/]*={0,2}$/,hx=F(`$ZodBase64`,(e,t)=>{t.pattern??=mx,Lb.init(e,t),e._zod.check=n=>{px(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),gx=/^[A-Za-z0-9_-]*$/;function _x(e){if(!gx.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return px(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var vx=F(`$ZodBase64URL`,(e,t)=>{t.pattern??=gx,Lb.init(e,t),e._zod.check=n=>{_x(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),yx=F(`$ZodE164`,(e,t)=>{t.pattern??=ute,Lb.init(e,t)});function bx(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var xx=F(`$ZodJWT`,(e,t)=>{Lb.init(e,t),e._zod.check=n=>{bx(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Sx=F(`$ZodNumber`,(e,t)=>{Mb.init(e,t),e._zod.pattern=ab,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Cx=F(`$ZodNumberFormat`,(e,t)=>{gb.init(e,t),Sx.init(e,t)}),wx=F(`$ZodBoolean`,(e,t)=>{Mb.init(e,t),e._zod.pattern=ob,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Tx=F(`$ZodNull`,(e,t)=>{Mb.init(e,t),e._zod.pattern=sb,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Ex=F(`$ZodUnknown`,(e,t)=>{Mb.init(e,t),e._zod.parse=e=>e}),Dx=F(`$ZodNever`,(e,t)=>{Mb.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Ox(e,t){let n=wy(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of wy(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Ty(n.issues,t,e),n}}return i(n,a)}}var kx=e=>Array.isArray(e)?e.length:-1;function Ax(e,t,n){e.issues.length&&t.issues.push(...Sy(n,e.issues)),t.value[n]=e.value}var jx=F(`$ZodArray`,(e,t)=>{Mb.init(e,t);let n=Vy.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Ax(t,r,e)));else if(Ax(c,r,e),s&&c.issues.length!==0&&by(c))break}return o.length?Promise.all(o).then(()=>r):r},Ox(e,kx)});function Mx(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Sy(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Nx=[];function Px(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Nx,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=cy(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Fx(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(by(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Mx(e,n,i,t,d,f))):Mx(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Ix=F(`$ZodObject`,(e,t)=>{Mb.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Iv(()=>Px(t));Fy(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||Hv(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=$v,o=t.catchall,s,c=Vy.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(by(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Mx(n,t,e,r,a,o))):Mx(s,t,e,r,a,o)}return o?Fx(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Lx=F(`$ZodObjectJIT`,(e,t)=>{Ix.init(e,t);let n=e._zod.parse,r=Iv(()=>Px(t)),i=Vy.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Ab([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
57
|
+
let ${e}_ab = false;
|
|
58
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
59
|
+
const iss = ${e}.issues[i];
|
|
60
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
61
|
+
payload.issues.push(iss);
|
|
62
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
63
|
+
}
|
|
64
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
65
|
+
payload.value = newResult;
|
|
66
|
+
return payload;
|
|
67
|
+
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Xv(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
68
|
+
const ${n}_present = ${i};
|
|
69
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
70
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (${e}) {
|
|
74
|
+
newResult[${r}] = ${n}.value;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
`)}else f?(o.write(`
|
|
79
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
80
|
+
}
|
|
81
|
+
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
82
|
+
if (${n}.value !== undefined || ${i}) {
|
|
83
|
+
newResult[${r}] = ${n}.value;
|
|
84
|
+
}
|
|
85
|
+
`)):o.write(`
|
|
86
|
+
const ${n}_present = ${i};
|
|
87
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
88
|
+
}
|
|
89
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
90
|
+
payload.issues.push({
|
|
91
|
+
code: "invalid_type",
|
|
92
|
+
expected: "nonoptional",
|
|
93
|
+
input: undefined,
|
|
94
|
+
path: [${r}]
|
|
95
|
+
});
|
|
96
|
+
if (ctx && ctx.abortEarly) {
|
|
97
|
+
payload.value = newResult;
|
|
98
|
+
return payload;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (${n}_present) {
|
|
103
|
+
newResult[${r}] = ${n}.value;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=$v,c=!Vy.jitless,l=c&&ey.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Fx([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Rx(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!by(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ey(e,r,Hy())))}),t)}var zx=F(`$ZodUnion`,(e,t)=>{Mb.init(e,t),Fy(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),Fy(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Fy(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),Fy(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Rv(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Rx(t,r,e,i)):Rx(o,r,e,i)}});function Bx(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Vx=F(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,zx.init(e,t);let n=e._zod.parse;Fy(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||Hv(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=Uv(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=Iv(()=>Bx(t));e._zod.parse=(i,a)=>{let o=i.value;if(!$v(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Hx=F(`$ZodIntersection`,(e,t)=>{Mb.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Wx(e,t,n)):Wx(e,i,a)}});function Ux(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ty(e)&&ty(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Ux(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Ux(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Wx(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Ux(t.value,n.value);if(!c.valid){if(by(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Gx=F(`$ZodRecord`,(e,t)=>{Mb.init(e,t);let n=Vy.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!ty(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ey(e,i,Hy())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Sy(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Sy(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&ab.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Ey(e,i,Hy())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Sy(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Sy(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Kx=F(`$ZodEnum`,(e,t)=>{Mb.init(e,t);let n=Mv(t.entries),r=new Set(n);e._zod.values=r,Fy(e,`pattern`,e=>{let t=Mv(e.def.entries).filter(e=>ry.has(typeof e));return RegExp(t.length?`^(${t.map(e=>iy(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),qx=F(`$ZodLiteral`,(e,t)=>{Mb.init(e,t);let n=new Set(t.values);e._zod.values=n,Fy(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?iy(e):e?iy(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Jx=F(`$ZodTransform`,(e,t)=>{Mb.init(e,t),e._zod.optin=`optional`,Vy.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new By(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new zy;return n.value=i,n}});function Yx(e,t){return e.value=t.issues.length?void 0:t.value,e}var Xx=F(`$ZodOptional`,(e,t)=>{Mb.init(e,t),Fy(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,Fy(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),Fy(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Rv(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Yx(e,t)):Yx(e,r)}return t.innerType._zod.run(e,n)}}),Zx=F(`$ZodExactOptional`,(e,t)=>{Xx.init(e,t),Fy(e,`values`,e=>e.def.innerType._zod.values),Fy(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Qx=F(`$ZodNullable`,(e,t)=>{Mb.init(e,t),Fy(e,`optin`,e=>e.def.innerType._zod.optin),Fy(e,`optout`,e=>e.def.innerType._zod.optout),Fy(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Rv(t.source)}|null)$`):void 0}),Fy(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),$x=F(`$ZodDefault`,(e,t)=>{Mb.init(e,t),e._zod.optin=`defaulted`,Fy(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>eS(e,t)):eS(r,t)}});function eS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var tS=F(`$ZodPrefault`,(e,t)=>{Mb.init(e,t),e._zod.optin=`defaulted`,Fy(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),nS=F(`$ZodNonOptional`,(e,t)=>{Mb.init(e,t),Fy(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>rS(t,e)):rS(i,e)}});function rS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function iS(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ey(e,r,Hy()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var aS=F(`$ZodCatch`,(e,t)=>{Mb.init(e,t),Fy(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),Fy(e,`optout`,e=>e.def.innerType._zod.optout),Fy(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>iS(e,r,t,n)):iS(e,r,t,n)}}),oS=F(`$ZodPipe`,(e,t)=>{Mb.init(e,t),Fy(e,`values`,e=>e.def.in._zod.values),Fy(e,`optin`,e=>e.def.in._zod.optin),Fy(e,`optout`,e=>e.def.out._zod.optout),Fy(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>sS(e,t.in,n)):sS(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>sS(e,t.out,n)):sS(r,t.out,n)}});function sS(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var cS=F(`$ZodReadonly`,(e,t)=>{Mb.init(e,t),Fy(e,`propValues`,e=>e.def.innerType._zod.propValues),Fy(e,`values`,e=>e.def.innerType._zod.values),Fy(e,`optin`,e=>e.def.innerType?._zod?.optin),Fy(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(lS):lS(r)}});function lS(e){return e.memo||(e.value=Object.freeze(e.value)),e}var uS=F(`$ZodLazy`,(e,t)=>{Mb.init(e,t),Vv(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),Fy(e,`pattern`,e=>e.innerType?._zod?.pattern),Fy(e,`propValues`,e=>e.innerType?._zod?.propValues),Fy(e,`optin`,e=>e.innerType?._zod?.optin??void 0),Fy(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),dS=F(`$ZodCustom`,(e,t)=>{ub.init(e,t),Mb.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>fS(t,n,r,e));fS(i,n,r,e)}});function fS(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ky(e))}}var pS=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},mS=`~memo`,hS=[];function gS(e){return typeof e==`object`&&!!e}function _S(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var vS=new WeakMap,yS=0,bS=1,xS=2;function SS(e,t,n){let r=vS.get(e);if(r!==void 0)return r?xS:yS;if(t.has(e))return xS;t.add(e);let i=yS,a=e=>{if(i!==xS&&e?._zod){let r=SS(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=yS;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?bS:o.value?._zod?SS(o.value,t,n):yS;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Uv(c);s(e?o(e,!0):bS),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?SS(r,t,!1):bS);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),CS(e,i)}function CS(e,t){return t!==bS&&vS.set(e,t===xS),t}function wS(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var TS,ES=[],DS={alloc(e,t,n){let r=TS;if(!r)return n;TS=void 0;let i={value:n,issues:null};return r.set(t.value,i),ES.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&kS(n,e.value))throw new pS;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=SS(e,new Set,!1);if(i===yS)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===xS||r?n=!0:r=!0}let l=s.value;if(!gS(l))return t(s,c);let u=c[mS];u||(u={buckets:new WeakMap,backEdges:void 0},c[mS]=u);let d;i===c?d=a:(d=wS(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(..._S(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;TS=d;let p=ES.length,m=t(s,c);TS=void 0;let h=ES.length>p?ES.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?_S(e.issues):hS),e)):(h&&(h.issues=m.issues.length?_S(m.issues):hS),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function OS(){return DS}function kS(e,t){let n=e[mS]?.backEdges;return n!==void 0&&gS(t)&&n.has(t)}var AS=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(gee(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${sy(e.values[0])}`:`Invalid option: expected one of ${Nv(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${Nv(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function jS(){return{localeError:AS()}}var MS,NS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function PS(){return new NS}(MS=globalThis).__zod_globalRegistry??(MS.__zod_globalRegistry=PS());var FS=globalThis.__zod_globalRegistry;function IS(e){return e.checks&&=[...e.checks],e}function LS(e,t){return new e(IS({type:`string`,...oy(t)}))}function RS(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...oy(t)})}function zS(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...oy(t)})}function BS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...oy(t)})}function VS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...oy(t)})}function HS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...oy(t)})}function US(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...oy(t)})}function WS(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...oy(t)})}function GS(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...oy(t)})}function KS(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...oy(t)})}function qS(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...oy(t)})}function JS(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...oy(t)})}function YS(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...oy(t)})}function XS(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...oy(t)})}function ZS(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...oy(t)})}function QS(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...oy(t)})}function $S(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...oy(t)})}function eC(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...oy(t)})}function tC(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...oy(t)})}function nC(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...oy(t)})}function rC(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...oy(t)})}function iC(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...oy(t)})}function aC(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...oy(t)})}function oC(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...oy(t)})}function sC(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...oy(t)})}function cC(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...oy(t)})}function lC(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...oy(t)})}function uC(e,t){return new e(IS({type:`number`,checks:[],...oy(t)}))}function dC(e,t){return new e(IS({type:`number`,coerce:!0,checks:[],...oy(t)}))}function fC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...oy(t)})}function pC(e,t){return new e({type:`boolean`,...oy(t)})}function mC(e,t){return new e({type:`null`,...oy(t)})}function hC(e){return new e({type:`unknown`})}function gC(e,t){return new e({type:`never`,...oy(t)})}function _C(e,t){return new pb({check:`less_than`,...oy(t),value:e,inclusive:!1})}function vC(e,t){return new pb({check:`less_than`,...oy(t),value:e,inclusive:!0})}function yC(e,t){return new mb({check:`greater_than`,...oy(t),value:e,inclusive:!1})}function bC(e,t){return new mb({check:`greater_than`,...oy(t),value:e,inclusive:!0})}function xC(e,t){return new hb({check:`multiple_of`,...oy(t),value:e})}function SC(e,t){return new _b({check:`max_length`,...oy(t),maximum:e})}function CC(e,t){return new vb({check:`min_length`,...oy(t),minimum:e})}function wC(e,t){return new yb({check:`length_equals`,...oy(t),length:e})}function TC(e,t){return new xb({check:`string_format`,format:`regex`,...oy(t),pattern:e})}function EC(e){return new Sb({check:`string_format`,format:`lowercase`,...oy(e)})}function DC(e){return new Cb({check:`string_format`,format:`uppercase`,...oy(e)})}function OC(e,t){return new wb({check:`string_format`,format:`includes`,...oy(t),includes:e})}function kC(e,t){return new Tb({check:`string_format`,format:`starts_with`,...oy(t),prefix:e})}function AC(e,t){return new Eb({check:`string_format`,format:`ends_with`,...oy(t),suffix:e})}function jC(e,t){return new Ob({check:`properties`,shape:e,...oy(t)})}function MC(e){return new kb({check:`overwrite`,tx:e})}function NC(e){return MC(t=>t.normalize(e))}function PC(){return MC(e=>e.trim())}function FC(){return MC(e=>e.toLowerCase())}function IC(){return MC(e=>e.toUpperCase())}function LC(){return MC(e=>Zv(e))}function RC(e,t,n){return new e({type:`array`,element:t,...oy(n)})}function zC(e,t,n){let r=oy(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function BC(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...oy(n)})}function VC(e,t){let n=HC(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(ky(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(ky(r))}},e(t.value,t)),t);return n}function HC(e,t){let n=new ub({check:`custom`,...oy(t)});return n._zod.check=e,n}function UC(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Hv(e,t,n[t]);return e}function WC(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??FS,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function GC(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function KC(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,KC(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&UC(o.schema,c),t.io===`input`&&nw(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function qC(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function JC(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${qC(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+qC(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
107
|
+
|
|
108
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function YC(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;YC(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var XC=new Set([`type`,`properties`,`required`,`additionalProperties`]),ZC=[`oneOf`,`anyOf`];function QC(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function $C(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!XC.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??QC(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Hv(n,r,e.length===1?e[0]:$C(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=QC(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function ew(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of XC)if(t in e)return;let n=t.filter(e=>ZC.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=$C(t);else{let e=n[0],i=ZC.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>$C([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,UC(e,r))}function tw(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):UC(i,s),UC(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())YC(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])ew(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}UC(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Hv(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:iw(t,`input`,e.processors),output:iw(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function nw(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return nw(r.element,n);if(r.type===`set`)return nw(r.valueType,n);if(r.type===`lazy`)return nw(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return nw(r.innerType,n);if(r.type===`intersection`)return nw(r.left,n)||nw(r.right,n);if(r.type===`record`||r.type===`map`)return nw(r.keyType,n)||nw(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:nw(r.in,n)||nw(r.out,n);if(r.type===`object`){for(let e in r.shape)if(nw(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(nw(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(nw(e,n))return!0;return!!(r.rest&&nw(r.rest,n))}return!1}var rw=(e,t={})=>n=>{let r=WC({...n,processors:t});return KC(e,r),JC(r,e),tw(r,e)},iw=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=WC({...i??{},target:a,io:t,processors:n});return KC(e,o),JC(o,e),tw(o,e)},aw=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},ow=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},sw=(e,t)=>{aw(e,`minimum`,t),ow(e,`maximum`,t)},cw=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},lw=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},uw=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},dw=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},fw=(e,t)=>aw(e,`minimum`,t.minimum),pw=(e,t)=>ow(e,`maximum`,t.maximum),mw=e=>(t,n)=>{dw(t,n.format);let[r,i]=e[n.format];aw(t,`minimum`,r),ow(t,`maximum`,i)},hw={greater_than:(e,t)=>aw(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>ow(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>cw(e,t.value),number_format:mw(ly),bigint_format:mw(uy),min_length:fw,max_length:pw,length_equals:(e,t)=>sw(e,t.length),min_size:fw,max_size:pw,size_equals:(e,t)=>sw(e,t.size),string_format:(e,t)=>{dw(e,t.format),t.pattern&&lw(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>uw(e,t.mime)};function gw(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)hw[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&aw(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&aw(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&ow(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&ow(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&cw(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&uw(t,i.mime);for(let e of i.patterns??[])lw(t,e);return t}var _w={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},vw=new Map([[mx,ste],[gx,cte]]),yw=e=>vw.get(e)??e,bw=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=gw(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=_w[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(yw);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},xw=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=gw(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):GC(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Sw=(e,t,n,r)=>{n.type=`boolean`},Cw=(e,t,n,r)=>{GC(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},ww=(e,t,n,r)=>{GC(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},Tw=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ew=(e,t,n,r)=>{GC(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Dw=(e,t,n,r)=>{GC(e,t,n,r,`Void cannot be represented in JSON Schema`)},Ow=(e,t,n,r)=>{n.not={}},kw=(e,t,n,r)=>{},Aw=(e,t,n,r)=>{},jw=(e,t,n,r)=>{GC(e,t,n,r,`Date cannot be represented in JSON Schema`)},Mw=(e,t,n,r)=>{let i=e._zod.def,a=Mv(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},Nw=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(GC(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(GC(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Pw=(e,t,n,r)=>{GC(e,t,n,r,`NaN cannot be represented in JSON Schema`)},Fw=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Iw=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=gw(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},Lw=(e,t,n,r)=>{n.type=`boolean`},Rw=(e,t,n,r)=>{GC(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},zw=(e,t,n,r)=>{GC(e,t,n,r,`Function types cannot be represented in JSON Schema`)},Bw=(e,t,n,r)=>{GC(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Vw=(e,t,n,r)=>{GC(e,t,n,r,`Map cannot be represented in JSON Schema`)},Hw=(e,t,n,r)=>{GC(e,t,n,r,`Set cannot be represented in JSON Schema`)},Uw=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=gw(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=KC(a.element,t,{...r,path:[...r.path,`items`]})};function Ww(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Ww(t.out):t.type===`catch`?Ww(t.innerType):e._zod.optin}var Gw=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&GC(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Hv(i.properties,e,KC(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Ww(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=KC(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Kw=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>KC(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},qw=(e,t,n,r)=>{let i=e._zod.def,a=KC(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=KC(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Jw=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>KC(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?KC(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?Ww(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=gw(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function Yw(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=Yw(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>Yw(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?ab:ib).source)),p}var Xw=new WeakMap;function Zw(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of Xw.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Yw(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var Qw=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=gw(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=KC(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)Hv(i.patternProperties,yw(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=KC(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Xw.get(t);n||(n=[],Xw.set(t,n),t.deferred.push(()=>Zw(t))),n.push(e)}i.additionalProperties=KC(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Ww(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},$w=(e,t,n,r)=>{let i=e._zod.def,a=KC(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},eT=(e,t,n,r)=>{let i=e._zod.def;KC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},tT=Symbol();function nT(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(GC(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),tT):JSON.parse(o)}var rT=(e,t,n,r)=>{let i=e._zod.def;KC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=nT(i.defaultValue,e,t,n,r);o!==tT&&(n.default=o)},iT=(e,t,n,r)=>{let i=e._zod.def;KC(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=nT(i.defaultValue,e,t,n,r);o!==tT&&(n._prefault=o)},aT=(e,t,n,r)=>{let i=e._zod.def;KC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{GC(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},oT=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;KC(o,t,r);let s=t.seen.get(e);s.ref=o},sT=(e,t,n,r)=>{let i=e._zod.def;KC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},fte=(e,t,n,r)=>{let i=e._zod.def;KC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},cT=(e,t,n,r)=>{let i=e._zod.def;KC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},lT=(e,t,n,r)=>{let i=e._zod.innerType;KC(i,t,r);let a=t.seen.get(e);a.ref=i},uT={string:bw,number:xw,boolean:Sw,bigint:Cw,symbol:ww,null:Tw,undefined:Ew,void:Dw,never:Ow,any:kw,unknown:Aw,date:jw,enum:Mw,literal:Nw,nan:Pw,template_literal:Fw,file:Iw,success:Lw,custom:Rw,function:zw,transform:Bw,map:Vw,set:Hw,array:Uw,object:Gw,union:Kw,intersection:qw,tuple:Jw,record:Qw,nullable:$w,nonoptional:eT,default:rT,prefault:iT,catch:aT,pipe:oT,readonly:sT,promise:fte,optional:cT,lazy:lT};function pte(e,t){if(`_idmap`in e){let n=e,r=WC({...t,processors:uT}),i={};for(let e of n._idmap.entries()){let[t,n]=e;KC(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;JC(r,n),Hv(a,t,tw(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=WC({...t,processors:uT});return KC(e,n),JC(n,e),tw(n,e)}var dT=new WeakSet([Object.prototype,Error.prototype]);function fT(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var pT=F(`ZodError`,(e,t)=>{Oee.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);dT.has(n)||(dT.add(n),fT(n,`format`,e=>t=>jee(e,t)),fT(n,`flatten`,e=>t=>Aee(e,t)),fT(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Pv,2)}),fT(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Pv,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),mte=Ky(pT),hte=qy(pT),gte=Jy(pT),mT=Xy(pT),_te=Lee(pT),vte=Ree(pT),yte=zee(pT),bte=Bee(pT),xte=Vee(pT),Ste=Hee(pT),Cte=Uee(pT),wte=Wee(pT);function Tte(){Vy.localeError||Hy(jS())}function hT(){Vy.memoizer||Hy({memoizer:OS()})}var gT=F(`ZodType`,(e,t)=>(Tte(),Mb.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Yv(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return ay(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Tne(e,t))},superRefine(e,t){return this.check(Ene(e,t))},overwrite(e){return this.check(MC(e))},optional(){return FT(this)},exactOptional(){return une(this)},nullable(){return LT(this)},nullish(){return FT(LT(this))},nonoptional(e){return gne(this,e)},array(){return L(this)},or(e){return OT([this,e])},and(e){return ane(this,e)},transform(e){return zT(this,lne(e))},default(e){return pne(this,e)},prefault(e){return hne(this,e)},catch(e){return vne(this,e)},pipe(e){return zT(this,e)},readonly(){return xne(this)},describe(e){let t=this.clone();return FS.add(t,{description:e}),t},meta(...e){if(e.length===0)return FS.get(this);let t=this.clone();return FS.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return jy(this,`~standard`,{...Fb(this),jsonSchema:{input:iw(this,`input`),output:iw(this,`output`)}})},set"~standard"(e){Ay(this,`~standard`,e)},parse:function e(t,n){return mte(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await hte(this,t,n,{callee:e})},safeParse(e,t){return gte(this,e,t)},async safeParseAsync(e,t){return mT(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ay(this,`spa`,e)},validate(e,t){return Pee(this,e,t)},validateAsync(e,t){return Iee(this,e,t)},encode:function e(t,n){return _te(this,t,n,{callee:e})},decode:function e(t,n){return vte(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await yte(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await bte(this,t,n,{callee:e})},safeEncode(e,t){return xte(this,e,t)},safeDecode(e,t){return Ste(this,e,t)},async safeEncodeAsync(e,t){return Cte(this,e,t)},async safeDecodeAsync(e,t){return wte(this,e,t)},toJSONSchema(e){return rw(this,{})(e)},get description(){return FS.get(this)?.description},get _def(){return this._zod.def}}),_T=F(`_ZodString`,(e,t)=>{Ib.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bw(e,t,n,r)},My({format:e=>gw(e).format??null,minLength:e=>gw(e).minimum??null,maxLength:e=>gw(e).maximum??null},{regex(...e){return this.check(TC(...e))},includes(...e){return this.check(OC(...e))},startsWith(...e){return this.check(kC(...e))},endsWith(...e){return this.check(AC(...e))},min(...e){return this.check(CC(...e))},max(...e){return this.check(SC(...e))},length(...e){return this.check(wC(...e))},nonempty(...e){return this.check(CC(1,...e))},lowercase(e){return this.check(EC(e))},uppercase(e){return this.check(DC(e))},trim(){return this.check(PC())},normalize(...e){return this.check(NC(...e))},toLowerCase(){return this.check(FC())},toUpperCase(){return this.check(IC())},slugify(){return this.check(LC())}})),Ete=F(`ZodString`,(e,t)=>{Ib.init(e,t),_T.init(e,t)},{email(e){return this.check(RS(jte,e))},url(e){return this.check(WS(Nte,e))},jwt(e){return this.check(aC(Jte,e))},emoji(e){return this.check(GS(Pte,e))},guid(e){return this.check(zS(Mte,e))},uuid(e){return this.check(BS(yT,e))},uuidv4(e){return this.check(VS(yT,e))},uuidv6(e){return this.check(HS(yT,e))},uuidv7(e){return this.check(US(yT,e))},nanoid(e){return this.check(KS(Fte,e))},cuid(e){return this.check(qS(Ite,e))},cuid2(e){return this.check(JS(Lte,e))},ulid(e){return this.check(YS(Rte,e))},base64(e){return this.check(nC(Gte,e))},base64url(e){return this.check(rC(Kte,e))},xid(e){return this.check(XS(zte,e))},ksuid(e){return this.check(ZS(Bte,e))},ipv4(e){return this.check(QS(Vte,e))},ipv6(e){return this.check($S(Hte,e))},cidrv4(e){return this.check(eC(Ute,e))},cidrv6(e){return this.check(tC(Wte,e))},e164(e){return this.check(iC(qte,e))},datetime(e){return this.check(oC(Dte,e))},date(e){return this.check(sC(Ote,e))},time(e){return this.check(cC(kte,e))},duration(e){return this.check(lC(Ate,e))}});function I(e){return LS(Ete,e)}var vT=F(`ZodStringFormat`,(e,t)=>{Lb.init(e,t),_T.init(e,t)}),Dte=F(`ZodISODateTime`,(e,t)=>{nx.init(e,t),vT.init(e,t)}),Ote=F(`ZodISODate`,(e,t)=>{rx.init(e,t),vT.init(e,t)}),kte=F(`ZodISOTime`,(e,t)=>{ix.init(e,t),vT.init(e,t)}),Ate=F(`ZodISODuration`,(e,t)=>{ax.init(e,t),vT.init(e,t)}),jte=F(`ZodEmail`,(e,t)=>{Bb.init(e,t),vT.init(e,t)}),Mte=F(`ZodGUID`,(e,t)=>{Rb.init(e,t),vT.init(e,t)}),yT=F(`ZodUUID`,(e,t)=>{zb.init(e,t),vT.init(e,t)}),Nte=F(`ZodURL`,(e,t)=>{Jb.init(e,t),vT.init(e,t)}),Pte=F(`ZodEmoji`,(e,t)=>{Yb.init(e,t),vT.init(e,t)}),Fte=F(`ZodNanoID`,(e,t)=>{Xb.init(e,t),vT.init(e,t)}),Ite=F(`ZodCUID`,(e,t)=>{Zb.init(e,t),vT.init(e,t)}),Lte=F(`ZodCUID2`,(e,t)=>{Qb.init(e,t),vT.init(e,t)}),Rte=F(`ZodULID`,(e,t)=>{$b.init(e,t),vT.init(e,t)}),zte=F(`ZodXID`,(e,t)=>{ex.init(e,t),vT.init(e,t)}),Bte=F(`ZodKSUID`,(e,t)=>{tx.init(e,t),vT.init(e,t)}),Vte=F(`ZodIPv4`,(e,t)=>{ox.init(e,t),vT.init(e,t)}),Hte=F(`ZodIPv6`,(e,t)=>{lx.init(e,t),vT.init(e,t)}),Ute=F(`ZodCIDRv4`,(e,t)=>{ux.init(e,t),vT.init(e,t)}),Wte=F(`ZodCIDRv6`,(e,t)=>{fx.init(e,t),vT.init(e,t)}),Gte=F(`ZodBase64`,(e,t)=>{hx.init(e,t),vT.init(e,t)}),Kte=F(`ZodBase64URL`,(e,t)=>{vx.init(e,t),vT.init(e,t)}),qte=F(`ZodE164`,(e,t)=>{yx.init(e,t),vT.init(e,t)}),Jte=F(`ZodJWT`,(e,t)=>{xx.init(e,t),vT.init(e,t)}),bT=F(`ZodNumber`,(e,t)=>{Sx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xw(e,t,n,r),e.isFinite=!0},My({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=gw(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=gw(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=gw(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>gw(e).format??null},{gt(e,t){return this.check(yC(e,t))},gte(e,t){return this.check(bC(e,t))},min(e,t){return this.check(bC(e,t))},lt(e,t){return this.check(_C(e,t))},lte(e,t){return this.check(vC(e,t))},max(e,t){return this.check(vC(e,t))},int(e){return this.check(ST(e))},safe(e){return this.check(ST(e))},positive(e){return this.check(yC(0,e))},nonnegative(e){return this.check(bC(0,e))},negative(e){return this.check(_C(0,e))},nonpositive(e){return this.check(vC(0,e))},multipleOf(e,t){return this.check(xC(e,t))},step(e,t){return this.check(xC(e,t))},finite(){return this}}));function xT(e){return uC(bT,e)}var Yte=F(`ZodNumberFormat`,(e,t)=>{Cx.init(e,t),bT.init(e,t)});function ST(e){return fC(Yte,e)}var Xte=F(`ZodBoolean`,(e,t)=>{wx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sw(e,t,n,r)});function CT(e){return pC(Xte,e)}var Zte=F(`ZodNull`,(e,t)=>{Tx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tw(e,t,n,r)});function Qte(e){return mC(Zte,e)}var $te=F(`ZodUnknown`,(e,t)=>{Ex.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function wT(){return hC($te)}var ene=F(`ZodNever`,(e,t)=>{Dx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ow(e,t,n,r)});function TT(e){return gC(ene,e)}var tne=F(`ZodArray`,(e,t)=>{hT(),jx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uw(e,t,n,r),e.element=t.element},{min(e,t){return this.check(CC(e,t))},nonempty(e){return this.check(CC(1,e))},max(e,t){return this.check(SC(e,t))},length(e,t){return this.check(wC(e,t))},unwrap(){return this.element}});function L(e,t){return RC(tne,e,t)}var ET=F(`ZodObject`,(e,t)=>{hT(),Lx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gw(e,t,n,r),xee(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return MT(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Yv(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Yv(this._zod.def,{catchall:wT()}))},loose(){return this.clone(Yv(this._zod.def,{catchall:wT()}))},strict(){return this.clone(Yv(this._zod.def,{catchall:TT()}))},strip(){return this.clone(Yv(this._zod.def,{catchall:void 0}))},extend(e){return my(this,e)},safeExtend(e){return gy(this,e)},merge(e){return _y(this,e)},pick(e){return dy(this,e)},omit(e){return py(this,e)},partial(...e){return vy(PT,this,e[0])},exactPartial(...e){return vy(IT,this,e[0],`exactPartial`)},required(...e){return yy(RT,this,e[0])}});function R(e,t){return new ET({type:`object`,shape:e??{},...oy(t)})}function nne(e,t){return new ET({type:`object`,shape:e,catchall:wT(),...oy(t)})}var DT=F(`ZodUnion`,(e,t)=>{zx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kw(e,t,n,r),e.options=t.options});function OT(e,t){return new DT({type:`union`,options:e,...oy(t)})}var rne=F(`ZodDiscriminatedUnion`,(e,t)=>{DT.init(e,t),Vx.init(e,t)});function kT(e,t,n){return new rne({type:`union`,options:t,discriminator:e,...oy(n)})}var ine=F(`ZodIntersection`,(e,t)=>{Hx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qw(e,t,n,r)});function ane(e,t){return new ine({type:`intersection`,left:e,right:t})}var AT=F(`ZodRecord`,(e,t)=>{hT(),Gx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qw(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function one(e,t,n){return!t||!t._zod?new AT({type:`record`,keyType:I(),valueType:e,...oy(t)}):new AT({type:`record`,keyType:e,valueType:t,...oy(n)})}var jT=F(`ZodEnum`,(e,t)=>{Kx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mw(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new jT({...t,checks:[],...oy(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new jT({...t,checks:[],...oy(r),entries:i})}});function MT(e,t){return new jT({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...oy(t)})}var sne=F(`ZodLiteral`,(e,t)=>{qx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nw(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function NT(e,t){return new sne({type:`literal`,values:Array.isArray(e)?e:[e],...oy(t)})}var cne=F(`ZodTransform`,(e,t)=>{hT(),Jx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bw(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new By(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ky(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(ky(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function lne(e){return new cne({type:`transform`,transform:e})}var PT=F(`ZodOptional`,(e,t)=>{Xx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FT(e){return new PT({type:`optional`,innerType:e})}var IT=F(`ZodExactOptional`,(e,t)=>{Zx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function une(e){return new IT({type:`optional`,innerType:e})}var dne=F(`ZodNullable`,(e,t)=>{Qx.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$w(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function LT(e){return new dne({type:`nullable`,innerType:e})}var fne=F(`ZodDefault`,(e,t)=>{$x.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function pne(e,t){return new fne({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ny(t)}})}var mne=F(`ZodPrefault`,(e,t)=>{tS.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hne(e,t){return new mne({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ny(t)}})}var RT=F(`ZodNonOptional`,(e,t)=>{nS.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gne(e,t){return new RT({type:`nonoptional`,innerType:e,...oy(t)})}var _ne=F(`ZodCatch`,(e,t)=>{aS.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vne(e,t){return new _ne({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Cee(t)})}var yne=F(`ZodPipe`,(e,t)=>{oS.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oT(e,t,n,r),e.in=t.in,e.out=t.out});function zT(e,t){return new yne({type:`pipe`,in:e,out:t})}var bne=F(`ZodReadonly`,(e,t)=>{cS.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xne(e){return new bne({type:`readonly`,innerType:e})}var Sne=F(`ZodLazy`,(e,t)=>{uS.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lT(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Cne(e){return new Sne({type:`lazy`,getter:e})}var BT=F(`ZodCustom`,(e,t)=>{dS.init(e,t),gT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rw(e,t,n,r)});function wne(e,t){return zC(BT,e??(()=>!0),t)}function Tne(e,t={}){return BC(BT,e,t)}function Ene(e,t){return VC(e,t)}var Dne=F(`ZodInstanceOf`,(e,t)=>{BT.init(e,t)},{properties(e,t){return this.check(jC(e,t))}});function One(e,t={}){let n=new Dne({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...oy(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function VT(e){return dC(bT,e)}var HT=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},UT=10,kne=13,WT=32;function GT(e){}function Ane(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=GT,onError:n=GT,onRetry:r=GT,onComment:i,maxBufferSize:a}=e,o=[],s=0,c=!0,l,u=``,d=0,f,p=!1;function m(e){if(p)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(c&&(c=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),o.length===0){let t=g(e);t!==``&&(o.push(t),s=t.length),h();return}if(e.indexOf(`
|
|
109
|
+
`)===-1&&e.indexOf(`\r`)===-1){o.push(e),s+=e.length,h();return}o.push(e);let t=o.join(``);o.length=0,s=0;let n=g(t);n!==``&&(o.push(n),s=n.length),h()}function h(){a!==void 0&&(s+u.length<=a||(p=!0,o.length=0,s=0,l=void 0,u=``,d=0,f=void 0,n(new HT(`Buffered data exceeded max buffer size of ${a} characters`,{type:`max-buffer-size-exceeded`}))))}function g(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(`
|
|
110
|
+
`,n);for(;r!==-1;){if(n===r){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0,n=r+1,r=e.indexOf(`
|
|
111
|
+
`,n);continue}let i=e.charCodeAt(n);if(KT(e,n,i)){let i=e.charCodeAt(n+5)===WT?n+6:n+5,a=e.slice(i,r);if(d===0&&e.charCodeAt(r+1)===UT){t({id:l,event:f,data:a}),l=void 0,u=``,f=void 0,n=r+2,r=e.indexOf(`
|
|
112
|
+
`,n);continue}u=d===0?a:`${u}
|
|
113
|
+
${a}`,d++}else qT(e,n,i)?f=e.slice(e.charCodeAt(n+6)===WT?n+7:n+6,r)||void 0:_(e,n,r);n=r+1,r=e.indexOf(`
|
|
114
|
+
`,n)}return e.slice(n)}for(;n<e.length;){let t=e.indexOf(`\r`,n),r=e.indexOf(`
|
|
115
|
+
`,n),i=-1;if(t!==-1&&r!==-1?i=t<r?t:r:t===-1?r!==-1&&(i=r):i=t===e.length-1?-1:t,i===-1)break;_(e,n,i),n=i+1,e.charCodeAt(n-1)===kne&&e.charCodeAt(n)===UT&&n++}return e.slice(n)}function _(e,t,n){if(t===n){y();return}let r=e.charCodeAt(t);if(KT(e,t,r)){let r=e.charCodeAt(t+5)===WT?t+6:t+5,i=e.slice(r,n);u=d===0?i:`${u}
|
|
116
|
+
${i}`,d++;return}if(qT(e,t,r)){f=e.slice(e.charCodeAt(t+6)===WT?t+7:t+6,n)||void 0;return}if(r===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let r=e.slice(e.charCodeAt(t+3)===WT?t+4:t+3,n);r.includes(`\0`)||(l=r);return}if(r===58){if(i){let r=e.slice(t,n);i(r.slice(e.charCodeAt(t+1)===WT?2:1))}return}let a=e.slice(t,n),o=a.indexOf(`:`);if(o===-1){v(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===WT?2:1;v(s,a.slice(o+c),a)}function v(e,t,i){switch(e){case`event`:f=t||void 0;break;case`data`:u=d===0?t:`${u}
|
|
117
|
+
${t}`,d++;break;case`id`:t.includes(`\0`)||(l=t);break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new HT(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new HT(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}))}}function y(){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0}function b(e={}){if(e.consume&&o.length>0){let e=o.join(``);_(e,0,e.length)}c=!0,l=void 0,u=``,d=0,f=void 0,o.length=0,s=0,p=!1}return{feed:m,reset:b}}function KT(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function qT(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}var jne=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n,maxBufferSize:r}={}){let i;super({start(a){i=Ane({onEvent:e=>{a.enqueue(e)},onError(t){typeof e==`function`&&e(t),(e===`terminate`||t.type===`max-buffer-size-exceeded`)&&a.error(t)},onRetry:t,onComment:n,maxBufferSize:r})},transform(e){i.feed(e)}})}};new TextDecoder;var{btoa:Mne,atob:Nne}=globalThis;function JT(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((e,n)=>{t[n.toLowerCase()]=e});else{Array.isArray(e)||(e=Object.entries(e));for(let[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}var YT=({prefix:e,size:t=16,alphabet:n=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,separator:r=`-`}={})=>{let i=()=>{let e=n.length,r=Array(t);for(let i=0;i<t;i++)r[i]=n[Math.random()*e|0];return r.join(``)};if(e==null)return i;if(n.includes(r))throw new yv({argument:`separator`,message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${i()}`},Pne=YT();function XT(e){return globalThis.Buffer?.isBuffer(e)??!1}var ZT=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Fne=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function QT(e){let t=JSON.parse(e);return typeof t!=`object`||!t||ZT.test(e)===!1&&Fne.test(e)===!1?t:$T(t)}function $T(e){let t=[e];for(;t.length;){let e=t;t=[];for(let n of e){if(Object.prototype.hasOwnProperty.call(n,`__proto__`)||Object.prototype.hasOwnProperty.call(n,`constructor`)&&n.constructor!==null&&typeof n.constructor==`object`&&Object.prototype.hasOwnProperty.call(n.constructor,`prototype`))throw SyntaxError(`Object contains forbidden prototype property`);for(let e in n){let r=n[e];r&&typeof r==`object`&&t.push(r)}}}return e}function eE(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return QT(e)}try{return QT(e)}finally{Error.stackTraceLimit=t}}function tE(e){if(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)){let{additionalProperties:t}=e;e.additionalProperties=t!=null&&typeof t!=`boolean`&&nE(t);let{properties:n}=e;if(n!=null)for(let e of Object.keys(n))n[e]=nE(n[e])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(nE):nE(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(nE)),e.allOf!=null&&(e.allOf=e.allOf.map(nE)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(nE));let{definitions:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=nE(t[e]);return e}function nE(e){return typeof e==`boolean`?e:tE(e)}var rE=Symbol(`Let zodToJsonSchema decide on which parser to use`),iE={name:void 0,$refStrategy:`root`,basePath:[`#`],effectStrategy:`input`,pipeStrategy:`all`,dateStrategy:`format:date-time`,mapStrategy:`entries`,removeAdditionalStrategy:`passthrough`,allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:`definitions`,strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:`escape`,applyRegexFlags:!1,emailStrategy:`format:email`,base64Strategy:`contentEncoding:base64`,nameStrategy:`ref`},aE=e=>typeof e==`string`?{...iE,name:e}:{...iE,...e};function oE(){return{}}function Ine(e,t){let n={type:`array`};return e.type?._def&&e.type?._def?.typeName!==`ZodAny`&&(n.items=KE(e.type._def,{...t,currentPath:[...t.currentPath,`items`]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}function Lne(e){let t={type:`integer`,format:`int64`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value}return t}function Rne(){return{type:`boolean`}}function sE(e,t){return KE(e.type._def,t)}var zne=(e,t)=>KE(e.innerType._def,t);function cE(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(n=>cE(e,t,n))};switch(r){case`string`:case`format:date-time`:return{type:`string`,format:`date-time`};case`format:date`:return{type:`string`,format:`date`};case`integer`:return Bne(e)}}var Bne=e=>{let t={type:`integer`,format:`unix-time`};for(let n of e.checks)switch(n.kind){case`min`:t.minimum=n.value;break;case`max`:t.maximum=n.value}return t};function Vne(e,t){return{...KE(e.innerType._def,t),default:e.defaultValue()}}function lE(e,t){return t.effectStrategy===`input`?KE(e.schema._def,t):oE()}function uE(e){return{type:`string`,enum:Array.from(e.values)}}var dE=e=>`type`in e&&e.type===`string`?!1:`allOf`in e;function fE(e,t){let n=[KE(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),KE(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=[];return n.forEach(e=>{if(dE(e))r.push(...e.allOf);else{let t=e;if(`additionalProperties`in e&&e.additionalProperties===!1){let{additionalProperties:n,...r}=e;t=r}r.push(t)}}),r.length?{allOf:r}:void 0}function pE(e){let t=typeof e.value;return t!==`bigint`&&t!==`number`&&t!==`boolean`&&t!==`string`?{type:Array.isArray(e.value)?`array`:`object`}:{type:t===`bigint`?`integer`:t,const:e.value}}var mE=void 0,hE={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(mE===void 0&&(mE=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),mE),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0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-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function gE(e,t){let n={type:`string`};if(e.checks)for(let r of e.checks)switch(r.kind){case`min`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value;break;case`max`:n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`email`:switch(t.emailStrategy){case`format:email`:bE(n,`email`,r.message,t);break;case`format:idn-email`:bE(n,`idn-email`,r.message,t);break;case`pattern:zod`:xE(n,hE.email,r.message,t)}break;case`url`:bE(n,`uri`,r.message,t);break;case`uuid`:bE(n,`uuid`,r.message,t);break;case`regex`:xE(n,r.regex,r.message,t);break;case`cuid`:xE(n,hE.cuid,r.message,t);break;case`cuid2`:xE(n,hE.cuid2,r.message,t);break;case`startsWith`:xE(n,RegExp(`^${_E(r.value,t)}`),r.message,t);break;case`endsWith`:xE(n,RegExp(`${_E(r.value,t)}$`),r.message,t);break;case`datetime`:bE(n,`date-time`,r.message,t);break;case`date`:bE(n,`date`,r.message,t);break;case`time`:bE(n,`time`,r.message,t);break;case`duration`:bE(n,`duration`,r.message,t);break;case`length`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`includes`:xE(n,RegExp(_E(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&bE(n,`ipv4`,r.message,t),r.version!==`v4`&&bE(n,`ipv6`,r.message,t);break;case`base64url`:xE(n,hE.base64url,r.message,t);break;case`jwt`:xE(n,hE.jwt,r.message,t);break;case`cidr`:r.version!==`v6`&&xE(n,hE.ipv4Cidr,r.message,t),r.version!==`v4`&&xE(n,hE.ipv6Cidr,r.message,t);break;case`emoji`:xE(n,hE.emoji(),r.message,t);break;case`ulid`:xE(n,hE.ulid,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:bE(n,`binary`,r.message,t);break;case`contentEncoding:base64`:n.contentEncoding=`base64`;break;case`pattern:zod`:xE(n,hE.base64,r.message,t)}break;case`nanoid`:xE(n,hE.nanoid,r.message,t)}return n}function _E(e,t){return t.patternStrategy===`escape`?yE(e):e}var vE=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function yE(e){let t=``;for(let n=0;n<e.length;n++)vE.has(e[n])||(t+=`\\`),t+=e[n];return t}function bE(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||=[],e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function xE(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||=[],e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:SE(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=SE(t,r)}function SE(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes(`i`),m:e.flags.includes(`m`),s:e.flags.includes(`s`)},r=n.i?e.source.toLowerCase():e.source,i=``,a=!1,o=!1,s=!1;for(let e=0;e<r.length;e++)if(a)i+=r[e],a=!1;else{if(n.i){if(o){if(r[e].match(/[a-z]/)){s?(i+=r[e],i+=`${r[e-2]}-${r[e]}`.toUpperCase(),s=!1):r[e+1]===`-`&&r[e+2]?.match(/[a-z]/)?(i+=r[e],s=!0):i+=`${r[e]}${r[e].toUpperCase()}`;continue}}else if(r[e].match(/[a-z]/)){i+=`[${r[e]}${r[e].toUpperCase()}]`;continue}}if(n.m){if(r[e]===`^`){i+=`(^|(?<=[\r
|
|
118
|
+
]))`;continue}if(r[e]===`$`){i+=`($|(?=[\r
|
|
119
|
+
]))`;continue}}n.s&&r[e]===`.`?i+=o?`${r[e]}\r\n`:`[${r[e]}\r\n]`:(i+=r[e],r[e]===`\\`?a=!0:o&&r[e]===`]`?o=!1:!o&&r[e]===`[`&&(o=!0))}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join(`/`)} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function CE(e,t){let n={type:`object`,additionalProperties:KE(e.valueType._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]})??t.allowedAdditionalProperties};if(e.keyType?._def.typeName===`ZodString`&&e.keyType._def.checks?.length){let{type:r,...i}=gE(e.keyType._def,t);return{...n,propertyNames:i}}if(e.keyType?._def.typeName===`ZodEnum`)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===`ZodBranded`&&e.keyType._def.type._def.typeName===`ZodString`&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=sE(e.keyType._def,t);return{...n,propertyNames:i}}return n}function wE(e,t){return t.mapStrategy===`record`?CE(e,t):{type:`array`,maxItems:125,items:{type:`array`,items:[KE(e.keyType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`0`]})||oE(),KE(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`1`]})||oE()],minItems:2,maxItems:2}}}function TE(e){let t=e.values,n=Object.keys(e.values).filter(e=>typeof t[t[e]]!=`number`).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:r.length===1?r[0]===`string`?`string`:`number`:[`string`,`number`],enum:n}}function EE(){return{not:oE()}}function DE(){return{type:`null`}}var OE={ZodString:`string`,ZodNumber:`number`,ZodBigInt:`integer`,ZodBoolean:`boolean`,ZodNull:`null`};function kE(e,t){let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in OE&&(!e._def.checks||!e._def.checks.length))){let e=n.reduce((e,t)=>{let n=OE[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}if(n.every(e=>e._def.typeName===`ZodLiteral`&&!e.description)){let e=n.reduce((e,t)=>{let n=typeof t._def.value;switch(n){case`string`:case`number`:case`boolean`:return[...e,n];case`bigint`:return[...e,`integer`];case`object`:if(t._def.value===null)return[...e,`null`];default:return e}},[]);if(e.length===n.length){let t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>e._def.typeName===`ZodEnum`))return{type:`string`,enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return AE(e,t)}var AE=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>KE(e._def,{...t,currentPath:[...t.currentPath,`anyOf`,`${n}`]})).filter(e=>!!e&&(!t.strictUnions||typeof e==`object`&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function jE(e,t){if([`ZodString`,`ZodNumber`,`ZodBigInt`,`ZodBoolean`,`ZodNull`].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[OE[e.innerType._def.typeName],`null`]};let n=KE(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`0`]});return n&&{anyOf:[n,{type:`null`}]}}function ME(e){let t={type:`number`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`int`:t.type=`integer`;break;case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value}return t}function NE(e,t){let n={type:`object`,properties:{}},r=[],i=e.shape();for(let e in i){let a=i[e];if(a===void 0||a._def===void 0)continue;let o=FE(a),s=KE(a._def,{...t,currentPath:[...t.currentPath,`properties`,e],propertyPath:[...t.currentPath,`properties`,e]});s!==void 0&&(n.properties[e]=s,o||r.push(e))}r.length&&(n.required=r);let a=PE(e,t);return a!==void 0&&(n.additionalProperties=a),n}function PE(e,t){if(e.catchall._def.typeName!==`ZodNever`)return KE(e.catchall._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]});switch(e.unknownKeys){case`passthrough`:return t.allowedAdditionalProperties;case`strict`:return t.rejectedAdditionalProperties;case`strip`:return t.removeAdditionalStrategy===`strict`?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function FE(e){try{return e.isOptional()}catch{return!0}}var IE=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return KE(e.innerType._def,t);let n=KE(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`1`]});return n?{anyOf:[{not:oE()},n]}:oE()},LE=(e,t)=>{if(t.pipeStrategy===`input`)return KE(e.in._def,t);if(t.pipeStrategy===`output`)return KE(e.out._def,t);let n=KE(e.in._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]});return{allOf:[n,KE(e.out._def,{...t,currentPath:[...t.currentPath,`allOf`,n?`1`:`0`]})].filter(e=>e!==void 0)}};function RE(e,t){return KE(e.type._def,t)}function zE(e,t){let n={type:`array`,uniqueItems:!0,items:KE(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function BE(e,t){return e.rest?{type:`array`,minItems:e.items.length,items:e.items.map((e,n)=>KE(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[]),additionalItems:KE(e.rest._def,{...t,currentPath:[...t.currentPath,`additionalItems`]})}:{type:`array`,minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>KE(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[])}}function VE(){return{not:oE()}}function HE(){return oE()}var UE=(e,t)=>KE(e.innerType._def,t),WE=(e,t,n)=>{switch(t){case`ZodString`:return gE(e,n);case`ZodNumber`:return ME(e);case`ZodObject`:return NE(e,n);case`ZodBigInt`:return Lne(e);case`ZodBoolean`:return Rne();case`ZodDate`:return cE(e,n);case`ZodUndefined`:return VE();case`ZodNull`:return DE();case`ZodArray`:return Ine(e,n);case`ZodUnion`:case`ZodDiscriminatedUnion`:return kE(e,n);case`ZodIntersection`:return fE(e,n);case`ZodTuple`:return BE(e,n);case`ZodRecord`:return CE(e,n);case`ZodLiteral`:return pE(e);case`ZodEnum`:return uE(e);case`ZodNativeEnum`:return TE(e);case`ZodNullable`:return jE(e,n);case`ZodOptional`:return IE(e,n);case`ZodMap`:return wE(e,n);case`ZodSet`:return zE(e,n);case`ZodLazy`:return()=>e.getter()._def;case`ZodPromise`:return RE(e,n);case`ZodNaN`:case`ZodNever`:return EE();case`ZodEffects`:return lE(e,n);case`ZodAny`:return oE();case`ZodUnknown`:return HE();case`ZodDefault`:return Vne(e,n);case`ZodBranded`:return sE(e,n);case`ZodReadonly`:return UE(e,n);case`ZodCatch`:return zne(e,n);case`ZodPipeline`:return LE(e,n);case`ZodFunction`:case`ZodVoid`:case`ZodSymbol`:return;default:return(e=>void 0)(t)}},GE=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join(`/`)};function KE(e,t,n=!1){let r=t.seen.get(e);if(t.override){let i=t.override?.(e,t,r,n);if(i!==rE)return i}if(r&&!n){let e=qE(r,t);if(e!==void 0)return e}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=WE(e,e.typeName,t),o=typeof a==`function`?KE(a(),t):a;if(o&&JE(e,t,o),t.postProcess){let n=t.postProcess(o,e,t);return i.jsonSchema=o,n}return i.jsonSchema=o,o}var qE=(e,t)=>{switch(t.$refStrategy){case`root`:return{$ref:e.path.join(`/`)};case`relative`:return{$ref:GE(t.currentPath,e.path)};case`none`:case`seen`:return e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join(`/`)}! Defaulting to any`),oE()):t.$refStrategy===`seen`?oE():void 0}},JE=(e,t,n)=>(e.description&&(n.description=e.description),n),YE=e=>{let t=aE(e),n=t.name===void 0?t.basePath:[...t.basePath,t.definitionPath,t.name];return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}},XE=(e,t)=>{let n=YE(t),r=typeof t==`object`&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:KE(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??oE()}),{}):void 0,i=typeof t==`string`?t:t?.nameStrategy===`title`?void 0:t?.name,a=KE(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??oE(),o=typeof t==`object`&&t.name!==void 0&&t.nameStrategy===`title`?t.name:void 0;o!==void 0&&(a.title=o);let s=i===void 0?r?{...a,[n.definitionPath]:r}:a:{$ref:[...n.$refStrategy===`relative`?[]:n.basePath,n.definitionPath,i].join(`/`),[n.definitionPath]:{...r,[i]:a}};return s.$schema=`http://json-schema.org/draft-07/schema#`,s},ZE=Symbol.for(`vercel.ai.schema`);function QE(e){let t;return()=>(t??=e(),t)}function $E(e,{validate:t}={}){return{[ZE]:!0,_type:void 0,get jsonSchema(){return typeof e==`function`&&(e=e()),e},validate:t}}function Hne(e){return typeof e==`object`&&!!e&&ZE in e&&e[ZE]===!0&&`jsonSchema`in e&&`validate`in e}function Une(e){return e==null?$E({type:`object`,properties:{},additionalProperties:!1}):Hne(e)?e:`~standard`in e?e[`~standard`].vendor===`zod`?eD(e):Wne(e):e()}function Wne(e){return $E(()=>{if(!Gne(e))throw Error(`Standard schema vendor '${e[`~standard`].vendor}' does not support JSON Schema conversion.`);return tE(e[`~standard`].jsonSchema.input({target:`draft-07`}))},{validate:async t=>{let n=await e[`~standard`].validate(t);return`value`in n?{success:!0,value:n.value}:{success:!1,error:new Dv({value:t,cause:n.issues})}}})}function Gne(e){return e[`~standard`].jsonSchema!=null}function Kne(e,t){let n=t?.useReferences??!1;return $E(()=>XE(e,{$refStrategy:n?`root`:`none`}),{validate:async t=>{let n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function qne(e,t){let n=t?.useReferences??!1;return $E(()=>tE(pte(e,{target:`draft-7`,io:`input`,reused:n?`ref`:`inline`})),{validate:async t=>{let n=await mT(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function Jne(e){return`_zod`in e}function eD(e,t){return Jne(e)?qne(e,t):Kne(e,t)}async function tD({value:e,schema:t,context:n}){let r=await nD({value:e,schema:t,context:n});if(!r.success)throw Dv.wrap({value:e,cause:r.error,context:n});return r.value}async function nD({value:e,schema:t,context:n}){let r=Une(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};let t=await r.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:Dv.wrap({value:e,cause:t.error,context:n}),rawValue:e}}catch(t){return{success:!1,error:Dv.wrap({value:e,cause:t,context:n}),rawValue:e}}}async function rD({text:e,schema:t}){try{let n=eE(e);return t==null?{success:!0,value:n,rawValue:n}:await nD({value:n,schema:t})}catch(t){return{success:!1,error:Cv.isInstance(t)?t:new Cv({text:e,cause:t}),rawValue:void 0}}}function Yne({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new jne).pipeThrough(new TransformStream({async transform({data:e},n){e!==`[DONE]`&&n.enqueue(await rD({text:e,schema:t}))}}))}async function iD(e){return typeof e==`function`&&(e=e()),e}new TextDecoder;var aD=`AI_InvalidArgumentError`,oD=`vercel.ai.error.${aD}`,Xne=Symbol.for(oD),sD=class extends ov{constructor({parameter:e,value:t,message:n}){super({name:aD,message:`Invalid argument for parameter ${e}: ${n}`}),this[Xne]=!0,this.parameter=e,this.value=t}static isInstance(e){return ov.hasMarker(e,oD)}},cD=`AI_UIMessageStreamError`,lD=`vercel.ai.error.${cD}`,uD=Symbol.for(lD),dD=class extends ov{constructor({chunkType:e,chunkId:t,message:n}){super({name:cD,message:n}),this[uD]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return ov.hasMarker(e,lD)}};function fD(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let n={...e};for(let r in t)if(r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];if(i===void 0)continue;let a=r in e?e[r]:void 0,o=typeof i==`object`&&!!i&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),s=typeof a==`object`&&!!a&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);n[r]=o&&s?fD(a,i):i}return n}function pD(e){let t=[`ROOT`],n=-1,r=null,i=0;function a(e){return e>=`0`&&e<=`9`||e>=`A`&&e<=`F`||e>=`a`&&e<=`f`}function o(e,i,a){switch(e){case`"`:n=i,t.pop(),t.push(a),t.push(`INSIDE_STRING`);break;case`f`:case`t`:case`n`:n=i,r=i,t.pop(),t.push(a),t.push(`INSIDE_LITERAL`);break;case`-`:t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=i,t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`{`:n=i,t.pop(),t.push(a),t.push(`INSIDE_OBJECT_START`);break;case`[`:n=i,t.pop(),t.push(a),t.push(`INSIDE_ARRAY_START`)}}function s(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_COMMA`);break;case`}`:n=r,t.pop()}}function c(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=r,t.pop()}}for(let l=0;l<e.length;l++){let u=e[l];switch(t[t.length-1]){case`ROOT`:o(u,l,`FINISH`);break;case`INSIDE_OBJECT_START`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break;case`}`:n=l,t.pop()}break;case`INSIDE_OBJECT_AFTER_COMMA`:u===`"`&&(t.pop(),t.push(`INSIDE_OBJECT_KEY`));break;case`INSIDE_OBJECT_KEY`:u===`"`&&(t.pop(),t.push(`INSIDE_OBJECT_AFTER_KEY`));break;case`INSIDE_OBJECT_AFTER_KEY`:u===`:`&&(t.pop(),t.push(`INSIDE_OBJECT_BEFORE_VALUE`));break;case`INSIDE_OBJECT_BEFORE_VALUE`:o(u,l,`INSIDE_OBJECT_AFTER_VALUE`);break;case`INSIDE_OBJECT_AFTER_VALUE`:s(u,l);break;case`INSIDE_STRING`:switch(u){case`"`:t.pop(),n=l;break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`);break;default:n=l}break;case`INSIDE_ARRAY_START`:switch(u){case`]`:n=l,t.pop();break;default:n=l,o(u,l,`INSIDE_ARRAY_AFTER_VALUE`)}break;case`INSIDE_ARRAY_AFTER_VALUE`:switch(u){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=l,t.pop();break;default:n=l}break;case`INSIDE_ARRAY_AFTER_COMMA`:o(u,l,`INSIDE_ARRAY_AFTER_VALUE`);break;case`INSIDE_STRING_ESCAPE`:t.pop(),u===`u`?(i=0,t.push(`INSIDE_STRING_UNICODE_ESCAPE`)):n=l;break;case`INSIDE_STRING_UNICODE_ESCAPE`:a(u)&&(i++,i===4&&(t.pop(),n=l));break;case`INSIDE_NUMBER`:switch(u){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=l;break;case`e`:case`E`:case`-`:case`.`:break;case`,`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&s(u,l);break;case`}`:t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&s(u,l);break;case`]`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l);break;default:t.pop()}break;case`INSIDE_LITERAL`:{let i=e.substring(r,l+1);!`false`.startsWith(i)&&!`true`.startsWith(i)&&!`null`.startsWith(i)?(t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`?s(u,l):t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l)):n=l;break}}}let l=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case`INSIDE_STRING`:l+=`"`;break;case`INSIDE_OBJECT_KEY`:case`INSIDE_OBJECT_AFTER_KEY`:case`INSIDE_OBJECT_AFTER_COMMA`:case`INSIDE_OBJECT_START`:case`INSIDE_OBJECT_BEFORE_VALUE`:case`INSIDE_OBJECT_AFTER_VALUE`:l+=`}`;break;case`INSIDE_ARRAY_START`:case`INSIDE_ARRAY_AFTER_COMMA`:case`INSIDE_ARRAY_AFTER_VALUE`:l+=`]`;break;case`INSIDE_LITERAL`:{let t=e.substring(r,e.length);`true`.startsWith(t)?l+=`true`.slice(t.length):`false`.startsWith(t)?l+=`false`.slice(t.length):`null`.startsWith(t)&&(l+=`null`.slice(t.length))}}return l}async function mD(e){if(e===void 0)return{value:void 0,state:`undefined-input`};let t=await rD({text:e});return t.success?{value:t.value,state:`successful-parse`}:(t=await rD({text:pD(e)}),t.success?{value:t.value,state:`repaired-parse`}:{value:void 0,state:`failed-parse`})}YT({prefix:`steer`,size:24}),new TextEncoder,new TextEncoder,YT({prefix:`aitxt`,size:24}),YT({prefix:`call`,size:24}),TransformStream;var z={array:L,boolean:CT,custom:wne,discriminatedUnion:kT,enum:MT,instanceof:One,lazy:Cne,literal:NT,looseObject:nne,never:TT,null:Qte,number:xT,object:R,record:one,string:I,union:OT,unknown:wT},hD=z.lazy(()=>z.union([z.null(),z.string(),z.number(),z.boolean(),z.record(z.string(),hD.optional()),z.array(hD)])),gD=z.record(z.string(),z.record(z.string(),hD.optional())),_D=z.object({source:z.discriminatedUnion(`sourceType`,[z.object({type:z.literal(`source`),sourceType:z.literal(`url`),id:z.string(),url:z.string(),title:z.string().optional(),providerMetadata:gD.optional()}),z.object({type:z.literal(`source`),sourceType:z.literal(`document`),id:z.string(),mediaType:z.string(),title:z.string(),filename:z.string().optional(),providerMetadata:gD.optional()})]),startIndex:z.number().int().nonnegative().optional(),endIndex:z.number().int().nonnegative().optional(),citedText:z.string().optional()}),vD=z.record(z.string(),hD.optional()),yD=QE(()=>eD(z.union([z.looseObject({type:z.literal(`text-start`),id:z.string(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`text-delta`),id:z.string(),delta:z.string(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`text-end`),id:z.string(),citations:z.array(_D).optional(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`error`),errorText:z.string()}),z.looseObject({type:z.literal(`tool-input-start`),toolCallId:z.string(),toolName:z.string(),inputEncoding:z.enum([`json`,`text`]).optional(),providerExecuted:z.boolean().optional(),providerMetadata:gD.optional(),toolMetadata:vD.optional(),dynamic:z.boolean().optional(),title:z.string().optional()}),z.looseObject({type:z.literal(`tool-input-delta`),toolCallId:z.string(),inputTextDelta:z.string()}),z.looseObject({type:z.literal(`tool-input-available`),toolCallId:z.string(),toolName:z.string(),input:z.unknown(),providerExecuted:z.boolean().optional(),providerMetadata:gD.optional(),toolMetadata:vD.optional(),dynamic:z.boolean().optional(),title:z.string().optional()}),z.looseObject({type:z.literal(`tool-input-error`),toolCallId:z.string(),toolName:z.string(),input:z.unknown(),providerExecuted:z.boolean().optional(),providerMetadata:gD.optional(),toolMetadata:vD.optional(),dynamic:z.boolean().optional(),errorText:z.string(),title:z.string().optional()}),z.looseObject({type:z.literal(`tool-approval-request`),approvalId:z.string(),toolCallId:z.string(),approvalDescriptor:z.unknown().optional(),inputSchemaInput:z.unknown().optional(),reason:z.string().optional(),isAutomatic:z.boolean().optional(),signature:z.string().optional()}),z.looseObject({type:z.literal(`tool-approval-response`),approvalId:z.string(),approved:z.boolean(),reason:z.string().optional(),providerExecuted:z.boolean().optional(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`tool-output-available`),toolCallId:z.string(),output:z.unknown(),providerExecuted:z.boolean().optional(),providerMetadata:gD.optional(),toolMetadata:vD.optional(),dynamic:z.boolean().optional(),preliminary:z.boolean().optional()}),z.looseObject({type:z.literal(`tool-output-error`),toolCallId:z.string(),errorText:z.string(),providerExecuted:z.boolean().optional(),providerMetadata:gD.optional(),toolMetadata:vD.optional(),dynamic:z.boolean().optional()}),z.looseObject({type:z.literal(`tool-output-denied`),toolCallId:z.string()}),z.looseObject({type:z.literal(`reasoning-start`),id:z.string(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`reasoning-delta`),id:z.string(),delta:z.string(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`reasoning-end`),id:z.string(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`custom`),kind:z.string().transform(e=>e),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`source-url`),sourceId:z.string(),url:z.string(),title:z.string().optional(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`source-document`),sourceId:z.string(),mediaType:z.string(),title:z.string(),filename:z.string().optional(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`file`),url:z.string(),mediaType:z.string(),providerMetadata:gD.optional()}),z.looseObject({type:z.literal(`reasoning-file`),url:z.string(),mediaType:z.string(),providerMetadata:gD.optional()}),z.looseObject({type:z.custom(e=>typeof e==`string`&&e.startsWith(`data-`),{message:`Type must start with "data-"`}),id:z.string().optional(),data:z.unknown(),transient:z.boolean().optional()}),z.looseObject({type:z.literal(`start-step`)}),z.looseObject({type:z.literal(`finish-step`)}),z.looseObject({type:z.literal(`reset-step`)}),z.looseObject({type:z.literal(`start`),messageId:z.string().optional(),messageMetadata:z.unknown().optional()}),z.looseObject({type:z.literal(`finish`),finishReason:z.enum([`stop`,`length`,`content-filter`,`tool-calls`,`error`,`interrupted`,`other`]).optional(),messageMetadata:z.unknown().optional()}),z.looseObject({type:z.literal(`abort`),reason:z.string().optional()}),z.looseObject({type:z.literal(`message-metadata`),messageMetadata:z.unknown()})])));function bD(e){return e.type.startsWith(`data-`)}function xD(){return Object.create(null)}function SD(e){return e.type.startsWith(`tool-`)}function CD(e){return e.type===`dynamic-tool`}function wD(e){return SD(e)||CD(e)}function TD(e){return e.type.split(`-`).slice(1).join(`-`)}function ED({lastMessage:e,messageId:t}){let n=e?.role===`assistant`?e:{id:t,metadata:void 0,role:`assistant`,parts:[]},r=xD(),i=n.parts.findLastIndex(e=>e.type===`step-start`),a=0;for(let e of n.parts.slice(i+1)){if(!wD(e))continue;let t=a;SD(e)&&a++,e.state===`input-streaming`&&(r[e.toolCallId]={text:e.rawInput??``,inputEncoding:e.inputEncoding,index:t,toolName:e.type===`dynamic-tool`?e.toolName:TD(e),dynamic:e.type===`dynamic-tool`,title:e.title,toolMetadata:e.toolMetadata})}return{message:n,activeTextParts:xD(),activeReasoningParts:xD(),partialToolCalls:r}}function DD({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:i,onToolCall:a,onData:o,resetStateOnMessageIdChange:s=!1,resetStateOnFirstMessageStart:c=!1}){let l=!0;return e.pipeThrough(new TransformStream({async transform(e,u){await r(async({state:r,write:d})=>{function f(){let e=r.message.parts,t=e.length-1;for(;t>=0&&e[t].type!==`step-start`;)t--;return e.slice(t+1)}function p(){return f().filter(wD)}function m(e){let t=p().find(t=>t.toolCallId===e);if(t==null){let n=r.message.parts;for(let r=n.length-1;r>=0;r--){let i=n[r];if(wD(i)&&i.toolCallId===e){t=i;break}}}if(t==null)throw new dD({chunkType:`tool-invocation`,chunkId:e,message:`No tool invocation found for tool call ID "${e}".`});return t}function h(e){let t=r.message.parts.filter(wD).find(t=>t.approval?.id===e);if(t==null)throw new dD({chunkType:`tool-approval-response`,chunkId:e,message:`No tool invocation found for approval ID "${e}".`});return t}function g(e,t){let n=t??f().find(t=>SD(t)&&t.toolCallId===e.toolCallId),i=e,a=n;if(n!=null){n.state=e.state,a.type=`tool-${e.toolName}`,a.input=i.input,a.output=i.output,a.errorText=i.errorText,a.rawInput=i.rawInput,i.inputEncoding==null?delete a.inputEncoding:a.inputEncoding=i.inputEncoding,a.preliminary=i.preliminary,e.title!==void 0&&(a.title=e.title),e.toolMetadata!==void 0&&(a.toolMetadata=e.toolMetadata),a.providerExecuted=i.providerExecuted??n.providerExecuted;let t=i.providerMetadata;if(t!=null){if(e.state===`output-available`||e.state===`output-error`){let e=n;e.resultProviderMetadata=t}else n.callProviderMetadata=t}}else r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},input:i.input,...i.inputEncoding==null?{}:{inputEncoding:i.inputEncoding},output:i.output,rawInput:i.rawInput,errorText:i.errorText,providerExecuted:i.providerExecuted,preliminary:i.preliminary,...i.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:i.providerMetadata}:{},...i.providerMetadata!=null&&e.state!==`output-available`&&e.state!==`output-error`?{callProviderMetadata:i.providerMetadata}:{}})}function _(e,t){let n=t??f().find(t=>t.type===`dynamic-tool`&&t.toolCallId===e.toolCallId),i=e,a=n;if(n!=null){n.state=e.state,a.toolName=e.toolName,a.input=i.input,a.output=i.output,a.errorText=i.errorText,a.rawInput=i.rawInput,i.inputEncoding==null?delete a.inputEncoding:a.inputEncoding=i.inputEncoding,a.preliminary=i.preliminary,e.title!==void 0&&(a.title=e.title),e.toolMetadata!==void 0&&(a.toolMetadata=e.toolMetadata),a.providerExecuted=i.providerExecuted??n.providerExecuted;let t=i.providerMetadata;if(t!=null){if(e.state===`output-available`||e.state===`output-error`){let e=n;e.resultProviderMetadata=t}else n.callProviderMetadata=t}}else r.message.parts.push({type:`dynamic-tool`,toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:i.input,...i.inputEncoding==null?{}:{inputEncoding:i.inputEncoding},output:i.output,errorText:i.errorText,preliminary:i.preliminary,providerExecuted:i.providerExecuted,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},...i.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:i.providerMetadata}:{},...i.providerMetadata!=null&&e.state!==`output-available`&&e.state!==`output-error`?{callProviderMetadata:i.providerMetadata}:{}})}async function v(e){if(e!=null){let n=r.message.metadata==null?e:fD(r.message.metadata,e);t!=null&&await tD({value:n,schema:t,context:{field:`message.metadata`,entityId:r.message.id}}),r.message.metadata=n}}switch(e.type){case`text-start`:{let t={type:`text`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeTextParts[e.id]=t,r.message.parts.push(t),d();break}case`text-delta`:{let t=r.activeTextParts[e.id];if(t==null)throw new dD({chunkType:`text-delta`,chunkId:e.id,message:`Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,d();break}case`text-end`:{let t=r.activeTextParts[e.id];if(t==null)throw new dD({chunkType:`text-end`,chunkId:e.id,message:`Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});t.state=`done`,e.citations!=null&&(t.citations=e.citations),t.providerMetadata=e.providerMetadata??t.providerMetadata,delete r.activeTextParts[e.id],d();break}case`custom`:{let t={type:`custom`,kind:e.kind,providerMetadata:e.providerMetadata};r.message.parts.push(t),d();break}case`reasoning-start`:{let t={type:`reasoning`,id:e.id,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),d();break}case`reasoning-delta`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new dD({chunkType:`reasoning-delta`,chunkId:e.id,message:`Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,d();break}case`reasoning-end`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new dD({chunkType:`reasoning-end`,chunkId:e.id,message:`Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});t.providerMetadata=e.providerMetadata??t.providerMetadata,t.state=`done`,delete r.activeReasoningParts[e.id],d();break}case`file`:case`reasoning-file`:r.message.parts.push({type:e.type,mediaType:e.mediaType,url:e.url,...e.providerMetadata==null?{}:{providerMetadata:e.providerMetadata}}),d();break;case`source-url`:r.message.parts.push({type:`source-url`,sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),d();break;case`source-document`:r.message.parts.push({type:`source-document`,sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),d();break;case`tool-input-start`:{let t=f().filter(SD);r.partialToolCalls[e.toolCallId]={text:``,inputEncoding:e.inputEncoding,toolName:e.toolName,index:t.length,dynamic:e.dynamic,title:e.title,toolMetadata:e.toolMetadata},e.dynamic?_({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,inputEncoding:e.inputEncoding,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}):g({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,inputEncoding:e.inputEncoding,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}),d();break}case`tool-input-delta`:{let t=r.partialToolCalls[e.toolCallId];if(t==null)throw new dD({chunkType:`tool-input-delta`,chunkId:e.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});t.text+=e.inputTextDelta;let n=t.inputEncoding===`text`?t.text:(await mD(t.text)).value;t.dynamic?_({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,inputEncoding:t.inputEncoding,input:n,rawInput:t.text,title:t.title,toolMetadata:t.toolMetadata}):g({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,inputEncoding:t.inputEncoding,input:n,rawInput:t.text,title:t.title,toolMetadata:t.toolMetadata}),d();break}case`tool-input-available`:e.dynamic?_({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}):g({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}),d(),a&&!e.providerExecuted&&await a({toolCall:e});break;case`tool-input-error`:{let t=f().filter(wD).find(t=>t.toolCallId===e.toolCallId);(t==null?e.dynamic:t.type===`dynamic-tool`)?_({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}):g({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}),d();break}case`tool-approval-request`:{let t=m(e.toolCallId);t.state=`approval-requested`,t.approval={id:e.approvalId,...e.approvalDescriptor==null?{}:{descriptor:e.approvalDescriptor},...Object.prototype.hasOwnProperty.call(e,`inputSchemaInput`)?{inputSchemaInput:e.inputSchemaInput}:{},...e.reason==null?{}:{requestReason:e.reason},...e.isAutomatic===!0?{isAutomatic:!0}:{},...e.signature==null?{}:{signature:e.signature}},d();break}case`tool-approval-response`:{let t=h(e.approvalId),n=t.approval==null?{id:e.approvalId}:t.approval;t.state=`approval-responded`,t.approval={...n,id:e.approvalId,approved:e.approved,...e.reason==null?{}:{reason:e.reason}},e.providerExecuted!=null&&(t.providerExecuted=e.providerExecuted),e.providerMetadata!=null&&(t.callProviderMetadata=e.providerMetadata),d();break}case`tool-output-denied`:{let t=m(e.toolCallId);t.state=`output-denied`,d();break}case`tool-output-available`:{let t=m(e.toolCallId);t.type===`dynamic-tool`?_({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-available`,input:t.input,output:e.output,preliminary:e.preliminary,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:e.toolMetadata??t.toolMetadata},t):g({toolCallId:e.toolCallId,toolName:TD(t),state:`output-available`,input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:e.toolMetadata??t.toolMetadata},t),d();break}case`tool-output-error`:{let t=m(e.toolCallId);t.type===`dynamic-tool`?_({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-error`,input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:e.toolMetadata??t.toolMetadata},t):g({toolCallId:e.toolCallId,toolName:TD(t),state:`output-error`,input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:e.toolMetadata??t.toolMetadata},t),d();break}case`start-step`:r.message.parts.push({type:`step-start`});break;case`finish-step`:break;case`reset-step`:{let e=f();r.activeTextParts=xD(),r.activeReasoningParts=xD(),r.partialToolCalls=xD(),e.length>0&&(r.message.parts.splice(r.message.parts.length-e.length,e.length),d());break}case`start`:{let t=c&&l||s&&e.messageId!=null&&e.messageId!==r.message.id;l=!1,t&&Object.assign(r,ED({lastMessage:void 0,messageId:e.messageId??r.message.id}),{finishReason:void 0}),e.messageId!=null&&(r.message.id=e.messageId),await v(e.messageMetadata),(t||e.messageId!=null||e.messageMetadata!=null)&&d({updateStatus:!1});break}case`finish`:e.finishReason!=null&&(r.finishReason=e.finishReason),await v(e.messageMetadata),e.messageMetadata!=null&&d();break;case`message-metadata`:await v(e.messageMetadata),e.messageMetadata!=null&&d();break;case`error`:i?.(Error(e.errorText));break;default:if(bD(e)){if(n?.[e.type]!=null){let t=r.message.parts.findIndex(t=>`id`in t&&`data`in t&&t.id===e.id&&t.type===e.type),i=t>=0?t:r.message.parts.length;await tD({value:e.data,schema:n[e.type],context:{field:`message.parts[${i}].data`,entityName:e.type,entityId:e.id}})}let t=e;if(t.transient){o?.(t);break}let i=t.id==null?void 0:r.message.parts.find(e=>t.type===e.type&&t.id===e.id);i==null?r.message.parts.push(t):i.data=t.data,o?.(t),d()}}u.enqueue(e)})}}))}async function OD({stream:e,onError:t,abortSignal:n}){let r=e.getReader(),i=()=>{r.cancel().catch(()=>{})};n?.aborted?i():n?.addEventListener(`abort`,i,{once:!0});try{for(;;){let{done:e}=await r.read();if(e)break}}catch(e){t?.(e)}finally{n?.removeEventListener(`abort`,i),r.releaseLock()}}function kD(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}YT({prefix:`aitxt`,size:24}),YT({prefix:`call`,size:24}),YT({prefix:`aitxt`,size:24}),YT({prefix:`call`,size:24}),z.record(z.string(),hD.optional()),z.record(z.string(),z.string()),YT({prefix:`call`,size:24}),YT({prefix:`call`,size:24}),new TextEncoder,YT({prefix:`call`,size:24}),YT({prefix:`aiobj`,size:24});var{atob:Zne}=globalThis,AD=class{constructor(){this.queue=[],this.isProcessing=!1,this.idleWaiters=[]}async processQueue(){if(!this.isProcessing){this.isProcessing=!0;try{for(;this.queue.length>0;)await this.queue[0](),this.queue.shift()}finally{this.isProcessing=!1;for(let e of this.idleWaiters.splice(0))e()}}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(e){n(e)}}),this.processQueue()})}async waitForIdle(){(this.isProcessing||this.queue.length!==0)&&await new Promise(e=>{this.idleWaiters.push(e)})}};YT({prefix:`aiobj`,size:24}),YT({prefix:`call`,size:24});var jD=z.union([z.string(),z.instanceof(Uint8Array),z.instanceof(ArrayBuffer),z.custom(XT,{message:`Must be a Buffer`})]),MD=z.record(z.string(),z.string()),ND=z.object({type:z.literal(`text`),text:z.string(),providerOptions:gD.optional()}),PD=z.object({type:z.literal(`image`),image:z.union([jD,z.instanceof(URL),MD]),mediaType:z.string().optional(),providerOptions:gD.optional()}),FD=z.discriminatedUnion(`type`,[z.object({type:z.literal(`data`),data:jD}),z.object({type:z.literal(`url`),url:z.instanceof(URL)}),z.object({type:z.literal(`reference`),reference:MD}),z.object({type:z.literal(`text`),text:z.string()})]),ID=z.discriminatedUnion(`type`,[z.object({type:z.literal(`data`),data:jD}),z.object({type:z.literal(`url`),url:z.instanceof(URL)})]),LD=z.object({type:z.literal(`file`),data:z.union([FD,jD,z.instanceof(URL),MD]),filename:z.string().optional(),mediaType:z.string(),providerOptions:gD.optional()}),RD=z.object({type:z.literal(`reasoning`),text:z.string(),providerOptions:gD.optional()}),zD=z.object({type:z.literal(`custom`),kind:z.string().transform(e=>e),providerOptions:gD.optional()}),BD=z.object({type:z.literal(`reasoning-file`),data:z.union([ID,jD,z.instanceof(URL)]),mediaType:z.string(),providerOptions:gD.optional()}),VD=z.object({type:z.literal(`tool-call`),toolCallId:z.string(),toolName:z.string(),input:z.unknown(),providerOptions:gD.optional(),providerExecuted:z.boolean().optional()}),HD=z.discriminatedUnion(`type`,[z.object({type:z.literal(`text`),value:z.string(),providerOptions:gD.optional()}),z.object({type:z.literal(`json`),value:hD,providerOptions:gD.optional()}),z.object({type:z.literal(`execution-denied`),reason:z.string().optional(),providerOptions:gD.optional()}),z.object({type:z.literal(`error-text`),value:z.string(),providerOptions:gD.optional()}),z.object({type:z.literal(`error-json`),value:hD,providerOptions:gD.optional()}),z.object({type:z.literal(`content`),value:z.array(z.union([z.object({type:z.literal(`text`),text:z.string(),providerOptions:gD.optional()}),z.object({type:z.literal(`file`),data:FD,mediaType:z.string(),filename:z.string().optional(),providerOptions:gD.optional()}),z.object({type:z.literal(`file-data`),data:z.string(),mediaType:z.string(),filename:z.string().optional(),providerOptions:gD.optional()}),z.object({type:z.literal(`file-url`),url:z.string(),mediaType:z.string().optional(),providerOptions:gD.optional()}),z.object({type:z.literal(`file-id`),fileId:z.union([z.string(),z.record(z.string(),z.string())]),providerOptions:gD.optional()}),z.object({type:z.literal(`file-reference`),providerReference:z.record(z.string(),z.string()),providerOptions:gD.optional()}),z.object({type:z.literal(`image-data`),data:z.string(),mediaType:z.string(),providerOptions:gD.optional()}),z.object({type:z.literal(`image-url`),url:z.string(),providerOptions:gD.optional()}),z.object({type:z.literal(`image-file-id`),fileId:z.union([z.string(),z.record(z.string(),z.string())]),providerOptions:gD.optional()}),z.object({type:z.literal(`image-file-reference`),providerReference:z.record(z.string(),z.string()),providerOptions:gD.optional()}),z.object({type:z.literal(`custom`),providerOptions:gD.optional()})]))})]),UD=z.object({type:z.literal(`tool-result`),toolCallId:z.string(),toolName:z.string(),output:HD,providerOptions:gD.optional()}),WD=z.object({type:z.literal(`tool-approval-request`),approvalId:z.string(),toolCallId:z.string(),reason:z.string().optional(),isAutomatic:z.boolean().optional(),signature:z.string().optional(),inputSchemaInput:z.unknown().optional()}),GD=z.object({type:z.literal(`tool-approval-response`),approvalId:z.string(),approved:z.boolean(),reason:z.string().optional()}),KD=z.object({role:z.literal(`system`),content:z.string(),providerOptions:gD.optional()}),qD=z.object({role:z.literal(`user`),content:z.union([z.string(),z.array(z.union([ND,PD,LD]))]),providerOptions:gD.optional()}),JD=z.object({role:z.literal(`assistant`),content:z.union([z.string(),z.array(z.union([ND,zD,LD,RD,BD,VD,UD,WD]))]),providerOptions:gD.optional()}),YD=z.object({role:z.literal(`tool`),content:z.array(z.union([UD,GD])),providerOptions:gD.optional()});z.union([KD,qD,JD,YD]),z.object({token:z.string().refine(e=>e.trim().length>0),url:z.string().refine(e=>{try{let t=new URL(e);return(t.protocol===`ws:`||t.protocol===`wss:`)&&t.hostname!==``}catch{return!1}}),expiresAt:z.number().positive().max(2**53-1).optional(),tools:z.array(z.object({type:z.literal(`function`),name:z.string().min(1),description:z.string().optional(),parameters:z.record(z.string(),z.unknown())})).optional()}),YT({prefix:`call`,size:24}),YT({prefix:`call`,size:24}),YT({prefix:`call`,size:24});async function XD({response:e,url:t,fallbackMessage:n}){let r=await e.text();return new uv({message:r||n,url:t,requestBodyValues:void 0,statusCode:e.status,responseBody:r})}async function ZD(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new jv({functionality:`FileList`,message:`FileList is not supported in the current environment`});return Promise.all(Array.from(e).map(async e=>{let{name:t,type:n}=e;return{type:`file`,mediaType:n,filename:t,url:await new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result)},r.onerror=e=>n(e),r.readAsDataURL(e)})}}))}function QD(e,t){let n=e.search(/[?#]/),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n);return`${r.endsWith(`/`)&&t.startsWith(`/`)?r.slice(0,-1):r}${t}${i}`}var $D=class{constructor({api:e=`/api/chat`,credentials:t,headers:n,body:r,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){let n=await iD(this.body),r=await iD(this.headers),i=await iD(this.credentials),a={...JT(r),...JT(t.headers)},o=await this.prepareSendMessagesRequest?.({api:this.api,id:t.chatId,messages:t.messages,body:{...n,...t.body},headers:a,credentials:i,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId}),s=o?.api??this.api,c=o?.headers===void 0?a:JT(o.headers),l=o?.body===void 0?{...n,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId}:o.body,u=o?.credentials??i,d=await(this.fetch??globalThis.fetch)(s,{method:`POST`,headers:{"content-type":`application/json`,...c},body:JSON.stringify(l),credentials:u,signal:e});if(!d.ok)throw await XD({response:d,url:s,fallbackMessage:`Failed to fetch the chat response.`});if(!d.body)throw new mv({message:`The response body is empty.`});return this.processResponseStream(d.body)}async reconnectToStream(e){let t=await iD(this.body),n=await iD(this.headers),r=await iD(this.credentials),i={...JT(n),...JT(e.headers)},a=await this.prepareReconnectToStreamRequest?.({api:this.api,id:e.chatId,body:{...t,...e.body},headers:i,credentials:r,requestMetadata:e.metadata}),o=a?.api;if(o==null){if(e.chatId===`.`||e.chatId===`..`)throw new sD({parameter:`chatId`,value:e.chatId,message:`Chat IDs must not be "." or ".." when using the default reconnect URL.`});o=QD(this.api,`/${encodeURIComponent(e.chatId)}/stream`)}let s=a?.headers===void 0?i:JT(a.headers),c=a?.credentials??r,l=await(this.fetch??globalThis.fetch)(o,{method:`GET`,headers:s,credentials:c,signal:e.abortSignal});if(l.status===204)return null;if(!l.ok)throw await XD({response:l,url:o,fallbackMessage:`Failed to fetch the chat response.`});if(!l.body)throw new mv({message:`The response body is empty.`});return this.processResponseStream(l.body)}},eO=class extends $D{constructor({resumeStreamIsReplay:e=!0,...t}={}){super(t),this.resumeStreamIsReplay=e}processResponseStream(e){return Yne({stream:e,schema:yD}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},tO=class{get id(){return this._id??=this.generateId()}constructor({generateId:e=Pne,id:t,transport:n=new eO,messageMetadataSchema:r,dataPartSchemas:i,state:a,onError:o,onToolCall:s,onFinish:c,onData:l,sendAutomaticallyWhen:u}){this.pendingMessagePreparations=new Set,this.interruptedMessageIds=new Set,this.activeResponse=void 0,this.activeResumeRequest=void 0,this.resumableStreamState=void 0,this.jobExecutor=new AD,this.activeStopCount=0,this.stopGeneration=0,this.sendMessage=async(e,t)=>{if(e==null){let e=this.pendingApprovalMessageId;if(e==null){e=this.lastMessage?.id;for(let t=this.state.messages.length-1;t>=0;t--){let n=this.state.messages[t];if(n.role===`assistant`&&n.parts.some(e=>wD(e)&&e.state===`approval-responded`)){e=n.id;break}}}let n=e!=null&&e===this.pendingApprovalMessageId?this.state.messages.findIndex(t=>t.id===e):-1;await this.makeRequestForToolApproval({messageId:e,messageIndex:n,...t});return}let n;if(`text`in e||`files`in e){let t=new AbortController;this.pendingMessagePreparations.add(t);let r;try{r=Array.isArray(e.files)?e.files:await ZD(e.files)}finally{this.pendingMessagePreparations.delete(t)}if(t.signal.aborted)return;n={parts:[...r,...`text`in e&&e.text!=null?[{type:`text`,text:e.text}]:[]]}}else n=e;if(e.messageId!=null){let t=this.state.messages.findIndex(t=>t.id===e.messageId);if(t===-1)throw new sD({parameter:`message.messageId`,value:e.messageId,message:`message with id ${e.messageId} not found`});if(this.state.messages[t].role!==`user`)throw new sD({parameter:`message.messageId`,value:e.messageId,message:`message with id ${e.messageId} is not a user message`});this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{id:e.messageId,...n,role:n.role??`user`,metadata:e.metadata})}else this.state.pushMessage({...n,id:n.id??this.generateId(),role:n.role??`user`,metadata:e.metadata});await this.makeRequest({trigger:`submit-message`,messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{let n=e==null?this.state.messages.length-1:this.state.messages.findIndex(t=>t.id===e);if(n===-1)throw new sD({parameter:`messageId`,value:e,message:`message ${e} not found`});this.state.messages=this.state.messages.slice(0,this.messages[n].role===`assistant`?n:n+1),await this.makeRequest({trigger:`regenerate-message`,messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:`resume-stream`,...e})},this[`~resumeStreamIfDisconnected`]=async({shouldResume:e=()=>!0}={})=>{let t=this.activeResponse;this.resumableStreamState==null&&t!=null&&(await t.completionPromise,this.resumableStreamState!==t.state)||this.resumableStreamState!=null&&e()&&await this.resumeStream()},this.clearError=()=>{this.status===`error`&&(this.state.error=void 0,this.setStatus({status:`ready`}))},this.addToolApprovalResponse=async({id:e,approved:t,reason:n,options:r})=>this.jobExecutor.run(async()=>{let i=this.state.messages,a=r=>wD(r)&&r.state===`approval-requested`&&r.approval.id===e?{...r,state:`approval-responded`,approval:{...r.approval,id:e,approved:t,reason:n}}:r,o=i.findIndex(t=>t.parts.some(t=>wD(t)&&t.state===`approval-requested`&&t.approval.id===e));if(o!==-1){let e=i[o];this.state.replaceMessage(o,{...e,parts:e.parts.map(a)}),this.pendingApprovalMessageId=e.id}if(this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(a)),o!==-1&&this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen){let e=await this.shouldSendAutomatically(i[o].id);e&&this.runAutomaticRequest(()=>{let e=o===-1?this.lastMessage?.id:i[o].id;return this.makeRequestForToolApproval({messageId:e,messageIndex:o,...r})},e)}}),this.addToolOutput=async({state:e,toolCallId:t,output:n,errorText:r,options:i})=>this.jobExecutor.run(async()=>{let a=this.state.messages,o=i=>{if(!wD(i)||i.toolCallId!==t)return i;let{approval:a,...o}=i,s=a?.approved===!0?{approval:{...a,approved:a.approved}}:{};return e===`output-error`?{...o,...s,state:e,input:i.input,output:void 0,errorText:r}:{...o,...s,state:`output-available`,input:i.input,output:n,errorText:void 0}},s=a.findIndex(e=>e.parts.some(e=>wD(e)&&e.toolCallId===t));if(s!==-1){let e=a[s];this.state.replaceMessage(s,{...e,parts:e.parts.map(o)})}if(this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(o)),s!==-1&&this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen){let e=await this.shouldSendAutomatically(a[s].id);e&&this.runAutomaticRequest(()=>this.makeRequest({trigger:`submit-message`,messageId:a[s].id,...i}),e)}}),this.addToolResult=this.addToolOutput,this.stop=async()=>{this.activeStopCount++,this.stopGeneration++;try{let e=this.activeResumeRequest,t=this.activeResponse;for(let e of this.pendingMessagePreparations)e.abort();e?.abortController.abort(),t?.abortController.abort(),await Promise.all([e?.completionPromise,t?.completionPromise]),await this.jobExecutor.waitForIdle()}finally{this.activeStopCount--}},this.dispose=async()=>{await this.stop(),this.transport.close?.()},this._id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=a,this.onError=o,this.onToolCall=s,this.onFinish=c,this.onData=l,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status===e?this.error!==t&&(this.state.error=t):(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(e=this.lastMessage?.id){let t=e=>e!=null&&this.interruptedMessageIds.has(e);return!this.sendAutomaticallyWhen||t(e)||t(this.lastMessage?.id)?!1:await this.sendAutomaticallyWhen({messages:this.state.messages})&&!t(e)&&!t(this.lastMessage?.id)}async runAutomaticRequest(e,t){let n=this.stopGeneration,r=this.activeStopCount>0;(t??await this.shouldSendAutomatically())&&(r||n!==this.stopGeneration||this.activeStopCount>0||await e())}async makeRequestForToolApproval({messageId:e,messageIndex:t,...n}){let r=e!=null&&e===this.pendingApprovalMessageId;r&&(this.pendingApprovalMessageId=void 0),await this.makeRequest({trigger:`submit-message`,messageId:e,...n}),r&&this.status===`error`&&this.pendingApprovalMessageId==null&&(this.pendingApprovalMessageId=this.state.messages[t]?.id??e)}async makeRequest(e){let t=kD();try{await this.makeRequestImpl({...e,completionPromise:t.promise})}finally{t.resolve()}}async makeRequestImpl({trigger:e,metadata:t,headers:n,body:r,messageId:i,completionPromise:a}){e!==`resume-stream`&&(this.resumableStreamState=void 0);let o=new AbortController,s=e===`resume-stream`?{abortController:o,completionPromise:a}:void 0;s&&(this.activeResumeRequest?.abortController.abort(),this.activeResumeRequest=s);let c=()=>s==null||this.activeResumeRequest===s,l=()=>{this.activeResumeRequest===s&&(this.activeResumeRequest=void 0)},u;if(e===`resume-stream`)try{let e=await this.transport.reconnectToStream({chatId:this.id,abortSignal:o.signal,metadata:t,headers:n,body:r});if(o.signal.aborted||!c()){await e?.cancel().catch(()=>{}),c()&&(this.setStatus({status:`ready`}),this.resumableStreamState=void 0),l();return}if(e==null){this.setStatus({status:`ready`}),this.resumableStreamState=void 0,l();return}u=e}catch(e){if(o.signal.aborted||e.name===`AbortError`){c()&&(this.setStatus({status:`ready`}),this.resumableStreamState=void 0),l();return}if(!c())return;this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e}),l();return}this.setStatus({status:`submitted`,error:void 0});let d=this.lastMessage,f=e===`submit-message`&&i!=null?this.state.messages.findIndex(e=>e.id===i):this.state.messages.length-1,p=f===-1?d:this.state.messages[f],m=p?.id,h=e===`resume-stream`&&p?.role===`assistant`&&p.parts.some(e=>wD(e)&&(e.state===`input-streaming`||e.state===`input-available`&&e.providerExecuted||e.state===`approval-responded`))?this.state.snapshot(p):void 0,g=f!==-1&&f<this.state.messages.length-1&&p?.role===`assistant`,_=!1,v=!1,y=!1,b;try{let s={state:e===`resume-stream`&&this.resumableStreamState!=null?this.resumableStreamState:ED({lastMessage:e===`resume-stream`?h:e===`regenerate-message`?void 0:this.state.snapshot(p),messageId:this.generateId()}),abortController:o,completionPromise:a};b=s,s.abortController.signal.addEventListener(`abort`,()=>{_=!0}),this.activeResponse=s;let l;if(l=e===`resume-stream`?u:await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:s.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:i}),await OD({stream:DD({stream:l,resetStateOnMessageIdChange:e===`resume-stream`,resetStateOnFirstMessageStart:e===`resume-stream`&&this.transport.resumeStreamIsReplay,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:e=>this.jobExecutor.run(()=>s.abortController.signal.aborted?Promise.resolve():e({state:s.state,write:({updateStatus:e=!0}={})=>{if(s.abortController.signal.aborted)return;e&&this.setStatus({status:`streaming`});let t=this.state.messages.findLastIndex(e=>e.id===s.state.message.id);if(t!==-1)this.state.replaceMessage(t,s.state.message);else if(g){let e=this.state.messages.findLastIndex(e=>e.id===m);e===-1?this.state.pushMessage(s.state.message):this.state.replaceMessage(e,s.state.message)}else this.state.pushMessage(s.state.message)}})),onError:e=>{throw e}}),abortSignal:s.abortController.signal,onError:e=>{throw e}}),_)return c()&&(this.setStatus({status:`ready`}),this.resumableStreamState===s.state&&(this.resumableStreamState=void 0)),null;c()&&(this.setStatus({status:`ready`}),this.resumableStreamState===s.state&&(this.resumableStreamState=void 0))}catch(e){if(_||e.name===`AbortError`)return _=!0,c()&&(this.setStatus({status:`ready`}),this.resumableStreamState===b?.state&&(this.resumableStreamState=void 0)),null;if(!c())return null;if(y=!0,e instanceof TypeError){let t=e.message.toLowerCase();v=t.includes(`fetch`)||t.includes(`network`)||t===`load failed`}v?this.resumableStreamState=b?.state:this.resumableStreamState===b?.state&&(this.resumableStreamState=void 0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e})}finally{try{if(b){let{message:e,finishReason:t}=b.state;t===`interrupted`?this.interruptedMessageIds.add(e.id):!_&&!y&&this.interruptedMessageIds.delete(e.id),this.onFinish?.({message:b.state.message,messages:this.state.messages,isAbort:_,isDisconnect:v,isError:y,finishReason:b.state.finishReason})}}finally{this.activeResponse===b&&(this.activeResponse=void 0),l()}}!_&&!y&&b?.state.finishReason!==`interrupted`&&await this.runAutomaticRequest(()=>this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,metadata:t,headers:n,body:r}))}},nO=l(o(((e,t)=>{function n(e,t){if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let n,r=0;return function(...i){clearTimeout(n);let a=Date.now(),o=t-(a-r);o<=0?(r=a,e.apply(this,i)):n=setTimeout(()=>{r=Date.now(),e.apply(this,i)},o)}}t.exports=n}))(),1);function rO(e,t){return t==null?e:(0,nO.default)(e,t)}function iO(e){return Array.isArray(e)?[...e]:typeof e==`object`&&e&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)?{...e}:e}var aO=class{#e;#t;#n;#r;#i;#a;constructor(e=[]){this.#t=`ready`,this.#n=void 0,this.#r=new Set,this.#i=new Set,this.#a=new Set,this.pushMessage=e=>{this.#e=this.#e.concat(e),this.#o()},this.popMessage=()=>{this.#e=this.#e.slice(0,-1),this.#o()},this.replaceMessage=(e,t)=>{this.#e=[...this.#e.slice(0,e),this.snapshot(t),...this.#e.slice(e+1)],this.#o()},this.snapshot=e=>{if(typeof e!=`object`||!e||!(`parts`in e)||!Array.isArray(e.parts))return e;let t=e,n={...t,parts:t.parts.map(e=>({...e}))};return`metadata`in t&&(n.metadata=iO(t.metadata)),n},this[`~registerMessagesCallback`]=(e,t)=>{let n=t?rO(e,t):e;return this.#r.add(n),()=>{this.#r.delete(n)}},this[`~registerStatusCallback`]=e=>(this.#i.add(e),()=>{this.#i.delete(e)}),this[`~registerErrorCallback`]=e=>(this.#a.add(e),()=>{this.#a.delete(e)}),this.#o=()=>{this.#r.forEach(e=>e())},this.#s=()=>{this.#i.forEach(e=>e())},this.#c=()=>{this.#a.forEach(e=>e())},this.#e=e}get status(){return this.#t}set status(e){this.#t=e,this.#s()}get error(){return this.#n}set error(e){this.#n=e,this.#c()}get messages(){return this.#e}set messages(e){this.#e=[...e],this.#o()}#o;#s;#c},oO=class extends tO{#e;constructor({messages:e,...t}){let n=new aO(e);super({...t,state:n}),this[`~registerMessagesCallback`]=(e,t)=>this.#e[`~registerMessagesCallback`](e,t),this[`~registerStatusCallback`]=e=>this.#e[`~registerStatusCallback`](e),this[`~registerErrorCallback`]=e=>this.#e[`~registerErrorCallback`](e),this.#e=n}},sO=new WeakMap;function cO({chat:e,state:t}){if(document.visibilityState!==`visible`||t.pendingVisibilityResume!=null)return;let n=()=>sO.get(e)===t&&t.registrations.size>0,r=()=>{t.pendingVisibilityResume=void 0};t.pendingVisibilityResume=e[`~resumeStreamIfDisconnected`]({shouldResume:()=>n()&&document.visibilityState===`visible`}).then(r,r)}function lO({chat:e,registration:t}){let n=sO.get(e);if(n==null){let t={registrations:new Set};if(sO.set(e,t),n=t,typeof document<`u`){let n=()=>cO({chat:e,state:t});document.addEventListener(`visibilitychange`,n),t.cleanupVisibilityListener=()=>{document.removeEventListener(`visibilitychange`,n)}}}let{registrations:r}=n,i=r.size===0;return r.add(t),i&&e.status!==`submitted`&&e.status!==`streaming`&&e.resumeStream(),()=>{r.delete(t),r.size===0&&(n.cleanupVisibilityListener?.(),sO.delete(e))}}function uO(e){return{chat:e,messages:e.messages,status:e.status,error:e.error}}function dO(e,t){return e.chat===t.chat&&e.messages===t.messages&&e.status===t.status&&e.error===t.error}function fO({throttle:e,experimental_throttle:t,resume:n=!1,...r}={}){let i=e??t,a=(0,v.useRef)({}),o=(0,v.useRef)({});`chat`in r||(o.current={onToolCall:r.onToolCall,onData:r.onData,onFinish:r.onFinish,onError:r.onError,sendAutomaticallyWhen:r.sendAutomaticallyWhen,transport:r.transport});let s,c=()=>o.current.transport??(s??=new eO),l={...r,transport:{get resumeStreamIsReplay(){return c().resumeStreamIsReplay},sendMessages:e=>c().sendMessages(e),reconnectToStream:e=>c().reconnectToStream(e)},onToolCall:e=>o.current.onToolCall?.(e),onData:e=>o.current.onData?.(e),onFinish:e=>o.current.onFinish?.(e),onError:e=>o.current.onError?.(e),sendAutomaticallyWhen:e=>o.current.sendAutomaticallyWhen?.(e)??!1},u=`chat`in r?r.chat:r.id,{chat:d,isExternallyManaged:f}=(0,v.useMemo)(()=>({chat:`chat`in r?r.chat:new oO(l),isExternallyManaged:`chat`in r}),[u]);(0,v.useEffect)(()=>{if(!f)return()=>{d.stop()}},[d,f]);let[p,m]=(0,v.useState)(()=>uO(d));p.chat!==d&&m(uO(d)),(0,v.useEffect)(()=>{let e=!0,t=()=>{if(!e)return;let t=uO(d);m(e=>e.chat!==d||dO(e,t)?e:t)},n=[d[`~registerMessagesCallback`](t,i),d[`~registerStatusCallback`](t),d[`~registerErrorCallback`](t)],r=uO(d);return m(e=>dO(e,r)?e:r),()=>{e=!1,n.forEach(e=>e())}},[d,i]);let{messages:h,status:g,error:_}=p,y=(0,v.useCallback)(e=>{typeof e==`function`&&(e=e(d.messages)),d.messages=e},[d]);return(0,v.useEffect)(()=>{if(n)return lO({chat:d,registration:a.current})},[n,d]),{get id(){return d.id},messages:h,setMessages:y,sendMessage:d.sendMessage,regenerate:d.regenerate,clearError:d.clearError,stop:d.stop,error:_,resumeStream:d.resumeStream,status:g,addToolResult:d.addToolOutput,addToolOutput:d.addToolOutput,addToolApprovalResponse:d.addToolApprovalResponse}}var pO=e=>e!==void 0&&/\s/.test(e),mO=e=>e!==void 0&&e>=`0`&&e<=`9`;function hO(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e[r];if(i===`\\`&&e[r+1]===`$`)n+=`$`,r+=2;else if(i!==`$`)n+=i,r+=1;else if(e[r+1]===`$`)for(;e[r]===`$`;)n+=`$`,r+=1;else{let i=gO(e,r);i===void 0?(n+=`$`,r+=1):(n&&t.push({text:n}),n=``,t.push({formula:e.slice(r+1,i)}),r=i+1)}}return n&&t.push({text:n}),t}function gO(e,t){let n=t+1;for(;n<e.length&&e[n]!==`$`;)n+=e[n]===`\\`&&(e[n+1]===`$`||e[n+1]===`\\`)?2:1;if(!(n>=e.length||n===t+1||e[n+1]===`$`)&&!(pO(e[t+1])||pO(e[n-1])||mO(e[n+1])))return/`|\n\s*\n/.test(e.slice(t,n))?void 0:n}var _O=String.raw`Wrap LaTeX commands in single-dollar math delimiters, with no spaces inside: $\displaystyle\sum_{i=1}^{n} i$. Put \displaystyle inside the dollars. For literal backslashes followed by two or more letters (such as C:\Users), use forward slashes, Unicode symbols such as ∖, or describe them in words; backticks do not escape artifact math. Correct the affected field and retry this tool call.`;function vO(e,t,n){typeof e==`string`&&hO(e).some(e=>`text`in e&&/\\[a-zA-Z]{2,}/.test(e.text))&&n.addIssue({code:`custom`,path:t,message:_O})}function yO(e,t,n){return e.superRefine((e,r)=>{let i=(e,t,n)=>{if(t.length===0)return vO(e,n,r);let[a,...o]=t;a===`*`&&Array.isArray(e)?e.forEach((e,t)=>i(e,o,[...n,t])):e&&typeof e==`object`&&a!==void 0&&i(e[a],o,[...n,a])};for(let n of t)i(e,n.split(`.`),[]);n?.(e,r)})}var bO=64,xO=200,SO=4e3;function CO(e){return e.replace(/\r\n?/g,`
|
|
120
|
+
`).replace(/\n$/,``).split(`
|
|
121
|
+
`)}var wO=I().trim().min(1).max(40),TO=OT([xT(),I().max(24)]),EO=xT().int().nonnegative(),DO=R({name:wO.describe(`Pointer label shown under the cell, e.g. "left", "right", "mid", "i".`),index:EO.describe(`0-based index into the sequence as it is at this step.`)}).strict(),OO=R({start:EO.describe(`0-based start index, inclusive, within the sequence as it is at this step.`),end:EO.describe(`0-based end index, inclusive. Must be >= start and within the sequence.`),label:wO.optional().describe(`Optional label, e.g. "window".`),tone:MT([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished/sorted, muted = ruled out. Defaults to active.`)}).strict(),kO=R({name:wO,value:OT([xT(),I().max(80),CT()])}).strict(),AO=R({language:I().trim().min(1).max(30).describe(`The language the code is written in, e.g. "Python", "TypeScript", "Java" or "pseudocode". Shown as a label.`),source:I().min(1).max(SO).describe(`The code, as plain text with newlines and its real indentation: at most 40 lines of at most 120 characters. Line 1 is the first line. No Markdown fences.`)}).strict().superRefine((e,t)=>{let n=CO(e.source);n.every(e=>e.trim()===``)&&t.addIssue({code:`custom`,path:[`source`],message:`source has no code`}),n.length>40&&t.addIssue({code:`custom`,path:[`source`],message:`source has ${n.length} lines; at most 40 are allowed`});let r=n.findIndex(e=>e.length>120);r>=0&&t.addIssue({code:`custom`,path:[`source`],message:`line ${r+1} is longer than 120 characters`})}),jO=R({explanation:I().trim().min(1).max(500).describe(`What happens in this step, in one or two sentences.`),values:L(TO).min(1).max(bO).optional().describe(`The whole sequence after this step. Omit unless the values changed (e.g. a swap); omitted means unchanged.`),pointers:L(DO).max(8).optional().describe(`All pointers to show at this step. Not carried over from earlier steps: repeat any that still apply.`),ranges:L(OO).max(8).optional().describe(`All highlighted ranges at this step. Not carried over from earlier steps.`),variables:L(kO).max(12).optional().describe(`All running state at this step, e.g. current sum, best so far. Not carried over from earlier steps.`),lines:L(xT().int().positive()).max(40).optional().describe(`Only with code: the 1-based line numbers in code.source this step is running, highlighted beside the values. Not carried over from earlier steps; omit or leave empty to highlight none.`)}).strict(),MO=R({title:I().trim().min(1).max(120),values:L(TO).min(1).max(bO).describe(`The input sequence before the first step.`),code:AO.optional().describe("Optional source code shown beside the values, with each step's `lines` highlighted. Include it only when the code itself is the point."),steps:L(jO).min(1).max(xO)}).strict().superRefine((e,t)=>{let n=e.values.length,r=e.code?CO(e.code.source).length:0;e.steps.forEach((i,a)=>{i.lines&&!e.code?t.addIssue({code:`custom`,path:[`steps`,a,`lines`],message:`lines need code: add code, or remove lines`}):i.lines?.forEach((e,n)=>{e>r&&t.addIssue({code:`custom`,path:[`steps`,a,`lines`,n],message:`line ${e} is outside the code (${r} lines)`})}),i.values&&(n=i.values.length),i.pointers?.forEach((e,r)=>{e.index>=n&&t.addIssue({code:`custom`,path:[`steps`,a,`pointers`,r,`index`],message:`index ${e.index} is outside the sequence (length ${n})`})}),i.ranges?.forEach((e,r)=>{(e.end>=n||e.start>e.end)&&t.addIssue({code:`custom`,path:[`steps`,a,`ranges`,r],message:`range ${e.start}..${e.end} is invalid for a sequence of length ${n}`})})})}),NO=MT([`javascript`,`python`]),PO=1e4,FO=5e4,IO=1e4,LO=2e4,RO=2e3,zO={timeMs:2e3,memoryBytes:67108864,stackBytes:393216,outputChars:LO},BO=/^[A-Za-z_$][A-Za-z0-9_$]*$/,VO=/^[A-Za-z_][A-Za-z0-9_]*$/,HO=new Set(`False None True and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield`.split(` `)),UO=CT().optional().describe(`Hidden from the learner's view until they submit: use for edge cases. At least one case must be visible.`),WO=R({kind:NT(`stdio`),stdin:I().max(IO).describe('The text the program reads: in JavaScript the global `stdin` string or `readLine()`, in Python input() or sys.stdin. Use "" for none.'),hidden:UO}).strict(),GO=R({kind:NT(`call`),args:I().max(IO).describe(`The arguments to call functionName with, as a JSON array, e.g. "[[3, 1, 2], 2]" or "[]".`),hidden:UO}).strict(),KO=kT(`kind`,[WO,GO]),qO=OT([R({stdout:I().max(LO)}).strict(),R({returned:I().max(LO)}).strict()]),JO={concept:I().trim().min(1).max(80).describe(`Short label for the concept being practised, e.g. "array reduce". Used to track progress.`),title:I().trim().min(1).max(120),instructions:I().trim().min(1).max(4e3).describe(`What the learner's code must do, as markdown. Say exactly what to print or return, and for stdio how the input is laid out.`),language:NO,starterCode:I().max(PO).describe(`The code the editor starts with, e.g. the function's signature with an empty body. May be empty.`),functionName:I().regex(BO).max(80).optional().describe(`The function call cases call, declared at the top level of the learner's code. Required when there are call cases.`)};function YO(e,t){e.language===`python`&&e.functionName!==void 0&&(!VO.test(e.functionName)||HO.has(e.functionName))&&t.addIssue({code:`custom`,path:[`functionName`],message:`functionName must be a Python identifier`}),e.cases.every(e=>e.hidden)&&t.addIssue({code:`custom`,path:[`cases`],message:`at least one case must be visible`}),e.cases.some(e=>e.kind===`call`)&&!e.functionName&&t.addIssue({code:`custom`,path:[`functionName`],message:`functionName is required for call cases`}),e.cases.forEach((e,n)=>{if(e.kind!==`call`)return;let r;try{r=JSON.parse(e.args)}catch{return t.addIssue({code:`custom`,path:[`cases`,n,`args`],message:`args must be a JSON array`})}Array.isArray(r)||t.addIssue({code:`custom`,path:[`cases`,n,`args`],message:`args must be a JSON array`})})}var XO=R({...JO,cases:L(KO).min(1).max(20).describe(`1-20 test cases. Keep each fast: every case has a 2 s limit.`),referenceSolution:I().min(1).max(PO).describe(`A complete correct solution. Mivra runs it on every case to get the expected results; it is never shown to the learner. It must be deterministic (no random numbers or clock time).`)}).strict().superRefine(YO),ZO=kT(`kind`,[WO.extend({expected:qO}),GO.extend({expected:qO})]),QO=R({...JO,cases:L(ZO).min(1).max(20),referenceSolution:I().max(PO)}).strict(),$O=kT(`kind`,[R({kind:NT(`stdio`),stdin:I(),hidden:CT(),expected:qO.optional()}).strict(),R({kind:NT(`call`),args:I(),hidden:CT(),expected:qO.optional()}).strict()]),ek=R({concept:I(),title:I(),instructions:I(),language:NO,starterCode:I(),functionName:I().optional(),cases:L($O)}).strict(),tk=R({stdout:I().max(LO),stderr:I().max(LO).optional(),returned:I().max(LO).optional(),error:I().max(RO).optional()}).strict(),nk=R({code:I().max(FO),results:L(tk).min(1).max(20)}).strict(),rk=R({correct:CT(),passed:xT().int().nonnegative(),total:xT().int().positive(),cases:L(R({passed:CT()}).strict())}).strict();function ik(e){return e.replace(/\r\n?/g,`
|
|
122
|
+
`).split(`
|
|
123
|
+
`).map(e=>e.replace(/[ \t]+$/,``)).join(`
|
|
124
|
+
`).replace(/\n+$/,``)}function ak(e){return Array.isArray(e)?e.map(ak):e&&typeof e==`object`?Object.fromEntries(Object.keys(e).sort().map(t=>[t,ak(e[t])])):e}function ok(e,t){if(e===`undefined`||t===`undefined`)return e===t;try{return JSON.stringify(ak(JSON.parse(e)))===JSON.stringify(ak(JSON.parse(t)))}catch{return!1}}function sk(e,t){return t.error===void 0?`stdout`in e?ik(t.stdout)===ik(e.stdout):t.returned!==void 0&&ok(t.returned,e.returned):!1}var ck=R({explanation:I().trim().min(1).max(500).describe(`What happens at this step and why, in one or two sentences.`),label:I().trim().min(1).max(80).optional().describe(`Optional short name for the step, e.g. "Initial render", "Click handler", "Render 2".`),lines:L(xT().int().positive()).max(40).optional().describe(`The 1-based line numbers in code.source this step is at. Not carried over: omit or leave empty to highlight none.`),variables:L(kO).max(12).describe(`All the state visible at this step, each name once, e.g. "n", "render.count", "handler.count", "queued update". Not carried over: list everything that still applies, or [] for none. Values are plain text, numbers or booleans; write undefined, null or a short object as a string.`),output:I().max(4e3).describe(`Everything visible as output at this step, as plain text, e.g. printed lines or what the page shows ("Count: 0"). Not carried over: repeat earlier output that is still visible, or "" for none.`)}).strict(),lk=R({title:I().trim().min(1).max(120),code:AO.describe(`The source shown on every step. It stays the same across steps.`),steps:L(ck).min(1).max(200)}).strict().superRefine((e,t)=>{let n=CO(e.code.source).length;e.steps.forEach((e,r)=>{e.lines?.forEach((e,i)=>{e>n&&t.addIssue({code:`custom`,path:[`steps`,r,`lines`,i],message:`line ${e} is outside the code (${n} lines)`})});let i=new Set;e.variables.forEach((e,n)=>{i.has(e.name)&&t.addIssue({code:`custom`,path:[`steps`,r,`variables`,n,`name`],message:`variable "${e.name}" appears twice in this step`}),i.add(e.name)})})}),uk=1e3,dk=4e3,fk=I().trim().min(1).max(24),pk=I().trim().min(1).max(32),mk=MT([`active`,`done`,`muted`]),hk=L(R({name:pk.describe(`Literal property name, unique within its list. Not a formula.`),value:OT([xT(),CT(),I().max(64)]).describe(`A number, a boolean or literal text of at most 64 characters ("" is allowed). Never Markdown or a formula; write a list or object as short text.`)}).strict()).max(6),gk=kT(`type`,[R({type:NT(`text`),text:I().trim().min(1).max(280).describe(`A short note. Only $...$ is a formula; no Markdown.`)}).strict(),R({type:NT(`code`),language:pk.describe(`The language, e.g. "Python" or "bytecode". Shown as a label; any language is accepted.`),code:I().overwrite(e=>e.replace(/\r\n?/g,`
|
|
125
|
+
`)).min(1).max(972).describe(`Plain text with newlines and its real indentation: at most 12 lines of at most 80 characters. No Markdown fences. Never run.`)}).strict(),R({type:NT(`math`),source:I().trim().min(1).max(300).describe(`One display formula as LaTeX, without dollar delimiters.`)}).strict()]),_k=R({id:fk.describe(`Unique id, used by each step's placements.`),label:pk.describe(`The container's name. Only $...$ is a formula.`),ordered:CT().describe(`True when position matters, as in a queue or stack: the first entity is then the front or top. Say which it is in the step's explanation.`)}).strict(),vk=R({id:fk.describe(`Unique id, used by connections and steps.`),label:pk.describe(`Short name on the card. Only $...$ is a formula.`),properties:hk.describe("The entity's declared properties, in display order; [] for none. A step shows these unless its `state` replaces them."),body:L(gk).max(2).optional().describe(`Up to 2 blocks of text, code or maths inside the card, the same on every step. Their text, code and source may total ${uk} characters per entity and ${dk} over all entities.`)}).strict(),Qne=R({id:fk.describe(`Unique id, listed by each step that shows this connection.`),from:fk.describe(`Id of the entity that holds the reference.`),to:fk.describe("Id of the entity it refers to. Must differ from `from`."),label:pk.optional().describe(`Optional name of the reference, e.g. "next". Only $...$ is a formula.`)}).strict(),$ne=R({label:I().trim().min(1).max(80).optional().describe("Optional literal text for the step, shown in monospace, e.g. the statement `b = a`."),explanation:I().trim().min(1).max(500).describe(`What this step shows and what changed, in one or two sentences.`),placements:L(R({groupId:fk,entityIds:L(fk).max(16).describe(`The entities in this group at this step, top to bottom; [] for an empty group.`)}).strict()).max(4).describe(`Exactly one entry for every group, at every step. Not carried over from earlier steps.`),hidden:L(fk).max(16).describe(`Every entity not shown at this step, e.g. before it is created. Each entity is in exactly one placement or here.`),connections:L(fk).max(24).describe(`Ids of the connections shown at this step; [] for none. Not carried over, and both ends must be placed in a group.`),state:L(R({entityId:fk,properties:hk.describe(`The entity's whole property list at this step; [] shows none.`)}).strict()).max(16).optional().describe(`Entities whose properties differ from their declaration at this step, at most one entry each. Not carried over: an entity without an entry shows its declared properties again.`),emphasis:L(R({entityId:fk,tone:mk.describe(`active = current focus, done = finished, muted = ruled out or idle.`)}).strict()).max(16).optional().describe(`Entities to emphasise at this step, at most one entry each. Not carried over.`),callouts:L(R({entityId:fk,text:I().trim().min(1).max(140).describe(`A short note shown inside the card. Only $...$ is a formula.`)}).strict()).max(2).optional().describe(`Notes on entities at this step, at most one per entity. Not carried over.`)}).strict();function yk(e,t,n){let r=new Set;e.forEach((e,i)=>{r.has(e.name)&&n.addIssue({code:`custom`,path:[...t,i,`name`],message:`property "${e.name}" appears twice in this list: keep one, or rename the other`}),r.add(e.name)})}var ere=e=>(e.type===`text`?e.text:e.type===`code`?e.code:e.source).length;function tre(e,t,n,r){let i=t+1,a=(e,n)=>r.addIssue({code:`custom`,path:[`steps`,t,...e],message:n}),o=new Set(n.groups.map(e=>e.id)),s=new Set(n.entities.map(e=>e.id)),c=new Set,l=new Map,u=new Set,d=(e,t,n)=>{if(!s.has(e))return a(n,`no entity has id "${e}": use a declared entity id`);let r=l.get(e);if(r!==void 0)return a(n,`entity "${e}" is already ${r} in step ${i}: list each entity exactly once per step`);l.set(e,t)};e.placements.forEach((e,t)=>{o.has(e.groupId)?c.has(e.groupId)&&a([`placements`,t,`groupId`],`group "${e.groupId}" has two placements in step ${i}: merge them into one`):a([`placements`,t,`groupId`],`no group has id "${e.groupId}": use a declared group id`),c.add(e.groupId),e.entityIds.forEach((n,r)=>{d(n,`in group "${e.groupId}"`,[`placements`,t,`entityIds`,r]),o.has(e.groupId)&&s.has(n)&&u.add(n)})});for(let e of n.groups)c.has(e.id)||a([`placements`],`step ${i} has no placement for group "${e.id}": add { groupId: "${e.id}", entityIds: [] } if it is empty`);e.hidden.forEach((e,t)=>{d(e,`hidden`,[`hidden`,t]),u.delete(e)});for(let e of n.entities)l.has(e.id)||a([],`entity "${e.id}" is not accounted for in step ${i}: list it in one placement's entityIds, or in hidden`);let f=new Set;e.connections.forEach((e,t)=>{let r=[`connections`,t],o=n.connections.get(e);if(!o)return a(r,`no connection has id "${e}": use a declared connection id`);f.has(e)&&a(r,`connection "${e}" is listed twice in step ${i}: list it once`),f.add(e);for(let t of[o.from,o.to])s.has(t)&&!u.has(t)&&a(r,`connection "${e}" needs entity "${t}", which is not placed in a group in step ${i}: place it, or leave the connection out of this step`)});let p=t=>{let n=new Set;e[t]?.forEach(({entityId:e},r)=>{let o=[t,r,`entityId`];if(!s.has(e))return a(o,`no entity has id "${e}": use a declared entity id`);n.has(e)&&a(o,`entity "${e}" has two ${t} entries in step ${i}: merge them into one`),n.add(e),u.has(e)||a(o,`entity "${e}" is not placed in a group in step ${i}: place it, or remove this ${t} entry`)})};p(`state`),p(`emphasis`),p(`callouts`),e.state?.forEach((e,n)=>yk(e.properties,[`steps`,t,`state`,n,`properties`],r))}var bk=R({title:I().trim().min(1).max(120),groups:L(_k).min(1).max(4).describe(`The containers, in reading order. Groups don't nest.`),entities:L(vk).min(1).max(16).describe(`Everything that is ever shown, declared once. Steps place or hide each one.`),connections:L(Qne).max(24).describe(`Every directed reference that is ever shown; [] for none. Two entities may have several, each with its own id.`),steps:L($ne).min(1).max(20).describe(`Complete snapshots in order. One step makes a static diagram.`)}).strict().superRefine((e,t)=>{let n=new Map,r=(e,r,i)=>{let a=n.get(e);a?t.addIssue({code:`custom`,path:i,message:`id "${e}" is already used by a ${a}: give every group, entity and connection its own id`}):n.set(e,r)};e.groups.forEach((e,t)=>r(e.id,`group`,[`groups`,t,`id`])),e.entities.forEach((e,t)=>r(e.id,`entity`,[`entities`,t,`id`])),e.connections.forEach((e,t)=>r(e.id,`connection`,[`connections`,t,`id`]));let i=0;e.entities.forEach((e,n)=>{yk(e.properties,[`entities`,n,`properties`],t);let r=0;e.body?.forEach((e,i)=>{if(r+=ere(e),e.type!==`code`)return;let a=[`entities`,n,`body`,i,`code`],o=CO(e.code);o.every(e=>e.trim()===``)&&t.addIssue({code:`custom`,path:a,message:`code has no code: write some, or remove the block`}),o.length>12&&t.addIssue({code:`custom`,path:a,message:`code has ${o.length} lines; at most 12 are allowed: shorten it`});let s=o.findIndex(e=>e.length>80);s>=0&&t.addIssue({code:`custom`,path:a,message:`line ${s+1} is longer than 80 characters: break or shorten it`})}),i+=r,r>1e3&&t.addIssue({code:`custom`,path:[`entities`,n,`body`],message:`entity "${e.id}" has ${r} characters of body content; at most ${uk} are allowed: shorten its blocks`})}),i>4e3&&t.addIssue({code:`custom`,path:[`entities`],message:`the bodies total ${i} characters; at most ${dk} are allowed: shorten or remove some`});let a=new Set(e.entities.map(e=>e.id));e.connections.forEach((e,n)=>{for(let r of[`from`,`to`])a.has(e[r])||t.addIssue({code:`custom`,path:[`connections`,n,r],message:`no entity has id "${e[r]}": connections join declared entities`});e.from===e.to&&t.addIssue({code:`custom`,path:[`connections`,n,`to`],message:`connection "${e.id}" joins "${e.from}" to itself: its ends must be two different entities`})});let o={groups:e.groups,entities:e.entities,connections:new Map(e.connections.map(e=>[e.id,e]))};e.steps.forEach((e,n)=>tre(e,n,o,t))});function xk(e,t){let n=Math.min(Math.max(Math.trunc(t)||0,0),e.steps.length-1),r=e.steps[n],i=new Map(e.entities.map(e=>[e.id,e])),a=new Map(r.placements.map(e=>[e.groupId,e.entityIds])),o=new Set([...a.values()].flat().filter(e=>i.has(e))),s=new Set(r.connections),c=e.connections.filter(e=>s.has(e.id)&&o.has(e.from)&&o.has(e.to)),l=new Map(r.state?.map(e=>[e.entityId,e.properties])),u=new Map(r.emphasis?.map(e=>[e.entityId,e.tone])),d=new Map(r.callouts?.map(e=>[e.entityId,e.text])),f=e=>({id:e.id,label:e.label,properties:l.get(e.id)??e.properties,body:e.body??[],tone:u.get(e.id),callout:d.get(e.id),references:c.filter(t=>t.from===e.id).map(e=>({connectionId:e.id,to:e.to,toLabel:i.get(e.to).label,label:e.label}))});return{index:n,label:r.label,explanation:r.explanation,groups:e.groups.map(e=>({...e,entities:(a.get(e.id)??[]).flatMap(e=>{let t=i.get(e);return t?[f(t)]:[]})})),connections:c}}var Sk=e=>e===``?`""`:String(e).replaceAll(`$`,`\\$`);function nre(e,t){let n=xk(e,t),r=(e,t)=>`${t.get(e.from)} → ${t.get(e.to)}${e.label===void 0?``:` (${e.label})`}`,i=new Map(e.entities.map(e=>[e.id,e.label]));if(n.index===0)return[...n.groups.map(e=>({type:`initial`,text:e.entities.length?`${e.label} holds ${e.entities.map(e=>e.label).join(`, `)}.`:`${e.label} is empty.`})),...n.connections.map(e=>({type:`initial`,text:`${r(e,i)} is connected.`}))];let a=xk(e,n.index-1),o=e=>new Map(e.groups.flatMap(e=>e.entities.map(t=>[t.id,{group:e,entity:t}]))),s=o(a),c=o(n),l=[];for(let{id:t,label:n}of e.entities){let e=s.get(t),r=c.get(t);!e&&r?l.push({type:`appeared`,entityId:t,groupId:r.group.id,text:`${n} appears in ${r.group.label}.`}):e&&!r?l.push({type:`hidden`,entityId:t,groupId:e.group.id,text:`${n} leaves ${e.group.label}.`}):e&&r&&e.group.id!==r.group.id&&l.push({type:`moved`,entityId:t,fromGroupId:e.group.id,toGroupId:r.group.id,text:`${n} moves from ${e.group.label} to ${r.group.label}.`})}for(let e of n.groups){let t=t=>t.map(e=>e.id).filter(t=>s.get(t)?.group.id===e.id&&c.get(t)?.group.id===e.id),n=t(e.entities),r=t(a.groups.find(t=>t.id===e.id).entities);n.some((e,t)=>e!==r[t])&&l.push({type:`reordered`,groupId:e.id,text:`${e.label} is reordered: ${e.entities.map(e=>e.label).join(`, `)}.`})}for(let{id:t,label:n}of e.entities){let e=s.get(t)?.entity,r=c.get(t)?.entity;if(!e||!r)continue;let i=new Map(e.properties.map(e=>[e.name,e.value])),a=new Set(r.properties.map(e=>e.name));for(let{name:e,value:a}of r.properties)i.has(e)?i.get(e)!==a&&l.push({type:`property_changed`,entityId:t,name:e,text:`${n}: ${Sk(e)} changes from ${Sk(i.get(e))} to ${Sk(a)}.`}):l.push({type:`property_added`,entityId:t,name:e,text:`${n} gains ${Sk(e)} = ${Sk(a)}.`});for(let{name:r}of e.properties)a.has(r)||l.push({type:`property_removed`,entityId:t,name:r,text:`${n} loses ${Sk(r)}.`})}let u=new Set(a.connections.map(e=>e.id)),d=new Set(n.connections.map(e=>e.id));for(let t of e.connections)d.has(t.id)&&!u.has(t.id)?l.push({type:`connection_added`,connectionId:t.id,text:`${r(t,i)} is connected.`}):u.has(t.id)&&!d.has(t.id)&&l.push({type:`connection_removed`,connectionId:t.id,text:`${r(t,i)} is disconnected.`});return l}var rre={version:1,toolName:`show_composition`,description:"Show the learner where things are: entities as cards inside named groups, the references between them, and how that changes step by step. Use it for location, sharing and changing contents, such as two variables referring to one object (aliasing), values moving through pipeline stages, or tasks moving between a queue and a stack. Declare every group, entity and connection once, then give each step as a complete snapshot: one placement for every group (entityIds may be []), every other entity in `hidden`, and the ids of the connections shown. Nothing carries over between steps, so repeat whatever still applies; `state` replaces an entity's whole property list for that step only, and without it the entity shows its declared properties again. In an ordered group the first entity is the front or top: say in the explanation which end is which. Keep it small (roughly 3-8 entities and 3-8 steps) and make each explanation say what changed and why. Never give coordinates or styles: the layout is automatic. Code in a body is inert text. Use show_graph instead for topology, state machines, flowcharts, trees and graph algorithms, show_algorithm_trace for an algorithm over a sequence, show_code_walkthrough to explain source lines, show_table for tabular comparison, and show_set_diagram or show_worked_steps for sets and proofs.",spec:bk,input:yO(bk,[`title`,`groups.*.label`,`entities.*.label`,`entities.*.body.*.text`,`connections.*.label`,`steps.*.explanation`,`steps.*.callouts.*.text`])},ire=R({id:I(),createdAt:I().datetime(),kind:NT(`composition`),version:NT(1),spec:bk}).strict(),are=R({id:I().trim().min(1).max(40).regex(/^[A-Za-z0-9_-]+$/,`Use letters, digits, - or _`).describe(`A short id, unique in the deck, e.g. "c1".`),front:I().trim().min(1).max(500).describe(`The prompt side: a question, term or cue.`),back:I().trim().min(1).max(1e3).describe(`The answer side, shown when the learner flips the card.`),concept:I().trim().min(1).max(200).optional().describe(`Optional concept the card practises, named as in <learner_concepts>.`)}).strict(),Ck=R({title:I().trim().min(1).max(120),cards:L(are).min(1).max(30).superRefine((e,t)=>{let n=new Set;e.forEach((e,r)=>{n.has(e.id)&&t.addIssue({code:`custom`,message:`Duplicate card id "${e.id}"`,path:[r,`id`]}),n.add(e.id)})})}).strict(),wk=MT([`again`,`good`,`easy`]);R({rating:wk}).strict();var Tk=R({cardId:I(),rating:wk,reviews:xT().int().positive(),repetitions:xT().int().nonnegative(),intervalDays:xT().int().nonnegative(),ease:xT().positive(),dueAt:I().datetime(),ratedAt:I().datetime()}).strict(),ore=R({artifactId:I(),cards:L(Tk)}).strict(),sre=I().trim().min(1).max(300),Ek=MT([`lessons`,`project`]),cre=MT([`quick`,`thorough`,`skip`]);R({goal:sre,kind:Ek.optional(),placementDepth:cre.optional()}).strict();var Dk=I().trim().min(1).max(80),Ok=R({concept:Dk.describe(`The single concept this question probes, e.g. "chain rule". Reuse the exact name from the learner's record when it is there.`),question:I().trim().min(1).max(1e3),options:L(R({text:I().trim().min(1).max(300)}).strict()).min(2).max(5).describe(`2-5 options with distinct text. For true/false or yes/no use two options, e.g. "True" and "False". Never add a "Not sure" option: the UI always offers one.`),correctOptionIndex:xT().int().nonnegative().describe(`0-based index of the single correct option.`),explanation:I().trim().min(1).max(600).describe(`One or two sentences shown after answering: why the correct option is correct.`)}).strict().superRefine((e,t)=>{e.correctOptionIndex>=e.options.length&&t.addIssue({code:`custom`,path:[`correctOptionIndex`],message:`correctOptionIndex must point at one of the options`});let n=new Map;e.options.forEach((e,r)=>{let i=e.text.normalize(`NFC`),a=n.get(i);a===void 0?n.set(i,r):t.addIssue({code:`custom`,path:[`options`,r,`text`],message:`duplicates option ${a}`}),/^\s*(not sure|i don'?t know|unsure|skip)\W*$/i.test(e.text)&&t.addIssue({code:`custom`,path:[`options`,r,`text`],message:`Leave out Not sure / Skip: the UI always offers them`})})}),lre=R({concept:I(),question:I(),options:L(R({text:I()}).strict())}).strict(),ure=OT([R({optionIndex:xT().int().nonnegative()}).strict(),R({unsure:NT(!0)}).strict(),R({skipped:NT(!0)}).strict()]),dre=R({result:MT([`correct`,`incorrect`,`unsure`,`skipped`]),correctOptionIndex:xT().int().nonnegative(),explanation:I()}).strict(),kk=2e3,Ak=R({question:I().trim().min(1).max(300).describe(`The question, e.g. "Anything else you'd like us to know about what you already understand or what you want to explore?"`)}).strict(),fre=OT([R({text:I().trim().max(kk)}).strict(),R({skipped:NT(!0)}).strict()]),pre=R({result:MT([`answered`,`skipped`])}).strict(),mre=MT([`memory`,`test`,`guess`]),jk=R({title:I().trim().min(1).max(120),summary:I().trim().min(1).max(400).describe(`What the lesson on this topic will cover, in one or two sentences.`),reason:I().trim().min(1).max(300).describe(`Why this topic is here for this learner, e.g. "You missed the question on local minima".`),requestedByLearner:CT().describe(`True if the learner explicitly asked for this topic. Such topics are never removed automatically.`),concepts:L(Dk).min(1).max(8).describe(`Concept names this topic teaches; reuse names from the learner's record and the placement questions.`)}).strict(),Mk=MT(`sigma.calculator.code.terminal.cpu.database.network.shield.flask-conical.atom.dna.leaf.telescope.globe.landmark.book-open.pen-tool.languages.music.palette.camera.brain.users.chart-line.briefcase.scale.stethoscope.heart-pulse.wrench.dumbbell`.split(`.`)),hre=R({title:I().trim().min(1).max(60).optional().catch(void 0).describe(`A short name for the course, 2-5 words, shown in the sidebar, e.g. "Discrete Math: Induction". Name the scope of the whole syllabus, every topic in it, rather than one part of it or the learner's request word for word.`),icon:Mk.optional().catch(void 0).describe(`The subject icon that best fits the course: sigma = maths, calculator = arithmetic or accounting, code/terminal = programming, cpu = hardware, flask-conical = chemistry, atom = physics, dna = biology, leaf = ecology, telescope = astronomy, globe = geography, landmark = history, book-open = literature, pen-tool = writing, languages = languages, palette = art, brain = psychology, users = sociology, chart-line = economics or statistics, briefcase = business, scale = law, stethoscope/heart-pulse = medicine, wrench = engineering, dumbbell = sport.`),topics:L(jk).min(1).max(20).describe(`The ordered topics, first to learn first. Each topic gets one lesson.`),known:L(R({concept:Dk,source:mre.describe(`memory = from their record or memories; test = from this placement interview; guess = your inference`),note:I().trim().min(1).max(200)}).strict()).max(20).describe(`What the learner already knows or doesn't, each labelled with where that comes from. Shown to the learner.`)}).strict().superRefine((e,t)=>{let n=new Set;e.topics.forEach((e,r)=>{let i=e.title.trim().toLowerCase();n.has(i)&&t.addIssue({code:`custom`,path:[`topics`,r,`title`],message:`Topic titles must be distinct`}),n.add(i)})}),gre=jk.extend({id:I()}).strict(),_re=R({version:xT().int().positive(),source:MT([`interview`,`tutor`,`adaptive`,`undo`]),reason:I().nullable(),changedTopicIds:L(I()),canUndo:CT(),topics:L(gre),known:hre.shape.known,createdAt:I().datetime()}).strict(),Nk=MT([`interviewing`,`active`,`complete`]),Pk=R({id:I(),sessionId:I(),goal:I(),kind:Ek,status:Nk,syllabus:_re.nullable(),interviewMessageId:I().nullable(),createdAt:I().datetime()}).strict(),vre=R({id:I(),sessionId:I(),title:I(),icon:Mk.nullable(),kind:Ek,status:Nk,lessonsFinished:xT().int().nonnegative(),topicCount:xT().int().nonnegative(),completedAt:I().datetime().nullable()}).strict(),Fk=60,Ik=200,yre=200,Lk=I().trim().min(1).max(24),Rk=I().trim().min(1).max(24),zk=MT([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished/visited, muted = ruled out. Defaults to active.`),bre=R({id:Lk.describe(`Unique id, used by edges and steps. Shown on the node if it has no label.`),label:Rk.optional().describe(`Short text on the node. Only $...$ is a formula, e.g. $v_1$.`)}).strict(),xre=R({from:Lk.describe(`Id of a node. In a tree, the parent.`),to:Lk.describe("Id of a node, the same as `from` for a self-loop. In a tree, the child; children appear left to right in edge order unless they have a `side`."),side:MT([`left`,`right`]).optional().describe("Only when kind is tree: which child this is of `from`, its parent. Set it on every edge of a binary search tree or binary tree traversal, because a lone left child and a lone right child are different trees. A node has at most one child per side, and either all of its children have a side or none do."),weight:xT().optional().describe(`Numeric weight shown on the edge. Give a weight or a label, not both.`),label:Rk.optional().describe(`Text shown on the edge. Only $...$ is a formula.`)}).strict(),Sre=R({id:Lk.describe(`Id of a node.`),tone:zk}).strict(),Bk=R({from:Lk,to:Lk,nth:xT().int().nonnegative().optional().describe("Only for parallel edges, and then required: which of the edges joining these nodes, 0-based in the order of `edges`."),tone:zk}).strict().describe(`An edge of the graph. In an undirected graph, from and to may be in either order.`),Vk=R({explanation:I().trim().min(1).max(500).describe(`What happens in this step, in one or two sentences.`),nodeStates:L(Sre).max(Fk).optional().describe(`The state of every node that has one at this step, at most one each. Not carried over from earlier steps: repeat any that still apply.`),edgeStates:L(Bk).max(Ik).optional().describe(`The state of every edge that has one at this step, at most one each. Not carried over from earlier steps: repeat any that still apply.`),variables:L(kO).max(12).optional().describe(`All running state at this step, e.g. the queue or current distances. Not carried over from earlier steps.`)}).strict(),Hk=(e,t,n)=>JSON.stringify(n||e<=t?[e,t]:[t,e]);function Uk(e){let t=new Map;return e.edges.forEach((n,r)=>{let i=Hk(n.from,n.to,e.directed),a=t.get(i);a?a.push(r):t.set(i,[r])}),n=>{let r=`${n.from} ${e.directed?`->`:`--`} ${n.to}`,i=t.get(Hk(n.from,n.to,e.directed));if(!i)return{error:`there is no edge ${r}`};if(n.nth===void 0&&i.length>1)return{error:`${i.length} edges match ${r}: set nth to pick one`};let a=i[n.nth??0];return a===void 0?{error:`nth ${n.nth} is out of range: ${i.length} edges match ${r}`}:{index:a}}}function Wk(e){if(e.edges.length!==e.nodes.length-1)return;let t=e.nodes.map(e=>e.id),n=new Map(t.map(e=>[e,[]]));for(let{from:t,to:r}of e.edges)n.get(t).push(r),!e.directed&&t!==r&&n.get(r).push(t);let r=e.directed?t.filter(t=>!e.edges.some(e=>e.to===t)):t.slice(0,1),i=r[0];if(r.length!==1||i===void 0)return;let a=new Map,o=[i];for(;o.length;){let e=o.pop(),t=n.get(e).filter(e=>!a.has(e));a.set(e,t),o.push(...t)}return a.size===t.length?{root:i,children:a}:void 0}function Gk(e,t){let n=e.edges.flatMap((e,t)=>e.side?[{edge:e,side:e.side,path:[`edges`,t,`side`]}]:[]),r=n[0];if(!r)return;if(e.kind!==`tree`){for(let{path:e}of n)t.addIssue({code:`custom`,path:e,message:`side only applies when kind is "tree": remove it, or set kind`});return}let i=Wk(e);if(!i){t.addIssue({code:`custom`,path:r.path,message:`side needs a real tree: connected with no cycles, and when directed, edges going parent to child from one root`});return}let a=new Map;for(let{edge:e,side:r,path:o}of n)i.children.get(e.from).includes(e.to)?a.set(e.to,r):t.addIssue({code:`custom`,path:o,message:`side needs from to be the parent, but ${e.to} is the parent of ${e.from} here: swap them`});for(let[e,n]of i.children){let r=n.flatMap(e=>a.get(e)??[]);r.length>0&&r.length<n.length&&t.addIssue({code:`custom`,path:[`edges`],message:`node ${e} mixes children with and without a side: give all of them one, or none`});for(let n of[`left`,`right`])r.filter(e=>e===n).length>1&&t.addIssue({code:`custom`,path:[`edges`],message:`node ${e} has two ${n} children`})}}var Kk=R({title:I().trim().min(1).max(120),directed:CT().describe("True draws arrowheads from `from` to `to`."),kind:MT([`tree`,`graph`]).optional().describe("Layout hint. tree draws a rooted tree top-down, and needs a real tree: connected with no cycles, and when directed, edges going parent to child from one root. When undirected, the first node is the root. Anything else falls back to the general layout, unless an edge has a `side`, which is then an error. Defaults to graph."),nodes:L(bre).min(1).max(Fk),edges:L(xre).max(Ik).describe(`Self-loops and parallel edges are allowed.`),steps:L(Vk).min(1).max(yre).optional().describe(`Omit to show the graph without stepping through it.`)}).strict().superRefine((e,t)=>{let n=new Set;e.nodes.forEach((e,r)=>{n.has(e.id)&&t.addIssue({code:`custom`,path:[`nodes`,r,`id`],message:`duplicate node id ${e.id}`}),n.add(e.id)}),e.edges.forEach((e,r)=>{for(let i of[`from`,`to`])n.has(e[i])||t.addIssue({code:`custom`,path:[`edges`,r,i],message:`no node has id ${e[i]}`});e.weight!==void 0&&e.label!==void 0&&t.addIssue({code:`custom`,path:[`edges`,r],message:`give a weight or a label, not both`})}),e.edges.every(e=>n.has(e.from)&&n.has(e.to))&&Gk(e,t);let r=Uk(e);e.steps?.forEach((e,i)=>{let a=new Set;e.nodeStates?.forEach((e,r)=>{let o=[`steps`,i,`nodeStates`,r];n.has(e.id)||t.addIssue({code:`custom`,path:o,message:`no node has id ${e.id}`}),a.has(e.id)&&t.addIssue({code:`custom`,path:o,message:`node ${e.id} has two states in one step`}),a.add(e.id)});let o=new Set;e.edgeStates?.forEach((e,n)=>{let a=[`steps`,i,`edgeStates`,n],s=r(e);if(`error`in s)return t.addIssue({code:`custom`,path:a,message:s.error});o.has(s.index)&&t.addIssue({code:`custom`,path:a,message:`edge ${s.index} has two states in one step`}),o.add(s.index)})})}),qk=R({text:I().trim().min(1).max(300),feedback:I().trim().min(1).max(500).optional().describe(`Shown if the learner picks this option: why it is right or what misconception it reflects.`)}).strict(),Jk=R({concept:I().trim().min(1).max(80).describe(`Short label for the concept being checked, e.g. "sliding window invariant". Used to track progress.`),question:I().trim().min(1).max(1e3),options:L(qk).min(2).max(6).describe(`2-6 options with distinct text.`),correctOptionIndex:xT().int().nonnegative().describe(`0-based index of the single correct option; must be less than the number of options.`),explanation:I().trim().min(1).max(1e3).describe(`Shown after answering: why the correct option is correct.`)}).strict().superRefine((e,t)=>{e.correctOptionIndex>=e.options.length&&t.addIssue({code:`custom`,path:[`correctOptionIndex`],message:`correctOptionIndex must point at one of the options`});let n=new Map;e.options.forEach((e,r)=>{let i=e.text.normalize(`NFC`),a=n.get(i);a===void 0?n.set(i,r):t.addIssue({code:`custom`,path:[`options`,r,`text`],message:`duplicates option ${a}`})})}),Yk=R({concept:I(),question:I(),options:L(R({text:I()}).strict())}).strict(),Xk=R({optionIndex:xT().int().nonnegative()}).strict(),Zk=R({correct:CT(),correctOptionIndex:xT().int().nonnegative(),explanation:I(),feedback:I().optional()}).strict(),Qk=MT([`tests`,`review`]),$k=MT([`stdout`,`run_output`]),eA=2e4,tA=2e3,nA=6e4,rA=24e4,iA=I().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/),aA=R({name:I().trim().min(1).max(80).describe(`A short name the learner sees, e.g. "empty input" or "nested parentheses".`),input:I().max(IO).describe(`The case's input. The learner's program gets it on stdin and as a file whose path replaces {input} in their command. Use "" for none.`),compare:$k.optional().describe(`stdout (the default) compares what the learner's program prints. run_output is for programs whose output is itself a program, such as a compiler's generated assembly: Mivra runs that output with the learner's own run-output command and compares what it prints, so the reference prints what running it should print.`)}).strict(),oA={concept:I().trim().min(1).max(80).describe(`Short label for what this milestone practises, e.g. "tokenizing". Used to track progress.`),title:I().trim().min(1).max(120),spec:I().trim().min(1).max(6e3).describe(`What the learner's program must do at this milestone, as markdown: the behaviour to add, building on the earlier milestones.`),outputFormat:I().trim().min(1).max(2e3).describe(`Exactly what the program prints for an input, as markdown with an example, so any language can match it. Trailing spaces and trailing blank lines are ignored.`),checkType:Qk.describe(`tests: Mivra runs the learner's program on the cases and compares what it prints, and a code review must approve too. review: no cases or reference; the code review alone decides, for what output can't show (structure, a language feature, concurrency, performance).`),reviewFocus:I().trim().min(1).max(2e3).optional().describe(`What the code review must see in the learner's code for this milestone's concept, e.g. "the scanner walks the characters itself rather than splitting with a regex". Required for a review milestone; optional for tests.`)};function sA(e,t){e.checkType===`tests`?(e.cases&&e.cases.length!==0||t.addIssue({code:`custom`,path:[`cases`],message:`A tests milestone needs at least one case.`}),e.referenceSolution||t.addIssue({code:`custom`,path:[`referenceSolution`],message:`A tests milestone needs a referenceSolution.`})):(e.cases&&e.cases.length>0&&t.addIssue({code:`custom`,path:[`cases`],message:`A review milestone has no cases: the code review decides. Leave cases out.`}),e.referenceSolution&&t.addIssue({code:`custom`,path:[`referenceSolution`],message:`A review milestone has no reference. Leave referenceSolution out.`}),e.reviewFocus||t.addIssue({code:`custom`,path:[`reviewFocus`],message:`A review milestone needs reviewFocus: what the review must see in the code.`}))}var cA=R({...oA,cases:L(aA).max(20).optional().describe(`tests only: 1-20 cases, simplest first, covering the milestone's edge cases. Each reference run has a 2 s limit. Leave out for review.`),referenceSolution:I().min(1).max(eA).optional().describe(`tests only: a Python program (standard library only) that reads a case's input from stdin and prints exactly what the learner's program should print, or for a run_output case what running its output should print. Mivra runs it in Pyodide on every case to get the expected outputs and never shows it. It must be deterministic. Leave out for review.`)}).strict().superRefine(sA),lA=aA.extend({expected:I().max(LO),withdrawn:CT().optional()}).strict(),uA=2e3,dA=MT([`kept`,`withdrawn`,`corrected`,`upheld`,`overturned`]),fA=R({id:I(),target:MT([`case`,`review`]),caseIndex:xT().int().nonnegative().optional(),caseName:I().optional(),reason:I().max(uA),outcome:dA,explanation:I().max(2e3),before:R({input:I(),expected:I()}).strict().optional(),createdAt:I().datetime()}).strict(),pA=R({...oA,cases:L(lA).max(20),referenceSolution:I().max(eA).optional(),disputes:L(fA).max(20).optional()}).strict(),mA=R({concept:I(),title:I(),spec:I(),outputFormat:I(),checkType:Qk,reviewFocus:I().optional(),cases:L(R({name:I(),input:I(),compare:$k,expected:I(),withdrawn:CT().optional()}).strict()),disputes:L(fA)}).strict();R({courseId:I(),lessonId:I(),artifactId:I(),position:xT().int().positive(),title:I(),checkType:Qk,revision:I().regex(/^[0-9a-f]{8,64}$/),since:iA.nullable(),cases:L(R({name:I(),input:I().max(IO),compare:$k}).strict()).max(20)}).strict();var hA=MT([`timeout`,`output_limit`,`start_failed`,`no_run_output_command`]),gA=R({stdout:I().max(LO),truncated:CT().optional(),stderr:I().max(tA).optional(),exitCode:xT().int().nullable(),error:hA.optional()}).strict(),_A=R({path:I().min(1).max(500),content:I().max(nA)}).strict(),vA=MT([`binary`,`too_large`,`size_cap`,`lockfile`]),yA={commit:iA.optional(),source:MT([`git`,`none`]).optional(),files:L(_A).max(200).optional(),skipped:L(R({path:I().max(500),reason:vA}).strict()).max(1e3).optional(),deleted:L(I().max(500)).max(1e3).optional()};R({results:L(gA).max(20),revision:I().max(64).optional(),...yA}).strict().superRefine((e,t)=>{(e.files??[]).reduce((e,t)=>e+t.content.length,0)>24e4&&t.addIssue({code:`custom`,path:[`files`],message:`At most ${rA} characters of files can be sent.`})});var bA=R({correct:CT(),passed:xT().int().nonnegative(),total:xT().int().nonnegative(),cases:L(R({passed:CT(),case:xT().int().nonnegative().optional()}).strict())}).strict(),xA=R({passed:CT(),note:I().trim().min(1).max(1e3).describe(`One to three sentences for the learner, pointing at the file and the code you mean.`)}).strict(),SA=R({noHardCodedOutputs:xA.describe(`passed is false if the program special-cases test inputs or prints canned answers instead of computing them, e.g. matching an input string and printing its expected output.`),concept:xA.describe(`passed is true if the code really does what this milestone teaches (its concept and reviewFocus), not just something that produces the same output.`),quality:xA.describe(`passed is false only for serious problems for a learner at this stage: code that can't be followed, copy-pasted blocks instead of a loop or function, or obvious bugs the tests miss. Style preferences never fail it.`),summary:I().trim().min(1).max(1500).describe(`What you'd tell the learner: what's good, and what to change if anything.`),suggestions:L(I().trim().min(1).max(500)).max(8).describe(`Optional next steps, most useful first. Never write the solution.`)}).strict().extend({approved:CT(),judgedBy:NT(`model`),model:I()}).strict(),CA=kT(`status`,[R({status:NT(`done`),review:SA}).strict(),R({status:NT(`skipped`),reason:MT([`tests_failed`,`no_files`])}).strict(),R({status:NT(`failed`),error:I()}).strict()]);R({grade:bA,expected:L(I()),review:CA,passed:CT()}).strict(),kT(`target`,[R({target:NT(`case`),caseIndex:xT().int().nonnegative().max(19),reason:I().trim().min(1).max(uA)}).strict(),R({target:NT(`review`),reason:I().trim().min(1).max(uA)}).strict()]),R({outcome:MT([`keep`,`withdraw`,`correct`]).describe(`keep: the case is right. withdraw: it's wrong or unfair and can't simply be fixed. correct: fix its input or the reference.`),explanation:I().trim().min(1).max(2e3).describe(`For the learner: why, in two or three sentences.`),input:I().max(IO).optional().describe(`correct only: the case's corrected input, if the input was wrong.`),referenceSolution:I().min(1).max(eA).optional().describe(`correct only: the whole corrected Python reference, if its output was wrong. Mivra reruns it on every case.`)}).strict();var wA=R({results:L(gA),files:L(I()),skipped:L(R({path:I(),reason:vA}).strict()).optional(),source:MT([`git`,`none`]).optional()}).strict(),TA=3,EA=8,DA=30,OA=40,kA=I().trim().min(1).max(24),AA=/^[^\n\r\v\f\u0085\u2028\u2029]*$/,jA=e=>I().trim().min(1).max(e).regex(AA,`must not contain line breaks`),MA=OT([xT(),jA(24)]);function NA(e){return JSON.stringify([...e].sort())}var PA=L(kA).max(TA),FA=R({id:kA.describe(`Short id used to refer to this set, e.g. "a". Unique within the diagram.`),label:jA(32).describe(`Shown next to the circle, e.g. "$A$" or "Multiples of 3", on one line. Only $...$ is a formula.`)}).strict(),IA=R({in:PA.describe('Ids of the sets this region is inside. It is outside all the others: with sets a, b, c, ["a","b"] means in a and b, not c. [] means outside every set and needs `universe`. No id twice.'),elements:L(MA).max(DA).describe(`What the region contains, each short and on one line. No element may appear twice, in this list or across regions, and 1 and "1" count as the same element. Empty if you only know the count, or the region is empty.`),count:xT().int().nonnegative().max(1e6).optional().describe(`How many elements the region has, when that's more than you list, e.g. for inclusion-exclusion. At least the number of elements listed.`)}).strict(),LA=R({in:PA.describe("The region to highlight, named like a region's `in`, with no id twice. Any region of the diagram can be highlighted, listed or not."),tone:MT([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished, muted = ruled out. Defaults to active.`)}).strict(),RA=R({explanation:I().trim().min(1).max(500).describe(`What this step shows, in one or two sentences.`),highlights:L(LA).max(EA).optional().describe(`All regions highlighted at this step, each at most once. They apply to this step only, not carried over: repeat any that still apply.`),variables:L(kO).max(12).optional().describe(`All running state at this step, e.g. |A ∪ B| so far. Not carried over from earlier steps.`)}).strict(),zA=R({title:I().trim().min(1).max(120),sets:L(FA).min(1).max(TA).describe(`The circles, 1 to 3.`),universe:jA(24).optional().describe(`Label of the rectangle around the sets, e.g. "$U$", on one line. Needed to show or highlight the region outside every set, such as a complement.`),regions:L(IA).max(EA).describe(`What each region contains, each region at most once.`),steps:L(RA).min(1).max(OA).optional().describe(`Optional walk through the diagram. Omit for a static diagram.`)}).strict().superRefine((e,t)=>{let n=e.sets.map(e=>e.id);e.sets.forEach((e,r)=>{n.indexOf(e.id)!==r&&t.addIssue({code:`custom`,path:[`sets`,r,`id`],message:`duplicate set id "${e.id}"`})});let r=(r,i)=>{let a=new Set;r.forEach((r,o)=>{let s=[...i,o,`in`];r.in.forEach((e,i)=>{n.includes(e)||t.addIssue({code:`custom`,path:[...s,i],message:`unknown set "${e}"`}),r.in.indexOf(e)!==i&&t.addIssue({code:`custom`,path:[...s,i],message:`set "${e}" is named twice`})}),r.in.length===0&&e.universe===void 0&&t.addIssue({code:`custom`,path:s,message:"the region outside every set needs `universe`"});let c=NA(r.in);a.has(c)&&t.addIssue({code:`custom`,path:s,message:`region ${c} appears more than once`}),a.add(c)})};r(e.regions,[`regions`]),e.steps?.forEach((e,t)=>r(e.highlights??[],[`steps`,t,`highlights`]));let i=new Set;e.regions.forEach((e,n)=>{e.elements.forEach((e,r)=>{i.has(String(e))&&t.addIssue({code:`custom`,path:[`regions`,n,`elements`,r],message:`element "${e}" appears more than once; regions don't overlap`}),i.add(String(e))}),e.count!==void 0&&e.count<e.elements.length&&t.addIssue({code:`custom`,path:[`regions`,n,`count`],message:`count ${e.count} is less than the ${e.elements.length} elements listed`})})}),BA=16,VA=64,HA=100,UA=I().trim().min(1).max(80),WA=OT([xT(),CT(),I().max(120)]),GA=xT().int().nonnegative(),KA=R({row:GA.optional().describe(`0-based data row, below the number of rows. With no column, highlights the whole row. A highlight must give a row, a column or both.`),column:GA.optional().describe(`0-based data column, below the number of columns. With no row, highlights the whole column. With both, highlights one cell.`),tone:MT([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished, muted = ruled out. Defaults to active. Where highlights overlap, the later one wins.`)}).strict(),qA=R({row:GA.describe(`0-based data row, below the number of rows.`),column:GA.describe(`0-based data column, below the number of columns.`),value:WA.describe(`The cell's value from this step on.`)}).strict(),JA=R({explanation:I().trim().min(1).max(500).describe(`What happens in this step, in one or two sentences.`),highlight:L(KA).max(32).optional().describe(`All cells, rows and columns to highlight at this step. Not carried over from earlier steps.`),cells:L(qA).max(64).optional().describe(`Cells this step fills in or changes. They keep the new value on later steps. To reveal working, start a cell as "" and set it here.`)}).strict(),YA=R({title:I().trim().min(1).max(120),columns:L(UA).min(1).max(BA).describe(`Column headers, one per data column. Don't include a header for rowHeaders.`),rows:L(L(WA).min(1).max(BA)).min(1).max(VA).describe(`Data rows, each with exactly one cell per column. A boolean shows as T or F; "" is a blank cell.`),rowHeaders:L(UA).max(VA).optional().describe(`Optional label for each row, e.g. a relation matrix's elements. Exactly one per row.`),steps:L(JA).min(1).max(HA).optional().describe(`Omit for a static table. With steps, the learner steps through them.`)}).strict().superRefine((e,t)=>{let n=e.rows.length,r=e.columns.length;e.rows.forEach((e,n)=>{e.length!==r&&t.addIssue({code:`custom`,path:[`rows`,n],message:`row has ${e.length} cells but there are ${r} columns`})}),e.rowHeaders&&e.rowHeaders.length!==n&&t.addIssue({code:`custom`,path:[`rowHeaders`],message:`${e.rowHeaders.length} row headers for ${n} rows`});let i=(e,r)=>{e>=n&&t.addIssue({code:`custom`,path:r,message:`row ${e} is outside the table (${n} rows)`})},a=(e,n)=>{e>=r&&t.addIssue({code:`custom`,path:n,message:`column ${e} is outside the table (${r} columns)`})};e.steps?.forEach((e,n)=>{e.highlight?.forEach((e,r)=>{let o=[`steps`,n,`highlight`,r];e.row===void 0&&e.column===void 0&&t.addIssue({code:`custom`,path:o,message:`a highlight needs a row, a column or both`}),e.row!==void 0&&i(e.row,[...o,`row`]),e.column!==void 0&&a(e.column,[...o,`column`])}),e.cells?.forEach((e,t)=>{i(e.row,[`steps`,n,`cells`,t,`row`]),a(e.column,[`steps`,n,`cells`,t,`column`])})})}),XA=50,ZA=R({label:I().trim().min(1).max(40).optional().describe(`Optional heading for this part of the working, e.g. "Base case", "Inductive step".`),statement:I().trim().min(1).max(1e3).describe(`What this step establishes, mostly as a formula in $...$. For large sums and fractions, put \\displaystyle INSIDE the dollars, e.g. $\\displaystyle\\sum_{i=1}^{n} i$; $$ is not available.`),justification:I().trim().min(1).max(500).describe(`Why it follows, e.g. "by the inductive hypothesis".`)}).strict(),QA=R({title:I().trim().min(1).max(120),goal:I().trim().min(1).max(500).optional().describe(`Optional statement of what is being shown, e.g. the claim to prove.`),steps:L(ZA).min(1).max(XA)}).strict(),$A=`[A-Za-z0-9-]{1,64}`,ej=`doc:${$A}:p[1-9]\\d{0,5}|note:${$A}:[0-9a-f]{8}`;RegExp(`^(?:${ej})$`);var tj=RegExp(`\\[cite:(${ej})\\]`,`g`),nj=/[ \t]*\[cite:[^\]\n]{0,200}\]/g;function rj(e){return[...new Set([...e.matchAll(tj)].map(e=>e[1]))]}R({refs:L(I().max(200)).min(1).max(50)});var ij=R({citations:L(R({ref:I(),status:MT([`ok`,`changed`,`missing`,`invalid`]),kind:MT([`doc`,`note`]).optional(),source:I().optional(),locator:I().optional(),text:I().optional()}))}),aj=`solution.py`;String.raw`
|
|
126
|
+
import builtins as _mivra_builtins, io as _mivra_io, json as _mivra_json, sys as _mivra_sys, traceback as _mivra_traceback
|
|
127
|
+
|
|
128
|
+
for _mivra_name in list(_mivra_sys.modules):
|
|
129
|
+
if _mivra_name == "js" or _mivra_name.startswith("js.") or _mivra_name == "pyodide_js" or _mivra_name.startswith("pyodide_js."):
|
|
130
|
+
del _mivra_sys.modules[_mivra_name]
|
|
131
|
+
|
|
132
|
+
_mivra_recursion_limit = _mivra_sys.getrecursionlimit()
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class _MivraOutputLimit(BaseException):
|
|
136
|
+
pass
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class _MivraSink:
|
|
140
|
+
def __init__(self, limit):
|
|
141
|
+
self.limit = limit
|
|
142
|
+
self.parts = ([], [])
|
|
143
|
+
self.used = 0
|
|
144
|
+
self.exceeded = False
|
|
145
|
+
|
|
146
|
+
def write(self, stream, text):
|
|
147
|
+
if self.exceeded:
|
|
148
|
+
raise _MivraOutputLimit()
|
|
149
|
+
room = self.limit - self.used
|
|
150
|
+
if len(text) > room:
|
|
151
|
+
self.exceeded = True
|
|
152
|
+
text = text[: max(0, room)]
|
|
153
|
+
self.parts[stream].append(text)
|
|
154
|
+
self.used += len(text)
|
|
155
|
+
if self.exceeded:
|
|
156
|
+
raise _MivraOutputLimit()
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class _MivraStream(_mivra_io.TextIOBase):
|
|
160
|
+
def __init__(self, sink, stream):
|
|
161
|
+
self._sink = sink
|
|
162
|
+
self._stream = stream
|
|
163
|
+
|
|
164
|
+
def writable(self):
|
|
165
|
+
return True
|
|
166
|
+
|
|
167
|
+
def write(self, text):
|
|
168
|
+
if not isinstance(text, str):
|
|
169
|
+
raise TypeError("write() argument must be str, not " + type(text).__name__)
|
|
170
|
+
self._sink.write(self._stream, text)
|
|
171
|
+
return len(text)
|
|
172
|
+
|
|
173
|
+
def flush(self):
|
|
174
|
+
pass
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def _mivra_describe(error):
|
|
178
|
+
name = type(error).__name__
|
|
179
|
+
text = str(error)
|
|
180
|
+
message = name + ": " + text if text else name
|
|
181
|
+
line = None
|
|
182
|
+
if isinstance(error, SyntaxError) and error.filename == "${aj}":
|
|
183
|
+
line = error.lineno
|
|
184
|
+
for frame, lineno in _mivra_traceback.walk_tb(error.__traceback__):
|
|
185
|
+
if frame.f_code.co_filename == "${aj}":
|
|
186
|
+
line = lineno
|
|
187
|
+
return message + (" (line " + str(line) + ")" if line else "")
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def _mivra_run(code, function_name, kind, stdin, args_json, output_limit):
|
|
191
|
+
sink = _MivraSink(output_limit)
|
|
192
|
+
result = {}
|
|
193
|
+
_mivra_sys.setrecursionlimit(_mivra_recursion_limit)
|
|
194
|
+
_mivra_sys.stdin = _mivra_io.StringIO(stdin)
|
|
195
|
+
_mivra_sys.stdout = _MivraStream(sink, 0)
|
|
196
|
+
_mivra_sys.stderr = _MivraStream(sink, 1)
|
|
197
|
+
try:
|
|
198
|
+
namespace = {"__name__": "__main__", "__builtins__": _mivra_builtins}
|
|
199
|
+
exec(compile(code, "${aj}", "exec"), namespace)
|
|
200
|
+
if kind == "call":
|
|
201
|
+
function = namespace.get(function_name)
|
|
202
|
+
if not callable(function):
|
|
203
|
+
raise TypeError(function_name + " is not defined as a function")
|
|
204
|
+
value = function(*_mivra_json.loads(args_json))
|
|
205
|
+
try:
|
|
206
|
+
returned = _mivra_json.dumps(value, allow_nan=False)
|
|
207
|
+
except (TypeError, ValueError) as error:
|
|
208
|
+
result["status"] = "error"
|
|
209
|
+
result["message"] = "The return value can't be recorded as JSON: " + type(error).__name__ + ": " + str(error)
|
|
210
|
+
else:
|
|
211
|
+
if len(returned) > output_limit:
|
|
212
|
+
result["status"] = "error"
|
|
213
|
+
result["message"] = "The return value is too large (over {:,} characters).".format(output_limit)
|
|
214
|
+
else:
|
|
215
|
+
result["returned"] = returned
|
|
216
|
+
except SystemExit as error:
|
|
217
|
+
if kind == "call":
|
|
218
|
+
result["status"] = "error"
|
|
219
|
+
result["message"] = "The code called exit() instead of returning."
|
|
220
|
+
elif error.code not in (None, 0):
|
|
221
|
+
result["status"] = "error"
|
|
222
|
+
result["message"] = "The program exited with status " + str(error.code) + "."
|
|
223
|
+
except _MivraOutputLimit:
|
|
224
|
+
result["status"] = "output"
|
|
225
|
+
except KeyboardInterrupt:
|
|
226
|
+
result["status"] = "time"
|
|
227
|
+
except RecursionError:
|
|
228
|
+
result["status"] = "stack"
|
|
229
|
+
except MemoryError:
|
|
230
|
+
result["status"] = "memory"
|
|
231
|
+
except BaseException as error:
|
|
232
|
+
result["status"] = "error"
|
|
233
|
+
result["message"] = _mivra_describe(error)
|
|
234
|
+
finally:
|
|
235
|
+
_mivra_sys.stdin = _mivra_sys.__stdin__
|
|
236
|
+
_mivra_sys.stdout = _mivra_sys.__stdout__
|
|
237
|
+
_mivra_sys.stderr = _mivra_sys.__stderr__
|
|
238
|
+
result["stdout"] = "".join(sink.parts[0])
|
|
239
|
+
result["stderr"] = "".join(sink.parts[1])
|
|
240
|
+
result["exceeded"] = sink.exceeded
|
|
241
|
+
return _mivra_json.dumps(result)
|
|
242
|
+
`;var oj=MT([`prose`,`algorithm_trace`,`code_exercise`,`code_walkthrough`,`composition`,`flashcard_deck`,`graph`,`multiple_choice`,`project_milestone`,`set_diagram`,`table`,`worked_steps`]),sj=R({title:I().trim().min(1).max(120),sections:L(R({title:I().trim().min(1).max(120),kind:oj.describe(`prose = write_lesson_text; multiple_choice = ask_multiple_choice (a check); code_exercise = ask_code_exercise (a JavaScript or Python exercise the learner solves and submits); project_milestone = set_project_milestone (project courses only: the milestone the learner builds in their repository); the others = the matching show_* tool.`),purpose:I().trim().min(1).max(300).describe(`What this section does for the learner, in one sentence.`)}).strict()).min(2).max(10)}).strict();sj.extend({sections:sj.shape.sections.describe(`2-10 sections in reading order. Include at least one multiple_choice check, usually after the idea it checks.`)}).strict().superRefine((e,t)=>{e.sections.some(e=>e.kind===`multiple_choice`)||t.addIssue({code:`custom`,path:[`sections`],message:`Include at least one multiple_choice check`}),e.sections.forEach((e,n)=>{e.kind===`project_milestone`&&t.addIssue({code:`custom`,path:[`sections`,n,`kind`],message:`project_milestone is only for project courses`})})}),sj.extend({sections:sj.shape.sections.describe(`2-10 sections in reading order: what the milestone needs, then exactly one project_milestone section, last.`)}).strict().superRefine((e,t)=>{(e.sections.filter(e=>e.kind===`project_milestone`).length!==1||e.sections.at(-1)?.kind!==`project_milestone`)&&t.addIssue({code:`custom`,path:[`sections`],message:`Include exactly one project_milestone section, as the last section`})}),R({markdown:I().trim().min(1).max(6e3).describe(`The section's prose, as markdown with $...$ and $$...$$ maths. Don't repeat the section title as a heading.`),revisits:L(I().min(1)).max(5).optional().describe(`sectionIds from <previous_lesson> this section revisits. The page links back to them, so don't write links yourself.`)}).strict();var cj=MT([`generating`,`ready`,`failed`,`finished`]),lj=R({title:I(),sections:L(R({title:I(),kind:oj}).strict())}).strict(),uj=R({id:I(),courseId:I(),topicId:I(),topicTitle:I(),position:xT().int().nonnegative(),status:cj,version:xT().int().positive().nullable(),outline:lj.nullable(),sections:L(kT(`kind`,[R({id:I(),title:I(),kind:NT(`prose`),markdown:I(),revisits:L(R({lessonId:I(),sectionId:I(),title:I(),lessonTitle:I()}).strict())}).strict(),R({id:I(),title:I(),kind:NT(`artifact`),artifact:wT()}).strict()])),checks:R({total:xT().int().nonnegative(),answered:xT().int().nonnegative()}).strict(),syllabusVersion:xT().int().positive().nullable(),changedSectionIds:L(I()),changeReason:I().nullable(),canFinish:CT(),error:I().nullable(),errorAction:MT([`lesson-model`]).nullable(),createdAt:I().datetime(),finishedAt:I().datetime().nullable()}).strict(),dj=R({topics:L(R({topicId:I(),title:I(),lesson:R({id:I(),status:cj}).strict().nullable()}).strict()),currentLessonId:I().nullable(),nextTopicId:I().nullable()}).strict(),fj=I().trim().min(1).max(120),pj=I().trim().min(1).max(6e3),mj=I().trim().min(1).max(300);R({reason:mj.describe(`What the learner asked for, in a few words, e.g. "Simpler intro with an example".`),operations:L(kT(`op`,[R({op:NT(`rewrite`),sectionId:I().min(1),markdown:pj,title:fj.optional()}).strict().describe(`Replace a prose section's text (and optionally its title).`),R({op:NT(`insert`),afterSectionId:I().min(1).nullable(),title:fj,markdown:pj}).strict().describe(`Add a prose section after the given section, or first if null.`),R({op:NT(`insert_artifact`),afterSectionId:I().min(1).nullable(),title:fj,artifactId:I().min(1)}).strict().describe(`Add a card you created earlier in this reply (its artifactId) as a section.`),R({op:NT(`remove`),sectionId:I().min(1)}).strict(),R({op:NT(`move`),sectionId:I().min(1),afterSectionId:I().min(1).nullable()}).strict()])).min(1).max(10)}).strict(),R({reason:mj.describe(`What the learner asked for, e.g. "Add a topic on vectors before gradients".`),operations:L(kT(`op`,[R({op:NT(`insert`),afterTopicId:I().min(1).nullable().describe(`Insert after this topic; null to insert before the first future topic.`),title:fj,summary:I().trim().min(1).max(400),reason:mj,concepts:L(I().trim().min(1).max(80)).min(1).max(8)}).strict(),R({op:NT(`edit`),topicId:I().min(1),title:fj.optional(),summary:I().trim().min(1).max(400).optional()}).strict(),R({op:NT(`remove`),topicId:I().min(1)}).strict(),R({op:NT(`move`),topicId:I().min(1),afterTopicId:I().min(1).nullable()}).strict()])).min(1).max(10)}).strict(),R({messageId:I().min(1).max(128),afterSectionId:I().min(1).max(128).nullable(),title:fj}).strict();var hj=R({title:fj,summary:I().trim().min(1).max(400),concepts:L(I().trim().min(1).max(80)).min(1).max(8)}).strict();R({reason:mj.describe(`Shown to the learner, with the evidence, e.g. "Added a chain rule refresher: you missed 3 of 4 checks on derivatives".`),operation:kT(`op`,[hj.extend({op:NT(`insert`),afterTopicId:I().min(1).nullable().describe(`null = straight after this lesson's topic`)}).strict(),R({op:NT(`split`),topicId:I().min(1),into:L(hj).min(2).max(3)}).strict(),R({op:NT(`move`),topicId:I().min(1),afterTopicId:I().min(1).nullable()}).strict()])}).strict();var gj=MT([`missed`,`unsure`,`retention`]),_j=R({concept:I(),reason:gj,lastAttemptAt:I().datetime(),streak:xT().int().nonnegative(),intervalDays:xT().int().nonnegative(),dueAt:I().datetime(),overdueDays:xT().int().nonnegative(),course:R({id:I(),title:I()}).strict().nullable()}).strict(),vj=MT([`focus`,`unsure`,`not_started`]),yj=R({concept:I(),prerequisite:I(),prerequisiteStatus:vj}).strict(),bj=R({items:L(_j),total:xT().int().nonnegative(),asOf:I().datetime(),truncated:CT().optional(),recommendations:L(yj).max(5).optional()}).strict();R({concepts:L(I().trim().min(1).max(200)).min(1).max(5).optional()}).strict(),R({prerequisite:I().trim().min(1).max(200),concept:I().trim().min(1).max(200)}).strict();var xj=MT([`goal`,`preference`,`misconception`,`known`]),Sj=MT([`goal`,`preference`,`misconception`]),Cj=I().trim().min(1).max(300);R({kind:Sj.describe(`goal = what they want to learn or do; preference = how they like to learn; misconception = something they believe that is wrong.`),text:Cj.describe(`One short sentence about the learner. Never include the answer to a check they haven't answered.`),concept:I().trim().min(1).max(80).optional().describe(`Required for a misconception: the concept it is about. Use the exact name from the check or from their record, so it can be linked to their answers.`),replaces:I().min(1).optional().describe(`The id of a known memory this one corrects or updates.`)}).strict().superRefine((e,t)=>{e.kind===`misconception`&&!e.concept&&t.addIssue({code:`custom`,path:[`concept`],message:`A misconception needs a concept`})});var wj=MT([`wrong_answer`,`chat`,`import`]),Tj=R({id:I(),kind:xj,held:CT(),text:I().nullable(),concept:I().nullable(),basis:wj.nullable(),source:R({noteId:I(),importId:I(),importName:I(),path:I(),title:I()}).strict().nullable(),createdAt:I().datetime(),editedAt:I().datetime().nullable()}).strict();R({text:Cj}).strict(),R({basis:NT(`import`)}).strict();var Ej=26214400,Dj=5e5,Oj=MT([`pdf`,`pptx`,`text`,`markdown`]),kj=R({id:I(),sessionId:I(),messageId:I().nullable(),filename:I(),kind:Oj,byteSize:xT().int(),pageCount:xT().int(),pagesWithText:xT().int(),status:NT(`ready`),createdAt:I().datetime()}),Aj=R({id:I(),filename:I(),kind:Oj,byteSize:xT().int(),textChars:xT().int(),pageCount:xT().int(),pagesWithText:xT().int(),status:NT(`ready`),attachmentCount:xT().int(),createdAt:I().datetime()}),jj=I().regex(/^n\d{1,3}$/),Mj=I().trim().min(1).max(80),Nj=MT([`prerequisite`,`related`]);R({from:Mj.describe("The first concept name. For `prerequisite`, the concept that must be understood before `to`. Reuse an existing concept name from <learner_concepts> or <learner_concept_graph> when one fits."),to:Mj.describe("The second concept name. For `prerequisite`, the concept that builds on `from`. Reuse an existing concept name from <learner_concepts> or <learner_concept_graph> when one fits."),kind:Nj.describe("prerequisite = `from` must be understood before `to`; related = the two concepts are closely linked.")}).strict(),R({concepts:L(R({name:Mj.describe(`A name from <existing_concepts> or <vault_tags> when one fits. Otherwise a new name, written as it appears in the notes.`),notes:L(jj).min(1).max(20).describe(`The refs of the notes that cover it.`)}).strict()).max(30),edges:L(R({from:Mj,to:Mj,kind:Nj.describe(`prerequisite = from must be understood before to; related = they're closely linked.`),note:jj.describe(`The ref of the note that shows this link.`)}).strict()).max(40).describe(`Edges between concepts named in this call or in <existing_concepts>.`),memories:L(R({kind:MT([`known`,`goal`,`misconception`]).describe(`known = the notes cover this concept; goal = a goal the notes state; misconception = a wrong belief the notes state.`),text:Cj.describe(`One short sentence about the learner.`),concept:Mj.optional().describe(`Required for known and misconception: a concept named in this call or in <existing_concepts>.`),note:jj.describe(`The ref of the note it comes from.`)}).strict()).max(30)}).strict();var Pj=R({status:MT([`idle`,`queued`,`running`,`cancelled`,`failed`]),pendingNotes:xT().int(),groups:xT().int(),groupsDone:xT().int(),error:I().nullable(),concepts:xT().int(),memories:xT().int(),conceptsSkipped:xT().int().optional()}).strict();R({concepts:L(R({id:I(),name:I(),notes:L(I()),fromSessions:CT().optional()}).strict()),edges:L(R({from:I(),to:I(),kind:Nj,notes:L(I()),fromSessions:CT().optional()}).strict())}).strict();var Fj=R({id:I(),name:I()}).strict(),Ij=R({status:MT([`strength`,`focus`,`practicing`,`unsure`,`not_started`]),attempts:xT().int(),correct:xT().int(),incorrect:xT().int(),unsure:xT().int(),modelJudged:xT().int(),modelApproved:xT().int()}).strict(),Lj=Ij.extend({concept:I(),lastResult:MT([`correct`,`incorrect`,`unsure`]).nullable(),lastSeen:I().nullable(),topics:L(I()).optional()}).strict(),Rj=R({scope:MT([`global`,`course`]),courseId:I().optional(),evidence:R({attempts:xT().int(),graded:xT().int(),modelJudged:xT().int(),unsure:xT().int(),recent:xT().int(),recentDays:xT().int()}).strict(),truncated:CT(),strengths:L(Lj),focus:L(Lj),practicing:L(Lj),unsure:L(Lj),notStarted:L(Lj)}).strict(),zj=1e4,Bj=1e6,Vj=67108864,Hj=L(R({path:I().min(1).max(512),text:I().max(Bj)}).strict()).max(zj);R({name:I().trim().min(1).max(120),files:Hj}).strict(),R({files:Hj}).strict();var Uj=R({id:I(),name:I(),source:NT(`obsidian`),noteCount:xT().int(),createdAt:I().datetime(),updatedAt:I().datetime(),distillation:Pj}).strict(),Wj=MT([`not_markdown`,`hidden`,`bad_path`,`duplicate`,`too_long`,`symlink`,`generated`]),Gj=R({import:Uj,added:xT().int(),updated:xT().int(),removed:xT().int(),unchanged:xT().int(),skippedCount:xT().int(),skipped:L(R({path:I(),reason:Wj}).strict()),truncated:CT()}).strict(),Kj=R({id:I(),importId:I(),path:I(),title:I(),aliases:L(I()),tags:L(I()),body:I(),updatedAt:I().datetime()}).strict();R({notes:L(R({id:I(),path:I(),title:I(),tags:L(I())}).strict()),links:L(R({from:I(),to:I().nullable(),target:I(),kind:MT([`link`,`embed`])}).strict())}).strict(),R({mode:MT([`auto`,`local`]).default(`auto`),focus:I().max(64).optional(),depth:VT().int().min(1).max(3).default(2),tag:I().max(200).optional(),folder:I().max(512).optional()}).strict(),R({mode:MT([`auto`,`local`]).default(`auto`),focus:I().max(80).optional(),depth:VT().int().min(1).max(3).default(2)}).strict();var qj=MT([`note`,`ghost`,`tag`,`concept`]),Jj=MT([`link`,`tag`,`concept`,`prerequisite`,`related`]),Yj=R({mode:MT([`whole`,`local`]),focus:I().nullable(),depth:xT().int(),totalNotes:xT().int(),matchingNotes:xT().int(),totalConcepts:xT().int().optional(),truncated:CT(),nodes:L(R({id:I(),kind:qj,label:I(),path:I().optional(),notes:xT().int().optional(),hops:xT().int().optional(),fromSessions:CT().optional(),mastery:Ij.optional()}).strict()),edges:L(R({from:I(),to:I(),kind:Jj,fromSessions:CT().optional()}).strict()),tags:L(R({name:I(),notes:xT().int()}).strict()),folders:L(R({path:I(),notes:xT().int()}).strict())}).strict(),Xj=R({id:I(),title:I(),path:I()}).strict(),Zj={algorithm_trace:{version:1,toolName:`show_algorithm_trace`,description:"Show the learner an interactive step-by-step trace of an algorithm running over a sequence (e.g. sliding window, two pointers, binary search, a simple sort). The learner steps through it with play/pause/step controls. Use it when watching state change step by step will make the idea click. Keep traces short (roughly 5-20 steps) and make each step's explanation say what changed and why. A code pane is optional: add `code` and each step's `lines` only when the code itself is the point, such as how an implementation's lines move the state, and leave it out when the idea matters more than any code. Write that code in the programming language the learner has shown proficiency in according to <learner_memories>; if they show none, use Python or pseudocode. Keep the code short, and highlight the lines each step is running. For code that doesn't move over a sequence, such as a plain function or a React render, use show_code_walkthrough instead of inventing an array.",spec:MO,input:yO(MO,[`title`,`steps.*.explanation`])},code_exercise:{version:1,toolName:`ask_code_exercise`,description:"Give the learner a short JavaScript or Python coding exercise to solve in an editor in the UI, after teaching an idea they can now practise by writing code. Use the language they are learning. They run the visible cases as often as they like, then submit once; their result is reported back to you on the next turn, so don't reveal or hint at a solution in your reply. Keep it to one small function or program (a few to about 30 lines), with 3-8 fast cases. Two kinds of case: a call case calls `functionName` (defined at the top level) with JSON arguments and compares its return value as JSON (key order ignored; in Python, None is null and tuples are lists), and a stdio case runs the whole program with the case's stdin and compares what it prints (trailing whitespace and trailing blank lines ignored). Prefer call cases; use stdio for programs that read input and print. JavaScript runs as plain JavaScript with no DOM, network, modules, timers or Node APIs: only console, the global `stdin` string and `readLine()` (the next input line, or null). Python runs in Pyodide with the standard library only: no network, files, threads, subprocesses or packages to install; read input with input() or sys.stdin and print with print(). Write a correct, deterministic referenceSolution in the same language: Mivra runs it on every case to get the expected results, rejecting the exercise if it fails, and never shows it. Hide a case or two that check edge cases. The starter code should give the function's signature (or the program's outline) and no solution.",spec:QO,input:yO(XO,[`title`])},code_walkthrough:{version:1,toolName:`show_code_walkthrough`,description:`Show the learner a step-by-step walkthrough of a short piece of code that isn't about a sequence: a plain function's parameters, locals and return value, or a React component's renders, handlers and state updates. Each step highlights the source lines it is at and gives a complete snapshot of the visible state (\`variables\`) and the visible output (\`output\`, plain text such as printed lines or what the page shows, e.g. "Count: 0"); nothing carries over between steps, so repeat whatever still applies and use [] or "" for none. The source stays the same on every step. Use show_algorithm_trace instead for an algorithm moving over an array or other sequence, and show_graph for a component hierarchy. Keep the code short (a few to about 20 lines) and the walkthrough short (roughly 3-12 steps). Write the code in the language the concept belongs to (JSX for React); for a language-neutral idea, use the language the learner knows from <learner_memories>, else Python or pseudocode. The snapshots are your illustration, not a real run, so get them right. For React, keep the state a render or handler sees apart from updates it queues: inside a handler, state still has the value from the render it belongs to (name it, e.g. "handler.count" = 0, with "queued update" = "count + 1"), and the new value and its output appear only at the next render's step.`,spec:lk,input:yO(lk,[`title`,`steps.*.explanation`])},composition:rre,flashcard_deck:{version:1,toolName:`show_flashcards`,description:`Give the learner a short deck of flip cards to drill facts, terms or definitions they need to recall: each card has a front (a question or cue) and a back (the answer). They flip each card and rate their own recall Again, Good or Easy, which only schedules when the card comes back; it is never graded and never counts as evidence of what they know, so use ask_multiple_choice or ask_code_exercise to check understanding. Keep decks short (about 4-15 cards), one idea per card, with a short front and a back that answers it directly. Set a card's concept to the concept it practises, named as in <learner_concepts>, when one fits.`,spec:Ck,input:yO(Ck,[`title`,`cards.*.front`,`cards.*.back`])},graph:{version:1,toolName:`show_graph`,description:`Show the learner a graph or tree, drawn for you, optionally with steps they can walk through. Use it for graphs, trees, BFS, DFS, shortest paths, spanning trees and tree traversals, whenever seeing the structure or watching an algorithm move over it will help. Never give coordinates: the layout is automatic. For a binary search tree or binary tree traversal, set kind to tree and give every edge a side, so a lone left child and a lone right child are drawn differently. The automatic layout may draw crossing edges that mean nothing, even when the graph is planar, so don't use this to show whether a graph is planar. Keep it small enough to read (roughly 4-15 nodes, 5-20 steps) and make each step's explanation say what changed and why. For a component hierarchy (such as React components), set kind to tree and directed to true, with one node per component instance (distinct ids for two instances of the same component, labelled with the short component name) and one edge from each parent to each child it renders, labelled with the props it passes (e.g. "count" or "onClick"). Use steps to highlight where state is owned and the nodes and edges its value flows through, with variables for simple state such as count = 1. The nodes and edges stay the same on every step: don't add callback edges back up the tree, and don't suggest that a component's output changes just because it re-renders. To show where things are and how they move between containers, such as names sharing one object, values passing through pipeline stages or tasks moving between a queue and a stack, use show_composition instead.`,spec:Kk,input:yO(Kk,[`title`,`nodes.*.label`,`edges.*.label`,`steps.*.explanation`],(e,t)=>{e.nodes.forEach((e,n)=>{e.label===void 0&&vO(e.id,[`nodes`,n,`id`],t)})})},interview_context:{version:1,toolName:`ask_interview_context`,description:`Course placement interview only: ask the learner once, as the last question of the interview and in the same reply as the placement questions, whether there is anything else they want you to know about what they already understand or want to explore. They answer in their own words in the UI, or leave it blank; the answer is reported back to you with the placement results. Not graded.`,spec:Ak,input:yO(Ak,[`question`])},multiple_choice:{version:1,toolName:`ask_multiple_choice`,description:`Ask the learner one multiple-choice question to check understanding of a concept you just taught. Exactly one option is correct. Write plausible wrong options that reflect real misconceptions, and give per-option feedback where useful. The learner answers in the UI; the result is reported back to you on the next turn, so do not reveal the answer in your reply. For a code prediction, put the short snippet in a fenced code block in your reply text before this call and ask what it returns, prints or displays; the question and options render maths and plain text only, so never put code fences in them.`,spec:Jk,input:yO(Jk,[`question`,`options.*.text`,`options.*.feedback`,`explanation`])},placement_question:{version:1,toolName:`ask_placement_question`,description:`Course placement interview only: ask the learner one quick question to find out what they already know about one concept, before the syllabus is written. Use multiple choice, true/false or yes/no. The UI always adds "Not sure" and "Skip", so never include those as options. The learner answers in the UI and the result is reported back to you, so don't reveal the answer.`,spec:Ok,input:yO(Ok,[`question`,`options.*.text`,`explanation`])},project_milestone:{version:1,toolName:`set_project_milestone`,description:"Project course lessons only: set this lesson's milestone, the step of the project the learner builds next in their own repository, in whatever language they chose. They check it with `mivra check`, which runs their program on each case's input (on stdin, and as a file whose path replaces {input} in their command) and compares what it prints with what your Python referenceSolution prints for that input. Say exactly what to build in spec and exactly what to print in outputFormat, so a program in any language can match it; trailing spaces and trailing blank lines are ignored, everything else counts, and the program must exit with code 0. Write 3-12 small, fast cases, simplest first, that cover the milestone's edge cases. Mivra runs the reference on every case when you call this; if it fails or times out, nothing is saved and you get the reason, so fix it and call again. Use compare run_output only when the program's output is itself a program, such as generated assembly; the reference then prints what running that output should print. Every check also sends the learner's changed files to a code review, which must approve too: it fails hard-coded outputs, code that doesn't use the milestone's concept (say what it must show in reviewFocus) and seriously poor code. Use checkType review, with no cases or reference, for what output can't show (structure, a language feature, concurrency, performance); reviewFocus then says exactly what the code must show. Never show the reference or write the learner's solution.",spec:pA,input:yO(cA,[`title`])},set_diagram:{version:1,toolName:`show_set_diagram`,description:"Show the learner a Venn diagram of 1 to 3 sets, with what each region contains. Use it for set operations (union, intersection, complement, difference) and inclusion-exclusion, not for more than 3 sets. Keep elements short, because they are drawn in their region. Add steps to walk through it: each step highlights exact regions (any of them, including outside every set, which needs `universe`) and says what changed and why.",spec:zA,input:yO(zA,[`title`,`universe`,`sets.*.label`,`regions.*.elements.*`,`steps.*.explanation`,`steps.*.variables.*.name`,`steps.*.variables.*.value`])},table:{version:1,toolName:`show_table`,description:`Show the learner a table: a truth table, a relation matrix or other tabular working. Use it whenever the content is really rows and columns. Add steps when filling it in or highlighting it one part at a time will help, such as working out a truth table column by column; leave them out for a table to read at a glance. Keep steps short and make each explanation say what changed and why.`,spec:YA,input:yO(YA,[`title`,`columns.*`,`rowHeaders.*`,`rows.*.*`,`steps.*.explanation`,`steps.*.cells.*.value`])},worked_steps:{version:1,toolName:`show_worked_steps`,description:`Show the learner a proof, an induction or combinatorics working as a sequence of steps they reveal one at a time, each a statement with its justification. Use it when the reasoning is the point and each line follows from the ones before. Use show_algorithm_trace instead for an algorithm's state changing over a sequence.`,spec:QA,input:yO(QA,[`title`,`goal`,`steps.*.label`,`steps.*.statement`,`steps.*.justification`])}};MT(Object.keys(Zj));var Qj={id:I(),createdAt:I().datetime()},$j=R({answer:Xk,grade:Zk,createdAt:I().datetime()}).strict(),eM=R({answer:nk,grade:rk,createdAt:I().datetime()}).strict(),tM=R({answer:fre,grade:pre,createdAt:I().datetime()}).strict(),nM=R({answer:wA,grade:bA,createdAt:I().datetime()}).strict(),rM=R({review:SA,createdAt:I().datetime()}).strict(),iM=R({answer:ure,grade:dre,createdAt:I().datetime()}).strict(),aM=kT(`kind`,[R({...Qj,kind:NT(`algorithm_trace`),version:NT(1),spec:MO}).strict(),R({...Qj,kind:NT(`code_exercise`),version:NT(1),spec:ek,latestAttempt:eM.optional()}).strict(),R({...Qj,kind:NT(`code_walkthrough`),version:NT(1),spec:lk}).strict(),ire,R({...Qj,kind:NT(`flashcard_deck`),version:NT(1),spec:Ck}).strict(),R({...Qj,kind:NT(`graph`),version:NT(1),spec:Kk}).strict(),R({...Qj,kind:NT(`interview_context`),version:NT(1),spec:Ak,latestAttempt:tM.optional()}).strict(),R({...Qj,kind:NT(`multiple_choice`),version:NT(1),spec:Yk,latestAttempt:$j.optional()}).strict(),R({...Qj,kind:NT(`placement_question`),version:NT(1),spec:lre,latestAttempt:iM.optional()}).strict(),R({...Qj,kind:NT(`project_milestone`),version:NT(1),spec:mA,latestAttempt:nM.optional(),latestReview:rM.optional(),passed:CT().optional()}).strict(),R({...Qj,kind:NT(`set_diagram`),version:NT(1),spec:zA}).strict(),R({...Qj,kind:NT(`table`),version:NT(1),spec:YA}).strict(),R({...Qj,kind:NT(`worked_steps`),version:NT(1),spec:QA}).strict()]),oM=`https://chatgpt.com/settings/usage`,sM=(e,t)=>(e=e.replace(/\/+$/,``),e+=`/`,t=t.replace(/^\/+/,``),e+t),cM=(e,t)=>{for(let[n,r]of Object.entries(t)){let t=RegExp(`/:`+n+`(?:{[^/]+})?\\??(?=/|$)`);e=e.replace(t,()=>r?`/${r}`:``)}return e},lM=e=>{let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.set(n,r)}return t},uM=(e,t)=>{switch(t){case`ws`:return e.replace(/^http/,`ws`);case`http`:return e.replace(/^ws/,`http`)}},dM=e=>/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(e)?e.replace(/\/index(?=\?|$)/,`/`):e.replace(/\/index(?=\?|$)/,``);function fM(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function pM(e,t){if(!fM(e)&&!fM(t))return t;let n={...e};for(let e in t){let r=t[e];n[e]=fM(n[e])&&fM(r)?pM(n[e],r):r}return n}var mM=/^[\w!#$%&'*.^`|~+-]+$/,hM=(e,t,n={})=>{if(!mM.test(e))throw Error(`Invalid cookie name`);let r=`${e}=${t}`;if(e.startsWith(`__Secure-`)&&!n.secure)throw Error(`__Secure- Cookie must have Secure attributes`);if(e.startsWith(`__Host-`)){if(!n.secure)throw Error(`__Host- Cookie must have Secure attributes`);if(n.path!==`/`)throw Error(`__Host- Cookie must have Path attributes with "/"`);if(n.domain)throw Error(`__Host- Cookie must not have Domain attributes`)}for(let e of[`domain`,`path`,`sameSite`,`priority`])if(n[e]&&/[;\r\n]/.test(n[e]))throw Error(`${e} must not contain ";", "\\r", or "\\n"`);if(n&&typeof n.maxAge==`number`&&n.maxAge>=0){if(n.maxAge>3456e4)throw Error(`Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.`);r+=`; Max-Age=${n.maxAge|0}`}if(n.domain&&n.prefix!==`host`&&(r+=`; Domain=${n.domain}`),n.path&&(r+=`; Path=${n.path}`),n.expires){if(n.expires.getTime()-Date.now()>3456e7)throw Error(`Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite&&(r+=`; SameSite=${n.sameSite.charAt(0).toUpperCase()+n.sameSite.slice(1)}`),n.priority&&(r+=`; Priority=${n.priority.charAt(0).toUpperCase()+n.priority.slice(1)}`),n.partitioned){if(!n.secure)throw Error(`Partitioned Cookie must have Secure attributes`);r+=`; Partitioned`}return r},gM=(e,t,n)=>(t=encodeURIComponent(t),hM(e,t,n)),_M=(e,t)=>new Proxy(()=>{},{get(n,r){if(typeof r==`string`&&r!==`then`)return _M(e,[...t,r])},apply(n,r,i){return e({path:t,args:i})}}),vM=(e,t)=>{let n=t.toString();return n?`${e}?${n}`:e},yM=class{url;method;buildSearchParams;queryParams=void 0;pathParams={};rBody;cType=void 0;constructor(e,t,n){this.url=e,this.method=t,this.buildSearchParams=n.buildSearchParams}fetch=async(e,t)=>{if(e){if(e.query&&(this.queryParams=this.buildSearchParams(e.query)),e.form){let t=new FormData;for(let[n,r]of Object.entries(e.form))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.append(n,r)}this.rBody=t}e.json!==void 0&&(this.rBody=JSON.stringify(e.json),this.cType=`application/json`),e.param&&(this.pathParams=e.param)}let n=this.method.toUpperCase(),r={...e?.header,...typeof t?.headers==`function`?await t.headers():t?.headers};if(e?.cookie){let t=[];for(let[n,r]of Object.entries(e.cookie))r!==void 0&&t.push(gM(n,r));t.length>0&&(r.Cookie=t.join(`; `))}this.cType&&(r[`Content-Type`]=this.cType);let i=new Headers;for(let[e,t]of Object.entries(r))t!==void 0&&i.set(e,t);let a=this.url;a=dM(a),a=cM(a,this.pathParams),this.queryParams&&(a=vM(a,this.queryParams)),n=this.method.toUpperCase();let o=n!==`GET`&&n!==`HEAD`;return(t?.fetch||fetch)(a,{body:o?this.rBody:void 0,method:n,headers:i,...t?.init})}},bM=(e,t)=>_M(function n(r){let i=t?.buildSearchParams??lM,a=[...r.path],o=a.slice(-3).reverse();if(o[0]===`toString`)return o[1]===`name`?o[2]||``:n.toString();if(o[0]===`valueOf`)return o[1]===`name`?o[2]||``:n;let s=``;if(/^\$/.test(o[0])){let e=a.pop();e&&(s=e.replace(/^\$/,``))}let c=sM(e,a.join(`/`));if(s===`url`||s===`path`){let t=dM(c);return r.args[0]&&(r.args[0].param&&(t=cM(t,r.args[0].param)),r.args[0].query&&(t=vM(t,i(r.args[0].query)))),s===`url`?new URL(t):t.slice(e.replace(/\/+$/,``).length).replace(/^\/?/,`/`)}if(s===`ws`){let e=dM(c),n=uM(r.args[0]?.param?cM(e,r.args[0].param):e,`ws`),a=new URL(n),o=r.args[0]?.query;return o&&i(o).forEach((e,t)=>{a.searchParams.append(t,e)}),((...e)=>t?.webSocket!==void 0&&typeof t.webSocket==`function`?t.webSocket(...e):new WebSocket(...e))(a.toString())}let l=new yM(c,s,{buildSearchParams:i});if(s){t??={};let e={...r.args[1]},n=t.headers,i=e.headers;n&&i&&(e.headers=async()=>({...typeof n==`function`?await n():n,...typeof i==`function`?await i():i}));let a=pM(t,e);return l.fetch(r.args[0],a)}return l},[]),xM=document.querySelector(`meta[name="mivra-token"]`)?.content??``,SM={Authorization:`Bearer ${xM}`},CM=bM(window.location.origin,{headers:SM}).api;async function wM(e){try{let t=await e.json();if(t.error)return t.error}catch{}return`${e.status} ${e.statusText}`}var TM=(e,t)=>kM(e,{optionIndex:t}),EM=(e,t)=>kM(e,t),DM=(e,t)=>kM(e,t),OM=(e,t)=>kM(e,t);async function kM(e,t){try{let n=await CM.artifacts[`:id`].attempts.$post({param:{id:e},json:{answer:t}});if(!n.ok)return{ok:!1,error:await wM(n)};let r=aM.safeParse(await n.json());return r.success?{ok:!0,view:r.data}:{ok:!1,error:`The server sent a reply this page can't display.`}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}async function AM(e,t){try{let n=await CM.artifacts[`:id`].disputes.$post({param:{id:e},json:t});if(!n.ok)return{ok:!1,error:await wM(n)};let r=aM.safeParse((await n.json()).view);return r.success?{ok:!0,view:r.data}:{ok:!1,error:`The server sent a reply this page can't display.`}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}async function jM(e){try{let t=await CM.sessions[`:id`].messages.$get({param:{id:e}});return t.ok?{ok:!0,messages:await t.json()}:{ok:!1,error:await wM(t)}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}async function MM(e,t){try{let n=await e();return n.ok?{ok:!0,value:await t(n)}:{ok:!1,error:await wM(n)}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}var NM=()=>MM(()=>CM.sessions.$post({json:{}}),async e=>await e.json()),PM=()=>MM(()=>CM.memories.$get(),async e=>Tj.array().parse(await e.json())),FM=()=>MM(()=>CM.mastery.$get(),async e=>Rj.parse(await e.json())),IM=()=>MM(()=>CM.review.due.$get(),async e=>bj.parse(await e.json())),LM=e=>MM(()=>CM.review.start.$post({json:e?{concepts:e}:{}}),async e=>{let t=await e.json();return{session:t.session,concepts:_j.array().parse(t.concepts),message:t.message}}),RM=(e,t)=>MM(()=>CM.review.drill.$post({json:{prerequisite:e,concept:t}}),async e=>{let t=await e.json();return{session:t.session,message:t.message}}),zM=e=>MM(()=>CM.artifacts[`:id`].flashcards.$get({param:{id:e}}),async e=>ore.parse(await e.json())),BM=(e,t,n)=>MM(()=>CM.artifacts[`:id`].flashcards[`:cardId`].ratings.$post({param:{id:e,cardId:t},json:{rating:n}}),async e=>Tk.parse(await e.json())),VM=e=>MM(()=>CM.courses[`:id`].mastery.$get({param:{id:e}}),async e=>Rj.parse(await e.json())),HM=()=>MM(()=>CM.courses.$get(),async e=>vre.array().parse(await e.json())),UM=(e,t)=>MM(()=>CM.memories[`:id`].$patch({param:{id:e},json:{text:t}}),async e=>Tj.parse(await e.json())),WM=e=>MM(()=>CM.memories[`:id`].$delete({param:{id:e}}),()=>void 0),GM=()=>MM(()=>CM.memories.$delete({query:{basis:`import`}}),async e=>(await e.json()).deleted),KM=e=>MM(()=>CM.sessions[`:id`].documents.$get({param:{id:e}}),async e=>kj.array().parse(await e.json())),qM=(e,t)=>{let n=new FormData;return n.append(`file`,t),MM(()=>fetch(`/api/sessions/${e}/documents`,{method:`POST`,headers:SM,body:n}),async e=>kj.parse(await e.json()))},JM=e=>MM(()=>CM.citations.resolve.$post({json:{refs:e}}),async e=>ij.parse(await e.json()).citations),YM=()=>MM(()=>CM.sources.$get(),async e=>Aj.array().parse(await e.json())),XM=e=>MM(()=>CM.sources.text.$post({json:e}),async e=>Aj.parse(await e.json())),ZM=e=>MM(()=>CM.sources[`:id`].$delete({param:{id:e}}),()=>void 0),QM=(e,t)=>MM(()=>CM.sessions[`:id`].documents.text.$post({param:{id:e},json:t}),async e=>kj.parse(await e.json())),$M=(e,t)=>MM(()=>CM.sessions[`:id`].documents.attach.$post({param:{id:e},json:{documentId:t}}),async e=>kj.parse(await e.json())),eN=(e,t)=>MM(()=>CM.sessions[`:id`].documents[`:documentId`].$delete({param:{id:e,documentId:t}}),()=>void 0),tN=()=>MM(()=>CM.imports.$get(),async e=>Uj.array().parse(await e.json())),nN=e=>MM(()=>CM.imports[`:id`].$delete({param:{id:e}}),()=>void 0),rN=e=>MM(()=>CM.imports[`:id`].distillation.$post({param:{id:e}}),async e=>Pj.parse(await e.json())),iN=e=>MM(()=>CM.imports[`:id`].distillation.$delete({param:{id:e}}),async e=>Pj.parse(await e.json())),aN=(e,{mode:t,focus:n,depth:r,tag:i,folder:a})=>MM(()=>CM.imports[`:id`].graph.view.$get({param:{id:e},query:{mode:t,depth:String(r),...n?{focus:n}:{},...i?{tag:i}:{},...a?{folder:a}:{}}}),async e=>Yj.parse(await e.json())),oN=({mode:e,focus:t,depth:n})=>MM(()=>CM.concepts.graph.view.$get({query:{mode:e,depth:String(n),...t?{focus:t}:{}}}),async e=>Yj.parse(await e.json())),sN=e=>MM(()=>CM.concepts.search.$get({query:{q:e}}),async e=>Fj.array().parse(await e.json())),cN=e=>MM(()=>CM.concepts[`:id`].$delete({param:{id:e}}),async e=>await e.json()),lN=e=>MM(()=>CM.concepts.edges.$delete({query:e}),async e=>await e.json()),uN=(e,t)=>MM(()=>CM.imports[`:id`].notes.$get({param:{id:e},query:{q:t}}),async e=>Xj.array().parse(await e.json())),dN=e=>MM(()=>CM.notes[`:id`].$get({param:{id:e}}),async e=>Kj.parse(await e.json())),fN=`These notes come to more than ${Vj/1048576} MB, more than one import can take.`,pN=(e,t)=>{let n=JSON.stringify(`importId`in e?{files:t}:{name:e.name,files:t});return new Blob([n]).size>67108864?Promise.resolve({ok:!1,error:fN}):MM(()=>`importId`in e?fetch(`/api/imports/${encodeURIComponent(e.importId)}/files`,{method:`PUT`,headers:{...SM,"content-type":`application/json`},body:n}):fetch(`/api/imports`,{method:`POST`,headers:{...SM,"content-type":`application/json`},body:n}),async e=>Gj.parse(await e.json()))},mN=(e,t)=>{if(t.size>67108864)return Promise.resolve({ok:!1,error:`This zip is over the ${Vj/1048576} MB limit.`});let n=new FormData;return`name`in e&&n.append(`name`,e.name),n.append(`file`,t),MM(()=>`importId`in e?fetch(`/api/imports/${encodeURIComponent(e.importId)}/zip`,{method:`PUT`,headers:SM,body:n}):fetch(`/api/imports/zip`,{method:`POST`,headers:SM,body:n}),async e=>Gj.parse(await e.json()))},hN=(e,t=`lessons`,n=`quick`)=>MM(()=>CM.courses.$post({json:{goal:e,kind:t,placementDepth:n}}),async e=>{let t=await e.json();return{course:Pk.parse(t.course),session:t.session}}),gN=e=>MM(()=>CM.sessions[`:id`].course.$get({param:{id:e}}),async e=>Pk.parse(await e.json())),_N=e=>MM(()=>CM.courses[`:id`].lessons.$get({param:{id:e}}),async e=>dj.parse(await e.json())),vN=async e=>{let t=await e.json();return{lesson:uj.parse(t.lesson),revision:t.revision}},yN=(e,t)=>MM(()=>CM.courses[`:id`].lessons.$post({param:{id:e},json:{topicId:t}}),vN),bN=(e,t,n)=>MM(()=>CM.lessons[`:id`].$get({param:{id:e},query:t?{after:t}:{}},{init:{signal:n}}),vN),xN=e=>MM(()=>CM.lessons[`:id`].finish.$post({param:{id:e}}),vN),SN=e=>MM(()=>CM.lessons[`:id`].retry.$post({param:{id:e}}),vN),CN=(e,t)=>MM(()=>CM.lessons[`:id`].sections.$post({param:{id:e},json:t}),vN),wN=(e,t)=>MM(()=>CM.courses[`:id`].syllabus.undo.$post({param:{id:e},json:{version:t}}),async e=>Pk.parse(await e.json())),TN=()=>MM(()=>CM.models.$get(),async e=>await e.json()),EN=e=>MM(()=>CM.settings.model.$put({json:e}),async e=>await e.json()),DN=e=>MM(()=>CM.settings[`pinned-models`].$put({json:{models:e}}),async e=>(await e.json()).pinned),ON=()=>MM(()=>CM.settings.tasks.$get(),async e=>(await e.json()).tasks),kN=(e,t)=>MM(()=>CM.settings.tasks[`:task`].$put({param:{task:e},json:t}),async e=>await e.json()),AN=e=>MM(()=>CM.settings.tasks[`:task`].$delete({param:{task:e}}),async e=>await e.json()),jN=e=>MM(()=>CM.usage.$get({query:{...e?{from:e.toISOString()}:{},tz:String(new Date().getTimezoneOffset())}}),async e=>await e.json()),MN=()=>MM(()=>CM.usage.$delete(),async e=>await e.json()),NN=(e,t)=>MM(()=>CM.usage.prices.$put({json:{model:e,price:t}}),async e=>await e.json()),PN=`mivra:open-usage`,FN=`mivra:open-settings`,IN=`mivra:providers-changed`,LN=async e=>(window.dispatchEvent(new Event(IN)),await e.json()),RN=()=>MM(()=>CM.settings.providers.$get(),async e=>await e.json()),zN=(e,t)=>MM(()=>CM.settings.providers[`:id`].$put({param:{id:e},json:{key:t}}),LN),BN=e=>MM(()=>CM.settings.providers[`:id`].$delete({param:{id:e}}),LN),VN=(e=!1)=>MM(()=>CM.settings.chatgpt[`sign-in`].$post({json:{newAccount:e}}),async e=>await e.json()),HN=e=>MM(()=>CM.settings.chatgpt[`sign-in`].complete.$post({json:{address:e}}),LN),UN=()=>MM(()=>CM.settings.chatgpt[`sign-in`].$delete(),LN),WN=()=>MM(()=>CM.settings.chatgpt.$delete(),LN),GN=()=>MM(()=>CM.settings.chatgpt.welcomed.$post(),async e=>await e.json()),KN=()=>MM(()=>CM.settings.chatgpt.check.$post(),async e=>await e.json()),qN=e=>MM(()=>CM.settings.providers[`:id`].check.$post({param:{id:e}}),async e=>await e.json()),JN=(e,t)=>MM(()=>CM.sessions[`:id`].$patch({param:{id:e},json:{title:t}}),async e=>await e.json()),YN=e=>MM(()=>CM.sessions[`:id`].$delete({param:{id:e}}),()=>void 0),XN=e=>MM(()=>CM.settings.providers.custom.$post({json:e}),LN),ZN=(e,t)=>MM(()=>CM.settings.providers.custom[`:id`].$put({param:{id:e},json:t}),LN),QN=e=>MM(()=>CM.settings.providers.custom[`:id`].$delete({param:{id:e}}),LN),$N=e=>MM(()=>CM.settings.providers.custom[`:id`].refresh.$post({param:{id:e}}),LN),eP=(e,t,n)=>MM(()=>CM.settings.providers.custom[`:id`].test.$post({param:{id:e},json:{model:t}},{init:{signal:n}}),async e=>(window.dispatchEvent(new Event(IN)),await e.json()));async function tP(){let e;try{e=await fetch(`${window.location.origin}/api/export/obsidian`,{headers:SM})}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}if(!e.ok)return{ok:!1,error:await wM(e)};let t=/filename="([^"]+)"/.exec(e.headers.get(`content-disposition`)??``)?.[1]??`Mivra.zip`,n;try{n=await e.blob()}catch{return{ok:!1,error:`The download didn't finish. Try again.`}}let r=URL.createObjectURL(n),i=document.createElement(`a`);return i.href=r,i.download=t,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),6e4),{ok:!0,filename:t}}function nP(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var rP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aP={};function oP(e,t){return((t||aP).jsx?iP:rP).test(e)}var sP=/[ \t\n\f\r]/g;function cP(e){return typeof e==`object`?e.type===`text`&&lP(e.value):lP(e)}function lP(e){return e.replace(sP,``)===``}var uP=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};uP.prototype.normal={},uP.prototype.property={},uP.prototype.space=void 0;function dP(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new uP(n,r,t)}function fP(e){return e.toLowerCase()}var pP=class{constructor(e,t){this.attribute=t,this.property=e}};pP.prototype.attribute=``,pP.prototype.booleanish=!1,pP.prototype.boolean=!1,pP.prototype.commaOrSpaceSeparated=!1,pP.prototype.commaSeparated=!1,pP.prototype.defined=!1,pP.prototype.mustUseProperty=!1,pP.prototype.number=!1,pP.prototype.overloadedBoolean=!1,pP.prototype.property=``,pP.prototype.spaceSeparated=!1,pP.prototype.space=void 0;var mP=s({boolean:()=>gP,booleanish:()=>_P,commaOrSpaceSeparated:()=>xP,commaSeparated:()=>bP,number:()=>B,overloadedBoolean:()=>vP,spaceSeparated:()=>yP}),hP=0,gP=SP(),_P=SP(),vP=SP(),B=SP(),yP=SP(),bP=SP(),xP=SP();function SP(){return 2**++hP}var CP=Object.keys(mP),wP=class extends pP{constructor(e,t,n,r){let i=-1;if(super(e,t),TP(this,`space`,r),typeof n==`number`)for(;++i<CP.length;){let e=CP[i];TP(this,CP[i],(n&mP[e])===mP[e])}}};wP.prototype.defined=!0;function TP(e,t,n){n&&(e[t]=n)}function EP(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new wP(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[fP(r)]=r,n[fP(a.attribute)]=r}return new uP(t,n,e.space)}var DP=EP({properties:{ariaActiveDescendant:null,ariaAtomic:_P,ariaAutoComplete:null,ariaBusy:_P,ariaChecked:_P,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:yP,ariaCurrent:null,ariaDescribedBy:yP,ariaDetails:null,ariaDisabled:_P,ariaDropEffect:yP,ariaErrorMessage:null,ariaExpanded:_P,ariaFlowTo:yP,ariaGrabbed:_P,ariaHasPopup:null,ariaHidden:_P,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yP,ariaLevel:B,ariaLive:null,ariaModal:_P,ariaMultiLine:_P,ariaMultiSelectable:_P,ariaOrientation:null,ariaOwns:yP,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:_P,ariaReadOnly:_P,ariaRelevant:null,ariaRequired:_P,ariaRoleDescription:yP,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:_P,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function OP(e,t){return t in e?e[t]:t}function kP(e,t){return OP(e,t.toLowerCase())}var AP=EP({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:bP,acceptCharset:yP,accessKey:yP,action:null,allow:null,allowFullScreen:gP,allowPaymentRequest:gP,allowUserMedia:gP,alpha:gP,alt:null,as:null,async:gP,autoCapitalize:null,autoComplete:yP,autoFocus:gP,autoPlay:gP,blocking:yP,capture:null,charSet:null,checked:gP,cite:null,className:yP,closedBy:null,colorSpace:null,cols:B,colSpan:B,command:null,commandFor:null,content:null,contentEditable:_P,controls:gP,controlsList:yP,coords:B|bP,crossOrigin:null,data:null,dateTime:null,decoding:null,default:gP,defer:gP,dir:null,dirName:null,disabled:gP,download:vP,draggable:_P,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:gP,formTarget:null,headers:yP,height:B,hidden:vP,high:B,href:null,hrefLang:null,htmlFor:yP,httpEquiv:yP,id:null,imageSizes:null,imageSrcSet:null,inert:gP,inputMode:null,integrity:null,is:null,isMap:gP,itemId:null,itemProp:yP,itemRef:yP,itemScope:gP,itemType:yP,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:gP,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:gP,muted:gP,name:null,nonce:null,noModule:gP,noValidate:gP,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:gP,optimum:B,pattern:null,ping:yP,placeholder:null,playsInline:gP,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:gP,referrerPolicy:null,rel:yP,required:gP,reversed:gP,rows:B,rowSpan:B,sandbox:yP,scope:null,scoped:gP,seamless:gP,selected:gP,shadowRootClonable:gP,shadowRootCustomElementRegistry:gP,shadowRootDelegatesFocus:gP,shadowRootMode:null,shadowRootSerializable:gP,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:_P,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:gP,useMap:null,value:_P,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yP,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:gP,declare:gP,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:gP,noHref:gP,noShade:gP,noWrap:gP,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:_P,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:gP,disablePictureInPicture:gP,disableRemotePlayback:gP,exportParts:bP,part:yP,prefix:null,property:null,results:B,security:null,unselectable:null},space:`html`,transform:kP}),jP=EP({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:xP,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:yP,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:gP,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:bP,g2:bP,glyphName:bP,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:xP,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yP,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xP,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xP,rev:xP,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xP,requiredFeatures:xP,requiredFonts:xP,requiredFormats:xP,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:xP,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xP,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xP,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:OP}),MP=EP({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),NP=EP({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:kP}),PP=EP({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),FP={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},IP=/[A-Z]/g,LP=/-[a-z]/g,RP=/^data[-\w.:]+$/i;function zP(e,t){let n=fP(t),r=t,i=pP;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&RP.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(LP,VP);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!LP.test(e)){let n=e.replace(IP,BP);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=wP}return new i(r,t)}function BP(e){return`-`+e.toLowerCase()}function VP(e){return e.charAt(1).toUpperCase()}var HP=dP([DP,AP,MP,NP,PP],`html`),UP=dP([DP,jP,MP,NP,PP],`svg`);function WP(e){return e.join(` `).trim()}var GP=/\/\*(?:[^*]|\*(?!\/))*\*\//g,KP=/\n/g,qP=/^\s*/,JP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,YP=/^:\s*/,XP=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,ZP=/^[;\s]*/,QP=`
|
|
243
|
+
`,$P=`/`,eF=`*`,tF=``,nF=`comment`,rF=`declaration`;function iF(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(KP);t&&(n+=t.length);var i=e.lastIndexOf(QP);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(qP)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if($P==e.charAt(0)&&eF==e.charAt(1)){for(var n=2;tF!=e.charAt(n)&&(eF!=e.charAt(n)||$P!=e.charAt(n+1));)++n;if(n+=2,tF===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:nF,comment:o})}}function f(){var e=a(),t=c(JP);if(t){if(d(),!c(YP))return s(`property missing ':'`);var n=c(XP),r=e({type:rF,property:t[0].replace(GP,tF).trim(),value:n?n[0].replace(GP,tF).trim():tF});return c(ZP),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function aF(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=iF(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var oF=cF(`end`),sF=cF(`start`);function cF(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 lF(e){let t=sF(e),n=oF(e);if(t&&n)return{start:t,end:n}}function uF(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?fF(e.position):`start`in e||`end`in e?fF(e):`line`in e||`column`in e?dF(e):``}function dF(e){return pF(e&&e.line)+`:`+pF(e&&e.column)}function fF(e){return dF(e&&e.start)+`-`+dF(e&&e.end)}function pF(e){return e&&typeof e==`number`?e:1}var mF=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=uF(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}};mF.prototype.file=``,mF.prototype.name=``,mF.prototype.reason=``,mF.prototype.message=``,mF.prototype.stack=``,mF.prototype.column=void 0,mF.prototype.line=void 0,mF.prototype.ancestors=void 0,mF.prototype.cause=void 0,mF.prototype.fatal=void 0,mF.prototype.place=void 0,mF.prototype.ruleId=void 0,mF.prototype.source=void 0;var hF={}.hasOwnProperty,gF=new Map,_F=/[A-Z]/g,vF=/-([a-z])/g,yF=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),bF=new Set([`td`,`th`]),xF=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function SF(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=NF(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=MF(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`?UP:HP,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=CF(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function CF(e,t,n){if(t.type===`element`)return wF(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return TF(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return DF(e,t,n);if(t.type===`mdxjsEsm`)return EF(e,t);if(t.type===`root`)return OF(e,t,n);if(t.type===`text`)return kF(e,t)}function wF(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=UP,e.schema=i),e.ancestors.push(t);let a=zF(e,t.tagName,!1),o=PF(e,t),s=IF(e,t);return yF.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!cP(e)})),AF(e,o,a,t),jF(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function TF(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)}BF(e,t.position)}function EF(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);BF(e,t.position)}function DF(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=UP,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:zF(e,t.name,!0),o=FF(e,t),s=IF(e,t);return AF(e,o,a,t),jF(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function OF(e,t,n){let r={};return jF(r,IF(e,t)),e.create(t,e.Fragment,r,n)}function kF(e,t){return t.value}function AF(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function jF(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function MF(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 NF(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=sF(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 PF(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&hF.call(t.properties,i)){let a=LF(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&bF.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 FF(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 BF(e,t.position)}else{let{name:i}=r,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 BF(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function IF(e,t){let n=[],r=-1,i=e.passKeys?new Map:gF;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=CF(e,a,o);s!==void 0&&n.push(s)}return n}function LF(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=zP(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?nP(n):WP(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:VF(n):RF(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?FP[r.property]||r.property:r.attribute,n]}function RF(e,t){let n={};try{aF(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(vF,WF))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new mF("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=xF+`#cannot-parse-style-attribute`,r}return n}function zF(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=oP(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=oP(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return hF.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);BF(e)}function BF(e,t){let n=new mF("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=xF+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function VF(e){let t={},n;for(n in e)hF.call(e,n)&&(t[HF(n)]=e[n]);return t}function HF(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(_F,UF);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function UF(e){return`-`+e.toLowerCase()}function WF(e,t){return t.toUpperCase()}function GF({...e}){return(0,M.jsx)(Ld,{"data-slot":`popover`,...e})}function KF({...e}){return(0,M.jsx)(zd,{"data-slot":`popover-trigger`,...e})}function qF({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,M.jsx)(Ud,{children:(0,M.jsx)(Gd,{"data-slot":`popover-content`,align:t,sideOffset:n,className:j(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r})})}function JF({className:e,...t}){return(0,M.jsx)(aee,{role:`status`,"aria-label":`Loading`,className:j(`size-4 animate-spin motion-reduce:animate-none`,e),...t})}var YF=(0,v.createContext)(void 0);function XF(e,t){let[n,r]=(0,v.useState)({state:`loading`});return(0,v.useEffect)(()=>{if(!t)return;let n=!0;return r({state:`loading`}),JM([e]).then(t=>{if(!n)return;let i=t.ok?t.value.find(t=>t.ref===e):void 0;r(i?{state:`ready`,citation:i}:{state:`failed`,error:t.ok?`The server didn't return this passage.`:t.error})}),()=>{n=!1}},[e,t]),n}function ZF({loaded:e}){if(e.state===`loading`)return(0,M.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,M.jsx)(JF,{}),` Reading the passage…`]});if(e.state===`failed`)return(0,M.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Couldn't load this passage: `,e.error]});let{citation:t}=e,n=t.kind===`note`,r=(0,M.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,M.jsx)(`p`,{className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:n?`Your note`:`Your document`}),t.source&&(0,M.jsx)(`p`,{className:`text-sm font-semibold break-words text-foreground`,children:t.source}),t.locator&&(0,M.jsx)(`p`,{className:`text-xs break-words text-muted-foreground`,children:t.locator})]});if(t.status===`ok`)return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,(0,M.jsx)(`blockquote`,{"data-testid":`citation-passage`,className:`max-h-64 overflow-auto border-l-2 border-border pl-3 text-sm whitespace-pre-wrap text-foreground`,children:t.text}),(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n?`As it is in your notes now.`:`As it is in the uploaded file.`})]});let i=t.status===`missing`?n?`This note has been deleted or moved since, so the passage can't be shown.`:`This document has been deleted since, so the passage can't be shown.`:t.status===`changed`?n?`This note was imported again without that heading, so the cited passage isn't there any more.`:`This page has no text now, so the cited passage can't be shown.`:`This isn't a passage Mivra can show.`;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,(0,M.jsx)(`p`,{"data-testid":`citation-unavailable`,className:`text-sm text-muted-foreground`,children:i})]})}function QF({refId:e,number:t}){let[n,r]=(0,v.useState)(!1),i=XF(e,n);return(0,M.jsxs)(GF,{open:n,onOpenChange:r,children:[(0,M.jsx)(KF,{asChild:!0,children:(0,M.jsx)(`button`,{type:`button`,"data-citation-ref":e,"aria-label":`Show source ${t}`,className:`mx-0.5 inline-flex h-4 min-w-4 -translate-y-1 items-center justify-center rounded-sm bg-muted px-1 align-baseline text-[0.65rem] leading-none font-medium text-muted-foreground tabular-nums transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,children:t})}),(0,M.jsx)(qF,{align:`start`,className:`w-80 max-w-[calc(100vw-2rem)]`,"aria-label":`Source ${t}`,children:(0,M.jsx)(ZF,{loaded:i})})]})}function $F({refId:e}){let t=(0,v.useContext)(YF)?.get(e);return t===void 0?null:(0,M.jsx)(QF,{refId:e,number:t})}var eI={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},V=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},tI=/([A-Z])/g,nI=e=>e.replace(tI,`-$1`).toLowerCase(),rI={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},iI=/[&><"']/g,aI=e=>String(e).replace(iI,e=>rI[e]),oI=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?oI(e.body[0]):e:e.type===`font`?oI(e.body):e,Cre=new Set([`mathord`,`textord`,`atom`]),sI=e=>Cre.has(oI(e).type),wre=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},cI={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function Tre(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Ere(e){return e.default===void 0?Tre(Array.isArray(e.type)?e.type[0]:e.type):e.default}function Dre(e,t,n,r){var i=n[t];e[t]=i===void 0?Ere(r):r.processor?r.processor(i):i}var lI=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(cI)){var n=cI[t];n&&Dre(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new V(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=wre(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},uI=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return yI[Ore[this.id]]}sub(){return yI[kre[this.id]]}fracNum(){return yI[Are[this.id]]}fracDen(){return yI[jre[this.id]]}cramp(){return yI[Mre[this.id]]}text(){return yI[Nre[this.id]]}isTight(){return this.size>=2}},dI=0,fI=1,pI=2,mI=3,hI=4,gI=5,_I=6,vI=7,yI=[new uI(dI,0,!1),new uI(fI,0,!0),new uI(pI,1,!1),new uI(mI,1,!0),new uI(hI,2,!1),new uI(gI,2,!0),new uI(_I,3,!1),new uI(vI,3,!0)],Ore=[hI,gI,hI,gI,_I,vI,_I,vI],kre=[gI,gI,gI,gI,vI,vI,vI,vI],Are=[pI,mI,hI,gI,_I,vI,_I,vI],jre=[mI,mI,gI,gI,vI,vI,vI,vI],Mre=[fI,fI,mI,mI,gI,gI,vI,vI],Nre=[dI,fI,pI,mI,pI,mI,pI,mI],bI={DISPLAY:yI[dI],TEXT:yI[pI],SCRIPT:yI[hI],SCRIPTSCRIPT:yI[_I]},xI=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function Pre(e){for(var t=0;t<xI.length;t++)for(var n=xI[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var SI=[];xI.forEach(e=>e.blocks.forEach(e=>SI.push(...e)));function CI(e){for(var t=0;t<SI.length;t+=2)if(e>=SI[t]&&e<=SI[t+1])return!0;return!1}var wI=e=>e+` `+e,TI=80,Fre=function(e,t){return`M95,`+(622+e+t)+`
|
|
244
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
245
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
246
|
+
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
247
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
248
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
249
|
+
l`+e/2.075+` -`+e+`
|
|
250
|
+
c5.3,-9.3,12,-14,20,-14
|
|
251
|
+
H400000v`+(40+e)+`H845.2724
|
|
252
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
253
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
254
|
+
M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Ire=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
|
|
255
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
256
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
257
|
+
l`+e/2.084+` -`+e+`
|
|
258
|
+
c4.7,-7.3,11,-11,19,-11
|
|
259
|
+
H40000v`+(40+e)+`H1012.3
|
|
260
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
261
|
+
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
262
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
263
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
264
|
+
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Lre=function(e,t){return`M983 `+(10+e+t)+`
|
|
265
|
+
l`+e/3.13+` -`+e+`
|
|
266
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
|
|
267
|
+
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
268
|
+
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
269
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
270
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
271
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
272
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
273
|
+
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Rre=function(e,t){return`M424,`+(2398+e+t)+`
|
|
274
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
275
|
+
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
276
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
277
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
278
|
+
l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
|
|
279
|
+
v`+(40+e)+`H1014.6
|
|
280
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
281
|
+
c-2,6,-10,9,-24,9
|
|
282
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
|
|
283
|
+
h400000v`+(40+e)+`h-400000z`},zre=function(e,t){return`M473,`+(2713+e+t)+`
|
|
284
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
|
|
285
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
|
|
286
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
287
|
+
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
288
|
+
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
289
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
290
|
+
606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},Bre=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},Vre=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
|
|
291
|
+
H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
292
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
293
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
294
|
+
219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},Hre=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=Fre(t,TI);break;case`sqrtSize1`:r=Ire(t,TI);break;case`sqrtSize2`:r=Lre(t,TI);break;case`sqrtSize3`:r=Rre(t,TI);break;case`sqrtSize4`:r=zre(t,TI);break;case`sqrtTall`:r=Vre(t,TI,n)}return r},Ure=function(e,t){switch(e){case`⎜`:return wI(`M291 0 H417 V`+t+` H291z`);case`∣`:return wI(`M145 0 H188 V`+t+` H145z`);case`∥`:return wI(`M145 0 H188 V`+t+` H145z`)+wI(`M367 0 H410 V`+t+` H367z`);case`⎟`:return wI(`M457 0 H583 V`+t+` H457z`);case`⎢`:return wI(`M319 0 H403 V`+t+` H319z`);case`⎥`:return wI(`M263 0 H347 V`+t+` H263z`);case`⎪`:return wI(`M384 0 H504 V`+t+` H384z`);case`⏐`:return wI(`M312 0 H355 V`+t+` H312z`);case`‖`:return wI(`M257 0 H300 V`+t+` H257z`)+wI(`M478 0 H521 V`+t+` H478z`);default:return``}},EI={doubleleftarrow:`M262 157
|
|
295
|
+
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
296
|
+
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
297
|
+
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
298
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
299
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
300
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
301
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
302
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
303
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
304
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
305
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
306
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
307
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
308
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
309
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
310
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
311
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
312
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
313
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
314
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
315
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
316
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
317
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
318
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
319
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
320
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
321
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
322
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
323
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
324
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
325
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
326
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
327
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
328
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
329
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
330
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
331
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
332
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
333
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
334
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
335
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
336
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
337
|
+
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
338
|
+
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
339
|
+
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
340
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:wI(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:wI(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:wI(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:wI(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
341
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
342
|
+
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
343
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:wI(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
|
|
344
|
+
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
345
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
346
|
+
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
347
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
348
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
349
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
350
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
351
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
352
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
353
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
354
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
355
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
356
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
357
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
358
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
359
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
360
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
361
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
362
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
363
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
364
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
365
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
366
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
367
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
368
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
369
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
370
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
371
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
372
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
373
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
374
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
375
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
376
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
377
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
378
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
379
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
380
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
381
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
382
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
383
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
384
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
385
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
386
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
387
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
388
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
389
|
+
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
390
|
+
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
391
|
+
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
392
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:wI(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:wI(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:wI(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
393
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
394
|
+
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
395
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
396
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
397
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
398
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
399
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
400
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
401
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
402
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
403
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
404
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
405
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
406
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
407
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
408
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
409
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
410
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
411
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
412
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
413
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
414
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
415
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
416
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
417
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
418
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
419
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
420
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
421
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
422
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
423
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
424
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
425
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
426
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
427
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
428
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
429
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
430
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
431
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
432
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
433
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
434
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
435
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
436
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
437
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
438
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
439
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
440
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
441
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
442
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
443
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
444
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
445
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
446
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
447
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
448
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
449
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
450
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
451
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
452
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
453
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
454
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
455
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
456
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
457
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
458
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
459
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
460
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
461
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
462
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
463
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
464
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
465
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Wre=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
|
|
466
|
+
H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
|
|
467
|
+
M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
468
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
469
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
470
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
471
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
|
|
472
|
+
M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
473
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
474
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
|
|
475
|
+
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
|
|
476
|
+
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
|
|
477
|
+
M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
|
|
478
|
+
M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
479
|
+
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
480
|
+
-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
481
|
+
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
482
|
+
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
483
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
484
|
+
l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
485
|
+
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
486
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
487
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
|
|
488
|
+
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
489
|
+
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
490
|
+
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
491
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
492
|
+
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
493
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function Gre(e){return`toText`in e}var DI=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(Gre(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},OI={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Kre={ex:!0,em:!0,mu:!0},kI=function(e){return typeof e!=`string`&&(e=e.unit),e in OI||e in Kre||e===`ex`},AI=function(e,t){var n;if(e.unit in OI)n=OI[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new V(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},H=function(e){return+e.toFixed(4)+`em`},jI=function(e){return e.filter(e=>e).join(` `)},MI=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=nI(n)+`:`+r+`;`)}return t},NI=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},PI=function(e){var t=document.createElement(e);t.className=jI(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},qre=/[\s"'>/=\x00-\x1f]/,FI=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+aI(jI(this.classes))+`"`);var n=MI(this.style);n&&(t+=` style="`+aI(n)+`"`);for(var r of Object.keys(this.attributes)){if(qre.test(r))throw new V(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+aI(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},II=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,NI.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return PI.call(this,`span`)}toMarkup(){return FI.call(this,`span`)}},LI=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,NI.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return PI.call(this,`a`)}toMarkup(){return FI.call(this,`a`)}},Jre=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+aI(this.src)+`"`+(` alt="`+aI(this.alt)+`"`),t=MI(this.style);return t&&(e+=` style="`+aI(t)+`"`),e+=`'/>`,e}},Yre={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},RI=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=Pre(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Yre[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=H(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=jI(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=aI(jI(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+H(this.italic)+`;`),n+=MI(this.style),n&&(e=!0,t+=` style="`+aI(n)+`"`);var r=aI(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},zI=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+aI(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},BI=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,EI[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+aI(this.alternate)+`"/>`:`<path d="`+aI(EI[this.pathName])+`"/>`}},VI=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+aI(this.attributes[t])+`"`;return e+=`/>`,e}};function Xre(e){if(e instanceof RI)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Zre(e){if(e instanceof II)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var Qre=e=>e instanceof II||e instanceof LI||e instanceof DI,HI={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},UI={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},WI={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function $re(e,t){HI[e]=t}function GI(e,t,n){if(!HI[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=HI[t][r];if(!i&&e[0]in WI&&(r=WI[e[0]].charCodeAt(0),i=HI[t][r]),!i&&n===`text`&&CI(r)&&(i=HI[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var KI={};function eie(e){var t=e>=5?0:e>=3?1:2;if(!KI[t]){var n=KI[t]={cssEmPerMu:UI.quad[t]/18};for(var r in UI)UI.hasOwnProperty(r)&&(n[r]=UI[r][t])}return KI[t]}var qI={math:{},text:{}};function U(e,t,n,r,i,a){qI[e][i]={font:t,group:n,replace:r},a&&r&&(qI[e][r]=qI[e][i])}var W=`math`,G=`text`,K=`main`,q=`ams`,JI=`accent-token`,YI=`bin`,XI=`close`,ZI=`inner`,QI=`mathord`,$I=`op-token`,eL=`open`,tL=`punct`,J=`rel`,nL=`spacing`,Y=`textord`;U(W,K,J,`≡`,`\\equiv`,!0),U(W,K,J,`≺`,`\\prec`,!0),U(W,K,J,`≻`,`\\succ`,!0),U(W,K,J,`∼`,`\\sim`,!0),U(W,K,J,`⊥`,`\\perp`),U(W,K,J,`⪯`,`\\preceq`,!0),U(W,K,J,`⪰`,`\\succeq`,!0),U(W,K,J,`≃`,`\\simeq`,!0),U(W,K,J,`∣`,`\\mid`,!0),U(W,K,J,`≪`,`\\ll`,!0),U(W,K,J,`≫`,`\\gg`,!0),U(W,K,J,`≍`,`\\asymp`,!0),U(W,K,J,`∥`,`\\parallel`),U(W,K,J,`⋈`,`\\bowtie`,!0),U(W,K,J,`⌣`,`\\smile`,!0),U(W,K,J,`⊑`,`\\sqsubseteq`,!0),U(W,K,J,`⊒`,`\\sqsupseteq`,!0),U(W,K,J,`≐`,`\\doteq`,!0),U(W,K,J,`⌢`,`\\frown`,!0),U(W,K,J,`∋`,`\\ni`,!0),U(W,K,J,`∝`,`\\propto`,!0),U(W,K,J,`⊢`,`\\vdash`,!0),U(W,K,J,`⊣`,`\\dashv`,!0),U(W,K,J,`∋`,`\\owns`),U(W,K,tL,`.`,`\\ldotp`),U(W,K,tL,`⋅`,`\\cdotp`),U(W,K,tL,`⋅`,`·`),U(G,K,Y,`⋅`,`·`),U(W,K,Y,`#`,`\\#`),U(G,K,Y,`#`,`\\#`),U(W,K,Y,`&`,`\\&`),U(G,K,Y,`&`,`\\&`),U(W,K,Y,`ℵ`,`\\aleph`,!0),U(W,K,Y,`∀`,`\\forall`,!0),U(W,K,Y,`ℏ`,`\\hbar`,!0),U(W,K,Y,`∃`,`\\exists`,!0),U(W,K,Y,`∇`,`\\nabla`,!0),U(W,K,Y,`♭`,`\\flat`,!0),U(W,K,Y,`ℓ`,`\\ell`,!0),U(W,K,Y,`♮`,`\\natural`,!0),U(W,K,Y,`♣`,`\\clubsuit`,!0),U(W,K,Y,`℘`,`\\wp`,!0),U(W,K,Y,`♯`,`\\sharp`,!0),U(W,K,Y,`♢`,`\\diamondsuit`,!0),U(W,K,Y,`ℜ`,`\\Re`,!0),U(W,K,Y,`♡`,`\\heartsuit`,!0),U(W,K,Y,`ℑ`,`\\Im`,!0),U(W,K,Y,`♠`,`\\spadesuit`,!0),U(W,K,Y,`§`,`\\S`,!0),U(G,K,Y,`§`,`\\S`),U(W,K,Y,`¶`,`\\P`,!0),U(G,K,Y,`¶`,`\\P`),U(W,K,Y,`†`,`\\dag`),U(G,K,Y,`†`,`\\dag`),U(G,K,Y,`†`,`\\textdagger`),U(W,K,Y,`‡`,`\\ddag`),U(G,K,Y,`‡`,`\\ddag`),U(G,K,Y,`‡`,`\\textdaggerdbl`),U(W,K,XI,`⎱`,`\\rmoustache`,!0),U(W,K,eL,`⎰`,`\\lmoustache`,!0),U(W,K,XI,`⟯`,`\\rgroup`,!0),U(W,K,eL,`⟮`,`\\lgroup`,!0),U(W,K,YI,`∓`,`\\mp`,!0),U(W,K,YI,`⊖`,`\\ominus`,!0),U(W,K,YI,`⊎`,`\\uplus`,!0),U(W,K,YI,`⊓`,`\\sqcap`,!0),U(W,K,YI,`∗`,`\\ast`),U(W,K,YI,`⊔`,`\\sqcup`,!0),U(W,K,YI,`◯`,`\\bigcirc`,!0),U(W,K,YI,`∙`,`\\bullet`,!0),U(W,K,YI,`‡`,`\\ddagger`),U(W,K,YI,`≀`,`\\wr`,!0),U(W,K,YI,`⨿`,`\\amalg`),U(W,K,YI,`&`,`\\And`),U(W,K,J,`⟵`,`\\longleftarrow`,!0),U(W,K,J,`⇐`,`\\Leftarrow`,!0),U(W,K,J,`⟸`,`\\Longleftarrow`,!0),U(W,K,J,`⟶`,`\\longrightarrow`,!0),U(W,K,J,`⇒`,`\\Rightarrow`,!0),U(W,K,J,`⟹`,`\\Longrightarrow`,!0),U(W,K,J,`↔`,`\\leftrightarrow`,!0),U(W,K,J,`⟷`,`\\longleftrightarrow`,!0),U(W,K,J,`⇔`,`\\Leftrightarrow`,!0),U(W,K,J,`⟺`,`\\Longleftrightarrow`,!0),U(W,K,J,`↦`,`\\mapsto`,!0),U(W,K,J,`⟼`,`\\longmapsto`,!0),U(W,K,J,`↗`,`\\nearrow`,!0),U(W,K,J,`↩`,`\\hookleftarrow`,!0),U(W,K,J,`↪`,`\\hookrightarrow`,!0),U(W,K,J,`↘`,`\\searrow`,!0),U(W,K,J,`↼`,`\\leftharpoonup`,!0),U(W,K,J,`⇀`,`\\rightharpoonup`,!0),U(W,K,J,`↙`,`\\swarrow`,!0),U(W,K,J,`↽`,`\\leftharpoondown`,!0),U(W,K,J,`⇁`,`\\rightharpoondown`,!0),U(W,K,J,`↖`,`\\nwarrow`,!0),U(W,K,J,`⇌`,`\\rightleftharpoons`,!0),U(W,q,J,`≮`,`\\nless`,!0),U(W,q,J,``,`\\@nleqslant`),U(W,q,J,``,`\\@nleqq`),U(W,q,J,`⪇`,`\\lneq`,!0),U(W,q,J,`≨`,`\\lneqq`,!0),U(W,q,J,``,`\\@lvertneqq`),U(W,q,J,`⋦`,`\\lnsim`,!0),U(W,q,J,`⪉`,`\\lnapprox`,!0),U(W,q,J,`⊀`,`\\nprec`,!0),U(W,q,J,`⋠`,`\\npreceq`,!0),U(W,q,J,`⋨`,`\\precnsim`,!0),U(W,q,J,`⪹`,`\\precnapprox`,!0),U(W,q,J,`≁`,`\\nsim`,!0),U(W,q,J,``,`\\@nshortmid`),U(W,q,J,`∤`,`\\nmid`,!0),U(W,q,J,`⊬`,`\\nvdash`,!0),U(W,q,J,`⊭`,`\\nvDash`,!0),U(W,q,J,`⋪`,`\\ntriangleleft`),U(W,q,J,`⋬`,`\\ntrianglelefteq`,!0),U(W,q,J,`⊊`,`\\subsetneq`,!0),U(W,q,J,``,`\\@varsubsetneq`),U(W,q,J,`⫋`,`\\subsetneqq`,!0),U(W,q,J,``,`\\@varsubsetneqq`),U(W,q,J,`≯`,`\\ngtr`,!0),U(W,q,J,``,`\\@ngeqslant`),U(W,q,J,``,`\\@ngeqq`),U(W,q,J,`⪈`,`\\gneq`,!0),U(W,q,J,`≩`,`\\gneqq`,!0),U(W,q,J,``,`\\@gvertneqq`),U(W,q,J,`⋧`,`\\gnsim`,!0),U(W,q,J,`⪊`,`\\gnapprox`,!0),U(W,q,J,`⊁`,`\\nsucc`,!0),U(W,q,J,`⋡`,`\\nsucceq`,!0),U(W,q,J,`⋩`,`\\succnsim`,!0),U(W,q,J,`⪺`,`\\succnapprox`,!0),U(W,q,J,`≆`,`\\ncong`,!0),U(W,q,J,``,`\\@nshortparallel`),U(W,q,J,`∦`,`\\nparallel`,!0),U(W,q,J,`⊯`,`\\nVDash`,!0),U(W,q,J,`⋫`,`\\ntriangleright`),U(W,q,J,`⋭`,`\\ntrianglerighteq`,!0),U(W,q,J,``,`\\@nsupseteqq`),U(W,q,J,`⊋`,`\\supsetneq`,!0),U(W,q,J,``,`\\@varsupsetneq`),U(W,q,J,`⫌`,`\\supsetneqq`,!0),U(W,q,J,``,`\\@varsupsetneqq`),U(W,q,J,`⊮`,`\\nVdash`,!0),U(W,q,J,`⪵`,`\\precneqq`,!0),U(W,q,J,`⪶`,`\\succneqq`,!0),U(W,q,J,``,`\\@nsubseteqq`),U(W,q,YI,`⊴`,`\\unlhd`),U(W,q,YI,`⊵`,`\\unrhd`),U(W,q,J,`↚`,`\\nleftarrow`,!0),U(W,q,J,`↛`,`\\nrightarrow`,!0),U(W,q,J,`⇍`,`\\nLeftarrow`,!0),U(W,q,J,`⇏`,`\\nRightarrow`,!0),U(W,q,J,`↮`,`\\nleftrightarrow`,!0),U(W,q,J,`⇎`,`\\nLeftrightarrow`,!0),U(W,q,J,`△`,`\\vartriangle`),U(W,q,Y,`ℏ`,`\\hslash`),U(W,q,Y,`▽`,`\\triangledown`),U(W,q,Y,`◊`,`\\lozenge`),U(W,q,Y,`Ⓢ`,`\\circledS`),U(W,q,Y,`®`,`\\circledR`),U(G,q,Y,`®`,`\\circledR`),U(W,q,Y,`∡`,`\\measuredangle`,!0),U(W,q,Y,`∄`,`\\nexists`),U(W,q,Y,`℧`,`\\mho`),U(W,q,Y,`Ⅎ`,`\\Finv`,!0),U(W,q,Y,`⅁`,`\\Game`,!0),U(W,q,Y,`‵`,`\\backprime`),U(W,q,Y,`▲`,`\\blacktriangle`),U(W,q,Y,`▼`,`\\blacktriangledown`),U(W,q,Y,`■`,`\\blacksquare`),U(W,q,Y,`⧫`,`\\blacklozenge`),U(W,q,Y,`★`,`\\bigstar`),U(W,q,Y,`∢`,`\\sphericalangle`,!0),U(W,q,Y,`∁`,`\\complement`,!0),U(W,q,Y,`ð`,`\\eth`,!0),U(G,K,Y,`ð`,`ð`),U(W,q,Y,`╱`,`\\diagup`),U(W,q,Y,`╲`,`\\diagdown`),U(W,q,Y,`□`,`\\square`),U(W,q,Y,`□`,`\\Box`),U(W,q,Y,`◊`,`\\Diamond`),U(W,q,Y,`¥`,`\\yen`,!0),U(G,q,Y,`¥`,`\\yen`,!0),U(W,q,Y,`✓`,`\\checkmark`,!0),U(G,q,Y,`✓`,`\\checkmark`),U(W,q,Y,`ℶ`,`\\beth`,!0),U(W,q,Y,`ℸ`,`\\daleth`,!0),U(W,q,Y,`ℷ`,`\\gimel`,!0),U(W,q,Y,`ϝ`,`\\digamma`,!0),U(W,q,Y,`ϰ`,`\\varkappa`),U(W,q,eL,`┌`,`\\@ulcorner`,!0),U(W,q,XI,`┐`,`\\@urcorner`,!0),U(W,q,eL,`└`,`\\@llcorner`,!0),U(W,q,XI,`┘`,`\\@lrcorner`,!0),U(W,q,J,`≦`,`\\leqq`,!0),U(W,q,J,`⩽`,`\\leqslant`,!0),U(W,q,J,`⪕`,`\\eqslantless`,!0),U(W,q,J,`≲`,`\\lesssim`,!0),U(W,q,J,`⪅`,`\\lessapprox`,!0),U(W,q,J,`≊`,`\\approxeq`,!0),U(W,q,YI,`⋖`,`\\lessdot`),U(W,q,J,`⋘`,`\\lll`,!0),U(W,q,J,`≶`,`\\lessgtr`,!0),U(W,q,J,`⋚`,`\\lesseqgtr`,!0),U(W,q,J,`⪋`,`\\lesseqqgtr`,!0),U(W,q,J,`≑`,`\\doteqdot`),U(W,q,J,`≓`,`\\risingdotseq`,!0),U(W,q,J,`≒`,`\\fallingdotseq`,!0),U(W,q,J,`∽`,`\\backsim`,!0),U(W,q,J,`⋍`,`\\backsimeq`,!0),U(W,q,J,`⫅`,`\\subseteqq`,!0),U(W,q,J,`⋐`,`\\Subset`,!0),U(W,q,J,`⊏`,`\\sqsubset`,!0),U(W,q,J,`≼`,`\\preccurlyeq`,!0),U(W,q,J,`⋞`,`\\curlyeqprec`,!0),U(W,q,J,`≾`,`\\precsim`,!0),U(W,q,J,`⪷`,`\\precapprox`,!0),U(W,q,J,`⊲`,`\\vartriangleleft`),U(W,q,J,`⊴`,`\\trianglelefteq`),U(W,q,J,`⊨`,`\\vDash`,!0),U(W,q,J,`⊪`,`\\Vvdash`,!0),U(W,q,J,`⌣`,`\\smallsmile`),U(W,q,J,`⌢`,`\\smallfrown`),U(W,q,J,`≏`,`\\bumpeq`,!0),U(W,q,J,`≎`,`\\Bumpeq`,!0),U(W,q,J,`≧`,`\\geqq`,!0),U(W,q,J,`⩾`,`\\geqslant`,!0),U(W,q,J,`⪖`,`\\eqslantgtr`,!0),U(W,q,J,`≳`,`\\gtrsim`,!0),U(W,q,J,`⪆`,`\\gtrapprox`,!0),U(W,q,YI,`⋗`,`\\gtrdot`),U(W,q,J,`⋙`,`\\ggg`,!0),U(W,q,J,`≷`,`\\gtrless`,!0),U(W,q,J,`⋛`,`\\gtreqless`,!0),U(W,q,J,`⪌`,`\\gtreqqless`,!0),U(W,q,J,`≖`,`\\eqcirc`,!0),U(W,q,J,`≗`,`\\circeq`,!0),U(W,q,J,`≜`,`\\triangleq`,!0),U(W,q,J,`∼`,`\\thicksim`),U(W,q,J,`≈`,`\\thickapprox`),U(W,q,J,`⫆`,`\\supseteqq`,!0),U(W,q,J,`⋑`,`\\Supset`,!0),U(W,q,J,`⊐`,`\\sqsupset`,!0),U(W,q,J,`≽`,`\\succcurlyeq`,!0),U(W,q,J,`⋟`,`\\curlyeqsucc`,!0),U(W,q,J,`≿`,`\\succsim`,!0),U(W,q,J,`⪸`,`\\succapprox`,!0),U(W,q,J,`⊳`,`\\vartriangleright`),U(W,q,J,`⊵`,`\\trianglerighteq`),U(W,q,J,`⊩`,`\\Vdash`,!0),U(W,q,J,`∣`,`\\shortmid`),U(W,q,J,`∥`,`\\shortparallel`),U(W,q,J,`≬`,`\\between`,!0),U(W,q,J,`⋔`,`\\pitchfork`,!0),U(W,q,J,`∝`,`\\varpropto`),U(W,q,J,`◀`,`\\blacktriangleleft`),U(W,q,J,`∴`,`\\therefore`,!0),U(W,q,J,`∍`,`\\backepsilon`),U(W,q,J,`▶`,`\\blacktriangleright`),U(W,q,J,`∵`,`\\because`,!0),U(W,q,J,`⋘`,`\\llless`),U(W,q,J,`⋙`,`\\gggtr`),U(W,q,YI,`⊲`,`\\lhd`),U(W,q,YI,`⊳`,`\\rhd`),U(W,q,J,`≂`,`\\eqsim`,!0),U(W,K,J,`⋈`,`\\Join`),U(W,q,J,`≑`,`\\Doteq`,!0),U(W,q,YI,`∔`,`\\dotplus`,!0),U(W,q,YI,`∖`,`\\smallsetminus`),U(W,q,YI,`⋒`,`\\Cap`,!0),U(W,q,YI,`⋓`,`\\Cup`,!0),U(W,q,YI,`⩞`,`\\doublebarwedge`,!0),U(W,q,YI,`⊟`,`\\boxminus`,!0),U(W,q,YI,`⊞`,`\\boxplus`,!0),U(W,q,YI,`⋇`,`\\divideontimes`,!0),U(W,q,YI,`⋉`,`\\ltimes`,!0),U(W,q,YI,`⋊`,`\\rtimes`,!0),U(W,q,YI,`⋋`,`\\leftthreetimes`,!0),U(W,q,YI,`⋌`,`\\rightthreetimes`,!0),U(W,q,YI,`⋏`,`\\curlywedge`,!0),U(W,q,YI,`⋎`,`\\curlyvee`,!0),U(W,q,YI,`⊝`,`\\circleddash`,!0),U(W,q,YI,`⊛`,`\\circledast`,!0),U(W,q,YI,`⋅`,`\\centerdot`),U(W,q,YI,`⊺`,`\\intercal`,!0),U(W,q,YI,`⋒`,`\\doublecap`),U(W,q,YI,`⋓`,`\\doublecup`),U(W,q,YI,`⊠`,`\\boxtimes`,!0),U(W,q,J,`⇢`,`\\dashrightarrow`,!0),U(W,q,J,`⇠`,`\\dashleftarrow`,!0),U(W,q,J,`⇇`,`\\leftleftarrows`,!0),U(W,q,J,`⇆`,`\\leftrightarrows`,!0),U(W,q,J,`⇚`,`\\Lleftarrow`,!0),U(W,q,J,`↞`,`\\twoheadleftarrow`,!0),U(W,q,J,`↢`,`\\leftarrowtail`,!0),U(W,q,J,`↫`,`\\looparrowleft`,!0),U(W,q,J,`⇋`,`\\leftrightharpoons`,!0),U(W,q,J,`↶`,`\\curvearrowleft`,!0),U(W,q,J,`↺`,`\\circlearrowleft`,!0),U(W,q,J,`↰`,`\\Lsh`,!0),U(W,q,J,`⇈`,`\\upuparrows`,!0),U(W,q,J,`↿`,`\\upharpoonleft`,!0),U(W,q,J,`⇃`,`\\downharpoonleft`,!0),U(W,K,J,`⊶`,`\\origof`,!0),U(W,K,J,`⊷`,`\\imageof`,!0),U(W,q,J,`⊸`,`\\multimap`,!0),U(W,q,J,`↭`,`\\leftrightsquigarrow`,!0),U(W,q,J,`⇉`,`\\rightrightarrows`,!0),U(W,q,J,`⇄`,`\\rightleftarrows`,!0),U(W,q,J,`↠`,`\\twoheadrightarrow`,!0),U(W,q,J,`↣`,`\\rightarrowtail`,!0),U(W,q,J,`↬`,`\\looparrowright`,!0),U(W,q,J,`↷`,`\\curvearrowright`,!0),U(W,q,J,`↻`,`\\circlearrowright`,!0),U(W,q,J,`↱`,`\\Rsh`,!0),U(W,q,J,`⇊`,`\\downdownarrows`,!0),U(W,q,J,`↾`,`\\upharpoonright`,!0),U(W,q,J,`⇂`,`\\downharpoonright`,!0),U(W,q,J,`⇝`,`\\rightsquigarrow`,!0),U(W,q,J,`⇝`,`\\leadsto`),U(W,q,J,`⇛`,`\\Rrightarrow`,!0),U(W,q,J,`↾`,`\\restriction`),U(W,K,Y,`‘`,"`"),U(W,K,Y,`$`,`\\$`),U(G,K,Y,`$`,`\\$`),U(G,K,Y,`$`,`\\textdollar`),U(W,K,Y,`%`,`\\%`),U(G,K,Y,`%`,`\\%`),U(W,K,Y,`_`,`\\_`),U(G,K,Y,`_`,`\\_`),U(G,K,Y,`_`,`\\textunderscore`),U(W,K,Y,`∠`,`\\angle`,!0),U(W,K,Y,`∞`,`\\infty`,!0),U(W,K,Y,`′`,`\\prime`),U(W,K,Y,`△`,`\\triangle`),U(W,K,Y,`Γ`,`\\Gamma`,!0),U(W,K,Y,`Δ`,`\\Delta`,!0),U(W,K,Y,`Θ`,`\\Theta`,!0),U(W,K,Y,`Λ`,`\\Lambda`,!0),U(W,K,Y,`Ξ`,`\\Xi`,!0),U(W,K,Y,`Π`,`\\Pi`,!0),U(W,K,Y,`Σ`,`\\Sigma`,!0),U(W,K,Y,`Υ`,`\\Upsilon`,!0),U(W,K,Y,`Φ`,`\\Phi`,!0),U(W,K,Y,`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,`ε`,`\\varepsilon`,!0),U(W,K,QI,`ϑ`,`\\vartheta`,!0),U(W,K,QI,`ϖ`,`\\varpi`,!0),U(W,K,QI,`ϱ`,`\\varrho`,!0),U(W,K,QI,`ς`,`\\varsigma`,!0),U(W,K,QI,`φ`,`\\varphi`,!0),U(W,K,YI,`∗`,`*`,!0),U(W,K,YI,`+`,`+`),U(W,K,YI,`−`,`-`,!0),U(W,K,YI,`⋅`,`\\cdot`,!0),U(W,K,YI,`∘`,`\\circ`,!0),U(W,K,YI,`÷`,`\\div`,!0),U(W,K,YI,`±`,`\\pm`,!0),U(W,K,YI,`×`,`\\times`,!0),U(W,K,YI,`∩`,`\\cap`,!0),U(W,K,YI,`∪`,`\\cup`,!0),U(W,K,YI,`∖`,`\\setminus`,!0),U(W,K,YI,`∧`,`\\land`),U(W,K,YI,`∨`,`\\lor`),U(W,K,YI,`∧`,`\\wedge`,!0),U(W,K,YI,`∨`,`\\vee`,!0),U(W,K,Y,`√`,`\\surd`),U(W,K,eL,`⟨`,`\\langle`,!0),U(W,K,eL,`∣`,`\\lvert`),U(W,K,eL,`∥`,`\\lVert`),U(W,K,XI,`?`,`?`),U(W,K,XI,`!`,`!`),U(W,K,XI,`⟩`,`\\rangle`,!0),U(W,K,XI,`∣`,`\\rvert`),U(W,K,XI,`∥`,`\\rVert`),U(W,K,J,`=`,`=`),U(W,K,J,`:`,`:`),U(W,K,J,`≈`,`\\approx`,!0),U(W,K,J,`≅`,`\\cong`,!0),U(W,K,J,`≥`,`\\ge`),U(W,K,J,`≥`,`\\geq`,!0),U(W,K,J,`←`,`\\gets`),U(W,K,J,`>`,`\\gt`,!0),U(W,K,J,`∈`,`\\in`,!0),U(W,K,J,``,`\\@not`),U(W,K,J,`⊂`,`\\subset`,!0),U(W,K,J,`⊃`,`\\supset`,!0),U(W,K,J,`⊆`,`\\subseteq`,!0),U(W,K,J,`⊇`,`\\supseteq`,!0),U(W,q,J,`⊈`,`\\nsubseteq`,!0),U(W,q,J,`⊉`,`\\nsupseteq`,!0),U(W,K,J,`⊨`,`\\models`),U(W,K,J,`←`,`\\leftarrow`,!0),U(W,K,J,`≤`,`\\le`),U(W,K,J,`≤`,`\\leq`,!0),U(W,K,J,`<`,`\\lt`,!0),U(W,K,J,`→`,`\\rightarrow`,!0),U(W,K,J,`→`,`\\to`),U(W,q,J,`≱`,`\\ngeq`,!0),U(W,q,J,`≰`,`\\nleq`,!0),U(W,K,nL,`\xA0`,`\\ `),U(W,K,nL,`\xA0`,`\\space`),U(W,K,nL,`\xA0`,`\\nobreakspace`),U(G,K,nL,`\xA0`,`\\ `),U(G,K,nL,`\xA0`,` `),U(G,K,nL,`\xA0`,`\\space`),U(G,K,nL,`\xA0`,`\\nobreakspace`),U(W,K,nL,``,`\\nobreak`),U(W,K,nL,``,`\\allowbreak`),U(W,K,tL,`,`,`,`),U(W,K,tL,`;`,`;`),U(W,q,YI,`⊼`,`\\barwedge`,!0),U(W,q,YI,`⊻`,`\\veebar`,!0),U(W,K,YI,`⊙`,`\\odot`,!0),U(W,K,YI,`⊕`,`\\oplus`,!0),U(W,K,YI,`⊗`,`\\otimes`,!0),U(W,K,Y,`∂`,`\\partial`,!0),U(W,K,YI,`⊘`,`\\oslash`,!0),U(W,q,YI,`⊚`,`\\circledcirc`,!0),U(W,q,YI,`⊡`,`\\boxdot`,!0),U(W,K,YI,`△`,`\\bigtriangleup`),U(W,K,YI,`▽`,`\\bigtriangledown`),U(W,K,YI,`†`,`\\dagger`),U(W,K,YI,`⋄`,`\\diamond`),U(W,K,YI,`⋆`,`\\star`),U(W,K,YI,`◃`,`\\triangleleft`),U(W,K,YI,`▹`,`\\triangleright`),U(W,K,eL,`{`,`\\{`),U(G,K,Y,`{`,`\\{`),U(G,K,Y,`{`,`\\textbraceleft`),U(W,K,XI,`}`,`\\}`),U(G,K,Y,`}`,`\\}`),U(G,K,Y,`}`,`\\textbraceright`),U(W,K,eL,`{`,`\\lbrace`),U(W,K,XI,`}`,`\\rbrace`),U(W,K,eL,`[`,`\\lbrack`,!0),U(G,K,Y,`[`,`\\lbrack`,!0),U(W,K,XI,`]`,`\\rbrack`,!0),U(G,K,Y,`]`,`\\rbrack`,!0),U(W,K,eL,`(`,`\\lparen`,!0),U(W,K,XI,`)`,`\\rparen`,!0),U(G,K,Y,`<`,`\\textless`,!0),U(G,K,Y,`>`,`\\textgreater`,!0),U(W,K,eL,`⌊`,`\\lfloor`,!0),U(W,K,XI,`⌋`,`\\rfloor`,!0),U(W,K,eL,`⌈`,`\\lceil`,!0),U(W,K,XI,`⌉`,`\\rceil`,!0),U(W,K,Y,`\\`,`\\backslash`),U(W,K,Y,`∣`,`|`),U(W,K,Y,`∣`,`\\vert`),U(G,K,Y,`|`,`\\textbar`,!0),U(W,K,Y,`∥`,`\\|`),U(W,K,Y,`∥`,`\\Vert`),U(G,K,Y,`∥`,`\\textbardbl`),U(G,K,Y,`~`,`\\textasciitilde`),U(G,K,Y,`\\`,`\\textbackslash`),U(G,K,Y,`^`,`\\textasciicircum`),U(W,K,J,`↑`,`\\uparrow`,!0),U(W,K,J,`⇑`,`\\Uparrow`,!0),U(W,K,J,`↓`,`\\downarrow`,!0),U(W,K,J,`⇓`,`\\Downarrow`,!0),U(W,K,J,`↕`,`\\updownarrow`,!0),U(W,K,J,`⇕`,`\\Updownarrow`,!0),U(W,K,$I,`∐`,`\\coprod`),U(W,K,$I,`⋁`,`\\bigvee`),U(W,K,$I,`⋀`,`\\bigwedge`),U(W,K,$I,`⨄`,`\\biguplus`),U(W,K,$I,`⋂`,`\\bigcap`),U(W,K,$I,`⋃`,`\\bigcup`),U(W,K,$I,`∫`,`\\int`),U(W,K,$I,`∫`,`\\intop`),U(W,K,$I,`∬`,`\\iint`),U(W,K,$I,`∭`,`\\iiint`),U(W,K,$I,`∏`,`\\prod`),U(W,K,$I,`∑`,`\\sum`),U(W,K,$I,`⨂`,`\\bigotimes`),U(W,K,$I,`⨁`,`\\bigoplus`),U(W,K,$I,`⨀`,`\\bigodot`),U(W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,JI,`˚`,`\\r`),U(G,K,JI,`ˇ`,`\\v`),U(G,K,JI,`¨`,`\\"`),U(G,K,JI,`˝`,`\\H`),U(G,K,JI,`◯`,`\\textcircled`);var rL={"--":!0,"---":!0,"``":!0,"''":!0};U(G,K,Y,`–`,`--`,!0),U(G,K,Y,`–`,`\\textendash`),U(G,K,Y,`—`,`---`,!0),U(G,K,Y,`—`,`\\textemdash`),U(G,K,Y,`‘`,"`",!0),U(G,K,Y,`‘`,`\\textquoteleft`),U(G,K,Y,`’`,`'`,!0),U(G,K,Y,`’`,`\\textquoteright`),U(G,K,Y,`“`,"``",!0),U(G,K,Y,`“`,`\\textquotedblleft`),U(G,K,Y,`”`,`''`,!0),U(G,K,Y,`”`,`\\textquotedblright`),U(W,K,Y,`°`,`\\degree`,!0),U(G,K,Y,`°`,`\\degree`),U(G,K,Y,`°`,`\\textdegree`,!0),U(W,K,Y,`£`,`\\pounds`),U(W,K,Y,`£`,`\\mathsterling`,!0),U(G,K,Y,`£`,`\\pounds`),U(G,K,Y,`£`,`\\textsterling`,!0),U(W,q,Y,`✠`,`\\maltese`),U(G,q,Y,`✠`,`\\maltese`);for(var iL=`0123456789/@."`,aL=0;aL<iL.length;aL++){var oL=iL.charAt(aL);U(W,K,Y,oL,oL)}for(var sL=`0123456789!@*()-=+";:?/.,`,cL=0;cL<sL.length;cL++){var lL=sL.charAt(cL);U(G,K,Y,lL,lL)}for(var uL=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,dL=0;dL<uL.length;dL++){var fL=uL.charAt(dL);U(W,K,QI,fL,fL),U(G,K,Y,fL,fL)}U(W,q,Y,`C`,`ℂ`),U(G,q,Y,`C`,`ℂ`),U(W,q,Y,`H`,`ℍ`),U(G,q,Y,`H`,`ℍ`),U(W,q,Y,`N`,`ℕ`),U(G,q,Y,`N`,`ℕ`),U(W,q,Y,`P`,`ℙ`),U(G,q,Y,`P`,`ℙ`),U(W,q,Y,`Q`,`ℚ`),U(G,q,Y,`Q`,`ℚ`),U(W,q,Y,`R`,`ℝ`),U(G,q,Y,`R`,`ℝ`),U(W,q,Y,`Z`,`ℤ`),U(G,q,Y,`Z`,`ℤ`),U(W,K,QI,`h`,`ℎ`),U(G,K,QI,`h`,`ℎ`);for(var pL,mL=0;mL<uL.length;mL++){var hL=uL.charAt(mL);pL=String.fromCharCode(55349,56320+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),pL=String.fromCharCode(55349,56372+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),pL=String.fromCharCode(55349,56424+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),pL=String.fromCharCode(55349,56580+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),pL=String.fromCharCode(55349,56684+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),pL=String.fromCharCode(55349,56736+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),pL=String.fromCharCode(55349,56788+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),pL=String.fromCharCode(55349,56840+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),pL=String.fromCharCode(55349,56944+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),mL<26&&(pL=String.fromCharCode(55349,56632+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL),pL=String.fromCharCode(55349,56476+mL),U(W,K,QI,hL,pL),U(G,K,Y,hL,pL))}pL=String.fromCharCode(55349,56668),U(W,K,QI,`k`,pL),U(G,K,Y,`k`,pL);for(var gL=0;gL<10;gL++){var _L=gL.toString();pL=String.fromCharCode(55349,57294+gL),U(W,K,QI,_L,pL),U(G,K,Y,_L,pL),pL=String.fromCharCode(55349,57314+gL),U(W,K,QI,_L,pL),U(G,K,Y,_L,pL),pL=String.fromCharCode(55349,57324+gL),U(W,K,QI,_L,pL),U(G,K,Y,_L,pL),pL=String.fromCharCode(55349,57334+gL),U(W,K,QI,_L,pL),U(G,K,Y,_L,pL)}for(var vL=`ÐÞþ`,yL=0;yL<vL.length;yL++){var bL=vL.charAt(yL);U(W,K,QI,bL,bL),U(G,K,Y,bL,bL)}var xL={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},SL={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},CL={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},tie={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},wL={mathClass:``,textClass:``,font:``},TL={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},EL={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},DL={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},OL={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},kL={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},AL={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},jL={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},ML=[xL,xL,SL,SL,CL,CL,tie,wL,wL,wL,TL,TL,EL,EL,DL,DL,OL,OL,kL,kL,AL,AL,wL,wL,jL,jL],nie=[xL,wL,OL,kL,jL],rie=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return ML[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return nie[Math.floor((r-120782)/10)];if(r===120485||r===120486)return ML[0];if(120486<r&&r<120782)return wL;throw new V(`Unsupported character: `+e)},NL=function(e,t,n){if(qI[n][e]){var r=qI[n][e].replace;r&&(e=r)}return{value:e,metrics:GI(e,t,n)}},PL=function(e,t,n,r,i){var a=NL(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new RI(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new RI(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},FL=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&NL(e,`Main-Bold`,t).metrics?PL(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||qI[t][e].font===`main`?PL(e,`Main-Regular`,t,n,r):PL(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},iie=function(e,t,n){return n!==`textord`&&NL(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},IL=function(e,t,n){var r=e.mode,i=e.text,a=[`mord`],{font:o,fontFamily:s,fontWeight:c,fontShape:l}=t,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=rie(i);f=m.font,p=m[r+`Class`]}if(f)return PL(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=iie(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=qL[o].fontName,g=[o]):(h=KL(s,c,l),g=[s,c,l]);if(NL(i,h,r).metrics)return PL(i,h,r,t,a.concat(g));if(rL.hasOwnProperty(i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(PL(i[y],h,r,t,a.concat(g)));return VL(v)}}if(n===`mathord`)return PL(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=qI[r][i]&&qI[r][i].font;if(b===`ams`)return PL(i,KL(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return PL(i,KL(`textrm`,c,l),r,t,a.concat(c,l));var x=KL(b,c,l);return PL(i,x,r,t,a.concat(x,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},aie=(e,t)=>{if(jI(e.classes)!==jI(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},LL=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof RI&&r instanceof RI&&aie(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},RL=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},X=function(e,t,n,r){var i=new II(e,t,n,r);return RL(i),i},zL=(e,t,n,r)=>new II(e,t,n,r),BL=function(e,t,n){var r=X([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=H(r.height),r.maxFontSize=1,r},oie=function(e,t,n,r){var i=new LI(e,t,n,r);return RL(i),i},VL=function(e){var t=new DI(e);return RL(t),t},HL=function(e,t){return e instanceof DI?X([],[e],t):e},UL=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},WL=function(e,t){for(var{children:n,depth:r}=UL(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var c=X([`pstrut`],[]);c.style.height=H(i);for(var l=[],u=r,d=r,f=r,p=0;p<n.length;p++){var m=n[p];if(m.type===`kern`)f+=m.size;else{var h=m.elem,g=m.wrapperClasses||[],_=m.wrapperStyle||{},v=X(g,[c,h],void 0,_);v.style.top=H(-i-f-h.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),l.push(v),f+=h.height+h.depth}u=Math.min(u,f),d=Math.max(d,f)}var y=X([`vlist`],l);y.style.height=H(d);var b;if(u<0){var x=X([`vlist`],[X([],[])]);x.style.height=H(-u),b=[X([`vlist-r`],[y,X([`vlist-s`],[new RI(``)])]),X([`vlist-r`],[x])]}else b=[X([`vlist-r`],[y])];var S=X([`vlist-t`],b);return b.length===2&&S.classes.push(`vlist-t2`),S.height=d,S.depth=-u,S},GL=(e,t)=>{var n=X([`mspace`],[],t),r=AI(e,t);return n.style.marginRight=H(r),n},KL=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},qL={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},JL={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},YL=function(e,t){var[n,r,i]=JL[e],a=zL([`overlay`],[new zI([new BI(n)],{width:H(r),height:H(i),style:`width:`+H(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=H(i),a.style.width=H(r),a},XL={number:3,unit:`mu`},ZL={number:4,unit:`mu`},QL={number:5,unit:`mu`},$L={mord:{mop:XL,mbin:ZL,mrel:QL,minner:XL},mop:{mord:XL,mop:XL,mrel:QL,minner:XL},mbin:{mord:ZL,mop:ZL,mopen:ZL,minner:ZL},mrel:{mord:QL,mop:QL,mopen:QL,minner:QL},mopen:{},mclose:{mop:XL,mbin:ZL,mrel:QL,minner:XL},mpunct:{mord:XL,mop:XL,mrel:QL,mopen:XL,mclose:XL,mpunct:XL,minner:XL},minner:{mord:XL,mop:XL,mbin:ZL,mrel:QL,mopen:XL,mpunct:XL,minner:XL}},eR={mord:{mop:XL},mop:{mord:XL,mop:XL},mbin:{},mrel:{},mopen:{},mclose:{mop:XL},mpunct:{},minner:{mop:XL}},tR={},nR={},rR={};function iR(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c<n.length;++c)tR[n[c]]=s;t&&(a&&(nR[t]=a),o&&(rR[t]=o))}function aR(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;iR({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}var oR=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},sR=function(e){return e.type===`ordgroup`?e.body:[e]},cR=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),lR=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),uR={display:bI.DISPLAY,text:bI.TEXT,script:bI.SCRIPT,scriptscript:bI.SCRIPTSCRIPT},dR={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},fR=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=vR(e[a],t);if(o instanceof DI){var s=o.children;i.push(...s)}else i.push(o)}if(LL(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(uR[l.style]))}var u=X([r[0]||`leftmost`],[],t),d=X([r[1]||`rightmost`],[],t),f=n===`root`;return pR(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&lR.has(r)?t.classes[0]=`mord`:r===`mbin`&&cR.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),pR(i,(e,t)=>{var n=gR(t),r=gR(e),i=n&&r?e.hasClass(`mtight`)?eR[n]?.[r]:$L[n]?.[r]:null;if(i)return GL(i,c)},{node:u},d,f),i},pR=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=mR(o);if(s)pR(s.children,t,n,null,i);else{var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`newline`)&&(n.node=X([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}}r&&e.pop()},mR=function(e){return e instanceof DI||e instanceof LI||e instanceof II&&e.hasClass(`enclosing`)?e:null},hR=function(e,t){var n=mR(e);if(n){var r=n.children;if(r.length){if(t===`right`)return hR(r[r.length-1],`right`);if(t===`left`)return hR(r[0],`left`)}}return e},gR=function(e,t){return e?(t&&(e=hR(e,t)),dR[e.classes[0]]||null):null},_R=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return X(t.concat(n))},vR=function(e,t,n){if(!e)return X();if(nR[e.type]){var r=nR[e.type](e,t);if(n&&t.size!==n.size){r=X(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new V(`Got group of unknown type: '`+e.type+`'`)};function yR(e,t){var n=X([`base`],e,t),r=X([`strut`]);return r.style.height=H(n.height+n.depth),n.depth&&(r.style.verticalAlign=H(-n.depth)),n.children.unshift(r),n}function bR(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=fR(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(yR(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(yR(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(yR(o,t));var l;n?(l=yR(fR(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=X([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=H(u.height+u.depth),u.depth&&(d.style.verticalAlign=H(-u.depth))}return u}function xR(e){return new DI(e)}var Z=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=jI(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof SR&&this.children[n+1]instanceof SR){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof SR;)r+=this.children[++n].toText();e.appendChild(new SR(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=` `+t+`="`,e+=aI(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+aI(jI(this.classes))+`"`),e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},SR=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return aI(this.toText())}toText(){return this.text}},CR=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?` `:e>=-.05556&&e<=-.05555?` `:e>=-.1667&&e<=-.1666?` `:e>=-.2223&&e<=-.2222?` `:e>=-.2778&&e<=-.2777?` `:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,H(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+H(this.width)+`"/>`}toText(){return this.character?this.character:` `}},wR=new Set([`\\imath`,`\\jmath`]),TR=new Set([`mrow`,`mtable`]),ER=function(e,t,n){return qI[t][e]&&qI[t][e].replace&&e.charCodeAt(0)!==55349&&!(rL.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=qI[t][e].replace),new SR(e)},DR=function(e){return e.length===1?e[0]:new Z(`mrow`,e)},OR={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},kR=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=OR[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(wR.has(a))return null;if(qI[r][a]){var o=qI[r][a].replace;o&&(a=o)}var s=qL[n].fontName;return GI(a,s,r)?qL[n].variant:null};function AR(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof SR&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof SR&&n.text===`,`}return!1}var jR=function(e,t,n){if(e.length===1){var r=NR(e[0],t);return n&&r instanceof Z&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=NR(e[o],t);if(s instanceof Z&&a instanceof Z){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)||s.type===`mn`&&a.type===`mn`||AR(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&AR(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||AR(a))){var c=s.children[0];c instanceof Z&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof SR&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof SR&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},MR=function(e,t,n){return DR(jR(e,t,n))},NR=function(e,t){if(!e)return new Z(`mrow`);if(rR[e.type])return rR[e.type](e,t);throw new V(`Got group of unknown type: '`+e.type+`'`)};function PR(e,t,n,r,i){var a=jR(e,n),o=a.length===1&&a[0]instanceof Z&&TR.has(a[0].type)?a[0]:new Z(`mrow`,a),s=new Z(`annotation`,[new SR(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Z(`math`,[new Z(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),X([i?`katex`:`katex-mathml`],[c])}var FR=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],IR=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],LR=function(e,t){return t.size<2?e:FR[e-1][t.size-1]},RR=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=IR[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:LR(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:IR[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=LR(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=eie(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};RR.BASESIZE=6;var zR=function(e){return new RR({style:e.displayMode?bI.DISPLAY:bI.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},BR=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=X(n,[e])}return e},VR=function(e,t,n){var r=zR(n),i;return n.output===`mathml`?PR(e,t,r,n.displayMode,!0):(i=n.output===`html`?X([`katex`],[bR(e,r)]):X([`katex`],[PR(e,t,r,n.displayMode,!1),bR(e,r)]),BR(i,n))},HR=function(e,t,n){return BR(X([`katex`],[bR(e,zR(n))]),n)},UR={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},WR=function(e){var t=new Z(`mo`,[new SR(UR[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},GR={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},KR=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),qR=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(KR.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:zL([],[new zI([new BI(o)],{width:`100%`,height:H(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=GR[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var[d,f,p]=u,m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
|
|
494
|
+
`+h+` children.`);for(var v=0;v<h;v++){var y=new zI([new BI(d[v])],{width:`400em`,height:H(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=zL([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=H(m),l.push(b)}return{span:X([`stretchy`],l,t),minWidth:f,height:m}}var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=H(a),i>0&&(r.style.minWidth=H(i)),r},JR=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=X([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new VI({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new VI({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=zL([],[new zI(c,{width:`100%`,height:H(o)})],i)}return a.height=o,a.style.height=H(o),a},YR={bin:1,close:1,inner:1,open:1,punct:1,rel:1},XR={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function ZR(e){return e in YR}function QR(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function $R(e){var t=ez(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function ez(e){return e&&(e.type===`atom`||XR.hasOwnProperty(e.type))?e:null}var tz=e=>{if(e instanceof RI)return e;if(Qre(e)&&e.children.length===1)return tz(e.children[0])},nz=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=QR(e.base,`accent`),n=r.base,e.base=n,i=Zre(vR(e,t)),e.base=r):(r=QR(e,`accent`),n=r.base);var a=vR(n,t.havingCrampedStyle()),o=r.isShifty&&sI(n),s=0;o&&(s=tz(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=qR(r,t),u=WL({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+H(2*s)+`)`,marginLeft:H(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=YL(`vec`,t),f=JL.vec[1]):(d=IL({type:`textord`,mode:r.mode,text:r.label},t,`textord`),d=Xre(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=X([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=H(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=WL({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=X([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},rz=(e,t)=>{var n=e.isStretchy?WR(e.label):new Z(`mo`,[ER(e.label,e.mode)]),r=new Z(`mover`,[NR(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},iz=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));iR({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=oR(t[0]),r=!iz.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:nz,mathmlBuilder:rz}),iR({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:nz,mathmlBuilder:rz}),iR({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=vR(e.base,t),r=qR(e,t),i=e.label===`\\utilde`?.12:0;return X([`mord`,`accentunder`],[WL({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=WR(e.label),r=new Z(`munder`,[NR(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var az=e=>{var t=new Z(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};iR({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=HL(vR(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=HL(vR(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=qR(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=WL({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=WL({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return X([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=WR(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=az(NR(e.body,t));r=e.below?new Z(`munderover`,[n,az(NR(e.below,t)),i]):new Z(`mover`,[n,i])}else e.below?r=new Z(`munder`,[n,az(NR(e.below,t))]):(r=az(),r=new Z(`mover`,[n,r]));return r}});function oz(e,t){var n=fR(e.body,t,!0);return X([e.mclass],n,t)}function sz(e,t){var n,r=jR(e.body,t);return e.mclass===`minner`?n=new Z(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Z(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Z(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}iR({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:sR(i),isCharacterBox:sI(i)}},htmlBuilder:oz,mathmlBuilder:sz});var cz=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};iR({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:cz(t[0]),body:sR(t[1]),isCharacterBox:sI(t[1])}}}),iR({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:cz(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:sR(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:sI(c)}},htmlBuilder:oz,mathmlBuilder:sz}),iR({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:cz(t[0]),body:sR(t[0])}},htmlBuilder(e,t){var n=fR(e.body,t,!0),r=X([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new Z(`mstyle`,jR(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var lz={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},uz=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),dz=e=>e.type===`textord`&&e.text===`@`,fz=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function pz(e,t,n){var r=lz[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function mz(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new V(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=uz(),c=0;c<o.length;c++)if(!dz(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=$R(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l)){if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(fz(o[p],l)){f=!1,c=p;break}if(dz(o[p]))throw new V(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new V(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new V(`Expected one of "<>AV=|." after @`,o[c])}var m={type:`styling`,body:[pz(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=uz()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}iR({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=HL(vR(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=H(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Z(`mrow`,[NR(e.label,t)]);return n=new Z(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Z(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),iR({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=HL(vR(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Z(`mrow`,[NR(e.fragment,t)])}}),iR({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=QR(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=QR(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new V(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new V(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var hz=(e,t)=>VL(fR(e.body,t.withColor(e.color),!1)),gz=(e,t)=>{var n=new Z(`mstyle`,jR(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};iR({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=QR(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:sR(i)}},htmlBuilder:hz,mathmlBuilder:gz}),iR({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=QR(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:hz,mathmlBuilder:gz}),iR({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&QR(i,`size`).value}},htmlBuilder(e,t){var n=X([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=H(AI(e.size,t)))),n},mathmlBuilder(e,t){var n=new Z(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,H(AI(e.size,t)))),n}});var _z={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},vz=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new V(`Expected a control sequence`,e);return t},yz=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},bz=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};iR({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(_z[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=_z[r.text]),QR(t.parseFunction(),`internal`);throw new V(`Invalid token after macro prefix`,r)}}),iR({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new V(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new V(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new V(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new V(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===_z[n]),{type:`internal`,mode:t.mode}}}),iR({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=vz(t.gullet.popToken());return t.gullet.consumeSpaces(),bz(t,r,yz(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),iR({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=vz(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return bz(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var xz=function(e,t,n){var r=GI(qI.math[e]&&qI.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},Sz=function(e,t,n,r){var i=n.havingBaseStyle(t),a=X(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},Cz=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=H(i),e.height-=i,e.depth+=i},wz=function(e,t,n,r,i,a){var o=Sz(PL(e,`Main-Regular`,i,r),t,r,a);return n&&Cz(o,r,t),o},Tz=function(e,t,n,r){return PL(e,`Size`+t+`-Regular`,n,r)},Ez=function(e,t,n,r,i,a){var o=Tz(e,t,i,r),s=Sz(X([`delimsizing`,`size`+t],[o],r),bI.TEXT,r,a);return n&&Cz(s,r,bI.TEXT),s},Dz=function(e,t,n){return{type:`elem`,elem:X([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[X([],[PL(e,t,n)])])}},Oz=function(e,t,n){var r=HI[`Size4-Regular`][e.charCodeAt(0)]?HI[`Size4-Regular`][e.charCodeAt(0)][4]:HI[`Size1-Regular`][e.charCodeAt(0)][4],i=zL([],[new zI([new BI(`inner`,Ure(e,Math.round(1e3*t)))],{width:H(r),height:H(t),style:`width:`+H(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=H(t),i.style.width=H(r),{type:`elem`,elem:i}},kz=.008,Az={type:`kern`,size:-1*kz},jz=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),Mz=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),Nz=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):jz.has(e)?(c=`∣`,u=`vert`,d=333):Mz.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=xz(o,f,i),m=p.height+p.depth,h=xz(c,f,i),g=h.height+h.depth,_=xz(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=xz(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,E=[];if(u.length>0){var D=C-m-v,O=Math.round(C*1e3),k=Wre(u,Math.round(D*1e3)),ee=new BI(u,k),te=H(d/1e3),ne=H(O/1e3),re=zL([],[new zI([ee],{width:te,height:ne,viewBox:`0 0 `+d+` `+O})],r);re.height=O/1e3,re.style.width=te,re.style.height=ne,E.push({type:`elem`,elem:re})}else{if(E.push(Dz(l,f,i)),E.push(Az),s===null){var ie=C-m-v+2*kz;E.push(Oz(c,ie,r))}else{var ae=(C-m-v-y)/2+2*kz;E.push(Oz(c,ae,r)),E.push(Az),E.push(Dz(s,f,i)),E.push(Az),E.push(Oz(c,ae,r))}E.push(Az),E.push(Dz(o,f,i))}var A=r.havingBaseStyle(bI.TEXT);return Sz(X([`delimsizing`,`mult`],[WL({positionType:`bottom`,positionData:T,children:E})],A),bI.TEXT,r,a)},Pz=80,Fz=.08,Iz=function(e,t,n,r,i){return zL([`hide-tail`],[new zI([new BI(e,Hre(e,r,n))],{width:`400em`,height:H(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Lz=function(e,t){var n=t.havingBaseSizing(),r=qz(`\\surd`,e*n.sizeMultiplier,Gz,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+Pz,e<1?i=1:e<1.4&&(i=.7),s=(1+a+Fz)/i,c=(1+a)/i,o=Iz(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+Pz)*Vz[r.size],c=(Vz[r.size]+a)/i,s=(Vz[r.size]+a+Fz)/i,o=Iz(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+Fz,c=e+a,l=Math.floor(1e3*e+a)+Pz,o=Iz(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=H(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},Rz=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),zz=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Bz=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),Vz=[0,1.2,1.8,2.4,3],Hz=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),Rz.has(e)||Bz.has(e))return Ez(e,t,!1,n,r,i);if(zz.has(e))return Nz(e,Vz[t],!1,n,r,i);throw new V(`Illegal delimiter: '`+e+`'`)},Uz=[{type:`small`,style:bI.SCRIPTSCRIPT},{type:`small`,style:bI.SCRIPT},{type:`small`,style:bI.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Wz=[{type:`small`,style:bI.SCRIPTSCRIPT},{type:`small`,style:bI.SCRIPT},{type:`small`,style:bI.TEXT},{type:`stack`}],Gz=[{type:`small`,style:bI.SCRIPTSCRIPT},{type:`small`,style:bI.SCRIPT},{type:`small`,style:bI.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Kz=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},qz=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=xz(e,Kz(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},Jz=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=Bz.has(e)?Uz:Rz.has(e)?Gz:Wz,s=qz(e,t,o,r);return s.type===`small`?wz(e,s.style,n,r,i,a):s.type===`large`?Ez(e,s.size,n,r,i,a):Nz(e,t,n,r,i,a)},Yz=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return Jz(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},Xz={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},Zz=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function Qz(e){return`isMiddle`in e}function $z(e,t){var n=ez(e);if(n&&Zz.has(n.text))return n;throw n?new V(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new V(`Invalid delimiter type '`+e.type+`'`,e)}iR({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=$z(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:Xz[e.funcName].size,mclass:Xz[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?X([e.mclass]):Hz(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(ER(e.delim,e.mode));var n=new Z(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=H(Vz[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function eB(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}iR({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new V(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:$z(t[0],e).text,color:n}}}),iR({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=$z(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=QR(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{eB(e);for(var n=fR(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];Qz(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?_R(t,[`mopen`]):Yz(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(Qz(u)){var d=u.isMiddle;n[l]=Yz(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=_R(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=Yz(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),X([`minner`],n,t)},mathmlBuilder:(e,t)=>{eB(e);var n=jR(e.body,t);if(e.left!==`.`){var r=new Z(`mo`,[ER(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Z(`mo`,[ER(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return DR(n)}}),iR({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=$z(t[0],e);if(!e.parser.leftrightDepth)throw new V(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=_R(t,[]):(n=Hz(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new Z(`mo`,[e.delim===`\\vert`||e.delim===`|`?ER(`|`,`text`):ER(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var tB=(e,t)=>{var n=HL(vR(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=sI(e.body);if(r===`sout`)a=X([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=AI({number:.6,unit:`pt`},t),l=AI({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=H(d/2+c);var f=Math.floor(1e3*d*i);a=zL([`hide-tail`],[new zI([new BI(`phase`,Bre(f))],{width:`400em`,height:H(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=H(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=JR(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=H(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=H(h),a.style.borderRightWidth=H(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=WL({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=WL({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?X([`mord`,`cancel-lap`],[g],t):X([`mord`],[g],t)},nB=(e,t)=>{var n,r=new Z(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[NR(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+H(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};iR({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=QR(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:tB,mathmlBuilder:nB}),iR({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=QR(t[0],`color-token`).color,o=QR(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:tB,mathmlBuilder:nB}),iR({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),iR({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:tB,mathmlBuilder:nB}),iR({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:tB,mathmlBuilder:nB}),iR({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var rB={};function iB(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)rB[n[c]]=s;a&&(nR[t]=a),o&&(rR[t]=o)}var aB={};function Q(e,t){aB[e]=t}var oB=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},sB=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,oB.range(this,t))}};function cB(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var lB=e=>{if(!e.parser.settings.displayMode)throw new V(`{`+e.envName+`} can be used only in display mode.`)},uB=new Set([`gather`,`gather*`]);function dB(e){if(!e.includes(`ed`))return!e.includes(`*`)}function fB(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new V(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new sB(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(cB(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new V(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(cB(e)),m=[],h.push(m),y()}else throw new V(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function pB(e){return e.slice(0,1)===`d`?`display`:`text`}var mB=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(bI.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?AI({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=vR(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var w=e.rowGaps[n],T=0;w&&(T=AI(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var E=_/2+t.fontMetrics().axisHeight,D=e.cols||[],O=[],k,ee,te=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ne=s[n],re=ne.pos-E,ie=e.tags[n],ae=void 0;ae=ie===!0?X([`eqn-num`],[],t):ie===!1?X([],[],t):X([],fR(ie,t,!0),t),ae.depth=ne.depth,ae.height=ne.height,te.push({type:`elem`,elem:ae,shift:re})}for(r=0,ee=0;r<o||ee<D.length;++r,++ee){for(var A=D[ee],oe=!0;(se=A)?.type===`separator`;){var se;if(oe||(k=X([`arraycolsep`],[]),k.style.width=H(t.fontMetrics().doubleRuleSep),O.push(k)),A.separator===`|`||A.separator===`:`){var ce=A.separator===`|`?`solid`:`dashed`,le=X([`vertical-separator`],[],t);le.style.height=H(_),le.style.borderRightWidth=H(l),le.style.borderRightStyle=ce,le.style.margin=`0 `+H(-l/2);var ue=_-E;ue&&(le.style.verticalAlign=H(-ue)),O.push(le)}else throw new V(`Invalid separator type: `+A.separator);ee++,A=D[ee],oe=!1}if(!(r>=o)){var de=void 0;(r>0||e.hskipBeforeAndAfter)&&(de=A?.pregap??d,de!==0&&(k=X([`arraycolsep`],[]),k.style.width=H(de),O.push(k)));var fe=[];for(n=0;n<i;++n){var pe=s[n],me=pe.cells[r];if(me){var he=pe.pos-E;me.depth=pe.depth,me.height=pe.height,fe.push({type:`elem`,elem:me,shift:he})}}var ge=WL({positionType:`individualShift`,children:fe}),_e=X([`col-align-`+(A?.align||`c`)],[ge]);O.push(_e),(r<o-1||e.hskipBeforeAndAfter)&&(de=A?.postgap??d,de!==0&&(k=X([`arraycolsep`],[]),k.style.width=H(de),O.push(k)))}}var ve=X([`mtable`],O);if(c.length>0){for(var ye=BL(`hline`,t,l),be=BL(`hdashline`,t,l),xe=[{type:`elem`,elem:ve,shift:0}];c.length>0;){var Se=c.pop(),Ce=Se.pos-E;Se.isDashed?xe.push({type:`elem`,elem:be,shift:Ce}):xe.push({type:`elem`,elem:ye,shift:Ce})}ve=WL({positionType:`individualShift`,children:xe})}if(te.length===0)return X([`mord`],[ve],t);var we=X([`tag`],[WL({positionType:`individualShift`,children:te})],t);return VL([ve,we])},hB={c:`center `,l:`left `,r:`right `},gB=function(e,t){for(var n=[],r=new Z(`mtd`,[],[`mtr-glue`]),i=new Z(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new Z(`mtd`,[NR(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new Z(`mtr`,s))}var l=new Z(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,H(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=hB[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new Z(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new Z(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},_B=function(e,t){e.envName.includes(`ed`)||lB(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=fB(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:dB(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u<t[0].body.length;u++){var d=QR(t[0].body[u],`textord`);l+=d.text}o=Number(l),s=o*2}var f=!s;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)QR(QR(e[t],`styling`).body[0],`ordgroup`).body.unshift(c);if(f)s<e.length&&(s=e.length);else{var n=e.length/2;if(o<n)throw new V(`Too many math in a row: `+(`expected `+o+`, but got `+n),e[0])}});for(var p=0;p<s;++p){var m=`r`,h=0;p%2==1?m=`l`:p>0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};iB({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(ez(t[0])?[t[0]]:QR(t[0],`ordgroup`).body).map(function(e){var t=$R(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new V(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return fB(e.parser,r,pB(e.envName))},htmlBuilder:mB,mathmlBuilder:gB}),iB({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new V(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=fB(e.parser,r,pB(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:mB,mathmlBuilder:gB}),iB({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=fB(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:mB,mathmlBuilder:gB}),iB({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(ez(t[0])?[t[0]]:QR(t[0],`ordgroup`).body).map(function(e){var t=$R(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new V(`Unknown column alignment: `+t,e)});if(n.length>1)throw new V(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=fB(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new V(`{subarray} can contain only one column`);return i},htmlBuilder:mB,mathmlBuilder:gB}),iB({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=fB(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},pB(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:mB,mathmlBuilder:gB}),iB({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:_B,htmlBuilder:mB,mathmlBuilder:gB}),iB({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){uB.has(e.envName)&&lB(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:dB(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return fB(e.parser,t,`display`)},htmlBuilder:mB,mathmlBuilder:gB}),iB({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:_B,htmlBuilder:mB,mathmlBuilder:gB}),iB({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){lB(e);var t={autoTag:dB(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return fB(e.parser,t,`display`)},htmlBuilder:mB,mathmlBuilder:gB}),iB({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return lB(e),mz(e.parser)},htmlBuilder:mB,mathmlBuilder:gB}),Q(`\\nonumber`,`\\gdef\\@eqnsw{0}`),Q(`\\notag`,`\\nonumber`),iR({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new V(e.funcName+` valid only within array environment`)}});var vB=rB;iR({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new V(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=QR(i.body[o],`textord`).text;if(r===`\\begin`){if(!vB.hasOwnProperty(a))throw new V(`No such environment: `+a,i);var s=vB[a],{args:c,optArgs:l}=n.parseArguments(`\\begin{`+a+`}`,s),u={mode:n.mode,envName:a,parser:n},d=s.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=QR(n.parseFunction(),`environment`);if(p.name!==a)throw new V(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var yB=(e,t)=>{var n=e.font,r=t.withFont(n);return vR(e.body,r)},bB=(e,t)=>{var n=e.font,r=t.withFont(n);return NR(e.body,r)},xB={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};iR({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=oR(t[0]),a=r;return a in xB&&(a=xB[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:yB,mathmlBuilder:bB}),iR({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:cz(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:sI(r)}}}),iR({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:yB,mathmlBuilder:bB});var SB=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=vR(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=vR(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=AI(e.barSize,t),u=BL(`frac-line`,t,d)):u=BL(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===bI.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=WL({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=WL({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===bI.DISPLAY.size?t.fontMetrics().delim1:n.size===bI.SCRIPTSCRIPT.size?t.havingStyle(bI.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?_R(t,[`mopen`]):Jz(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?X([]):e.rightDelim==null?_R(t,[`mclose`]):Jz(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return X([`mord`].concat(a.sizingClasses(t)),[x,X([`mfrac`],[g]),S],t)},CB=(e,t)=>{var n=new Z(`mfrac`,[NR(e.numer,t),NR(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=AI(e.barSize,t);n.setAttribute(`linethickness`,H(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Z(`mo`,[new SR(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Z(`mo`,[new SR(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return DR(i)}return n},wB=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;iR({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),wB({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:SB,mathmlBuilder:CB}),iR({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var TB=[`display`,`text`,`script`,`scriptscript`],EB=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};iR({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=oR(t[0]),o=a.type===`atom`&&a.family===`open`?EB(a.text):null,s=oR(t[1]),c=s.type===`atom`&&s.family===`close`?EB(s.text):null,l=QR(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=QR(p.body[0],`textord`);f=TB[Number(m.text)]}}else p=QR(p,`textord`),f=TB[Number(p.text)];return wB({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),iR({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:QR(t[0],`size`).value,token:i}}}),iR({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=QR(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var DB=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?vR(e.sup,t.havingStyle(n.sup()),t):vR(e.sub,t.havingStyle(n.sub()),t),i=QR(e.base,`horizBrace`)):i=QR(e,`horizBrace`);var a=vR(i.base,t.havingBaseStyle(bI.DISPLAY)),o=qR(i,t),s=i.isOver?WL({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):WL({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=X([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?WL({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):WL({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return X([`minner`,i.isOver?`mover`:`munder`],[s],t)};iR({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:DB,mathmlBuilder:(e,t)=>{var n=WR(e.label);return new Z(e.isOver?`mover`:`munder`,[NR(e.base,t),n])}}),iR({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=QR(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:sR(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=fR(e.body,t,!1);return oie(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=MR(e.body,t);return n instanceof Z||(n=new Z(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),iR({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=QR(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:sR(s)}}}),iR({type:`hbox`,names:[`\\hbox`],props:{numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:sR(t[0])}},htmlBuilder(e,t){return VL(fR(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new Z(`mrow`,jR(e.body,t.withFont(``)))}}),iR({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],props:{numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=QR(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u<l.length;u++){var d=l[u],f=d.indexOf(`=`);if(f<0)throw new V(`\\htmlData key/value '`+d+`' missing equals sign`);var p=d.slice(0,f),m=d.slice(f+1);c[`data-`+p.trim()]=m}s={command:`\\htmlData`,attributes:c};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:sR(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=fR(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=X(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>MR(e.body,t)}),iR({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:sR(t[0]),mathml:sR(t[1])}},htmlBuilder:(e,t)=>VL(fR(e.html,t,!1)),mathmlBuilder:(e,t)=>MR(e.mathml,t)});var OB=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new V(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!kI(n))throw new V(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};iR({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=QR(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=OB(d);break;case`height`:a=OB(d);break;case`totalheight`:o=OB(d);break;default:throw new V(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=QR(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=AI(e.height,t),r=0;e.totalheight.number>0&&(r=AI(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=AI(e.width,t));var a={height:H(n+r)};i>0&&(a.width=H(i)),r>0&&(a.verticalAlign=H(-r));var o=new Jre(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Z(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=AI(e.height,t),i=0;if(e.totalheight.number>0&&(i=AI(e.totalheight,t)-r,n.setAttribute(`valign`,H(-i))),n.setAttribute(`height`,H(r+i)),e.width.number>0){var a=AI(e.width,t);n.setAttribute(`width`,H(a))}return n.setAttribute(`src`,e.src),n}}),iR({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=QR(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return GL(e.dimension,t)},mathmlBuilder(e,t){return new CR(AI(e.dimension,t))}}),iR({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=X([],[vR(e.body,t)]),n=X([`inner`],[n],t)):n=X([`inner`],[vR(e.body,t)]);var r=X([`fix`],[]),i=X([e.alignment],[n,r],t),a=X([`strut`]);return a.style.height=H(i.height+i.depth),i.depth&&(a.style.verticalAlign=H(-i.depth)),i.children.unshift(a),i=X([`thinbox`],[i],t),X([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Z(`mpadded`,[NR(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),iR({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),iR({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new V(`Mismatched `+e.funcName)}});var kB=(e,t)=>{switch(t.style.size){case bI.DISPLAY.size:return e.display;case bI.TEXT.size:return e.text;case bI.SCRIPT.size:return e.script;case bI.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};iR({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:sR(t[0]),text:sR(t[1]),script:sR(t[2]),scriptscript:sR(t[3])}},htmlBuilder:(e,t)=>VL(fR(kB(e,t),t,!1)),mathmlBuilder:(e,t)=>MR(kB(e,t),t)});var AB=(e,t,n,r,i,a,o)=>{e=X([],[e]);var s=n&&sI(n),c,l;if(t){var u=vR(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=vR(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=WL({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:H(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:H(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=WL({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:H(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=WL({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:H(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=X([`mspace`],[],r);m.style.marginRight=H(a),p.unshift(m)}return X([`mop`,`op-limits`],p,r)},jB=new Set([`\\smallint`]),MB=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=QR(e.base,`op`),i=!0):a=QR(e,`op`);var o=t.style,s=!1;o.size===bI.DISPLAY.size&&a.symbol&&!jB.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=PL(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=YL(d+`Size`+(s?`2`:`1`),t);c=WL({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=fR(a.body,t,!0);p.length===1&&p[0]instanceof RI?(c=p[0],c.classes[0]=`mop`):c=X([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(FL(a.name[h],a.mode,t));c=X([`mop`],m,t)}var g=0,_=0;return(c instanceof RI||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?AB(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=H(g)),c)},NB=(e,t)=>{var n;if(e.symbol)n=new Z(`mo`,[ER(e.name,e.mode)]),jB.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Z(`mo`,jR(e.body,t));else{n=new Z(`mi`,[new SR(e.name.slice(1))]);var r=new Z(`mo`,[ER(``,`text`)]);n=e.parentIsSupSub?new Z(`mrow`,[n,r]):xR([n,r])}return n},PB={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};iR({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=PB[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:MB,mathmlBuilder:NB}),iR({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:sR(r)}},htmlBuilder:MB,mathmlBuilder:NB});var FB={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};iR({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:MB,mathmlBuilder:NB}),iR({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:MB,mathmlBuilder:NB}),iR({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=FB[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:MB,mathmlBuilder:NB});var IB=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=QR(e.base,`operatorname`),i=!0):a=QR(e,`operatorname`);var o;if(a.body.length>0){for(var s=fR(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof RI&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=X([`mop`],s,t)}else o=X([`mop`],[],t);return i?AB(o,n,r,t,t.style,0,0):o};iR({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:sR(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:IB,mathmlBuilder:(e,t)=>{for(var n=jR(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof CR)){if(a instanceof Z)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof SR?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new SR(n.map(e=>e.toText()).join(``))]);var s=new Z(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Z(`mo`,[ER(``,`text`)]);return e.parentIsSupSub?new Z(`mrow`,[s,c]):xR([s,c])}}),Q(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),aR({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?VL(fR(e.body,t,!1)):X([`mord`],fR(e.body,t,!0),t)},mathmlBuilder(e,t){return MR(e.body,t,!0)}}),iR({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=vR(e.body,t.havingCrampedStyle()),r=BL(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`overline`],[WL({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new Z(`mo`,[new SR(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Z(`mover`,[NR(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),iR({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:sR(r)}},htmlBuilder:(e,t)=>VL(fR(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new Z(`mphantom`,jR(e.body,t))}),Q(`\\hphantom`,`\\smash{\\phantom{#1}}`),iR({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>X([`mord`,`rlap`],[X([`inner`],[vR(e.body,t.withPhantom())]),X([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new Z(`mpadded`,[new Z(`mphantom`,jR(sR(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),iR({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=QR(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=vR(e.body,t);return WL({positionType:`shift`,positionData:-AI(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Z(`mpadded`,[NR(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),iR({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),iR({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=QR(t[0],`size`),o=QR(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&QR(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=X([`mord`,`rule`],[],t),r=AI(e.width,t),i=AI(e.height,t),a=e.shift?AI(e.shift,t):0;return n.style.borderRightWidth=H(r),n.style.borderTopWidth=H(i),n.style.bottom=H(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=AI(e.width,t),r=AI(e.height,t),i=e.shift?AI(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Z(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,H(n)),o.setAttribute(`height`,H(r));var s=new Z(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,H(i)):(s.setAttribute(`height`,H(i)),s.setAttribute(`depth`,H(-i))),s.setAttribute(`voffset`,H(i)),s}});function LB(e,t,n){for(var r=fR(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return VL(r)}var RB=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];iR({type:`sizing`,names:RB,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:RB.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return LB(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new Z(`mstyle`,jR(e.body,n));return r.setAttribute(`mathsize`,H(n.sizeMultiplier)),r}}),iR({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&QR(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=$R(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=X([],[vR(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return X([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return X([`mord`],[WL({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new Z(`mpadded`,[NR(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),iR({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=vR(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=HL(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<bI.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=Lz(n.height+n.depth+a+r,t),l=o.height-s;l>n.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=H(c);var d=WL({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(bI.SCRIPTSCRIPT),p=vR(e.index,f,t);return X([`mord`,`sqrt`],[X([`root`],[WL({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}return X([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Z(`mroot`,[NR(n,t),NR(r,t)]):new Z(`msqrt`,[NR(n,t)])}});var zB={display:bI.DISPLAY,text:bI.TEXT,script:bI.SCRIPT,scriptscript:bI.SCRIPTSCRIPT};function BB(e){return e in zB}iR({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!BB(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=zB[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),LB(e.body,r,t)},mathmlBuilder(e,t){var n=zB[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new Z(`mstyle`,jR(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var VB=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===bI.DISPLAY.size||n.alwaysHandleSupSub)?MB:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===bI.DISPLAY.size||n.limits)?IB:null:n.type===`accent`?sI(n.base)?nz:null:n.type===`horizBrace`&&!e.sub===n.isOver?DB:null:null};aR({type:`supsub`,htmlBuilder(e,t){var n=VB(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=vR(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&sI(r);if(i){var p=t.havingStyle(t.style.sup());s=vR(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=vR(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===bI.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=H(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof RI||y)&&(v=H(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=WL({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=WL({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=WL({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return X([gR(o,`right`)||`mord`],[o,X([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[NR(e.base,t)];e.sub&&a.push(NR(e.sub,t)),e.sup&&a.push(NR(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===bI.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===bI.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===bI.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===bI.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===bI.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===bI.DISPLAY)?`munder`:`msub`}return new Z(o,a)}}),aR({type:`atom`,htmlBuilder(e,t){return FL(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Z(`mo`,[ER(e.text,e.mode)]);if(e.family===`bin`){var r=kR(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var HB={mi:`italic`,mn:`normal`,mtext:`normal`};aR({type:`mathord`,htmlBuilder(e,t){return IL(e,t,`mathord`)},mathmlBuilder(e,t){var n=new Z(`mi`,[ER(e.text,e.mode,t)]),r=kR(e,t)||`italic`;return r!==HB[n.type]&&n.setAttribute(`mathvariant`,r),n}}),aR({type:`textord`,htmlBuilder(e,t){return IL(e,t,`textord`)},mathmlBuilder(e,t){var n=ER(e.text,e.mode,t),r=kR(e,t)||`normal`,i=e.mode===`text`?new Z(`mtext`,[n]):/[0-9]/.test(e.text)?new Z(`mn`,[n]):e.text===`\\prime`?new Z(`mo`,[n]):new Z(`mi`,[n]);return r!==HB[i.type]&&i.setAttribute(`mathvariant`,r),i}});var UB={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},WB={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};aR({type:`spacing`,htmlBuilder(e,t){if(WB.hasOwnProperty(e.text)){var n=WB[e.text].className||``;if(e.mode===`text`){var r=IL(e,t,`textord`);return r.classes.push(n),r}return X([`mspace`,n],[FL(e.text,e.mode,t)],t)}if(UB.hasOwnProperty(e.text))return X([`mspace`,UB[e.text]],[],t);throw new V(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(WB.hasOwnProperty(e.text))n=new Z(`mtext`,[new SR(`\xA0`)]);else if(UB.hasOwnProperty(e.text))return new Z(`mspace`);else throw new V(`Unknown type of space "`+e.text+`"`);return n}});var GB=()=>{var e=new Z(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};aR({type:`tag`,mathmlBuilder(e,t){var n=new Z(`mtable`,[new Z(`mtr`,[GB(),new Z(`mtd`,[MR(e.body,t)]),GB(),new Z(`mtd`,[MR(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var KB={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},qB={"\\textbf":`textbf`,"\\textmd":`textmd`},JB={"\\textit":`textit`,"\\textup":`textup`},YB=(e,t)=>{var n=e.font;return n?KB[n]?t.withTextFontFamily(KB[n]):qB[n]?t.withTextFontWeight(qB[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(JB[n]):t};iR({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:sR(i),font:r}},htmlBuilder(e,t){var n=YB(e,t);return X([`mord`,`text`],fR(e.body,n,!0),n)},mathmlBuilder(e,t){var n=YB(e,t);return MR(e.body,n)}}),iR({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=vR(e.body,t),r=BL(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`underline`],[WL({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new Z(`mo`,[new SR(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Z(`munder`,[NR(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),iR({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=vR(e.body,t),r=t.fontMetrics().axisHeight;return WL({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new Z(`mrow`,[new Z(`mpadded`,[NR(e.body,t)],[`vcenter`])])}}),iR({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new V(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=XB(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(PL(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return X([`mord`,`text`].concat(i.sizingClasses(t)),LL(r),i)},mathmlBuilder(e,t){var n=new Z(`mtext`,[new SR(XB(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var XB=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),ZB=tR,QB=`[ \r
|
|
495
|
+
]`,$B=`\\\\[a-zA-Z@]+`,eV=`\\\\[^\ud800-\udfff]`,tV=`(`+$B+`)`+QB+`*`,nV=`\\\\(
|
|
496
|
+
|[ \r ]+
|
|
497
|
+
?)[ \r ]*`,rV=`[̀-ͯ]`,iV=RegExp(rV+`+$`),aV=`(`+QB+`+)|`+(nV+`|`)+`([!-\\[\\]-‧-豈-]`+(rV+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(rV+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+tV)+(`|`+eV+`)`),oV=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(aV,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new sB(`EOF`,new oB(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new V(`Unexpected character: '`+e[t]+`'`,new sB(e[t],new oB(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
|
|
498
|
+
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new sB(r,new oB(this,t,this.tokenRegex.lastIndex))}},sV=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new V(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},cV=aB;Q(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Q(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Q(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Q(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Q(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Q(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),Q(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var lV={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Q(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new V("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=lV[t.text],r==null||r>=n)throw new V(`Invalid base-`+n+` digit `+t.text);for(var i;(i=lV[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var uV=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new V(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new V(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new V(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new V(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};Q(`\\newcommand`,e=>uV(e,!1,!0,!1)),Q(`\\renewcommand`,e=>uV(e,!0,!1,!1)),Q(`\\providecommand`,e=>uV(e,!0,!0,!0)),Q(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),Q(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),Q(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),ZB[n],qI.math[n],qI.text[n]),``}),Q(`\\bgroup`,`{`),Q(`\\egroup`,`}`),Q(`~`,`\\nobreakspace`),Q(`\\lq`,"`"),Q(`\\rq`,`'`),Q(`\\aa`,`\\r a`),Q(`\\AA`,`\\r A`),Q(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),Q(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),Q(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Q(`ℬ`,`\\mathscr{B}`),Q(`ℰ`,`\\mathscr{E}`),Q(`ℱ`,`\\mathscr{F}`),Q(`ℋ`,`\\mathscr{H}`),Q(`ℐ`,`\\mathscr{I}`),Q(`ℒ`,`\\mathscr{L}`),Q(`ℳ`,`\\mathscr{M}`),Q(`ℛ`,`\\mathscr{R}`),Q(`ℭ`,`\\mathfrak{C}`),Q(`ℌ`,`\\mathfrak{H}`),Q(`ℨ`,`\\mathfrak{Z}`),Q(`\\Bbbk`,`\\Bbb{k}`),Q(`\\llap`,`\\mathllap{\\textrm{#1}}`),Q(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),Q(`\\clap`,`\\mathclap{\\textrm{#1}}`),Q(`\\mathstrut`,`\\vphantom{(}`),Q(`\\underbar`,`\\underline{\\text{#1}}`),Q(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),Q(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Q(`\\ne`,`\\neq`),Q(`≠`,`\\neq`),Q(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Q(`∉`,`\\notin`),Q(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Q(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Q(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Q(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Q(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Q(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Q(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Q(`⟂`,`\\perp`),Q(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),Q(`∌`,`\\notni`),Q(`⌜`,`\\ulcorner`),Q(`⌝`,`\\urcorner`),Q(`⌞`,`\\llcorner`),Q(`⌟`,`\\lrcorner`),Q(`©`,`\\copyright`),Q(`®`,`\\textregistered`),Q(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),Q(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),Q(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),Q(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),Q(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),Q(`⋮`,`\\vdots`),Q(`\\varGamma`,`\\mathit{\\Gamma}`),Q(`\\varDelta`,`\\mathit{\\Delta}`),Q(`\\varTheta`,`\\mathit{\\Theta}`),Q(`\\varLambda`,`\\mathit{\\Lambda}`),Q(`\\varXi`,`\\mathit{\\Xi}`),Q(`\\varPi`,`\\mathit{\\Pi}`),Q(`\\varSigma`,`\\mathit{\\Sigma}`),Q(`\\varUpsilon`,`\\mathit{\\Upsilon}`),Q(`\\varPhi`,`\\mathit{\\Phi}`),Q(`\\varPsi`,`\\mathit{\\Psi}`),Q(`\\varOmega`,`\\mathit{\\Omega}`),Q(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),Q(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),Q(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),Q(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),Q(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),Q(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),Q(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),Q(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var dV={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},fV=new Set([`bin`,`rel`]);Q(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in dV?t=dV[n]:(n.slice(0,4)===`\\not`||n in qI.math&&fV.has(qI.math[n].group))&&(t=`\\dotsb`),t});var pV={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Q(`\\dotso`,function(e){return e.future().text in pV?`\\ldots\\,`:`\\ldots`}),Q(`\\dotsc`,function(e){var t=e.future().text;return t in pV&&t!==`,`?`\\ldots\\,`:`\\ldots`}),Q(`\\cdots`,function(e){return e.future().text in pV?`\\@cdots\\,`:`\\@cdots`}),Q(`\\dotsb`,`\\cdots`),Q(`\\dotsm`,`\\cdots`),Q(`\\dotsi`,`\\!\\cdots`),Q(`\\dotsx`,`\\ldots\\,`),Q(`\\DOTSI`,`\\relax`),Q(`\\DOTSB`,`\\relax`),Q(`\\DOTSX`,`\\relax`),Q(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),Q(`\\,`,`\\tmspace+{3mu}{.1667em}`),Q(`\\thinspace`,`\\,`),Q(`\\>`,`\\mskip{4mu}`),Q(`\\:`,`\\tmspace+{4mu}{.2222em}`),Q(`\\medspace`,`\\:`),Q(`\\;`,`\\tmspace+{5mu}{.2777em}`),Q(`\\thickspace`,`\\;`),Q(`\\!`,`\\tmspace-{3mu}{.1667em}`),Q(`\\negthinspace`,`\\!`),Q(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),Q(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),Q(`\\enspace`,`\\kern.5em `),Q(`\\enskip`,`\\hskip.5em\\relax`),Q(`\\quad`,`\\hskip1em\\relax`),Q(`\\qquad`,`\\hskip2em\\relax`),Q(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),Q(`\\tag@paren`,`\\tag@literal{({#1})}`),Q(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new V(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),Q(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),Q(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),Q(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),Q(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),Q(`\\newline`,`\\\\\\relax`),Q(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var mV=H(HI[`Main-Regular`][84][1]-.7*HI[`Main-Regular`][65][1]);Q(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+mV+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),Q(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+mV+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),Q(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),Q(`\\@hspace`,`\\hskip #1\\relax`),Q(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),Q(`\\ordinarycolon`,`:`),Q(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),Q(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),Q(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),Q(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),Q(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),Q(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),Q(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),Q(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),Q(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),Q(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),Q(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),Q(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),Q(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),Q(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),Q(`∷`,`\\dblcolon`),Q(`∹`,`\\eqcolon`),Q(`≔`,`\\coloneqq`),Q(`≕`,`\\eqqcolon`),Q(`⩴`,`\\Coloneqq`),Q(`\\ratio`,`\\vcentcolon`),Q(`\\coloncolon`,`\\dblcolon`),Q(`\\colonequals`,`\\coloneqq`),Q(`\\coloncolonequals`,`\\Coloneqq`),Q(`\\equalscolon`,`\\eqqcolon`),Q(`\\equalscoloncolon`,`\\Eqqcolon`),Q(`\\colonminus`,`\\coloneq`),Q(`\\coloncolonminus`,`\\Coloneq`),Q(`\\minuscolon`,`\\eqcolon`),Q(`\\minuscoloncolon`,`\\Eqcolon`),Q(`\\coloncolonapprox`,`\\Colonapprox`),Q(`\\coloncolonsim`,`\\Colonsim`),Q(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),Q(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),Q(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),Q(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),Q(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Q(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),Q(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),Q(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),Q(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),Q(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),Q(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),Q(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),Q(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),Q(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),Q(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),Q(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),Q(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),Q(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),Q(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),Q(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),Q(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),Q(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),Q(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),Q(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),Q(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),Q(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),Q(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),Q(`\\imath`,`\\html@mathml{\\@imath}{ı}`),Q(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),Q(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Q(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Q(`⟦`,`\\llbracket`),Q(`⟧`,`\\rrbracket`),Q(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Q(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Q(`⦃`,`\\lBrace`),Q(`⦄`,`\\rBrace`),Q(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Q(`⦵`,`\\minuso`),Q(`\\darr`,`\\downarrow`),Q(`\\dArr`,`\\Downarrow`),Q(`\\Darr`,`\\Downarrow`),Q(`\\lang`,`\\langle`),Q(`\\rang`,`\\rangle`),Q(`\\uarr`,`\\uparrow`),Q(`\\uArr`,`\\Uparrow`),Q(`\\Uarr`,`\\Uparrow`),Q(`\\N`,`\\mathbb{N}`),Q(`\\R`,`\\mathbb{R}`),Q(`\\Z`,`\\mathbb{Z}`),Q(`\\alef`,`\\aleph`),Q(`\\alefsym`,`\\aleph`),Q(`\\Alpha`,`\\mathrm{A}`),Q(`\\Beta`,`\\mathrm{B}`),Q(`\\bull`,`\\bullet`),Q(`\\Chi`,`\\mathrm{X}`),Q(`\\clubs`,`\\clubsuit`),Q(`\\cnums`,`\\mathbb{C}`),Q(`\\Complex`,`\\mathbb{C}`),Q(`\\Dagger`,`\\ddagger`),Q(`\\diamonds`,`\\diamondsuit`),Q(`\\empty`,`\\emptyset`),Q(`\\Epsilon`,`\\mathrm{E}`),Q(`\\Eta`,`\\mathrm{H}`),Q(`\\exist`,`\\exists`),Q(`\\harr`,`\\leftrightarrow`),Q(`\\hArr`,`\\Leftrightarrow`),Q(`\\Harr`,`\\Leftrightarrow`),Q(`\\hearts`,`\\heartsuit`),Q(`\\image`,`\\Im`),Q(`\\infin`,`\\infty`),Q(`\\Iota`,`\\mathrm{I}`),Q(`\\isin`,`\\in`),Q(`\\Kappa`,`\\mathrm{K}`),Q(`\\larr`,`\\leftarrow`),Q(`\\lArr`,`\\Leftarrow`),Q(`\\Larr`,`\\Leftarrow`),Q(`\\lrarr`,`\\leftrightarrow`),Q(`\\lrArr`,`\\Leftrightarrow`),Q(`\\Lrarr`,`\\Leftrightarrow`),Q(`\\Mu`,`\\mathrm{M}`),Q(`\\natnums`,`\\mathbb{N}`),Q(`\\Nu`,`\\mathrm{N}`),Q(`\\Omicron`,`\\mathrm{O}`),Q(`\\plusmn`,`\\pm`),Q(`\\rarr`,`\\rightarrow`),Q(`\\rArr`,`\\Rightarrow`),Q(`\\Rarr`,`\\Rightarrow`),Q(`\\real`,`\\Re`),Q(`\\reals`,`\\mathbb{R}`),Q(`\\Reals`,`\\mathbb{R}`),Q(`\\Rho`,`\\mathrm{P}`),Q(`\\sdot`,`\\cdot`),Q(`\\sect`,`\\S`),Q(`\\spades`,`\\spadesuit`),Q(`\\sub`,`\\subset`),Q(`\\sube`,`\\subseteq`),Q(`\\supe`,`\\supseteq`),Q(`\\Tau`,`\\mathrm{T}`),Q(`\\thetasym`,`\\vartheta`),Q(`\\weierp`,`\\wp`),Q(`\\Zeta`,`\\mathrm{Z}`),Q(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),Q(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),Q(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),Q(`\\bra`,`\\mathinner{\\langle{#1}|}`),Q(`\\ket`,`\\mathinner{|{#1}\\rangle}`),Q(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),Q(`\\Bra`,`\\left\\langle#1\\right|`),Q(`\\Ket`,`\\left|#1\\right\\rangle`);var hV=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};Q(`\\bra@ket`,hV(!1)),Q(`\\bra@set`,hV(!0)),Q(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),Q(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),Q(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),Q(`\\angln`,`{\\angl n}`),Q(`\\blue`,`\\textcolor{##6495ed}{#1}`),Q(`\\orange`,`\\textcolor{##ffa500}{#1}`),Q(`\\pink`,`\\textcolor{##ff00af}{#1}`),Q(`\\red`,`\\textcolor{##df0030}{#1}`),Q(`\\green`,`\\textcolor{##28ae7b}{#1}`),Q(`\\gray`,`\\textcolor{gray}{#1}`),Q(`\\purple`,`\\textcolor{##9d38bd}{#1}`),Q(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),Q(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),Q(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),Q(`\\blueD`,`\\textcolor{##11accd}{#1}`),Q(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),Q(`\\tealA`,`\\textcolor{##94fff5}{#1}`),Q(`\\tealB`,`\\textcolor{##26edd5}{#1}`),Q(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),Q(`\\tealD`,`\\textcolor{##01a995}{#1}`),Q(`\\tealE`,`\\textcolor{##208170}{#1}`),Q(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),Q(`\\greenB`,`\\textcolor{##8af281}{#1}`),Q(`\\greenC`,`\\textcolor{##74cf70}{#1}`),Q(`\\greenD`,`\\textcolor{##1fab54}{#1}`),Q(`\\greenE`,`\\textcolor{##0d923f}{#1}`),Q(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),Q(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),Q(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),Q(`\\goldD`,`\\textcolor{##e07d10}{#1}`),Q(`\\goldE`,`\\textcolor{##a75a05}{#1}`),Q(`\\redA`,`\\textcolor{##fca9a9}{#1}`),Q(`\\redB`,`\\textcolor{##ff8482}{#1}`),Q(`\\redC`,`\\textcolor{##f9685d}{#1}`),Q(`\\redD`,`\\textcolor{##e84d39}{#1}`),Q(`\\redE`,`\\textcolor{##bc2612}{#1}`),Q(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),Q(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),Q(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),Q(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),Q(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),Q(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),Q(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),Q(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),Q(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),Q(`\\purpleE`,`\\textcolor{##543b78}{#1}`),Q(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),Q(`\\mintB`,`\\textcolor{##edf2df}{#1}`),Q(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),Q(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),Q(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),Q(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),Q(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),Q(`\\grayE`,`\\textcolor{##babec2}{#1}`),Q(`\\grayF`,`\\textcolor{##888d93}{#1}`),Q(`\\grayG`,`\\textcolor{##626569}{#1}`),Q(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),Q(`\\grayI`,`\\textcolor{##21242c}{#1}`),Q(`\\kaBlue`,`\\textcolor{##314453}{#1}`),Q(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var gV={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},_V=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new sV(cV,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new oV(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new sB(`EOF`,n.loc)),this.pushTokens(r),new sB(``,oB.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new V(`Extra }`,i)}else if(i.text===`EOF`)throw new V(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new V(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new V(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new V(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new V(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new V(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new V(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new sB(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new oV(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||ZB.hasOwnProperty(e)||qI.math.hasOwnProperty(e)||qI.text.hasOwnProperty(e)||gV.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?ZB.hasOwnProperty(e)&&!ZB[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},vV=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,yV=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"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ve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},xV={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},SV=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new _V(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new V(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new sB(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&ZB[i.text]&&ZB[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new V(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new V(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new V(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new V(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new V(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new V(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(yV[i.text]){var s=vV.test(i.text),c=[];for(c.push(new sB(yV[i.text])),this.consume();;){var l=this.fetch().text;if(!yV[l]||vV.test(l)!==s)break;c.unshift(new sB(yV[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n||r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=ZB[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new V(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new V(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new V(`Can't use function '`+r+`' in math mode`,n);var{args:a,optArgs:o}=this.parseArguments(r,i);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=ZB[e];if(o&&o.handler)return o.handler(a,t,n);throw new V(`No function handler for `+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],i=[],a=0;a<n;a++){var o=t.argTypes&&t.argTypes[a],s=a<t.numOptionalArgs;(`primitive`in t&&t.primitive&&o==null||t.type===`sqrt`&&a===1&&i[0]==null)&&(o=`primitive`);var c=this.parseGroupOfType(`argument to '`+e+`'`,o,s);if(s)i.push(c);else if(c!=null)r.push(c);else throw new V(`Null argument, please report this as a bug`)}return{args:r,optArgs:i}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(`raw`,n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new V(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new V(`Expected group as `+e,this.fetch());return a;case`original`:case null:case void 0:return this.parseArgumentGroup(n);default:throw new V(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r=``,i;(i=this.fetch()).text!==`EOF`;)r+=i.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new V(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(`color`,e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new V(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(`size`,e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new V(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!kI(i))throw new V(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(`url`,e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:oB.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!gV.hasOwnProperty(r)){if(this.settings.throwOnError)throw new V(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:oB.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:oB.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:oB.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new V(`\\verb assertion failed --
|
|
499
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}xV.hasOwnProperty(t[0])&&!qI[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=xV[t[0]]+t.slice(1));var i=iV.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(qI[this.mode][t]){this.settings.strict&&this.mode===`math`&&vL.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=qI[this.mode][t].group,s=oB.range(e);a=ZR(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(CI(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:oB.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!bV[l])throw new V(`Unknown accent ' `+l+`'`,e);var u=bV[l][this.mode]||bV[l].text;if(!u)throw new V(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:oB.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};SV.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var CV=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new SV(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new V(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new sB(`\\df@tag`)])}]}return r},wV=function(e,t,n){t.textContent=``;var r=OV(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),wV=function(){throw new V(`KaTeX doesn't work in quirks mode.`)});var TV=function(e,t){return OV(e,t).toMarkup()},EV=function(e,t){return CV(e,new lI(t))},DV=function(e,t,n){if(n.throwOnError||!(e instanceof V))throw e;var r=X([`katex-error`],[new RI(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},OV=function(e,t){var n=new lI(t);try{return VR(CV(e,n),e,n)}catch(t){return DV(t,e,n)}},kV={version:`0.16.47`,render:wV,renderToString:TV,ParseError:V,SETTINGS_SCHEMA:cI,__parse:EV,__renderToDomTree:OV,__renderToHTMLTree:function(e,t){var n=new lI(t);try{return HR(CV(e,n),e,n)}catch(t){return DV(t,e,n)}},__setFontMetrics:$re,__defineSymbol:U,__defineFunction:iR,__defineMacro:Q,__domTree:{Span:II,Anchor:LI,SymbolNode:RI,SvgNode:zI,PathNode:BI,LineNode:VI}};function AV(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}var jV=UV(/[A-Za-z]/),MV=UV(/[\dA-Za-z]/),NV=UV(/[#-'*+\--9=?A-Z^-~]/);function PV(e){return e!==null&&(e<32||e===127)}var FV=UV(/\d/),IV=UV(/[\dA-Fa-f]/),LV=UV(/[!-/:-@[-`{-~]/);function RV(e){return e!==null&&e<-2}function zV(e){return e!==null&&(e<0||e===32)}function BV(e){return e===-2||e===-1||e===32}var VV=UV(/\p{P}|\p{S}/u),HV=UV(/\s/);function UV(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function WV(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var GV=(function(e){if(e==null)return XV;if(typeof e==`function`)return YV(e);if(typeof e==`object`)return Array.isArray(e)?KV(e):qV(e);if(typeof e==`string`)return JV(e);throw Error(`Expected function, string, or object as test`)});function KV(e){let t=[],n=-1;for(;++n<e.length;)t[n]=GV(e[n]);return YV(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function qV(e){let t=e;return YV(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function JV(e){return YV(t);function t(t){return t&&t.type===e}}function YV(e){return t;function t(t,n,r){return!!(ZV(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function XV(){return!0}function ZV(e){return typeof e==`object`&&!!e&&`type`in e}function QV(e){return e}var $V=[],eH=`skip`;function tH(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=GV(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+QV(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=$V;if(s&&r&&(o=nH(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=nH(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function nH(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?$V:[e]}function rH(e,t,n){let r=GV((n||{}).ignore||[]),i=iH(t),a=-1;for(;++a<i.length;)tH(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return eH}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function iH(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([aH(e[0]),oH(e[1])])}return t}function aH(e){return typeof e==`string`?new RegExp(WV(e),`g`):e}function oH(e){return typeof e==`function`?e:function(){return e}}var sH=`phrasing`,cH=[`autolink`,`link`,`image`,`label`];function lH(){return{transforms:[_H],enter:{literalAutolink:dH,literalAutolinkEmail:fH,literalAutolinkHttp:fH,literalAutolinkWww:fH},exit:{literalAutolink:gH,literalAutolinkEmail:hH,literalAutolinkHttp:pH,literalAutolinkWww:mH}}}function uH(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:sH,notInConstruct:cH},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:sH,notInConstruct:cH},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:sH,notInConstruct:cH}]}}function dH(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function fH(e){this.config.enter.autolinkProtocol.call(this,e)}function pH(e){this.config.exit.autolinkProtocol.call(this,e)}function mH(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function hH(e){this.config.exit.autolinkEmail.call(this,e)}function gH(e){this.exit(e)}function _H(e){rH(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vH],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,yH]],{ignore:[`link`,`linkReference`]})}function vH(e,t,n,r,i){let a=``;if(!SH(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!bH(n)))return!1;let o=xH(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function yH(e,t,n,r){return!SH(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function bH(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function xH(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=AV(e,`(`),a=AV(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 SH(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||HV(n)||VV(n))&&(!t||n!==47)}function CH(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}NH.peek=MH;function wH(){this.buffer()}function TH(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function EH(){this.buffer()}function DH(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function OH(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=CH(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kH(e){this.exit(e)}function AH(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=CH(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jH(e){this.exit(e)}function MH(){return`[`}function NH(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 PH(){return{enter:{gfmFootnoteCallString:wH,gfmFootnoteCall:TH,gfmFootnoteDefinitionLabelString:EH,gfmFootnoteDefinition:DH},exit:{gfmFootnoteCallString:OH,gfmFootnoteCall:kH,gfmFootnoteDefinitionLabelString:AH,gfmFootnoteDefinition:jH}}}function FH(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:NH},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?`
|
|
500
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?LH:IH))),s(),o}}function IH(e,t,n){return t===0?e:LH(e,t,n)}function LH(e,t,n){return(n?``:` `)+e}var RH=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];UH.attention=WH,UH.peek=GH;function zH(){return{canContainEols:[`delete`],enter:{strikethrough:VH},exit:{strikethrough:HH}}}function BH(){return{handlers:{delete:UH},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:RH}]}}function VH(e){this.enter({type:`delete`,children:[],position:void 0},e)}function HH(e){this.exit(e)}function UH(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function WH(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function GH(){return`~`}function KH(e){return e.length}function qH(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||KH,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=JH(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=YH(r[d]);else{let e=YH(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[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<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
501
|
+
`)}function JH(e){return e==null?``:String(e)}function YH(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var XH=GV([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function ZH(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),QH);return i(),o}function QH(e,t,n){return`>`+(n?``:` `)+e}function $H(e,t){return eU(e,t.inConstruct,!0)&&!eU(e,t.notInConstruct,!1)}function eU(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function tU(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
502
|
+
`&&!e.before&&!e.after&&$H(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
503
|
+
`}function nU(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function rU(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function iU(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function aU(e,t,n,r){let i=iU(n),a=e.value||``;if(rU(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,oU);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(nU(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
504
|
+
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
505
|
+
`),a&&(u+=o.move(a+`
|
|
506
|
+
`)),u+=o.move(s),c(),u}function oU(e,t,n){return(n?``:` `)+e}function sU(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function cU(e,t,n,r){let i=sU(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?` `:`
|
|
507
|
+
`,...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 lU(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function uU(e){if(e===null||zV(e)||HV(e))return 1;if(VV(e))return 2}function dU(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function fU(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function pU(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function mU(e,t,n){let r=uU(e),i=uU(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}}var hU=`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(`.`),gU=[`pre`,`script`,`style`,`textarea`];function _U(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:jV(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!jV(a))return;for(;a===45||MV(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&gU.includes(o)?1:hU.includes(o)?6:7}var vU=new Map([[`*`,!1],[`_`,!0]]);function yU(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function bU(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=vU.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=uU(u.charCodeAt(u.length-1)),f=uU((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(CU(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:yU(e,t,a),index:o}}}function xU(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?dU(n.value):fU(n.value),i=pU(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function SU(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=DU(e,c,r,i),u=bU(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function CU(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function wU(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!LV(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function TU(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?dU(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
|
|
508
|
+
`)&&l.type===`html`&&_U(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(OU(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=EU(l,f.attention,t,c);a.push(e),s=fU(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=fU(n)}}return r.pop(),a}function EU(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=wU(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=TU(e,n,{...r.current(),before:c,after:c});return r.move(OU(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function DU(e,t,n,r){let i=[],a,o=fU(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===dU(n)&&xU([e],!0),a=void 0,i.push(e),e.value&&(o=fU(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=dU(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=DU(n.children,t,c,c),m=p.length>0?p[0].value:``,h=mU(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&xU(p,!0);let g=p.length>0?fU(p[p.length-1].value):``,_=mU(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&xU(p,!1),h.outside&&d!==`
|
|
509
|
+
`&&d!==`\r`&&xU(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function OU(e,t,n){let r=new Map,i=DU(e,r,t,n),a=i,o=bU(a,t,n);for(;o;){let s=SU(e,r,o,t,n);if(!s){a=i;break}r=s.chosen,a=s.tokens,o=s.mistake}let s=``;for(let e of a)s+=e.value;return s}kU.attention=AU,kU.peek=jU;function kU(e,t,n,r){let i=n.enter(`phrasing`),a=OU([EU(e,AU,n,n.createTracker(r))],r.before,r.after);return i(),a}function AU(e,t){return{construct:`emphasis`,markers:lU(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function jU(e,t,n){return n.options.emphasis||`*`}function MU(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?tH(e,i,PU(a),o):tH(e,i,NU(a),o)}function NU(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?PU(e.enter):e.enter,exit:typeof e.exit==`function`?PU(e.exit):e.exit}}function PU(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var FU={};function IU(e,t){let n=t||FU;return LU(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function LU(e,t,n){if(zU(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return RU(e.children,t,n)}return Array.isArray(e)?RU(e,t,n):``}function RU(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=LU(e[i],t,n);return r.join(``)}function zU(e){return!!(e&&typeof e==`object`)}function BU(e,t){let n=!1;return MU(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)&&IU(e)&&(t.options.setext||n))}function VU(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(BU(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
510
|
+
`,after:`
|
|
511
|
+
`});return r(),t(),o+`
|
|
512
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
513
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
514
|
+
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=pU(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}HU.peek=UU;function HU(e){return e.value||``}function UU(){return`<`}WU.peek=GU;function WU(e,t,n,r){let i=sU(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 GU(){return`!`}KU.peek=qU;function KU(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=u.filter(function(e){return e!==`phrasing`}),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 qU(){return`!`}JU.peek=YU;function JU(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function YU(){return"`"}function XU(e,t){let n=IU(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}ZU.peek=QU;function ZU(e,t,n,r){let i=sU(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(XU(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
|
|
515
|
+
`||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(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:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function QU(e,t,n){return XU(e,n)?`<`:`[`}$U.peek=eW;function $U(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=u.filter(function(e){return e!==`phrasing`}),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 eW(){return`[`}function tW(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 nW(e){let t=tW(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 rW(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function iW(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 aW(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?rW(n):tW(n),s=e.ordered?o===`.`?`)`:`.`:nW(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),iW(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function oW(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function sW(e,t,n,r){let i=oW(n),a=n.bulletCurrent||tW(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-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 cW(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function lW(e,t,n,r){if(!e.children.some(function(e){return XH(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function uW(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}dW.attention=fW,dW.peek=pW;function dW(e,t,n,r){let i=n.enter(`phrasing`),a=OU([EU(e,fW,n,n.createTracker(r))],r.before,r.after);return i(),a}function fW(e,t){return{construct:`strong`,markers:uW(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function pW(e,t,n){return n.options.strong||`*`}function mW(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function hW(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 gW(e,t,n){let r=(iW(n)+(n.options.ruleSpaces?` `:``)).repeat(hW(n));return n.options.ruleSpaces?r.slice(0,-1):r}var _W={blockquote:ZH,break:tU,code:aU,definition:cU,emphasis:kU,hardBreak:tU,heading:VU,html:HU,image:WU,imageReference:KU,inlineCode:JU,link:ZU,linkReference:$U,list:aW,listItem:sW,paragraph:cW,root:lW,strong:dW,text:mW,thematicBreak:gW},vW=document.createElement(`i`);function yW(e){let t=`&`+e+`;`;vW.innerHTML=t;let n=vW.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function bW(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var xW=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function SW(e){return e.replace(xW,CW)}function CW(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return bW(n.slice(t?2:1),t?16:10)}return yW(n)||e}function wW(){return{enter:{table:TW,tableData:kW,tableHeader:kW,tableRow:DW},exit:{codeText:AW,table:EW,tableData:OW,tableHeader:OW,tableRow:OW}}}function TW(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 EW(e){this.exit(e),this.data.inTable=void 0}function DW(e){this.enter({type:`tableRow`,children:[]},e)}function OW(e){this.exit(e)}function kW(e){this.enter({type:`tableCell`,children:[]},e)}function AW(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,jW));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function jW(e,t){return t===`|`?t:e}function MW(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
516
|
+
`,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(`
|
|
517
|
+
`))}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 qH(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(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=_W.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function NW(){return{exit:{taskListCheckValueChecked:FW,taskListCheckValueUnchecked:FW,paragraph:IW}}}function PW(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:LW}}}function FW(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function IW(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function LW(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=_W.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function RW(){return[lH(),PH(),zH(),wW(),NW()]}function zW(e){return{extensions:[uH(),FH(e),BH(),MW(e),PW()]}}function BW(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?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);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function VW(e,t){return e.length>0?(BW(e,e.length,0,t),e):t}var HW={}.hasOwnProperty;function UW(e){let t={},n=-1;for(;++n<e.length;)WW(t,e[n]);return t}function WW(e,t){let n;for(n in t){let r=(HW.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){HW.call(r,a)||(r[a]=[]);let e=i[a];GW(r[a],Array.isArray(e)?e:e?[e]:[])}}}function GW(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);BW(e,0,0,r)}var KW={tokenize:oG,partial:!0},qW={tokenize:sG,partial:!0},JW={tokenize:cG,partial:!0},YW={tokenize:lG,partial:!0},XW={tokenize:uG,partial:!0},ZW={name:`wwwAutolink`,tokenize:iG,previous:dG},QW={name:`protocolAutolink`,tokenize:aG,previous:fG},$W={name:`emailAutolink`,tokenize:rG,previous:pG},eG={};function tG(){return{text:eG}}for(var nG=48;nG<123;)eG[nG]=$W,nG++,nG===58?nG=65:nG===91&&(nG=97);eG[43]=$W,eG[45]=$W,eG[46]=$W,eG[95]=$W,eG[72]=[$W,QW],eG[104]=[$W,QW],eG[87]=[$W,ZW],eG[119]=[$W,ZW];function rG(e,t,n){let r=this,i,a;return o;function o(t){return!mG(t)||!pG.call(r,r.previous)||hG(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return mG(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(XW,u,l)(t):t===45||t===95||MV(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&jV(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function iG(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!dG.call(r,r.previous)||hG(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(KW,e.attempt(qW,e.attempt(JW,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function aG(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&fG.call(r,r.previous)&&!hG(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(jV(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||PV(t)||zV(t)||HV(t)||VV(t)?n(t):e.attempt(qW,e.attempt(JW,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function oG(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function sG(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(YW,c,s)(t):t===null||zV(t)||HV(t)||t!==45&&VV(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function cG(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(YW,t,a)(o):o===null||zV(o)||HV(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function lG(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||zV(o)||HV(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||zV(e)||HV(e)?t(e):r(e)}function a(e){return jV(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):jV(t)?(e.consume(t),o):n(t)}}function uG(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return MV(e)?n(e):t(e)}}function dG(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||zV(e)}function fG(e){return!jV(e)}function pG(e){return!(e===47||mG(e))}function mG(e){return e===43||e===45||e===46||e===95||MV(e)}function hG(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function gG(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&MV(e.charCodeAt(n+1))&&MV(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&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 _G(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var vG={name:`attention`,resolveAll:yG,tokenize:bG};function yG(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};xG(o,-a),xG(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=VW(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=VW(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=VW(r,_G(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=VW(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=VW(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),BW(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function bG(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=uU(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=uU(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function xG(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var SG={name:`autolink`,tokenize:CG};function CG(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return jV(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||MV(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||MV(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||PV(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):NV(t)?(e.consume(t),l):n(t)}function u(e){return MV(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||MV(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function wG(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return BV(r)?(e.enter(n),s(r)):t(r)}function s(r){return BV(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function TG(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&BV(t)?(e.enter(r),c(t)):l(t)}function c(t){return BV(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var EG={partial:!0,tokenize:DG};function DG(e,t,n){return r;function r(t){return BV(t)?wG(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||RV(e)?t(e):n(e)}}var OG={continuation:{tokenize:AG},exit:jG,name:`blockQuote`,tokenize:kG};function kG(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return BV(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function AG(e,t,n){let r=this;return i;function i(t){return BV(t)?wG(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(OG,t,n)(r)}}function jG(e){e.exit(`blockQuote`)}var MG={name:`characterEscape`,tokenize:NG};function NG(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return LV(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var PG={name:`characterReference`,tokenize:FG};function FG(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=MV,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=IV,u):(e.enter(`characterReferenceValue`),a=7,o=FV,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===MV&&!yW(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var IG={partial:!0,tokenize:LG};function LG(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 RG={concrete:!0,name:`codeFenced`,tokenize:zG};function zG(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),BV(t)?wG(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||RV(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(IG,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||RV(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):BV(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),wG(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||RV(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||RV(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&BV(t)?wG(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||RV(t)?e.check(IG,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||RV(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`),BV(t)?wG(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`),BV(t)?wG(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||RV(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var BG={name:`codeIndented`,tokenize:HG},VG={partial:!0,tokenize:UG};function HG(e,t,n){return r;function r(t){return e.enter(`codeIndented`),TG(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):RV(t)?e.attempt(VG,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||RV(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function UG(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):RV(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):TG(e,t,a,`linePrefix`,4,4)(o)}function a(e){return RV(e)?i(e):n(e)}}var WG={name:`codeText`,previous:KG,resolve:GG,tokenize:qG};function GG(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function KG(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function qG(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):RV(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||RV(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var JG=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=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 e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.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&&YG(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),YG(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),YG(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<this.left.length){let t=this.left.splice(e,1/0);YG(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);YG(this.left,t.reverse())}}}};function YG(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function XG(e){let t={},n=-1,r,i,a,o,s,c,l,u=new JG(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,ZG(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return BW(e,0,1/0,u.slice(0)),!l}function ZG(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var QG={resolve:eK,tokenize:tK},$G={partial:!0,tokenize:nK};function eK(e){return XG(e),e}function tK(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):RV(t)?e.check($G,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function nK(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),wG(e,a,`linePrefix`)}function a(i){if(i===null||RV(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function rK(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||PV(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||RV(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||zV(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||PV(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function iK(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||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):RV(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||RV(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!BV(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function aK(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):RV(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),wG(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||RV(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 oK(e,t){let n;return r;function r(i){return RV(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):BV(i)?wG(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var sK={name:`definition`,tokenize:lK},cK={partial:!0,tokenize:uK};function lK(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return iK.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=CH(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 zV(t)?oK(e,l)(t):l(t)}function l(t){return rK(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(cK,d,d)(t)}function d(t){return BV(t)?wG(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||RV(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function uK(e,t,n){return r;function r(t){return zV(t)?oK(e,i)(t):n(t)}function i(t){return aK(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return BV(t)?wG(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||RV(e)?t(e):n(e)}}var dK={name:`hardBreakEscape`,tokenize:fK};function fK(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return RV(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var pK={name:`headingAtx`,resolve:mK,tokenize:hK};function mK(e,t){let n=e.length-2,r=3;if(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){let 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`};BW(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function hK(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||zV(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||RV(n)?(e.exit(`atxHeading`),t(n)):BV(n)?wG(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||zV(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var gK={concrete:!0,name:`htmlFlow`,resolveTo:vK,tokenize:yK},_K={partial:!0,tokenize:bK};function vK(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 yK(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:A):jV(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):jV(a)?(e.consume(a),i=4,r.interrupt?t:A):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:A):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return jV(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||zV(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&gU.includes(l)?(i=1,r.interrupt?t(s):O(s)):hU.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||MV(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return BV(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||jV(t)?(e.consume(t),b):BV(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||MV(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):BV(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):BV(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||RV(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||zV(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||BV(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||RV(t)?O(t):BV(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),ne):t===60&&i===1?(e.consume(t),re):t===62&&i===4?(e.consume(t),oe):t===63&&i===3?(e.consume(t),A):t===93&&i===5?(e.consume(t),ae):RV(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(_K,se,k)(t)):t===null||RV(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(IG,ee,se)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||RV(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function ne(t){return t===45?(e.consume(t),A):O(t)}function re(t){return t===47?(e.consume(t),o=``,ie):O(t)}function ie(t){if(t===62){let n=o.toLowerCase();return gU.includes(n)?(e.consume(t),oe):O(t)}return jV(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ie):O(t)}function ae(t){return t===93?(e.consume(t),A):O(t)}function A(t){return t===62?(e.consume(t),oe):t===45&&i===2?(e.consume(t),A):O(t)}function oe(t){return t===null||RV(t)?(e.exit(`htmlFlowData`),se(t)):(e.consume(t),oe)}function se(n){return e.exit(`htmlFlow`),t(n)}}function bK(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(EG,t,n)}}var xK={name:`htmlText`,tokenize:SK};function SK(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):jV(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):jV(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):RV(t)?(o=d,re(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ne(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):RV(t)?(o=h,re(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ne(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ne(t):RV(t)?(o=v,re(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):RV(t)?(o=y,re(t)):(e.consume(t),y)}function b(e){return e===62?ne(e):y(e)}function x(t){return jV(t)?(e.consume(t),S):n(t)}function S(t){return t===45||MV(t)?(e.consume(t),S):C(t)}function C(t){return RV(t)?(o=C,re(t)):BV(t)?(e.consume(t),C):ne(t)}function w(t){return t===45||MV(t)?(e.consume(t),w):t===47||t===62||zV(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ne):t===58||t===95||jV(t)?(e.consume(t),E):RV(t)?(o=T,re(t)):BV(t)?(e.consume(t),T):ne(t)}function E(t){return t===45||t===46||t===58||t===95||MV(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):RV(t)?(o=D,re(t)):BV(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):RV(t)?(o=O,re(t)):BV(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):RV(t)?(o=k,re(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||zV(t)?T(t):(e.consume(t),ee)}function te(e){return e===47||e===62||zV(e)?T(e):n(e)}function ne(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function re(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ie}function ie(t){return BV(t)?wG(e,ae,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ae(t)}function ae(t){return e.enter(`htmlTextData`),o(t)}}var CK={name:`labelEnd`,resolveAll:DK,resolveTo:OK,tokenize:kK},wK={tokenize:AK},TK={tokenize:jK},EK={tokenize:MK};function DK(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&BW(e,0,e.length,n),e}function OK(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=VW(o,e.slice(i+1,i+r+3)),o=VW(o,[[`enter`,l,t]]),o=VW(o,_G(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=VW(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=VW(o,e.slice(a+1)),o=VW(o,[[`exit`,s,t]]),BW(e,i,e.length,o),e}function kK(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(CH(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(wK,u,o?u:d)(t):t===91?e.attempt(TK,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(EK,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function AK(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return zV(t)?oK(e,a)(t):a(t)}function a(t){return t===41?u(t):rK(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return zV(t)?oK(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?aK(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return zV(t)?oK(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function jK(e,t,n){let r=this;return i;function i(t){return iK.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(CH(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function MK(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var NK={name:`labelStartImage`,resolveAll:CK.resolveAll,tokenize:PK};function PK(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var FK={name:`labelStartLink`,resolveAll:CK.resolveAll,tokenize:IK};function IK(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var LK={name:`lineEnding`,tokenize:RK};function RK(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),wG(e,t,`linePrefix`)}}var zK={name:`thematicBreak`,tokenize:BK};function BK(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||RV(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),BV(t)?wG(e,s,`whitespace`)(t):s(t))}}var VK={continuation:{tokenize:GK},exit:qK,name:`list`,tokenize:WK},HK={partial:!0,tokenize:JK},UK={partial:!0,tokenize:KK};function WK(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:FV(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(zK,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 FV(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(EG,r.interrupt?n:u,e.attempt(HK,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return BV(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 GK(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(EG,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,wG(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!BV(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(UK,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,wG(e,e.attempt(VK,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function KK(e,t,n){let r=this;return wG(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 qK(e){e.exit(this.containerState.type)}function JK(e,t,n){let r=this;return wG(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!BV(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var YK=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){XK(this,e,t,n,!1)}addBefore(e,t,n){XK(this,e,t,n,!0)}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,this.index.clear()}};function XK(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var ZK={name:`setextUnderline`,resolveTo:QK,tokenize:$K};function QK(e,t){let n=new YK,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function $K(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`),BV(t)?wG(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||RV(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var eq={tokenize:cq,partial:!0};function tq(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:aq,continuation:{tokenize:oq},exit:sq}},text:{91:{name:`gfmFootnoteCall`,tokenize:iq},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:nq,resolveTo:rq}}}}function nq(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=CH(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 rq(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 iq(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||zV(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(CH(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return zV(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 aq(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||zV(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=CH(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return zV(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),wG(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function oq(e,t,n){return e.check(EG,t,e.attempt(eq,t,n))}function sq(e){e.exit(`gfmFootnoteDefinition`)}function cq(e,t,n){let r=this;return wG(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 lq(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(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&BW(o,o.length,0,_G(s,e.slice(r+1,n),t)),BW(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),BW(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=uU(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=uU(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var uq=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){dq(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,this.index.clear()}};function dq(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function fq(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function pq(){return{flow:{null:{name:`table`,tokenize:mq,resolveAll:hq}}}}function mq(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&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||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):RV(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):BV(t)?wG(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||zV(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,BV(t)?wG(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 BV(t)?wG(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||RV(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 BV(t)?wG(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||RV(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||RV(n)?(e.exit(`tableRow`),t(n)):BV(n)?wG(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||zV(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function hq(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 uq;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(_q(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=gq(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=gq(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=gq(f,t,o,i,n,d)):(o[0]=o[1],d=gq(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&_q(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=fq(t.events,n))}return e}function gq(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},vq(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=vq(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=vq(t.events,n[2]),a=vq(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[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({},vq(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function _q(e,t,n,r,i){let a=[],o=vq(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 vq(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var yq={name:`tasklistCheck`,tokenize:xq};function bq(){return{text:{91:yq}}}function xq(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 zV(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 RV(r)?t(r):BV(r)?e.check({tokenize:Sq},t,n)(r):n(r)}}function Sq(e,t,n){return wG(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Cq(e){return UW([tG(),tq(),lq(e),pq(),bq()])}var wq={};function Tq(e){let t=this,n=e||wq,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Cq(n)),a.push(RW()),o.push(zW(n))}function Eq(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function Dq(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
|
|
518
|
+
`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(nU(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
|
|
519
|
+
`,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
|
|
520
|
+
`),i&&(c+=a.move(i+`
|
|
521
|
+
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var Oq={tokenize:Aq,concrete:!0,name:`mathFlow`},kq={tokenize:jq,partial:!0};function Aq(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){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),wG(e,l,`whitespace`)(t))}function l(t){return t===null||RV(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||RV(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(kq,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?wG(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):RV(t)?e.attempt(kq,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||RV(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return wG(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),wG(e,c,`whitespace`)(t))}function c(r){return r===null||RV(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function jq(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Mq(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:Nq,previous:Pq,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):RV(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||RV(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function Nq(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Pq(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function Fq(e){return{flow:{36:Oq},text:{36:Mq(e)}}}var Iq={};function Lq(e){let t=this,n=e||Iq,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Fq(n)),a.push(Eq()),o.push(Dq(n))}var Rq={tokenize:zq};function zq(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),wG(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return RV(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Bq={tokenize:Hq},Vq={tokenize:Uq};function Hq(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new YK;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vq,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Vq,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return RV(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>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;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new YK;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){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 Uq(e,t,n){return wG(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var Wq={tokenize:Gq};function Gq(e){let t=this,n=e.attempt(EG,r,e.attempt(this.parser.constructs.flowInitial,i,wG(e,e.attempt(this.parser.constructs.flow,i,e.attempt(QG,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Kq={resolveAll:Xq()},qq=Yq(`string`),Jq=Yq(`text`);function Yq(e){return{resolveAll:Xq(e===`text`?Zq: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);else 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(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Xq(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Zq(e,t){let n=new YK,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Qq=s({attentionMarkers:()=>oJ,contentInitial:()=>eJ,disable:()=>sJ,document:()=>$q,flow:()=>nJ,flowInitial:()=>tJ,insideSpan:()=>aJ,string:()=>rJ,text:()=>iJ}),$q={42:VK,43:VK,45:VK,48:VK,49:VK,50:VK,51:VK,52:VK,53:VK,54:VK,55:VK,56:VK,57:VK,62:OG},eJ={91:sK},tJ={[-2]:BG,[-1]:BG,32:BG},nJ={35:pK,42:zK,45:[ZK,zK],60:gK,61:ZK,95:zK,96:RG,126:RG},rJ={38:PG,92:MG},iJ={[-5]:LK,[-4]:LK,[-3]:LK,33:NK,38:PG,42:vG,60:[SG,xK],91:FK,92:[dK,MG],93:CK,95:vG,96:WG},aJ={null:[vG,Kq]},oJ={null:[42,95]},sJ={null:[]};function cJ(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:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{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=VW(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=_G(a,l.events,l),l.events):[]}function f(e,t){return uJ(p(e),t)}function p(e){return lJ(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,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){RV(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&BW(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function lJ(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-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 uJ(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
522
|
+
`;break;case-3:o=`\r
|
|
523
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function dJ(e){let t={constructs:UW([Qq,...(e||{}).extensions||[]]),content:n(Rq),defined:[],document:n(Bq),flow:n(Wq),lazy:{},string:n(qq),text:n(Jq)};return t;function n(e){return n;function n(n){return cJ(t,e,n)}}}function fJ(e){for(;!XG(e););return e}var pJ=/[\0\t\n\r]/g;function mJ(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){pJ.lastIndex=c;let n=pJ.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var hJ={}.hasOwnProperty;function gJ(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),_J(n)(fJ(dJ(n).document().write(mJ()(e,t,!0))))}function _J(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(Te),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(xe),blockQuote:o(ge),characterEscape:E,characterReference:E,codeFenced:o(_e),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(_e,s),codeText:o(ve,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(ye),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(be),hardBreakEscape:o(Se),hardBreakTrailing:o(Se),htmlFlow:o(Ce,s),htmlFlowData:E,htmlText:o(Ce,s),htmlTextData:E,image:o(we),label:s,link:o(Te),listItem:o(De),listItemValue:p,listOrdered:o(Ee,f),listUnordered:o(Ee),paragraph:o(Oe),reference:le,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(xe),strong:o(ke),thematicBreak:o(je)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:he,autolinkProtocol:me,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:fe,characterReference:pe,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(ne),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(ee),htmlFlowData:D,htmlText:l(te),htmlTextData:D,image:l(ie),label:A,labelText:ae,lineEnding:O,link:l(re),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ue,resourceDestinationString:oe,resourceTitleString:se,resource:ce,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};yJ(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),hJ.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||xJ).call(o,void 0,e[0])}for(r.position={start:vJ(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:vJ(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:vJ(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+uF({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||xJ).call(this,e,r[0])),n.position.end=vJ(e.end)}function d(){return IU(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=CH(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Ae(),n.position={start:vJ(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=vJ(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=vJ(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=SW(t),n.identifier=CH(t).toLowerCase()}function A(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ce(){this.data.inReference=void 0}function le(){this.data.referenceType=`collapsed`}function ue(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=CH(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function de(e){this.data.characterReferenceType=e.type}function fe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=bW(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=yW(t);let i=this.stack[this.stack.length-1];i.value+=r}function pe(e){let t=this.stack.pop();t.position.end=vJ(e.end)}function me(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function he(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ge(){return{type:`blockquote`,children:[],position:void 0}}function _e(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ve(){return{type:`inlineCode`,value:``,position:void 0}}function ye(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function be(){return{type:`emphasis`,children:[],position:void 0}}function xe(){return{type:`heading`,depth:0,children:[],position:void 0}}function Se(){return{type:`break`,position:void 0}}function Ce(){return{type:`html`,value:``,position:void 0}}function we(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function Te(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function Ee(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function De(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function Oe(){return{type:`paragraph`,children:[],position:void 0}}function ke(){return{type:`strong`,children:[],position:void 0}}function Ae(){return{type:`text`,value:``,position:void 0}}function je(){return{type:`thematicBreak`,position:void 0}}}function vJ(e){return{line:e.line,column:e.column,offset:e.offset}}function yJ(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?yJ(e,r):bJ(e,r)}}function bJ(e,t){let n;for(n in t)if(hJ.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function xJ(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+uF({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uF({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+uF({start:t.start,end:t.end})+`) is still open`)}function SJ(e){let t=this;t.parser=n;function n(n){return gJ(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function CJ(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function wJ(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
524
|
+
`}]}function TJ(e,t){let n=t.value?t.value+`
|
|
525
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(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 EJ(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DJ(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OJ(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=gG(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 kJ(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 AJ(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function jJ(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 MJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jJ(e,t);let i={src:gG(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 NJ(e,t){let n={src:gG(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 PJ(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 FJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jJ(e,t);let i={href:gG(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 IJ(e,t){let n={href:gG(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 LJ(e,t,n){let r=e.all(t),i=n?RJ(n):zJ(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(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
526
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
527
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function RJ(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=zJ(n[r])}return t}function zJ(e){return e.spread??e.children.length>1}function BJ(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function VJ(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HJ(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function UJ(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WJ(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=sF(t.children[1]),o=oF(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 GJ(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(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function KJ(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var qJ=9,JJ=32;function YJ(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(XJ(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(XJ(t.slice(i),i>0,!1)),a.join(``)}function XJ(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===qJ||t===JJ;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===qJ||t===JJ;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function ZJ(e,t){let n={type:`text`,value:YJ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function QJ(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var $J={blockquote:CJ,break:wJ,code:TJ,delete:EJ,emphasis:DJ,footnoteReference:OJ,heading:kJ,html:AJ,imageReference:MJ,image:NJ,inlineCode:PJ,linkReference:FJ,link:IJ,listItem:LJ,list:BJ,paragraph:VJ,root:HJ,strong:UJ,table:WJ,tableCell:KJ,tableRow:GJ,text:ZJ,thematicBreak:QJ,toml:eY,yaml:eY,definition:eY,footnoteDefinition:eY};function eY(){}var{defineProperty:tY}=Object,nY=typeof self==`object`?self:globalThis,rY=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new nY[e](t)},iY=(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){let i=r(t),a=r(n);i===`__proto__`?tY(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}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 nY[e]==`function`?rY(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)}case`-0`:return-0}return n(rY(a,o),i)};return r},aY=e=>iY(new Map,e)(0),oY=``,{toString:sY}={},{keys:cY,is:lY}=Object,uY=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=sY.call(e).slice(8,-1);switch(n){case`Array`:return[1,oY];case`Object`:return[2,oY];case`Date`:return[3,oY];case`RegExp`:return[4,oY];case`Map`:return[5,oY];case`Set`:return[6,oY];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},dY=([e,t])=>e===0&&(t===`function`||t===`symbol`),fY=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=uY(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&lY(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of cY(o))(e||!dY(uY(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?oY:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(dY(uY(n))||dY(uY(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!dY(uY(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},pY=(e,{json:t,lossy:n}={})=>{let r=[];return fY(!(t||n),!!t,new Map,r)(e),r},mY=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?aY(pY(e,t)):structuredClone(e):(e,t)=>aY(pY(e,t));function hY(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 gY(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function _Y(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||hY,r=e.options.footnoteBackLabel||gY,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=gG(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&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:{...mY(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
528
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
529
|
+
`}]}}var vY={}.hasOwnProperty,yY={};function bY(e,t){let n=t||yY,r=new Map,i=new Map,a={all:s,applyData:SY,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...$J,...n.handlers},one:o,options:n,patch:xY,wrap:wY};return MU(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(vY.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=mY(n);return r.children=a.all(e),r}return mY(e)}return(a.options.unknownHandler||CY)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=TY(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=TY(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function xY(e,t){e.position&&(t.position=lF(e))}function SY(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,mY(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function CY(e,t){let n=t.data||{},r=`value`in t&&!(vY.call(n,`hProperties`)||vY.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wY(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
530
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
531
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
532
|
+
`}),n}function TY(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function EY(e,t){let n=bY(e,t),r=n.one(e,void 0),i=_Y(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
533
|
+
`},i)),a}function DY(e,t){return e&&`run`in e?async function(n,r){let i=EY(n,{file:r,...t});await e.run(i,r)}:function(n,r){return EY(n,{file:r,...e||t})}}function OY(e){if(e)throw e}var kY=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={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function AY(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function jY(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?MY(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function MY(e,t){let n;return r;function r(...t){let r=e.length>t.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 NY={basename:PY,dirname:FY,extname:IY,join:LY,sep:`/`};function PY(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);BY(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 FY(e){if(BY(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 IY(e){BY(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}}else 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 LY(...e){let t=-1,n;for(;++t<e.length;)BY(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:RY(n)}function RY(e){BY(e);let t=e.codePointAt(0)===47,n=zY(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function zY(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(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 BY(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var VY={cwd:HY};function HY(){return`/`}function UY(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function WY(e){if(typeof e==`string`)e=new URL(e);else if(!UY(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 GY(e)}function GY(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(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var KY=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],qY=class{constructor(e){let t;t=e?UY(e)?{path:e}:typeof e==`string`||ZY(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:VY.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<KY.length;){let e=KY[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)KY.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?NY.basename(this.path):void 0}set basename(e){YY(e,`basename`),JY(e,`basename`),this.path=NY.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?NY.dirname(this.path):void 0}set dirname(e){XY(this.basename,`dirname`),this.path=NY.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?NY.extname(this.path):void 0}set extname(e){if(JY(e,`extname`),XY(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=NY.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){UY(e)&&(e=WY(e)),YY(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?NY.basename(this.path,this.extname):void 0}set stem(e){YY(e,`stem`),JY(e,`stem`),this.path=NY.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new mF(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function JY(e,t){if(e&&e.includes(NY.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+NY.sep+"`")}function YY(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function XY(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function ZY(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var QY=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),$Y=l(kY(),1),eX={}.hasOwnProperty,tX=new class e extends QY{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=jY()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,$Y.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(iX(`data`,this.frozen),this.namespace[e]=t,this):eX.call(this.namespace,e)&&this.namespace[e]||void 0:e?(iX(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=sX(e),n=this.parser||this.Parser;return nX(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),nX(`process`,this.parser||this.Parser),rX(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=sX(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);lX(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),nX(`processSync`,this.parser||this.Parser),rX(`processSync`,this.compiler||this.Compiler),this.process(e,r),oX(`processSync`,`process`,t),n;function r(e,r){t=!0,OY(e),n=r}}run(e,t,n){aX(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=sX(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),oX(`runSync`,`run`,n),r;function i(e,t){OY(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=sX(t),r=this.compiler||this.Compiler;return rX(`stringify`,r),aX(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(iX(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,$Y.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];AY(o)&&AY(r)&&(r=(0,$Y.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function nX(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function rX(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function iX(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 aX(e){if(!AY(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function oX(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function sX(e){return cX(e)?e:new qY(e)}function cX(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function lX(e){return typeof e==`string`||uX(e)}function uX(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var dX=1024,fX=0,pX=class{constructor(e,t){this.from=e,this.to=t}},mX=class{constructor(e={}){this.id=fX++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=_X.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};mX.closedBy=new mX({deserialize:e=>e.split(` `)}),mX.openedBy=new mX({deserialize:e=>e.split(` `)}),mX.group=new mX({deserialize:e=>e.split(` `)}),mX.isolate=new mX({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),mX.contextHash=new mX({perNode:!0}),mX.lookAhead=new mX({perNode:!0}),mX.mounted=new mX({perNode:!0});var hX=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[mX.mounted.id]}},gX=Object.create(null),_X=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):gX,r=+!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(mX.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(mX.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};_X.none=new _X(``,Object.create(null),0,8);var vX=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new _X(e.name,r,e.id,e.flags):e)}return new e(n)}},yX=new WeakMap,bX=new WeakMap,xX;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(xX||={});var SX=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=hX.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new IX(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new IX(yX.get(this)||this.topNode);return r.moveTo(e,t),yX.set(this,r._tree),r}get topNode(){return new OX(this,0,0,null)}resolve(e,t=0){let n=EX(yX.get(this)||this.topNode,e,t,!1);return yX.set(this,n),n}resolveInner(e,t=0){let n=EX(bX.get(this)||this.topNode,e,t,!0);return bX.set(this,n),n}resolveStack(e,t=0){return FX(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&xX.IncludeAnonymous)>0;for(let e=this.cursor(a|xX.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:VX(_X.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(_X.none,t,n,r)))}static build(e){return RX(e)}};SX.empty=new SX(_X.none,[],[],0);var CX=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},wX=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return _X.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(TX(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function TX(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function EX(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof OX&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:xX.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof OX&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var DX=class{cursor(e=0){return new IX(this,e)}getChild(e,t=null,n=null){let r=kX(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return kX(this,e,t,n)}resolve(e,t=0){return EX(this,e,t,!1)}resolveInner(e,t=0){return EX(this,e,t,!0)}matchContext(e){return AX(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},OX=class e extends DX{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(a&xX.EnterBracketed&&l instanceof SX&&(d=hX.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||TX(i,r,u,u+l.length)){if(l instanceof wX){if(a&xX.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new MX(new jX(o,l,t,u),null,e)}else if(a&xX.IncludeAnonymous||!l.type.isAnonymous||LX(l)){let s;if(!(a&xX.IgnoreMounts)&&(s=hX.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&xX.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&xX.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&xX.IgnoreOverlays)&&(i=hX.get(this._tree))&&i.overlay){let a=t-this.from,o=r&xX.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function kX(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function AX(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var jX=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},MX=class e extends DX{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&xX.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new SX(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function NX(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof OX&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new PX(i,n)}var PX=class{constructor(e,t){this.heads=e,this.node=t}get next(){return NX(this.heads)}};function FX(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof OX?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=hX.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new OX(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(EX(o,t,n,!1))}}return i?NX(i):r}var IX=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~xX.EnterBracketed,e instanceof OX)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof OX?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&xX.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&xX.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&xX.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&xX.IncludeAnonymous||e instanceof wX||!e.type.isAnonymous||LX(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new MX(this.buffer,t,this.stack[e]);return this.bufferNode=new MX(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return AX(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return AX(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function LX(e){return e.children.some(e=>e instanceof wX||!e.type.isAnonymous||LX(e))}function RX(e){let{buffer:t,nodeSet:n,maxBufferLength:r=dX,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new CX(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,T=l,E=c;if(w<0){if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}if(w==-3){c=x;return}if(w==-4){l=x;return}throw RangeError(`Unrecognized record size: ${w}`)}let D=s[x],O,k,ee=S-e;if(C-S<=r&&(k=h(o.pos-t,y))){let t=new Uint16Array(k.size-k.skip),r=o.pos-k.size,i=t.length;for(;o.pos>r;)i=g(k.start,t,i);O=new wX(t,C-k.start,n),ee=k.start-e}else{let e=o.pos-w;o.next();let t=[],s=[],c=x>=a?x:-1,h=0,g=C,_=T;for(;o.pos>e;)c>=0&&o.id==c&&o.size>=0?(o.end<=g-r&&(p(t,s,S,h,o.end,g,c,_,E),h=t.length,g=o.end,_=l),o.next()):b>2500?d(S,e,t,s):(c>=0&&o.size==-1&&i[o.id].type==n.types[c]&&(h<t.length&&p(t,s,S,h,o.end,g,c,_,E),h=t.length+1,g=o.start,_=l),u(S,e,t,s,c,b+1));if(c>=0&&h>0&&h<t.length&&p(t,s,S,h,S,g,c,_,E),t.reverse(),s.reverse(),c>-1&&h>0){let e=f(D,E);O=VX(D,t,s,0,t.length,0,C-S,e,e)}else O=m(D,t,s,C-S,T-C,E)}_.push(O),v.push(ee)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new wX(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof SX){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(mX.lookAhead))&&(a=r[o]+s.length+c-i)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[mX.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[mX.lookAhead,i];o=o?[e].concat(o):[e]}return new SX(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0){if(n.size==-3||n.size==-4)d+=4;else break scan}else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new SX(s[e.topID],_.reverse(),v.reverse(),y)}var zX=new WeakMap;function BX(e,t){if(!e.isAnonymous||t instanceof wX||t.type!=e)return 1;let n=zX.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof SX)){n=1;break}n+=BX(e,r)}zX.set(t,n)}return n}function VX(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=BX(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=BX(e,t[s]);for(s++;s<i;s++){let n=BX(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(VX(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var HX=class{startParse(e,t,n){return typeof e==`string`&&(e=new UX(e)),n=n?n.length?n.map(e=>new pX(e.from,e.to)):[new pX(0,0)]:[new pX(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},UX=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};new mX({perNode:!0});var WX=0,GX=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=WX++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new qX(e);return e=>e.modified.indexOf(t)>-1?e:qX.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},KX=0,qX=class e{constructor(e){this.name=e,this.instances=[],this.id=KX++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&JX(n,e.modified));if(r)return r;let i=[],a=new GX(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=YX(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function JX(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function YX(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function XX(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new QX(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return ZX.add(t)}var ZX=new mX({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth<=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new QX(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),QX=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};QX.empty=new QX([],2,null);function $X(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function eZ(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function tZ(e,t,n,r=0,i=e.length){let a=new rZ(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}function nZ(e,t,n,r,i,a=0,o=e.length){let s=a;function c(t,n){if(!(t<=s)){for(let a=e.slice(s,t),o=0;;){let e=a.indexOf(`
|
|
534
|
+
`,o),t=e<0?a.length:e;if(t>o&&r(a.slice(o,t),n),e<0)break;i(),o=e+1}s=t}}tZ(t,n,(e,t,n)=>{c(e,``),c(t,n)},a,o),c(o,``)}var rZ=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=iZ(e)||QX.empty,u=eZ(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(mX.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function iZ(e){let t=e.type.prop(ZX);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var aZ=GX.define,oZ=aZ(),sZ=aZ(),cZ=aZ(sZ),lZ=aZ(sZ),uZ=aZ(),dZ=aZ(uZ),fZ=aZ(uZ),pZ=aZ(),mZ=aZ(pZ),hZ=aZ(),gZ=aZ(),_Z=aZ(),vZ=aZ(_Z),yZ=aZ(),$={comment:oZ,lineComment:aZ(oZ),blockComment:aZ(oZ),docComment:aZ(oZ),name:sZ,variableName:aZ(sZ),typeName:cZ,tagName:aZ(cZ),propertyName:lZ,attributeName:aZ(lZ),className:aZ(sZ),labelName:aZ(sZ),namespace:aZ(sZ),macroName:aZ(sZ),literal:uZ,string:dZ,docString:aZ(dZ),character:aZ(dZ),attributeValue:aZ(dZ),number:fZ,integer:aZ(fZ),float:aZ(fZ),bool:aZ(uZ),regexp:aZ(uZ),escape:aZ(uZ),color:aZ(uZ),url:aZ(uZ),keyword:hZ,self:aZ(hZ),null:aZ(hZ),atom:aZ(hZ),unit:aZ(hZ),modifier:aZ(hZ),operatorKeyword:aZ(hZ),controlKeyword:aZ(hZ),definitionKeyword:aZ(hZ),moduleKeyword:aZ(hZ),operator:gZ,derefOperator:aZ(gZ),arithmeticOperator:aZ(gZ),logicOperator:aZ(gZ),bitwiseOperator:aZ(gZ),compareOperator:aZ(gZ),updateOperator:aZ(gZ),definitionOperator:aZ(gZ),typeOperator:aZ(gZ),controlOperator:aZ(gZ),punctuation:_Z,separator:aZ(_Z),bracket:vZ,angleBracket:aZ(vZ),squareBracket:aZ(vZ),paren:aZ(vZ),brace:aZ(vZ),content:pZ,heading:mZ,heading1:aZ(mZ),heading2:aZ(mZ),heading3:aZ(mZ),heading4:aZ(mZ),heading5:aZ(mZ),heading6:aZ(mZ),contentSeparator:aZ(pZ),list:aZ(pZ),quote:aZ(pZ),emphasis:aZ(pZ),strong:aZ(pZ),link:aZ(pZ),monospace:aZ(pZ),strikethrough:aZ(pZ),inserted:aZ(),deleted:aZ(),changed:aZ(),invalid:aZ(),meta:yZ,documentMeta:aZ(yZ),annotation:aZ(yZ),processingInstruction:aZ(yZ),definition:GX.defineModifier(`definition`),constant:GX.defineModifier(`constant`),function:GX.defineModifier(`function`),standard:GX.defineModifier(`standard`),local:GX.defineModifier(`local`),special:GX.defineModifier(`special`)};for(let e in $){let t=$[e];t instanceof GX&&(t.name=e)}var bZ=$X([{tag:$.link,class:`tok-link`},{tag:$.heading,class:`tok-heading`},{tag:$.emphasis,class:`tok-emphasis`},{tag:$.strong,class:`tok-strong`},{tag:$.keyword,class:`tok-keyword`},{tag:$.atom,class:`tok-atom`},{tag:$.bool,class:`tok-bool`},{tag:$.url,class:`tok-url`},{tag:$.labelName,class:`tok-labelName`},{tag:$.inserted,class:`tok-inserted`},{tag:$.deleted,class:`tok-deleted`},{tag:$.literal,class:`tok-literal`},{tag:$.string,class:`tok-string`},{tag:$.number,class:`tok-number`},{tag:[$.regexp,$.escape,$.special($.string)],class:`tok-string2`},{tag:$.variableName,class:`tok-variableName`},{tag:$.local($.variableName),class:`tok-variableName tok-local`},{tag:$.definition($.variableName),class:`tok-variableName tok-definition`},{tag:$.special($.variableName),class:`tok-variableName2`},{tag:$.definition($.propertyName),class:`tok-propertyName tok-definition`},{tag:$.typeName,class:`tok-typeName`},{tag:$.namespace,class:`tok-namespace`},{tag:$.className,class:`tok-className`},{tag:$.macroName,class:`tok-macroName`},{tag:$.propertyName,class:`tok-propertyName`},{tag:$.operator,class:`tok-operator`},{tag:$.comment,class:`tok-comment`},{tag:$.meta,class:`tok-meta`},{tag:$.invalid,class:`tok-invalid`},{tag:$.punctuation,class:`tok-punctuation`}]),xZ=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new SZ(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.reducePos=this.pos=n+e.length;this.pushState(t,n),this.buffer.push(r,n,i,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new CZ(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216)){if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.storeNode(this.curContext.hash,this.reducePos,this.reducePos,-3,!0)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new SZ(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},SZ=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},CZ=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},wZ=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function TZ(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var EZ=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},DZ=new EZ,OZ=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=DZ,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=DZ,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},kZ=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;MZ(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};kZ.prototype.contextual=kZ.prototype.fallback=kZ.prototype.extend=!1;var AZ=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?TZ(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(MZ(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};AZ.prototype.contextual=kZ.prototype.fallback=kZ.prototype.extend=!1;var jZ=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function MZ(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||PZ(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function NZ(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function PZ(e,t,n,r){let i=NZ(n,r,t);return i<0||NZ(n,r,e)<i}var FZ=typeof process<`u`&&/\bparse\b/.test({}.LOG),IZ=null;function LZ(e,t,n){let r=e.cursor(xX.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var RZ=class{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?LZ(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?LZ(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;if(e<this.safeFrom)return null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof SX){let n=a>this.lastRepeatPos&&i.type.id>=this.minRepeat;if(a==e||n){let t=a+i.length,r;if(a>=this.safeFrom&&t<=this.safeTo&&(!(r=i.prop(mX.lookAhead))||t+r<this.fragment.to)&&(n&&(this.lastRepeat=i,this.lastRepeatPos=a),a==e))return i}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},zZ=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new EZ)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if((!n||c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new EZ,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new EZ,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535){if(o[s+1]==1)s=KZ(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(KZ(o,s+2),t,n,r));break}}o[s]==t&&(r=this.putAction(KZ(o,s+1),t,n,r))}return r}},BZ=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new OZ(t,r),this.tokens=new zZ(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[xZ.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new RZ(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&qZ(r);if(e)return FZ&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw FZ&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return FZ&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}tryReuse(e,t,n,r){if(!n)return null;let i=e.curContext&&e.curContext.tracker.strict,a=i?e.curContext.hash:0;for(;n;){let o=this.parser.nodeSet.types[n.type.id]==n.type?this.parser.getGoto(e.state,n.type.id):-1;if(o>-1&&n.length&&(!i||(n.prop(mX.contextHash)||0)==a))return e.useNode(n,o,t),n;if(n.children.length==0||n.positions[0]>0)break;let s=n.children[0];if(s instanceof SX&&(!r||s.type.id>=this.parser.minRepeatTerm))n=s;else break}return null}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=FZ?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.reducePos<r&&e.buffer.length&&e.buffer[e.buffer.length-2]<=e.reducePos&&this.fragments.lastRepeatPos==e.reducePos&&this.tryReuse(e,e.reducePos,this.fragments.lastRepeat,!0)||this.tryReuse(e,r,this.fragments.nodeAt(r),!1);if(t)return FZ&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(t.type.id)})`),!0}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),FZ&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),FZ&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return VZ(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=FZ?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),FZ&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(FZ&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)FZ&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))FZ&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),FZ&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),VZ(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),SX.build({buffer:wZ.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(IZ||=new WeakMap).get(e);return t||IZ.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function VZ(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var HZ=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},UZ=e=>e,WZ=class{constructor(e){this.start=e.start,this.shift=e.shift||UZ,this.reduce=e.reduce||UZ,this.reuse=e.reuse||UZ,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},GZ=class e extends HX{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=mX[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new vX(t.map((t,i)=>_X.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=dX;let a=TZ(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(JZ),this.states=TZ(e.states,Uint32Array),this.data=TZ(e.stateData),this.goto=TZ(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new kZ(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new BZ(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535){if(n[i+1]==1)a=n[i=KZ(n,i+2)];else if(n[i+1]==2)return KZ(n,i+2);else break}if(a==t||a==0)return KZ(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=KZ(this.data,n+2);else break}r=t(KZ(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=KZ(this.data,n+2);else break}if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=JZ(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new HZ(e,n,r)}static deserialize(t){return new e(t)}};function KZ(e,t){return e[t]|e[t+1]<<16}function qZ(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function JZ(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var YZ=317,XZ=318,ZZ=1,QZ=2,$Z=3,eQ=4,tQ=319,nQ=321,rQ=322,iQ=5,aQ=6,oQ=0,sQ=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],cQ=125,lQ=59,uQ=47,dQ=42,fQ=43,pQ=45,mQ=60,hQ=44,gQ=63,_Q=46,vQ=91,yQ=new WZ({start:!1,shift(e,t){return t==iQ||t==aQ||t==nQ?e:t==rQ},strict:!1}),bQ=new jZ((e,t)=>{let{next:n}=e;(n==cQ||n==-1||t.context)&&e.acceptToken(tQ)},{contextual:!0,fallback:!0}),xQ=new jZ((e,t)=>{let{next:n}=e,r;sQ.indexOf(n)>-1||(n!=uQ||(r=e.peek(1))!=uQ&&r!=dQ)&&n!=cQ&&n!=lQ&&n!=-1&&!t.context&&e.acceptToken(YZ)},{contextual:!0}),SQ=new jZ((e,t)=>{e.next==vQ&&!t.context&&e.acceptToken(XZ)},{contextual:!0}),CQ=new jZ((e,t)=>{let{next:n}=e;if(n==fQ||n==pQ){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(ZZ);e.acceptToken(n?ZZ:QZ)}}else n==gQ&&e.peek(1)==_Q&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken($Z))},{contextual:!0});function wQ(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var TQ=new jZ((e,t)=>{if(e.next!=mQ||!t.dialectEnabled(oQ)||(e.advance(),e.next==uQ))return;let n=0;for(;sQ.indexOf(e.next)>-1;)e.advance(),n++;if(wQ(e.next,!0)){for(e.advance(),n++;wQ(e.next,!1);)e.advance(),n++;for(;sQ.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==hQ)return;for(let t=0;;t++){if(t==7){if(!wQ(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(eQ,-n)}),EQ=XX({"get set async static":$.modifier,"for while do if else switch try catch finally return throw break continue default case defer":$.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":$.operatorKeyword,"let var const using function class extends":$.definitionKeyword,"import export from":$.moduleKeyword,"with debugger new":$.keyword,TemplateString:$.special($.string),super:$.atom,BooleanLiteral:$.bool,this:$.self,null:$.null,Star:$.modifier,VariableName:$.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":$.function($.variableName),VariableDefinition:$.definition($.variableName),Label:$.labelName,PropertyName:$.propertyName,PrivatePropertyName:$.special($.propertyName),"CallExpression/MemberExpression/PropertyName":$.function($.propertyName),"FunctionDeclaration/VariableDefinition":$.function($.definition($.variableName)),"ClassDeclaration/VariableDefinition":$.definition($.className),"NewExpression/VariableName":$.className,PropertyDefinition:$.definition($.propertyName),PrivatePropertyDefinition:$.definition($.special($.propertyName)),UpdateOp:$.updateOperator,"LineComment Hashbang":$.lineComment,BlockComment:$.blockComment,Number:$.number,String:$.string,Escape:$.escape,ArithOp:$.arithmeticOperator,LogicOp:$.logicOperator,BitOp:$.bitwiseOperator,CompareOp:$.compareOperator,RegExp:$.regexp,Equals:$.definitionOperator,Arrow:$.function($.punctuation),": Spread":$.punctuation,"( )":$.paren,"[ ]":$.squareBracket,"{ }":$.brace,"InterpolationStart InterpolationEnd":$.special($.brace),".":$.derefOperator,", ;":$.separator,"@":$.meta,TypeName:$.typeName,TypeDefinition:$.definition($.typeName),"type enum interface implements namespace module declare":$.definitionKeyword,"abstract global Privacy readonly override":$.modifier,"is keyof unique infer asserts":$.operatorKeyword,JSXAttributeValue:$.attributeValue,JSXText:$.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":$.angleBracket,"JSXIdentifier JSXNameSpacedName":$.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":$.attributeName,"JSXBuiltin/JSXIdentifier":$.standard($.tagName)}),DQ={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},OQ={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},kQ={__proto__:null,"<":193},AQ=GZ.deserialize({version:14,states:"$GSQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O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S%km,qU(h#h#i#lS.[(i(jQ.`(kQ0v+`Q3[.]U3].^._.aS7U3^3_R9b7Vd#^W#W#Z%h(U(_*Z+[.V/or#gZm#h#i#l%e(i(j(k+`.].^._.a3^3_7VS*^$x*cQ/v*_Q2W,qQ2m-WQ4b/rQ6s2fQ7u4cQ9Y6tT=n'X+^V#aW%h*ZU#`W%h*ZS(V#W(_U([#Z+[/oS-]'X+^T.Q(U.VV'_!e%i*[Q$lfR)y$qT)n$l)oR4X/WT*`$x*cT*i${*ZQ0y+hQ1i,XQ3a.hQ5v1kQ6R1sQ7Z3eQ8t6UQ9e7YQ:`8sQ:r9dQ;]:bQ;e:tQ;p;^R;s;fnqOXst!Z#d%m&r&t&u&w,u,z2^2aQ&l!VR,j&itmOXst!U!V!Z#d%m&i&r&t&u&w,u,z2^2aR,q&oT%lm,qR1m,ZR,i&gQ&U|S,P&V&WR1`,QR+u&PT&p!W&sT&q!W&sT2`,z2a",nodeNames:`⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem`,maxTerm:381,context:yQ,nodeProps:[[`isolate`,-8,5,6,14,37,39,51,53,55,``],[`group`,-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,`Statement`,-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,`Expression`,-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,`Type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,7],SingleExpression:[1,277],SingleClassItem:[2,278]},dialects:{jsx:0,ts:15179},dynamicPrecedences:{80:1,82:1,94:1,170:1,200:1},specialized:[{term:328,get:e=>DQ[e]||-1},{term:344,get:e=>OQ[e]||-1},{term:95,get:e=>kQ[e]||-1}],tokenPrec:15205}),jQ=1,MQ=194,NQ=195,PQ=196,FQ=197,IQ=198,LQ=199,RQ=200,zQ=2,BQ=3,VQ=201,HQ=24,UQ=25,WQ=49,GQ=50,KQ=55,qQ=56,JQ=57,YQ=59,XQ=60,ZQ=61,QQ=62,$Q=63,e$=65,t$=238,n$=71,r$=241,i$=242,a$=243,o$=244,s$=245,c$=246,l$=247,u$=248,d$=72,f$=249,p$=250,m$=251,h$=252,g$=253,_$=254,v$=255,y$=256,b$=73,x$=77,S$=263,C$=112,w$=130,T$=151,E$=152,D$=155,O$=10,k$=13,A$=32,j$=9,M$=35,N$=40,P$=46,F$=123,I$=125,L$=39,R$=34,z$=92,B$=111,V$=120,H$=78,U$=117,W$=85,G$=new Set([UQ,WQ,GQ,S$,e$,w$,qQ,JQ,t$,QQ,$Q,d$,b$,x$,XQ,ZQ,T$,E$,D$,C$]);function K$(e){return e==O$||e==k$}function q$(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}var J$=new jZ((e,t)=>{let n;if(e.next<0)e.acceptToken(LQ);else if(t.context.flags&X$)K$(e.next)&&e.acceptToken(IQ,1);else if(((n=e.peek(-1))<0||K$(n))&&t.canShift(FQ)){let t=0;for(;e.next==A$||e.next==j$;)e.advance(),t++;(e.next==O$||e.next==k$||e.next==M$)&&e.acceptToken(FQ,-t)}else K$(e.next)&&e.acceptToken(PQ,1)},{contextual:!0}),Y$=new jZ((e,t)=>{let n=t.context;if(n.flags)return;let r=e.peek(-1);if(r==O$||r==k$){let t=0,r=0;for(;;){if(e.next==A$)t++;else if(e.next==j$)t+=8-t%8;else break;e.advance(),r++}t!=n.indent&&e.next!=O$&&e.next!=k$&&e.next!=M$&&(t<n.indent?e.acceptToken(NQ,-r):e.acceptToken(MQ))}}),X$=1,Z$=2,Q$=4,$$=8,e1=16,t1=32;function n1(e,t,n){this.parent=e,this.indent=t,this.flags=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n+(n<<6)}var r1=new n1(null,0,0);function i1(e){let t=0;for(let n=0;n<e.length;n++)t+=e.charCodeAt(n)==j$?8-t%8:1;return t}var a1=new Map([[r$,0],[i$,Q$],[a$,$$],[o$,12],[s$,e1],[c$,20],[l$,24],[u$,28],[f$,t1],[p$,36],[m$,40],[h$,44],[g$,48],[_$,52],[v$,56],[y$,60]].map(([e,t])=>[e,t|Z$])),o1=new WZ({start:r1,reduce(e,t,n,r){return e.flags&X$&&G$.has(t)||(t==n$||t==d$)&&e.flags&Z$?e.parent:e},shift(e,t,n,r){return t==MQ?new n1(e,i1(r.read(r.pos,n.pos)),0):t==NQ?e.parent:t==HQ||t==KQ||t==YQ||t==BQ?new n1(e,0,X$):a1.has(t)?new n1(e,0,a1.get(t)|e.flags&X$):e},hash(e){return e.hash}}),s1=new jZ(e=>{for(let t=0;t<5;t++){if(e.next!=`print`.charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let n=e.peek(t);if(n!=A$&&n!=j$){n!=N$&&n!=P$&&n!=O$&&n!=k$&&n!=M$&&e.acceptToken(jQ);return}}}),c1=new jZ((e,t)=>{let{flags:n}=t.context,r=n&Q$?R$:L$,i=(n&$$)>0,a=!(n&e1),o=(n&t1)>0,s=e.pos;for(;!(e.next<0);)if(o&&e.next==F$){if(e.peek(1)==F$)e.advance(2);else{if(e.pos==s){e.acceptToken(BQ,1);return}break}}else if(a&&e.next==z$){if(e.pos==s){e.advance();let t=e.next;t>=0&&(e.advance(),l1(e,t)),e.acceptToken(zQ);return}break}else if(e.next==z$&&!a&&e.peek(1)>-1)e.advance(2);else if(e.next==r&&(!i||e.peek(1)==r&&e.peek(2)==r)){if(e.pos==s){e.acceptToken(VQ,i?3:1);return}break}else if(e.next==O$){if(i)e.advance();else if(e.pos==s){e.acceptToken(VQ);return}break}else e.advance();e.pos>s&&e.acceptToken(RQ)});function l1(e,t){if(t==B$)for(let t=0;t<2&&e.next>=48&&e.next<=55;t++)e.advance();else if(t==V$)for(let t=0;t<2&&q$(e.next);t++)e.advance();else if(t==U$)for(let t=0;t<4&&q$(e.next);t++)e.advance();else if(t==W$)for(let t=0;t<8&&q$(e.next);t++)e.advance();else if(t==H$&&e.next==F$){for(e.advance();e.next>=0&&e.next!=I$&&e.next!=L$&&e.next!=R$&&e.next!=O$;)e.advance();e.next==I$&&e.advance()}}var u1=XX({'async "*" "**" FormatConversion FormatSpec':$.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":$.controlKeyword,"in not and or is del":$.operatorKeyword,"from def class global nonlocal lambda":$.definitionKeyword,import:$.moduleKeyword,"with as print":$.keyword,Boolean:$.bool,None:$.null,VariableName:$.variableName,"CallExpression/VariableName":$.function($.variableName),"FunctionDefinition/VariableName":$.function($.definition($.variableName)),"ClassDefinition/VariableName":$.definition($.className),PropertyName:$.propertyName,"CallExpression/MemberExpression/PropertyName":$.function($.propertyName),Comment:$.lineComment,Number:$.number,String:$.string,FormatString:$.special($.string),Escape:$.escape,UpdateOp:$.updateOperator,"ArithOp!":$.arithmeticOperator,BitOp:$.bitwiseOperator,CompareOp:$.compareOperator,AssignOp:$.definitionOperator,Ellipsis:$.punctuation,At:$.meta,"( )":$.paren,"[ ]":$.squareBracket,"{ }":$.brace,".":$.derefOperator,", ;":$.separator}),d1={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},f1=GZ.deserialize({version:14,states:"##jQ`QeOOP$}OSOOO&WQtO'#HUOOQS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comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard`,maxTerm:277,context:o1,nodeProps:[[`isolate`,-5,4,71,72,73,77,``],[`group`,-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,`Statement Statement`,-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,`Expression`,-10,114,116,119,121,122,126,128,133,135,138,`Statement`,-9,143,144,147,148,150,151,152,153,154,`Pattern`],[`openedBy`,23,`(`,54,`[`,58,`{`],[`closedBy`,24,`)`,55,`]`,59,`}`]],propSources:[u1],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tu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O%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[s1,Y$,J$,c1,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:e=>d1[e]||-1}],tokenPrec:7668}),p1=new Map;function m1(e){let t=p1.get(e);return t||(t=e===`python`?f1:AQ.configure({dialect:e}),p1.set(e,t)),t}var h1={javascript:``,js:``,mjs:``,cjs:``,node:``,"node.js":``,nodejs:``,jsx:`jsx`,react:`jsx`,typescript:`ts`,ts:`ts`,tsx:`jsx ts`,python:`python`,python3:`python`,py:`python`};function g1(e){if(!e)return;let t=e.trim().toLowerCase();return Object.hasOwn(h1,t)?h1[t]:void 0}function _1(e,t){let n=e.startParse(t),r=performance.now()+300;for(;;){let e=n.advance();if(e)return e;if(performance.now()>r)return}}function v1(e,t){let n=g1(t);if(n===void 0)return;let r=[[]];try{let t=_1(m1(n),e);if(!t)return;nZ(e,t,bZ,(e,t)=>r[r.length-1].push(t?{text:e,className:t}:{text:e}),()=>r.push([]))}catch{return}if(r.map(e=>e.map(e=>e.text).join(``)).join(`
|
|
535
|
+
`)===e)return r}var y1=36,b1=92,x1=96,S1=32,C1=e=>e!==null&&e<-2,w1=e=>e===null||e<0||e===S1,T1=e=>e!==null&&e>=48&&e<=57;function E1(e,t,n){let r=0,i=0,a,o=null,s=t=>t===y1?(e.consume(t),r+=1,s):r>2||r===1&&w1(t)?n(t):(e.exit(`mathTextSequence`),c(t)),c=t=>{if(t===null||t===x1)return n(t);if(t===y1)return a=e.enter(`mathTextSequence`),i=0,d(t);if(t===S1||C1(t)){let n=t===S1?`space`:`lineEnding`;return e.enter(n),e.consume(t),e.exit(n),o=t,c}return e.enter(`mathTextData`),l(t)},l=t=>t===null||t===x1||t===S1||t===y1||C1(t)?(e.exit(`mathTextData`),c(t)):(e.consume(t),o=t,t===b1?u:l),u=t=>t!==y1&&t!==b1?l(t):(e.consume(t),o=t,l),d=s=>s===y1?(e.consume(s),i+=1,d):i===r?T1(s)||r===1&&w1(o)?n(s):(e.exit(`mathTextSequence`),e.exit(`mathText`),t(s)):r===1?n(s):(a.type=`mathTextData`,l(s));return t=>(e.enter(`mathText`),e.enter(`mathTextSequence`),s(t))}function D1(){for(let e of this.data().micromarkExtensions??[]){let t=e.text?.[y1];t&&(e.text[y1]={...t,tokenize:E1})}}var O1=/^(?:[ \t>]|[-*+][ \t]|\d{1,9}[.)][ \t])*\[(?:[^[\]\\]|\\[\s\S]){1,999}\]:/m,k1=/^ {0,3}<[a-z/!?]/im,A1=/^ {0,3}(?:[-*+]|\d{1,9}[.)])(?:[ \t]|$)/,j1=/^ {0,3}(`{3,}(?=[^`]*$)|~{3,})/,M1=/^ {0,3}(\$\$+)[^$]*$/,N1=/^ {0,3}(`+|~+|\$+)[ \t]*$/;function*P1(e){let t=0;for(let n of e.matchAll(/\r\n?|\n/g)){let r=n.index+n[0].length;yield{text:e.slice(t,n.index),start:t,next:r},t=r}t<e.length&&(yield{text:e.slice(t),start:t,next:e.length})}function F1(e){if(O1.test(e)||k1.test(e))return[e];let t=[],n=0,r,i=!1,a=!1,o=!1,s=!1;for(let{text:c,start:l}of P1(e)){if(r&&i&&c.trim()!==``&&!/^\s/.test(c))break;if(r)r(c)&&(r=void 0);else if(c.trim()===``)a=!0;else{let u=A1.test(c);a&&!/^\s/.test(c)&&!(u&&o)&&!(s&&L1.test(c))&&(t.push(e.slice(n,l)),n=l,o=!1),o||=u,s=/^\s/.test(c),a=!1,r=J1(c),i=o&&/^\s/.test(c)}}return t.push(e.slice(n)),t}function I1(e){let t=0;for(;e[t]===`$`;)t++;if(t<2||e.indexOf(`$`,t)!==-1)return;let n=t,r=e.length;for(;n<r&&(e[n]===` `||e[n]===` `);)n++;for(;r>n&&(e[r-1]===` `||e[r-1]===` `);)r--;return{fence:e.slice(0,t),rest:e.slice(n,r)}}var L1=/^ {0,3}(?:>|(?:[-*+]|\d{1,9}[.)])(?:[ \t]|$))/,R1=/^ {0,3}(?:#{1,6}(?:[ \t]|$)|(?:(?:\*[ \t]*){3,}|(?:-[ \t]*){3,}|(?:_[ \t]*){3,})$)/;function z1(e){let t=B1(e),n=new Map,r=0;for(let[i,a]of[...P1(e)].entries())n.set(r,a.start),r+=t[i].length;n.set(r,e.length);let i=F1(t.join(``));r=0;let a=[];for(let t of i){let o=n.get(r),s=n.get(r+=t.length);if(o===void 0||s===void 0)return i.map(e=>({text:e,source:e}));a.push({text:t,source:e.slice(o,s)})}return a}function B1(e){let t=[...P1(e)].map(t=>({text:t.text,ending:e.slice(t.start+t.text.length,t.next)})),n=t.map(e=>e.text+e.ending);if(!e.includes(`$$`)||k1.test(e)||e.startsWith(``))return n;let r,i,a=U1;for(let[e,{text:o,ending:s}]of t.entries()){let t=s||`
|
|
536
|
+
`;if(r)r(o)&&(r=void 0);else if(i){let r=N1.exec(o)?.[1];if(r?.[0]===`$`&&r.length>=i)i=void 0;else{let r=q1(o,i);if(r&&K1(G1(a,o.slice(0,r.start)))){let a=o.slice(0,r.start),c=H1(o.slice(r.end).trim());n[e]=(a.trim()?a+t:``)+o.slice(r.start,r.end)+(c?t+c:``)+s,i=void 0}else a=G1(a,o)}}else if(/^[ \t]/.test(o)){if(j1.test(o.trimStart())||M1.test(o.trimStart()))break}else if(j1.test(o))r=J1(o);else{let r=I1(o);if(r){let{fence:o,rest:c}=r;i=o.length,a=c?G1(U1,c):U1,c&&(n[e]=o+t+c+s)}}}return n}var V1=new RegExp([L1.source,R1.source,"^(?:`{3}|~{3}|\\$\\$)",`^\\[(?:[^\\]\\\\]|\\\\.)*(?:\\]:|$)`,`^<(?![a-z][a-z\\d+.-]{1,31}:[^\\s<>]*>|[^\\s<>@]+@[^\\s<>]+>)[a-z/!?]`].join(`|`));function H1(e){return V1.test(e)?/^\d/.test(e)?e.replace(/^(\d+)/,`$1\\`):`\\${e}`:e}var U1={depth:0,uncertain:!1},W1=new Set([`verb`,`def`,`gdef`,`edef`,`xdef`,`let`,`futurelet`,`newcommand`,`renewcommand`,`providecommand`,`catcode`,`csname`,`expandafter`,`noexpand`,`includegraphics`]);function G1(e,t){if(e.uncertain)return e;let n=e.depth;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`){let r=e+1;for(;r<t.length&&/[a-zA-Z@]/.test(t[r]);)r++;let i=t.slice(e+1,r);if(W1.has(i)||i.includes(`@`)||i.startsWith(`if`))return{depth:n,uncertain:!0};e=r>e+1?r-1:e+1}else if(r===`%`)return{depth:n,uncertain:!0};else r===`{`?n++:r===`}`&&(n=Math.max(0,n-1))}return{depth:n,uncertain:!1}}var K1=e=>!e.uncertain&&e.depth===0;function q1(e,t){for(let n=0;n<e.length;n++){if(e[n]===`\\`){n++;continue}if(e[n]!==`$`)continue;let r=n;for(;e[r]===`$`;)r++;if(r-n>=t)return{start:n,end:r};n=r-1}}function J1(e){let t=j1.exec(e)?.[1]??M1.exec(e)?.[1];if(t)return e=>{let n=N1.exec(e)?.[1];return n!==void 0&&n[0]===t[0]&&n.length>=t.length}}var Y1=5e4,X1=32,Z1=200,Q1=/\[{33}/,$1=/\*{1001}|_{1001}|~{1001}/,e0=/^[ \t]*(?:(?:>|[-*+](?=[ \t])|\d{1,9}[.)](?=[ \t]))[ \t]*)+/,t0=/>|[-*+]|\d{1,9}[.)]/g;function n0(e){let t=[],n=0,r=0,i,a=(a,o)=>{let s=e.slice(n,a);t.push(e[n]===`$`?{kind:`math`,text:s}:{kind:`code`,text:s,code:e.slice(r,o)}),n=a,i=void 0};for(let o of P1(e))if(i)i(o.text)&&a(o.next,o.start);else{let a=/^\s/.test(o.text)?void 0:J1(o.text);a&&(o.start>n&&t.push({kind:`prose`,text:e.slice(n,o.start)}),n=o.start,r=o.next,i=a)}return i?a(e.length,e.length):n<e.length&&t.push({kind:`prose`,text:e.slice(n)}),t}function r0(e){return e.length>Y1?!0:O1.test(e)||k1.test(e)?i0(e):n0(e).some(e=>e.kind===`prose`&&i0(e.text))}function i0(e){for(let{text:t}of P1(e)){if(Q1.test(t)||$1.test(t)||/^[ \t]*/.exec(t)[0].length>Z1)return!0;let e=e0.exec(t)?.[0];if(e&&(e.match(t0)?.length??0)>X1)return!0}return!1}var a0=[`http:`,`https:`,`mailto:`];function o0(e){try{let t=new URL(e);return a0.includes(t.protocol)?t.href:``}catch{return``}}function s0(){return(e,t)=>{let n=String(t.value),r=e=>{for(let t of e.children??[]){let e=t.position?.start.offset;t.type===`inlineMath`&&e!==void 0&&n.startsWith(`$$`,e)&&(t.data={...t.data,hProperties:{...t.data?.hProperties,className:[`language-math`,`math-display`]}}),r(t)}};r(e)}}var c0=[Tq,Lq,D1,s0],l0=tX().use(SJ).use(c0).use(DY,{allowDangerousHtml:!0}),u0=1e3,d0=new Map;function f0(e,t){let n=`${t?`D`:`I`}${e}`,r=d0.get(n);if(r!==void 0)return d0.delete(n),d0.set(n,r),r;let i;try{i=kV.renderToString(e,{displayMode:t,trust:!1,strict:`ignore`,throwOnError:!1,errorColor:`var(--destructive)`})}catch{return}return d0.set(n,i),d0.size>u0&&d0.delete(d0.keys().next().value),i}var p0=e=>{let t=e.properties.className;return Array.isArray(t)?t.map(String):[]},m0=e=>e?.type===`element`&&e.tagName===`code`&&p0(e).includes(`language-math`),h0=e=>e.children.map(e=>e.type===`text`?e.value:``).join(``);function g0(e){let t=p0(e).find(e=>e.startsWith(`language-`))?.slice(9),n=v1(h0(e),t);n&&(e.children=n.flatMap((e,t)=>[...t>0?[{type:`text`,value:`
|
|
537
|
+
`}]:[],...e.map(e=>e.className?{type:`element`,tagName:`span`,properties:{className:e.className.split(` `)},children:[{type:`text`,value:e.text}]}:{type:`text`,value:e.text})]))}function _0(e){let t=[...e.value.matchAll(tj)];if(t.length===0)return;let n=[],r=0;for(let i of t){let t=e.value.slice(r,i.index).replace(/[ \t]+$/,``);t&&n.push({type:`text`,value:t}),n.push({type:`element`,tagName:`span`,properties:{dataCitation:i[1]},children:[]}),r=i.index+i[0].length}return r<e.value.length&&n.push({type:`text`,value:e.value.slice(r)}),n}function v0(e){let t=l0.runSync(l0.parse(e),e),n=[],r=(e,t)=>{let r=f0(e,t);return r===void 0?{type:`element`,tagName:`span`,properties:{className:[`katex-error`]},children:[{type:`text`,value:e}]}:(n.push(r),{type:`element`,tagName:`span`,properties:{className:[`math-text-formula`],dataFormula:n.length-1},children:[]})};return MU(t,(e,t,n)=>{if(delete e.position,n&&t!==void 0){if(e.type===`raw`)n.children[t]={type:`text`,value:e.value};else{if(e.type===`text`){let r=_0(e);return r?(n.children.splice(t,1,...r),t+r.length):void 0}if(e.type===`element`){if(e.tagName===`pre`&&e.children.length===1&&m0(e.children[0]))return n.children[t]=r(h0(e.children[0]).replace(/\n$/,``),!0),`skip`;if(e.tagName===`pre`&&e.children.length===1&&e.children[0].type===`element`&&e.children[0].tagName===`code`)return g0(e.children[0]),`skip`;if(m0(e))return n.children[t]=r(h0(e),p0(e).includes(`math-display`)),`skip`;if(e.tagName===`code`)return`skip`;for(let[t,n]of Object.entries(eI))Object.hasOwn(e.properties,t)&&(n===null||n.includes(e.tagName))&&(e.properties[t]=o0(String(e.properties[t]??``)))}}}}),{tree:t,formulas:n}}var y0=8e3,b0=250,x0=2e3,S0=/\\(?:[gex]?def|let|futurelet|(?:re|provide)?newcommand|(?:re)?newenvironment)(?![a-zA-Z])/,C0=300,w0=class{entries=new Map;get(e){let t=this.entries.get(e);return t!==void 0&&(this.entries.delete(e),this.entries.set(e,t)),t}set(e,t){this.entries.delete(e),this.entries.set(e,t),this.entries.size>C0&&this.entries.delete(this.entries.keys().next().value)}};function T0(e){try{return v0(e)}catch{return`plain`}}function E0(){let e=new w0,t=t=>{let n=e.get(t);return n===void 0&&e.set(t,n=T0(t)),n};return{peek:t,render:async e=>t(e),dispose(){}}}function D0(e,t={}){let{timeoutMs:n=y0,cancelGraceMs:r=b0,syncLimit:i=x0}=t,a=new w0,o=[],s,c,l=1,u=()=>{if(s)return s;let t=e();return t.onmessage=e=>{s===t&&c?.job.id===e.data.id&&f(e.data.block??`plain`)},t.onerror=()=>{s===t&&(c?m(`plain`):p())},s=t},d=(e,t)=>{e.signal.removeEventListener(`abort`,e.onAbort),e.resolve(e.signal.aborted?void 0:t)},f=e=>{let t=c;c=void 0,clearTimeout(t.deadline),clearTimeout(t.grace),e!==void 0&&a.set(t.job.text,e),d(t.job,e),h()},p=()=>{s?.terminate(),s=void 0},m=e=>{p(),f(e)},h=()=>{for(;!c&&o.length>0;){let e=o.shift(),t=a.get(e.text);if(t!==void 0)d(e,t);else{c={job:e,deadline:setTimeout(()=>m(`plain`),n)};try{u().postMessage({id:e.id,text:e.text})}catch{m(`plain`)}}}};return{peek(e){let t=a.get(e);if(t!==void 0||e.length>i||S0.test(e))return t;let n=T0(e);return a.set(e,n),n},dispose(){for(let e of o.splice(0))d(e,void 0);c?m(void 0):p()},render(e,t){return t.aborted?Promise.resolve(void 0):new Promise(n=>{let i={id:l++,text:e,signal:t,resolve:n,onAbort:()=>{let e=o.indexOf(i);e>=0?(o.splice(e,1),d(i,void 0)):c?.job===i&&c.grace===void 0&&(c.grace=setTimeout(()=>m(void 0),r))}};t.addEventListener(`abort`,i.onAbort),o.push(i),h()})}}}var O0=(0,v.memo)(function({source:e,display:t}){let n=f0(e,t);return n===void 0?(0,M.jsx)(`span`,{className:`katex-error`,children:e}):(0,M.jsx)(`span`,{className:`math-text-formula`,dangerouslySetInnerHTML:{__html:n}})});function k0({source:e}){return(0,M.jsx)(O0,{source:e,display:!0})}function A0({block:e}){return(0,v.useMemo)(()=>SF(e.tree,{Fragment:v.Fragment,jsx:M.jsx,jsxs:M.jsxs,components:{a:({href:e,children:t})=>e?(0,M.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,M.jsx)(`span`,{children:t}),span:t=>{let n=t[`data-citation`];if(n!==void 0)return(0,M.jsx)($F,{refId:String(n)});let r=t[`data-formula`];return r===void 0?(0,M.jsx)(`span`,{className:t.className,children:t.children}):(0,M.jsx)(`span`,{className:`math-text-formula`,dangerouslySetInnerHTML:{__html:e.formulas[Number(r)]??``}})},img:({alt:e})=>e?(0,M.jsx)(`span`,{children:e}):null,table:e=>(0,M.jsx)(`div`,{className:`math-text-scroll`,children:(0,M.jsx)(`table`,{children:e.children})}),h1:`h4`,h2:`h4`,h3:`h5`,h4:`h6`,h5:`h6`},passKeys:!0,ignoreInvalidStyle:!0}),[e])}function j0({text:e}){return n0(e).map((e,t)=>e.kind===`code`?(0,M.jsx)(`pre`,{children:(0,M.jsx)(`code`,{children:e.code})},t):(0,M.jsx)(`p`,{className:`math-text-literal`,children:e.text.replace(nj,``)},t))}var M0=class extends v.Component{state={};componentDidCatch(){this.setState({failedText:this.props.text})}render(){return this.state.failedText===this.props.text?(0,M.jsx)(j0,{text:this.props.text}):this.props.children}},N0;function P0(){return N0??=typeof Worker>`u`?E0():D0(()=>new Worker(new URL(`/assets/render.worker-OksjuBjV.js`,``+import.meta.url),{type:`module`,name:`mivra-render`})),N0}var F0=(0,v.createContext)(void 0);function sie(e){let t=(0,v.useContext)(F0)??P0(),n=e===void 0?void 0:t.peek(e),[r,i]=(0,v.useState)(),a=(0,v.useRef)(void 0);(0,v.useEffect)(()=>{if(e===void 0||n!==void 0)return;let r=new AbortController;return t.render(e,r.signal).then(t=>{t!==void 0&&i({text:e,result:t})}),()=>r.abort()},[t,e,n]);let o=n??(r&&r.text===e?r.result:void 0);return(0,v.useEffect)(()=>{o!==void 0&&(a.current=o)}),e===void 0?void 0:o??a.current}var I0=(0,v.memo)(function({text:e,source:t}){let n=(0,v.useMemo)(()=>r0(e),[e]),r=sie(n?void 0:e);return n||r===void 0||r===`plain`?(0,M.jsx)(j0,{text:t}):(0,M.jsx)(M0,{text:t,children:(0,M.jsx)(A0,{block:r})})}),L0=2e4;function R0(e,t){let n=0,r=0;for(;r<e.length&&(r===0||n<t);)n+=e[r++].text.length;return r}function z0({text:e,className:t}){let n=(0,v.useDeferredValue)(e),r=(0,v.useMemo)(()=>z1(n),[n]),[i,a]=(0,v.useState)(L0),o=R0(r,i);return(0,v.useEffect)(()=>{if(o>=r.length)return;let e=r.slice(0,o).reduce((e,t)=>e+t.text.length,0),t=setTimeout(()=>a(t=>Math.max(t,e)+L0),0);return()=>clearTimeout(t)},[o,r]),(0,M.jsx)(`div`,{className:t,children:r.slice(0,o).map((e,t)=>(0,M.jsx)(I0,{text:e.text,source:e.source},t))})}function B0({text:e,className:t}){let n=(0,v.useMemo)(()=>hO(e),[e]);return(0,M.jsx)(`span`,{className:`${t} math-text-literal`,children:n.map((e,t)=>`formula`in e?(0,M.jsx)(O0,{source:e.formula,display:!1},t):e.text)})}function V0({text:e,mode:t=`block`,className:n,citations:r=!1}){let i=n?`math-text ${n}`:`math-text`;return t===`math`?(0,M.jsx)(B0,{text:e,className:i}):r?(0,M.jsx)(H0,{text:e,className:i}):(0,M.jsx)(z0,{text:e,className:i})}function H0({text:e,className:t}){let n=rj(e).join(` `),r=(0,v.useMemo)(()=>new Map(n?n.split(` `).map((e,t)=>[e,t+1]):[]),[n]);return(0,M.jsx)(YF.Provider,{value:r,children:(0,M.jsx)(z0,{text:e,className:t})})}function U0({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`card`,className:j(`flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm`,e),...t})}function W0({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`card-content`,className:j(`px-6`,e),...t})}var G0=1500,K0={active:`bg-secondary ring-2 ring-inset ring-foreground`,done:`bg-success/15 ring-1 ring-inset ring-success`,muted:`bg-muted text-muted-foreground`},q0={current:`bg-foreground text-background`,other:`bg-sunken text-muted-foreground ring-1 ring-inset ring-border-strong`};function J0(e){let t=e-1,[n,r]=(0,v.useState)(0),[i,a]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!i)return;if(n>=t){a(!1);return}let e=setTimeout(()=>r(e=>Math.min(e+1,t)),G0);return()=>clearTimeout(e)},[i,n,t]);let o=e=>{a(!1),r(Math.max(0,Math.min(e,t)))};return{index:n,last:t,playing:i,go:o,togglePlay:()=>{if(i)return a(!1);n>=t&&r(0),a(!0)},onKeyDown:e=>{if(e.key===`ArrowLeft`)o(n-1);else if(e.key===`ArrowRight`)o(n+1);else return;e.preventDefault()}}}function Y0({children:e,label:t=`Formula, scrolls sideways`,className:n}){let r=(0,v.useRef)(null),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(!1),c=()=>{r.current&&a(r.current.scrollWidth>r.current.clientWidth)};return(0,v.useLayoutEffect)(c),(0,v.useEffect)(()=>{let e=new ResizeObserver(c);return e.observe(r.current),document.fonts.ready.then(c),()=>e.disconnect()},[]),(0,M.jsx)(`span`,{ref:r,className:j(`step-scroll block min-w-0 overflow-x-auto overflow-y-hidden`,n),"data-testid":`step-scroll`,...i?{role:`group`,"aria-label":t}:{},tabIndex:i?0:o?-1:void 0,onFocus:()=>s(!0),onBlur:e=>s(document.activeElement===e.currentTarget),onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.stopPropagation()},children:e})}function X0({children:e}){return(0,M.jsx)(Y0,{children:(0,M.jsx)(`span`,{"aria-hidden":`true`,children:e})})}function Z0({stepper:e,play:t=!1,placement:n=`footer`,children:r}){let{index:i,last:a,playing:o,go:s,togglePlay:c}=e;if(a<=0)return null;let l=`bg-card dark:bg-card border-border-strong dark:border-border-strong hover:bg-sunken dark:hover:bg-sunken hover:text-foreground aria-disabled:cursor-not-allowed aria-disabled:opacity-45`;return(0,M.jsxs)(`div`,{"data-slot":n===`footer`?`artifact-footer`:`artifact-controls`,className:j(`bg-sunken/55 flex flex-wrap items-center gap-x-4 gap-y-2.5 px-3.5 py-2.5`,n===`footer`?`rounded-b-xl border-t`:`border-b`),children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,className:l,onClick:()=>s(i-1),"aria-disabled":i===0,children:[(0,M.jsx)(kh,{}),`Prev`]}),t&&(0,M.jsxs)(N,{type:`button`,size:`sm`,className:`min-w-20`,onClick:c,children:[o?(0,M.jsx)(f_,{className:`fill-current`}):(0,M.jsx)(dee,{className:`fill-current`}),o?`Pause`:`Play`]}),(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,className:l,onClick:()=>s(i+1),"aria-disabled":i===a,children:[`Next`,(0,M.jsx)(jh,{})]}),r]}),(0,M.jsxs)(`div`,{className:`ml-auto flex min-w-0 max-w-full items-center gap-3`,children:[(0,M.jsx)(`span`,{className:`flex min-w-0 gap-[3px]`,"aria-hidden":`true`,"data-testid":`step-pips`,children:a<24&&Array.from({length:a+1},(e,t)=>(0,M.jsx)(`i`,{className:j(`h-[3px] w-3 min-w-[2px] shrink rounded-full`,t<i?`bg-muted-foreground`:t===i?`bg-foreground`:`bg-border-strong`)},t))}),(0,M.jsxs)(`span`,{className:`text-muted-foreground font-mono text-xs whitespace-nowrap`,"aria-hidden":`true`,"data-testid":`step-counter`,children:[`Step `,i+1,` of `,a+1]})]})]})}function Q0({className:e,...t}){return(0,M.jsx)(U0,{"data-artifact-card":``,className:j(`border-border-strong shadow-paper gap-0 py-0 whitespace-normal`,e),...t})}function $0({kind:e,kindId:t,aside:n,children:r}){return(0,M.jsxs)(`div`,{"data-slot":`artifact-header`,className:`flex min-w-0 flex-wrap items-baseline gap-x-3.5 gap-y-1 border-b px-4 py-3 sm:px-5`,children:[(0,M.jsx)(`span`,{id:t,className:`text-accent-foreground shrink-0 font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:e}),r,n&&(0,M.jsx)(`span`,{className:`text-muted-foreground ml-auto font-mono text-[0.6875rem] leading-snug tracking-[0.09em] uppercase`,children:n})]})}function e2({id:e,text:t}){return(0,M.jsx)(`h3`,{className:`font-heading min-w-0 flex-[1_1_12rem] text-[1.0625rem] leading-snug font-medium`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(`span`,{id:e,children:(0,M.jsx)(V0,{text:t,mode:`math`})})})})}function t2({className:e,...t}){return(0,M.jsx)(W0,{className:j(`flex flex-col gap-3 px-4 py-4 sm:px-5 sm:py-5`,e),...t})}function n2({index:e}){return(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`border-border-strong text-muted-foreground grid size-6 shrink-0 place-items-center rounded-[6px] border font-mono text-[0.72rem] font-medium`,"data-testid":`option-key`,children:e<26?String.fromCharCode(65+e):``})}function r2({code:e,lines:t}){let n=(0,v.useMemo)(()=>CO(e.source),[e.source]),r=(0,v.useMemo)(()=>v1(n.join(`
|
|
538
|
+
`),e.language),[n,e.language]),i=new Set(t),a=(0,v.useRef)(null),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!1),u=()=>{a.current&&s(a.current.scrollWidth>a.current.clientWidth)};return(0,v.useLayoutEffect)(u),(0,v.useEffect)(()=>{let e=new ResizeObserver(u);return e.observe(a.current),document.fonts.ready.then(u),()=>e.disconnect()},[]),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col rounded-md border`,"data-testid":`code-pane`,children:[(0,M.jsx)(`div`,{className:`text-muted-foreground border-b px-3 py-1 font-mono text-xs`,"aria-hidden":`true`,children:e.language}),(0,M.jsx)(`div`,{ref:a,role:`region`,"aria-label":`Code, ${e.language}${o?`, scrolls sideways`:``}`,className:`min-w-0 overflow-x-auto py-2`,"data-testid":`code-scroll`,tabIndex:o?0:c?-1:void 0,onFocus:()=>l(!0),onBlur:e=>l(document.activeElement===e.currentTarget),onKeyDown:e=>{o&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.stopPropagation()},children:(0,M.jsx)(`pre`,{className:`w-max min-w-full font-mono text-xs leading-relaxed [tab-size:4]`,children:(0,M.jsx)(`code`,{children:n.map((e,t)=>{let n=i.has(t+1);return(0,M.jsxs)(`span`,{className:j(`flex border-l-2 pr-3`,n?`bg-muted border-foreground text-foreground`:`border-transparent`),"data-testid":`code-line`,"data-active":n||void 0,"aria-current":n?`true`:void 0,children:[(0,M.jsx)(`span`,{className:`text-muted-foreground w-9 shrink-0 pr-3 text-right select-none`,children:t+1}),(0,M.jsx)(`span`,{className:`whitespace-pre`,children:e?(0,M.jsx)(i2,{text:e,tokens:r?.[t]}):` `}),n&&(0,M.jsx)(`span`,{className:`sr-only`,children:` (current line)`})]},t)})})})})]})}function i2({text:e,tokens:t}){return t?t.map((e,t)=>e.className?(0,M.jsx)(`span`,{className:e.className,children:e.text},t):e.text):e}var a2={active:``,done:`, done`,muted:`, ruled out`};function o2(e,t){let n=e.values;for(let r of e.steps.slice(0,t+1))r.values&&(n=r.values);let r=e.steps[t];return{values:n,explanation:r?.explanation??``,pointers:r?.pointers??[],ranges:r?.ranges??[],variables:r?.variables??[],lines:r?.lines??[]}}function s2(e,t){return e.length===t.length?t.flatMap((t,n)=>t===e[n]?[]:[` Index ${n} is now ${String(t)}.`]).join(``):` The sequence is now ${t.map(String).join(`, `)}.`}function c2({view:e}){let{spec:t}=e,n=J0(t.steps.length),r=(0,v.useId)(),i=(0,v.useId)(),a=o2(t,n.index),o=(0,v.useRef)({index:n.index,from:a.values});o.current.index!==n.index&&(o.current={index:n.index,from:o2(t,o.current.index).values});let s=a.values.length,c=a.ranges.filter(e=>e.start<=e.end&&e.end<s),l=a.pointers.filter(e=>e.index<s),u=t.code?CO(t.code.source):[],d=a.lines.filter(e=>e>=1&&e<=u.length),f=e=>{let t=c.find(t=>t.start<=e&&e<=t.end);return t?t.tone??`active`:void 0},p=(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`p`,{className:`sr-only`,"data-testid":`trace-description`,children:[`Values: `,a.values.map((e,t)=>`index ${t}: ${String(e)}`).join(`, `)]}),(0,M.jsx)(Y0,{label:`Values, scrolls sideways`,className:`pb-1`,children:(0,M.jsxs)(`span`,{"aria-hidden":`true`,className:`inline-grid w-max gap-1 wrap-normal`,style:{gridTemplateColumns:`repeat(${s}, minmax(2.5rem, max-content))`},children:[c.map((e,t)=>(0,M.jsx)(`span`,{className:j(`min-h-5 rounded-sm px-1 text-center text-xs font-medium`,K0[e.tone??`active`]),style:{gridColumn:`${e.start+1} / ${e.end+2}`,gridRow:t+1},"data-testid":`trace-range`,children:e.label??` `},`range-${t}`)),a.values.map((e,t)=>{let n=f(t);return(0,M.jsxs)(`span`,{className:j(`bg-card border-border-strong relative grid h-11 place-items-center rounded-md border px-2 font-mono text-[0.95rem]`,n&&K0[n]),style:{gridColumn:t+1,gridRow:c.length+1},"data-testid":`trace-cell`,children:[String(e),(0,M.jsx)(`span`,{className:`text-muted-foreground absolute right-1 bottom-0 text-[0.6rem]`,children:t})]},`cell-${t}`)}),Array.from({length:s},(e,t)=>{let n=l.filter(e=>e.index===t).map(e=>e.name);return n.length?(0,M.jsxs)(`span`,{className:`text-foreground text-center font-mono text-xs font-medium`,style:{gridColumn:t+1,gridRow:c.length+2},"data-testid":`trace-pointer`,children:[`↑ `,n.join(`, `)]},`pointers-${t}`):null})]})}),a.variables.length>0&&(0,M.jsx)(`dl`,{className:`flex flex-wrap gap-2`,"aria-hidden":`true`,children:a.variables.map((e,t)=>(0,M.jsxs)(`div`,{className:`border-border-strong bg-card flex max-w-full min-w-0 gap-1.5 rounded-md border px-2 py-0.5 font-mono text-xs wrap-anywhere`,children:[(0,M.jsx)(`dt`,{className:`min-w-0`,children:e.name}),(0,M.jsxs)(`dd`,{className:`min-w-0`,children:[`= `,String(e.value)]})]},t))}),(0,M.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`trace-status`,children:[(0,M.jsxs)(`span`,{className:`sr-only`,children:[`Step `,n.index+1,` of `,n.last+1,`.`,` `]}),(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:a.explanation,mode:`math`})}),(0,M.jsxs)(`span`,{className:`sr-only`,children:[s2(o.current.from,a.values),l.map(e=>` ${e.name} points to index ${e.index}, value ${String(a.values[e.index])}.`),c.map(e=>` ${e.label?`${e.label} covers`:`Highlighted:`} indices ${e.start} through ${e.end}${a2[e.tone??`active`]}.`),a.variables.map(e=>` ${e.name} = ${String(e.value)}.`),d.map(e=>` Code line ${e}: ${u[e-1].trim()||`blank`}.`)]})]})]});return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":`${r} ${i}`,tabIndex:0,onKeyDown:n.onKeyDown,children:[(0,M.jsx)($0,{kind:`Algorithm trace`,kindId:i,children:(0,M.jsx)(e2,{id:r,text:t.title})}),(0,M.jsx)(t2,{children:t.code?(0,M.jsx)(`div`,{className:`@container`,children:(0,M.jsxs)(`div`,{className:`grid gap-3 @xl:grid-cols-2`,children:[(0,M.jsx)(r2,{code:t.code,lines:d}),(0,M.jsx)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:p})]})}):p}),(0,M.jsx)(Z0,{stepper:n,play:!0})]})}var l2=oe(`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current`}},defaultVariants:{variant:`default`}});function u2({className:e,variant:t,...n}){return(0,M.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:j(l2({variant:t}),e),...n})}function d2({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`alert-title`,className:j(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function f2({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`alert-description`,className:j(`col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}function p2({className:e,...t}){return(0,M.jsx)(`textarea`,{"data-slot":`textarea`,className:j(`flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40`,e),...t})}var m2=zO.timeMs+3e3,h2=12e4,g2=1e3,_2=`The runner was still busy with code from an earlier run, so it was restarted. Run again.`,v2=e=>e.kind===`stdio`?{kind:`stdio`,stdin:e.stdin}:{kind:`call`,args:e.args},y2=class extends Error{constructor(){super(`Stopped`)}},b2=e=>()=>e===`python`?new Worker(new URL(`/assets/exercise-workers/python-exercise.worker-DeTriNjh.js`,``+import.meta.url),{type:`module`,name:`mivra-python-exercise`}):new Worker(new URL(`/assets/exercise-workers/exercise.worker-LCHlYekD.js`,``+import.meta.url),{type:`module`,name:`mivra-exercise`});function x2({spawn:e=b2(`javascript`),hardLimitMs:t=m2,startupLimitMs:n}={}){let r,i=0,a,o=()=>{r&&=(clearInterval(r.heartbeat),r.worker.terminate(),void 0)},s=()=>{if(r)return r;let t={worker:e(),loaded:!1};return t.worker.addEventListener(`message`,(({data:e})=>{`pong`in e&&(t.pinged=void 0)})),r=t,t},c=e=>{n!==void 0&&e.loaded&&e===r&&(e.pinged=void 0,e.heartbeat=setInterval(()=>{e.pinged===void 0?(e.pinged=Date.now(),e.worker.postMessage({id:++i,kind:`ping`})):Date.now()-e.pinged>=t&&o()},g2))};return{run(e,r,l,{onStart:u}={}){let d=s();clearInterval(d.heartbeat);let{worker:f}=d,p=++i;return new Promise((i,s)=>{let m,h=()=>{clearTimeout(m),f.removeEventListener(`message`,y),f.removeEventListener(`error`,b),a=void 0},g=e=>{h(),c(d),i(e)},_=e=>{h(),o(),i({stdout:``,error:e})},v=()=>_(`Time limit exceeded (${zO.timeMs/1e3} s): the code ran too long, or never stopped.`),y=({data:e})=>{if(!(e.id!==p||`pong`in e)){if(`started`in e)d.loaded=!0,clearTimeout(m),m=setTimeout(v,t),u?.();else{if(e.restart)return h(),o(),i(e.ok?e.run:{stdout:``,error:e.error});e.ok?g(e.run):g({stdout:``,error:`The code couldn't run: ${e.error}`})}}},b=e=>{e.preventDefault(),_(`The code stopped the runner, probably by using too much memory.`)};n===void 0?(m=setTimeout(v,t),u?.()):m=d.loaded?setTimeout(()=>_(_2),t):setTimeout(()=>_(`Python took too long to start. Check your connection to Mivra and try again.`),n),a=()=>{h(),o(),s(new y2)},f.addEventListener(`message`,y),f.addEventListener(`error`,b),f.postMessage({id:p,kind:`case`,code:e,functionName:r,testCase:l})})},warm(){r||s().worker.postMessage({id:++i,kind:`warm`})},stop(){a?a():o()},dispose(){a?.(),o()}}}var S2=e=>x2(e===`python`?{spawn:b2(`python`),startupLimitMs:h2}:{spawn:b2(`javascript`)}),C2={javascript:`JavaScript`,python:`Python`},w2=e=>`mivra.exercise.${e}`;function T2(e){try{return localStorage.getItem(w2(e))??void 0}catch{return}}function E2(e,t){try{t===void 0?localStorage.removeItem(w2(e)):localStorage.setItem(w2(e),t)}catch{}}function D2(e,t){try{let n=JSON.parse(t);if(Array.isArray(n))return`${e??`f`}(${n.map(e=>JSON.stringify(e)).join(`, `)})`}catch{}return`${e??`f`}(…${t})`}function O2({label:e,text:t,tone:n}){return(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,M.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem] tracking-[0.06em] uppercase`,children:e}),(0,M.jsx)(`pre`,{className:j(`bg-sunken max-h-48 min-w-0 overflow-auto rounded-md px-3 py-2 font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,n===`error`&&`text-destructive`),children:t===``?(0,M.jsx)(`span`,{className:`text-muted-foreground italic`,children:`(nothing)`}):t})]})}function k2({index:e,testCase:t,run:n,passed:r,functionName:i,stderrLabel:a}){let o=`Case ${e+1}${t.hidden?` (hidden)`:``}`,s=r===void 0?`Not run`:r?`Passed`:`Failed`;return(0,M.jsxs)(`li`,{className:j(`flex min-w-0 flex-col gap-2 rounded-lg border px-3 py-2.5`,r===!0&&`border-success bg-success/5`,r===!1&&`border-destructive bg-destructive/5`),"data-testid":`exercise-case`,"data-result":r===void 0?`pending`:r?`passed`:`failed`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:o}),(0,M.jsxs)(`span`,{className:j(`ml-auto text-sm font-semibold`,r===!0?`text-success`:r===!1?`text-destructive`:`text-muted-foreground`),children:[r===!0?`✓ `:r===!1?`✗ `:``,s]})]}),!t.hidden&&(0,M.jsxs)(`div`,{className:`grid min-w-0 gap-2 @lg:grid-cols-2`,children:[t.kind===`call`?(0,M.jsx)(O2,{label:`Call`,text:D2(i,t.args)}):(0,M.jsx)(O2,{label:`Input`,text:t.stdin}),t.expected&&(`stdout`in t.expected?(0,M.jsx)(O2,{label:`Expected output`,text:t.expected.stdout}):(0,M.jsx)(O2,{label:`Expected return value`,text:t.expected.returned})),n&&n.error!==void 0&&(0,M.jsx)(O2,{label:`Error`,text:n.error,tone:`error`}),n&&n.error===void 0&&t.kind===`call`&&(0,M.jsx)(O2,{label:`Returned`,text:n.returned??``}),n&&(t.kind===`stdio`||n.stdout!==``)&&(0,M.jsx)(O2,{label:t.kind===`stdio`?`Your output`:`Printed`,text:n.stdout}),n?.stderr&&(0,M.jsx)(O2,{label:a,text:n.stderr})]}),t.hidden&&n?.error!==void 0&&r===!1&&(0,M.jsx)(`p`,{className:`text-destructive text-sm wrap-anywhere`,children:n.error})]})}function A2({view:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let{spec:i,latestAttempt:a}=e,o=a!==void 0,s=(0,v.useId)(),c=(0,v.useId)(),l=(0,v.useId)(),[u,d]=(0,v.useState)(()=>a?.answer.code??T2(e.id)??i.starterCode),[f,p]=(0,v.useState)(()=>a?.answer.results??[]),[m,h]=(0,v.useState)(),[g,_]=(0,v.useState)(),[y,b]=(0,v.useState)(),x=(0,v.useRef)(void 0),S=(0,v.useRef)(!1),C=i.language===`python`,w=C?` `:` `,T=()=>x.current??=S2(i.language);(0,v.useEffect)(()=>()=>x.current?.dispose(),[]),(0,v.useEffect)(()=>{a&&(d(a.answer.code),p(a.answer.results))},[a]);let E=a?.grade,D=(0,v.useMemo)(()=>i.cases.map((e,t)=>{if(E)return E.cases[t]?.passed;let n=f[t];return n&&e.expected?sk(e.expected,n):void 0}),[i.cases,f,E]),O=t=>{d(t),E2(e.id,t===i.starterCode?void 0:t)},k=async(e,t)=>{let n=T(),r=e===`submit`?[]:[...f];for(let e of t)r[e]=void 0;p(r),b(void 0),_(void 0);try{for(let[a,o]of t.entries())h({mode:e,done:a,total:t.length,starting:!0}),r[o]=await n.run(u,i.functionName,v2(i.cases[o]),{onStart:()=>h({mode:e,done:a,total:t.length})}),p([...r]);return r}catch(t){if(!(t instanceof y2))throw t;_(e===`submit`?`Stopped. Nothing was submitted.`:`Stopped.`);return}finally{h(void 0)}},ee=i.cases.flatMap((e,t)=>e.hidden?[]:[t]),te=async()=>{let e=await k(`run`,ee);if(!e)return;let t=ee.filter(t=>e[t]&&i.cases[t].expected&&sk(i.cases[t].expected,e[t])).length;_(`${t} of ${ee.length} visible ${ee.length===1?`case`:`cases`} passed.`)},ne=async()=>{if(u.length>5e4){b(`The code is too long to submit (over ${FO.toLocaleString(`en-US`)} characters).`);return}let t=await k(`submit`,i.cases.map((e,t)=>t));if(!t)return;h({mode:`submit`,done:i.cases.length,total:i.cases.length});let a={code:u,results:t},o=await OM(e.id,a);if(o.ok)return h(void 0),E2(e.id,void 0),n(o.view);b(o.error);try{await r()}catch{}finally{h(void 0)}},re=e=>{if(e.key===`Escape`){S.current=!0;return}let t=S.current;if(S.current=!1,e.key!==`Tab`||e.shiftKey||t||e.ctrlKey||e.altKey||e.metaKey)return;e.preventDefault();let n=e.currentTarget,{selectionStart:r,selectionEnd:i}=n,a=`${u.slice(0,r)}${w}${u.slice(i)}`;O(a),requestAnimationFrame(()=>n.setSelectionRange(r+w.length,r+w.length))},ie=m!==void 0,ae=o||t||ie,A=m?m.done>=m.total?`Submitting…`:m.starting&&C?`Starting Python… (the first run takes a few seconds)`:`Running case ${m.done+1} of ${m.total}…`:void 0;return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":s,children:[(0,M.jsx)($0,{kind:`Exercise`,aside:`${C2[i.language]} · runs in your browser`,children:(0,M.jsx)(e2,{id:s,text:i.title})}),(0,M.jsxs)(t2,{className:`@container gap-4`,children:[(0,M.jsx)(`div`,{className:`text-[0.95rem]`,"data-testid":`exercise-instructions`,children:(0,M.jsx)(V0,{text:i.instructions,mode:`block`})}),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,M.jsx)(`label`,{htmlFor:c,className:`text-sm font-medium`,children:o?`Your submitted code`:`Your code`}),(0,M.jsx)(p2,{id:c,"aria-describedby":l,value:u,onChange:e=>O(e.target.value),onKeyDown:re,onFocus:()=>{C&&!o&&T().warm()},readOnly:o||ie,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,wrap:`off`,className:j(`bg-card dark:bg-card min-h-40 resize-y overflow-x-auto font-mono text-xs leading-relaxed md:text-xs`,C?`[tab-size:4]`:`[tab-size:2]`),"data-testid":`exercise-editor`}),(0,M.jsxs)(`p`,{id:l,className:`text-muted-foreground text-xs`,children:[i.functionName?`Define ${i.functionName} at the top level. `:C?`Read input with input() or sys.stdin, and print with print(). `:`Read input with readLine() or stdin, and print with console.log. `,!o&&`Tab indents; press Escape then Tab to leave the editor.`]})]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[!o&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(N,{type:`button`,variant:`outline`,onClick:()=>void te(),disabled:ie,children:`Run`}),(0,M.jsx)(N,{type:`button`,onClick:()=>void ne(),disabled:ae,children:`Submit`})]}),ie&&m.done<m.total&&(0,M.jsx)(N,{type:`button`,variant:`destructive`,onClick:()=>x.current?.stop(),children:`Stop`}),!o&&!ie&&u!==i.starterCode&&(0,M.jsx)(N,{type:`button`,variant:`ghost`,onClick:()=>O(i.starterCode),children:`Reset code`})]}),(0,M.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2`,"data-testid":`exercise-status`,children:[A&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:A}),!A&&g&&(0,M.jsx)(`p`,{className:`text-sm`,children:g}),!o&&t&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Submit once the reply finishes. You can run your code now.`}),y&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,children:y}),E&&(0,M.jsxs)(u2,{className:`bg-sunken border-0 px-4 py-3`,children:[(0,M.jsx)(d2,{className:j(`font-heading text-[1.15rem] font-medium`,E.correct?`text-success`:`text-destructive`),children:E.correct?`All cases passed!`:`Not quite.`}),(0,M.jsxs)(f2,{className:`text-foreground`,children:[E.passed,` of `,E.total,` `,E.total===1?`case`:`cases`,` passed`,i.cases.some(e=>e.hidden)?`, hidden ones included`:``,`.`]})]})]}),(0,M.jsx)(`ol`,{className:`flex flex-col gap-2`,"aria-label":`Test cases`,children:i.cases.map((e,t)=>(0,M.jsx)(k2,{index:t,testCase:e,run:f[t],passed:D[t],functionName:i.functionName,stderrLabel:C?`stderr`:`console.error / warn`},t))})]})]})}var j2=200;function M2({output:e}){let t=(0,v.useRef)(null),[n,r]=(0,v.useState)({x:!1,y:!1}),[i,a]=(0,v.useState)(!1),o=()=>{let e=t.current;if(!e)return;let n={x:e.scrollWidth>e.clientWidth,y:e.scrollHeight>e.clientHeight};r(e=>e.x===n.x&&e.y===n.y?e:n)};(0,v.useLayoutEffect)(o),(0,v.useEffect)(()=>{let e=new ResizeObserver(o);return e.observe(t.current),document.fonts.ready.then(o),()=>e.disconnect()},[]);let s=n.x||n.y;return(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col rounded-md border`,"data-testid":`walkthrough-output`,children:[(0,M.jsx)(`div`,{className:`text-muted-foreground border-b px-3 py-1 font-mono text-xs`,children:`Output`}),(0,M.jsx)(`div`,{ref:t,role:`region`,"aria-label":`Output${s?`, scrolls`:``}`,className:`max-h-72 min-w-0 overflow-auto px-3 py-2`,"data-testid":`output-scroll`,tabIndex:s?0:i?-1:void 0,onFocus:()=>a(!0),onBlur:e=>a(document.activeElement===e.currentTarget),onKeyDown:e=>{n.x&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.stopPropagation()},children:e===``?(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs italic`,children:`No output yet`}):(0,M.jsx)(`pre`,{className:`w-max min-w-full font-mono text-xs leading-relaxed whitespace-pre [tab-size:4]`,"data-testid":`output-text`,children:e})})]})}function N2({view:e}){let{spec:t}=e,n=J0(t.steps.length),r=(0,v.useId)(),i=(0,v.useId)(),a=t.steps[n.index],o=CO(t.code.source),s=(a.lines??[]).filter(e=>e>=1&&e<=o.length),c=a.output===``?0:CO(a.output).length;return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":`${r} ${i}`,tabIndex:0,onKeyDown:n.onKeyDown,children:[(0,M.jsx)($0,{kind:`Illustrated walkthrough`,kindId:i,children:(0,M.jsx)(e2,{id:r,text:t.title})}),(0,M.jsxs)(t2,{children:[(0,M.jsx)(`div`,{className:`@container`,children:(0,M.jsxs)(`div`,{className:`grid gap-3 @xl:grid-cols-2`,children:[(0,M.jsx)(r2,{code:t.code,lines:s}),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,M.jsxs)(`section`,{className:`flex min-w-0 flex-col rounded-md border`,"aria-label":`Variables`,"data-testid":`walkthrough-variables`,children:[(0,M.jsx)(`div`,{className:`text-muted-foreground border-b px-3 py-1 font-mono text-xs`,"aria-hidden":`true`,children:`Variables`}),(0,M.jsx)(`div`,{className:`px-3 py-2`,children:a.variables.length===0?(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs italic`,children:`No variables at this step`}):(0,M.jsx)(`dl`,{className:`flex flex-col gap-1 font-mono text-xs`,children:a.variables.map(e=>(0,M.jsxs)(`div`,{className:`flex min-w-0 gap-1.5 wrap-anywhere`,"data-testid":`walkthrough-variable`,children:[(0,M.jsx)(`dt`,{className:`min-w-0`,children:e.name}),(0,M.jsxs)(`dd`,{className:`min-w-0`,children:[`= `,String(e.value)]})]},e.name))})})]}),(0,M.jsx)(M2,{output:a.output})]})]})}),(0,M.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`walkthrough-status`,className:`flex flex-col gap-1`,children:[(0,M.jsxs)(`span`,{className:`sr-only`,children:[`Step `,n.index+1,` of `,n.last+1,`.`,` `]}),a.label&&(0,M.jsxs)(`span`,{className:`text-muted-foreground font-mono text-xs`,"data-testid":`walkthrough-label`,children:[a.label,(0,M.jsx)(`span`,{className:`sr-only`,children:`.`})]}),(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:a.explanation,mode:`math`})}),(0,M.jsxs)(`span`,{className:`sr-only`,children:[s.map(e=>` Code line ${e}: ${o[e-1].trim()||`blank`}.`),a.variables.length===0?` No variables.`:a.variables.map(e=>` ${e.name} = ${String(e.value)}.`),a.output===``?` No output yet.`:a.output.length<=j2?` Output: ${a.output}`:` Output: ${c} ${c===1?`line`:`lines`}, in the output pane.`]})]})]}),(0,M.jsx)(Z0,{stepper:n,play:!0})]})}var P2=3,F2=5,I2=8,L2=6,R2=3.5,z2=14,B2=e=>e.x+e.width,V2=e=>e.y+e.height,H2=e=>Math.round(e*10)/10;function U2(e,t,n){let[r,i]=e.x<=t.x?[e.x,t.x]:[t.x,e.x],[a,o]=e.y<=t.y?[e.y,t.y]:[t.y,e.y];return i>n.x-P2&&r<B2(n)+P2&&o>n.y-P2&&a<V2(n)+P2}var W2=class{used=new Map;next(e,t,n){let r=`${t}\u0000${e}`,i=this.used.get(r)??0;this.used.set(r,i+1);let a=n.y+Math.min(z2,n.height/2)+i*F2;return a<=V2(n)-P2||i===0?a:void 0}};function G2(e,t,n,r,i){if(e<452)return{narrow:!0,connectors:[]};let a=new W2,o=new Map,s=e=>{let t=o.get(e)??0;return o.set(e,t+1),t},c=[];for(let o of i){let i=n.get(o.from),l=n.get(o.to);if(!i||!l||o.from===o.to||!(i.width>0&&i.height>0&&l.width>0&&l.height>0))continue;let u;if(B2(i)+12<=l.x||B2(l)+12<=i.x){let e=B2(i)<=l.x,[t,n]=e?[B2(i),l.x]:[B2(l),i.x],r=s(`g\u0000${Math.round(t)}\u0000${Math.round(n)}`),c=(r%2==0?r/2:-(r+1)/2)*F2,d=(t+n)/2+c,f=a.next(o.from,e?`right`:`left`,i),p=a.next(o.to,e?`left`:`right`,l),m=d-t>=7&&n-d>=7;if(f!==void 0&&p!==void 0&&m){let t=e?B2(i):i.x,n=e?l.x:B2(l);u=[{x:t,y:f},{x:d,y:f},{x:d,y:p},{x:n,y:p}]}}else if(V2(i)<=l.y||V2(l)<=i.y){let t=Math.max(B2(i),B2(l)),n=t+I2+s(`m\u0000${Math.round(t)}`)*F2,r=a.next(o.from,`right`,i),c=a.next(o.to,`right`,l);r!==void 0&&c!==void 0&&n<=e-1&&(u=[{x:B2(i),y:r},{x:n,y:r},{x:n,y:c},{x:B2(l),y:c}])}if(!u)continue;let d=[...[...n].filter(([e])=>e!==o.from&&e!==o.to).map(([,e])=>e),...r],f=u.slice(1).map((e,t)=>[u[t],e]);f.every(([e,t],n)=>!d.some(n=>U2(e,t,n))&&!(n===0?[l]:n===f.length-1?[i]:[i,l]).some(n=>U2(e,t,n)))&&!u.some(n=>n.x<0||n.y<0||n.x>e||n.y>t)&&c.push(K2(o.id,u))}return{narrow:!1,connectors:c}}function K2(e,t){let n=t.at(-1),r=t.at(-2),i=Math.hypot(n.x-r.x,n.y-r.y)||1,[a,o]=[(n.x-r.x)/i,(n.y-r.y)/i],s={x:n.x-a*L2,y:n.y-o*L2},c=[n,{x:s.x-o*R2,y:s.y+a*R2},{x:s.x+o*R2,y:s.y-a*R2}];return{id:e,path:[...t.slice(0,-1),s].map((e,t)=>`${t?`L`:`M`}${H2(e.x)} ${H2(e.y)}`).join(` `),arrow:c.map(e=>`${H2(e.x)},${H2(e.y)}`).join(` `),points:t}}var q2=`cubic-bezier(0.2, 0, 0, 1)`,J2=`[data-testid="composition-entity"]`,Y2=`[data-composition-obstacle]`,X2=`[tabindex], a[href], button, input, select, textarea`,Z2=(e,t)=>[...e.querySelectorAll(J2)].find(e=>e.dataset.entity===t),Q2=()=>typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function $2(e,t){let n=e.getBoundingClientRect();return{x:n.left-t.left,y:n.top-t.top,width:n.width,height:n.height}}function e4(e,t){let n=0,r=0,i=e;for(;i&&i!==t;)n+=i.offsetLeft,r+=i.offsetTop,i=i.offsetParent;return i===t?{x:n,y:r,width:e.offsetWidth,height:e.offsetHeight}:$2(e,t.getBoundingClientRect())}var t4=(e,t)=>e.narrow===t.narrow&&e.connectors.length===t.connectors.length&&e.connectors.every((e,n)=>e.id===t.connectors[n].id&&e.path===t.connectors[n].path);function n4(e,t,n,r,i){let a=(0,v.useRef)(t),o=(0,v.useRef)(null),s=(0,v.useRef)([]),c=(0,v.useRef)(0),l=(0,v.useRef)(0),u=(0,v.useRef)(null),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)({narrow:!1,connectors:[]}),h=(0,v.useRef)(i);h.current=i;let g=()=>{for(let e of s.current)e.cancel();s.current=[],c.current++},_=(t,i)=>{let c=Math.max(0,Math.min(t,n)),l=e.current;o.current=null;let d=document.activeElement,p=l&&d instanceof HTMLElement&&l.contains(d)?d.closest(J2):null;if(u.current=p?{entity:p.dataset.entity,at:[...p.querySelectorAll(X2)].indexOf(d)}:null,c===a.current&&i===`seek`&&s.current.length&&(g(),f(!1)),l&&i===`step`&&Math.abs(c-a.current)===1&&!Q2()){let e=l.getBoundingClientRect();o.current={to:c,from:new Map([...l.querySelectorAll(J2)].map(t=>[t.dataset.entity,$2(t,e)]))}}r(c)};(0,v.useLayoutEffect)(()=>{if(a.current===t)return;a.current=t;let n=o.current?.to===t?o.current.from:void 0;o.current=null,g();let r=e.current,i=[];if(n&&r){let e=r.getBoundingClientRect();for(let t of r.querySelectorAll(J2)){let r=n.get(t.dataset.entity);if(!r||typeof t.animate!=`function`)continue;let a=$2(t,e),[o,s]=[r.x-a.x,r.y-a.y];Math.abs(o)<.5&&Math.abs(s)<.5||i.push(t.animate([{transform:`translate(${o}px, ${s}px)`},{transform:`none`}],{duration:320,easing:q2}))}}if(s.current=i,f(i.length>0),!i.length)return;let l=c.current;Promise.all(i.map(e=>e.finished)).then(()=>{c.current===l&&(s.current=[],f(!1))},()=>{})},[t]),(0,v.useEffect)(()=>{let t=u.current;if(u.current=null,!t)return;let n=setTimeout(()=>{let n=e.current,r=document.activeElement;if(!n||r&&r!==document.body&&r.isConnected)return;let i=Z2(n,t.entity)?.querySelectorAll(X2)[t.at];i?.focus({preventScroll:!0}),i&&document.activeElement===i||n.closest(`[data-testid="composition"]`)?.focus({preventScroll:!0})});return()=>clearTimeout(n)},[t]);let y=()=>{let t=e.current;if(!t)return;let n=new Map([...t.querySelectorAll(J2)].map(e=>[e.dataset.entity,e4(e,t)])),r=[...t.querySelectorAll(Y2)].map(e=>e4(e,t)),i=G2(t.clientWidth,t.clientHeight,n,r,h.current);m(e=>t4(e,i)?e:i)};return(0,v.useLayoutEffect)(y),(0,v.useEffect)(()=>{let t=e.current;if(!t)return;l.current=t.clientWidth;let n=!0,r=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{t.clientWidth!==l.current&&(l.current=t.clientWidth,s.current.length&&(g(),f(!1))),y()});r?.observe(t);for(let e of t.querySelectorAll(J2))r?.observe(e);return document.fonts?.ready.then(()=>{n&&y()}),()=>{n=!1,r?.disconnect()}},[t]),(0,v.useEffect)(()=>g,[]),{layout:p,moving:d,navigate:_}}var r4={active:`, current`,done:`, done`,muted:`, muted`},i4=e=>e===``?`""`:String(e);function a4({view:e}){let{spec:t}=e,n=J0(t.steps.length),{index:r,last:i,go:a}=n,o=(0,v.useId)(),s=(0,v.useId)(),c=xk(t,r),l=nre(t,r),u=(0,v.useRef)(null),{layout:d,moving:f,navigate:p}=n4(u,r,i,a,c.connections),m=new Set(d.connectors.map(e=>e.id)),h=(0,v.useRef)({index:r,moved:!1});h.current.index!==r&&(h.current={index:r,moved:!0});let g=e=>{if(e.key===`Home`)p(0,`seek`);else if(e.key===`End`)p(i,`seek`);else if(e.key===`ArrowLeft`)p(r-1,`step`);else if(e.key===`ArrowRight`)p(r+1,`step`);else return;e.preventDefault()},_=(0,M.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:l.map((e,t)=>(0,M.jsx)(`li`,{"data-testid":`composition-change`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:e.text,mode:`math`})})},t))});return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":`${o} ${s}`,tabIndex:0,onKeyDown:g,"data-testid":`composition`,children:[(0,M.jsx)($0,{kind:`Composition`,kindId:s,children:(0,M.jsx)(e2,{id:o,text:t.title})}),(0,M.jsxs)(Z0,{stepper:{...n,go:e=>p(e,`step`)},placement:`header`,children:[(0,M.jsxs)(N,{type:`button`,variant:`ghost`,size:`sm`,className:`aria-disabled:cursor-not-allowed aria-disabled:opacity-45`,onClick:()=>p(0,`seek`),"aria-disabled":r===0,children:[(0,M.jsx)(C_,{}),`Restart`]}),(0,M.jsx)(`select`,{"aria-label":`Go to step`,className:`border-border-strong bg-card focus-visible:ring-ring/50 h-8 max-w-[11rem] min-w-0 truncate rounded-md border px-2 font-mono text-xs outline-none focus-visible:ring-[3px]`,value:r,onChange:e=>p(Number(e.target.value),`seek`),onKeyDown:e=>e.stopPropagation(),"data-testid":`composition-seek`,children:t.steps.map((e,t)=>(0,M.jsx)(`option`,{value:t,children:`Step ${t+1}${e.label?`: ${e.label}`:``}`},t))})]}),(0,M.jsxs)(t2,{children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,"data-testid":`composition-step`,children:[c.label&&(0,M.jsx)(`p`,{className:`bg-sunken w-fit max-w-full rounded-md px-2 py-0.5 font-mono text-sm`,"data-testid":`composition-step-label`,children:(0,M.jsx)(Y0,{label:`Step label, scrolls sideways`,children:(0,M.jsx)(`span`,{className:`whitespace-pre`,children:c.label})})}),(0,M.jsx)(`p`,{className:`leading-normal`,"data-testid":`composition-explanation`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:c.explanation,mode:`math`})})}),(0,M.jsxs)(`div`,{className:`text-muted-foreground text-sm`,"data-testid":`composition-changes`,children:[(0,M.jsx)(`p`,{className:`font-mono text-[0.6875rem] font-medium tracking-[0.06em] uppercase`,children:r===0?`At the start`:`What changed`}),l.length?_:(0,M.jsx)(`p`,{children:`Nothing visible changed.`})]})]}),(0,M.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`composition-status`,children:h.current.moved&&(0,M.jsxs)(M.Fragment,{children:[`Step `,r+1,` of `,i+1,`. `,c.label&&(0,M.jsxs)(M.Fragment,{children:[c.label,`. `]}),(0,M.jsx)(V0,{text:c.explanation,mode:`math`}),` `,l.map((e,t)=>(0,M.jsxs)(`span`,{children:[(0,M.jsx)(V0,{text:e.text,mode:`math`}),` `]},t))]})}),(0,M.jsxs)(`div`,{ref:u,className:`relative isolate grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,13.75rem),1fr))] items-start gap-3`,"data-testid":`composition-groups`,"data-moving":f||void 0,"data-narrow":d.narrow||void 0,children:[c.groups.map(e=>(0,M.jsx)(o4,{group:e,drawn:m},e.id)),(0,M.jsx)(`svg`,{className:j(`pointer-events-none absolute inset-0 z-0 size-full overflow-visible transition-opacity duration-150 motion-reduce:transition-none`,f&&`opacity-0`),"aria-hidden":`true`,fill:`none`,"data-testid":`composition-connectors`,children:d.connectors.map(e=>(0,M.jsxs)(`g`,{"data-testid":`composition-connector`,"data-connection":e.id,children:[(0,M.jsx)(`path`,{d:e.path,className:`stroke-muted-foreground`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`polygon`,{points:e.arrow,className:`fill-muted-foreground`})]},e.id))})]})]})]})}function o4({group:e,drawn:t}){let n=(0,v.useId)(),r=e.ordered?`ol`:`ul`;return(0,M.jsxs)(`section`,{className:`bg-sunken/55 flex min-w-0 flex-col gap-2 rounded-lg border p-2.5`,"aria-labelledby":n,"data-testid":`composition-group`,"data-group":e.id,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline justify-between gap-x-2`,"data-composition-obstacle":!0,children:[(0,M.jsx)(`h4`,{id:n,className:`min-w-0 text-sm font-semibold`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:e.label,mode:`math`})})}),e.ordered&&(0,M.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem]`,children:`first at top`})]}),e.entities.length?(0,M.jsx)(r,{className:`flex min-w-0 flex-col gap-2`,children:e.entities.map(e=>(0,M.jsx)(s4,{entity:e,drawn:t},e.id))}):(0,M.jsx)(`p`,{className:`text-muted-foreground rounded-md border border-dashed px-2 py-2 text-center text-xs`,"data-testid":`composition-empty`,"data-composition-obstacle":!0,children:`Empty`})]})}function s4({entity:e,drawn:t}){return(0,M.jsxs)(`li`,{className:j(`bg-card border-border-strong relative z-[1] flex min-w-0 flex-col gap-1.5 rounded-md border px-2.5 py-2`,e.tone&&K0[e.tone]),"data-testid":`composition-entity`,"data-entity":e.id,"data-tone":e.tone,children:[(0,M.jsxs)(`p`,{className:`min-w-0 font-medium`,children:[(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:e.label,mode:`math`})}),e.tone&&(0,M.jsx)(`span`,{className:`sr-only`,children:r4[e.tone]})]}),e.properties.length>0&&(0,M.jsx)(`dl`,{className:`grid min-w-0 grid-cols-[minmax(0,auto)_minmax(0,1fr)] gap-x-2 font-mono text-xs`,"data-testid":`composition-properties`,children:e.properties.map(e=>(0,M.jsxs)(`div`,{className:`contents`,"data-testid":`composition-property`,children:[(0,M.jsx)(`dt`,{className:`text-muted-foreground wrap-anywhere`,children:e.name}),(0,M.jsx)(`dd`,{className:`wrap-anywhere whitespace-pre-wrap`,children:i4(e.value)})]},e.name))}),e.body.map((e,t)=>(0,M.jsx)(c4,{block:e},t)),e.callout&&(0,M.jsx)(`p`,{className:`bg-sunken border-foreground/40 rounded-sm border-l-2 px-2 py-1 text-sm`,"data-testid":`composition-callout`,children:(0,M.jsxs)(Y0,{children:[(0,M.jsx)(`span`,{className:`sr-only`,children:`Note: `}),(0,M.jsx)(V0,{text:e.callout,mode:`math`})]})}),e.references.length>0&&(0,M.jsx)(`ul`,{className:`flex min-w-0 flex-wrap gap-1.5`,"aria-label":`References`,children:e.references.map(e=>(0,M.jsxs)(`li`,{className:`border-border-strong bg-card flex max-w-full min-w-0 items-baseline gap-1 rounded-full border px-2 py-0.5 text-xs`,"data-testid":`composition-reference`,"data-connection":e.connectionId,"data-to":e.to,"data-drawn":t.has(e.connectionId)||void 0,children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`→`}),(0,M.jsx)(`span`,{className:`sr-only`,children:`refers to `}),(0,M.jsx)(`span`,{className:`min-w-0 wrap-anywhere`,children:(0,M.jsx)(V0,{text:e.toLabel,mode:`math`})}),e.label&&(0,M.jsxs)(`span`,{className:`text-muted-foreground min-w-0 wrap-anywhere`,children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`· `}),(0,M.jsx)(`span`,{className:`sr-only`,children:`, as `}),(0,M.jsx)(V0,{text:e.label,mode:`math`})]})]},e.connectionId))})]})}function c4({block:e}){return e.type===`code`?(0,M.jsx)(r2,{code:{language:e.language,source:e.code},lines:[]}):e.type===`math`?(0,M.jsx)(`div`,{className:`min-w-0 text-sm`,"data-testid":`composition-math`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(k0,{source:e.source})})}):(0,M.jsx)(`p`,{className:`min-w-0 text-sm leading-snug`,"data-testid":`composition-text`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:e.text,mode:`math`})})})}var l4={again:`Again`,good:`Good`,easy:`Easy`},u4=[`again`,`good`,`easy`],d4=864e5;function f4(e,t=new Date){if(e.intervalDays===0)return`Back again this session`;let n=Math.ceil((new Date(e.dueAt).getTime()-t.getTime())/d4);return n<=0?`Due for review now`:`Next review in ${n.toLocaleString(`en`)} day${n===1?``:`s`}`}function p4({view:e,replyInProgress:t}){let{spec:n}=e,[r,i]=(0,v.useState)(0),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)({}),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(),p=(0,v.useId)(),m=(0,v.useId)(),h=(0,v.useRef)(!0);(0,v.useEffect)(()=>(h.current=!0,t||zM(e.id).then(e=>{h.current&&e.ok&&c(t=>({...Object.fromEntries(e.value.cards.map(e=>[e.cardId,e])),...t}))}),()=>{h.current=!1}),[e.id,t]);let g=n.cards.length-1,_=n.cards[Math.min(r,g)],y=s[_.id],b=e=>{i(Math.max(0,Math.min(g,e))),o(!1),f(void 0)},x=async t=>{if(l)return;u(!0),f(void 0);let n=await BM(e.id,_.id,t);if(h.current){if(u(!1),!n.ok)return f(n.error);c(e=>({...e,[_.id]:n.value})),r<g&&b(r+1)}},S=n.cards.filter(e=>s[e.id]).length;return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":`${p} ${m}`,"data-testid":`flashcard-deck`,children:[(0,M.jsx)($0,{kind:`Flashcards`,kindId:m,aside:`${S.toLocaleString(`en`)} of ${n.cards.length.toLocaleString(`en`)} rated`,children:(0,M.jsx)(e2,{id:p,text:n.title})}),(0,M.jsxs)(t2,{children:[(0,M.jsxs)(`p`,{className:`text-muted-foreground font-mono text-[0.72rem] tracking-[0.06em] uppercase`,"aria-live":`polite`,"data-testid":`flashcard-position`,children:[`Card `,(r+1).toLocaleString(`en`),` of `,n.cards.length.toLocaleString(`en`),a?` · answer`:` · question`]}),(0,M.jsx)(`button`,{type:`button`,className:`group focus-visible:ring-ring/50 block w-full rounded-xl text-left outline-none [perspective:1200px] focus-visible:ring-[3px]`,"aria-pressed":a,"aria-label":a?`Show the question`:`Show the answer`,onClick:()=>o(e=>!e),"data-testid":`flashcard`,children:(0,M.jsxs)(`div`,{className:j(`relative grid min-h-36 transition-transform duration-300 ease-out [transform-style:preserve-3d] motion-reduce:transition-none`,a&&`[transform:rotateY(180deg)]`),children:[(0,M.jsx)(`div`,{className:`bg-card border-border-strong col-start-1 row-start-1 flex items-center justify-center rounded-xl border px-5 py-6 text-center text-[1.0625rem] leading-snug [backface-visibility:hidden]`,"aria-hidden":a,"data-testid":`flashcard-front`,children:(0,M.jsx)(V0,{text:_.front,mode:`math`})}),(0,M.jsx)(`div`,{className:`bg-sunken border-border-strong col-start-1 row-start-1 flex items-center justify-center rounded-xl border px-5 py-6 text-center leading-normal [backface-visibility:hidden] [transform:rotateY(180deg)]`,"aria-hidden":!a,"data-testid":`flashcard-back`,children:(0,M.jsx)(V0,{text:_.back,mode:`math`})})]})}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>b(r-1),disabled:r===0,"aria-label":`Previous card`,children:[(0,M.jsx)(kh,{"aria-hidden":!0}),` Previous`]}),(0,M.jsxs)(N,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>o(e=>!e),children:[(0,M.jsx)(C_,{"aria-hidden":!0}),` `,a?`Show question`:`Flip`]}),(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>b(r+1),disabled:r===g,"aria-label":`Next card`,className:`ml-auto`,children:[`Next `,(0,M.jsx)(jh,{"aria-hidden":!0})]})]}),a&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 border-t pt-3`,role:`group`,"aria-label":`How well did you recall it?`,children:[(0,M.jsx)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:`How well did you recall it? Your rating only sets when this card comes back.`}),(0,M.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:u4.map(e=>(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,disabled:l||t,onClick:()=>void x(e),"data-rating":e,children:[l&&(0,M.jsx)(JF,{"aria-hidden":`true`}),l4[e]]},e))})]}),y&&(0,M.jsxs)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,"data-testid":`flashcard-schedule`,children:[`Rated `,l4[y.rating],` · `,f4(y)]}),d&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,children:d})]})]})}function m4(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return h4(this.cover(t,n),t,n,e)}function h4(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._y0,l=e._x1,u=e._y1,d,f,p,m,h,g,_,v;if(!a)return e._root=o,e;for(;a.length;)if((h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f,i=a,!(a=a[_=g<<1|h]))return i[_]=o,e;if(p=+e._x.call(null,a.data),m=+e._y.call(null,a.data),t===p&&n===m)return o.next=a,i?i[_]=o:e._root=o,e;do i=i?i[_]=[,,,,]:e._root=[,,,,],(h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f;while((_=g<<1|h)==(v=(m>=f)<<1|p>=d));return i[v]=a,i[_]=o,e}function g4(e){var t,n,r=e.length,i,a,o=Array(r),s=Array(r),c=1/0,l=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>d&&(d=a));if(c>u||l>d)return this;for(this.cover(c,l).cover(u,d),n=0;n<r;++n)h4(this,o[n],s[n],e[n]);return this}function _4(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,c,l;n>e||e>=i||r>t||t>=a;)switch(l=(t<r)<<1|e<n,c=[,,,,],c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function v4(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function y4(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function b4(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function x4(e,t,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,d=this._y1,f=[],p=this._root,m,h;for(p&&f.push(new b4(p,i,a,u,d)),n==null?n=1/0:(i=e-n,a=t-n,u=e+n,d=t+n,n*=n);m=f.pop();)if(!(!(p=m.node)||(o=m.x0)>u||(s=m.y0)>d||(c=m.x1)<i||(l=m.y1)<a)){if(p.length){var g=(o+c)/2,_=(s+l)/2;f.push(new b4(p[3],g,_,c,l),new b4(p[2],o,_,g,l),new b4(p[1],g,s,c,_),new b4(p[0],o,s,g,_)),(h=(t>=_)<<1|e>=g)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-h],f[f.length-1-h]=m)}else{var v=e-+this._x.call(null,p.data),y=t-+this._y.call(null,p.data),b=v*v+y*y;if(b<n){var x=Math.sqrt(n=b);i=e-x,a=t-x,u=e+x,d=t+x,r=p.data}}}return r}function S4(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,d,f,p,m,h,g,_;if(!n)return this;if(n.length)for(;;){if((m=u>=(f=(o+c)/2))?o=f:c=f,(h=d>=(p=(s+l)/2))?s=p:l=p,t=n,!(n=n[g=h<<1|m]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,_=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=a,this)}function C4(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function w4(){return this._root}function T4(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function E4(e){var t=[],n,r=this._root,i,a,o,s,c;for(r&&t.push(new b4(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(a+s)/2,u=(o+c)/2;(i=r[3])&&t.push(new b4(i,l,u,s,c)),(i=r[2])&&t.push(new b4(i,a,u,l,c)),(i=r[1])&&t.push(new b4(i,l,o,s,u)),(i=r[0])&&t.push(new b4(i,a,o,l,u))}return this}function D4(e){var t=[],n=[],r;for(this._root&&t.push(new b4(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(o+c)/2,d=(s+l)/2;(a=i[0])&&t.push(new b4(a,o,s,u,d)),(a=i[1])&&t.push(new b4(a,u,s,c,d)),(a=i[2])&&t.push(new b4(a,o,d,u,l)),(a=i[3])&&t.push(new b4(a,u,d,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function O4(e){return e[0]}function k4(e){return arguments.length?(this._x=e,this):this._x}function A4(e){return e[1]}function j4(e){return arguments.length?(this._y=e,this):this._y}function M4(e,t,n){var r=new N4(t??O4,n??A4,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function N4(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function P4(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var F4=M4.prototype=N4.prototype;F4.copy=function(){var e=new N4(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=P4(t),e;for(n=[{source:t,target:e._root=[,,,,]}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=[,,,,]}):t.target[i]=P4(r));return e},F4.add=m4,F4.addAll=g4,F4.cover=_4,F4.data=v4,F4.extent=y4,F4.find=x4,F4.remove=S4,F4.removeAll=C4,F4.root=w4,F4.size=T4,F4.visit=E4,F4.visitAfter=D4,F4.x=k4,F4.y=j4;function I4(e){return function(){return e}}function L4(e){return(e()-.5)*1e-6}function R4(e){return e.x+e.vx}function z4(e){return e.y+e.vy}function B4(e){var t,n,r,i=1,a=1;typeof e!=`function`&&(e=I4(e==null?1:+e));function o(){for(var e,o=t.length,c,l,u,d,f,p,m=0;m<a;++m)for(c=M4(t,R4,z4).visitAfter(s),e=0;e<o;++e)l=t[e],f=n[l.index],p=f*f,u=l.x+l.vx,d=l.y+l.vy,c.visit(h);function h(e,t,n,a,o){var s=e.data,c=e.r,m=f+c;if(s){if(s.index>l.index){var h=u-s.x-s.vx,g=d-s.y-s.vy,_=h*h+g*g;_<m*m&&(h===0&&(h=L4(r),_+=h*h),g===0&&(g=L4(r),_+=g*g),_=(m-(_=Math.sqrt(_)))/_*i,l.vx+=(h*=_)*(m=(c*=c)/(p+c)),l.vy+=(g*=_)*m,s.vx-=h*(m=1-m),s.vy-=g*m)}}else return t>u+m||a<u-m||n>d+m||o<d-m}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function c(){if(t){var r,i=t.length,a;for(n=Array(i),r=0;r<i;++r)a=t[r],n[a.index]=+e(a,r,t)}}return o.initialize=function(e,n){t=e,r=n,c()},o.iterations=function(e){return arguments.length?(a=+e,o):a},o.strength=function(e){return arguments.length?(i=+e,o):i},o.radius=function(t){return arguments.length?(e=typeof t==`function`?t:I4(+t),c(),o):e},o}function V4(e){return e.index}function H4(e,t){var n=e.get(t);if(!n)throw Error(`node not found: `+t);return n}function U4(e){var t=V4,n=d,r,i=I4(30),a,o,s,c,l,u=1;e??=[];function d(e){return 1/Math.min(s[e.source.index],s[e.target.index])}function f(t){for(var n=0,i=e.length;n<u;++n)for(var o=0,s,d,f,p,m,h,g;o<i;++o)s=e[o],d=s.source,f=s.target,p=f.x+f.vx-d.x-d.vx||L4(l),m=f.y+f.vy-d.y-d.vy||L4(l),h=Math.sqrt(p*p+m*m),h=(h-a[o])/h*t*r[o],p*=h,m*=h,f.vx-=p*(g=c[o]),f.vy-=m*g,d.vx+=p*(g=1-g),d.vy+=m*g}function p(){if(o){var n,i=o.length,l=e.length,u=new Map(o.map((e,n)=>[t(e,n,o),e])),d;for(n=0,s=Array(i);n<l;++n)d=e[n],d.index=n,typeof d.source!=`object`&&(d.source=H4(u,d.source)),typeof d.target!=`object`&&(d.target=H4(u,d.target)),s[d.source.index]=(s[d.source.index]||0)+1,s[d.target.index]=(s[d.target.index]||0)+1;for(n=0,c=Array(l);n<l;++n)d=e[n],c[n]=s[d.source.index]/(s[d.source.index]+s[d.target.index]);r=Array(l),m(),a=Array(l),h()}}function m(){if(o)for(var t=0,i=e.length;t<i;++t)r[t]=+n(e[t],t,e)}function h(){if(o)for(var t=0,n=e.length;t<n;++t)a[t]=+i(e[t],t,e)}return f.initialize=function(e,t){o=e,l=t,p()},f.links=function(t){return arguments.length?(e=t,p(),f):e},f.id=function(e){return arguments.length?(t=e,f):t},f.iterations=function(e){return arguments.length?(u=+e,f):u},f.strength=function(e){return arguments.length?(n=typeof e==`function`?e:I4(+e),m(),f):n},f.distance=function(e){return arguments.length?(i=typeof e==`function`?e:I4(+e),h(),f):i},f}var W4={value:()=>{}};function G4(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new K4(n)}function K4(e){this._=e}function q4(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}K4.prototype=G4.prototype={constructor:K4,on:function(e,t){var n=this._,r=q4(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=J4(n[i],e.name)))return i}else{if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Y4(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Y4(n[i],e.name,null);return this}},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new K4(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function J4(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Y4(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=W4,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var X4=0,Z4=0,Q4=0,$4=1e3,e3,t3,n3=0,r3=0,i3=0,a3=typeof performance==`object`&&performance.now?performance:Date,o3=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function s3(){return r3||=(o3(c3),a3.now()+i3)}function c3(){r3=0}function l3(){this._call=this._time=this._next=null}l3.prototype=u3.prototype={constructor:l3,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?s3():+n)+(t==null?0:+t),!this._next&&t3!==this&&(t3?t3._next=this:e3=this,t3=this),this._call=e,this._time=n,h3()},stop:function(){this._call&&(this._call=null,this._time=1/0,h3())}};function u3(e,t,n){var r=new l3;return r.restart(e,t,n),r}function d3(){s3(),++X4;for(var e=e3,t;e;)(t=r3-e._time)>=0&&e._call.call(void 0,t),e=e._next;--X4}function f3(){r3=(n3=a3.now())+i3,X4=Z4=0;try{d3()}finally{X4=0,m3(),r3=0}}function p3(){var e=a3.now(),t=e-n3;t>$4&&(i3-=t,n3=e)}function m3(){for(var e,t=e3,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:e3=n);t3=e,h3(r)}function h3(e){X4||(Z4&&=clearTimeout(Z4),e-r3>24?(e<1/0&&(Z4=setTimeout(f3,e-a3.now()-i3)),Q4&&=clearInterval(Q4)):(Q4||=(n3=a3.now(),setInterval(p3,$4)),X4=1,o3(f3)))}var g3=1664525,_3=1013904223,v3=4294967296;function y3(){let e=1;return()=>(e=(g3*e+_3)%v3)/v3}function b3(e){return e.x}function x3(e){return e.y}var S3=10,C3=Math.PI*(3-Math.sqrt(5));function w3(e){var t,n=1,r=.001,i=1-r**(1/300),a=0,o=.6,s=new Map,c=u3(d),l=G4(`tick`,`end`),u=y3();e??=[];function d(){f(),l.call(`tick`,t),n<r&&(c.stop(),l.call(`end`,t))}function f(r){var c,l=e.length,u;r===void 0&&(r=1);for(var d=0;d<r;++d)for(n+=(a-n)*i,s.forEach(function(e){e(n)}),c=0;c<l;++c)u=e[c],u.fx==null?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),u.fy==null?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return t}function p(){for(var t=0,n=e.length,r;t<n;++t){if(r=e[t],r.index=t,r.fx!=null&&(r.x=r.fx),r.fy!=null&&(r.y=r.fy),isNaN(r.x)||isNaN(r.y)){var i=S3*Math.sqrt(.5+t),a=t*C3;r.x=i*Math.cos(a),r.y=i*Math.sin(a)}(isNaN(r.vx)||isNaN(r.vy))&&(r.vx=r.vy=0)}}function m(t){return t.initialize&&t.initialize(e,u),t}return p(),t={tick:f,restart:function(){return c.restart(d),t},stop:function(){return c.stop(),t},nodes:function(n){return arguments.length?(e=n,p(),s.forEach(m),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(i=+e,t):+i},alphaTarget:function(e){return arguments.length?(a=+e,t):a},velocityDecay:function(e){return arguments.length?(o=1-e,t):1-o},randomSource:function(e){return arguments.length?(u=e,s.forEach(m),t):u},force:function(e,n){return arguments.length>1?(n==null?s.delete(e):s.set(e,m(n)),t):s.get(e)},find:function(t,n,r){var i=0,a=e.length,o,s,c,l,u;for(r==null?r=1/0:r*=r,i=0;i<a;++i)l=e[i],o=t-l.x,s=n-l.y,c=o*o+s*s,c<r&&(u=l,r=c);return u},on:function(e,n){return arguments.length>1?(l.on(e,n),t):l.on(e)}}}function T3(){var e,t,n,r,i=I4(-30),a,o=1,s=1/0,c=.81;function l(n){var i,a=e.length,o=M4(e,b3,x3).visitAfter(d);for(r=n,i=0;i<a;++i)t=e[i],o.visit(f)}function u(){if(e){var t,n=e.length,r;for(a=Array(n),t=0;t<n;++t)r=e[t],a[r.index]=+i(r,t,e)}}function d(e){var t=0,n,r,i=0,o,s,c;if(e.length){for(o=s=c=0;c<4;++c)(n=e[c])&&(r=Math.abs(n.value))&&(t+=n.value,i+=r,o+=r*n.x,s+=r*n.y);e.x=o/i,e.y=s/i}else{n=e,n.x=n.data.x,n.y=n.data.y;do t+=a[n.data.index];while(n=n.next)}e.value=t}function f(e,i,l,u){if(!e.value)return!0;var d=e.x-t.x,f=e.y-t.y,p=u-i,m=d*d+f*f;if(p*p/c<m)return m<s&&(d===0&&(d=L4(n),m+=d*d),f===0&&(f=L4(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)),t.vx+=d*e.value*r/m,t.vy+=f*e.value*r/m),!0;if(!(e.length||m>=s)){(e.data!==t||e.next)&&(d===0&&(d=L4(n),m+=d*d),f===0&&(f=L4(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)));do e.data!==t&&(p=a[e.data.index]*r/m,t.vx+=d*p,t.vy+=f*p);while(e=e.next)}}return l.initialize=function(t,r){e=t,n=r,u()},l.strength=function(e){return arguments.length?(i=typeof e==`function`?e:I4(+e),u(),l):i},l.distanceMin=function(e){return arguments.length?(o=e*e,l):Math.sqrt(o)},l.distanceMax=function(e){return arguments.length?(s=e*e,l):Math.sqrt(s)},l.theta=function(e){return arguments.length?(c=e*e,l):Math.sqrt(c)},l}function E3(e){var t=I4(.1),n,r,i;typeof e!=`function`&&(e=I4(e==null?0:+e));function a(e){for(var t=0,a=n.length,o;t<a;++t)o=n[t],o.vx+=(i[t]-o.x)*r[t]*e}function o(){if(n){var a,o=n.length;for(r=Array(o),i=Array(o),a=0;a<o;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return a.initialize=function(e){n=e,o()},a.strength=function(e){return arguments.length?(t=typeof e==`function`?e:I4(+e),o(),a):t},a.x=function(t){return arguments.length?(e=typeof t==`function`?t:I4(+t),o(),a):e},a}function D3(e){var t=I4(.1),n,r,i;typeof e!=`function`&&(e=I4(e==null?0:+e));function a(e){for(var t=0,a=n.length,o;t<a;++t)o=n[t],o.vy+=(i[t]-o.y)*r[t]*e}function o(){if(n){var a,o=n.length;for(r=Array(o),i=Array(o),a=0;a<o;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return a.initialize=function(e){n=e,o()},a.strength=function(e){return arguments.length?(t=typeof e==`function`?e:I4(+e),o(),a):t},a.y=function(t){return arguments.length?(e=typeof t==`function`?t:I4(+t),o(),a):e},a}function O3(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function k3(){return this.eachAfter(O3)}function A3(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function j3(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function M3(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function N3(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function P3(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function F3(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function I3(e){for(var t=this,n=L3(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function L3(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function R3(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function z3(){return Array.from(this)}function B3(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function V3(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*H3(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function U3(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=K3)):t===void 0&&(t=G3);for(var n=new Y3(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new Y3(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(J3)}function W3(){return U3(this).eachBefore(q3)}function G3(e){return e.children}function K3(e){return Array.isArray(e)?e[1]:null}function q3(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function J3(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Y3(e){this.data=e,this.depth=this.height=0,this.parent=null}Y3.prototype=U3.prototype={constructor:Y3,count:k3,each:A3,eachAfter:M3,eachBefore:j3,find:N3,sum:P3,sort:F3,path:I3,ancestors:R3,descendants:z3,leaves:B3,links:V3,copy:W3,[Symbol.iterator]:H3};function X3(e,t){return e.parent===t.parent?1:2}function Z3(e){var t=e.children;return t?t[0]:e.t}function Q3(e){var t=e.children;return t?t[t.length-1]:e.t}function $3(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function e6(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function t6(e,t,n){return e.a.parent===t.parent?e.a:n}function n6(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}n6.prototype=Object.create(Y3.prototype);function r6(e){for(var t=new n6(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new n6(a[o],o)),i.parent=n;return(t.parent=new n6(null,0)).children=[t],t}function i6(){var e=X3,t=1,n=1,r=null;function i(i){var s=r6(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){e6(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=Q3(o),i=Z3(i),o&&i;)s=Z3(s),a=Q3(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&($3(t6(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!Q3(a)&&(a.t=o,a.m+=u-l),i&&!Z3(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}var a6=7.8,o6=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\u3000-\u303F\uFF01-\uFF60]/gu,s6=30,c6=18,l6=72,u6=18,d6=30,f6=1500,p6=15,m6=28,h6=34,g6=30,_6=16,v6=.6,y6=9,b6=4.5,x6=8,S6=18,C6=4,w6=[.5,.4,.6,.3,.7,.22,.78],T6=6,E6=150;function D6(e){let t=e=>e.length*a6+(e.match(o6)?.length??0)*5.2,n=0,r=0;for(let i of e.matchAll(/\$([^$]+)\$/g)){n+=t(e.slice(r,i.index));let a=i[1].replace(/\\(?:text|mathrm|mathbf|mathbb|mathit)\b/g,``).replace(/\\[a-zA-Z]+|\\[^a-zA-Z]/g,`x`).replace(/[_^{}\s]/g,``);n+=Math.min(a.length,12)*13*1.1+4,r=i.index+i[0].length}return n+t(e.slice(r))}var O6=e=>e.weight===void 0?e.label:String(e.weight),k6=e=>(e?D6(e):0)+8;function A6(e,t){let n=Math.max(...[...e.values()].map(e=>e.width)),r=U3(t.root,e=>t.children.get(e));i6().nodeSize([n+u6,l6]).separation(()=>1)(r),r.each(t=>Object.assign(e.get(t.data),{x:t.x,y:t.y}))}function j6(e,t,n){let r=new Map(e.edges.map(e=>[e.to,e.side])),i=Math.max(...[...t.values()].map(e=>e.width)),a=Math.max(0,...e.edges.map(e=>k6(O6(e)))),o=Math.max((i+u6)/2,a+C6),s=new Map,c=(e,i,a)=>{let l=n.children.get(e),u=t.get(e),d;if(l.some(e=>r.get(e))){let t=l.find(e=>r.get(e)===`left`),n=l.find(e=>r.get(e)===`right`),o=t===void 0?a:c(t,i+1,a);s.set(e,o),d=n===void 0?o+1:c(n,i+1,o+1)}else{d=l.reduce((e,t,n)=>c(t,i+1,e+ +(n>0)),a);let t=l[0],n=l.at(-1);s.set(e,t===void 0||n===void 0?a:(s.get(t)+s.get(n))/2),d=Math.max(d,a+1)}return Object.assign(u,{x:s.get(e)*o,y:i*l6}),d};c(n.root,0,0)}var M6=e=>t=>{let n=f6*Math.min(1,p6/e.length);for(let r=0;r<e.length;r++){let i=e[r];for(let a=r+1;a<e.length;a++){let r=e[a],o=r.x-i.x,s=r.y-i.y,c=o*o+s*s||1,l=i.radius+r.radius+m6,u=n*t/c+(c<l*l?(l/Math.sqrt(c)-1)*.25:0);i.vx-=o*u,i.vy-=s*u,r.vx+=o*u,r.vy+=s*u}}};function N6(e,t){let n=e.nodes.map(({id:e})=>({id:e,radius:t.get(e).width/2})),r=new Map;for(let{from:t,to:n}of e.edges)t!==n&&r.set(JSON.stringify([t,n].sort()),{source:t,target:n});let i=new Map(n.map(e=>[e.id,e])),a=[...r.values()].map(({source:e,target:t})=>[i.get(e),i.get(t)]),o=()=>{for(let[e,t]of a){let r=t.x-e.x,i=t.y-e.y,a=r*r+i*i||1;for(let o of n){if(o===e||o===t)continue;let n=Math.max(0,Math.min(1,((o.x-e.x)*r+(o.y-e.y)*i)/a)),s=o.x-e.x-n*r,c=o.y-e.y-n*i,l=Math.hypot(s,c),u=Math.max(0,o.radius+12-l)*.5;if(u===0)continue;let d=l>.001?s/l:-i/(Math.hypot(r,i)||1),f=l>.001?c/l:r/(Math.hypot(r,i)||1);o.vx+=d*u,o.vy+=f*u,e.vx-=d*u*(1-n),e.vy-=f*u*(1-n),t.vx-=d*u*n,t.vy-=f*u*n}}},s=U4([...r.values()]).id(e=>e.id).distance(e=>d6+e.source.radius+e.target.radius);w3(n).stop().alphaDecay(1-.001**(1/E6)).force(`link`,s).force(`repel`,M6(n)).force(`edgeClearance`,o).force(`x`,E3().strength(.05)).force(`y`,D3().strength(.05)).tick(E6);for(let e of n)Object.assign(t.get(e.id),{x:e.x,y:e.y})}function P6(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=Math.max(0,Math.min(1,((e.x-t.x)*r+(e.y-t.y)*i)/(r*r+i*i||1)));return Math.hypot(e.x-t.x-a*r,e.y-t.y-a*i)}function F6(e,t,n){let r=new Map,i=(e,t)=>JSON.stringify([e,t].sort());for(let t of e.edges)r.set(i(t.from,t.to),(r.get(i(t.from,t.to))??0)+1);let a=()=>{let n=1;for(let a of e.edges){let o=t.get(a.from),s=t.get(a.to),c=r.get(i(a.from,a.to));for(let[r,i]of t){if(r===a.from||r===a.to)continue;let t=a.from===a.to?Math.hypot(i.x-o.x,i.y-o.y):P6(i,o,s),l=(a.from===a.to?o.width/2+g6+(c-1)*_6:(c-1)*h6/2)+(e.directed?b6:0);n=Math.max(n,(i.width/2+6.1+l)/Math.max(t,1e-4))}}return n},o=a();if(!n&&o>3){let n=Math.max(80,...[...t.values()].map(e=>e.width))*t.size/Math.PI;e.nodes.forEach(({id:e},r)=>{let i=2*Math.PI*r/t.size-Math.PI/2;Object.assign(t.get(e),{x:Math.cos(i)*n,y:Math.sin(i)*n})}),o=a()}if(o>1)for(let e of t.values())e.x*=o,e.y*=o;if(!n&&o>1){let e=[...t.values()],n=1/0,r=0;for(let t=0;t<36;t++){let i=t*Math.PI/36,a=e.map(e=>e.x*Math.cos(i)-e.y*Math.sin(i)),o=Math.max(...a.map((t,n)=>t+e[n].width/2))-Math.min(...a.map((t,n)=>t-e[n].width/2));o<n-.01&&(n=o,r=i)}for(let t of e){let{x:e,y:n}=t;t.x=e*Math.cos(r)-n*Math.sin(r),t.y=e*Math.sin(r)+n*Math.cos(r)}}}function I6(e,t){let n=e.height/2,r=Math.max(Math.abs(t.x-e.x)-(e.width/2-n),0),i=t.y-e.y;return r*r+i*i<=n*n}function L6(e,t,n){for(let r=0;r<14;r++){let r=(e+t)/2;n(r)?e=r:t=r}return e}var R6=(e,t,n)=>e+(t-e)*n,z6=(e,t,n)=>({x:R6(e.x,t.x,n),y:R6(e.y,t.y,n)}),B6=(e,t,n)=>r=>z6(z6(e,t,r),z6(t,n,r),r),V6=(e,t,n,r)=>i=>z6(B6(e,t,n)(i),B6(t,n,r)(i),i);function H6(e,t,n,r,i){let a=I6(t,e(.5))?.5:L6(0,.5,n=>I6(t,e(n))),o=I6(n,e(.5))?.5:L6(1,.5,t=>I6(n,e(t))),s=e(o),c=i?L6(o,a,t=>Math.hypot(e(t).x-s.x,e(t).y-s.y)<y6):o,l=Array.from({length:r+1},(t,n)=>e(R6(a,c,n/r)));if(!i)return{points:l};let u=e(c),d=Math.hypot(s.x-u.x,s.y-u.y)||1,f={x:(u.y-s.y)/d*b6,y:(s.x-u.x)/d*b6};return{points:l,arrow:[s,{x:u.x+f.x,y:u.y+f.y},{x:u.x-f.x,y:u.y-f.y}]}}function U6(e,t,n){return L6(0,e.width+e.height,r=>I6(e,{x:e.x+t*r,y:e.y+n*r}))}var W6=(e,t)=>Math.abs(e.x-t.x)<(e.width+t.width)/2&&Math.abs(e.y-t.y)<(e.height+t.height)/2,G6=e=>Math.round(e*100)/100,K6=(e,t)=>e.map(e=>`${G6(e.x+t.x)},${G6(e.y+t.y)}`);function q6(e){let t=new Map(e.nodes.map(e=>[e.id,{x:0,y:0,width:Math.max(s6,D6(e.label??e.id)+c6),height:s6}])),n=e.kind===`tree`?Wk(e):void 0;n?e.edges.some(e=>e.side)?j6(e,t,n):A6(t,n):N6(e,t),F6(e,t,!!n);let r=[...t.values()],i={x:r.reduce((e,t)=>e+t.x,0)/r.length,y:r.reduce((e,t)=>e+t.y,0)/r.length},a=new Map(e.nodes.map((e,t)=>[e.id,t])),o=(e,t)=>a.get(e)<=a.get(t)?`${a.get(e)}:${a.get(t)}`:`${a.get(t)}:${a.get(e)}`,s=new Map;for(let{from:t,to:n}of e.edges)s.set(o(t,n),(s.get(o(t,n))??0)+1);let c=new Map,l=e.edges.map(n=>{let r=o(n.from,n.to),l=c.get(r)??0;c.set(r,l+1);let u=t.get(n.from),d=t.get(n.to);if(n.from===n.to){let t=Math.hypot(u.x-i.x,u.y-i.y)>1?Math.atan2(u.y-i.y,u.x-i.x):-Math.PI/2,n=(U6(u,Math.cos(t),Math.sin(t))+g6+l*_6)/(.75*Math.cos(v6)),r=e=>({x:u.x+Math.cos(e)*n,y:u.y+Math.sin(e)*n}),a=V6(u,r(t-v6),r(t+v6),u);return{...H6(a,u,u,24,e.directed),curve:a}}let f=s.get(r),[p,m]=a.get(n.from)<=a.get(n.to)?[u,d]:[d,u],h=Math.hypot(m.x-p.x,m.y-p.y)||1,g=(l-(f-1)/2)*h6*2,_=z6(u,d,.5),v=B6(u,{x:_.x+(p.y-m.y)/h*g,y:_.y+(m.x-p.x)/h*g},d);return{...H6(v,u,d,f>1?16:1,e.directed),curve:v}}),u=[...r],d=l.map((t,n)=>{let r=O6(e.edges[n]),i={width:k6(r),height:S6},a=w6.map(e=>({...t.curve(e),...i}));if(!r)return a[0];let o=a.map(e=>u.filter(t=>W6(t,e)).length),s=a[o.indexOf(Math.min(...o))],c=Array.from({length:T6},(e,t)=>t+1).flatMap(e=>{let[t,n]=[e*(i.height+C6),e*(i.width+C6)];return[{...a[0],y:a[0].y-t},{...a[0],y:a[0].y+t},{...a[0],x:a[0].x-n},{...a[0],x:a[0].x+n}]}),l=Math.min(...o)===0||e.edges[n].weight!==void 0?s:c.find(e=>!u.some(t=>W6(t,e)))??s;return u.push(l),l}),f=[...r,...d.filter((t,n)=>O6(e.edges[n]))];for(let e of l)f.push(...e.points.map(e=>({...e,width:0,height:0})));let p=Math.min(...f.map(e=>e.x-e.width/2))-x6,m=Math.min(...f.map(e=>e.y-e.height/2))-x6,h=Math.max(...f.map(e=>e.x+e.width/2))+x6,g=Math.max(...f.map(e=>e.y+e.height/2))+x6,_={x:-p,y:-m};return{mode:n?`tree`:`general`,width:Math.ceil(h-p),height:Math.ceil(g-m),nodes:e.nodes.map(({id:e})=>{let n=t.get(e);return{id:e,x:G6(n.x+_.x),y:G6(n.y+_.y),width:n.width,height:n.height}}),edges:l.map((e,t)=>({path:`M${K6(e.points,_).join(`L`)}`,...e.arrow?{arrow:K6(e.arrow,_).join(` `)}:{},label:{x:G6(d[t].x+_.x),y:G6(d[t].y+_.y),width:d[t].width,height:d[t].height}}))}}var cie=11/13,J6={x:2,y:4},Y6=.5,X6=e=>`${e/13}em`,lie={active:`border-foreground border-[3px] bg-muted font-semibold`,done:`border-success border-2 bg-[color-mix(in_oklab,var(--success)_15%,var(--card))]`,muted:`border-muted-foreground/50 bg-muted text-muted-foreground border-dashed`},uie={active:{stroke:`stroke-foreground`,fill:`fill-foreground`,width:3.5},done:{stroke:`stroke-success`,fill:`fill-success`,width:2.5},muted:{stroke:`stroke-muted-foreground/50`,fill:`fill-muted-foreground/50`,width:1.25,dash:`4 4`}},die={active:`font-semibold`,done:`text-success`,muted:`text-muted-foreground`},Z6={active:`active`,done:`done`,muted:`ruled out`};function fie(e,t){let n=e.steps?.[t],r=Uk(e),i=new Map;for(let e of n?.nodeStates??[])i.set(e.id,e.tone??`active`);let a=new Map;for(let e of n?.edgeStates??[]){let t=r(e);`index`in t&&a.set(t.index,e.tone??`active`)}return{explanation:n?.explanation??``,nodes:i,edges:a,variables:n?.variables??[]}}function Q6({labelKey:e,width:t,height:n,truncated:r,children:i}){return(0,M.jsxs)(`span`,{className:`relative block overflow-hidden`,style:{width:X6(t),height:X6(n)},"data-label-clip":e,"data-truncated":r?`true`:void 0,children:[(0,M.jsx)(`span`,{className:j(`grid size-full items-center`,r?`justify-items-start mask-r-from-[calc(100%-1.4em)] mask-r-to-[calc(100%-0.8em)]`:`justify-items-center`),children:(0,M.jsx)(`span`,{className:`w-max whitespace-nowrap`,"data-label-content":!0,children:i})}),r&&(0,M.jsx)(`span`,{className:`absolute inset-y-0 right-0 grid place-items-center`,"data-testid":`graph-label-cut`,children:`…`})]})}function pie({view:e}){let{spec:t}=e,n=t.steps??[],r=J0(n.length),i=JSON.stringify([t.directed,t.kind,t.nodes,t.edges]),a=(0,v.useMemo)(()=>q6(t),[i]),o=(0,v.useRef)(null);(0,v.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=a.mode===`tree`?a.nodes.reduce((e,t)=>t.y<e.y?t:e):void 0;e.scrollLeft=t?t.x*e.scrollWidth/a.width-e.clientWidth/2:(e.scrollWidth-e.clientWidth)/2,e.scrollTop=t?0:(e.scrollHeight-e.clientHeight)/2},[a]);let[s,c]=(0,v.useState)(!1);(0,v.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=()=>c(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[a]);let l=(0,v.useRef)(null),[u,d]=(0,v.useState)(new Set);(0,v.useLayoutEffect)(()=>{let e=()=>{let e=[...l.current?.querySelectorAll(`[data-label-clip]`)??[]].filter(e=>{let t=e.getBoundingClientRect(),n=e.querySelector(`[data-label-content]`),r=[...n.querySelectorAll(`.katex-html .strut`)].map(e=>e.getBoundingClientRect().height),i=r.length>0?Math.max(...r):n.getBoundingClientRect().height;return n.getBoundingClientRect().width>t.width+Y6||i>t.height+Y6}).map(e=>e.dataset.labelClip);d(t=>t.size===e.length&&e.every(e=>t.has(e))?t:new Set(e))};e();let t=!0;document.fonts.ready.then(()=>{t&&e()}),document.fonts.addEventListener?.(`loadingdone`,e);let n=typeof ResizeObserver>`u`?void 0:new ResizeObserver(e);return l.current&&n?.observe(l.current),()=>{t=!1,document.fonts.removeEventListener?.(`loadingdone`,e),n?.disconnect()}},[i]);let f=new Map(t.nodes.flatMap((e,t)=>u.has(`n-${e.id}`)?[[e.id,`[${t+1}]`]]:[])),p=e=>{o.current?.contains(e.target)||r.onKeyDown(e)},m=fie(t,r.index),h=n.length>0,g=(e,t)=>`${e/t*100}%`,_=(0,v.useId)(),y=(0,v.useId)();return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":`${_} ${y}`,tabIndex:h?0:void 0,onKeyDown:h?p:void 0,children:[(0,M.jsx)($0,{kind:t.directed?`Directed graph`:`Graph`,kindId:y,children:(0,M.jsx)(e2,{id:_,text:t.title})}),(0,M.jsxs)(t2,{children:[(0,M.jsx)(gie,{spec:t}),(0,M.jsx)(`div`,{ref:o,className:`focus-visible:ring-ring/50 max-h-[36rem] overflow-auto rounded-sm outline-none focus-visible:ring-[3px]`,"data-testid":`graph-scroll`,...s?{tabIndex:0,role:`group`,"aria-label":`Scrollable graph drawing`}:{},children:(0,M.jsxs)(`div`,{ref:l,className:`@container relative mx-auto w-full`,style:{maxWidth:a.width,minWidth:a.width*cie,aspectRatio:`${a.width} / ${a.height}`},"aria-hidden":`true`,"data-testid":`graph-canvas`,"data-layout":a.mode,children:[(0,M.jsx)(`svg`,{viewBox:`0 0 ${a.width} ${a.height}`,className:`absolute inset-0 size-full`,fill:`none`,children:a.edges.map((e,t)=>{let n=m.edges.get(t),r=n?uie[n]:{stroke:`stroke-muted-foreground`,fill:`fill-muted-foreground`,width:1.5,dash:void 0};return(0,M.jsxs)(`g`,{"data-testid":`graph-edge`,"data-tone":n,children:[(0,M.jsx)(`path`,{d:e.path,className:r.stroke,strokeWidth:r.width,strokeDasharray:r.dash,strokeLinecap:`round`}),e.arrow&&(0,M.jsx)(`polygon`,{points:e.arrow,className:r.fill,"data-testid":`graph-arrow`})]},t)})}),(0,M.jsxs)(`div`,{className:`absolute inset-0 font-mono leading-none`,style:{fontSize:`calc(13 * 100cqw / ${a.width})`},children:[t.edges.map((e,t)=>{let n=O6(e),r=a.edges[t].label,i=m.edges.get(t);return n===void 0?null:(0,M.jsx)(`span`,{className:j(`bg-card absolute -translate-x-1/2 -translate-y-1/2 rounded-sm [&_.katex]:text-[1.1em]!`,i&&die[i]),style:{left:g(r.x,a.width),top:g(r.y,a.height)},"data-testid":`graph-edge-label`,children:(0,M.jsx)(Q6,{labelKey:`e-${t}`,width:r.width,height:r.height,truncated:u.has(`e-${t}`),children:e.weight===void 0?(0,M.jsx)(V0,{text:n,mode:`math`}):n})},t)}),a.nodes.map((e,n)=>{let r=m.nodes.get(e.id);return(0,M.jsxs)(`div`,{className:j(`absolute grid -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full border`,r?lie[r]:`border-muted-foreground bg-card`),style:{left:g(e.x,a.width),top:g(e.y,a.height),width:g(e.width,a.width),height:g(e.height,a.height)},"data-testid":`graph-node`,"data-node":e.id,"data-tone":r,children:[(0,M.jsx)(Q6,{labelKey:`n-${e.id}`,width:e.width-J6.x,height:e.height-J6.y,truncated:u.has(`n-${e.id}`),children:(0,M.jsx)(`span`,{className:f.has(e.id)?`invisible`:void 0,children:(0,M.jsx)(V0,{text:t.nodes[n].label??e.id,mode:`math`})})}),f.has(e.id)&&(0,M.jsx)(`span`,{className:`bg-card absolute rounded-sm px-1`,"data-node-key":f.get(e.id),children:f.get(e.id)}),r===`done`&&(0,M.jsx)(`span`,{className:`bg-success text-card absolute -top-[0.35em] -right-[0.35em] grid size-[1.05em] place-items-center rounded-full`,children:(0,M.jsx)(Th,{className:`size-[0.8em]`,strokeWidth:3.5})})]},e.id)})]})]})}),(0,M.jsx)(mie,{spec:t,truncated:u,nodeKeys:f}),m.variables.length>0&&(0,M.jsx)(`dl`,{className:`flex flex-wrap gap-2`,"aria-hidden":h?!0:void 0,children:m.variables.map((e,t)=>(0,M.jsxs)(`div`,{className:`border-border-strong bg-card flex max-w-full min-w-0 gap-1.5 rounded-md border px-2 py-0.5 font-mono text-xs wrap-anywhere`,children:[(0,M.jsx)(`dt`,{className:`min-w-0`,children:e.name}),(0,M.jsxs)(`dd`,{className:`min-w-0`,children:[`= `,String(e.value)]})]},t))}),h&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(hie,{spec:t,state:m,step:r.index+1,of:n.length})})]}),h&&(0,M.jsx)(Z0,{stepper:r,play:!0})]})}function mie({spec:e,truncated:t,nodeKeys:n}){if(t.size===0)return null;let r=e.directed?`→`:`–`;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,"data-testid":`graph-overflow`,children:[(0,M.jsx)(`p`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`… Cut short in the drawing:`}),e.nodes.map(r=>t.has(`n-${r.id}`)?(0,M.jsxs)(X0,{children:[(0,M.jsxs)(`span`,{className:`font-medium`,children:[`Node `,n.get(r.id),`:`]}),` `,(0,M.jsx)($6,{spec:e,id:r.id})]},r.id):null),e.edges.map((i,a)=>t.has(`e-${a}`)?(0,M.jsxs)(X0,{children:[(0,M.jsxs)(`span`,{className:`font-medium`,children:[`Edge `,n.get(i.from)??(0,M.jsx)($6,{spec:e,id:i.from}),` `,r,` `,n.get(i.to)??(0,M.jsx)($6,{spec:e,id:i.to}),`:`]}),` `,i.weight===void 0?(0,M.jsx)(V0,{text:i.label,mode:`math`}):i.weight]},a):null)]})}function $6({spec:e,id:t}){return(0,M.jsx)(V0,{text:e.nodes.find(e=>e.id===t)?.label??t,mode:`math`})}function e8({spec:e,index:t}){let n=e.edges[t];return(0,M.jsxs)(M.Fragment,{children:[n.from===n.to?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)($6,{spec:e,id:n.from}),` to itself`]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)($6,{spec:e,id:n.from}),` `,e.directed?`to`:`and`,` `,(0,M.jsx)($6,{spec:e,id:n.to})]}),n.side&&`, ${n.side} child`,n.weight!==void 0&&`, weight ${n.weight}`,n.label!==void 0&&(0,M.jsxs)(M.Fragment,{children:[`, labelled `,(0,M.jsx)(V0,{text:n.label,mode:`math`})]})]})}function hie({spec:e,state:t,step:n,of:r}){return(0,M.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`graph-status`,children:[(0,M.jsxs)(`p`,{className:`sr-only`,children:[`Step `,n,` of `,r,`.`]}),(0,M.jsx)(`div`,{"data-testid":`graph-explanation`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:t.explanation,mode:`math`})})}),(0,M.jsxs)(`ul`,{className:`sr-only`,children:[[...t.nodes].map(([t,n])=>(0,M.jsxs)(`li`,{children:[`Node `,(0,M.jsx)($6,{spec:e,id:t}),` is `,Z6[n],`.`]},`n-${t}`)),[...t.edges].map(([t,n])=>(0,M.jsxs)(`li`,{children:[`Edge `,(0,M.jsx)(e8,{spec:e,index:t}),` is `,Z6[n],`.`]},`e-${t}`)),t.variables.map((e,t)=>(0,M.jsxs)(`li`,{children:[e.name,` = `,String(e.value),`.`]},`v-${t}`))]})]})}function gie({spec:e}){let t=e.nodes.length,n=e.edges.length;return(0,M.jsxs)(`ul`,{className:`sr-only`,"data-testid":`graph-description`,children:[(0,M.jsxs)(`li`,{children:[e.directed?`Directed`:`Undirected`,` graph with `,t,` `,t===1?`node`:`nodes`,` and `,n,` `,n===1?`edge`:`edges`,`.`]}),(0,M.jsxs)(`li`,{children:[`Nodes:`,` `,e.nodes.map((t,n)=>(0,M.jsxs)(`span`,{children:[n>0&&`, `,(0,M.jsx)($6,{spec:e,id:t.id})]},t.id))]}),e.edges.map((t,n)=>(0,M.jsxs)(`li`,{children:[`Edge: `,(0,M.jsx)(e8,{spec:e,index:n})]},`e-${n}`))]})}function _ie({view:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let{spec:i,latestAttempt:a}=e,[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(),f=(0,v.useId)(),p=a!==void 0,m=p||t||c,h=a?.grade.result===`answered`&&`text`in a.answer?a.answer.text:void 0,g=async t=>{if(m)return;l(!0),d(void 0);let i=await DM(e.id,t);if(i.ok)return l(!1),n(i.view);d(i.error);try{await r()}catch{}finally{l(!1)}},_=o.trim();return(0,M.jsxs)(Q0,{role:`region`,"aria-label":`Anything else to add`,children:[(0,M.jsx)($0,{kind:`Placement`,aside:`Optional`}),(0,M.jsxs)(t2,{className:`gap-4`,children:[(0,M.jsx)(`label`,{htmlFor:f,className:`font-heading text-[1.2rem] leading-snug font-medium text-pretty`,children:(0,M.jsx)(V0,{text:i.question,mode:`math`})}),p?h===void 0?(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm font-medium`,children:`Skipped.`}):(0,M.jsx)(`p`,{className:`bg-sunken rounded-md px-3 py-2 text-sm whitespace-pre-wrap wrap-anywhere`,children:h}):(0,M.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),_&&g({text:_})},children:[(0,M.jsx)(p2,{id:f,value:o,maxLength:kk,rows:3,placeholder:`For example: I know the basics, but I want to go deep on one part of it.`,"aria-describedby":`${f}-help`,disabled:m,onChange:e=>s(e.target.value)}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(N,{type:`submit`,size:`sm`,disabled:m||!_,children:`Send`}),(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground`,disabled:m,onClick:()=>void g({skipped:!0}),children:`Skip`}),(0,M.jsxs)(`span`,{id:`${f}-help`,className:`text-muted-foreground ml-auto text-xs`,children:[`Fine to leave blank · `,o.length,`/`,kk]})]})]}),(0,M.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-1 text-sm`,children:[!p&&t&&(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`Answer once the reply finishes.`}),u&&(0,M.jsx)(`p`,{className:`text-destructive`,children:u})]})]})]})}function vie({view:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let{spec:i,latestAttempt:a}=e,[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)(),u=a!==void 0,d=u||t||o!==void 0,f=a?.answer.optionIndex,p=a?.grade,m=async t=>{if(d)return;s(t),l(void 0);let i=await TM(e.id,t);if(i.ok)return s(void 0),n(i.view);l(i.error);try{await r()}catch{}finally{s(void 0)}},h=e=>{if(p)return e===p.correctOptionIndex?`correct`:e===f?`incorrect`:void 0},g=e=>p?e===f?p.correct?`✓ Your answer, correct`:`✗ Your answer, incorrect`:e===p.correctOptionIndex?`✓ Correct answer`:null:null;return(0,M.jsxs)(Q0,{role:`region`,"aria-label":`Check: ${i.concept}`,children:[(0,M.jsx)($0,{kind:`Check`,aside:`Graded against an answer key`,children:(0,M.jsx)(`span`,{className:`text-muted-foreground min-w-0 text-sm font-semibold wrap-anywhere`,children:i.concept})}),(0,M.jsxs)(t2,{className:`gap-4`,children:[(0,M.jsx)(`div`,{"data-slot":`check-question`,className:`font-heading text-[1.2rem] leading-snug font-medium text-pretty`,children:(0,M.jsx)(V0,{text:i.question,mode:`math`})}),(0,M.jsx)(`div`,{className:`flex flex-col gap-2`,role:`group`,"aria-label":`Options`,children:i.options.map((e,t)=>{let n=h(t);return(0,M.jsxs)(N,{type:`button`,variant:`outline`,"data-result":n,className:j(`border-border-strong dark:border-border-strong bg-card dark:bg-card hover:bg-sunken dark:hover:bg-sunken h-auto flex-wrap justify-start gap-x-3 gap-y-1 rounded-[10px] px-3.5 py-2.5 text-left font-medium whitespace-normal`,u&&`disabled:opacity-100`,o===t&&`border-foreground dark:border-foreground`,n===`correct`&&`border-success bg-success/10 dark:border-success dark:bg-success/15`,n===`incorrect`&&`border-destructive bg-destructive/10 dark:border-destructive dark:bg-destructive/15`),disabled:d,onClick:()=>void m(t),children:[(0,M.jsx)(n2,{index:t}),(0,M.jsx)(`span`,{className:`min-w-0 flex-[1_1_10rem] wrap-anywhere`,children:(0,M.jsx)(V0,{text:e.text,mode:`math`})}),g(t)&&(0,M.jsx)(`span`,{className:j(`shrink-0 pl-9 text-sm font-semibold sm:pl-0`,n===`incorrect`?`text-destructive`:`text-success`),children:g(t)})]},t)})}),(0,M.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2`,children:[!u&&t&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Answer once the reply finishes.`}),c&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,children:c}),p&&(0,M.jsxs)(u2,{className:`bg-sunken border-0 px-4 py-3`,children:[(0,M.jsx)(d2,{className:j(`font-heading text-[1.15rem] font-medium`,p.correct?`text-success`:`text-destructive`),children:p.correct?`Correct!`:`Not quite.`}),(0,M.jsxs)(f2,{className:`text-foreground`,children:[p.feedback&&(0,M.jsx)(`p`,{children:(0,M.jsx)(V0,{text:p.feedback,mode:`math`})}),(0,M.jsx)(`p`,{children:(0,M.jsx)(V0,{text:p.explanation,mode:`math`})})]})]})]})]})]})}var yie=e=>e===`unsure`?{unsure:!0}:e===`skipped`?{skipped:!0}:{optionIndex:e};function bie({view:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let{spec:i,latestAttempt:a}=e,[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)(),u=a!==void 0,d=u||t||o!==void 0,f=a?.grade,p=a?.answer,m=p&&`optionIndex`in p?p.optionIndex:void 0,h=async t=>{if(d)return;s(t),l(void 0);let i=await EM(e.id,yie(t));if(i.ok)return s(void 0),n(i.view);l(i.error);try{await r()}catch{}finally{s(void 0)}},g=e=>{if(f)return e===f.correctOptionIndex?`correct`:e===m?`incorrect`:void 0},_=f?.result===`correct`?`Correct.`:f?.result===`incorrect`?`Not quite.`:f?.result===`unsure`?`Marked as not sure.`:`Skipped.`;return(0,M.jsxs)(Q0,{role:`region`,"aria-label":`Placement question: ${i.concept}`,children:[(0,M.jsx)($0,{kind:`Placement`,children:(0,M.jsx)(`span`,{className:`text-muted-foreground min-w-0 text-sm font-semibold wrap-anywhere`,children:i.concept})}),(0,M.jsxs)(t2,{className:`gap-4`,children:[(0,M.jsx)(`div`,{className:`font-heading text-[1.2rem] leading-snug font-medium text-pretty`,children:(0,M.jsx)(V0,{text:i.question,mode:`math`})}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,role:`group`,"aria-label":`Answers`,children:[i.options.map((e,t)=>{let n=g(t);return(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,"data-result":n,"aria-pressed":m===t,className:j(`border-border-strong dark:border-border-strong bg-card dark:bg-card hover:bg-sunken dark:hover:bg-sunken h-auto max-w-full rounded-[10px] px-3.5 py-2 text-left font-medium whitespace-normal wrap-anywhere`,u&&`disabled:opacity-100`,o===t&&`border-foreground dark:border-foreground`,n===`correct`&&`border-success bg-success/10 dark:border-success dark:bg-success/15`,n===`incorrect`&&`border-destructive bg-destructive/10 dark:border-destructive dark:bg-destructive/15`),disabled:d,onClick:()=>void h(t),children:(0,M.jsx)(V0,{text:e.text,mode:`math`})},t)}),(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`sm`,"aria-pressed":f?.result===`unsure`,className:j(u&&`disabled:opacity-100`,f?.result===`unsure`&&`bg-muted`),disabled:d,onClick:()=>void h(`unsure`),children:`Not sure`}),(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`sm`,"aria-pressed":f?.result===`skipped`,className:j(`text-muted-foreground`,u&&`disabled:opacity-100`,f?.result===`skipped`&&`bg-muted`),disabled:d,onClick:()=>void h(`skipped`),children:`Skip`})]}),(0,M.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-1 text-sm`,children:[!u&&t&&(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`Answer once the reply finishes.`}),c&&(0,M.jsx)(`p`,{className:`text-destructive`,children:c}),f&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`p`,{className:j(`font-medium`,f.result===`correct`?`text-success`:f.result===`incorrect`?`text-destructive`:`text-muted-foreground`),children:_}),f.result!==`skipped`&&(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:(0,M.jsx)(V0,{text:f.explanation,mode:`math`})})]})]})]})]})}var xie=oe(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function t8({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Wt:`span`;return(0,M.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:j(xie({variant:t}),e),...r})}var Sie=4e4,n8=e=>e===``?[]:e.split(`
|
|
539
|
+
`);function Cie(e,t){let n=n8(ik(e)),r=n8(ik(t));if(n.length===0&&r.length===0)return[];let i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;let a=0;for(;a<n.length-i&&a<r.length-i&&n[n.length-1-a]===r[r.length-1-a];)a++;let o=n.slice(i,n.length-a),s=r.slice(i,r.length-a),c=[];for(let e=0;e<i;e++)c.push({kind:`same`,text:n[e]});if(o.length===0)for(let e of s)c.push({kind:`actual`,text:e});else if(s.length===0)for(let e of o)c.push({kind:`expected`,text:e});else if(o.length*s.length<=Sie){let e=o.length,t=s.length,n=new Uint32Array((e+1)*(t+1)),r=t+1;for(let i=e-1;i>=0;i--)for(let e=t-1;e>=0;e--)n[i*r+e]=o[i]===s[e]?n[(i+1)*r+(e+1)]+1:Math.max(n[(i+1)*r+e],n[i*r+(e+1)]);let i=0,a=0;for(;i<e&&a<t;)o[i]===s[a]?(c.push({kind:`same`,text:o[i]}),i++,a++):n[(i+1)*r+a]>=n[i*r+(a+1)]?(c.push({kind:`expected`,text:o[i]}),i++):(c.push({kind:`actual`,text:s[a]}),a++);for(;i<e;)c.push({kind:`expected`,text:o[i++]});for(;a<t;)c.push({kind:`actual`,text:s[a++]})}else{for(let e of o)c.push({kind:`expected`,text:e});for(let e of s)c.push({kind:`actual`,text:e})}for(let e=n.length-a;e<n.length;e++)c.push({kind:`same`,text:n[e]});return c}var wie=160,Tie=3,r8=(e,t=wie)=>{let n=e.replace(/\s+/g,` `).trim();return n?n.length>t?`${n.slice(0,t)}…`:n:`(nothing)`},Eie={timeout:`timed out`,output_limit:`exceeded the output limit`,start_failed:`command failed to start`,no_run_output_command:`missing --run-output command`},Die=[[`noHardCodedOutputs`,`Computes its output`],[`concept`,`Shows the milestone's concept`],[`quality`,`Code quality`]];function Oie(e){let{spec:t,latestAttempt:n,latestReview:r}=e,i=[],a=n?.grade,o=n?.answer.results;if(a&&!a.correct)for(let e=0;e<a.cases.length&&i.length<Tie;e++){let n=a.cases[e];if(n.passed)continue;let r=t.cases[n.case??e];if(!r||r.withdrawn)continue;let s=o?.[e];if(!s)i.push(`- Case "${r.name}" failed`);else if(s.error)i.push(`- Case "${r.name}": ${Eie[s.error]}`);else{let e=s.exitCode!==0&&s.exitCode!==null?` (exit code ${s.exitCode})`:``;i.push(`- Case "${r.name}"${e}: expected "${r8(r.expected)}", got "${r8(s.stdout)}"`)}}if(r&&!r.review.approved)for(let[e,t]of Die)r.review[e].passed||i.push(`- Code review (${t}): ${r8(r.review[e].note,200)}`);let s=[`I'm stuck on milestone "${t.title}" (concept: ${t.concept}). Give me a small, focused in-browser JavaScript or Python practice drill (code_exercise) to practise this concept and the failure mode below, without giving away the milestone solution.`];return i.length>0&&s.push(``,`What failed:`,...i),s.join(`
|
|
540
|
+
`)}var i8=(0,v.createContext)(void 0),a8=(0,v.createContext)(void 0),kie={timeout:`Stopped: it took longer than the time limit.`,output_limit:`Stopped: it printed more than the output limit.`,start_failed:`Your command couldn't start.`,no_run_output_command:`This case runs your program's output: set a command for that with --run-output.`};function o8({label:e,text:t,tone:n}){return(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,M.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem] tracking-[0.06em] uppercase`,children:e}),(0,M.jsx)(`pre`,{className:j(`bg-sunken max-h-48 min-w-0 overflow-auto rounded-md px-3 py-2 font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,n===`error`&&`text-destructive`),children:t===``?(0,M.jsx)(`span`,{className:`text-muted-foreground italic`,children:`(nothing)`}):t})]})}function s8({text:e,label:t}){let[n,r]=(0,v.useState)(!1);return(0,M.jsxs)(`div`,{className:`bg-sunken flex min-w-0 items-center gap-2 rounded-md py-1 pr-1 pl-3`,children:[(0,M.jsx)(`code`,{className:`min-w-0 flex-1 overflow-x-auto font-mono text-xs whitespace-pre`,children:e}),(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`xs`,"aria-label":n?`Copied: ${t}`:`Copy: ${t}`,onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)}catch{}},children:n?(0,M.jsx)(Th,{"aria-hidden":!0}):(0,M.jsx)(tg,{"aria-hidden":!0})})]})}function Aie({expected:e,actual:t,truncated:n}){let r=Cie(e,t);return(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,"data-testid":`milestone-case-diff`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem] tracking-[0.06em] uppercase`,children:`Output diff`}),(0,M.jsx)(`span`,{className:`text-success font-mono text-[0.6875rem]`,children:`- expected`}),(0,M.jsx)(`span`,{className:`text-destructive font-mono text-[0.6875rem]`,children:`+ got`})]}),(0,M.jsxs)(`pre`,{className:`bg-sunken max-h-56 min-w-0 overflow-auto rounded-md py-2 font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,children:[r.map((e,t)=>(0,M.jsxs)(`div`,{"data-diff-kind":e.kind,className:j(`px-3`,e.kind===`expected`&&`bg-success/10 text-success`,e.kind===`actual`&&`bg-destructive/10 text-destructive`,e.kind===`same`&&`text-muted-foreground`),children:[(0,M.jsx)(`span`,{"aria-hidden":!0,className:`select-none`,children:e.kind===`expected`?`- `:e.kind===`actual`?`+ `:` `}),e.kind!==`same`&&(0,M.jsx)(`span`,{className:`sr-only`,children:e.kind===`expected`?`expected: `:`got: `}),e.text===``?` `:e.text]},t)),n&&(0,M.jsx)(`div`,{className:`text-muted-foreground px-3 italic`,children:`… (output cut short)`})]})]})}var jie=[[`noHardCodedOutputs`,`Computes its output`],[`concept`,`Shows the milestone's concept`],[`quality`,`Code quality`]],Mie={kept:`kept`,withdrawn:`withdrawn`,corrected:`corrected`,upheld:`upheld`,overturned:`overturned`};function c8({artifactId:e,target:t,label:n,onDone:r,onCancel:i}){let[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(),d=(0,v.useId)(),f=async()=>{c(!0),u(void 0);let n=await AM(e,{...t,reason:a.trim()});c(!1),n.ok?await r():u(n.error)};return(0,M.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:e=>{e.preventDefault(),a.trim()&&!s&&f()},children:[(0,M.jsx)(`label`,{htmlFor:d,className:`text-sm font-medium`,children:n}),(0,M.jsx)(p2,{id:d,value:a,maxLength:2e3,disabled:s,onChange:e=>o(e.target.value),placeholder:`What's wrong with it? The tutor will look again.`}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsxs)(N,{type:`submit`,size:`sm`,disabled:s||!a.trim(),children:[s&&(0,M.jsx)(JF,{}),s?`The tutor is looking again…`:`Send dispute`]}),(0,M.jsx)(N,{type:`button`,size:`sm`,variant:`ghost`,disabled:s,onClick:i,children:`Cancel`})]}),l&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:l})]})}function Nie({review:e,createdAt:t}){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-testid":`milestone-review`,"data-approved":e.approved,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,M.jsx)(`span`,{className:j(`font-medium`,e.approved?`text-success`:`text-destructive`),children:e.approved?`Approved`:`Changes requested`}),(0,M.jsx)(t8,{variant:`outline`,children:`Judged by a model`}),(0,M.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[e.model,`, `,(0,M.jsx)(`time`,{dateTime:t,children:new Date(t).toLocaleString()})]})]}),(0,M.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:jie.map(([t,n])=>(0,M.jsxs)(`li`,{className:`flex gap-2 text-sm`,children:[e[t].passed?(0,M.jsx)(Th,{className:`text-success mt-0.5 size-4 shrink-0`,"aria-hidden":!0}):(0,M.jsx)(ev,{className:`text-destructive mt-0.5 size-4 shrink-0`,"aria-hidden":!0}),(0,M.jsxs)(`span`,{className:`min-w-0`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:n}),(0,M.jsx)(`span`,{className:`sr-only`,children:e[t].passed?`: passed`:`: not yet`}),` `,(0,M.jsx)(`span`,{className:`text-muted-foreground`,children:e[t].note})]})]},t))}),(0,M.jsx)(`div`,{className:`text-[0.95rem]`,children:(0,M.jsx)(V0,{text:e.summary,mode:`block`})}),e.suggestions.length>0&&(0,M.jsx)(`ul`,{className:`text-muted-foreground list-disc pl-5 text-sm`,children:e.suggestions.map((e,t)=>(0,M.jsx)(`li`,{children:e},t))})]})}function Pie({view:e,onRefresh:t}){let{spec:n,latestAttempt:r,latestReview:i}=e,a=(0,v.useContext)(i8),o=(0,v.useContext)(a8),s=(0,v.useId)(),[c,l]=(0,v.useState)(),u=r?.grade,d=r?.answer.results,f=n.cases.some(e=>e.compare===`run_output`),p=n.checkType===`review`,m=new Map((u?.cases??[]).map((e,t)=>[e.case??t,{passed:e.passed,result:d?.[t]}])),h=r?.answer.files??[],g=!!(r&&(u&&!u.correct||i&&!i.review.approved)),_=async()=>{l(void 0),await t()};return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":s,"data-testid":`project-milestone`,children:[(0,M.jsx)($0,{kind:`Milestone`,aside:p?`Checked by a code review`:`Checked in your repository`,children:(0,M.jsx)(e2,{id:s,text:n.title})}),(0,M.jsxs)(t2,{className:`@container gap-4`,children:[(0,M.jsx)(`div`,{className:`text-[0.95rem]`,"data-testid":`milestone-spec`,children:(0,M.jsx)(V0,{text:n.spec,mode:`block`})}),(0,M.jsxs)(`section`,{className:`flex flex-col gap-1.5`,"aria-label":`Output format`,children:[(0,M.jsx)(`h4`,{className:`text-sm font-medium`,children:`Output format`}),(0,M.jsx)(`div`,{className:`text-[0.95rem]`,children:(0,M.jsx)(V0,{text:n.outputFormat,mode:`block`})})]}),n.reviewFocus&&(0,M.jsxs)(`section`,{className:`flex flex-col gap-1.5`,"aria-label":`What the review looks for`,children:[(0,M.jsx)(`h4`,{className:`text-sm font-medium`,children:`What the review looks for`}),(0,M.jsx)(`div`,{className:`text-[0.95rem]`,children:(0,M.jsx)(V0,{text:n.reviewFocus,mode:`block`})})]}),(0,M.jsxs)(`section`,{className:`flex flex-col gap-2`,"aria-label":`Check it`,children:[(0,M.jsx)(`h4`,{className:`text-sm font-medium`,children:`Check it`}),(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`In your project's folder, link it to this course once, with the command that runs your program. `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`{input}`}),` becomes the path to a file holding each case's input, which also comes on stdin. Then check whenever you like.`]}),a&&(0,M.jsx)(s8,{label:`link command`,text:`mivra link ${a} --run "./your-program {input}"${f?` --run-output "./run-it {output}"`:``}`}),(0,M.jsx)(s8,{label:`check command`,text:`mivra check`}),(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Use `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check --watch`}),` to re-run automatically whenever you save a file. Each check also sends the files that changed since your last passed milestone to a code review, which must approve too. It follows your `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`.gitignore`}),` and never sends `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`.env`}),` files or keys; `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check --dry-run`}),` lists exactly what it would send.`]}),f&&(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Some cases run what your program prints: `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`{output}`}),` in your run-output command becomes the path to a file holding it.`]})]}),(0,M.jsx)(`div`,{"aria-live":`polite`,"data-testid":`milestone-status`,children:u?(0,M.jsxs)(u2,{className:`bg-sunken border-0 px-4 py-3`,children:[(0,M.jsx)(d2,{className:j(`font-heading text-[1.15rem] font-medium`,e.passed?`text-success`:`text-destructive`),children:e.passed?`Milestone passed.`:`Not yet.`}),(0,M.jsxs)(f2,{className:`text-foreground flex flex-col gap-2`,children:[(0,M.jsxs)(`span`,{children:[`Latest check`,u.total>0?`: ${u.passed} of ${u.total} ${u.total===1?`case`:`cases`} passed`:``,`,`,` `,(0,M.jsx)(`time`,{dateTime:r.createdAt,children:new Date(r.createdAt).toLocaleString()}),`.`]}),g&&o&&(0,M.jsx)(`div`,{className:`pt-0.5`,children:(0,M.jsxs)(N,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>o(Oie(e)),children:[(0,M.jsx)(Zh,{"aria-hidden":!0}),`Practice this concept`]})})]})]}):(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Not checked yet.`})}),r&&(0,M.jsxs)(`section`,{className:`flex flex-col gap-2 rounded-lg border px-3 py-2.5`,"aria-label":`Code review`,children:[(0,M.jsx)(`h4`,{className:`text-sm font-medium`,children:`Code review`}),i?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Nie,{review:i.review,createdAt:i.createdAt}),!i.review.approved&&(c===`review`?(0,M.jsx)(c8,{artifactId:e.id,target:{target:`review`},label:`Why is the verdict wrong?`,onDone:_,onCancel:()=>l(void 0)}):(0,M.jsx)(N,{type:`button`,size:`sm`,variant:`outline`,className:`self-start`,onClick:()=>l(`review`),children:`Dispute this verdict`}))]}):(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`milestone-review-missing`,children:u?.correct?r.answer.source===`none`?`Nothing was sent to review: run mivra check in a git repository.`:h.length===0?`No changed files were sent to review.`:`The review of the latest check didn't finish. Run mivra check again.`:`The review runs once every case passes.`}),h.length>0&&(0,M.jsxs)(`p`,{className:`text-muted-foreground text-xs wrap-anywhere`,children:[`Sent for review: `,h.slice(0,12).join(`, `),h.length>12?` and ${h.length-12} more`:``,`.`]})]}),n.cases.length>0&&(0,M.jsx)(`ol`,{className:`flex flex-col gap-2`,"aria-label":`Test cases`,children:n.cases.map((t,n)=>{let r=m.get(n),i=t.withdrawn?void 0:r?.passed,a=r?.result;return(0,M.jsxs)(`li`,{className:j(`flex min-w-0 flex-col gap-2 rounded-lg border px-3 py-2.5`,t.withdrawn&&`opacity-60`,i===!1&&`border-destructive/40`),"data-testid":`milestone-case`,"data-result":t.withdrawn?`withdrawn`:i===void 0?`pending`:i?`passed`:`failed`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[i===!0&&(0,M.jsx)(Th,{className:`text-success size-4 shrink-0`,"aria-hidden":!0}),i===!1&&(0,M.jsx)(ev,{className:`text-destructive size-4 shrink-0`,"aria-hidden":!0}),(0,M.jsx)(`span`,{className:j(`min-w-0 font-medium wrap-anywhere`,t.withdrawn&&`line-through`),children:t.name}),i!==void 0&&(0,M.jsx)(`span`,{className:`sr-only`,children:i?` passed`:` failed`}),t.withdrawn&&(0,M.jsx)(t8,{variant:`outline`,children:`Withdrawn`}),(0,M.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[t.compare===`run_output`&&(0,M.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`runs your output`}),!t.withdrawn&&c!==n&&(0,M.jsx)(N,{type:`button`,size:`xs`,variant:`ghost`,onClick:()=>l(n),"aria-label":`Dispute case: ${t.name}`,children:`Dispute`})]})]}),c===n&&(0,M.jsx)(c8,{artifactId:e.id,target:{target:`case`,caseIndex:n},label:`Why is "${t.name}" wrong?`,onDone:_,onCancel:()=>l(void 0)}),(0,M.jsxs)(`div`,{className:`grid gap-2 @[34rem]:grid-cols-2`,children:[(0,M.jsx)(o8,{label:`Input`,text:t.input}),(0,M.jsx)(o8,{label:t.compare===`run_output`?`Running your output prints`:`Expected output`,text:t.expected})]}),i===!1&&a&&(0,M.jsxs)(M.Fragment,{children:[a.error?(0,M.jsx)(`p`,{className:`text-destructive text-sm`,children:kie[a.error]}):(0,M.jsxs)(M.Fragment,{children:[a.exitCode!==0&&(0,M.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Exited with code `,a.exitCode,`.`]}),(0,M.jsx)(o8,{label:`Your program printed`,text:a.truncated?`${a.stdout}\n… (cut short)`:a.stdout}),(ik(a.stdout)!==ik(t.expected)||a.truncated)&&(0,M.jsx)(Aie,{expected:t.expected,actual:a.stdout,truncated:a.truncated})]}),a.stderr&&(0,M.jsx)(o8,{label:`stderr`,text:a.stderr,tone:`error`})]})]},n)})}),n.disputes.length>0&&(0,M.jsxs)(`section`,{className:`flex flex-col gap-2`,"aria-label":`Disputes`,children:[(0,M.jsx)(`h4`,{className:`text-sm font-medium`,children:`Disputes`}),(0,M.jsx)(`ul`,{className:`flex flex-col gap-2`,"data-testid":`milestone-disputes`,children:n.disputes.map(e=>(0,M.jsxs)(`li`,{className:`bg-sunken flex flex-col gap-1 rounded-md px-3 py-2 text-sm`,children:[(0,M.jsxs)(`span`,{children:[(0,M.jsx)(`span`,{className:`font-medium`,children:e.target===`case`?`Case "${e.caseName??``}"`:`Review verdict`}),`: `,Mie[e.outcome]]}),(0,M.jsxs)(`span`,{className:`text-muted-foreground`,children:[`You said: `,e.reason]}),(0,M.jsx)(`span`,{children:e.explanation})]},e.id))})]})]})]})}var l8=380,u8=100,Fie={1:{width:l8,height:320,radius:u8,circles:[{x:190,y:148}],slots:{1:{x:190,y:148,width:136,rows:5},0:{x:318,y:278,width:106,rows:3}}},2:{width:l8,height:320,radius:u8,circles:[{x:135,y:148},{x:245,y:148}],slots:{1:{x:104,y:148,width:76,rows:5},2:{x:276,y:148,width:76,rows:5},3:{x:190,y:148,width:53,rows:3},0:{x:318,y:288,width:106,rows:2}}},3:{width:l8,height:410,radius:u8,circles:[{x:138,y:148},{x:242,y:148},{x:190,y:238}],slots:{1:{x:100,y:116,width:76,rows:2},2:{x:280,y:116,width:76,rows:2},4:{x:190,y:280,width:124,rows:2},3:{x:190,y:116,width:64,rows:1},5:{x:124,y:220,width:53,rows:1},6:{x:256,y:220,width:53,rows:1},7:{x:190,y:172,width:53,rows:2},0:{x:318,y:366,width:106,rows:3}}}},d8=16/(230/l8);function Iie(e,t,n){let r=n/e.width;return{width:t.width*r,height:t.rows*d8*r}}var f8=.5,p8=(e,t)=>e.width<=t.width+f8&&e.height<=t.height+f8;function Lie(e,t,n){return p8(t,e)?`contents`:p8(n,e)?`marker`:`arrow`}function Rie(e){return Array.from({length:2**e},(e,t)=>t)}function zie({circles:e,radius:t},n){let r=[];return e.forEach((i,a)=>{let o=e=>({x:i.x+t*Math.cos(e),y:i.y+t*Math.sin(e)}),s=e.flatMap((e,n)=>{if(n===a)return[];let r=Math.atan2(e.y-i.y,e.x-i.x),o=Math.acos(Math.hypot(e.x-i.x,e.y-i.y)/(2*t));return[r-o,r+o]}),c=(s.length?s:[0,Math.PI]).map(e=>(e+2*Math.PI)%(2*Math.PI)).sort((e,t)=>e-t);c.forEach((i,s)=>{let l=s+1<c.length?c[s+1]:c[0]+2*Math.PI,u=o((i+l)/2);if(!e.every((e,r)=>r===a||Math.hypot(u.x-e.x,u.y-e.y)<t==!!(n&1<<r)))return;let d=l-i>Math.PI;r.push(n&1<<a?{from:o(i),to:o(l),large:d,sweep:1}:{from:o(l),to:o(i),large:d,sweep:0})})}),r}var Bie=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y)<1e-6,m8=e=>String(Math.round(e*100)/100);function Vie(e,t){let{radius:n,width:r,height:i}=e,a=zie(e,t),o=[];for(;a.length;){let e=a.shift(),t=`M${m8(e.from.x)} ${m8(e.from.y)}`,r=e;for(;r;){let{to:e,large:i,sweep:o}=r;t+=`A${n} ${n} 0 ${+!!i} ${o} ${m8(e.x)} ${m8(e.y)}`;let s=a.findIndex(t=>Bie(t.from,e));r=s>=0?a.splice(s,1)[0]:void 0}o.push(`${t}Z`)}return t===0&&o.unshift(Hie(r,i)),o.join(``)}var Hie=(e,t)=>`M1 1H${e-1}V${t-1}H1Z`,h8={active:{word:`Focus`,tint:`fill-foreground/15`,pattern:`hatch`,line:`stroke-foreground`,outline:``},done:{word:`Done`,tint:`fill-success/20`,pattern:`dots`,line:`stroke-success`,outline:``},muted:{word:`Ruled out`,tint:`fill-muted-foreground/15`,pattern:``,line:`stroke-muted-foreground`,outline:`5 4`}};function g8(e,t){return e.sets.reduce((e,n,r)=>t.includes(n.id)?e|1<<r:e,0)}function Uie(e,t){let n=e.steps?.[t],r=new Map;for(let t of n?.highlights??[])r.set(g8(e,t.in),t.tone??`active`);return{explanation:n?.explanation??``,tones:r,variables:n?.variables??[]}}function _8(e){return Rie(e.sets.length).filter(t=>t!==0||e.universe!==void 0).sort((e,t)=>e===0?1:t===0?-1:e-t)}var Wie=e=>String(e);function v8({text:e}){return(0,M.jsx)(V0,{text:e,mode:`math`})}function y8({elements:e}){return e.map((e,t)=>(0,M.jsxs)(v.Fragment,{children:[t>0&&`, `,(0,M.jsx)(v8,{text:Wie(e)})]},t))}function b8(e,t){return e.map((n,r)=>(0,M.jsxs)(v.Fragment,{children:[r>0&&(r===e.length-1?` ${t} `:`, `),n]},r))}function x8({spec:e,mask:t}){let n=e=>(0,M.jsx)(v8,{text:e.label},e.id),r=e.sets.filter((e,n)=>t&1<<n).map(n),i=e.sets.filter((e,n)=>!(t&1<<n)).map(n);return r.length===0?(0,M.jsxs)(M.Fragment,{children:[`outside `,b8(i,`and`)]}):(0,M.jsxs)(M.Fragment,{children:[`in `,b8(r,`and`),i.length>0&&(0,M.jsxs)(M.Fragment,{children:[`, not `,b8(i,`or`)]})]})}var S8=e=>e.count??e.elements.length;function C8({total:e}){return(0,M.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`n = `,e]})}function w8({region:e}){let t=S8(e);return e.elements.length===0?(0,M.jsx)(C8,{total:t}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(y8,{elements:e.elements}),t!==e.elements.length&&(0,M.jsxs)(M.Fragment,{children:[` `,`(`,(0,M.jsx)(C8,{total:t}),`)`]})]})}function T8({slot:e,layout:t,children:n,...r}){let i=(e,t)=>`${e/t*100}%`;return(0,M.jsx)(`div`,{className:`absolute flex -translate-x-1/2 -translate-y-1/2 items-center justify-center text-center font-mono text-xs leading-4`,style:{left:i(e.x,t.width),top:i(e.y,t.height),width:i(e.width,t.width),height:i(e.rows*d8,t.height)},...r,children:(0,M.jsx)(`span`,{className:`bg-card/85 rounded-sm px-0.5`,children:n})})}function E8(e){let{width:t,height:n}=e.getBoundingClientRect();return{width:t+[...e.querySelectorAll(`.katex`)].reduce((e,t)=>e+Math.max(0,t.scrollWidth-t.clientWidth),0),height:n}}function Gie(e){return[e,...e.querySelectorAll(`.katex`)].some(e=>e.scrollWidth>e.clientWidth)}function Kie(e,t){let n=(0,v.useRef)(null),[r,i]=(0,v.useState)(new Map),[a,o]=(0,v.useState)([]);return(0,v.useLayoutEffect)(()=>{let r=n.current,a=0,s=()=>{if(a=r.getBoundingClientRect().width,a===0)return;let n=new Map;for(let i of _8(e)){let e=r.querySelector(`[data-probe="contents"][data-mask="${i}"] > span`),o=r.querySelector(`[data-probe="marker"][data-mask="${i}"] > span`);e&&o&&n.set(i,Lie(Iie(t,t.slots[i],a),E8(e),E8(o)))}i(e=>n.size===e.size&&[...n].every(([t,n])=>e.get(t)===n)?e:n);let s=[...r.querySelectorAll(`[data-label]`)].filter(Gie).map(e=>e.dataset.label);o(e=>e.join()===s.join()?e:s)};s();let c=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{r.getBoundingClientRect().width!==a&&(0,Ft.flushSync)(s)});return c?.observe(r),document.fonts?.addEventListener(`loadingdone`,s),()=>{c?.disconnect(),document.fonts?.removeEventListener(`loadingdone`,s)}},[e,t]),[n,r,a]}var qie=[`Top left`,`Top right`,`Bottom left`];function Jie(e,t){return e===0?{left:`2%`,top:`1.5%`,width:`45%`}:e===1?{right:`2%`,top:`1.5%`,width:`45%`,textAlign:`right`}:{left:`2%`,bottom:`1.5%`,width:t===3?`30%`:`45%`}}function Yie({d:e,mask:t,tone:n,ids:r}){let i=n&&h8[n],a=`${r.clip}-${t}`;return(0,M.jsxs)(`g`,{"data-testid":`set-region`,"data-mask":t,"data-tone":n??`none`,children:[(0,M.jsx)(`path`,{d:e,fillRule:`evenodd`,className:i?i.tint:`fill-transparent`,"data-testid":`set-region-shape`}),i&&(0,M.jsxs)(M.Fragment,{children:[i.pattern&&(0,M.jsx)(`path`,{d:e,fillRule:`evenodd`,fill:`url(#${i.pattern===`hatch`?r.hatch:r.dots})`}),(0,M.jsx)(`clipPath`,{id:a,children:(0,M.jsx)(`path`,{d:e,clipRule:`evenodd`})}),(0,M.jsx)(`path`,{d:e,clipPath:`url(#${a})`,fill:`none`,strokeWidth:6,strokeDasharray:i.outline||void 0,className:i.line})]})]})}function Xie({spec:e,layout:t,tones:n,fits:r,drawing:i}){let a=(0,v.useId)().replace(/[^a-zA-Z0-9_-]/g,``),o={hatch:`${a}-hatch`,dots:`${a}-dots`,clip:`${a}-clip`},{width:s,height:c,radius:l,circles:u,slots:d}=t,f=_8(e),p=new Map(e.regions.map(t=>[g8(e,t.in),t]));return(0,M.jsxs)(`div`,{ref:i,className:`relative mx-auto w-full max-w-md`,style:{aspectRatio:`${s} / ${c}`},"aria-hidden":`true`,inert:!0,"data-testid":`set-diagram`,children:[(0,M.jsxs)(`svg`,{viewBox:`0 0 ${s} ${c}`,className:`absolute inset-0 size-full`,children:[(0,M.jsxs)(`defs`,{children:[(0,M.jsx)(`pattern`,{id:o.hatch,patternUnits:`userSpaceOnUse`,width:`10`,height:`10`,patternTransform:`rotate(45)`,children:(0,M.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`10`,strokeWidth:`2`,className:`stroke-foreground/45`})}),(0,M.jsx)(`pattern`,{id:o.dots,patternUnits:`userSpaceOnUse`,width:`10`,height:`10`,children:(0,M.jsx)(`circle`,{cx:`5`,cy:`5`,r:`1.6`,className:`fill-success/70`})})]}),f.map(e=>(0,M.jsx)(Yie,{d:Vie(t,e),mask:e,tone:n.get(e),ids:o},e)),e.universe!==void 0&&(0,M.jsx)(`rect`,{x:1,y:1,width:s-2,height:c-2,strokeWidth:`1.5`,className:`stroke-muted-foreground fill-none`,"data-testid":`set-universe`}),u.map((e,t)=>(0,M.jsx)(`circle`,{cx:e.x,cy:e.y,r:l,strokeWidth:`1.5`,className:`stroke-foreground/70 fill-none`,"data-testid":`set-circle`},t))]}),e.sets.map((t,n)=>(0,M.jsx)(`div`,{className:`absolute text-xs leading-4 font-medium`,style:Jie(n,e.sets.length),"data-testid":`set-label`,"data-label":n,children:(0,M.jsx)(`span`,{className:`bg-card/85 rounded-sm px-0.5`,children:(0,M.jsx)(v8,{text:t.label})})},t.id)),e.universe!==void 0&&(0,M.jsx)(`div`,{className:`text-muted-foreground absolute bottom-[1.5%] left-1/2 w-[36%] -translate-x-1/2 text-center text-xs leading-4`,"data-testid":`set-universe-label`,"data-label":`universe`,children:(0,M.jsx)(`span`,{className:`bg-card/85 rounded-sm px-0.5`,children:(0,M.jsx)(v8,{text:e.universe})})}),f.map(e=>{let n=p.get(e);if(!n)return null;let i=r.get(e)??`contents`;return(0,M.jsx)(T8,{slot:d[e],layout:t,"data-testid":`set-elements`,"data-mask":e,"data-fit":i,children:S8(n)===0?`∅`:i===`contents`?(0,M.jsx)(w8,{region:n}):i===`marker`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(C8,{total:S8(n)}),` ↓`]}):`↓`},e)}),(0,M.jsx)(`div`,{className:`invisible absolute inset-0 overflow-hidden`,children:f.map(e=>{let n=p.get(e);return!n||S8(n)===0?null:(0,M.jsxs)(v.Fragment,{children:[(0,M.jsx)(T8,{slot:d[e],layout:t,"data-probe":`contents`,"data-mask":e,children:(0,M.jsx)(w8,{region:n})}),(0,M.jsxs)(T8,{slot:d[e],layout:t,"data-probe":`marker`,"data-mask":e,children:[(0,M.jsx)(C8,{total:S8(n)}),` ↓`]})]},e)})})]})}function Zie({view:e}){let{spec:t}=e,n=t.steps?.length??0,r=J0(n),{index:i}=r,a=(0,v.useId)(),o=(0,v.useId)(),s=Fie[t.sets.length],c=Uie(t,i),l=_8(t),u=new Map(t.regions.map(e=>[g8(t,e.in),e])),d=l.filter(e=>c.tones.has(e)),[f,p,m]=Kie(t,s),h=l.filter(e=>(p.get(e)??`contents`)!==`contents`);return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":`${a} ${o}`,...n>0?{tabIndex:0,onKeyDown:r.onKeyDown}:{},children:[(0,M.jsx)($0,{kind:`Set diagram`,kindId:o,children:(0,M.jsx)(e2,{id:a,text:t.title})}),(0,M.jsxs)(t2,{children:[(0,M.jsxs)(`ul`,{className:`sr-only`,"data-testid":`set-description`,children:[t.sets.map(e=>(0,M.jsxs)(`li`,{children:[`Set: `,(0,M.jsx)(v8,{text:e.label})]},e.id)),t.universe!==void 0&&(0,M.jsxs)(`li`,{children:[`Universe: `,(0,M.jsx)(v8,{text:t.universe})]}),l.map(e=>{let n=u.get(e);if(!n)return null;let r=n.elements.length===0&&!n.count;return(0,M.jsxs)(`li`,{children:[(0,M.jsx)(x8,{spec:t,mask:e}),`: `,r&&`empty`,(0,M.jsx)(y8,{elements:n.elements}),n.count!==void 0&&n.count!==n.elements.length&&!r&&`${n.elements.length>0?`, `:``}${n.count} in total`]},e)})]}),(0,M.jsx)(Xie,{spec:t,layout:s,tones:c.tones,fits:p,drawing:f}),(h.length>0||m.length>0)&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,"data-testid":`set-overflow`,children:[(0,M.jsx)(`p`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`↓ Doesn't fit in the diagram:`}),m.map(e=>(0,M.jsxs)(X0,{children:[(0,M.jsxs)(`span`,{className:`font-medium`,children:[e===`universe`?`Universe`:`${qie[Number(e)]} label`,`:`]}),` `,(0,M.jsx)(v8,{text:e===`universe`?t.universe:t.sets[Number(e)].label})]},e)),h.map(e=>(0,M.jsxs)(X0,{children:[(0,M.jsxs)(`span`,{className:`font-medium`,children:[(0,M.jsx)(x8,{spec:t,mask:e}),`:`]}),` `,(0,M.jsx)(`span`,{className:`font-mono`,children:(0,M.jsx)(w8,{region:u.get(e)})})]},e))]}),d.length>0&&(0,M.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1 text-xs`,"data-testid":`set-key`,children:d.map(e=>{let n=c.tones.get(e);return(0,M.jsx)(`div`,{className:`max-w-full min-w-0`,"data-tone":n,children:(0,M.jsxs)(X0,{children:[(0,M.jsxs)(`span`,{className:`font-medium`,children:[h8[n].word,`:`]}),` `,(0,M.jsx)(x8,{spec:t,mask:e})]})},e)})}),c.variables.length>0&&(0,M.jsx)(`div`,{className:`flex flex-wrap gap-2`,"data-testid":`set-variables`,children:c.variables.map((e,t)=>(0,M.jsx)(`div`,{className:`border-border-strong bg-card max-w-full min-w-0 rounded-md border px-2 py-0.5 font-mono text-xs`,children:(0,M.jsxs)(X0,{children:[(0,M.jsx)(v8,{text:e.name}),` = `,(0,M.jsx)(v8,{text:String(e.value)})]})},t))}),n>0&&(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`set-announcement`,children:[(0,M.jsxs)(`span`,{className:`sr-only`,children:[`Step `,i+1,` of `,n,`:`,` `]}),(0,M.jsx)(`div`,{"data-testid":`set-explanation`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:c.explanation,mode:`math`})})}),(0,M.jsxs)(`span`,{className:`sr-only`,children:[d.length===0&&`Nothing highlighted. `,d.map(e=>(0,M.jsxs)(v.Fragment,{children:[h8[c.tones.get(e)].word,`: `,(0,M.jsx)(x8,{spec:t,mask:e}),`.`,` `]},e)),c.variables.map((e,t)=>(0,M.jsxs)(v.Fragment,{children:[(0,M.jsx)(v8,{text:e.name}),` = `,(0,M.jsx)(v8,{text:String(e.value)}),`.`,` `]},t))]})]})})]}),n>0&&(0,M.jsx)(Z0,{stepper:r,play:!0})]})}var Qie={active:`Highlighted`,done:`Done`,muted:`Ruled out`};function $ie(e,t){let n=e.rows.map(e=>[...e]);for(let r of e.steps?.slice(0,t+1)??[])for(let{row:e,column:t,value:i}of r.cells??[])n[e]&&t<n[e].length&&(n[e][t]=i);let r=e.steps?.[t];return{rows:n,explanation:r?.explanation,highlight:r?.highlight??[],changes:r?.cells??[]}}var D8=e=>typeof e==`boolean`?e?`T`:`F`:String(e),O8=({row:e,column:t})=>[e!==void 0&&`row ${e+1}`,t!==void 0&&`column ${t+1}`].filter(Boolean).join(`, `),k8=`wrap-normal!`;function eae({view:e}){let{spec:t}=e,n=J0(t.steps?.length??1),r=$ie(t,n.index),i=e=>{let t=r.highlight.findLast(e);return t&&(t.tone??`active`)},a=t.steps!==void 0,o=(0,v.useId)(),s=(0,v.useId)();return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":`${o} ${s}`,...a?{tabIndex:0,onKeyDown:n.onKeyDown}:{},children:[(0,M.jsx)($0,{kind:`Table`,kindId:s,children:(0,M.jsx)(e2,{id:o,text:t.title})}),(0,M.jsxs)(t2,{children:[(0,M.jsx)(`div`,{className:`overflow-x-auto`,role:`group`,"aria-label":`Table contents, scrolls sideways`,tabIndex:0,"data-testid":`table-scroll`,onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.stopPropagation()},children:(0,M.jsxs)(`table`,{className:`mx-auto border-collapse text-sm`,children:[(0,M.jsx)(`caption`,{className:`sr-only`,children:(0,M.jsx)(V0,{text:t.title,mode:`math`})}),(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[t.rowHeaders&&(0,M.jsx)(`td`,{className:`border-b px-3 py-1.5`}),t.columns.map((e,t)=>{let n=i(e=>e.column===t&&e.row===void 0);return(0,M.jsx)(`th`,{scope:`col`,className:j(`border-b px-3 py-1.5 text-center font-medium`,n&&K0[n]),children:(0,M.jsx)(V0,{text:e,mode:`math`,className:k8})},t)})]})}),(0,M.jsx)(`tbody`,{children:r.rows.map((e,n)=>{let r=i(e=>e.row===n&&e.column===void 0),a=t.rowHeaders?.[n];return(0,M.jsxs)(`tr`,{className:`border-b last:border-b-0`,children:[a!==void 0&&(0,M.jsx)(`th`,{scope:`row`,className:j(`border-r px-3 py-1.5 text-center font-medium`,r&&K0[r]),children:(0,M.jsx)(V0,{text:a,mode:`math`,className:k8})}),e.map((e,t)=>{let r=i(e=>(e.row===void 0||e.row===n)&&(e.column===void 0||e.column===t));return(0,M.jsx)(`td`,{className:j(`px-3 py-1.5 text-center tabular-nums`,r&&K0[r]),"data-tone":r,"data-testid":`table-cell`,children:(0,M.jsx)(V0,{text:D8(e),mode:`math`,className:k8})},t)})]},n)})})]})}),a&&(0,M.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`table-live`,children:[(0,M.jsxs)(`span`,{className:`sr-only`,children:[`Step `,n.index+1,` of `,n.last+1,`.`,` `]}),(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:r.explanation??``,mode:`math`})}),(0,M.jsxs)(`span`,{className:`sr-only`,"data-testid":`table-description`,children:[r.highlight.map(e=>` ${Qie[e.tone??`active`]}: ${O8(e)}.`),r.changes.map(e=>` Changed ${O8(e)} to ${D8(e.value)}.`)]})]})]}),(0,M.jsx)(Z0,{stepper:n,play:!0})]})}function tae({view:e}){let{spec:t}=e,n=J0(t.steps.length),{index:r,last:i,go:a}=n,o=r===i,s=t.steps[r],c=(0,v.useId)(),l=(0,v.useId)();return(0,M.jsxs)(Q0,{role:`region`,"aria-labelledby":`${c} ${l}`,tabIndex:0,onKeyDown:n.onKeyDown,children:[(0,M.jsx)($0,{kind:`Worked steps`,kindId:l,children:(0,M.jsx)(e2,{id:c,text:t.title})}),(0,M.jsxs)(t2,{children:[t.goal&&(0,M.jsx)(`p`,{className:`bg-sunken rounded-lg px-3.5 py-2.5 leading-normal`,children:(0,M.jsxs)(Y0,{children:[(0,M.jsx)(`span`,{className:`font-semibold`,children:`Goal: `}),(0,M.jsx)(V0,{text:t.goal,mode:`math`})]})}),(0,M.jsx)(`ol`,{className:`flex flex-col`,children:t.steps.slice(0,r+1).map((e,t)=>(0,M.jsxs)(`li`,{"aria-current":t===r?`step`:void 0,className:`group relative flex min-w-0 flex-col gap-0.5 border-t py-2.5 pl-9 first:border-t-0 first:pt-0.5 last:pb-0`,"data-testid":`worked-step`,children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,className:j(`absolute top-2.5 left-0 grid size-6 place-items-center rounded-full font-mono text-[0.7rem] font-medium group-first:top-0.5`,t===r?q0.current:q0.other),"data-testid":`worked-step-number`,children:t+1}),e.label&&(0,M.jsx)(`p`,{className:`text-muted-foreground font-mono text-[0.6875rem] font-medium tracking-[0.06em] uppercase`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:e.label,mode:`math`})})}),(0,M.jsx)(`div`,{className:`font-heading text-[1.0625rem] leading-normal`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:e.statement,mode:`math`})})}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm leading-snug`,children:(0,M.jsx)(Y0,{children:(0,M.jsx)(V0,{text:e.justification,mode:`math`})})})]},t))}),(0,M.jsxs)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`worked-status`,children:[`Step `,r+1,` of `,i+1,`.`,` `,s?.label&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(V0,{text:s.label,mode:`math`}),`.`,` `]}),s&&(0,M.jsx)(V0,{text:s.statement,mode:`math`}),` `,s&&(0,M.jsx)(V0,{text:s.justification,mode:`math`})]})]}),(0,M.jsx)(Z0,{stepper:n,children:(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground hover:text-foreground decoration-border-strong underline underline-offset-4 hover:bg-transparent dark:hover:bg-transparent`,onClick:()=>a(o?0:i),children:o?`Start over`:`Show all`})})]})}var nae={algorithm_trace:c2,code_exercise:A2,code_walkthrough:N2,composition:a4,flashcard_deck:p4,graph:pie,interview_context:_ie,multiple_choice:vie,placement_question:bie,project_milestone:Pie,set_diagram:Zie,table:eae,worked_steps:tae};function A8({data:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let i=aM.safeParse(e);if(!i.success)return(0,M.jsx)(`div`,{className:`text-muted-foreground rounded-lg border border-dashed p-3 text-sm`,role:`note`,children:`Can't display this item.`});let a=i.data,o=nae[a.kind];return(0,M.jsx)(o,{view:a,replyInProgress:t,onUpdate:n,onRefresh:r})}function j8(e,t,n){return(e===`submitted`||e===`streaming`)&&t===n-1}function rae(e,t){return e.id&&t[e.id]||e.data}function iae(e){let t={};for(let n of e)for(let e of n.parts){if(e.type!==`data-artifact`)continue;let n=aM.safeParse(e.data);n.success&&(t[n.data.id]=n.data)}return t}var M8=e=>e!==void 0&&`latestAttempt`in e&&e.latestAttempt!==void 0;function N8(e,t){let n={...e};for(let[r,i]of Object.entries(t))(!M8(e[r])||M8(i))&&(n[r]=i);return n}function P8({...e}){return(0,M.jsx)(Sr,{"data-slot":`collapsible`,...e})}function F8({...e}){return(0,M.jsx)(wr,{"data-slot":`collapsible-trigger`,...e})}function I8({...e}){return(0,M.jsx)(Er,{"data-slot":`collapsible-content`,...e})}function L8({className:e}){return(0,M.jsx)(`svg`,{viewBox:`0 0 21 21`,fill:`none`,"aria-hidden":`true`,focusable:`false`,className:j(`size-[21px] shrink-0`,e),children:(0,M.jsx)(`path`,{fill:`currentColor`,d:`M11.8102 19.1625C11.2327 19.1625 10.6841 19.0528 10.1643 18.8334C9.64459 18.6139 9.18259 18.3078 8.77834 17.9151C8.33944 18.0653 7.88322 18.1404 7.40967 18.1404C6.63582 18.1404 5.91972 17.9498 5.26137 17.5686C4.60302 17.1875 4.07172 16.6677 3.66747 16.0094C3.27477 15.351 3.07842 14.6176 3.07842 13.8091C3.07842 13.4742 3.12462 13.1103 3.21702 12.7176C2.75502 12.2903 2.39697 11.7994 2.14287 11.245C1.88877 10.679 1.76172 10.09 1.76172 9.47785C1.76172 8.85415 1.89454 8.25355 2.16019 7.67605C2.42584 7.09855 2.79544 6.6019 3.26899 6.1861C3.75409 5.75875 4.31427 5.46422 4.94952 5.30252C5.07657 4.64417 5.34222 4.05512 5.74647 3.53537C6.16227 3.00407 6.67047 2.58827 7.27107 2.28797C7.87167 1.98767 8.51269 1.83752 9.19414 1.83752C9.77164 1.83752 10.3203 1.94725 10.84 2.1667C11.3598 2.38615 11.8218 2.69222 12.226 3.08492C12.6649 2.93477 13.1211 2.8597 13.5947 2.8597C14.3685 2.8597 15.0846 3.05027 15.743 3.43142C16.4013 3.81257 16.9269 4.33232 17.3196 4.99067C17.7238 5.64902 17.9259 6.38245 17.9259 7.19095C17.9259 7.5259 17.8797 7.88973 17.7873 8.28242C18.2493 8.70977 18.6074 9.20643 18.8615 9.77238C19.1156 10.3268 19.2426 10.91 19.2426 11.5222C19.2426 12.1459 19.1098 12.7465 18.8442 13.324C18.5785 13.9015 18.2031 14.4039 17.718 14.8313C17.2445 15.2471 16.6901 15.5358 16.0548 15.6975C15.9278 16.3559 15.6564 16.9449 15.2406 17.4647C14.8363 17.996 14.3339 18.4118 13.7333 18.7121C13.1327 19.0124 12.4917 19.1625 11.8102 19.1625ZM7.53094 16.9969C8.10844 16.9969 8.61087 16.8756 9.03822 16.6331L12.2953 14.762C12.4108 14.6811 12.4686 14.5714 12.4686 14.4328V12.9429L8.27592 15.351C8.02182 15.5012 7.76772 15.5012 7.51362 15.351L4.23919 13.4626C4.23919 13.4973 4.23342 13.5377 4.22187 13.5839C4.22187 13.6301 4.22187 13.6994 4.22187 13.7918C4.22187 14.3808 4.36047 14.9237 4.63767 15.4203C4.92642 15.9054 5.32489 16.2866 5.83309 16.5638C6.34129 16.8525 6.90724 16.9969 7.53094 16.9969ZM7.70419 14.1729C7.77349 14.2076 7.83702 14.2249 7.89477 14.2249C7.95252 14.2249 8.01027 14.2076 8.06802 14.1729L9.36739 13.4279L5.19207 11.0024C4.93797 10.8523 4.81092 10.6271 4.81092 10.3268V6.56725C4.23342 6.82135 3.77142 7.21405 3.42492 7.74535C3.07842 8.2651 2.90517 8.8426 2.90517 9.47785C2.90517 10.0438 3.04954 10.5866 3.33829 11.1064C3.62704 11.6261 4.00242 12.0189 4.46442 12.2845L7.70419 14.1729ZM11.8102 18.0191C12.4224 18.0191 12.9768 17.8805 13.4734 17.6033C13.9701 17.3261 14.3628 16.9449 14.6515 16.4598C14.9403 15.9747 15.0846 15.4319 15.0846 14.8313V11.0891C15.0846 10.9505 15.0269 10.8465 14.9114 10.7772L13.5947 10.0149V14.8486C13.5947 15.1489 13.4676 15.3741 13.2135 15.5243L9.93912 17.4127C10.5051 17.817 11.1288 18.0191 11.8102 18.0191ZM12.4686 11.6781V9.32192L10.5108 8.21312L8.53579 9.32192V11.6781L10.5108 12.7869L12.4686 11.6781ZM7.40967 6.15145C7.40967 5.85115 7.53672 5.62592 7.79082 5.47577L11.0652 3.58735C10.4993 3.1831 9.87559 2.98097 9.19414 2.98097C8.58199 2.98097 8.02759 3.11957 7.53094 3.39677C7.03429 3.67397 6.64159 4.05512 6.35284 4.54022C6.07564 5.02532 5.93704 5.56817 5.93704 6.16878V9.89365C5.93704 10.0323 5.99479 10.142 6.11029 10.2228L7.40967 10.9851V6.15145ZM16.2108 14.4328C16.7883 14.1787 17.2445 13.786 17.5794 13.2547C17.9259 12.7234 18.0992 12.1459 18.0992 11.5222C18.0992 10.9562 17.9548 10.4134 17.6661 9.89365C17.3773 9.3739 17.0019 8.9812 16.5399 8.71555L13.3002 6.84445C13.2309 6.79825 13.1673 6.78092 13.1096 6.79248C13.0518 6.79248 12.9941 6.8098 12.9363 6.84445L11.637 7.5721L15.8296 10.0149C15.9567 10.0842 16.0491 10.1766 16.1068 10.2921C16.1761 10.3961 16.2108 10.5231 16.2108 10.6733V14.4328ZM12.7284 5.6317C12.9825 5.47 13.2366 5.47 13.4907 5.6317L16.7825 7.55477C16.7825 7.47393 16.7825 7.36997 16.7825 7.24292C16.7825 6.68852 16.6439 6.163 16.3667 5.66635C16.101 5.15815 15.7141 4.7539 15.2059 4.4536C14.7093 4.1533 14.1318 4.00315 13.4734 4.00315C12.8959 4.00315 12.3935 4.12442 11.9661 4.36697L8.70904 6.23808C8.59354 6.31892 8.53579 6.42865 8.53579 6.56725V8.0572L12.7284 5.6317Z`})})}function R8({...e}){return(0,M.jsx)(Qa,{"data-slot":`dialog`,...e})}function aae({...e}){return(0,M.jsx)(io,{"data-slot":`dialog-portal`,...e})}function oae({className:e,...t}){return(0,M.jsx)(oo,{"data-slot":`dialog-overlay`,className:j(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function z8({className:e,children:t,showCloseButton:n=!0,...r}){return(0,M.jsxs)(aae,{"data-slot":`dialog-portal`,children:[(0,M.jsx)(oae,{}),(0,M.jsxs)(uo,{"data-slot":`dialog-content`,className:j(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...r,children:[t,n&&(0,M.jsxs)(vo,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 after:absolute after:-inset-3 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,M.jsx)(ev,{}),(0,M.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function B8({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`dialog-header`,className:j(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function V8({className:e,showCloseButton:t=!1,children:n,...r}){return(0,M.jsxs)(`div`,{"data-slot":`dialog-footer`,className:j(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,M.jsx)(vo,{asChild:!0,children:(0,M.jsx)(N,{variant:`outline`,children:`Close`})})]})}function H8({className:e,...t}){return(0,M.jsx)(ho,{"data-slot":`dialog-title`,className:j(`text-lg leading-none font-semibold`,e),...t})}function U8({className:e,...t}){return(0,M.jsx)(go,{"data-slot":`dialog-description`,className:j(`text-sm text-muted-foreground`,e),...t})}function sae({busy:e,className:t,...n}){return(0,M.jsxs)(`button`,{type:`button`,"aria-busy":e||void 0,className:j(`inline-flex min-h-[45px] w-full max-w-[242px] items-center justify-center gap-3 rounded-[12px] px-5 py-3 text-[15px] font-medium`,`bg-black text-white hover:opacity-85 active:opacity-70 disabled:opacity-50 dark:bg-white dark:text-black`,`focus-visible:ring-ring/50 outline-none focus-visible:ring-[3px]`,t),...n,children:[(0,M.jsx)(L8,{}),e?`Opening ChatGPT…`:`Continue with ChatGPT`]})}function W8({className:e,primary:t=!1}){return(0,M.jsx)(N,{asChild:!0,size:t?`sm`:`xs`,variant:t?`default`:`link`,className:j(!t&&`h-auto p-0`,e),children:(0,M.jsxs)(`a`,{href:oM,target:`_blank`,rel:`noreferrer`,"aria-label":`Manage ChatGPT usage (opens in a new tab)`,children:[`Manage usage `,(0,M.jsx)(xg,{"aria-hidden":!0})]})})}function G8(){return(0,M.jsxs)(`span`,{className:`text-muted-foreground inline-flex items-center gap-1.5 text-xs`,"aria-live":`polite`,children:[(0,M.jsx)(L8,{className:`size-4`}),`Using ChatGPT plan`,(0,M.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,M.jsx)(W8,{})]})}function cae(){return(0,M.jsxs)(`div`,{role:`alert`,className:`flex flex-col gap-1 rounded-lg border p-3 text-sm`,children:[(0,M.jsxs)(`span`,{className:`text-muted-foreground inline-flex items-center gap-1.5 text-xs font-medium`,children:[(0,M.jsx)(L8,{className:`size-4`}),` ChatGPT`]}),(0,M.jsx)(`p`,{className:`font-semibold`,children:`Usage limit reached`}),(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`Review your plan or this app's limit in ChatGPT settings.`}),(0,M.jsx)(W8,{primary:!0,className:`mt-1 self-start`})]})}function lae(){let[e,t]=(0,v.useState)(!1),n=(0,v.useCallback)(()=>{RN().then(e=>{e.ok&&e.value.chatgpt?.welcome&&t(!0)})},[]);(0,v.useEffect)(()=>(n(),window.addEventListener(IN,n),()=>window.removeEventListener(IN,n)),[n]);let r=()=>{t(!1),GN()};return(0,M.jsx)(R8,{open:e,onOpenChange:e=>!e&&r(),children:(0,M.jsxs)(z8,{className:`sm:max-w-sm`,children:[(0,M.jsxs)(B8,{className:`items-center text-center sm:text-center`,children:[(0,M.jsx)(L8,{className:`text-foreground mb-2 size-[72px]`}),(0,M.jsx)(H8,{children:`You're using your ChatGPT plan`}),(0,M.jsx)(U8,{children:`Eligible usage in this app uses your ChatGPT plan. Manage usage in your ChatGPT settings.`})]}),(0,M.jsx)(V8,{className:`sm:justify-center`,children:(0,M.jsx)(N,{onClick:r,children:`Got it`})})]})})}function K8({...e}){return(0,M.jsx)(fd,{"data-slot":`dropdown-menu`,...e})}function q8({...e}){return(0,M.jsx)(md,{"data-slot":`dropdown-menu-trigger`,...e})}function J8({className:e,sideOffset:t=4,...n}){return(0,M.jsx)(hd,{children:(0,M.jsx)(_d,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:j(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function Y8({className:e,inset:t,variant:n=`default`,...r}){return(0,M.jsx)(yd,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:j(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function X8({...e}){return(0,M.jsx)(bd,{"data-slot":`dropdown-menu-radio-group`,...e})}function Z8({className:e,children:t,...n}){return(0,M.jsxs)(xd,{"data-slot":`dropdown-menu-radio-item`,className:j(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,M.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,M.jsx)(Sd,{children:(0,M.jsx)(qh,{className:`size-2 fill-current`})})}),t]})}function Q8({className:e,inset:t,...n}){return(0,M.jsx)(vd,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:j(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function $8({className:e,...t}){return(0,M.jsx)(Cd,{"data-slot":`dropdown-menu-separator`,className:j(`-mx-1 my-1 h-px bg-border`,e),...t})}function e5({className:e,type:t,...n}){return(0,M.jsx)(`input`,{type:t,"data-slot":`input`,className:j(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...n})}var t5=1,uae=.9,dae=.8,fae=.17,n5=.1,r5=.999,pae=.9999,mae=.99,hae=/[\\\/_+.#"@\[\(\{&]/,gae=/[\\\/_+.#"@\[\(\{&]/g,_ae=/[\s-]/,i5=/[\s-]/g;function a5(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?t5:mae;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=a5(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=t5:hae.test(e.charAt(l-1))?(d*=dae,p=e.slice(i,l-1).match(gae),p&&i>0&&(d*=r5**+p.length)):_ae.test(e.charAt(l-1))?(d*=uae,m=e.slice(i,l-1).match(i5),m&&i>0&&(d*=r5**+m.length)):(d*=fae,i>0&&(d*=r5**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=pae)),(d<n5&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=a5(e,t,n,r,l+1,a+2,o),f*n5>d&&(d=f*n5)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function o5(e){return e.toLowerCase().replace(i5,` `)}function vae(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,a5(e,t,o5(e),o5(t),0,0,{})}var s5=`[cmdk-group=""]`,c5=`[cmdk-group-items=""]`,yae=`[cmdk-group-heading=""]`,l5=`[cmdk-item=""]`,u5=`${l5}:not([aria-disabled="true"])`,d5=`cmdk-item-select`,f5=`data-value`,bae=(e,t,n)=>vae(e,t,n),p5=v.createContext(void 0),m5=()=>v.useContext(p5),h5=v.createContext(void 0),g5=()=>v.useContext(h5),_5=v.createContext(void 0),v5=v.forwardRef((e,t)=>{let n=S5(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=S5(()=>new Set),i=S5(()=>new Map),a=S5(()=>new Map),o=S5(()=>new Set),s=b5(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,y=hr(),b=hr(),x=hr(),S=v.useRef(null),C=jae();x5(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),x5(()=>{C(6,ee)},[]);let w=v.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=te()?.id,w.emit()}),r||C(5,ee),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=v.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=te();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??bae;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;ne().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(c5);t?t.appendChild(e.parentElement===t?e:e.closest(`${c5} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${c5} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${s5}[${f5}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=ne().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(f5);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function ee(){var e;let t=te();t&&(t.parentElement?.firstChild===t&&((e=t.closest(s5)?.querySelector(yae))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function te(){return S.current?.querySelector(`${l5}[aria-selected="true"]`)}function ne(){return Array.from(S.current?.querySelectorAll(u5)||[])}function re(e){let t=ne()[e];t&&w.setState(`value`,t.getAttribute(f5))}function ie(e){var t;let n=te(),r=ne(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(f5))}function ae(e){let t=te()?.closest(s5),n;for(;t&&!n;)t=e>0?kae(t,s5):Aae(t,s5),n=t?.querySelector(u5);n?w.setState(`value`,n.getAttribute(f5)):ie(e)}let A=()=>re(ne().length-1),oe=e=>{e.preventDefault(),e.metaKey?A():e.altKey?ae(1):ie(1)},se=e=>{e.preventDefault(),e.metaKey?re(0):e.altKey?ae(-1):ie(-1)};return v.createElement(ln.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&oe(e);break;case`ArrowDown`:oe(e);break;case`p`:case`k`:g&&e.ctrlKey&&se(e);break;case`ArrowUp`:se(e);break;case`Home`:e.preventDefault(),re(0);break;case`End`:e.preventDefault(),A();break;case`Enter`:{e.preventDefault();let t=te();if(t){let e=new Event(d5);t.dispatchEvent(e)}}}}},v.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Nae},c),T5(e,e=>v.createElement(h5.Provider,{value:w},v.createElement(p5.Provider,{value:T},e))))}),xae=v.forwardRef((e,t)=>{let n=hr(),r=v.useRef(null),i=v.useContext(_5),a=m5(),o=b5(e),s=o.current?.forceMount??i?.forceMount;x5(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=w5(n,r,[e.value,e.children,r],e.keywords),l=g5(),u=C5(e=>e.value&&e.value===c.current),d=C5(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);v.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(d5,f),()=>t.removeEventListener(d5,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:y,...b}=e;return v.createElement(ln.div,{ref:zt(r,t),...b,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Sae=v.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=hr(),s=v.useRef(null),c=v.useRef(null),l=hr(),u=m5(),d=C5(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));x5(()=>u.group(o),[]),w5(o,s,[e.value,e.heading,c]);let f=v.useMemo(()=>({id:o,forceMount:i}),[i]);return v.createElement(ln.div,{ref:zt(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&v.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),T5(e,e=>v.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},v.createElement(_5.Provider,{value:f},e))))}),Cae=v.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=v.useRef(null),a=C5(e=>!e.search);return!n&&!a?null:v.createElement(ln.div,{ref:zt(i,t),...r,"cmdk-separator":``,role:`separator`})}),wae=v.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=g5(),o=C5(e=>e.search),s=C5(e=>e.selectedItemId),c=m5();return v.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),v.createElement(ln.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Tae=v.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=v.useRef(null),o=v.useRef(null),s=C5(e=>e.selectedItemId),c=m5();return v.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),v.createElement(ln.div,{ref:zt(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},T5(e,e=>v.createElement(`div`,{ref:zt(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Eae=v.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return v.createElement(Qa,{open:n,onOpenChange:r},v.createElement(io,{container:o},v.createElement(oo,{"cmdk-overlay":``,className:i}),v.createElement(uo,{"aria-label":e.label,"cmdk-dialog":``,className:a},v.createElement(v5,{ref:t,...s}))))}),Dae=v.forwardRef((e,t)=>C5(e=>e.filtered.count===0)?v.createElement(ln.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Oae=v.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return v.createElement(ln.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},T5(e,e=>v.createElement(`div`,{"aria-hidden":!0},e)))}),y5=Object.assign(v5,{List:Tae,Item:xae,Input:wae,Group:Sae,Separator:Cae,Dialog:Eae,Empty:Dae,Loading:Oae});function kae(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Aae(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function b5(e){let t=v.useRef(e);return x5(()=>{t.current=e}),t}var x5=typeof window>`u`?v.useEffect:v.useLayoutEffect;function S5(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function C5(e){let t=g5(),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function w5(e,t,n,r=[]){let i=v.useRef(),a=m5();return x5(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(f5,s),i.current=s}),i}var jae=()=>{let[e,t]=v.useState(),n=S5(()=>new Map);return x5(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Mae(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function T5({asChild:e,children:t},n){return e&&v.isValidElement(t)?v.cloneElement(Mae(t),{ref:t.ref},n(t.props.children)):n(t)}var Nae={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function E5({className:e,...t}){return(0,M.jsx)(y5,{"data-slot":`command`,className:j(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t})}function D5({className:e,...t}){return(0,M.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,M.jsx)(D_,{className:`size-4 shrink-0 opacity-50`}),(0,M.jsx)(y5.Input,{"data-slot":`command-input`,className:j(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function O5({className:e,...t}){return(0,M.jsx)(y5.List,{"data-slot":`command-list`,className:j(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function k5({...e}){return(0,M.jsx)(y5.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function Pae({className:e,...t}){return(0,M.jsx)(y5.Group,{"data-slot":`command-group`,className:j(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t})}function A5({className:e,...t}){return(0,M.jsx)(y5.Item,{"data-slot":`command-item`,className:j(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...t})}var j5=50,M5={none:`None`,minimal:`Minimal`,low:`Low`,medium:`Medium`,high:`High`,xhigh:`Extra high`,max:`Max`},Fae=`custom:`,N5=e=>e.startsWith(Fae)&&e.indexOf(`/`)>7?e.slice(0,e.indexOf(`/`)):void 0,P5=e=>N5(e)?e.slice(e.indexOf(`/`)+1):e.slice(e.indexOf(`:`)+1);function F5(e,t=[]){if(N5(e))return P5(e);let n=t.find(t=>t.id===e)?.name;return n&&n!==e?n.replace(/^[^:]{1,40}:\s+/,``):e.replace(/^[a-z][a-z0-9-]*:/,``)}var I5={openrouter:`OpenRouter`,anthropic:`Anthropic`,openai:`OpenAI`,chatgpt:`ChatGPT`};function L5(e,t=[]){let n=N5(e);if(n)return t.find(e=>e.id===n)?.name??`Removed provider`;let r=e.slice(0,Math.max(0,e.indexOf(`:`)));return I5[r]??r}function R5(e,t=[],n=[]){let r=F5(e,t);return N5(e)?`${r} (${L5(e,n)})`:e.startsWith(`openrouter:`)||!(e.split(`:`)[0]in I5)?r:`${r} (${L5(e)})`}var Iae={unverified:`not tested`,verified:`tested`,failed:`test failed`};function Lae(e){if(!e)return;if(e.input===0&&e.output===0)return`free`;let t=e=>`$${e<1?e.toFixed(2):Number(e.toFixed(2))}`;return`${t(e.input)} in · ${t(e.output)} out per 1M tokens`}function Rae(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean);return e.filter(e=>{let t=`${e.name} ${e.id}`.toLowerCase();return n.every(e=>t.includes(e))})}function z5(){let[e,t]=(0,v.useState)(),[n,r]=(0,v.useState)(),i=(0,v.useCallback)(async()=>{let e=await TN();e.ok?t(e.value):r(e.error)},[]);return(0,v.useEffect)(()=>{i();let e=()=>void i();return window.addEventListener(IN,e),()=>window.removeEventListener(IN,e)},[i]),{view:e,error:n,refresh:i,choose:(0,v.useCallback)(async e=>{r(void 0);let n=await EN(e);if(!n.ok)return r(n.error);t(e=>e&&{...e,current:n.value,unavailable:null})},[]),togglePin:(0,v.useCallback)(async n=>{if(!e)return;r(void 0);let i=await DN(e.pinned.includes(n)?e.pinned.filter(e=>e!==n):[...e.pinned,n]);if(!i.ok)return r(i.error);t(e=>e&&{...e,pinned:i.value})},[e])}}function zae({model:e,selected:t,names:n}){let r=e.id.startsWith(`chatgpt:`)?`your ChatGPT plan`:e.verification?Iae[e.verification]:Lae(e.price);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Th,{className:j(`mt-0.5 self-start`,t?`opacity-100`:`opacity-0`),"aria-hidden":!0}),(0,M.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,M.jsx)(`span`,{className:`truncate`,children:e.name}),(0,M.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[L5(e.id,n),` · `,P5(e.id),r&&` · ${r}`]})]})]})}function Bae(e,t){let n=(0,v.useMemo)(()=>new Map(e?.models.map(e=>[e.id,e])),[e]);return(0,v.useMemo)(()=>{if(!e)return[];let r=e=>e.flatMap(e=>n.get(e)??[]);if(t.trim()){let n=Rae(e.models,t),r=n.slice(0,j5),i=n.length>j5?`First ${j5} of ${n.length} matches`:void 0,a=[...new Set(r.map(t=>L5(t.id,e.providers)))];return a.length<2?[{heading:i,models:r}]:a.map((t,n)=>({heading:n===0&&i?`${i} · ${t}`:t,models:r.filter(n=>L5(n.id,e.providers)===t)}))}let i=new Set(e.pinned),a=new Set([...e.pinned,...e.recent]),o=e.models.filter(e=>e.id.startsWith(`chatgpt:`)),s=e.providers.filter(e=>!e.removed).map(t=>({heading:t.name,models:e.models.filter(e=>e.id.startsWith(`${t.id}/`)&&!a.has(e.id))})),c=[{heading:`Pinned`,models:r(e.pinned)},{heading:`Recent`,models:r(e.recent.filter(e=>!i.has(e)))},{heading:`ChatGPT plan`,models:o.filter(e=>!a.has(e.id))},...s,{heading:`Suggested`,models:r(e.suggested.filter(e=>!e.startsWith(`chatgpt:`)))}],l=new Set(c.flatMap(e=>e.models.map(e=>e.id))),u=n.get(e.current.model);return[...u&&!l.has(u.id)?[{heading:`Current`,models:[u]}]:[],...c].filter(e=>e.models.length>0)},[e,t,n])}function B5({view:e,query:t,onQueryChange:n,onPick:r}){let i=Bae(e,t);return(0,M.jsxs)(E5,{shouldFilter:!1,label:`Choose a model`,children:[(0,M.jsx)(D5,{placeholder:`Search models…`,value:t,onValueChange:n}),(0,M.jsxs)(O5,{className:`max-h-80`,label:`Models`,children:[(0,M.jsx)(k5,{children:e.catalog===`unavailable`?`The model list couldn't be loaded.`:`No models match.`}),i.map((t,n)=>(0,M.jsx)(Pae,{heading:t.heading,children:t.models.map(t=>(0,M.jsx)(A5,{value:t.id,onSelect:()=>r(t),className:`items-start`,children:(0,M.jsx)(zae,{model:t,selected:t.id===e.current.model,names:e.providers})},t.id))},t.heading??n))]}),e.catalog!==`fresh`&&(0,M.jsx)(`p`,{className:`text-muted-foreground border-t px-3 py-2 text-xs`,children:e.catalog===`stale`?`Couldn't refresh every provider's model list, so some of this is a saved copy.`:`Couldn't load the model list. Search covers only the default model.`})]})}function V5(e,t){let n=e.effort&&t.reasoning?.efforts.includes(e.effort)?e.effort:null;return{model:t.id,effort:n}}function H5({state:e,disabled:t,value:n,onChoose:r,unavailable:i,label:a=`Model`}){let{view:o,error:s,refresh:c,togglePin:l}=e,u=r??e.choose,d=n===void 0,f=o&&n?{...o,current:n,unavailable:i??null}:o,[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(``);if(!f)return s?(0,M.jsx)(`span`,{className:`text-destructive text-xs`,children:s}):null;let _=f.models.find(e=>e.id===f.current.model),y=R5(f.current.model,f.models,f.providers),b=_?.reasoning?.efforts??[],x=_?.reasoning?.defaultEffort,S=f.pinned.includes(f.current.model);return(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1`,children:[(0,M.jsxs)(GF,{open:p,onOpenChange:e=>{m(e),e?c():g(``)},children:[(0,M.jsx)(KF,{asChild:!0,children:(0,M.jsxs)(N,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-w-64 min-w-0`,"aria-label":`${a}: ${y}. Change model`,disabled:t,children:[(0,M.jsx)(`span`,{className:`truncate`,children:y}),(0,M.jsx)(Fh,{"aria-hidden":!0})]})}),(0,M.jsx)(qF,{className:`w-[min(28rem,calc(100vw-2rem))] p-0`,align:`start`,children:(0,M.jsx)(B5,{view:f,query:h,onQueryChange:g,onPick:e=>{m(!1),g(``);let t=V5(f.current,e);(t.model!==f.current.model||t.effort!==f.current.effort)&&u(t)}})})]}),d&&(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,"aria-label":S?`Unpin ${y}`:`Pin ${y}`,"aria-pressed":S,title:S?`Unpin this model`:`Pin this model to the top of the list`,disabled:t,onClick:()=>void l(f.current.model),children:(0,M.jsx)(L_,{className:j(S&&`fill-current`),"aria-hidden":!0})}),b.length>0&&(0,M.jsxs)(K8,{children:[(0,M.jsx)(q8,{asChild:!0,children:(0,M.jsxs)(N,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground`,disabled:t,"aria-label":`${d?`Reasoning effort`:`${a} reasoning effort`}: ${f.current.effort?M5[f.current.effort]:`the model's default`}. Change effort`,children:[f.current.effort?M5[f.current.effort]:`Default effort`,(0,M.jsx)(Fh,{"aria-hidden":!0})]})}),(0,M.jsxs)(J8,{align:`start`,children:[(0,M.jsx)(Q8,{children:`Reasoning effort`}),(0,M.jsx)($8,{}),(0,M.jsxs)(X8,{value:f.current.effort??`default`,onValueChange:e=>void u({model:f.current.model,effort:e==="default"?null:e}),children:[(0,M.jsxs)(Z8,{value:`default`,children:[`Default`,x?` (${M5[x]})`:``]}),b.map(e=>(0,M.jsx)(Z8,{value:e,children:M5[e]},e))]})]})]}),d&&f.current.model.startsWith(`chatgpt:`)&&(0,M.jsx)(G8,{}),f.unavailable&&!s&&(0,M.jsx)(`span`,{role:`alert`,className:`text-destructive text-xs`,children:f.unavailable}),s&&(0,M.jsx)(`span`,{role:`alert`,className:`text-destructive text-xs`,children:s})]})}function U5({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`empty`,className:j(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,e),...t})}function W5({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`empty-header`,className:j(`flex max-w-sm flex-col items-center gap-2 text-center`,e),...t})}var Vae=oe(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6`}},defaultVariants:{variant:`default`}});function G5({className:e,variant:t=`default`,...n}){return(0,M.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:j(Vae({variant:t,className:e})),...n})}function K5({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`empty-title`,className:j(`text-lg font-medium tracking-tight`,e),...t})}function q5({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`empty-description`,className:j(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function J5({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`empty-content`,className:j(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...t})}function Hae({className:e,...t}){return(0,M.jsx)(Td,{"data-slot":`label`,className:j(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function Uae({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,M.jsx)(cm,{"data-slot":`separator`,decorative:n,orientation:t,className:j(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var Wae=oe(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:[`flex-col [&>*]:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`[&>[data-slot=field-label]]:flex-auto`,`has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto`,`@md/field-group:[&>[data-slot=field-label]]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}});function Y5({className:e,orientation:t=`vertical`,...n}){return(0,M.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:j(Wae({orientation:t}),e),...n})}function X5({className:e,...t}){return(0,M.jsx)(Hae,{"data-slot":`field-label`,className:j(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4`,`has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10`,e),...t})}function Z5({className:e,...t}){return(0,M.jsx)(`p`,{"data-slot":`field-description`,className:j(`text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function Q5({className:e,children:t,errors:n,...r}){let i=(0,v.useMemo)(()=>{if(t)return t;if(!n?.length)return null;let e=[...new Map(n.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,M.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,M.jsx)(`li`,{children:e.message},t))})},[t,n]);return i?(0,M.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:j(`text-sm font-normal text-destructive`,e),...r,children:i}):null}function Gae({className:e,...t}){return(0,M.jsx)(Vf,{"data-slot":`radio-group`,className:j(`grid gap-3`,e),...t})}function $5({className:e,...t}){return(0,M.jsx)(Kf,{"data-slot":`radio-group-item`,className:j(`aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40`,e),...t,children:(0,M.jsx)(Jf,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,M.jsx)(qh,{className:`absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary`})})})}function e7({...e}){return(0,M.jsx)(Qa,{"data-slot":`sheet`,...e})}function Kae({...e}){return(0,M.jsx)(io,{"data-slot":`sheet-portal`,...e})}function qae({className:e,...t}){return(0,M.jsx)(oo,{"data-slot":`sheet-overlay`,className:j(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function t7({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,M.jsxs)(Kae,{children:[(0,M.jsx)(qae,{}),(0,M.jsxs)(uo,{"data-slot":`sheet-content`,className:j(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,M.jsxs)(vo,{className:`absolute top-4 right-4 rounded-xs opacity-70 after:absolute after:-inset-3 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,M.jsx)(ev,{className:`size-4`}),(0,M.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function n7({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`sheet-header`,className:j(`flex flex-col gap-1.5 p-4`,e),...t})}function r7({className:e,...t}){return(0,M.jsx)(ho,{"data-slot":`sheet-title`,className:j(`font-semibold text-foreground`,e),...t})}function i7({className:e,...t}){return(0,M.jsx)(go,{"data-slot":`sheet-description`,className:j(`text-sm text-muted-foreground`,e),...t})}var a7={pdf:`PDF`,pptx:`Slides`,markdown:`Markdown`,text:`Text`};function o7(e){let t=e.kind===`pptx`?`slide`:e.kind===`pdf`?`page`:`section`,n=`${e.pageCount} ${t}${e.pageCount===1?``:`s`}`;return e.pagesWithText<e.pageCount?`${n}, ${e.pagesWithText} with text`:n}function Jae(e){return e===0?`Not attached`:e===1?`Used in 1 session`:`Used in ${e} sessions`}function s7({submitLabel:e=`Save source`,onSubmit:t,onCancel:n}){let r=(0,v.useId)(),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(`markdown`),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)();return(0,M.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),u)return;if(!c.trim()){p(`Paste some text or Markdown to save.`);return}if(c.length>5e5){p(`This text is over the ${Dj.toLocaleString(`en`)} character limit.`);return}d(!0),p(void 0);let n=await t({title:i.trim()||void 0,content:c,kind:o});d(!1),n&&p(n)},className:`flex flex-col gap-3`,children:[(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{htmlFor:`${r}-title`,children:`Title (optional)`}),(0,M.jsx)(e5,{id:`${r}-title`,value:i,onChange:e=>a(e.target.value),maxLength:120,placeholder:o===`markdown`?`e.g. Lecture 4 notes.md`:`e.g. Chapter 2 excerpt`,disabled:u})]}),(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{children:`Format`}),(0,M.jsxs)(Gae,{value:o,onValueChange:e=>s(e),className:`flex gap-4`,disabled:u,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)($5,{value:`markdown`,id:`${r}-kind-md`}),(0,M.jsx)(X5,{htmlFor:`${r}-kind-md`,className:`font-normal`,children:`Markdown`})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)($5,{value:`text`,id:`${r}-kind-text`}),(0,M.jsx)(X5,{htmlFor:`${r}-kind-text`,className:`font-normal`,children:`Plain text`})]})]})]}),(0,M.jsxs)(Y5,{"data-invalid":!!f,children:[(0,M.jsx)(X5,{htmlFor:`${r}-content`,children:`Content`}),(0,M.jsx)(p2,{id:`${r}-content`,value:c,onChange:e=>l(e.target.value),rows:7,placeholder:`Paste notes, a chapter excerpt, or Markdown text…`,disabled:u,"aria-invalid":!!f}),(0,M.jsx)(Z5,{children:`Stored locally in your Source Library and indexed for search. Treated as untrusted reference text.`}),f&&(0,M.jsx)(Q5,{role:`alert`,children:f})]}),(0,M.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[n&&(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:n,disabled:u,children:`Cancel`}),(0,M.jsxs)(N,{type:`submit`,size:`sm`,disabled:u||!c.trim(),children:[u&&(0,M.jsx)(JF,{"aria-hidden":`true`}),e]})]})]})}function Yae({open:e,onOpenChange:t,activeSessionId:n,onLibraryChanged:r}){let[i,a]=(0,v.useState)(),[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(),[f,p]=(0,v.useState)(),[m,h]=(0,v.useState)();(0,v.useEffect)(()=>{if(!e)return;let t=!1;return a(void 0),s(void 0),l(!1),h(void 0),YM().then(e=>{t||(e.ok?a(e.value):s(e.error))}),()=>{t=!0}},[e]);let g=async e=>{let t=await XM(e);if(!t.ok)return t.error;a((e=[])=>[t.value,...e]),l(!1)},_=async e=>{if(!n||u)return;s(void 0),d(e.id);let t=await $M(n,e.id);if(d(void 0),!t.ok)return s(t.error);let i=await YM();i.ok&&a(i.value),r?.()},y=async e=>{s(void 0),p(e);let t=await ZM(e);if(p(void 0),h(void 0),!t.ok)return s(t.error);a(t=>t?.filter(t=>t.id!==e)),r?.()};return(0,M.jsx)(e7,{open:e,onOpenChange:t,children:(0,M.jsxs)(t7,{className:`w-full overflow-y-auto sm:max-w-md`,onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-sources-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,M.jsxs)(n7,{children:[(0,M.jsx)(r7,{className:`font-heading`,children:`Source library`}),(0,M.jsx)(i7,{children:`Textbooks, slides and pasted notes kept across your courses and chats. Deleting a chat keeps its sources here.`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-4`,"aria-live":`polite`,children:[!c&&(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,onClick:()=>l(!0),children:[(0,M.jsx)(Yh,{"aria-hidden":`true`}),`Paste text or Markdown`]}),c&&(0,M.jsx)(`div`,{className:`bg-muted/40 rounded-lg border p-3`,children:(0,M.jsx)(s7,{submitLabel:`Save to library`,onSubmit:g,onCancel:()=>l(!1)})}),o&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:o}),!i&&!o&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading sources…`]}),i?.length===0&&!c&&(0,M.jsxs)(U5,{className:`border p-6 md:p-6`,children:[(0,M.jsxs)(W5,{children:[(0,M.jsx)(G5,{variant:`icon`,children:(0,M.jsx)(dh,{"aria-hidden":`true`})}),(0,M.jsx)(K5,{children:`No sources yet`}),(0,M.jsx)(q5,{children:`Upload a PDF or slide deck in any chat or course, or paste text and Markdown here to reuse across sessions.`})]}),(0,M.jsx)(J5,{children:(0,M.jsxs)(N,{type:`button`,onClick:()=>l(!0),children:[(0,M.jsx)(Yh,{"aria-hidden":`true`}),`Paste text or Markdown`]})})]}),i&&i.length>0&&(0,M.jsx)(`ul`,{"aria-label":`Source library`,className:`flex flex-col gap-2`,children:i.map(e=>(0,M.jsxs)(`li`,{className:`bg-card flex flex-col gap-2 rounded-lg border p-3 text-sm`,children:[(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(kg,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),(0,M.jsx)(`span`,{className:`truncate font-medium`,title:e.filename,children:e.filename})]}),(0,M.jsx)(t8,{variant:`secondary`,className:`shrink-0`,children:a7[e.kind]})]}),(0,M.jsxs)(`div`,{className:`text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1 text-xs`,children:[(0,M.jsx)(`span`,{children:o7(e)}),(0,M.jsx)(`span`,{children:Jae(e.attachmentCount)})]}),m===e.id?(0,M.jsxs)(`div`,{className:`bg-destructive-surface text-destructive flex flex-col gap-2 rounded-md border p-2 text-xs`,children:[(0,M.jsxs)(`p`,{children:[`Permanently delete “`,e.filename,`” from the library?`,e.attachmentCount>0?` It will be detached from every session using it.`:``]}),(0,M.jsxs)(`div`,{className:`flex gap-2`,children:[(0,M.jsxs)(N,{type:`button`,variant:`destructive`,size:`sm`,disabled:f===e.id,onClick:()=>void y(e.id),children:[f===e.id&&(0,M.jsx)(JF,{"aria-hidden":`true`}),`Delete permanently`]}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,disabled:f===e.id,onClick:()=>h(void 0),children:`Cancel`})]})]}):(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-0.5`,children:[n&&(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,disabled:u!==void 0,onClick:()=>void _(e),children:[u===e.id?(0,M.jsx)(JF,{"aria-hidden":`true`}):(0,M.jsx)(y_,{"aria-hidden":`true`}),`Attach to chat`]}),(0,M.jsxs)(N,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground hover:text-destructive ml-auto`,"aria-label":`Delete ${e.filename} from library`,onClick:()=>h(e.id),children:[(0,M.jsx)(q_,{"aria-hidden":`true`}),`Delete`]})]})]},e.id))})]})]})})}function Xae({open:e,onOpenChange:t,initialMode:n=`library`,excludeIds:r=[],onPickLibrary:i,onPasteText:a}){let[o,s]=(0,v.useState)(n),[c,l]=(0,v.useState)(),[u,d]=(0,v.useState)(),[f,p]=(0,v.useState)();(0,v.useEffect)(()=>{if(!e)return;s(n),d(void 0),p(void 0);let t=!1;return l(void 0),YM().then(e=>{t||(e.ok?l(e.value):d(e.error))}),()=>{t=!0}},[e,n]);let m=c?.filter(e=>!r.includes(e.id)),h=async e=>{if(f)return;d(void 0),p(e.id);let n=await i(e);p(void 0),n?d(n):t(!1)};return(0,M.jsx)(R8,{open:e,onOpenChange:t,children:(0,M.jsxs)(z8,{className:`sm:max-w-lg`,children:[(0,M.jsxs)(B8,{children:[(0,M.jsx)(H8,{className:`font-heading`,children:`Add a source`}),(0,M.jsx)(U8,{children:`Attach an existing document from your Source Library or paste text and Markdown.`})]}),(0,M.jsxs)(`div`,{className:`flex gap-2 border-b pb-3`,role:`tablist`,"aria-label":`Source method`,children:[(0,M.jsxs)(N,{type:`button`,role:`tab`,"aria-selected":o===`library`,variant:o===`library`?`secondary`:`ghost`,size:`sm`,onClick:()=>s(`library`),children:[(0,M.jsx)(Kg,{"aria-hidden":`true`}),`From library`]}),(0,M.jsxs)(N,{type:`button`,role:`tab`,"aria-selected":o===`paste`,variant:o===`paste`?`secondary`:`ghost`,size:`sm`,onClick:()=>s(`paste`),children:[(0,M.jsx)(Yh,{"aria-hidden":`true`}),`Paste text`]})]}),o===`library`?(0,M.jsxs)(`div`,{className:`flex max-h-80 flex-col gap-2 overflow-y-auto`,"aria-live":`polite`,children:[u&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:u}),!m&&!u&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 py-4 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading library…`]}),m&&m.length===0&&(0,M.jsx)(`p`,{className:`text-muted-foreground py-4 text-sm`,children:c&&c.length>0?`Every source in your library is already attached here.`:`Your Source Library is empty. Upload a PDF/PPTX or switch to Paste text.`}),m&&m.length>0&&(0,M.jsx)(`ul`,{"aria-label":`Library sources`,className:`flex flex-col gap-1.5`,children:m.map(e=>(0,M.jsxs)(`li`,{className:`bg-muted/40 flex items-center justify-between gap-2 rounded-md border px-3 py-2 text-sm`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,M.jsx)(`span`,{className:`truncate font-medium`,title:e.filename,children:e.filename}),(0,M.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[a7[e.kind],` · `,o7(e)]})]}),(0,M.jsxs)(N,{type:`button`,size:`sm`,variant:`outline`,disabled:f!==void 0,onClick:()=>void h(e),children:[f===e.id?(0,M.jsx)(JF,{"aria-hidden":`true`}):(0,M.jsx)(y_,{"aria-hidden":`true`}),`Attach`]})]},e.id))})]}):(0,M.jsx)(s7,{submitLabel:`Attach text`,onSubmit:async e=>{let n=await a(e);return n||t(!1),n}}),o===`library`&&(0,M.jsx)(V8,{children:(0,M.jsx)(N,{type:`button`,variant:`outline`,onClick:()=>t(!1),children:`Close`})})]})})}var c7=`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,Zae=`bg-card gap-0`,Qae=`border-b px-5 py-4`,$ae=`font-heading text-[1.35rem] leading-tight font-medium tracking-[-0.015em]`,l7=`bg-sunken inline-flex max-w-full flex-wrap gap-0.5 self-start rounded-lg border p-0.5`,u7=e=>j(`h-7 rounded-md px-2.5 text-[0.8125rem] font-medium hover:bg-transparent dark:hover:bg-transparent`,e?`bg-card text-foreground hover:bg-card dark:hover:bg-card shadow-xs`:`text-muted-foreground hover:text-foreground`),d7=(0,v.forwardRef)(function({className:e,children:t,...n},r){return(0,M.jsxs)(`button`,{ref:r,type:`button`,className:j(`text-foreground decoration-primary/55 -mx-[0.2em] inline rounded-md px-[0.2em] py-px text-left font-semibold wrap-anywhere underline decoration-dashed decoration-1 underline-offset-[0.3em] transition-colors outline-none`,`hover:bg-accent hover:text-accent-foreground hover:decoration-accent-foreground/60 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`,`focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:no-underline disabled:opacity-70`,e),...n,children:[t,(0,M.jsx)(Dh,{className:`-mr-[0.1em] inline size-[0.7em] translate-y-[-0.05em] opacity-60`,"aria-hidden":!0})]})}),f7=[{value:`lessons`,phrase:`short lessons`,label:`Short lessons`,description:`Short lessons with check-ins, planned around what you already know.`},{value:`project`,phrase:`a project in my repo`,label:`A project in my own repository`,description:(0,M.jsxs)(M.Fragment,{children:[`Milestones in your own repository, in any language you have installed, each checked with `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check`}),`.`]})}],p7=[{value:`quick`,phrase:`a quick check`,label:`Quick check`,description:`About 3 questions.`},{value:`thorough`,phrase:`a thorough check`,label:`Thorough`,description:`Up to 8 questions, for a closer fit.`},{value:`skip`,phrase:`no placement`,label:`I'm new, skip placement`,description:`No questions: start from the basics.`}];function eoe(e,t){return e===`quick`?` of about 3 questions`:e===`thorough`?` of up to 8 questions`:t===`project`?` (just which language you'll use)`:` (from the basics)`}var toe=`w-[min(22rem,calc(100vw-2rem))] p-1`,noe=`items-start py-2 [&>span:first-child]:top-2.5`;function m7({name:e,value:t,phrase:n,disabled:r,choices:i,onChange:a}){let o=(0,v.useId)();return(0,M.jsxs)(K8,{children:[(0,M.jsx)(q8,{asChild:!0,disabled:r,children:(0,M.jsx)(d7,{"aria-label":`${e}: ${n}. Change ${e.toLowerCase()}`,children:n})}),(0,M.jsxs)(J8,{align:`start`,className:toe,children:[(0,M.jsx)(Q8,{className:j(c7,`px-2 pt-1.5 pb-1`),children:e}),(0,M.jsx)($8,{}),(0,M.jsx)(X8,{value:t,onValueChange:e=>a(e),children:i.map(e=>(0,M.jsx)(Z8,{value:e.value,className:noe,"aria-label":e.label,"aria-describedby":`${o}-${e.value}`,children:(0,M.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:e.label}),(0,M.jsx)(`span`,{id:`${o}-${e.value}`,className:`text-muted-foreground text-[0.8125rem] leading-snug`,children:e.description})]})},e.value))})]})]})}function roe({kind:e,disabled:t,onChange:n}){let r=f7.find(t=>t.value===e).phrase;return(0,M.jsx)(m7,{name:`Format`,value:e,phrase:r,disabled:t,choices:f7,onChange:n})}function ioe({depth:e,kind:t,disabled:n,onChange:r}){let i=p7.find(t=>t.value===e).phrase,a=p7.map(e=>e.value===`skip`&&t===`project`?{...e,description:`No quiz: Mivra only asks which language you'll use.`}:e);return(0,M.jsx)(m7,{name:`Placement`,value:e,phrase:i,disabled:n,choices:a,onChange:r})}var aoe=[{value:`upload`,label:`Upload`},{value:`library`,label:`Library`},{value:`paste`,label:`Paste`}];function ooe({items:e,disabled:t,onChooseFile:n,onDropFiles:r,onPickLibrary:i,onPasteText:a}){let o=(0,v.useId)(),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(`upload`),d=e.length===0?`general knowledge`:e.length===1?`1 source`:`${e.length} sources`,f=new Set(e.flatMap(e=>e.kind===`library`?[e.sourceId]:[]));return(0,M.jsxs)(GF,{open:s,onOpenChange:c,children:[(0,M.jsx)(KF,{asChild:!0,disabled:t,children:(0,M.jsx)(d7,{"aria-label":`Sources: ${d}. Add sources`,children:d})}),(0,M.jsxs)(qF,{align:`start`,"aria-label":`Add sources`,className:`flex w-[min(26rem,calc(100vw-2rem))] flex-col gap-3 p-3`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,M.jsx)(`span`,{className:c7,children:`Sources`}),(0,M.jsx)(`div`,{role:`tablist`,"aria-label":`Add a source by`,className:l7,children:aoe.map(e=>(0,M.jsx)(N,{type:`button`,role:`tab`,id:`${o}-tab-${e.value}`,"aria-selected":l===e.value,"aria-controls":`${o}-panel`,variant:`ghost`,className:u7(l===e.value),onClick:()=>u(e.value),children:e.label},e.value))})]}),(0,M.jsx)(`div`,{id:`${o}-panel`,role:`tabpanel`,"aria-labelledby":`${o}-tab-${l}`,children:l===`upload`?(0,M.jsx)(soe,{onChooseFile:n,onDropFiles:e=>{r(e),c(!1)}}):l===`library`?(0,M.jsx)(coe,{attached:f,onPick:i}):(0,M.jsx)(loe,{onAdd:e=>{a(e),c(!1)}})}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Optional: a textbook or slides to build the course around. Read before the first question.`})]})]})}function soe({onChooseFile:e,onDropFiles:t}){let[n,r]=(0,v.useState)(!1);return(0,M.jsxs)(`div`,{className:j(`border-border-strong bg-sunken/60 flex flex-col items-center gap-2 rounded-lg border border-dashed px-4 py-6 text-center transition-colors`,n&&`border-primary bg-accent text-accent-foreground`),onDragOver:e=>{e.preventDefault(),r(!0)},onDragLeave:()=>r(!1),onDrop:e=>{e.preventDefault(),r(!1);let n=[...e.dataTransfer.files];n.length>0&&t(n)},children:[(0,M.jsx)(fee,{className:`text-muted-foreground size-5`,"aria-hidden":!0}),(0,M.jsx)(`p`,{className:`text-sm font-medium`,children:`Drop a PDF or PowerPoint here`}),(0,M.jsxs)(`p`,{className:`text-muted-foreground text-xs`,children:[`.pdf or .pptx, up to `,Ej/1048576,` MB each`]}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,className:`mt-1`,onClick:e,children:`Choose file…`})]})}function coe({attached:e,onPick:t}){let[n,r]=(0,v.useState)(),[i,a]=(0,v.useState)();return(0,v.useEffect)(()=>{let e=!1;return YM().then(t=>{e||(t.ok?r(t.value):a(t.error))}),()=>{e=!0}},[]),i?(0,M.jsx)(`p`,{role:`alert`,className:`text-destructive py-3 text-sm`,children:i}):n?n.length===0?(0,M.jsx)(`p`,{className:`text-muted-foreground py-3 text-sm`,children:`Your Source Library is empty. Upload a PDF or PowerPoint, or paste text.`}):(0,M.jsx)(`ul`,{"aria-label":`Library sources`,className:`flex max-h-64 flex-col gap-1 overflow-y-auto`,children:n.map(n=>{let r=e.has(n.id);return(0,M.jsxs)(`li`,{className:`flex items-center justify-between gap-2 rounded-md border px-2.5 py-1.5 text-sm`,children:[(0,M.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,M.jsx)(`span`,{className:`truncate font-medium`,title:n.filename,children:n.filename}),(0,M.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[a7[n.kind],` · `,o7(n)]})]}),(0,M.jsxs)(N,{type:`button`,size:`xs`,variant:r?`ghost`:`outline`,disabled:r,"aria-label":r?`${n.filename} attached`:`Attach ${n.filename}`,onClick:()=>t(n),children:[r?(0,M.jsx)(Th,{"aria-hidden":!0}):(0,M.jsx)(y_,{"aria-hidden":!0}),r?`Attached`:`Attach`]})]},n.id)})}):(0,M.jsxs)(`p`,{role:`status`,className:`text-muted-foreground flex items-center gap-2 py-3 text-sm`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading library…`]})}function loe({onAdd:e}){let t=(0,v.useId)(),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(`text`),[c,l]=(0,v.useState)();return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,M.jsx)(`label`,{htmlFor:`${t}-title`,className:`sr-only`,children:`Title (optional)`}),(0,M.jsx)(e5,{id:`${t}-title`,value:n,onChange:e=>r(e.target.value),maxLength:120,placeholder:`Title (optional)`,className:`h-8`}),(0,M.jsx)(`label`,{htmlFor:`${t}-content`,className:`sr-only`,children:`Text to add`}),(0,M.jsx)(p2,{id:`${t}-content`,value:i,onChange:e=>{a(e.target.value),l(void 0)},rows:5,placeholder:`Paste notes, a chapter excerpt, or Markdown…`,"aria-invalid":!!c,"aria-describedby":c?`${t}-error`:void 0,className:`max-h-56`}),c&&(0,M.jsx)(`p`,{id:`${t}-error`,role:`alert`,className:`text-destructive text-xs`,children:c}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,M.jsx)(`div`,{role:`group`,"aria-label":`Format`,className:l7,children:[`text`,`markdown`].map(e=>(0,M.jsx)(N,{type:`button`,variant:`ghost`,"aria-pressed":o===e,className:u7(o===e),onClick:()=>s(e),children:e===`text`?`Text`:`Markdown`},e))}),(0,M.jsx)(N,{type:`button`,size:`sm`,disabled:!i.trim(),onClick:()=>{if(!i.trim())return l(`Paste some text or Markdown to add.`);if(i.length>5e5)return l(`This text is over the ${Dj.toLocaleString(`en`)} character limit.`);e({title:n.trim()||void 0,content:i,kind:o})},children:`Add text`})]})]})}function uoe({items:e,busy:t,onRemove:n}){if(e.length===0)return null;let r=e.filter(e=>e.error);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,M.jsx)(`ul`,{"aria-label":`Course sources`,"aria-live":`polite`,className:`flex flex-wrap gap-1.5`,children:e.map(e=>(0,M.jsxs)(`li`,{className:j(`bg-sunken inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full border pl-2.5 text-[0.8125rem]`,e.status===`failed`&&`border-destructive/50`,e.status!==`ready`&&e.status!==`reading`&&!t?`pr-1`:`pr-2.5`),children:[e.status===`reading`?(0,M.jsx)(JF,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}):e.status===`ready`?(0,M.jsx)(Th,{className:`text-success size-3.5 shrink-0`,"aria-hidden":!0}):e.status===`failed`?(0,M.jsx)(Lh,{className:`text-destructive size-3.5 shrink-0`,"aria-hidden":!0}):(0,M.jsx)(kg,{className:`text-muted-foreground size-3.5 shrink-0`,"aria-hidden":!0}),(0,M.jsx)(`span`,{className:`min-w-0 truncate`,title:e.name,children:e.name}),e.status===`reading`&&(0,M.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:`Reading…`}),e.status===`ready`&&(0,M.jsx)(`span`,{className:`sr-only`,children:`Ready`}),e.status===`failed`&&(0,M.jsx)(`span`,{className:`sr-only`,children:`Couldn't read`}),e.status!==`ready`&&e.status!==`reading`&&!t&&(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,className:`hover:bg-accent size-5 shrink-0 rounded-full`,"aria-label":`Remove ${e.name}`,onClick:()=>n(e.key),children:(0,M.jsx)(ev,{className:`size-3`,"aria-hidden":`true`})})]},e.key))}),r.map(e=>(0,M.jsxs)(`p`,{className:`text-destructive text-xs wrap-anywhere`,children:[(0,M.jsxs)(`span`,{className:`font-medium`,children:[e.name,`:`]}),` `,(0,M.jsx)(`span`,{children:e.error})]},e.key))]})}function doe({state:e,disabled:t}){let{view:n,error:r,refresh:i,choose:a,togglePin:o}=e,[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(``);if(!n)return(0,M.jsx)(d7,{disabled:!0,"aria-label":`Model: loading`,children:r?`the chosen model`:`…`});let d=n.models.find(e=>e.id===n.current.model),f=d?.reasoning?.efforts??[],p=d?.reasoning?.defaultEffort,m=n.current.effort??p,h=f.length>0?` at ${m?M5[m].toLowerCase():`default`} effort`:``,g=`${F5(n.current.model,n.models)}${h}`,_=R5(n.current.model,n.models,n.providers),y=n.pinned.includes(n.current.model);return(0,M.jsxs)(GF,{open:s,onOpenChange:e=>{c(e),e?i():u(``)},children:[(0,M.jsx)(KF,{asChild:!0,disabled:t,children:(0,M.jsx)(d7,{"aria-label":f.length>0?`Model: ${_},${h}. Change model and effort`:`Model: ${_}. Change model`,children:g})}),(0,M.jsxs)(qF,{align:`start`,"aria-label":`Model and effort`,className:`w-[min(28rem,calc(100vw-2rem))] p-0`,children:[(0,M.jsx)(B5,{view:n,query:l,onQueryChange:u,onPick:e=>{let t=V5(n.current,e);(t.model!==n.current.model||t.effort!==n.current.effort)&&a(t),u(``),e.reasoning?.efforts.length||c(!1)}}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 border-t px-3 py-2.5`,children:[f.length>0&&(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:`Effort`}),(0,M.jsxs)(`div`,{role:`group`,"aria-label":`Reasoning effort`,className:`bg-sunken inline-flex max-w-full flex-wrap gap-0.5 self-start rounded-lg border p-0.5`,children:[(0,M.jsxs)(N,{type:`button`,variant:`ghost`,"aria-pressed":n.current.effort===null,className:u7(n.current.effort===null),onClick:()=>void a({model:n.current.model,effort:null}),children:[`Default`,p?` (${M5[p]})`:``]}),f.map(e=>(0,M.jsx)(N,{type:`button`,variant:`ghost`,"aria-pressed":n.current.effort===e,className:u7(n.current.effort===e),onClick:()=>void a({model:n.current.model,effort:e}),children:M5[e]},e))]})]}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,M.jsx)(`span`,{className:`text-muted-foreground min-w-0 truncate text-xs`,children:_}),(0,M.jsxs)(N,{type:`button`,variant:`ghost`,size:`xs`,className:`text-muted-foreground shrink-0`,"aria-pressed":y,onClick:()=>void o(n.current.model),children:[(0,M.jsx)(L_,{className:j(y&&`fill-current`),"aria-hidden":!0}),y?`Pinned`:`Pin`]})]}),(r??n.unavailable)&&(0,M.jsx)(`p`,{className:`text-destructive text-xs`,children:r??n.unavailable})]})]})]})}var h7={strength:`Strength`,focus:`Focus area`,practicing:`Practicing`,unsure:`Unsure`,not_started:`Not started`},g7={strength:zh,focus:Lh,practicing:Uh,unsure:Gh,not_started:Vh},foe={strength:`border-success/40 bg-success/10 text-success`,focus:`border-destructive/40 bg-destructive/10 text-destructive`,practicing:`border-border-strong text-muted-foreground`,unsure:`border-border-strong text-muted-foreground border-dashed`,not_started:`border-border text-muted-foreground border-dashed`},poe={strength:`fill-success stroke-card`,focus:`fill-destructive stroke-card`,practicing:`fill-muted-foreground stroke-card`,unsure:`fill-card stroke-muted-foreground`,not_started:`fill-card stroke-muted-foreground`};function _7({status:e,className:t}){let n=g7[e];return(0,M.jsxs)(t8,{variant:`outline`,className:j(foe[e],t),"data-mastery":e,children:[(0,M.jsx)(n,{"aria-hidden":`true`}),h7[e]]})}var v7=(e,t,n=`${t}s`)=>`${e.toLocaleString(`en`)} ${e===1?t:n}`;function y7(e){let t=e.correct+e.incorrect,n=[];return t>0&&n.push(`${e.correct.toLocaleString(`en`)} of ${v7(t,`answer`)} right`),e.modelJudged>0&&n.push(`${e.modelApproved.toLocaleString(`en`)} of ${v7(e.modelJudged,`code review`)} approved`),e.unsure>0&&n.push(`${e.unsure.toLocaleString(`en`)} not sure`),n.join(` · `)||`Not answered yet`}function b7(e){let{graded:t,modelJudged:n,unsure:r,recent:i,recentDays:a}=e.evidence,o=[v7(t,`graded answer`)];return n>0&&o.push(v7(n,`code review`)),r>0&&o.push(`${r.toLocaleString(`en`)} not sure`),o.push(`${i.toLocaleString(`en`)} in the last ${a} days`),o.join(` · `)}var moe={strengths:{key:`strengths`,title:`Strengths`,hint:`Mostly right, more than once, recently.`},focus:{key:`focus`,title:`Focus areas`,hint:`The latest answer was wrong, or most were.`},practicing:{key:`practicing`,title:`Practicing`,hint:`Answered, but not enough yet to call it.`},unsure:{key:`unsure`,title:`Unsure`,hint:`You said “Not sure” last time.`},notStarted:{key:`notStarted`,title:`Not started`,hint:`In the syllabus, not answered on yet.`}},x7=8;function hoe({record:e,order:t,label:n}){let r=t.map(e=>moe[e]).filter(t=>e[t.key].length>0);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-4`,role:`group`,"aria-label":n,"data-testid":`mastery-groups`,children:[r.map(t=>(0,M.jsx)(goe,{group:t,concepts:e[t.key]},t.key)),e.truncated&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:`Your oldest answers aren't counted here: the history is longer than Mivra reads at once.`})]})}function goe({group:e,concepts:t}){let[n,r]=(0,v.useState)(!1),i=n?t:t.slice(0,x7),a=`mastery-${e.key}`;return(0,M.jsxs)(`section`,{"aria-labelledby":a,className:`flex flex-col gap-1.5`,"data-testid":`mastery-${e.key}`,children:[(0,M.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,M.jsxs)(`h3`,{id:a,className:c7,children:[e.title,` `,(0,M.jsxs)(`span`,{className:`tabular-nums`,children:[`(`,t.length.toLocaleString(`en`),`)`]})]}),(0,M.jsx)(`span`,{className:`text-muted-foreground truncate text-[0.75rem]`,children:e.hint})]}),(0,M.jsx)(`ul`,{className:`flex flex-col`,children:i.map(e=>(0,M.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-2 gap-y-0.5 border-t py-1.5 text-[0.9rem] leading-snug first:border-t-0`,children:[(0,M.jsx)(_7,{status:e.status,className:`shrink-0`}),(0,M.jsx)(`span`,{className:`min-w-0 wrap-anywhere`,children:e.concept}),(0,M.jsxs)(`span`,{className:`text-muted-foreground ml-auto text-[0.8125rem]`,children:[e.status===`not_started`&&e.topics?.length?`In ${e.topics.join(`, `)}`:y7(e),e.lastSeen&&(0,M.jsxs)(`span`,{className:`font-mono text-[0.72rem]`,children:[` · `,e.lastSeen]})]})]},e.concept))}),t.length>x7&&(0,M.jsx)(N,{type:`button`,variant:`link`,size:`sm`,className:`text-muted-foreground h-auto self-start p-0`,onClick:()=>r(e=>!e),children:n?`Show fewer`:`Show all ${t.length.toLocaleString(`en`)}`})]})}var S7=e=>e.strengths.length+e.focus.length+e.practicing.length+e.unsure.length+e.notStarted.length>0,_oe=e=>/\.(pdf|pptx)$/i.test(e.name),voe=200;function yoe({onStarted:e,onFreeChat:t,getDraft:n,onDraftChange:r}){let i=(0,v.useId)(),a=(0,v.useRef)(null),[o]=(0,v.useState)(()=>n?.()),s=(0,v.useRef)(o?.files.reduce((e,t)=>Math.max(e,t.key+1),0)??0),c=(0,v.useRef)(!0);(0,v.useEffect)(()=>(c.current=!0,()=>{c.current=!1}),[]);let[l,u]=(0,v.useState)(o?.goal??``),[d,f]=(0,v.useState)(o?.kind??`lessons`),[p,m]=(0,v.useState)(o?.depth??`quick`),[h,g]=(0,v.useState)(()=>o?.files.map(e=>({...e,status:`waiting`,error:void 0,documentId:void 0}))??[]),[_,y]=(0,v.useState)(),[b,x]=(0,v.useState)(),S=(0,v.useRef)(r);S.current=r,(0,v.useEffect)(()=>{if(b){S.current?.(void 0);return}let e=!l&&d===`lessons`&&p===`quick`&&h.length===0;S.current?.(e?void 0:{goal:l,kind:d,depth:p,files:h})},[l,d,p,h,b]);let[C,w]=(0,v.useState)(!1),[T,E]=(0,v.useState)(),D=z5(),O=h.filter(e=>e.status===`failed`),k=C||b!==void 0,ee=b!==void 0&&O.length>0&&!C,te=d!==`lessons`||p!==`quick`||h.length>0,ne=l.trim().length>0,re=(e,t)=>g(n=>n.map(n=>n.key===e?{...n,...t}:n)),ie=e=>{y(void 0);let t=[];for(let n of e)_oe(n)?n.size>26214400?y(`${n.name} is over the ${Ej/1048576} MB limit.`):t.push({kind:`file`,key:s.current++,name:n.name,file:n,status:`waiting`}):y(`${n.name} isn't a PDF or PowerPoint (.pptx) file.`);g(e=>[...e,...t])},ae=e=>{y(void 0),g(t=>t.some(t=>t.kind===`library`&&t.sourceId===e.id)?t:[...t,{kind:`library`,key:s.current++,name:e.filename,sourceId:e.id,status:`waiting`}])},A=e=>{y(void 0);let t=e.title?.trim()||(e.kind===`markdown`?`Pasted note.md`:`Pasted text.txt`);g(n=>[...n,{kind:`text`,key:s.current++,name:t,title:e.title,content:e.content,textKind:e.kind,status:`waiting`}])},oe=(t,n)=>c.current&&e({...t,documentIds:n.flatMap(e=>e.status===`ready`&&e.documentId?[e.documentId]:[])}),se=async(e,t)=>{let n=[];for(let r of t){if(r.status===`ready`){n.push(r);continue}re(r.key,{status:`reading`,error:void 0});let t=r.kind===`file`?await qM(e,r.file):r.kind===`library`?await $M(e,r.sourceId):await QM(e,{title:r.title,content:r.content,kind:r.textKind});if(!c.current)return n;let i=t.ok?{...r,status:`ready`,documentId:t.value.id,error:void 0}:{...r,status:`failed`,error:t.error};re(r.key,i),n.push(i)}return n},ce=async e=>{e.preventDefault();let t=l.trim();if(!t||C)return;w(!0),E(void 0);let n=b;if(!n){let e=await hN(t,d,p);if(!c.current)return;if(!e.ok)return w(!1),E(e.error);n={session:e.value.session,goal:t},x(n)}let r=await se(n.session.id,h);c.current&&(w(!1),r.every(e=>e.status===`ready`)&&oe(n,r))},le=()=>{b&&oe(b,h)},ue=e=>g(t=>t.filter(t=>t.key!==e)),de=()=>{f(`lessons`),m(`quick`),g([]),y(void 0)},fe=D.view,pe=fe?.current.model.startsWith(`chatgpt:`)??!1;return(0,M.jsxs)(`form`,{onSubmit:ce,className:`m-auto flex w-full max-w-[720px] flex-col gap-8 px-4 py-10 sm:px-6 sm:py-16`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsx)(`h2`,{className:`font-heading text-muted-foreground text-lg leading-snug font-normal tracking-[-0.01em]`,children:(0,M.jsx)(`label`,{htmlFor:i,children:`What do you want to learn?`})}),(0,M.jsx)(`input`,{id:i,"aria-describedby":`${i}-description${T?` ${i}-error`:``}`,"aria-invalid":!!T,value:l,onChange:e=>u(e.target.value),maxLength:300,placeholder:`Calculus for machine learning`,disabled:k,autoFocus:!0,className:j(`font-heading text-foreground placeholder:text-muted-foreground/55 w-full min-w-0 border-0 border-b-2 border-border-strong bg-transparent pb-2 text-[1.75rem] leading-tight tracking-[-0.02em] transition-colors outline-none sm:text-[2.25rem]`,`focus-visible:border-primary aria-invalid:border-destructive disabled:opacity-70`)}),(0,M.jsxs)(`div`,{className:`flex items-baseline justify-between gap-4 text-[0.875rem]`,children:[(0,M.jsx)(`p`,{id:`${i}-description`,className:`text-muted-foreground`,children:`One line is enough. Mivra works out the rest with you.`}),l.length>voe&&(0,M.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs tabular-nums`,"aria-live":`polite`,"aria-label":`${300-l.length} characters left`,children:300-l.length})]}),T&&(0,M.jsx)(`p`,{id:`${i}-error`,role:`alert`,className:`text-destructive text-sm`,children:T})]}),(0,M.jsxs)(`section`,{"aria-labelledby":`${i}-plan`,className:j(`bg-card border-border-strong shadow-paper flex flex-col gap-4 rounded-xl border p-5 transition-opacity duration-300 sm:p-6`,!ne&&`opacity-60 focus-within:opacity-100 hover:opacity-100`),children:[(0,M.jsx)(`h3`,{id:`${i}-plan`,className:c7,children:`Your course`}),(0,M.jsxs)(`p`,{className:`font-heading text-foreground/90 text-[1.2rem] leading-[1.75] sm:text-[1.35rem]`,children:[`Mivra will teach this as `,(0,M.jsx)(roe,{kind:d,disabled:k,onChange:f}),`, starting with`,` `,(0,M.jsx)(ioe,{depth:p,kind:d,disabled:k,onChange:m}),eoe(p,d),`, built from`,` `,(0,M.jsx)(ooe,{items:h,disabled:C||ee,onChooseFile:()=>a.current?.click(),onDropFiles:ie,onPickLibrary:ae,onPasteText:A}),`, taught by `,(0,M.jsx)(doe,{state:D,disabled:k}),`.`]}),(0,M.jsx)(`input`,{ref:a,type:`file`,accept:`.pdf,.pptx`,multiple:!0,className:`hidden`,"data-testid":`course-document-input`,onChange:e=>{let t=[...e.target.files??[]];e.target.value=``,ie(t)}}),(0,M.jsx)(uoe,{items:h,busy:C,onRemove:ue}),_&&(0,M.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:_}),D.error?(0,M.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:D.error}):fe?.unavailable&&(0,M.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:fe.unavailable}),ee&&(0,M.jsxs)(`div`,{role:`alert`,className:`bg-sunken/60 flex flex-col gap-2 rounded-lg border p-3`,children:[(0,M.jsxs)(`p`,{className:`text-sm`,children:[O.length===1?`A file couldn't be read.`:`${O.length} files couldn't be read.`,` Try again, remove it, or start without it.`]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsx)(N,{type:`submit`,size:`sm`,children:`Try again`}),(0,M.jsxs)(N,{type:`button`,size:`sm`,variant:`outline`,onClick:le,children:[`Start without `,O.length===1?`it`:`them`]})]})]}),(0,M.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center justify-between gap-3 border-t border-dashed pt-4`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1`,children:[pe&&(0,M.jsx)(G8,{}),te&&!k&&(0,M.jsxs)(N,{type:`button`,variant:`ghost`,size:`xs`,className:`text-muted-foreground`,onClick:de,children:[(0,M.jsx)(C_,{"aria-hidden":!0}),`Reset to defaults`]})]}),(0,M.jsxs)(N,{type:`submit`,className:`h-10 px-5 max-sm:w-full sm:ml-auto`,disabled:!ne||C||O.length>0,children:[C&&(0,M.jsx)(JF,{"aria-hidden":`true`}),C?b?`Reading files…`:`Starting…`:`Start course`,!C&&(0,M.jsx)(sh,{"aria-hidden":!0})]})]})]}),(0,M.jsxs)(N,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground self-center`,onClick:t,children:[(0,M.jsx)(see,{"aria-hidden":!0}),`Or just chat`]})]})}var boe={memory:`From memory`,test:`From the test`,guess:`Guessed`};function C7({course:e,children:t,onUndo:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(),l=e.syllabus;return(0,M.jsxs)(P8,{open:r,onOpenChange:i,className:`bg-sunken/60 shrink-0 border-b`,"aria-label":`Course`,role:`region`,children:[(0,M.jsxs)(`div`,{className:`mx-auto flex max-w-3xl items-center gap-x-2 gap-y-1 px-4 py-2 text-sm max-sm:flex-wrap`,children:[(0,M.jsx)(Lg,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":!0}),(0,M.jsx)(t8,{variant:`outline`,className:`border-border-strong bg-card shrink-0 font-mono text-[0.6875rem] font-medium tracking-[0.06em] uppercase`,children:e.status===`interviewing`?`Placement interview`:e.status===`complete`?`Complete`:`In progress`}),e.kind===`project`&&(0,M.jsx)(t8,{variant:`outline`,className:`border-border-strong bg-card shrink-0 font-mono text-[0.6875rem] font-medium tracking-[0.06em] uppercase`,children:`Project`}),l&&(0,M.jsx)(F8,{asChild:!0,children:(0,M.jsxs)(N,{variant:`ghost`,size:`sm`,className:`ml-auto shrink-0`,children:[`Syllabus · `,l.topics.length,` `,e.kind===`project`?`milestones`:`topics`,(0,M.jsx)(Dh,{className:j(`transition-transform`,r&&`rotate-180`),"aria-hidden":!0})]})}),t&&(0,M.jsx)(`div`,{className:j(`flex shrink-0 gap-2`,!l&&`ml-auto`),children:t})]}),l?.canUndo&&(0,M.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-wrap items-center gap-2 px-4 pb-2 text-sm`,role:`status`,children:[(0,M.jsxs)(`span`,{children:[`Mivra changed the plan: `,l.reason]}),n&&(0,M.jsx)(N,{variant:`outline`,size:`xs`,disabled:a,onClick:async()=>{o(!0),c(await n()),o(!1)},children:`Undo`}),s&&(0,M.jsx)(`span`,{className:`text-destructive`,children:s})]}),l&&(0,M.jsx)(I8,{children:(0,M.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 pt-1 pb-4`,children:(0,M.jsxs)(`div`,{className:`bg-card border-border-strong shadow-paper focus-visible:ring-ring/50 flex max-h-[50svh] flex-col gap-4 overflow-y-auto overscroll-contain rounded-xl border px-4 py-3 outline-none focus-visible:ring-[3px]`,role:`region`,"aria-label":`Syllabus`,tabIndex:0,children:[(0,M.jsxs)(`p`,{className:`text-muted-foreground wrap-anywhere`,children:[(0,M.jsx)(`span`,{className:`text-foreground font-medium`,children:`Your goal:`}),` `,e.goal]}),l.reason&&l.version>1&&(0,M.jsxs)(`p`,{className:`text-muted-foreground`,role:`status`,children:[`Version `,l.version,l.source===`adaptive`?` (changed by Mivra)`:``,`: `,l.reason]}),(0,M.jsx)(`ol`,{className:`flex flex-col`,"aria-label":`Syllabus topics`,children:l.topics.map((e,t)=>(0,M.jsxs)(`li`,{className:j(`flex gap-3 border-t py-3 first:border-t-0`,l.changedTopicIds.includes(e.id)&&`bg-sunken -mx-4 px-4`),children:[(0,M.jsx)(`span`,{"aria-hidden":`true`,className:`bg-sunken text-muted-foreground ring-border-strong mt-0.5 grid size-6 shrink-0 place-items-center rounded-full font-mono text-[0.7rem] font-medium ring-1 ring-inset`,children:t+1}),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5 wrap-anywhere`,children:[(0,M.jsxs)(`p`,{className:`font-heading text-[1.0625rem] leading-snug font-medium`,children:[e.title,l.changedTopicIds.includes(e.id)&&(0,M.jsxs)(t8,{variant:`secondary`,className:`ml-2 align-middle`,children:[`Changed in v`,l.version]}),e.requestedByLearner&&(0,M.jsx)(t8,{variant:`secondary`,className:`ml-2 align-middle`,children:`You asked for this`})]}),(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:e.summary}),(0,M.jsxs)(`p`,{className:`text-muted-foreground text-[0.8125rem] italic`,children:[`Why: `,e.reason]})]})]},e.id))}),r&&(0,M.jsx)(xoe,{courseId:e.id}),l.known.length>0&&(0,M.jsxs)(`div`,{className:`border-t pt-3`,children:[(0,M.jsx)(`p`,{className:j(`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,`mb-2`),children:`What Mivra thinks you know`}),(0,M.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`What Mivra thinks you know`,children:l.known.map((e,t)=>(0,M.jsxs)(`li`,{className:`flex flex-wrap items-baseline gap-x-2 border-t py-1.5 first:border-t-0 wrap-anywhere`,children:[(0,M.jsx)(`span`,{children:e.concept}),(0,M.jsx)(t8,{variant:`outline`,className:`text-xs`,children:boe[e.source]}),(0,M.jsx)(`span`,{className:`text-muted-foreground`,children:e.note})]},t))})]})]})})})]})}function xoe({courseId:e}){let[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)();return(0,v.useEffect)(()=>{let t=!1;return n(void 0),i(void 0),VM(e).then(e=>{t||(e.ok?n(e.value):i(e.error))}),()=>{t=!0}},[e]),r?(0,M.jsxs)(`p`,{className:`text-destructive border-t pt-3 text-sm`,children:[`Couldn't load your progress: `,r]}):!t||!S7(t)?null:(0,M.jsxs)(`div`,{className:`flex flex-col gap-3 border-t pt-3`,"data-testid":`course-mastery`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,M.jsx)(`p`,{className:c7,children:`Your progress`}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:b7(t)})]}),(0,M.jsx)(hoe,{record:t,order:[`focus`,`strengths`,`practicing`,`unsure`,`notStarted`],label:`Your progress by concept`})]})}var Soe={sigma:N_,calculator:_h,code:$h,terminal:G_,cpu:ag,database:sg,network:i_,shield:j_,"flask-conical":jg,atom:lh,dna:lg,leaf:iee,telescope:U_,globe:Fg,landmark:nee,"book-open":dh,"pen-tool":m_,languages:ree,music:_g,palette:o_,camera:yh,brain:ph,users:pee,"chart-line":Ch,briefcase:hh,scale:T_,stethoscope:z_,"heart-pulse":zg,wrench:mee,dumbbell:hg};function w7({icon:e,...t}){let n=Mk.safeParse(e),r=n.success?Soe[n.data]:Lg;return(0,M.jsx)(r,{"data-icon":n.success?n.data:`graduation-cap`,...t})}function T7({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`skeleton`,className:j(`animate-pulse rounded-md bg-accent`,e),...t})}function Coe(e){let[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)(),a=(0,v.useRef)(void 0),o=(0,v.useCallback)(e=>{a.current=e.revision,n(e.lesson),i(void 0)},[]);return(0,v.useEffect)(()=>{let t=new AbortController;return a.current=void 0,n(void 0),(async()=>{let n=0;for(;!t.signal.aborted;){let r=await bN(e,a.current,t.signal);if(t.signal.aborted)return;if(r.ok){if(n=0,o(r.value),r.value.lesson.status===`finished`)return}else i(r.error),await new Promise(e=>setTimeout(e,Math.min(1e4,1e3*2**n++)))}})(),()=>t.abort()},[e,o]),{lesson:t,error:r,apply:o}}function woe(e){return e===`finished`?` (finished)`:e===`generating`?` (being written)`:e===`failed`?` (stopped)`:e?` (started)`:` (not started)`}function E7({lessons:e,selectedId:t,onSelect:n}){return(0,M.jsx)(`nav`,{"aria-label":`Lessons`,children:(0,M.jsx)(`ol`,{className:`flex flex-col gap-1 text-sm`,children:e.topics.map((e,r)=>{let i=e.lesson?.status;return(0,M.jsx)(`li`,{children:(0,M.jsxs)(`button`,{type:`button`,disabled:!e.lesson,"aria-current":e.lesson?.id===t?`page`:void 0,onClick:()=>e.lesson&&n(e.lesson.id),className:j(`flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left`,e.lesson?`hover:bg-accent`:`text-muted-foreground cursor-default`,e.lesson?.id===t&&`bg-accent font-medium`),children:[(0,M.jsx)(`span`,{className:`mt-0.5 shrink-0`,"aria-hidden":!0,children:i===`finished`?(0,M.jsx)(Th,{className:`text-success size-4`}):i===`generating`?(0,M.jsx)(JF,{"aria-hidden":`true`}):(0,M.jsx)(Vh,{className:`size-4`})}),(0,M.jsxs)(`span`,{className:`min-w-0`,children:[r+1,`. `,e.title,(0,M.jsx)(`span`,{className:`sr-only`,children:woe(i)})]})]})},e.topicId)})})})}function Toe({lessonId:e,nextTopic:t,onFinished:n,onStartNext:r,onExplain:i,onChange:a,onPracticeMilestone:o,onLoaded:s,onOpenSection:c,focusSectionId:l,courseComplete:u=!1}){let{lesson:d,error:f,apply:p}=Coe(e),[m,h]=(0,v.useState)({}),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(),x=(0,v.useRef)(s);x.current=s,(0,v.useEffect)(()=>{d&&x.current?.(d)},[d]);let S=!!d;if((0,v.useEffect)(()=>{if(!S||!l)return;let e=document.getElementById(`section-${l}`);e?.scrollIntoView({block:`start`}),e?.focus({preventScroll:!0})},[S,l]),!d)return f?(0,M.jsx)(`p`,{className:`text-destructive m-auto p-6`,children:f}):(0,M.jsxs)(`p`,{className:`text-muted-foreground m-auto flex items-center gap-2 p-6`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading the lesson…`]});let C=d.status===`generating`,w=d.status===`ready`,T=new Set(d.changedSectionIds),E=d.outline?d.outline.sections.slice(d.sections.length):[],D=async e=>{_(!0),b(void 0);let t=await e();return _(!1),t.ok?p(t.value):b(t.error),t.ok};return(0,M.jsx)(i8.Provider,{value:d.courseId,children:(0,M.jsx)(a8.Provider,{value:o,children:(0,M.jsxs)(`article`,{className:`mx-auto flex w-full max-w-3xl flex-col gap-6 p-4 pb-16`,"aria-busy":C,"aria-labelledby":`lesson-title`,children:[(0,M.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Lesson `,d.position+1]}),(0,M.jsx)(`h2`,{id:`lesson-title`,className:`font-heading text-2xl font-semibold`,children:d.outline?.title??d.topicTitle}),d.status===`finished`&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Finished. This lesson won't change.`}),d.changeReason&&d.version&&d.version>1&&(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,role:`status`,children:[`Version `,d.version,`: `,d.changeReason]})]}),!d.outline&&C&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Planning the lesson…`]}),d.sections.map(t=>(0,M.jsxs)(`section`,{id:`section-${t.id}`,tabIndex:-1,"aria-label":t.title,"data-changed":T.has(t.id)||void 0,className:j(`group flex min-w-0 flex-col gap-2`,T.has(t.id)&&`bg-muted/60 -mx-3 rounded-lg px-3 py-2`),children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`h3`,{className:`font-heading text-lg font-medium`,children:t.title}),T.has(t.id)&&(0,M.jsxs)(t8,{variant:`secondary`,children:[`Changed in v`,d.version]}),(i||a&&w)&&(0,M.jsxs)(`div`,{className:`ml-auto flex gap-1`,children:[i&&(0,M.jsxs)(N,{variant:`ghost`,size:`xs`,onClick:()=>i(t),"aria-label":`Explain: ${t.title}`,children:[(0,M.jsx)(Gh,{"aria-hidden":!0}),` Explain`]}),a&&w&&(0,M.jsxs)(N,{variant:`ghost`,size:`xs`,onClick:()=>a(t),"aria-label":`Change: ${t.title}`,children:[(0,M.jsx)(g_,{"aria-hidden":!0}),` Change`]})]})]}),t.kind===`prose`?(0,M.jsxs)(M.Fragment,{children:[t.revisits.length>0&&(0,M.jsx)(`ul`,{className:`flex flex-wrap gap-2 text-sm`,"aria-label":`Revisits`,children:t.revisits.map(e=>(0,M.jsx)(`li`,{children:(0,M.jsxs)(N,{variant:`outline`,size:`xs`,onClick:()=>c?.(e.lessonId,e.sectionId),disabled:!c,children:[(0,M.jsx)(rg,{"aria-hidden":!0}),` `,e.lessonTitle,`: `,e.title]})},e.sectionId))}),(0,M.jsx)(V0,{text:t.markdown,citations:!0})]}):(0,M.jsx)(A8,{data:t.artifact?.id?m[t.artifact.id]??t.artifact:t.artifact,replyInProgress:!1,onUpdate:e=>h(t=>N8(t,{[e.id]:e})),onRefresh:async()=>{let t=await bN(e);t.ok&&p(t.value)}})]},t.id)),C&&E.map((e,t)=>(0,M.jsxs)(`section`,{"aria-label":`${e.title} (being written)`,className:`flex flex-col gap-2`,children:[(0,M.jsx)(`h3`,{className:`font-heading text-muted-foreground text-lg font-medium`,children:e.title}),t===0?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Writing…`]}),(0,M.jsx)(T7,{className:`h-16 w-full`})]}):(0,M.jsx)(T7,{className:`h-4 w-1/3`})]},`pending-${t}`)),d.status===`failed`&&(0,M.jsxs)(u2,{variant:`destructive`,children:[(0,M.jsx)(d2,{children:d.error}),(0,M.jsxs)(f2,{children:[(0,M.jsxs)(`p`,{children:[`The sections above are kept. Mivra can carry on from here`,d.errorAction===`lesson-model`?` once the lesson model can be used`:``,`.`]}),(0,M.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[d.errorAction===`lesson-model`&&(0,M.jsx)(N,{size:`sm`,variant:`outline`,onClick:()=>window.dispatchEvent(new Event(`mivra:open-settings`)),children:`Lesson model settings`}),(0,M.jsx)(N,{size:`sm`,disabled:g,onClick:()=>void D(()=>SN(e)),children:`Continue writing`})]})]})]}),(d.status===`ready`||d.status===`finished`)&&(0,M.jsxs)(`footer`,{className:`flex flex-col gap-3 border-t pt-4`,"aria-live":`polite`,children:[d.status===`ready`?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[d.checks.answered,` of `,d.checks.total,` checks answered.`,!d.canFinish&&(d.sections.some(e=>e.kind===`artifact`&&e.artifact.kind===`project_milestone`)?` Answer every check and run mivra check on the milestone to finish; it doesn't have to pass.`:` Answer every check to finish; your score doesn't matter.`)]}),(0,M.jsx)(N,{className:`self-start`,disabled:!d.canFinish||g,onClick:async()=>{await D(()=>xN(e))&&n()},children:`Finish lesson`})]}):t?(0,M.jsxs)(N,{className:`self-start`,disabled:g,onClick:async()=>{_(!0),await r(t.id),_(!1)},children:[`Next lesson: `,t.title]}):u?(0,M.jsx)(`p`,{className:`font-medium`,children:`You've reached the end of the syllabus.`}):null,y&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,children:y})]}),f&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,children:f})]})})})}function D7({delayDuration:e=0,...t}){return(0,M.jsx)(bm,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function O7({...e}){return(0,M.jsx)(wm,{"data-slot":`tooltip`,...e})}function k7({...e}){return(0,M.jsx)(Em,{"data-slot":`tooltip-trigger`,...e})}function A7({className:e,sideOffset:t=0,children:n,...r}){return(0,M.jsx)(Am,{children:(0,M.jsxs)(Mm,{"data-slot":`tooltip-content`,sideOffset:t,className:j(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...r,children:[n,(0,M.jsx)(Im,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var Eoe=`Only text is read: images and diagrams aren't, and formulas may come through garbled.`,j7=new Set;function M7(e){for(let t of j7)t(e)}function Doe(e){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(),[a,o]=(0,v.useState)(),s=(0,v.useRef)(e);s.current=e;let c=(0,v.useRef)(!0);(0,v.useEffect)(()=>(c.current=!0,()=>{c.current=!1}),[]),(0,v.useEffect)(()=>{n([]),i(void 0),o(void 0);let t=!1,r=()=>void KM(e).then(e=>{t||(e.ok?n(e.value):o(e.error))});r();let a=t=>{t&&t!==e||r()};return j7.add(a),()=>{t=!0,j7.delete(a)}},[e]);let l=(0,v.useCallback)(async()=>{let t=await KM(e);c.current&&s.current===e&&(t.ok?n(t.value):o(t.error))},[e]);return{documents:t,uploading:r,error:a,upload:(0,v.useCallback)(async t=>{if(o(void 0),t.size>26214400)return o(`${t.name} is over the ${Ej/1048576} MB limit.`);i(t.name);let r=await qM(e,t);c.current?s.current===e&&(i(void 0),r.ok?n(e=>[...e.filter(e=>e.id!==r.value.id),r.value]):o(r.error)):r.ok&&M7(e)},[e]),attachFromLibrary:(0,v.useCallback)(async t=>{o(void 0);let r=await $M(e,t);if(c.current&&s.current===e){if(r.ok)n(e=>[...e.filter(e=>e.id!==r.value.id),r.value]);else return r.error}},[e]),pasteText:(0,v.useCallback)(async t=>{o(void 0);let r=await QM(e,t);if(c.current&&s.current===e){if(r.ok)n(e=>[...e.filter(e=>e.id!==r.value.id),r.value]);else return r.error}},[e]),remove:(0,v.useCallback)(async t=>{o(void 0);let r=await eN(e,t);s.current===e&&(r.ok?n(e=>e.filter(e=>e.id!==t)):o(r.error))},[e]),refresh:l}}function Ooe({documents:{uploading:e,upload:t}}){let n=(0,v.useRef)(null);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`input`,{ref:n,type:`file`,accept:`.pdf,.pptx`,className:`hidden`,"data-testid":`document-input`,onChange:e=>{let n=e.target.files?.[0];e.target.value=``,n&&t(n)}}),(0,M.jsx)(D7,{delayDuration:400,children:(0,M.jsxs)(O7,{children:[(0,M.jsx)(k7,{asChild:!0,children:(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Attach a PDF or PowerPoint file`,disabled:e!==void 0,onClick:()=>n.current?.click(),children:e===void 0?(0,M.jsx)(u_,{"aria-hidden":`true`}):(0,M.jsx)(JF,{"aria-hidden":`true`})})}),(0,M.jsx)(A7,{children:`Attach a PDF or PowerPoint file`})]})})]})}function koe({documents:e}){let[t,n]=(0,v.useState)(!1);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(D7,{delayDuration:400,children:(0,M.jsxs)(O7,{children:[(0,M.jsx)(k7,{asChild:!0,children:(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Attach from library or paste text`,disabled:e.uploading!==void 0,onClick:()=>n(!0),children:(0,M.jsx)(Kg,{"aria-hidden":`true`})})}),(0,M.jsx)(A7,{children:`Attach from library or paste text`})]})}),(0,M.jsx)(Xae,{open:t,onOpenChange:n,excludeIds:e.documents.map(e=>e.id),onPickLibrary:t=>e.attachFromLibrary(t.id),onPasteText:t=>e.pasteText(t)})]})}function N7({documents:{documents:e,uploading:t,error:n,remove:r},messageId:i}){let a=e.filter(e=>(e.messageId??void 0)===i);if(i&&(t=void 0,n=void 0),a.length===0&&t===void 0&&!n)return null;let o=a.some(e=>e.kind===`pdf`||e.kind===`pptx`);return(0,M.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-col gap-1.5 px-3 pt-3 text-sm`,children:[a.length>0&&(0,M.jsx)(`ul`,{"aria-label":`Attached documents`,className:`flex flex-wrap gap-1.5`,children:a.map(e=>(0,M.jsxs)(`li`,{className:`bg-muted text-foreground flex max-w-full min-w-0 flex-wrap items-center gap-1.5 rounded-md border py-0.5 pr-0.5 pl-2`,children:[(0,M.jsx)(kg,{className:`text-muted-foreground size-3.5 shrink-0`,"aria-hidden":!0}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.filename,children:e.filename}),(0,M.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:o7(e)}),(0,M.jsx)(D7,{delayDuration:400,children:(0,M.jsxs)(O7,{children:[(0,M.jsx)(k7,{asChild:!0,children:(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6`,"aria-label":`Remove ${e.filename}`,onClick:()=>void r(e.id),children:(0,M.jsx)(ev,{"aria-hidden":`true`})})}),(0,M.jsx)(A7,{children:`Detach from session`})]})})]},e.id))}),t!==void 0&&(0,M.jsxs)(`p`,{role:`status`,className:`text-muted-foreground flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),(0,M.jsxs)(`span`,{className:`truncate`,children:[`Reading `,t,`…`]})]}),n&&(0,M.jsx)(`p`,{role:`alert`,className:`text-destructive wrap-anywhere`,children:n}),o&&!i&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:Eoe})]})}var P7=(0,v.createContext)(null),Aoe=()=>{let e=(0,v.useContext)(P7);if(!e)throw Error(`ChainOfThought components must be used within ChainOfThought`);return e},F7=(0,v.memo)(({className:e,open:t,defaultOpen:n=!1,onOpenChange:r,children:i,...a})=>{let[o,s]=Zn({prop:t,defaultProp:n,onChange:r}),c=(0,v.useMemo)(()=>({isOpen:o}),[o]);return(0,M.jsx)(P7.Provider,{value:c,children:(0,M.jsx)(P8,{asChild:!0,open:o,onOpenChange:s,children:(0,M.jsx)(`div`,{className:j(`not-prose min-w-0 max-w-prose space-y-4`,e),...a,children:i})})})}),I7=(0,v.memo)(({className:e,children:t,...n})=>{let{isOpen:r}=Aoe();return(0,M.jsxs)(F8,{className:j(`flex min-w-0 w-full items-center gap-2 rounded-sm text-muted-foreground text-sm hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,e),...n,children:[(0,M.jsx)(ph,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 text-left wrap-anywhere`,children:t??`Chain of Thought`}),(0,M.jsx)(Dh,{"aria-hidden":`true`,className:j(`size-4 shrink-0`,r?`rotate-180`:`rotate-0`)})]})}),L7=(0,v.memo)(({className:e,icon:t=dg,label:n,description:r,status:i=`complete`,children:a,...o})=>(0,M.jsxs)(`div`,{className:j(`flex min-w-0 gap-2 text-sm`,{complete:`text-muted-foreground`,active:`text-foreground`,pending:`text-muted-foreground/50`}[i],e),...o,children:[(0,M.jsxs)(`div`,{"aria-hidden":`true`,className:`relative mt-0.5 shrink-0`,children:[(0,M.jsx)(t,{className:`size-4`}),(0,M.jsx)(`div`,{className:`-mx-px absolute top-7 bottom-0 left-1/2 w-px bg-border`})]}),(0,M.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 wrap-anywhere`,children:[(0,M.jsx)(`div`,{children:n}),r&&(0,M.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:r}),a]})]})),R7=(0,v.memo)(({className:e,children:t,...n})=>(0,M.jsx)(I8,{className:j(`mt-2 min-w-0 space-y-3 text-foreground outline-none`,e),...n,children:t}));F7.displayName=`ChainOfThought`,I7.displayName=`ChainOfThoughtHeader`,L7.displayName=`ChainOfThoughtStep`,R7.displayName=`ChainOfThoughtContent`;function joe({className:e,value:t,...n}){return(0,M.jsx)(sf,{"data-slot":`progress`,className:j(`relative h-2 w-full overflow-hidden rounded-full bg-primary/20`,e),...n,children:(0,M.jsx)(lf,{"data-slot":`progress-indicator`,className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(t||0)}%)`}})})}var z7=`Concepts and memories as linked notes, for your Obsidian vault. Your own notes aren't included.`;function B7({variant:e=`panel`}){let[t,n]=(0,v.useState)({step:`idle`}),r=async()=>{n({step:`busy`});let e=await tP();n(e.ok?{step:`done`,filename:e.filename}:{step:`error`,error:e.error})},i=e===`header`,a=i?`text-[0.75rem] max-w-[18rem] sm:text-right`:`text-sm`;return(0,M.jsxs)(`div`,{className:j(`flex flex-col gap-1.5`,i&&`items-start sm:items-end`),children:[(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:i?`sm`:`default`,className:j(!i&&`self-start`),disabled:t.step===`busy`,onClick:()=>void r(),title:i?z7:void 0,children:[t.step===`busy`?(0,M.jsx)(JF,{"aria-hidden":`true`}):(0,M.jsx)(pg,{"aria-hidden":`true`}),`Export to Obsidian`]}),(0,M.jsx)(`p`,{className:j(`text-muted-foreground`,a,i&&t.step!==`done`&&`sr-only`),role:`status`,children:t.step===`done`?`Downloaded ${t.filename}. Unzip it into your vault: it adds a Mivra folder of concepts and memories that link to your notes.`:i?``:z7}),t.step===`error`&&(0,M.jsx)(`p`,{className:j(`text-destructive`,a),role:`alert`,children:t.error})]})}var Moe=Bj*4,Noe=1048576;function Poe(e){let t=(e.webkitRelativePath||e.name).split(`/`);return t.length<2?{folder:void 0,path:t[0]}:{folder:t[0],path:t.slice(1).join(`/`)}}function Foe(e){let t,n=[],r=[],i=0,a=0;for(let o of Array.from(e)){let e=Poe(o);t??=e.folder;let{path:s}=e;if(!s.split(`/`).some(e=>e.startsWith(`.`)||e===``)){if(!/\.md$/i.test(s))i++;else if(o.size>Moe)r.push(s);else{if(n.length>=1e4)return{ok:!1,error:`This folder has more than ${zj.toLocaleString(`en`)} notes, more than one import can take.`};if(a+=o.size,a>67108864)return{ok:!1,error:`This folder's notes come to more than ${Vj/Noe} MB, more than one import can take.`};n.push({path:s,file:o})}}}return n.sort((e,t)=>e.path.localeCompare(t.path)),{ok:!0,folder:t,notes:n,tooLong:r,notMarkdown:i}}async function Ioe(e,t){let n=Foe(e);if(!n.ok)return n;let{folder:r,notes:i,notMarkdown:a}=n,o=[...n.tooLong],s=[];t?.(0,i.length);for(let[e,{path:n,file:r}]of i.entries()){let a;try{a=await r.text()}catch{return{ok:!1,error:`Couldn't read ${n}. It may have been moved or deleted; choose the folder again.`}}a.length>1e6?o.push(n):s.push({path:n,text:a}),t?.(e+1,i.length)}return{ok:!0,vault:{folder:r,files:s,notMarkdown:a,tooLong:o}}}var V7=(e,t,n=`${t}s`)=>`${e.toLocaleString(`en`)} ${e===1?t:n}`,Loe=1500,H7=e=>e.status===`queued`||e.status===`running`;function Roe({open:e,onOpenChange:t,onOpenGraph:n}){let r=(0,v.useRef)(!1),[i,a]=(0,v.useState)(),[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)({open:!1,key:0}),u=e=>l(t=>({open:!0,key:t.key+1,...e?{reimport:e}:{}}));(0,v.useEffect)(()=>{if(!e)return;let t=!1;return a(void 0),s(void 0),l(e=>({...e,open:!1})),tN().then(e=>{t||(e.ok?a(e.value):s(e.error))}),()=>{t=!0}},[e]);let d=({import:e})=>a((t=[])=>t.some(t=>t.id===e.id)?t.map(t=>t.id===e.id?e:t):[...t,e]),f=(e,t)=>a(n=>n?.map(n=>n.id===e?{...n,distillation:t}:n)),p=!!i?.some(e=>H7(e.distillation));return(0,v.useEffect)(()=>{if(!e||!p)return;let t=!1,n=setInterval(()=>{tN().then(e=>{!t&&e.ok&&a(e.value)})},Loe);return()=>{t=!0,clearInterval(n)}},[e,p]),(0,M.jsxs)(e7,{open:e,onOpenChange:t,children:[(0,M.jsxs)(t7,{className:`w-full overflow-y-auto sm:max-w-md`,onCloseAutoFocus:e=>{e.preventDefault(),r.current?(r.current=!1,document.querySelector(`[data-notes-graph-start]`)?.focus()):(document.querySelector(`[data-imports-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,M.jsxs)(n7,{children:[(0,M.jsx)(r7,{className:`font-heading`,children:`Imported notes`}),(0,M.jsx)(i7,{children:`Notes from your Obsidian vaults. They're read-only here: edit them in Obsidian, then re-import the vault.`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-4`,"aria-live":`polite`,children:[i&&i.length>0&&(0,M.jsxs)(N,{type:`button`,className:`self-start`,onClick:()=>u(),children:[(0,M.jsx)(Ng,{"aria-hidden":`true`}),`Import a vault`]}),i&&i.length>0&&(0,M.jsx)(B7,{}),o&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,children:o}),!i&&!o&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading imports…`]}),i?.length===0&&(0,M.jsxs)(U5,{className:`border p-6 md:p-6`,children:[(0,M.jsxs)(W5,{children:[(0,M.jsx)(G5,{variant:`icon`,children:(0,M.jsx)(Kg,{"aria-hidden":`true`})}),(0,M.jsx)(K5,{children:`No vaults imported yet`}),(0,M.jsx)(q5,{children:`Import an Obsidian vault to bring its notes, links and tags into Mivra. Only Markdown notes are read.`})]}),(0,M.jsx)(J5,{children:(0,M.jsxs)(N,{type:`button`,onClick:()=>u(),children:[(0,M.jsx)(Ng,{"aria-hidden":`true`}),`Import a vault`]})})]}),i&&i.length>0&&(0,M.jsx)(`ul`,{className:`flex flex-col gap-2`,"aria-label":`Imported vaults`,children:i.map(e=>(0,M.jsx)(zoe,{entry:e,onReimport:()=>u(e),onGraph:n&&(()=>{r.current=!0,n(e.id),t(!1)}),onDelete:()=>a(t=>t?.filter(t=>t.id!==e.id)),onDistillation:t=>f(e.id,t)},e.id))})]})]}),(0,M.jsx)(Hoe,{open:c.open,onOpenChange:e=>{e||l(e=>({...e,open:!1}))},imports:i??[],...c.reimport?{reimport:c.reimport}:{},onImported:d},c.key)]})}function zoe({entry:e,onReimport:t,onGraph:n,onDelete:r,onDistillation:i}){let[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(),d=async()=>{c(!0),u(void 0);let t=await nN(e.id);c(!1),t.ok?r():u(t.error)};return(0,M.jsxs)(`li`,{className:`flex flex-col gap-2 rounded-lg border p-3 text-sm wrap-anywhere`,"aria-label":e.name,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:e.name}),(0,M.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[V7(e.noteCount,`note`),` · Updated `,new Date(e.updatedAt).toLocaleDateString()]})]}),(0,M.jsx)(Boe,{entry:e,onChange:i}),a?(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Delete this import and its `,V7(e.noteCount,`note`),`, with the concepts and memories drawn from them? Your vault itself isn't touched.`]}),(0,M.jsxs)(N,{type:`button`,variant:`destructive`,size:`sm`,disabled:s,onClick:()=>void d(),children:[s&&(0,M.jsx)(JF,{"aria-hidden":`true`}),`Yes, delete`]}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,disabled:s,onClick:()=>o(!1),children:`Keep`})]}):(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n&&e.noteCount>0&&(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:n,children:[(0,M.jsx)(Z_,{"aria-hidden":`true`}),`Graph`]}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:t,children:`Re-import`}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>o(!0),children:`Delete`})]}),l&&(0,M.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:l})]})}function Boe({entry:e,onChange:t}){let n=e.distillation,[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(),s=async n=>{i(!0),o(void 0);let r=await n(e.id);i(!1),r.ok?t(r.value):o(r.error)},c=`${V7(n.concepts,`concept`)} and ${V7(n.memories,`memory`,`memories`)} drawn from these notes`,l;if(H7(n)){let e=n.groups>0?Math.round(n.groupsDone/n.groups*100):0;l=(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),n.status===`queued`?`Waiting to read these notes for concepts…`:n.groups>0?`Reading notes for concepts… group ${Math.min(n.groupsDone+1,n.groups).toLocaleString(`en`)} of ${n.groups.toLocaleString(`en`)}`:`Reading notes for concepts…`]}),(0,M.jsx)(joe,{value:e,"aria-label":`Reading notes for concepts`}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,disabled:r,onClick:()=>void s(iN),children:`Cancel`})]})}else if(n.pendingNotes>0){let e=n.status===`failed`?`Reading notes for concepts stopped: ${n.error??`the model request failed.`}`:n.status===`cancelled`?`Cancelled. ${V7(n.pendingNotes,`note`)} not read for concepts yet.`:`${V7(n.pendingNotes,`note`)} not read for concepts yet.`;l=(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`p`,{className:n.status===`failed`?`text-destructive`:`text-muted-foreground`,children:e}),(n.concepts>0||n.memories>0)&&(0,M.jsxs)(`p`,{className:`text-muted-foreground`,children:[`So far: `,c,`.`]}),(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,disabled:r,onClick:()=>void s(rN),children:[r&&(0,M.jsx)(JF,{"aria-hidden":`true`}),n.status===`failed`?`Try again`:n.status===`cancelled`?`Resume`:`Read notes`]})]})}else if(n.concepts>0||n.memories>0)l=(0,M.jsxs)(`p`,{className:`text-muted-foreground`,children:[c[0].toUpperCase()+c.slice(1),`.`]});else if(!n.conceptsSkipped)return null;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,role:`group`,"aria-label":`Concepts from these notes`,children:[l,n.conceptsSkipped?(0,M.jsxs)(`p`,{className:`text-muted-foreground`,children:[V7(n.conceptsSkipped,`new concept`),` left out: the concept graph is full. Deleting an import you no longer need makes room.`]}):null,a&&(0,M.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:a})]})}var Voe=e=>e.replace(/\.zip$/i,``).trim(),U7=e=>(e.kind===`zip`?Voe(e.file.name):e.vault.folder??``).slice(0,120);function Hoe({open:e,onOpenChange:t,imports:n,reimport:r,onImported:i}){let a=(0,v.useId)(),o=(0,v.useRef)(null),s=(0,v.useRef)(null),[c,l]=(0,v.useState)({step:`choose`}),[u,d]=(0,v.useState)(``),f=(0,v.useRef)(0);(0,v.useEffect)(()=>{e&&(f.current++,l({step:`choose`}),d(``))},[e]);let p=r??n.find(e=>e.name===u.trim()),m=p?{importId:p.id}:{name:u.trim()},h=async e=>{let t=++f.current;l({step:`reading`,read:0,total:0});let n=await Ioe(e,(e,n)=>{f.current===t&&l({step:`reading`,read:e,total:n})});if(f.current!==t)return;if(!n.ok)return l({step:`choose`,error:n.error});if(n.vault.files.length===0)return l({step:`choose`,error:`No Markdown notes were found in this folder. Choose the folder that holds your vault's notes.`});let r={kind:`folder`,vault:n.vault};d(U7(r)),l({step:`ready`,source:r})},g=e=>{f.current++;let t={kind:`zip`,file:e};d(U7(t)),l({step:`ready`,source:t})},_=async e=>{if(e.preventDefault(),c.step!==`ready`)return;let{source:t}=c,n=++f.current;l({step:`sending`,source:t});let r=t.kind===`zip`?await mN(m,t.file):await pN(m,t.vault.files);if(f.current===n){if(!r.ok)return l({step:`ready`,source:t,error:r.error});i(r.value),l({step:`done`,result:r.value,source:t,replaced:!!p})}},y=r?`Re-import ${r.name}`:`Import an Obsidian vault`;return(0,M.jsx)(R8,{open:e,onOpenChange:t,children:(0,M.jsxs)(z8,{className:`sm:max-w-lg`,children:[(0,M.jsxs)(B8,{children:[(0,M.jsx)(H8,{className:`font-heading wrap-anywhere`,children:y}),(0,M.jsx)(U8,{children:r?`Choose the same vault again. Changed notes are updated, new ones added, and notes that are gone from it removed.`:`Choose your vault's folder. Only Markdown notes are read; attachments and hidden folders such as .obsidian are left out.`})]}),(0,M.jsx)(`input`,{ref:o,type:`file`,multiple:!0,className:`hidden`,"data-testid":`vault-folder-input`,webkitdirectory:``,onChange:e=>{let t=e.target.files;t&&t.length>0&&h(t),e.target.value=``}}),(0,M.jsx)(`input`,{ref:s,type:`file`,accept:`.zip,application/zip`,className:`hidden`,"data-testid":`vault-zip-input`,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&g(t)}}),c.step===`choose`&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsxs)(Y5,{"data-invalid":!!c.error,children:[(0,M.jsxs)(N,{type:`button`,onClick:()=>o.current?.click(),children:[(0,M.jsx)(Ng,{"aria-hidden":`true`}),`Choose vault folder`]}),c.error&&(0,M.jsx)(Q5,{role:`alert`,children:c.error})]}),(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Can't choose a folder on this device?`,` `,(0,M.jsx)(N,{type:`button`,variant:`link`,className:`h-auto p-0`,onClick:()=>s.current?.click(),children:`Upload a .zip instead`})]})]}),c.step===`reading`&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),c.total>0?`Reading notes… ${c.read.toLocaleString(`en`)} of ${c.total.toLocaleString(`en`)}`:`Looking through the folder…`]}),(c.step===`ready`||c.step===`sending`)&&(0,M.jsxs)(`form`,{onSubmit:_,className:`flex flex-col gap-4`,children:[(0,M.jsx)(Uoe,{source:c.source}),!r&&(0,M.jsxs)(Y5,{"data-invalid":c.step===`ready`&&!!c.error,children:[(0,M.jsx)(X5,{htmlFor:a,children:`Import name`}),(0,M.jsx)(e5,{id:a,value:u,maxLength:120,disabled:c.step===`sending`,onChange:e=>d(e.target.value),"aria-describedby":`${a}-description`}),(0,M.jsx)(Z5,{id:`${a}-description`,children:p?`An import called ${p.name} already exists, so this re-imports it: changed notes are updated and notes that are gone are removed.`:`Tells your imports apart. Import the same vault under this name again to update it.`})]}),c.step===`ready`&&c.error&&(0,M.jsx)(Q5,{role:`alert`,className:`wrap-anywhere`,children:c.error}),c.step===`sending`&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),c.source.kind===`zip`?`Uploading and unpacking the zip…`:`Sending ${V7(c.source.vault.files.length,`note`)}…`]}),(0,M.jsxs)(V8,{children:[(0,M.jsx)(N,{type:`button`,variant:`outline`,disabled:c.step===`sending`,onClick:()=>l({step:`choose`}),children:`Choose again`}),(0,M.jsxs)(N,{type:`submit`,disabled:c.step===`sending`||!r&&!u.trim(),children:[c.step===`sending`&&(0,M.jsx)(JF,{"aria-hidden":`true`}),p?`Re-import`:`Import`]})]})]}),c.step===`done`&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,M.jsx)(Goe,{result:c.result,source:c.source,replaced:c.replaced}),(0,M.jsx)(V8,{children:(0,M.jsx)(N,{type:`button`,onClick:()=>t(!1),children:`Done`})})]})]})})}function Uoe({source:e}){if(e.kind===`zip`)return(0,M.jsxs)(`p`,{className:`flex items-center gap-2 text-sm wrap-anywhere`,children:[(0,M.jsx)(Dg,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),e.file.name,` (`,(e.file.size/1048576).toFixed(1),` MB)`]});let{vault:t}=e,n=[t.notMarkdown>0&&V7(t.notMarkdown,`other file`),t.tooLong.length>0&&V7(t.tooLong.length,`note`)+` too long to import`].filter(Boolean);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1 text-sm`,children:[(0,M.jsxs)(`p`,{className:`flex items-center gap-2 wrap-anywhere`,children:[(0,M.jsx)(Ng,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),V7(t.files.length,`note`),` found`,t.folder?` in ${t.folder}`:``]}),n.length>0&&(0,M.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Left out: `,n.join(`, `),`.`]})]})}var Woe={not_markdown:`not a note`,hidden:`hidden`,bad_path:`unsafe path`,duplicate:`duplicate`,too_long:`too long`,symlink:`link to another file`,generated:`exported by Mivra`};function Goe({result:e,source:t,replaced:n}){let r=t.kind===`folder`?t.vault.tooLong:[],i=t.kind===`folder`?t.vault.notMarkdown:0,a=[...r.map(e=>({path:e,reason:`too_long`})),...e.skipped],o=e.skippedCount+r.length+i,s=[[`Added`,e.added],[`Updated`,e.updated],[`Removed`,e.removed],[`Unchanged`,e.unchanged]];return(0,M.jsxs)(`div`,{className:`flex flex-col gap-3 text-sm`,role:`status`,children:[(0,M.jsxs)(`p`,{className:`wrap-anywhere`,children:[n?`Re-imported`:`Imported`,` `,(0,M.jsx)(`span`,{className:`font-medium`,children:e.import.name}),`: `,V7(e.import.noteCount,`note`),` in all.`]}),(0,M.jsx)(`dl`,{className:`grid grid-cols-4 gap-2`,"aria-label":`What changed`,children:s.map(([e,t])=>(0,M.jsxs)(`div`,{className:`bg-muted flex flex-col rounded-md px-2 py-1.5`,children:[(0,M.jsx)(`dt`,{className:`text-muted-foreground text-xs`,children:e}),(0,M.jsx)(`dd`,{className:`font-medium tabular-nums`,children:t.toLocaleString(`en`)})]},e))}),o>0&&(0,M.jsxs)(`div`,{className:`text-muted-foreground flex flex-col gap-1`,children:[(0,M.jsxs)(`p`,{children:[`Skipped `,V7(o,`file`),i>0?`, including ${V7(i,`attachment or other file`,`attachments and other files`)}`:``,`.`]}),a.length>0&&(0,M.jsxs)(`ul`,{className:`list-disc pl-5 wrap-anywhere`,children:[a.slice(0,5).map(e=>(0,M.jsxs)(`li`,{children:[e.path,` (`,Woe[e.reason],`)`]},`${e.path}:${e.reason}`)),a.length>5&&(0,M.jsx)(`li`,{children:`…`})]})]}),e.truncated&&(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`Some links or tags were left out: a note or the vault had more than Mivra keeps.`}),H7(e.import.distillation)&&(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`Mivra is now reading the new and changed notes for concepts and memories, using your model. Follow or cancel it in the list.`})]})}function W7({summary:e,children:t,className:n,...r}){let[i,a]=(0,v.useState)(!1),o=(0,v.useId)();return(0,M.jsxs)(`li`,{className:j(`border-t first:border-t-0`,n),...r,children:[(0,M.jsxs)(`button`,{type:`button`,className:`hover:bg-sunken focus-visible:ring-ring/50 flex w-full min-w-0 items-center gap-2.5 rounded-md px-2 py-2 text-left text-[0.9rem] leading-snug outline-none focus-visible:ring-[3px]`,"aria-expanded":i,"aria-controls":i?o:void 0,onClick:()=>a(e=>!e),children:[e,(0,M.jsx)(Dh,{"aria-hidden":`true`,className:j(`text-muted-foreground size-4 shrink-0 transition-transform`,i&&`rotate-180`)})]}),i&&(0,M.jsx)(`div`,{id:o,className:`border-border mb-2 ml-1 flex flex-col gap-2 border-l py-1 pl-4 text-[0.8125rem]`,"data-testid":`peek`,children:t})]})}var Koe=864e5;function G7(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):new Date(e)}var K7=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();function qoe(e,t=new Date){let n=G7(e);return Number.isNaN(n.getTime())?0:Math.max(0,Math.round((K7(t)-K7(n))/Koe))}function Joe(e,t=new Date){let n=qoe(e,t);return n===0?`today`:n<7?`${n}d ago`:n<30?`${Math.floor(n/7)}w ago`:n<365?`${Math.max(1,Math.floor(n/30))}mo ago`:`${Math.floor(n/365)}y ago`}function q7(e){let t=G7(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:`numeric`,month:`long`,day:`numeric`})}function J7({value:e,prefix:t,className:n}){let r=q7(e);return(0,M.jsxs)(`time`,{dateTime:e,title:r,className:j(`text-muted-foreground font-mono text-[0.72rem] whitespace-nowrap tabular-nums`,n),children:[t,Joe(e)]})}var Yoe={missed:`Missed`,unsure:`Unsure`,retention:`Keep fresh`},Xoe={missed:Lh,unsure:Gh,retention:x_},Zoe={missed:`text-destructive`,unsure:`text-muted-foreground`,retention:`text-muted-foreground`};function Qoe(e){return e.reason===`retention`?e.overdueDays===0?`Due today`:`${e.overdueDays.toLocaleString(`en`)}d overdue`:Yoe[e.reason]}function $oe(e){return e.reason===`missed`?`Your last answer was wrong, so it's back for a fresh check.`:e.reason===`unsure`?`You said “Not sure” last time, so it's back for a fresh check.`:`${`${e.streak.toLocaleString(`en`)} right in a row`}; a check to keep it fresh came ${e.overdueDays===0?`due today`:`due ${e.overdueDays.toLocaleString(`en`)} day${e.overdueDays===1?``:`s`} ago`}.`}var ese={focus:`weak`,unsure:`unsure`,not_started:`not practised yet`},tse={focus:`Weak`,unsure:`Unsure`,not_started:`Not practised`},nse={focus:Lh,unsure:Gh,not_started:Vh};function rse(e){return`Missed ${e.concept}; prerequisite ${e.prerequisite} is ${ese[e.prerequisiteStatus]}`}var Y7=e=>`${e.prerequisite}\u0000${e.concept}`;function ise(e){let[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)(),a=(0,v.useRef)(!0);return(0,v.useEffect)(()=>(a.current=!0,()=>{a.current=!1}),[]),{busy:t,error:r,start:async(r,o)=>{if(t)return;n(r),i(void 0);let s=await o();a.current&&(n(void 0),s.ok?e(s.value.session,s.value.message):i(s.error))}}}var ase=8,X7=[{value:`all`,label:`All`},{value:`missed`,label:`Missed`},{value:`unsure`,label:`Unsure`},{value:`retention`,label:`Keep fresh`}];function ose({queue:e,onStart:t,evidence:n}){let{busy:r,error:i,start:a}=ise(t),[o,s]=(0,v.useState)(`all`),c=e.recommendations??[],l=e=>void a(Y7(e),()=>RM(e.prerequisite,e.concept)),u=(e,t)=>void a(t,()=>LM(e)),d=o===`all`?e.items:e.items.filter(e=>e.reason===o),f=d.slice(0,ase),p=o===`all`?Math.max(0,e.total-f.length):Math.max(0,d.length-f.length),m=e.total===1?`this concept`:e.total<=5?`these ${e.total}`:`the first 5`;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-6`,"data-testid":`due-review`,children:[(0,M.jsxs)(`section`,{"aria-labelledby":`review-hero`,className:`bg-card shadow-paper flex flex-col gap-3 rounded-xl border p-5 sm:p-6`,children:[(0,M.jsxs)(`p`,{className:c7,children:[`Spaced review`,e.total>0&&(0,M.jsxs)(M.Fragment,{children:[` · `,(0,M.jsx)(`span`,{className:`tabular-nums`,children:e.total.toLocaleString(`en`)}),` due`]})]}),(0,M.jsx)(`h3`,{id:`review-hero`,className:`font-heading text-[1.35rem] leading-tight font-medium tracking-[-0.015em] text-balance`,children:e.total===0?`You're all caught up`:e.total===1?`One concept is ready for a fresh check`:`${e.total.toLocaleString(`en`)} concepts are ready for a fresh check`}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e.total===0?`Nothing is due right now. Concepts come back here when an answer was wrong or unsure, or when it's time to check one stuck.`:`A short session of fresh checks on ${m}. One right answer clears an item.`}),e.total>0&&(0,M.jsxs)(N,{type:`button`,className:`self-start`,disabled:!!r,onClick:()=>u(e.items.slice(0,5).map(e=>e.concept),`batch`),children:[r===`batch`&&(0,M.jsx)(JF,{"aria-hidden":`true`}),`Start review`,(0,M.jsx)(sh,{"aria-hidden":`true`})]})]}),c.length>0&&(0,M.jsxs)(`section`,{"aria-labelledby":`review-next`,className:`flex flex-col gap-2.5`,"data-testid":`prerequisite-recommendations`,children:[(0,M.jsx)(`h3`,{id:`review-next`,className:`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:`What next`}),(0,M.jsx)(`ul`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,"aria-label":`Prerequisites to drill first`,children:c.map(e=>{let t=Y7(e),n=nse[e.prerequisiteStatus];return(0,M.jsxs)(`li`,{className:`bg-card flex min-w-0 flex-col gap-3 rounded-lg border p-4`,"data-testid":`prerequisite-recommendation`,children:[(0,M.jsx)(`span`,{className:`sr-only`,children:rse(e)}),(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1.5 text-[0.875rem]`,"aria-hidden":`true`,children:[(0,M.jsxs)(`span`,{className:`bg-sunken flex min-w-0 items-center gap-1.5 rounded-md border border-dashed px-2 py-1`,children:[(0,M.jsx)(n,{className:j(`size-3.5 shrink-0`,e.prerequisiteStatus===`focus`?`text-destructive`:`text-muted-foreground`)}),(0,M.jsx)(`span`,{className:`min-w-0 truncate`,children:e.prerequisite})]}),(0,M.jsx)(sh,{className:`text-muted-foreground size-3.5 shrink-0`}),(0,M.jsxs)(`span`,{className:`bg-sunken flex min-w-0 items-center gap-1.5 rounded-md border px-2 py-1`,children:[(0,M.jsx)(Lh,{className:`text-destructive size-3.5 shrink-0`}),(0,M.jsx)(`span`,{className:`min-w-0 truncate`,children:e.concept})]})]}),(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,M.jsxs)(`span`,{className:`text-muted-foreground text-[0.8125rem]`,"aria-hidden":`true`,children:[tse[e.prerequisiteStatus],` prerequisite · missed concept`]}),(0,M.jsxs)(N,{type:`button`,size:`sm`,variant:`outline`,className:`shrink-0`,disabled:!!r,onClick:()=>l(e),"aria-label":`Drill prerequisite ${e.prerequisite}`,children:[r===t&&(0,M.jsx)(JF,{"aria-hidden":`true`}),`Drill first`]})]})]},t)})})]}),e.items.length>0&&(0,M.jsxs)(`section`,{"aria-labelledby":`review-queue`,className:`flex flex-col gap-2.5`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,M.jsx)(`h3`,{id:`review-queue`,className:`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:`Queue`}),(0,M.jsx)(`div`,{className:`bg-sunken inline-flex max-w-full flex-wrap gap-0.5 self-start rounded-lg border p-0.5`,role:`group`,"aria-label":`Show due concepts`,children:X7.map(({value:e,label:t})=>(0,M.jsx)(N,{type:`button`,size:`sm`,variant:`ghost`,className:u7(o===e),"aria-pressed":o===e,onClick:()=>s(e),children:t},e))})]}),f.length===0?(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Nothing `,X7.find(e=>e.value===o)?.label.toLowerCase(),` in this queue.`]}):(0,M.jsx)(`ul`,{className:`bg-card flex flex-col rounded-lg border px-2`,"aria-label":`Concepts due for review`,children:f.map(e=>(0,M.jsx)(sse,{item:e,evidence:n?.(e.concept),recommendation:c.find(t=>t.concept===e.concept),busy:r,onReview:()=>u([e.concept],`review\u0000${e.concept}`),onDrill:l},e.concept))}),p>0&&(0,M.jsxs)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:[`And `,p.toLocaleString(`en`),` more queued for later sessions.`]})]}),i&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:i})]})}function sse({item:e,evidence:t,recommendation:n,busy:r,onReview:i,onDrill:a}){let o=Xoe[e.reason];return(0,M.jsxs)(W7,{"data-reason":e.reason,summary:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o,{"aria-hidden":`true`,className:j(`size-4 shrink-0`,Zoe[e.reason],e.reason===`unsure`&&`[&_circle]:[stroke-dasharray:3_2]`)}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.concept}),(0,M.jsx)(`span`,{className:j(`shrink-0 text-[0.8125rem]`,e.reason===`missed`?`text-destructive`:`text-muted-foreground`),children:Qoe(e)}),(0,M.jsx)(J7,{value:e.lastAttemptAt,className:`hidden shrink-0 sm:inline`})]}),children:[e.course&&(0,M.jsx)(`p`,{className:`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:e.course.title}),(0,M.jsx)(`p`,{children:$oe(e)}),t&&(0,M.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Graded evidence: `,t]}),(0,M.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Last answered `,(0,M.jsx)(`time`,{dateTime:e.lastAttemptAt,children:q7(e.lastAttemptAt)})]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsxs)(N,{type:`button`,size:`sm`,variant:`outline`,disabled:!!r,onClick:i,children:[r===`review\u0000${e.concept}`&&(0,M.jsx)(JF,{"aria-hidden":`true`}),`Review this concept`]}),n&&(0,M.jsxs)(N,{type:`button`,size:`sm`,variant:`outline`,disabled:!!r,onClick:()=>a(n),children:[`Drill `,n.prerequisite]})]})]})}var cse=[{key:`focus`,status:`focus`,title:`Focus areas`,hint:`The latest answer was wrong, or most were.`},{key:`strengths`,status:`strength`,title:`Strengths`,hint:`Mostly right, more than once, recently.`},{key:`practicing`,status:`practicing`,title:`Practicing`,hint:`Answered, but not enough yet to call it.`},{key:`unsure`,status:`unsure`,title:`Unsure`,hint:`You said “Not sure” last time.`},{key:`notStarted`,status:`not_started`,title:`Not started`,hint:`In the syllabus, not answered on yet.`}],lse={strength:`text-success`,focus:`text-destructive`,practicing:`text-muted-foreground`,unsure:`text-muted-foreground`,not_started:`text-muted-foreground`},use=[{key:`strengths`,label:`Strengths`,className:`bg-success`},{key:`practicing`,label:`Practicing`,className:`bg-muted-foreground/60`},{key:`unsure`,label:`Unsure`,className:`bg-muted-foreground/25`},{key:`focus`,label:`Focus areas`,className:`bg-destructive`}],dse=e=>e.strengths.length+e.focus.length+e.practicing.length+e.unsure.length+e.notStarted.length,Z7=8;function fse({record:e,courses:t,courseOf:n}){let r=(0,v.useId)(),i=t?.filter(e=>e.status!==`interviewing`)??[],[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(),[l,u]=(0,v.useState)();(0,v.useEffect)(()=>{if(c(void 0),u(void 0),!a)return;let e=!1;return VM(a).then(t=>{e||(t.ok?c(t.value):u(t.error))}),()=>{e=!0}},[a]);let d=i.find(e=>e.id===a),f=a?s:e;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-6`,"data-testid":`learner-record`,children:[(0,M.jsxs)(`section`,{"aria-label":`Graded evidence`,className:`bg-card shadow-paper flex flex-col gap-4 rounded-xl border p-5 sm:p-6`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,M.jsx)(`p`,{className:c7,children:`Graded evidence`}),(0,M.jsx)(`p`,{className:`text-sm`,children:f?`From your graded answers: ${b7(f)}.`:`Loading ${d?.title??`the course`}…`})]}),i.length>0&&(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-[0.8125rem]`,children:[(0,M.jsx)(`label`,{htmlFor:r,className:`text-muted-foreground`,children:`Course`}),(0,M.jsxs)(`select`,{id:r,value:a,onChange:e=>o(e.target.value),className:`bg-card border-border-strong focus-visible:ring-ring/50 h-8 max-w-[14rem] min-w-0 truncate rounded-md border px-2 outline-none focus-visible:ring-[3px]`,children:[(0,M.jsx)(`option`,{value:``,children:`All courses`}),i.map(e=>(0,M.jsx)(`option`,{value:e.id,children:e.title},e.id))]})]})]}),f&&(0,M.jsx)(pse,{record:f})]}),l&&(0,M.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Couldn't load that course's record: `,l]}),a&&!f&&!l&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading the course's record…`]}),f&&!S7(f)&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Nothing graded here yet.`}),f&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-6`,role:`group`,"aria-label":`Your record by concept`,"data-testid":`mastery-groups`,children:[cse.filter(e=>f[e.key].length>0).map(e=>(0,M.jsx)(mse,{group:e,concepts:f[e.key],courseOf:e=>d?.title??n?.(e)},e.key)),f.truncated&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:`Your oldest answers aren't counted here: the history is longer than Mivra reads at once.`})]})]})}function pse({record:e}){let t=use.map(t=>({...t,count:e[t.key].length})),n=t.reduce((e,t)=>e+t.count,0);if(n===0)return null;let r=t.map(e=>`${e.label} ${e.count.toLocaleString(`en`)}`).join(`, `);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,M.jsx)(`div`,{className:`bg-sunken flex h-2.5 w-full overflow-hidden rounded-full`,role:`img`,"aria-label":`Mastery distribution: ${r}`,"data-testid":`mastery-distribution`,children:t.filter(e=>e.count>0).map(e=>(0,M.jsx)(`span`,{className:j(`h-full`,e.className),style:{width:`${e.count/n*100}%`},"data-segment":e.key},e.key))}),(0,M.jsx)(`ul`,{className:`text-muted-foreground flex flex-wrap gap-x-4 gap-y-1 text-[0.8125rem]`,"aria-hidden":`true`,children:t.map(e=>(0,M.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,M.jsx)(`span`,{className:j(`size-2 rounded-full`,e.className)}),e.label,` `,(0,M.jsx)(`span`,{className:`font-mono tabular-nums`,children:e.count.toLocaleString(`en`)})]},e.key))})]})}function mse({group:e,concepts:t,courseOf:n}){let[r,i]=(0,v.useState)(!1),a=r?t:t.slice(0,Z7),o=`mastery-${e.key}`,s=g7[e.status];return(0,M.jsxs)(`section`,{"aria-labelledby":o,className:`flex flex-col gap-2`,"data-testid":`mastery-${e.key}`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5`,children:[(0,M.jsxs)(`h3`,{id:o,className:`flex items-center gap-1.5 text-[0.95rem] font-medium`,"data-mastery":e.status,children:[(0,M.jsx)(s,{"aria-hidden":`true`,className:j(`size-4 shrink-0 self-center`,lse[e.status])}),e.title,(0,M.jsx)(`span`,{className:`bg-sunken text-muted-foreground rounded-full border px-1.5 font-mono text-[0.6875rem] tabular-nums`,children:t.length.toLocaleString(`en`)})]}),(0,M.jsx)(`span`,{className:`text-muted-foreground text-[0.75rem]`,children:e.hint})]}),(0,M.jsx)(`ul`,{className:`bg-card flex flex-col rounded-lg border px-2`,children:a.map(e=>(0,M.jsx)(hse,{concept:e,course:n(e.concept)},e.concept))}),t.length>Z7&&(0,M.jsx)(N,{type:`button`,variant:`link`,size:`sm`,className:`text-muted-foreground h-auto self-start p-0`,onClick:()=>i(e=>!e),children:r?`Show fewer`:`Show all ${t.length.toLocaleString(`en`)}`})]})}function hse({concept:e,course:t}){let n=e.correct+e.incorrect;return(0,M.jsxs)(W7,{"data-concept":e.concept,summary:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.concept}),(0,M.jsx)(gse,{concept:e}),e.lastSeen?(0,M.jsx)(J7,{value:e.lastSeen,className:`hidden shrink-0 sm:inline`}):null]}),children:[e.status===`not_started`&&e.topics?.length?(0,M.jsxs)(`p`,{children:[`In `,e.topics.join(`, `)]}):null,e.status!==`not_started`&&(0,M.jsxs)(`ul`,{className:`flex flex-col gap-1`,children:[n>0&&(0,M.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,M.jsx)(zh,{"aria-hidden":`true`,className:`text-muted-foreground size-3.5 shrink-0`}),(0,M.jsxs)(`span`,{className:`font-mono tabular-nums`,children:[e.correct.toLocaleString(`en`),`/`,n.toLocaleString(`en`)]}),` `,n===1?`answer`:`answers`,` right`]}),e.modelJudged>0&&(0,M.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,M.jsx)($h,{"aria-hidden":`true`,className:`text-muted-foreground size-3.5 shrink-0`}),(0,M.jsxs)(`span`,{className:`font-mono tabular-nums`,children:[e.modelApproved.toLocaleString(`en`),`/`,e.modelJudged.toLocaleString(`en`)]}),` `,e.modelJudged===1?`code review`:`code reviews`,` approved`]}),e.unsure>0&&(0,M.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,M.jsx)(Gh,{"aria-hidden":`true`,className:`text-muted-foreground size-3.5 shrink-0`}),(0,M.jsx)(`span`,{className:`font-mono tabular-nums`,children:e.unsure.toLocaleString(`en`)}),` marked not sure`]})]}),t&&(0,M.jsx)(`p`,{className:`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:t}),e.lastSeen&&(0,M.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Last answered `,(0,M.jsx)(`time`,{dateTime:e.lastSeen,children:q7(e.lastSeen)})]})]})}function gse({concept:e}){let t=e.correct+e.incorrect+e.modelJudged,n=e.correct+e.modelApproved,r=t===0?e.unsure>0?`No scored answers yet; ${v7(e.unsure,`Not sure answer`)}`:`No scored answers yet`:`${n.toLocaleString(`en`)} of ${v7(t,`scored answer`)} right`,i=Math.min(5,t),a=t===0?0:Math.round(n/t*i);n>0&&a===0&&(a=1),n<t&&a===i&&(a=i-1);let o=Array.from({length:5},(e,n)=>t===0?`hollow`:n<a?`right`:n<i?`wrong`:`empty`);return(0,M.jsx)(`span`,{role:`img`,"aria-label":r,title:r,className:`flex shrink-0 items-center gap-1`,"data-testid":`mastery-pips`,children:o.map((e,t)=>(0,M.jsx)(`span`,{"data-pip":e,className:j(`size-2 rounded-full`,e===`right`&&`bg-success`,e===`wrong`&&`bg-destructive`,e===`empty`&&`bg-muted-foreground/25`,e===`hollow`&&`border-muted-foreground border border-dashed`)},t))})}var _se={goal:`Goal`,preference:`Preference`,misconception:`Misconception`,known:`Known from notes`},vse=[{kind:`goal`,label:`Goals`},{kind:`preference`,label:`Preferences`},{kind:`misconception`,label:`Misconceptions`},{kind:`known`,label:`Known from notes`}],yse=[{value:`all`,label:`All`},{value:`import`,label:`From notes`},{value:`other`,label:`From learning`}],bse=(e,t)=>e===`all`||e===`import`==(t.basis===`import`),xse=e=>e.basis===`import`?e.source?`From your note ${e.source.title}`:`From your notes`:e.basis===`wrong_answer`?`From a wrong answer`:`From chat`,Sse=({memory:e})=>{let t=e.basis===`import`?kg:e.basis===`wrong_answer`?Lh:Zg;return(0,M.jsx)(t,{"aria-hidden":`true`,className:`size-3.5 shrink-0`})};function Cse({onOpenCourse:e,onStartReview:t,onLeave:n,onDueTotal:r}){let[i,a]=(0,v.useState)({}),[o,s]=(0,v.useState)({}),[c,l]=(0,v.useState)({}),[u,d]=(0,v.useState)({}),[f,p]=(0,v.useState)(),m=(0,v.useRef)(r);m.current=r,(0,v.useEffect)(()=>{let e=!1,t=()=>{FM().then(t=>!e&&a(t.ok?{value:t.value}:{error:t.error})),PM().then(t=>!e&&s(e=>t.ok?{value:t.value}:{...e,error:t.error})),HM().then(t=>!e&&l(t.ok?{value:t.value}:{error:t.error})),IM().then(t=>{e||(d(t.ok?{value:t.value}:{error:t.error}),t.ok&&m.current?.(t.value.total))})};return t(),window.addEventListener(`focus`,t),()=>{e=!0,window.removeEventListener(`focus`,t)}},[]);let h=[i,o,c,u].every(e=>e.value!==void 0||e.error!==void 0),g=i.value&&S7(i.value)?i.value:void 0,_=h&&!g&&o.value?.length===0&&c.value?.length===0,y={review:u.value?.total,mastery:i.value?dse(i.value):void 0,notes:o.value?.length,courses:c.value?.length},b=(y.review??0)>0?`review`:g?`mastery`:(y.notes??0)>0?`notes`:(y.courses??0)>0?`courses`:`review`,x=f??b;return(0,M.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,"data-testid":`memory-screen`,children:(0,M.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[840px] flex-col gap-6 px-4 py-8 sm:px-6 sm:py-10`,children:[(0,M.jsxs)(`header`,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,M.jsx)(`h2`,{className:`font-heading text-[2rem] leading-tight font-medium tracking-[-0.02em]`,children:`Memory`}),(0,M.jsx)(`p`,{className:`text-muted-foreground max-w-[34rem] text-[0.95rem] leading-relaxed`,children:`Your graded mastery record stays separate from what Mivra notes about you. Notes can be wrong — edit or delete anything here.`})]}),!_&&(0,M.jsx)(B7,{variant:`header`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,"aria-live":`polite`,children:[o.error&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,children:o.error}),c.error&&(0,M.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Couldn't load your courses: `,c.error]}),i.error&&(0,M.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Couldn't load your record: `,i.error]}),u.error&&(0,M.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Couldn't load your reviews: `,u.error]})]}),h?_?(0,M.jsxs)(U5,{className:`bg-sunken/50 border border-dashed p-6 md:p-6`,children:[(0,M.jsxs)(W5,{children:[(0,M.jsx)(G5,{variant:`icon`,children:(0,M.jsx)(ph,{"aria-hidden":`true`})}),(0,M.jsx)(K5,{children:`No memories yet`}),(0,M.jsx)(q5,{children:`Start a conversation or course. As you learn, Mivra can remember your goals, preferences and concepts to revisit.`})]}),n&&(0,M.jsx)(J5,{children:(0,M.jsx)(N,{variant:`outline`,onClick:n,children:`Back to learning`})})]}):(0,M.jsxs)(wse,{chapter:x,counts:y,onPick:p,children:[x===`review`&&(u.value?(0,M.jsx)(ose,{queue:u.value,onStart:(e,n)=>t?.(e,n),evidence:e=>{let t=i.value,n=t&&[...t.focus,...t.strengths,...t.practicing,...t.unsure].find(t=>t.concept===e);return n?y7(n):void 0}}):(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Your review queue isn't available right now.`})),x===`mastery`&&(i.value?g?(0,M.jsx)(fse,{record:i.value,courses:c.value,courseOf:e=>u.value?.items.find(t=>t.concept===e)?.course?.title}):(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No graded answers yet. Your record fills in as you answer checks.`}):(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Your record isn't available right now.`})),x===`notes`&&(o.value?(0,M.jsx)(Dse,{memories:o.value,onChange:e=>s(t=>({...t,value:t.value&&e(t.value)}))}):(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Your notes aren't available right now.`})),x===`courses`&&(c.value?(0,M.jsx)(Ese,{courses:c.value,onOpen:e}):(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Your courses aren't available right now.`}))]}):(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading your memory…`]})]})})}var Q7=[{value:`review`,label:`Review queue`},{value:`mastery`,label:`Mastery record`},{value:`notes`,label:`Tutor notes`},{value:`courses`,label:`Courses`}];function wse({chapter:e,counts:t,onPick:n,children:r}){let i=(0,v.useId)(),a=(0,v.useRef)([]);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,M.jsx)(`div`,{role:`tablist`,"aria-label":`Memory chapters`,className:`-mb-px flex gap-1 overflow-x-auto border-b`,onKeyDown:t=>{let r=Q7.findIndex(t=>t.value===e),i=t.key===`ArrowRight`?r+1:t.key===`ArrowLeft`?r-1:t.key===`Home`?0:t.key===`End`?Q7.length-1:void 0;if(i===void 0)return;t.preventDefault();let o=(i+Q7.length)%Q7.length;n(Q7[o].value),a.current[o]?.focus()},children:Q7.map((r,o)=>{let s=r.value===e,c=t[r.value];return(0,M.jsxs)(`button`,{ref:e=>{a.current[o]=e},type:`button`,role:`tab`,id:`${i}-tab-${r.value}`,"aria-selected":s,"aria-controls":`${i}-panel-${r.value}`,tabIndex:s?0:-1,onClick:()=>n(r.value),className:j(`focus-visible:ring-ring/50 flex shrink-0 items-center gap-1.5 border-b-2 px-2.5 pt-1 pb-2.5 text-[0.875rem] font-medium whitespace-nowrap outline-none focus-visible:ring-[3px]`,s?`border-foreground text-foreground`:`text-muted-foreground hover:text-foreground border-transparent`),children:[r.label,c!==void 0&&(0,M.jsxs)(`span`,{className:`bg-sunken text-muted-foreground rounded-full border px-1.5 font-mono text-[0.6875rem] tabular-nums`,children:[(0,M.jsx)(`span`,{className:`sr-only`,children:`(`}),c.toLocaleString(`en`),(0,M.jsx)(`span`,{className:`sr-only`,children:`)`})]})]},r.value)})}),Q7.map(t=>(0,M.jsx)(`div`,{role:`tabpanel`,id:`${i}-panel-${t.value}`,"aria-labelledby":`${i}-tab-${t.value}`,hidden:t.value!==e,tabIndex:0,className:`outline-none`,"data-chapter":t.value,children:t.value===e&&r},t.value))]})}var Tse={interviewing:`Setting up`,active:`In progress`,complete:`Complete`};function Ese({courses:e,onOpen:t}){return e.length===0?(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No courses yet. Start one with New course.`}):(0,M.jsx)(`ul`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,"aria-label":`Your courses`,children:e.map(e=>{let n=e.kind===`project`?`milestones`:`lessons`,r=e.status===`interviewing`,i=e.topicCount>0?Math.round(e.lessonsFinished/e.topicCount*100):0;return(0,M.jsxs)(`li`,{className:`bg-card flex min-w-0 flex-col gap-3 rounded-lg border p-4`,"data-testid":`course-card`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,M.jsxs)(`span`,{className:j(c7,`flex items-center gap-1.5`),children:[(0,M.jsx)(w7,{icon:e.icon,className:`size-3.5 shrink-0`,"aria-hidden":`true`}),e.kind===`project`?`Repo project`:`Lessons`]}),(0,M.jsx)(t8,{variant:`outline`,className:j(e.status===`complete`&&`border-success/40 bg-success/10 text-success`,r&&`border-dashed`),children:Tse[e.status]})]}),(0,M.jsx)(`h3`,{className:`font-heading text-[1.15rem] leading-snug font-medium wrap-anywhere`,children:e.title}),r?(0,M.jsx)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:`Placement interview in progress`}):(0,M.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,M.jsxs)(`div`,{className:`text-muted-foreground flex items-center justify-between gap-2 text-[0.8125rem]`,children:[(0,M.jsxs)(`span`,{children:[(0,M.jsxs)(`span`,{className:`font-mono tabular-nums`,children:[e.lessonsFinished.toLocaleString(`en`),`/`,e.topicCount.toLocaleString(`en`)]}),` `,n,` finished`]}),e.completedAt&&(0,M.jsx)(J7,{value:e.completedAt,prefix:`Completed `})]}),(0,M.jsx)(`div`,{className:`bg-sunken h-1.5 w-full overflow-hidden rounded-full`,"aria-hidden":`true`,children:(0,M.jsx)(`div`,{className:j(`h-full rounded-full`,e.status===`complete`?`bg-success`:`bg-muted-foreground/60`),style:{width:`${i}%`}})})]}),(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,className:`mt-auto self-start`,"aria-label":`${r?`Continue setting up`:`Open`} ${e.title}`,onClick:()=>t(e.sessionId),children:[r?`Continue setup`:`Open`,(0,M.jsx)(sh,{"aria-hidden":`true`})]})]},e.id)})})}function Dse({memories:e,onChange:t}){let[n,r]=(0,v.useState)(`all`),[i,a]=(0,v.useState)(`all`),[o,s]=(0,v.useState)(``),c=e.filter(e=>e.basis===`import`).length,l=e.filter(e=>bse(n,e)),u=vse.filter(e=>l.some(t=>t.kind===e.kind)),d=o.trim().toLowerCase(),f=l.filter(e=>(i===`all`||e.kind===i)&&(!d||[e.text,e.concept,e.source?.title].some(e=>e?.toLowerCase().includes(d))));return e.length===0?(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No memories yet. As you learn, Mivra can remember your goals, preferences and concepts to revisit.`}):(0,M.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,M.jsxs)(`div`,{className:`relative min-w-0 sm:max-w-[18rem] sm:flex-1`,children:[(0,M.jsx)(D_,{"aria-hidden":`true`,className:`text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2`}),(0,M.jsx)(e5,{type:`search`,"aria-label":`Search notes`,placeholder:`Search notes`,value:o,onChange:e=>s(e.target.value),className:`bg-card h-8 pl-8`})]}),c>0&&(0,M.jsx)(`div`,{className:`bg-sunken inline-flex max-w-full flex-wrap gap-0.5 self-start rounded-lg border p-0.5`,role:`group`,"aria-label":`Show memories`,children:yse.map(({value:e,label:t})=>(0,M.jsx)(N,{type:`button`,size:`sm`,variant:`ghost`,className:u7(n===e),"aria-pressed":n===e,onClick:()=>{r(e),a(`all`)},children:t},e))})]}),n===`import`&&c>0&&(0,M.jsx)(Ose,{count:c,onDeleted:()=>{t(e=>e.filter(e=>e.basis!==`import`)),r(`all`)}}),u.length>0&&(0,M.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,role:`group`,"aria-label":`Category`,children:[{kind:`all`,label:`All`},...u].map(e=>(0,M.jsx)(N,{type:`button`,size:`xs`,variant:`outline`,"aria-pressed":i===e.kind,onClick:()=>a(e.kind),className:j(`rounded-full`,i===e.kind?`bg-foreground text-background hover:bg-foreground/90 hover:text-background dark:bg-foreground dark:hover:bg-foreground/90`:`bg-card dark:bg-card`),children:e.label},e.kind))}),f.length===0?(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No notes match.`}):(0,M.jsx)(`ul`,{className:`flex flex-col gap-3`,"aria-label":`Tutor notes`,children:f.map(e=>(0,M.jsx)(kse,{memory:e,onChange:e=>t(t=>t.map(t=>t.id===e.id?e:t)),onDelete:()=>t(t=>t.filter(t=>t.id!==e.id))},e.id))})]})}function Ose({count:e,onDeleted:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(),c=async()=>{a(!0),s(void 0);let e=await GM();if(a(!1),!e.ok)return s(e.error);r(!1),t()};return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[n?(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Delete all `,e.toLocaleString(`en`),` memories drawn from your notes? Your notes stay imported.`]}),(0,M.jsxs)(N,{type:`button`,variant:`destructive`,size:`sm`,disabled:i,onClick:()=>void c(),children:[i&&(0,M.jsx)(JF,{"aria-hidden":`true`}),`Yes, delete all`]}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,disabled:i,onClick:()=>r(!1),children:`Keep`})]}):(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,onClick:()=>r(!0),children:`Delete all from notes`}),o&&(0,M.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:o})]})}var $7=`h-7 bg-card dark:bg-card border-border-strong dark:border-border-strong hover:bg-sunken dark:hover:bg-sunken`;function kse({memory:e,onChange:t,onDelete:n}){let r=(0,v.useId)(),[i,a]=(0,v.useState)(`view`),[o,s]=(0,v.useState)(e.text??``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(),f=async n=>{n.preventDefault(),l(!0),d(void 0);let r=await UM(e.id,o);if(l(!1),!r.ok)return d(r.error);t(r.value),a(`view`)},p=async()=>{l(!0),d(void 0);let t=await WM(e.id);l(!1),t.ok?n():d(t.error)};return(0,M.jsxs)(`li`,{className:`bg-card flex flex-col gap-2.5 rounded-lg border p-4 text-[0.95rem] leading-snug wrap-anywhere`,"data-kind":e.kind,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,M.jsx)(`span`,{className:c7,children:_se[e.kind]}),(0,M.jsx)(J7,{value:e.createdAt})]}),i===`edit`?(0,M.jsxs)(`form`,{onSubmit:f,className:`flex flex-col gap-2`,children:[(0,M.jsxs)(Y5,{"data-invalid":!!u,children:[(0,M.jsx)(X5,{htmlFor:r,children:`Memory text`}),(0,M.jsx)(p2,{id:r,"aria-describedby":`${r}-description${u?` ${r}-error`:``}`,"aria-invalid":!!u,value:o,maxLength:300,onChange:e=>s(e.target.value),autoFocus:!0}),(0,M.jsxs)(Z5,{id:`${r}-description`,className:`flex justify-between gap-2`,children:[(0,M.jsx)(`span`,{children:`Correct what Mivra should remember. Up to 300 characters.`}),(0,M.jsxs)(`span`,{className:`font-mono tabular-nums`,"aria-live":`polite`,children:[o.length,`/300`]})]}),u&&(0,M.jsx)(Q5,{id:`${r}-error`,role:`alert`,children:u})]}),(0,M.jsxs)(`div`,{className:`flex gap-2`,children:[(0,M.jsxs)(N,{type:`submit`,size:`sm`,disabled:c||!o.trim(),children:[c&&(0,M.jsx)(JF,{"aria-hidden":`true`}),c?`Saving…`:`Save`]}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{s(e.text??``),d(void 0),a(`view`)},children:`Cancel`})]})]}):e.held?(0,M.jsx)(`p`,{className:`text-muted-foreground italic`,children:`Hidden until you answer the check in that session.`}):(0,M.jsx)(`p`,{children:e.text}),i!==`edit`&&(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 border-t pt-2.5`,children:[(0,M.jsxs)(`div`,{className:`text-muted-foreground flex min-w-0 flex-wrap items-center gap-2 text-[0.8125rem]`,children:[!e.held&&(0,M.jsxs)(`span`,{className:`flex max-w-full min-w-0 items-center gap-1.5`,title:e.source?`${e.source.importName}: ${e.source.path}`:void 0,children:[(0,M.jsx)(Sse,{memory:e}),(0,M.jsx)(`span`,{className:`truncate`,children:xse(e)})]}),e.editedAt&&(0,M.jsx)(t8,{variant:`outline`,children:(0,M.jsx)(J7,{value:e.editedAt,prefix:`Edited `,className:`text-inherit`})})]}),i===`confirm-delete`?(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:`Delete permanently?`}),(0,M.jsx)(N,{type:`button`,variant:`destructive`,size:`sm`,disabled:c,onClick:()=>void p(),children:`Yes, delete`}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(`view`),children:`Keep`})]}):(0,M.jsxs)(`div`,{className:`flex gap-1.5`,children:[!e.held&&(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,className:$7,onClick:()=>{s(e.text??``),a(`edit`)},children:`Edit`}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,className:$7,onClick:()=>a(`confirm-delete`),children:`Delete`})]})]}),u&&i!==`edit`&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:u})]})}function e9({...e}){return(0,M.jsx)(Eo,{"data-slot":`alert-dialog`,...e})}function Ase({...e}){return(0,M.jsx)(Do,{"data-slot":`alert-dialog-trigger`,...e})}function jse({...e}){return(0,M.jsx)(Oo,{"data-slot":`alert-dialog-portal`,...e})}function Mse({className:e,...t}){return(0,M.jsx)(ko,{"data-slot":`alert-dialog-overlay`,className:j(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function t9({className:e,size:t=`default`,...n}){return(0,M.jsxs)(jse,{children:[(0,M.jsx)(Mse,{}),(0,M.jsx)(Mo,{"data-slot":`alert-dialog-content`,"data-size":t,className:j(`group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg`,e),...n})]})}function n9({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:j(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function r9({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:j(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function i9({className:e,...t}){return(0,M.jsx)(No,{"data-slot":`alert-dialog-title`,className:j(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function a9({className:e,...t}){return(0,M.jsx)(Po,{"data-slot":`alert-dialog-description`,className:j(`text-sm text-muted-foreground`,e),...t})}function o9({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,M.jsx)(N,{variant:t,size:n,asChild:!0,children:(0,M.jsx)(Fo,{"data-slot":`alert-dialog-action`,className:j(e),...r})})}function s9({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,M.jsx)(N,{variant:t,size:n,asChild:!0,children:(0,M.jsx)(Lo,{"data-slot":`alert-dialog-cancel`,className:j(e),...r})})}function Nse({...e}){return(0,M.jsx)(pp,{"data-slot":`select`,...e})}function Pse({...e}){return(0,M.jsx)(_p,{"data-slot":`select-value`,...e})}function Fse({className:e,size:t=`default`,children:n,...r}){return(0,M.jsxs)(hp,{"data-slot":`select-trigger`,"data-size":t,className:j(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,M.jsx)(vp,{asChild:!0,children:(0,M.jsx)(Dh,{className:`size-4 opacity-50`})})]})}function Ise({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,M.jsx)(xp,{children:(0,M.jsxs)(Cp,{"data-slot":`select-content`,className:j(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,M.jsx)(Rse,{}),(0,M.jsx)(Fp,{className:j(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,M.jsx)(zse,{})]})})}function Lse({className:e,children:t,...n}){return(0,M.jsxs)(Bp,{"data-slot":`select-item`,className:j(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,M.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,M.jsx)(Wp,{children:(0,M.jsx)(Th,{className:`size-4`})})}),(0,M.jsx)(Hp,{children:t})]})}function Rse({className:e,...t}){return(0,M.jsx)(Kp,{"data-slot":`select-scroll-up-button`,className:j(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,M.jsx)(Nh,{className:`size-4`})})}function zse({className:e,...t}){return(0,M.jsx)(Jp,{"data-slot":`select-scroll-down-button`,className:j(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,M.jsx)(Dh,{className:`size-4`})})}var c9=220,Bse=70,Vse=4e4,l9=40,u9=14;function Hse(e=1){let t=e;return()=>(t=(t*1664525+1013904223)%4294967296,t/4294967296)}function Use(e,t){return e===`note`?5+Math.min(7,Math.sqrt(t)*1.4):e===`ghost`?4:5+Math.min(5,Math.sqrt(t))}function Wse(e){let t=new Map(e.nodes.map((e,t)=>[e.id,t])),n=e.edges.flatMap(({from:e,to:n})=>{let r=t.get(e),i=t.get(n);return r===void 0||i===void 0||r===i?[]:[[r,i]]}),r=e.nodes.map(()=>0);for(let[e,t]of n)r[e]++,r[t]++;let i=e.nodes.map((e,t)=>({index:t,radius:Use(e.kind,r[t])}));if(i.length>0){let e=Math.min(1,60/i.length),t=Math.round(Math.min(c9,Math.max(Bse,Vse/i.length))),r=Math.round(t*.65);w3(i).stop().randomSource(Hse()).alphaDecay(1-.001**(1/t)).force(`link`,U4(n.map(([e,t])=>({source:e,target:t}))).id(e=>e.index).distance(e=>26+e.source.radius+e.target.radius)).force(`charge`,T3().strength(-90-120*e).theta(.9).distanceMax(250)).force(`x`,E3().strength(.06)).force(`y`,D3().strength(.06)).tick(r).force(`collide`,B4(e=>e.radius+u9).iterations(1)).tick(t-r)}let a=i.length>0?i.map(e=>e.x):[0],o=i.length>0?i.map(e=>e.y):[0],s=Math.min(...a)-l9,c=Math.min(...o)-l9,l=Math.max(...a)+l9-s,u=Math.max(...o)+l9+u9-c;return{width:Math.max(l,200),height:Math.max(u,160),nodes:i.map((t,n)=>({id:e.nodes[n].id,x:t.x-s,y:t.y-c,radius:t.radius})),edges:n}}var d9=`__all`,f9={mode:`auto`,depth:2},p9=`__concepts`,m9=1.25,h9=.1,g9=3,Gse=1.6,Kse=150,qse=14,_9=200,v9=(e,t,n=`${t}s`)=>`${e.toLocaleString(`en`)} ${e===1?t:n}`,y9=e=>Math.min(g9,Math.max(h9,e));function Jse(e,t){let n=v9(t,`connection`);switch(e.kind){case`note`:return`${e.label}, note in ${e.path}, ${n}`;case`tag`:return`${e.label}, tag on ${v9(e.notes??0,`note`)}`;case`concept`:{let t=e.mastery?`, ${h7[e.mastery.status].toLowerCase()} in your record`:``;return(e.notes??0)>0?`${e.label}, concept from ${v9(e.notes,`note`)}${t}`:`${e.label}, concept, ${n}${t}`}case`ghost`:return`${e.label}, unresolved link, no such note`}}var b9,Yse=0;function Xse(e){let[t,n]=(0,v.useState)();return(0,v.useEffect)(()=>{if(!e)return;let t=()=>n({view:e,layout:Wse(e)});if(typeof Worker>`u`)return t();let r;try{r=b9??=new Worker(new URL(`/assets/notes-graph.worker-Dqb5HK34.js`,``+import.meta.url),{type:`module`,name:`mivra-graph-layout`})}catch{return t()}let i=++Yse,a=!1,o=()=>{a=!0,r.removeEventListener(`message`,s),r.removeEventListener(`error`,c)},s=t=>{t.data.id===i&&(o(),n({view:e,layout:t.data.layout}))},c=()=>{o(),r.terminate(),b9===r&&(b9=void 0),t()};return r.addEventListener(`message`,s),r.addEventListener(`error`,c),r.postMessage({id:i,view:{nodes:e.nodes,edges:e.edges}}),()=>{a||(o(),r.terminate(),b9===r&&(b9=void 0))}},[e]),{drawn:t,pending:!!(e&&t?.view!==e)}}function Zse({importId:e=p9,onScopeChange:t}){let[n,r]=(0,v.useState)(e),[i,a]=(0,v.useState)(f9),[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)(e);e!==c&&(l(e),e!==n&&(r(e),a(f9),s(void 0)));let[u,d]=(0,v.useState)([]);(0,v.useEffect)(()=>{tN().then(e=>e.ok&&d(e.value))},[]);let f=n===p9,[p,m]=(0,v.useState)(0),[h,g]=(0,v.useState)({loading:!0});(0,v.useEffect)(()=>{let e=!1;return g(e=>({...e,loading:!0,error:void 0})),(f?oN({mode:i.mode,focus:i.focus,depth:i.depth}):aN(n,i)).then(t=>{e||g(t.ok?{view:t.value,loading:!1}:{error:t.error,loading:!1})}),()=>{e=!0}},[n,f,i,p]);let _=h.view,y=Xse(_),[b,x]=(0,v.useState)();(0,v.useEffect)(()=>{_&&s(e=>e&&_.nodes.some(t=>t.id===e)?e:_.focus??void 0)},[_]);let S=e=>{r(e),t?.(e),a(f9),s(void 0)},C=e=>{s(e),a(t=>({...t,focus:e,mode:_&&_.matchingNotes>500?`local`:t.mode}))},w=e=>{s(e),a(t=>({...t,focus:e,mode:O?`local`:t.mode}))},T=e=>{s(e.id),e.kind===`note`&&x(e.id)},E=f?`All concepts`:u.find(e=>e.id===n)?.name,D=f?_?.totalConcepts??_?.nodes.length??0:_?.matchingNotes??0,O=!!(_&&D>500),k=o?_?.nodes.find(e=>e.id===o):void 0,ee=[{value:p9,text:`All concepts`},...u.length>0?u.map(e=>({value:e.id,text:e.name})):f?[]:[{value:n,text:`This import`}]];return(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,"data-testid":`notes-graph`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2 border-b p-3`,role:`toolbar`,"aria-label":`Graph filters`,children:[(0,M.jsx)(S9,{label:f?`Graph`:`Import`,value:n,onChange:S,options:ee}),!f&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(S9,{label:`Tag`,value:i.tag??d9,onChange:e=>a(t=>({...t,tag:e===d9?void 0:e})),options:[{value:d9,text:`All tags`},...x9(_?.tags.map(e=>({value:e.name,text:`#${e.name} (${e.notes})`}))??[],i.tag,e=>`#${e}`)]}),(0,M.jsx)(S9,{label:`Folder`,value:i.folder??d9,onChange:e=>a(t=>({...t,folder:e===d9?void 0:e})),options:[{value:d9,text:`All folders`},...x9(_?.folders.map(e=>({value:e.path,text:`${e.path} (${e.notes})`}))??[],i.folder,e=>e)]})]}),(0,M.jsx)(S9,{label:`Show`,value:i.mode===`local`||O?`local`:`auto`,onChange:e=>a(t=>({...t,mode:e,...e===`local`&&o&&(f||k?.kind===`note`)?{focus:o}:{}})),options:[{value:`auto`,text:O?`Whole graph (over 500 ${f?`concepts`:`notes`})`:`Whole graph`,disabled:O},{value:`local`,text:f?`Around the selected concept`:`Around the selected note`}]}),(i.mode===`local`||O)&&(0,M.jsx)(S9,{label:`Reach`,value:String(i.depth),onChange:e=>a(t=>({...t,depth:Number(e)})),options:[1,2,3].map(e=>({value:String(e),text:v9(e,`hop`)}))}),f?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)($se,{onPick:e=>w(`concept:${e.id}`)}),k&&k.id!==_?.focus&&(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(e=>({...e,mode:`local`,focus:k.id})),children:[`Centre on `,k.label]})]}):(0,M.jsx)(ece,{importId:n,onPick:e=>C(e.id)})]}),(0,M.jsx)(tce,{view:_,loading:h.loading||y.pending,error:h.error,importName:E,isGlobal:f}),f&&_&&k?.kind===`concept`&&(0,M.jsx)(Qse,{view:_,concept:k,onChanged:e=>{e&&s(void 0),m(e=>e+1)}},k.id),!y.drawn&&!h.error&&(h.loading||y.pending)&&(0,M.jsxs)(`div`,{"aria-hidden":!0,className:`text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm`,children:[(0,M.jsx)(JF,{}),`Drawing the graph…`]}),y.drawn&&(0,M.jsx)(ace,{view:y.drawn.view,layout:y.drawn.layout,selected:o,onSelect:s,onActivate:T}),(0,M.jsx)(sce,{noteId:b,onOpenChange:e=>!e&&x(void 0),onCentre:e=>{x(void 0),a(t=>({...t,mode:`local`,focus:e})),s(e)}})]})}function Qse({view:e,concept:t,onChanged:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(),[s,c]=(0,v.useState)(!1),l=(0,v.useMemo)(()=>new Map(e.nodes.map(e=>[e.id,e.label])),[e]),u=e.edges.filter(e=>e.fromSessions&&(e.from===t.id||e.to===t.id)),d=t.notes??0,f=async()=>{i(!0),o(void 0);let e=await cN(t.id);if(i(!1),!e.ok)return o(e.error);c(!1),n(e.value.deleted)},p=async e=>{if(e.kind!==`prerequisite`&&e.kind!==`related`)return;i(!0),o(void 0);let t=await lN({from:e.from,to:e.to,kind:e.kind});if(i(!1),!t.ok)return o(t.error);n(!1)},m=e=>{let t=l.get(e.from)??`?`,n=l.get(e.to)??`?`;return e.kind===`prerequisite`?`${t} comes before ${n}`:`${t} relates to ${n}`};return(0,M.jsxs)(`section`,{"aria-label":`Concept ${t.label}`,className:`flex flex-col gap-2 border-b px-3 py-2 text-sm`,"data-testid":`concept-inspector`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`font-medium wrap-anywhere`,children:t.label}),(0,M.jsx)(`span`,{className:`text-muted-foreground`,children:[d>0?`from ${v9(d,`note`)}`:void 0,t.fromSessions?`recorded in tutoring sessions`:void 0].filter(Boolean).join(` · `)||`linked by your notes`}),t.mastery?(0,M.jsxs)(`span`,{className:`flex items-center gap-1.5`,"data-testid":`concept-mastery`,children:[(0,M.jsx)(_7,{status:t.mastery.status}),(0,M.jsx)(`span`,{className:`text-muted-foreground text-[0.8125rem]`,children:y7(t.mastery)})]}):(0,M.jsx)(`span`,{className:`text-muted-foreground text-[0.8125rem]`,"data-testid":`concept-mastery`,children:`Not answered on yet`}),t.fromSessions&&(0,M.jsxs)(e9,{open:s,onOpenChange:e=>{r||(o(void 0),c(e))},children:[(0,M.jsx)(Ase,{asChild:!0,children:(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,className:`text-destructive ml-auto`,disabled:r,children:[(0,M.jsx)(q_,{}),`Remove from sessions`]})}),(0,M.jsxs)(t9,{children:[(0,M.jsxs)(n9,{children:[(0,M.jsxs)(i9,{className:`font-heading wrap-anywhere`,children:[`Remove “`,t.label,`” from your sessions?`]}),(0,M.jsx)(a9,{children:d>0?`This deletes every link tutoring sessions recorded for this concept. The concept stays, because your imported notes cover it.`:`This deletes the concept and every link tutoring sessions recorded for it. It can't be undone.`})]}),a&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:a}),(0,M.jsxs)(r9,{children:[(0,M.jsx)(s9,{disabled:r,children:`Cancel`}),(0,M.jsxs)(o9,{variant:`destructive`,disabled:r,onClick:e=>{e.preventDefault(),f()},children:[r&&(0,M.jsx)(JF,{}),`Remove`]})]})]})]})]}),u.length>0&&(0,M.jsx)(`ul`,{className:`flex flex-wrap gap-1.5`,"aria-label":`Links recorded in tutoring sessions`,children:u.map(e=>(0,M.jsx)(`li`,{children:(0,M.jsxs)(t8,{variant:`secondary`,className:`gap-1 pr-0.5`,children:[(0,M.jsx)(`span`,{className:`wrap-anywhere`,children:m(e)}),(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`hover:text-destructive size-5`,"aria-label":`Delete link: ${m(e)}`,disabled:r,onClick:()=>void p(e),children:(0,M.jsx)(ev,{})})]})},`${e.from}|${e.to}|${e.kind}`))}),a&&!s&&(0,M.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:a})]})}function x9(e,t,n){return t&&!e.some(e=>e.value===t)?[{value:t,text:n(t)},...e]:e}function S9({label:e,value:t,onChange:n,options:r}){let i=(0,v.useId)();return(0,M.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,M.jsx)(`span`,{id:i,className:`text-muted-foreground text-xs`,children:e}),(0,M.jsxs)(Nse,{value:t,onValueChange:n,children:[(0,M.jsx)(Fse,{size:`sm`,"aria-labelledby":i,className:`max-w-56`,children:(0,M.jsx)(Pse,{})}),(0,M.jsx)(Ise,{position:`popper`,className:`max-h-80`,children:r.map(e=>(0,M.jsx)(Lse,{value:e.value,disabled:e.disabled,children:e.text},e.value))})]})]})}function $se({onPick:e}){let[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)([]);return(0,v.useEffect)(()=>{let e=r.trim();if(!e)return o([]);let t=!1,n=setTimeout(()=>{sN(e).then(e=>{!t&&e.ok&&o(e.value)})},_9);return()=>{t=!0,clearTimeout(n)}},[r]),(0,M.jsxs)(GF,{open:t,onOpenChange:n,children:[(0,M.jsx)(KF,{asChild:!0,children:(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,children:[(0,M.jsx)(D_,{}),`Find a concept`]})}),(0,M.jsx)(qF,{className:`w-80 p-0`,align:`start`,children:(0,M.jsxs)(E5,{shouldFilter:!1,label:`Find a concept by name`,children:[(0,M.jsx)(D5,{placeholder:`Concept name`,value:r,onValueChange:i,"aria-label":`Find a concept by name`}),(0,M.jsxs)(O5,{children:[r.trim()&&(0,M.jsx)(k5,{children:`No concept matches.`}),a.map(t=>(0,M.jsx)(A5,{value:t.id,onSelect:()=>{n(!1),i(``),e(t)},children:(0,M.jsx)(`span`,{className:`truncate`,children:t.name})},t.id))]})]})})]})}function ece({importId:e,onPick:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)([]);return(0,v.useEffect)(()=>{let t=i.trim();if(!t)return s([]);let n=!1,r=setTimeout(()=>{uN(e,t).then(e=>{!n&&e.ok&&s(e.value)})},_9);return()=>{n=!0,clearTimeout(r)}},[e,i]),(0,M.jsxs)(GF,{open:n,onOpenChange:r,children:[(0,M.jsx)(KF,{asChild:!0,children:(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,children:[(0,M.jsx)(D_,{}),`Find a note`]})}),(0,M.jsx)(qF,{className:`w-80 p-0`,align:`start`,children:(0,M.jsxs)(E5,{shouldFilter:!1,children:[(0,M.jsx)(D5,{placeholder:`Title or path`,value:i,onValueChange:a,"aria-label":`Find a note by title or path`}),(0,M.jsxs)(O5,{children:[i.trim()&&(0,M.jsx)(k5,{children:`No note matches.`}),o.map(e=>(0,M.jsx)(A5,{value:e.id,onSelect:()=>{r(!1),a(``),t(e)},children:(0,M.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,M.jsx)(`span`,{className:`truncate`,children:e.title}),(0,M.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.path})]})},e.id))]})]})})]})}function tce({view:e,loading:t,error:n,importName:r,isGlobal:i}){let a=``;if(e){if(i){let t=e.totalConcepts??e.nodes.length,n=e.nodes.find(t=>t.id===e.focus);a=t===0?`No concepts yet. Chat with Mivra or import a vault to build your concept graph.`:`${e.mode===`whole`?`Whole concept graph`:`Around ${n?.label??`the best-connected concept`}, within ${v9(e.depth,`hop`)}`}: ${`${v9(e.nodes.length,`concept`)}, ${v9(e.edges.length,`connection`)}`}${e.mode===`local`||e.nodes.length!==t?`, of ${v9(t,`concept`)}`:``}.${e.truncated?` Only the nearest are drawn; select a concept to explore further.`:``}`}else{let t=t=>e.nodes.filter(e=>e.kind===t).length,n=[v9(t(`note`),`note`),v9(t(`tag`),`tag`),v9(t(`concept`),`concept`),v9(t(`ghost`),`unresolved link`)],r=e.nodes.find(t=>t.id===e.focus),i=e.mode===`whole`?`Whole graph`:`Around ${r?.label??`the best-connected note`}, within ${v9(e.depth,`hop`)}`,o=e.matchingNotes===e.totalNotes?v9(e.totalNotes,`note`):`${v9(e.matchingNotes,`matching note`)} (${v9(e.totalNotes,`note`)} in all)`;a=`${i}: ${n.join(`, `)}, of ${o}.${e.truncated?` Only the nearest are drawn; filter or centre on a note to see others.`:``}`,e.matchingNotes===0&&(a=e.totalNotes===0?`This import has no notes.`:`No note matches these filters.`)}}return(0,M.jsxs)(`div`,{className:`flex min-h-9 items-center gap-2 border-b px-3 py-1.5 text-sm`,children:[r&&(0,M.jsxs)(`span`,{className:`sr-only`,children:[r,`.`]}),(0,M.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:j(`min-w-0 flex-1`,n?`text-destructive`:`text-muted-foreground`),"data-testid":`notes-graph-status`,children:n??a}),t&&(0,M.jsx)(JF,{"aria-label":`Loading the graph`}),(0,M.jsx)(rce,{isGlobal:i})]})}var nce=[`strength`,`focus`,`practicing`,`unsure`];function rce({isGlobal:e}){return(0,M.jsxs)(`ul`,{className:`text-muted-foreground hidden shrink-0 items-center gap-3 text-xs sm:flex`,"aria-hidden":`true`,children:[(e?[[`concept`,`Concept`]]:[[`note`,`Note`],[`concept`,`Concept`],[`tag`,`Tag`],[`ghost`,`Unresolved`]]).map(([e,t])=>(0,M.jsxs)(`li`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(`svg`,{viewBox:`-7 -7 14 14`,className:`size-3.5 overflow-visible`,children:(0,M.jsx)(w9,{kind:e,radius:5,emphasis:!1})}),t]},e)),nce.map(e=>(0,M.jsxs)(`li`,{className:`flex items-center gap-1`,"data-testid":`legend-mastery`,children:[(0,M.jsx)(`svg`,{viewBox:`-4 -4 8 8`,className:`size-2.5 overflow-visible`,children:(0,M.jsx)(C9,{status:e,radius:3})}),h7[e]]},e))]})}function C9({status:e,radius:t}){return(0,M.jsx)(`circle`,{r:t,className:j(`stroke-[1.5]`,poe[e]),"data-mastery":e})}function w9({kind:e,radius:t,emphasis:n,mastery:r}){if(e===`concept`&&r){let i=Math.max(2.5,t*.5);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(w9,{kind:e,radius:t,emphasis:n}),(0,M.jsx)(`g`,{transform:`translate(${t*.95} ${-t*.95})`,children:(0,M.jsx)(C9,{status:r,radius:i})})]})}switch(e){case`note`:return(0,M.jsx)(`circle`,{r:t,className:n?`fill-foreground`:`fill-muted-foreground`});case`concept`:return(0,M.jsx)(`polygon`,{points:`0,${-t*1.2} ${t*1.2},0 0,${t*1.2} ${-t*1.2},0`,className:j(`stroke-foreground stroke-[1.5]`,n?`fill-foreground`:`fill-card`)});case`tag`:return(0,M.jsx)(`rect`,{x:-t,y:-t,width:t*2,height:t*2,rx:1.5,className:j(`stroke-muted-foreground stroke-[1.5]`,n?`fill-muted-foreground`:`fill-muted`)});case`ghost`:return(0,M.jsx)(`circle`,{r:t,className:j(`fill-card stroke-muted-foreground stroke-[1.5]`,n&&`stroke-foreground`),strokeDasharray:`2 2`})}}function ice(e,t,n){let[r,i]={ArrowRight:[1,0],ArrowLeft:[-1,0],ArrowDown:[0,1],ArrowUp:[0,-1]}[n]??[0,0];if(r===0&&i===0)return;let a=e.nodes[t],o,s=1/0;return e.nodes.forEach((e,n)=>{let c=e.x-a.x,l=e.y-a.y,u=c*r+l*i;if(n===t||u<=0)return;let d=u+Math.abs(c*i-l*r)*2;d<s&&(s=d,o=n)}),o}function ace({view:e,layout:t,selected:n,onSelect:r,onActivate:i}){let a=(0,v.useMemo)(()=>new Map(e.nodes.map((e,t)=>[e.id,t])),[e]),o=(0,v.useMemo)(()=>{let n=e.nodes.map(()=>new Set);for(let[e,r]of t.edges)n[e].add(r),n[r].add(e);return n},[e,t]),s=(0,v.useRef)(null),[c,l]=(0,v.useState)(1),u=()=>{let e=s.current;return!e||e.clientWidth===0?1:y9(Math.min(Gse,e.clientWidth/t.width,e.clientHeight/t.height))},d=n===void 0?void 0:a.get(n),f=(e,n)=>{let r=s.current;if(!r)return;let i=e===void 0?void 0:t.nodes[e];r.scrollLeft=i?i.x*n-r.clientWidth/2:(t.width*n-r.clientWidth)/2,r.scrollTop=i?i.y*n-r.clientHeight/2:(t.height*n-r.clientHeight)/2};(0,v.useLayoutEffect)(()=>{let t=u();l(t),requestAnimationFrame(()=>f(e.focus?a.get(e.focus):void 0,t))},[t]);let p=e=>{let t=y9(e);l(t),requestAnimationFrame(()=>f(d,t))},[m,h]=(0,v.useState)(),g=m!==void 0&&m<e.nodes.length?m:d??0;(0,v.useEffect)(()=>h(void 0),[e]);let _=(0,v.useRef)(new Map),y=e=>{h(e);let t=_.current.get(e);t?.focus({preventScroll:!0}),t?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},b=(i,o)=>{if(i.key===`Escape`){n!==void 0&&(i.stopPropagation(),r(void 0));return}if(i.key===`Home`){i.preventDefault(),y(e.focus?a.get(e.focus)??0:0);return}let s=ice(t,o,i.key);i.key.startsWith(`Arrow`)&&i.preventDefault(),s!==void 0&&y(s)},x=(0,v.useRef)(void 0),S=e=>{let t=s.current;t&&e.button===0&&!e.target.closest(`button`)&&(x.current={x:e.clientX,y:e.clientY,left:t.scrollLeft,top:t.scrollTop},e.currentTarget.setPointerCapture?.(e.pointerId))},C=e=>{let t=s.current;t&&x.current&&(t.scrollLeft=x.current.left-(e.clientX-x.current.x),t.scrollTop=x.current.top-(e.clientY-x.current.y))},w=()=>x.current=void 0,[T,E]=(0,v.useState)(),D=new Set;for(let e of[d,T,m])if(e!==void 0&&(D.add(e),e===d))for(let t of o[e]??[])D.add(t);let O=e.nodes.length<=Kse||c>=1.5,k=d!==void 0,ee=e=>Math.max(qse,e*2*c),te=(0,v.useId)(),ne=e.nodes[g];return e.nodes.length===0?(0,M.jsx)(`div`,{className:`flex-1`}):(0,M.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,M.jsx)(`div`,{ref:s,className:`bg-background flex min-h-64 flex-1 cursor-grab overflow-auto active:cursor-grabbing`,onPointerDown:S,onPointerMove:C,onPointerUp:w,onPointerCancel:w,"data-testid":`notes-graph-scroll`,children:(0,M.jsxs)(`div`,{className:`relative m-auto shrink-0`,style:{width:t.width*c,height:t.height*c},"data-testid":`notes-graph-canvas`,"data-zoom":c.toFixed(3),children:[(0,M.jsxs)(`svg`,{viewBox:`0 0 ${t.width} ${t.height}`,className:`absolute inset-0 size-full`,"aria-hidden":`true`,children:[(0,M.jsx)(`defs`,{children:(0,M.jsx)(`marker`,{id:`${te}-arrow`,viewBox:`0 0 10 10`,refX:`10`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,M.jsx)(`path`,{d:`M 0 0 L 10 5 L 0 10 z`,className:`fill-muted-foreground`})})}),t.edges.map(([n,r],i)=>{let a=e.edges[i],o=t.nodes[n],s=t.nodes[r],c=d!==void 0&&(n===d||r===d),l=Math.hypot(s.x-o.x,s.y-o.y)||1,u=a.kind===`prerequisite`?s.radius+2:0;return(0,M.jsx)(`line`,{x1:o.x,y1:o.y,x2:s.x-(s.x-o.x)/l*u,y2:s.y-(s.y-o.y)/l*u,className:j(c?`stroke-foreground`:`stroke-muted-foreground`,k&&!c&&`opacity-25`),strokeOpacity:c?1:a.kind===`tag`||a.kind===`concept`?.45:.7,strokeWidth:c?1.6:1,strokeDasharray:a.kind===`tag`||a.kind===`concept`?`3 3`:void 0,markerEnd:a.kind===`prerequisite`?`url(#${te}-arrow)`:void 0,"data-testid":`notes-graph-edge`,"data-kind":a.kind},i)}),t.nodes.map((t,n)=>(0,M.jsxs)(`g`,{transform:`translate(${t.x} ${t.y})`,className:j(k&&!D.has(n)&&`opacity-35`),children:[(n===d||e.focus===t.id&&d===void 0)&&(0,M.jsx)(`circle`,{r:t.radius+4,className:`fill-none stroke-foreground stroke-[1.5]`}),(0,M.jsx)(w9,{kind:e.nodes[n].kind,radius:t.radius,emphasis:D.has(n),mastery:e.nodes[n].mastery?.status})]},t.id))]}),(0,M.jsx)(`div`,{className:`pointer-events-none absolute inset-0 text-[11px] leading-tight`,"aria-hidden":`true`,children:t.nodes.map((t,n)=>O||D.has(n)||e.focus===t.id?(0,M.jsx)(`span`,{className:j(`bg-background/80 absolute max-w-40 -translate-x-1/2 truncate rounded-sm px-0.5`,D.has(n)?`text-foreground font-medium`:`text-muted-foreground`,e.nodes[n].kind===`ghost`&&`italic`,k&&!D.has(n)&&`opacity-50`),style:{left:t.x*c,top:t.y*c+t.radius*c+2},"data-testid":`notes-graph-label`,children:e.nodes[n].label},t.id):null)}),(0,M.jsx)(`div`,{role:`group`,"aria-label":`Notes graph. Arrow keys move between nodes by where they're drawn; Enter opens a note.`,"aria-describedby":te,className:`absolute inset-0`,children:t.nodes.map((t,n)=>{let r=e.nodes[n],a=ee(t.radius);return(0,M.jsx)(`button`,{ref:e=>{e?_.current.set(n,e):_.current.delete(n)},type:`button`,tabIndex:n===g?0:-1,"aria-label":Jse(r,o[n].size),"aria-pressed":n===d,className:j(`focus-visible:ring-ring/60 absolute -translate-x-1/2 -translate-y-1/2 cursor-pointer rounded-full outline-none focus-visible:ring-[3px]`,n===d&&`z-10`),style:{left:t.x*c,top:t.y*c,width:a,height:a},onClick:()=>{h(n),i(r)},onFocus:()=>h(n),onKeyDown:e=>b(e,n),onPointerEnter:()=>E(n),onPointerLeave:()=>E(e=>e===n?void 0:e),"data-testid":`notes-graph-node`,"data-node":t.id,"data-kind":r.kind},t.id)})})]})}),(0,M.jsx)(`p`,{id:te,className:`sr-only`,"aria-live":`polite`,"data-testid":`notes-graph-neighbours`,children:ne&&m!==void 0?oce(e,o[g],ne):``}),(0,M.jsxs)(`div`,{className:`bg-card/90 absolute right-3 bottom-3 flex gap-1 rounded-md border p-1 shadow-xs`,role:`group`,"aria-label":`Zoom`,children:[(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Zoom out`,onClick:()=>p(c/m9),disabled:c<=h9,children:(0,M.jsx)(cee,{})}),(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Fit to the window`,onClick:()=>p(u()),children:(0,M.jsx)(oee,{})}),(0,M.jsx)(N,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Zoom in`,onClick:()=>p(c*m9),disabled:c>=g9,children:(0,M.jsx)(y_,{})})]})]})}function oce(e,t,n){let r=[...t].map(t=>e.nodes[t]).map(e=>e.kind===`ghost`?`${e.label} (unresolved)`:e.label),i=r.slice(0,12),a=r.length-i.length;return r.length===0?`${n.label} connects to nothing drawn.`:`${n.label} connects to ${i.join(`, `)}${a>0?` and ${v9(a,`more`)}`:``}.`}function sce({noteId:e,onOpenChange:t,onCentre:n}){let[r,i]=(0,v.useState)();(0,v.useEffect)(()=>{if(!e)return;let t=!1;return i({id:e}),dN(e).then(n=>{t||i(n.ok?{id:e,view:n.value}:{id:e,error:n.error})}),()=>{t=!0}},[e]);let a=r?.view;return(0,M.jsx)(e7,{open:!!e,onOpenChange:t,children:(0,M.jsxs)(t7,{className:`w-full overflow-y-auto sm:max-w-xl`,"data-testid":`note-reader`,onCloseAutoFocus:e=>{let t=r&&document.querySelector(`[data-testid="notes-graph-node"][data-node="${CSS.escape(r.id)}"]`);t&&(e.preventDefault(),t.focus())},children:[(0,M.jsxs)(n7,{children:[(0,M.jsx)(r7,{className:`font-heading wrap-anywhere`,children:a?.title??`Note`}),(0,M.jsx)(i7,{className:`wrap-anywhere`,children:a?`${a.path} · read-only`:r?.error?`Couldn't open this note.`:`Loading…`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 pb-6`,children:[r?.error&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,children:r.error}),!a&&!r?.error&&(0,M.jsx)(JF,{"aria-label":`Loading the note`}),a&&(0,M.jsxs)(M.Fragment,{children:[(a.tags.length>0||a.aliases.length>0)&&(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[a.tags.map(e=>(0,M.jsxs)(t8,{variant:`secondary`,children:[`#`,e]},e)),a.aliases.length>0&&(0,M.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`Also called `,a.aliases.join(`, `)]})]}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,onClick:()=>n(a.id),children:`Show the graph around this note`}),(0,M.jsx)(`div`,{className:`text-sm leading-relaxed wrap-anywhere whitespace-pre-wrap`,"data-testid":`note-body`,children:a.body})]})]})]})})}function cce({custom:e,canEdit:t,onChange:n}){let[r,i]=(0,v.useState)(!1);return(0,M.jsxs)(`section`,{className:`flex flex-col gap-3`,"aria-labelledby":`custom-providers-heading`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`h2`,{id:`custom-providers-heading`,className:`text-sm font-semibold`,children:`OpenAI-compatible providers`}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Any service with an OpenAI-compatible Chat Completions API, such as a local server or another provider. Compatibility varies: test each model before relying on it.`})]}),e.map(e=>(0,M.jsx)(dce,{provider:e,canEdit:t,onChange:n},e.id)),t&&(r?(0,M.jsx)(uce,{onDone:()=>i(!1),onChange:n}):(0,M.jsx)(N,{type:`button`,variant:`outline`,className:`self-start`,onClick:()=>i(!0),children:`Add an OpenAI-compatible provider`}))]})}var T9=`The API base, including any version prefix, such as https://api.example.com/v1 or http://127.0.0.1:11434/v1. Not the full /chat/completions address.`,lce=e=>[...new Set(e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean))];function uce({onDone:e,onChange:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)();return(0,M.jsxs)(`form`,{onSubmit:async r=>{r.preventDefault(),d(!0),p(void 0);let a=await XN({name:n,baseUrl:i.trim()||null,...o.trim()?{key:o.trim()}:{},models:lce(c).map(e=>({id:e}))});if(!a.ok)return d(!1),p(a.error);t(a.value);let s=a.value.custom.at(-1);if(s?.baseUrl.value){let e=await $N(s.id);e.ok&&t(e.value)}d(!1),e()},className:`flex flex-col gap-3 rounded-lg border p-3`,"aria-label":`Add an OpenAI-compatible provider`,children:[(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{htmlFor:`custom-new-name`,children:`Provider name`}),(0,M.jsx)(e5,{id:`custom-new-name`,value:n,onChange:e=>r(e.target.value),disabled:u,autoComplete:`off`,placeholder:`DeepSeek`})]}),(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{htmlFor:`custom-new-url`,children:`API base URL`}),(0,M.jsx)(Z5,{id:`custom-new-url-help`,children:T9}),(0,M.jsx)(e5,{id:`custom-new-url`,"aria-describedby":`custom-new-url-help`,value:i,onChange:e=>a(e.target.value),disabled:u,autoComplete:`off`,spellCheck:!1,inputMode:`url`,placeholder:`https://api.example.com/v1`})]}),(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{htmlFor:`custom-new-key`,children:`API key`}),(0,M.jsx)(Z5,{id:`custom-new-key-help`,children:`Kept on this computer and never shown again. Leave it empty for a local server that needs none.`}),(0,M.jsx)(e5,{id:`custom-new-key`,"aria-describedby":`custom-new-key-help`,type:`password`,value:o,onChange:e=>s(e.target.value),disabled:u,autoComplete:`off`,spellCheck:!1,placeholder:`Paste your API key`})]}),(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{htmlFor:`custom-new-models`,children:`Model ids`}),(0,M.jsx)(Z5,{id:`custom-new-models-help`,children:`One per line, as the provider names them. You can also pick from its list after saving.`}),(0,M.jsx)(p2,{id:`custom-new-models`,"aria-describedby":`custom-new-models-help`,value:c,onChange:e=>l(e.target.value),disabled:u,spellCheck:!1,rows:2,placeholder:`model-id`})]}),f&&(0,M.jsx)(Q5,{children:f}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsxs)(N,{type:`submit`,disabled:u||!n.trim(),children:[u&&(0,M.jsx)(JF,{"aria-hidden":`true`}),`Save provider`]}),(0,M.jsx)(N,{type:`button`,variant:`ghost`,disabled:u,onClick:e,children:`Cancel`})]})]})}function dce({provider:e,canEdit:t,onChange:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(),p=`custom-${e.id}`,m=async(e,t)=>{u(e),c(!0),f(void 0);let r=await t();return c(!1),r.ok?(n(r.value),!0):(f({kind:`error`,text:r.error}),!1)},h=t=>m(`Saving models…`,()=>ZN(e.id,{models:t})),g=e.models.map(({id:e,contextLength:t,maxOutputTokens:n})=>({id:e,contextLength:t,maxOutputTokens:n})),_=e.baseUrl,y=_.value?`${_.value} · ${_.source===`env`?`from ${e.envNames.baseUrl}`:`saved`}`:`No API base URL. Set one here or with ${e.envNames.baseUrl}.`,b=e.key.source===`env`?`Key set by ${e.envNames.key}${e.key.hint?` · ends in ${e.key.hint}`:``}.`:e.key.source===`saved`?`Key saved${e.key.hint?` · ends in ${e.key.hint}`:``}.`:`No key.`;return(0,M.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-lg border p-3`,"aria-labelledby":`${p}-name`,children:[(0,M.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,M.jsx)(`h3`,{id:`${p}-name`,className:`text-sm font-semibold wrap-anywhere`,children:e.name}),(0,M.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Chat Completions`})]}),(0,M.jsxs)(`div`,{className:`text-muted-foreground flex flex-col gap-0.5 text-xs wrap-anywhere`,children:[(0,M.jsx)(`p`,{children:y}),_.error&&(0,M.jsx)(`p`,{className:`text-destructive`,children:_.error}),(0,M.jsx)(`p`,{children:b})]}),r?(0,M.jsx)(fce,{provider:e,onDone:()=>i(!1),onChange:n}):t&&(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsx)(N,{size:`sm`,variant:`outline`,disabled:s,onClick:()=>i(!0),children:`Edit`}),_.source===`saved`&&_.env&&(0,M.jsxs)(N,{size:`sm`,variant:`outline`,disabled:s,onClick:()=>void m(`Resetting the URL…`,()=>ZN(e.id,{baseUrl:null})),children:[`Use `,e.envNames.baseUrl]}),!a&&(0,M.jsx)(N,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:s,onClick:()=>o(!0),children:`Remove provider`})]}),a&&(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,M.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Remove `,e.name,` and its saved key? Replies it wrote stay in your sessions.`]}),(0,M.jsx)(N,{type:`button`,variant:`destructive`,size:`sm`,disabled:s,onClick:()=>void m(`Removing…`,()=>QN(e.id)).then(e=>e&&o(!1)),children:`Yes, remove`}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,disabled:s,onClick:()=>o(!1),children:`Keep`})]}),(0,M.jsx)(mce,{provider:e,canEdit:t,busy:s,onRemove:e=>void h(g.filter(t=>t.id!==e)),onChange:n}),t&&(0,M.jsx)(hce,{provider:e,busy:s,onAdd:e=>h([...g,e])}),(0,M.jsx)(gce,{provider:e,busy:s,onRefresh:()=>void m(`Loading the provider's models…`,()=>$N(e.id))}),s&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` `,l]}),d&&(0,M.jsx)(`p`,{className:d.kind===`ok`?`text-success text-sm`:`text-destructive text-sm`,role:d.kind===`error`?`alert`:void 0,children:d.text})]})}function fce({provider:e,onDone:t,onChange:n}){let[r,i]=(0,v.useState)(e.name),[a,o]=(0,v.useState)(e.baseUrl.source===`saved`?e.baseUrl.value??``:``),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(),p=`custom-${e.id}-edit`,m=e.key.source===`env`,h=async r=>{u(!0),f(void 0);let i=await ZN(e.id,r);if(u(!1),!i.ok)return f(i.error);n(i.value),t()};return(0,M.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),h({name:r,baseUrl:a.trim()||null,...s.trim()?{key:s.trim()}:{}})},className:`flex flex-col gap-3`,"aria-label":`Edit ${e.name}`,children:[(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{htmlFor:`${p}-name`,children:`Provider name`}),(0,M.jsx)(e5,{id:`${p}-name`,value:r,onChange:e=>i(e.target.value),disabled:l,autoComplete:`off`})]}),(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{htmlFor:`${p}-url`,children:`API base URL`}),(0,M.jsxs)(Z5,{id:`${p}-url-help`,children:[T9,e.baseUrl.env?` Leave it empty to use ${e.envNames.baseUrl} (${e.baseUrl.env}).`:``,` A new URL or key clears earlier test results.`]}),(0,M.jsx)(e5,{id:`${p}-url`,"aria-describedby":`${p}-url-help`,value:a,onChange:e=>o(e.target.value),disabled:l,autoComplete:`off`,spellCheck:!1,inputMode:`url`,placeholder:e.baseUrl.env??`https://api.example.com/v1`})]}),!m&&(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{htmlFor:`${p}-key`,children:`New API key`}),(0,M.jsx)(Z5,{id:`${p}-key-help`,children:`Leave it empty to keep the current key.`}),(0,M.jsx)(e5,{id:`${p}-key`,"aria-describedby":`${p}-key-help`,type:`password`,value:s,onChange:e=>c(e.target.value),disabled:l,autoComplete:`off`,spellCheck:!1,placeholder:`Paste a new API key`})]}),d&&(0,M.jsx)(Q5,{children:d}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsxs)(N,{type:`submit`,size:`sm`,disabled:l||!r.trim(),children:[l&&(0,M.jsx)(JF,{"aria-hidden":`true`}),`Save`]}),!m&&e.key.source===`saved`&&(0,M.jsx)(N,{type:`button`,size:`sm`,variant:`outline`,disabled:l,onClick:()=>void h({key:null}),children:`Remove saved key`}),(0,M.jsx)(N,{type:`button`,size:`sm`,variant:`ghost`,disabled:l,onClick:t,children:`Cancel`})]})]})}var pce={unverified:{text:`Not tested`,className:``},verified:{text:`Works`,className:`text-success`},failed:{text:`Test failed`,className:`text-destructive`}};function mce({provider:e,canEdit:t,busy:n,onRemove:r,onChange:i}){let[a,o]=(0,v.useState)(),[s,c]=(0,v.useState)({}),l=(0,v.useRef)(void 0);if((0,v.useEffect)(()=>()=>l.current?.abort(),[]),e.models.length===0)return(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`No models yet. Add a model id`,e.baseUrl.value?` or pick one from the provider's list`:``,`.`]});let u=async t=>{let n=new AbortController;l.current=n,o(t),c(e=>({...e,[t]:void 0}));let r=await eP(e.id,t,n.signal);if(o(void 0),n.signal.aborted)return c(e=>({...e,[t]:{kind:`error`,text:`Test cancelled.`}}));if(!r.ok)return c(e=>({...e,[t]:{kind:`error`,text:r.error}}));i(r.value.providers),c(e=>({...e,[t]:{kind:r.value.result.ok?`ok`:`error`,text:r.value.result.message}}))};return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Test model sends a short request with a tool call, which may use a few tokens.`}),(0,M.jsx)(`ul`,{className:`flex flex-col gap-2`,"aria-label":`${e.name} models`,children:e.models.map(i=>{let o=pce[i.verification.status],c=s[i.id],d=[i.contextLength&&`${i.contextLength.toLocaleString()} context`,i.maxOutputTokens&&`${i.maxOutputTokens.toLocaleString()} max output`].filter(Boolean).join(` · `);return(0,M.jsxs)(`li`,{className:`flex flex-col gap-1 rounded-md border px-2 py-1.5 text-sm`,"aria-label":i.id,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`min-w-0 flex-1 font-mono text-xs wrap-anywhere`,children:i.id}),(0,M.jsx)(t8,{variant:`outline`,className:o.className,children:o.text})]}),d&&(0,M.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:d}),!c&&i.verification.status===`failed`&&i.verification.message&&(0,M.jsx)(`span`,{className:`text-destructive text-xs`,children:i.verification.message}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[a===i.id?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1.5 text-xs`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Testing `,i.id,`…`]}),(0,M.jsx)(N,{size:`xs`,variant:`outline`,onClick:()=>l.current?.abort(),children:`Cancel test`})]}):(0,M.jsx)(N,{size:`xs`,variant:`outline`,disabled:n||a!==void 0||!e.baseUrl.value,onClick:()=>void u(i.id),"aria-label":`Test model ${i.id}`,children:`Test model`}),t&&(0,M.jsx)(N,{size:`xs`,variant:`ghost`,className:`text-destructive`,disabled:n||a===i.id,onClick:()=>r(i.id),"aria-label":`Remove model ${i.id}`,children:`Remove`})]}),c&&(0,M.jsx)(`span`,{className:c.kind===`ok`?`text-success text-xs`:`text-destructive text-xs`,role:`status`,children:c.text})]},i.id)})})]})}function hce({provider:e,busy:t,onAdd:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(),d=`custom-${e.id}-add`,f=`${d}-suggestions`,p=new Set(e.models.map(e=>e.id)),m=e.discovery.ids.filter(e=>!p.has(e)),h=e=>e.trim()?Number(e.trim().replace(/[,_]/g,``)):null,g=e=>e===null||Number.isInteger(e)&&e>0;return(0,M.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault();let t=r.trim();if(t){if(u(void 0),!g(h(a))||!g(h(s)))return u(`Limits are whole numbers of tokens, such as 128000.`);await n({id:t,contextLength:h(a),maxOutputTokens:h(s)})&&(i(``),o(``),c(``))}},className:`flex flex-col gap-2`,"aria-label":`Add a model to ${e.name}`,children:[(0,M.jsxs)(Y5,{children:[(0,M.jsx)(X5,{htmlFor:d,children:`Add a model id`}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsx)(e5,{id:d,className:`min-w-0 flex-[1_1_10rem] font-mono`,list:m.length?f:void 0,value:r,onChange:e=>i(e.target.value),disabled:t,autoComplete:`off`,spellCheck:!1,placeholder:m[0]??`model-id`}),(0,M.jsx)(N,{type:`submit`,size:`sm`,variant:`outline`,disabled:t||!r.trim(),children:`Add`})]}),m.length>0&&(0,M.jsx)(`datalist`,{id:f,children:m.slice(0,500).map(e=>(0,M.jsx)(`option`,{value:e},e))})]}),l&&(0,M.jsx)(Q5,{children:l}),(0,M.jsxs)(`details`,{className:`text-sm`,children:[(0,M.jsx)(`summary`,{className:`text-muted-foreground cursor-pointer text-xs`,children:`Advanced: limits`}),(0,M.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2`,children:[(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Only if you know them. Mivra doesn't guess a model's limits; the output limit caps each reply.`}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsxs)(Y5,{className:`flex-[1_1_8rem]`,children:[(0,M.jsx)(X5,{htmlFor:`${d}-context`,children:`Context length`}),(0,M.jsx)(e5,{id:`${d}-context`,inputMode:`numeric`,value:a,onChange:e=>o(e.target.value),disabled:t,placeholder:`Unknown`})]}),(0,M.jsxs)(Y5,{className:`flex-[1_1_8rem]`,children:[(0,M.jsx)(X5,{htmlFor:`${d}-output`,children:`Max output tokens`}),(0,M.jsx)(e5,{id:`${d}-output`,inputMode:`numeric`,value:s,onChange:e=>c(e.target.value),disabled:t,placeholder:`Provider default`})]})]})]})]})]})}function gce({provider:e,busy:t,onRefresh:n}){let r=e.discovery,i=r.fetchedAt?new Date(r.fetchedAt).toLocaleString():void 0,a=r.state===`fresh`?`The provider lists ${r.ids.length} ${r.ids.length===1?`model`:`models`}. Type in the field above to pick one.`:r.state===`stale`?`Showing the list from ${i}: ${r.error}`:r.state===`failed`?r.error:`Load the provider's own list of models, or enter ids by hand.`;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,M.jsx)(`p`,{className:r.state===`failed`||r.state===`stale`?`text-destructive text-xs`:`text-muted-foreground text-xs`,children:a}),(0,M.jsx)(N,{type:`button`,size:`sm`,variant:`outline`,className:`self-start`,disabled:t||!e.baseUrl.value,onClick:n,children:`Refresh models`})]})}var _ce={openrouter:{env:`OPENROUTER_API_KEY`,keysUrl:`https://openrouter.ai/keys`,note:`One key reaches every model.`},anthropic:{env:`ANTHROPIC_API_KEY`,keysUrl:`https://console.anthropic.com/settings/keys`,note:`Claude models, directly.`},openai:{env:`OPENAI_API_KEY`,keysUrl:`https://platform.openai.com/api-keys`,note:`GPT models, directly.`}},E9=e=>e.providers.some(e=>e.source!==null)||!!e.chatgpt?.signedIn||e.custom.some(e=>e.baseUrl.value!==null);function vce({open:e,onOpenChange:t,firstRun:n=!1}){let[r,i]=(0,v.useState)(),[a,o]=(0,v.useState)();return(0,v.useEffect)(()=>{if(!e)return;let t=!1;return o(void 0),RN().then(e=>{t||(e.ok?i(e.value):o(e.error))}),()=>{t=!0}},[e]),(0,M.jsx)(e7,{open:e,onOpenChange:t,children:(0,M.jsxs)(t7,{className:`w-full overflow-y-auto sm:max-w-md`,onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-providers-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,M.jsxs)(n7,{children:[(0,M.jsx)(r7,{className:`font-heading`,children:`Model providers`}),(0,M.jsx)(i7,{children:n&&r&&!E9(r)?`Mivra needs a model provider before it can teach: sign in with ChatGPT, or add an API key from one of these providers. OpenRouter is the simplest key: one key reaches every model.`:`How Mivra reaches models. Keys and sign-ins stay on this computer, and keys are never shown again after you save them.`})]}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-4`,"aria-live":`polite`,children:[a&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:a}),!r&&!a&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading providers…`]}),r&&!r.canEdit&&(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`API keys can only be changed on the computer running Mivra. There, open this panel or run `,(0,M.jsx)(`code`,{children:`mivra auth set <provider>`}),`.`]}),r?.chatgpt&&(0,M.jsx)(xce,{chatgpt:r.chatgpt,canEdit:r.canEdit,onChange:i}),r?.providers.map(e=>(0,M.jsx)(yce,{provider:e,canEdit:r.canEdit,onChange:i},e.id)),r&&(0,M.jsx)(cce,{custom:r.custom,canEdit:r.canEdit,onChange:i})]})]})})}function yce({provider:e,canEdit:t,onChange:n}){let r=_ce[e.id],[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(),m=`provider-key-${e.id}`,h=async()=>{d(`Checking the key…`),l(!0),p(void 0);let t=await qN(e.id);if(l(!1),!t.ok)return p({kind:`error`,text:t.error});p(t.value.ok?{kind:`ok`,text:`The key works.`}:{kind:`error`,text:t.value.message??`The key didn't work.`})},g=async t=>{if(t.preventDefault(),!o.trim())return;d(`Saving the key…`),l(!0),p(void 0);let r=await zN(e.id,o);if(l(!1),!r.ok)return p({kind:`error`,text:r.error});s(``),a(!1),n(r.value),await h()},_=async()=>{d(`Removing the key…`),l(!0),p(void 0);let t=await BN(e.id);if(l(!1),!t.ok)return p({kind:`error`,text:t.error});n(t.value)},y=t&&e.source!==`env`&&(e.source===null||i),b=e.hint?` · ends in ${e.hint}`:``;return(0,M.jsxs)(`section`,{className:`flex flex-col gap-2 rounded-lg border p-3`,"aria-labelledby":`${m}-name`,children:[(0,M.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,M.jsx)(`h2`,{id:`${m}-name`,className:`text-sm font-semibold`,children:e.label}),(0,M.jsxs)(`a`,{href:r.keysUrl,target:`_blank`,rel:`noreferrer`,className:`text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-xs underline-offset-2 hover:underline`,children:[`Get a key `,(0,M.jsx)(xg,{className:`size-3`,"aria-hidden":!0})]})]}),(0,M.jsx)(`p`,{id:`${m}-source`,className:`text-muted-foreground text-xs`,children:e.source===`env`?`Set by ${r.env}${b}. Change it there.`:e.source===`saved`?`Saved${b}.`:`Not set. ${r.note}`}),y?(0,M.jsx)(`form`,{onSubmit:g,children:(0,M.jsxs)(Y5,{"data-invalid":f?.kind===`error`,children:[(0,M.jsxs)(X5,{htmlFor:m,children:[e.label,` API key`]}),(0,M.jsxs)(Z5,{id:`${m}-description`,children:[`Paste a key from your `,e.label,` account.`]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsx)(e5,{className:`min-w-0 flex-[1_1_10rem]`,"aria-describedby":`${m}-source ${m}-description${f?` ${m}-status`:``}`,"aria-invalid":f?.kind===`error`,id:m,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:`Paste your API key`,value:o,onChange:e=>s(e.target.value),disabled:c}),(0,M.jsx)(N,{type:`submit`,disabled:c||!o.trim(),children:c?`Saving…`:`Save`}),i&&(0,M.jsx)(N,{type:`button`,variant:`ghost`,disabled:c,onClick:()=>a(!1),children:`Cancel`})]}),f?.kind===`error`&&(0,M.jsx)(Q5,{id:`${m}-status`,children:f.text})]})}):e.source!==null&&(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsx)(N,{size:`sm`,variant:`outline`,disabled:c,onClick:()=>void h(),children:`Check`}),t&&e.source===`saved`&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(N,{size:`sm`,variant:`outline`,disabled:c,onClick:()=>a(!0),children:`Replace`}),(0,M.jsx)(N,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:c,onClick:()=>void _(),children:`Remove`})]})]}),c&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` `,u]}),f&&!(y&&f.kind===`error`)&&(0,M.jsx)(`p`,{id:`${m}-status`,className:f.kind===`ok`?`text-success text-sm`:`text-destructive text-sm`,children:f.text})]})}var bce=1500;function xce({chatgpt:e,canEdit:t,onChange:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(),p=`provider-chatgpt`,m=t;(0,v.useEffect)(()=>{if(!e.pending)return;let t=setInterval(()=>{RN().then(e=>{e.ok&&!e.value.chatgpt?.pending&&(n(e.value),f(void 0),window.dispatchEvent(new Event(IN)))})},bce);return()=>clearInterval(t)},[e.pending,n]);let h=async(e,t)=>{o(e),i(!0),c(void 0);let n=await t();return i(!1),n.ok||c({kind:`error`,text:n.error}),n.ok?n.value:void 0},g=async(e=!1)=>{let t=window.open(`about:blank`,`_blank`),r=await h(`Opening ChatGPT…`,()=>VN(e));if(!r){t?.close();return}t?(t.opener=null,t.location.href=r.url):f(r.url);let i=await RN();i.ok&&n(i.value)},_=async e=>{if(e.preventDefault(),!l.trim())return;let t=await h(`Finishing sign-in…`,()=>HN(l));t&&(u(``),f(void 0),n(t))},y=async()=>{let e=await h(`Cancelling…`,UN);f(void 0),e&&n(e)},b=async()=>{let e=await h(`Disconnecting…`,WN);e&&n(e)},x=async()=>{let e=await h(`Checking the connection…`,KN);e&&c(e.ok?{kind:`ok`,text:`The connection works.`}:{kind:`error`,text:e.message??`The connection didn't work.`})},S=e.signedIn?`Replies from ChatGPT models use your ChatGPT plan, not an API key.`:e.pending?`Finish connecting in your browser.`:e.previous&&e.notice?`Reconnect to renew your ChatGPT connection.`:`Complete eligible AI requests in this app with usage included in your ChatGPT plan or credits balance.`;return(0,M.jsxs)(`section`,{className:`flex flex-col gap-2 rounded-lg border p-3`,"aria-labelledby":`${p}-name`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,M.jsxs)(`h2`,{id:`${p}-name`,className:`inline-flex items-center gap-1.5 text-sm font-semibold`,children:[(0,M.jsx)(L8,{className:`size-4`}),`ChatGPT`]}),e.signedIn&&(0,M.jsx)(t8,{variant:`secondary`,children:`Connected`})]}),e.signedIn?(0,M.jsxs)(`p`,{className:`text-sm`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:e.name??`Connected with ChatGPT`}),e.email&&(0,M.jsx)(`span`,{className:`text-muted-foreground block text-xs`,children:e.email})]}):!e.pending&&(0,M.jsx)(`p`,{className:`text-sm font-medium`,children:e.previous&&e.notice?`Reconnect to ChatGPT`:`Use your ChatGPT plan`}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:S}),e.notice&&!e.pending&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:e.notice}),e.pending?(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Waiting for you to approve Mivra in the ChatGPT tab…`]}),d&&(0,M.jsx)(`a`,{href:d,target:`_blank`,rel:`noreferrer`,className:`text-sm underline underline-offset-2`,children:`Open the ChatGPT sign-in page`}),(0,M.jsx)(`form`,{onSubmit:_,children:(0,M.jsxs)(Y5,{"data-invalid":s?.kind===`error`,children:[(0,M.jsx)(X5,{htmlFor:`${p}-address`,children:m?`Browser showing an error page?`:`Paste the address from the ChatGPT tab`}),(0,M.jsx)(Z5,{id:`${p}-address-description`,children:m?`After approving, if the tab can't load, copy its whole address and paste it here.`:`This browser isn't on the computer running Mivra, so after you approve, the tab will show an error page. Copy its whole address and paste it here.`}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsx)(e5,{className:`min-w-0 flex-[1_1_10rem]`,id:`${p}-address`,"aria-describedby":`${p}-address-description${s?` ${p}-status`:``}`,"aria-invalid":s?.kind===`error`,autoComplete:`off`,spellCheck:!1,placeholder:`http://127.0.0.1:1455/auth/callback?code=…`,value:l,onChange:e=>u(e.target.value),disabled:r}),(0,M.jsx)(N,{type:`submit`,disabled:r||!l.trim(),children:`Finish`}),(0,M.jsx)(N,{type:`button`,variant:`ghost`,disabled:r,onClick:()=>void y(),children:`Cancel`})]}),s?.kind===`error`&&(0,M.jsx)(Q5,{id:`${p}-status`,children:s.text})]})})]}):e.signedIn?(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(W8,{primary:!0}),(0,M.jsx)(N,{size:`sm`,variant:`outline`,disabled:r,onClick:()=>void x(),children:`Check`}),(0,M.jsx)(N,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:r,onClick:()=>void b(),children:`Disconnect`})]}):(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,M.jsx)(sae,{busy:r,disabled:r,onClick:()=>void g()}),e.previous&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex flex-wrap items-center gap-x-2 text-xs`,children:[`Signs in as `,e.previous,`.`,(0,M.jsx)(N,{size:`xs`,variant:`link`,className:`h-auto p-0`,disabled:r,onClick:()=>void g(!0),children:`Use a different account`})]})]}),r&&(e.signedIn||e.pending)&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` `,a]}),s&&!(e.pending&&s.kind===`error`)&&(0,M.jsx)(`p`,{id:`${p}-status`,className:s.kind===`ok`?`text-success text-sm`:`text-destructive text-sm`,children:s.text})]})}var Sce=new Set([`localhost`,`127.0.0.1`,`[::1]`]);function D9({text:e,label:t,onFail:n}){let[r,i]=(0,v.useState)(!1);return(0,M.jsxs)(N,{type:`button`,variant:`outline`,size:`sm`,"aria-label":r?`Copied ${t}`:`Copy ${t}`,onClick:async()=>{try{await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)}catch{n?.()}},children:[r?(0,M.jsx)(Th,{"aria-hidden":`true`}):(0,M.jsx)(tg,{"aria-hidden":`true`}),r?`Copied`:`Copy`]})}function Cce(){let[e,t]=(0,v.useState)(!1),{origin:n,hostname:r}=window.location,i=`mivra link --server ${n}`;return(0,M.jsxs)(`section`,{"aria-labelledby":`settings-cli`,className:`flex flex-col gap-2 px-4 pb-4`,children:[(0,M.jsx)(`h3`,{id:`settings-cli`,className:`font-heading text-base font-medium`,children:`Connect a CLI`}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`To check a project course from another computer, install Mivra there and run this in a terminal. Paste the token when it asks; it's saved on that computer, never in your repository. The checks run on that computer.`}),(0,M.jsxs)(`div`,{className:`bg-sunken flex min-w-0 items-center gap-2 rounded-md py-1 pr-1 pl-3`,children:[(0,M.jsx)(`code`,{className:`min-w-0 flex-1 overflow-x-auto font-mono text-xs whitespace-pre`,"data-testid":`cli-link-command`,children:i}),(0,M.jsx)(D9,{text:i,label:`link command`})]}),Sce.has(r)&&(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Other computers can't reach this address. Use the one they reach Mivra by, such as its `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`tailscale serve`}),` `,`name.`]}),(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(e5,{readOnly:!0,"aria-label":`Token`,type:e?`text`:`password`,value:xM,className:`min-w-0 flex-1 font-mono text-xs`,onFocus:e=>e.currentTarget.select()}),(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,"aria-pressed":e,"aria-label":e?`Hide token`:`Show token`,onClick:()=>t(e=>!e),children:e?(0,M.jsx)(Cg,{"aria-hidden":`true`}):(0,M.jsx)(Tg,{"aria-hidden":`true`})}),(0,M.jsx)(D9,{text:xM,label:`token`,onFail:()=>t(!0)})]}),(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Anyone with the token can use this Mivra, so keep it private. On the computer running Mivra, `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra token`}),` prints it too, and `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check`}),` there needs no token.`]})]})}var wce={lesson:{title:`Lesson generation`,label:`Lesson model`,description:`Writes each lesson's outline and sections in the background.`}};function Tce({open:e,onOpenChange:t}){return(0,M.jsx)(e7,{open:e,onOpenChange:t,children:(0,M.jsxs)(t7,{className:`w-full overflow-y-auto sm:max-w-md`,onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-settings-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,M.jsxs)(n7,{children:[(0,M.jsx)(r7,{className:`font-heading`,children:`Settings`}),(0,M.jsx)(i7,{children:`Settings apply from the next reply or lesson; anything already being written keeps its model.`})]}),e&&(0,M.jsx)(Ece,{}),e&&(0,M.jsxs)(`section`,{"aria-labelledby":`settings-usage`,className:`flex flex-col gap-2 px-4 pb-4`,children:[(0,M.jsx)(`h3`,{id:`settings-usage`,className:`font-heading text-base font-medium`,children:`Usage`}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Tokens and costs of Mivra's model calls, custom prices and clearing the history are on the Usage page.`}),(0,M.jsx)(`div`,{children:(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>window.dispatchEvent(new Event(`mivra:open-usage`)),children:`Open Usage`})})]}),e&&(0,M.jsx)(Cce,{})]})})}function Ece(){let e=z5(),[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)();(0,v.useEffect)(()=>{let e=!1;return ON().then(t=>{e||(t.ok?n(t.value):i(t.error))}),()=>{e=!0}},[]);let a=(0,v.useCallback)(e=>n(t=>t?.map(t=>t.id===e.id?e:t)),[]);return(0,M.jsxs)(`section`,{"aria-labelledby":`settings-models`,className:`flex flex-col gap-4 px-4 pb-4`,children:[(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`h3`,{id:`settings-models`,className:`font-heading text-base font-medium`,children:`Models`}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`The picker under the message box sets the main model, which chat and new syllabuses always use. A task uses the main model too, and follows it when it changes, unless you choose one for it here.`})]}),r&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:r}),!t&&!r&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading…`]}),t?.map(t=>(0,M.jsx)(Dce,{task:t,picker:e,onChange:a},t.id))]})}function Dce({task:e,picker:t,onChange:n}){let{title:r,label:i,description:a}=wce[e.id],[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(),u=t.view,d=e=>R5(e.model,u?.models,u?.providers),f=async e=>{s(!0),l(void 0);let t=await e();s(!1),t.ok?n(t.value):l(t.error)};return(0,M.jsxs)(`div`,{role:`group`,"aria-labelledby":`task-${e.id}`,className:`flex flex-col gap-2 rounded-md border p-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,M.jsx)(`h4`,{id:`task-${e.id}`,className:`text-sm font-medium`,children:r}),(0,M.jsx)(t8,{variant:e.override?`default`:`secondary`,children:e.override?`Own model`:`Uses main model`})]}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:a}),e.override?(0,M.jsx)(`p`,{className:`text-sm`,children:`Always uses the model below, whatever the main model is.`}):(0,M.jsxs)(`p`,{className:`text-sm`,children:[`Follows the main model, now `,d(e.effective),`. Choose a model below to use another one for this task.`]}),e.unavailable&&(0,M.jsxs)(u2,{variant:`destructive`,children:[(0,M.jsxs)(d2,{children:[d(e.effective),` can't be used for this task`]}),(0,M.jsxs)(f2,{children:[(0,M.jsx)(`p`,{children:e.unavailable}),(0,M.jsx)(`p`,{children:`Choose another model, or use the main model. Until then, this task fails rather than switching models.`})]})]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(H5,{state:t,disabled:o,label:i,value:e.effective,unavailable:null,onChoose:t=>void f(()=>kN(e.id,t))}),e.override&&(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,disabled:o,onClick:()=>void f(()=>AN(e.id)),children:`Use main model`})]}),c&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:c})]})}var O9=[{id:`7`,label:`7 days`,days:7},{id:`30`,label:`30 days`,days:30},{id:`90`,label:`90 days`,days:90},{id:`all`,label:`All time`,days:null}],k9=new Intl.NumberFormat(void 0,{maximumFractionDigits:0}),Oce=new Intl.NumberFormat(void 0,{notation:`compact`,maximumFractionDigits:1}),A9=e=>e===null?`Unknown`:k9.format(e),j9=e=>e===null?`Unknown`:Oce.format(e);function M9(e){return e===0?`$0.00`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}var N9=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function P9(e){let t=[];return e.reportedCost!==null&&t.push(`${M9(e.reportedCost)} reported`),e.estimatedCost!==null&&t.push(`≈${M9(e.estimatedCost)} estimated`),e.unknownCost>0&&t.push(`${N9(e.unknownCost,`call`)} unknown`),t.length>0?t.join(` + `):`None`}function kce({open:e,onOpenChange:t}){return(0,M.jsx)(e7,{open:e,onOpenChange:t,children:(0,M.jsxs)(t7,{className:j(`w-full overflow-y-auto sm:max-w-2xl`,Zae),onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-usage-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,M.jsxs)(n7,{className:Qae,children:[(0,M.jsx)(r7,{className:$ae,children:`Usage`}),(0,M.jsx)(i7,{children:`Tokens and costs from the model calls Mivra makes, counted from when usage tracking started on this computer. It isn't your whole account's usage and doesn't show any remaining allowance.`})]}),e&&(0,M.jsx)(Ace,{})]})})}function Ace(){let[e,t]=(0,v.useState)(`30`),[n,r]=(0,v.useState)(),[i,a]=(0,v.useState)(),[o,s]=(0,v.useState)(0),c=(0,v.useCallback)(()=>s(e=>e+1),[]);return(0,v.useEffect)(()=>{let t=!1,n=O9.find(t=>t.id===e).days;return jN(n===null?null:new Date(Date.now()-n*24*60*60*1e3)).then(e=>{t||(e.ok?(r(e.value),a(void 0)):a(e.error))}),()=>{t=!0}},[e,o]),(0,M.jsxs)(`div`,{className:`flex flex-col gap-6 px-5 py-5`,children:[(0,M.jsx)(`div`,{role:`radiogroup`,"aria-label":`Date range`,className:l7,children:O9.map(n=>(0,M.jsx)(N,{type:`button`,size:`sm`,role:`radio`,"aria-checked":e===n.id,variant:`ghost`,className:u7(e===n.id),onClick:()=>t(n.id),children:n.label},n.id))}),i&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:i}),!n&&!i&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading…`]}),n&&(0,M.jsx)(jce,{view:n,onChanged:c})]})}function jce({view:e,onChanged:t}){let{totals:n,api:r,subscription:i}=e,a=n.calls===0;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e.since?`Counting since ${new Date(e.since).toLocaleString()}.`:`Nothing recorded yet. Usage is counted from the next model call.`}),!a&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`section`,{"aria-label":`Totals`,className:`grid gap-x-6 gap-y-4 sm:grid-cols-3`,children:[(0,M.jsxs)(F9,{label:`Tokens`,value:j9(n.total),children:[(0,M.jsxs)(`span`,{children:[A9(n.input),` in · `,A9(n.output),` out`]}),n.cacheRead!==null&&(0,M.jsxs)(`span`,{children:[`of input, `,A9(n.cacheRead),` cached`]}),n.reasoning!==null&&(0,M.jsxs)(`span`,{children:[`of output, `,A9(n.reasoning),` reasoning`]}),n.unreported>0&&(0,M.jsxs)(`span`,{children:[N9(n.unreported,`call`),` didn't report tokens`]})]}),(0,M.jsxs)(F9,{label:`API spending`,value:r.calls===0?`None`:Pce(r),children:[(0,M.jsx)(`span`,{children:N9(r.calls,`API call`)}),r.calls>0&&(0,M.jsx)(`span`,{children:P9(r)})]}),(0,M.jsxs)(F9,{label:`ChatGPT plan`,value:i.calls===0?`Not used`:j9(i.total),children:[i.calls>0&&(0,M.jsxs)(`span`,{children:[`tokens in `,N9(i.calls,`call`),`, billed to your plan`]}),(0,M.jsxs)(`span`,{children:[`Limits and plan usage: `,(0,M.jsx)(W8,{})]})]})]}),i.calls>0&&(0,M.jsx)(Fce,{totals:i}),(n.incomplete>0||n.unreported>0)&&(0,M.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[N9(n.incomplete,`call`),` failed or `,n.incomplete===1?`was`:`were`,` cancelled. Whatever tokens they reported are counted; calls that reported none are shown as unknown rather than free, since a provider may still bill them.`]}),(0,M.jsx)(Ice,{days:e.days}),(0,M.jsx)(I9,{title:`By model`,rows:e.byModel.map(e=>({key:e.key,name:e.label,detail:e.providerLabel,totals:e,billing:e.billing}))}),(0,M.jsx)(I9,{title:`By provider`,rows:e.byProvider.map(e=>({key:e.key,name:e.label,totals:e,billing:e.billing}))}),(0,M.jsx)(I9,{title:`By activity`,rows:e.byKind.map(e=>({key:e.key,name:e.label,detail:Mce[e.kind],totals:e}))}),(0,M.jsx)(I9,{title:`Recent runs`,note:`A run is one reply, continuation, lesson or test; each tool-call step is a separate call.`,rows:e.runs.map(e=>({key:e.key,name:e.session??`Model test`,detail:`${Nce[e.kind]} · ${e.label} · ${new Date(e.startedAt).toLocaleString()}${e.status===`completed`?``:` · ${e.status}`}`,totals:e,billing:e.billing}))}),(0,M.jsx)(I9,{title:`Sessions`,rows:e.sessions.map(e=>({key:e.key,name:e.label,detail:e.deleted?`Its records are kept`:void 0,totals:e}))})]}),(0,M.jsx)(Rce,{prices:e.prices,onChanged:t}),(0,M.jsx)(Bce,{disabled:!e.since,onCleared:t})]})}var Mce={chat:`Your messages and the tutor's replies, syllabus writing included`,continuation:`The tutor carrying on after you answer its checks`,lesson:`Background generation of lessons`,distillation:`Background reading of imported notes into concepts and memories`,review:`Reviews of project milestones' code, and the tutor's answers to disputes`,test:`Test model under Model providers`},Nce={chat:`Chat`,continuation:`Continuation`,lesson:`Lesson`,distillation:`Note reading`,review:`Code review`,test:`Test model`};function Pce(e){let t=(e.reportedCost??0)+(e.estimatedCost??0);return e.reportedCost===null&&e.estimatedCost===null?`Unknown`:`${e.estimatedCost===null?``:`≈`}${M9(t)}${e.unknownCost>0?`+`:``}`}function F9({label:e,value:t,children:n}){return(0,M.jsxs)(`div`,{role:`group`,"aria-label":e,className:`flex min-w-0 flex-col gap-1`,children:[(0,M.jsx)(`span`,{className:c7,children:e}),(0,M.jsx)(`span`,{className:`font-heading text-[1.85rem] leading-tight font-normal tracking-[-0.02em] tabular-nums wrap-anywhere`,children:t}),(0,M.jsx)(`div`,{className:`text-muted-foreground flex flex-col text-[0.8125rem] leading-snug`,children:n})]})}function Fce({totals:e}){let[t,n]=(0,v.useState)(!1);return(0,M.jsxs)(P8,{open:t,onOpenChange:n,className:`border-border-strong rounded-lg border`,children:[(0,M.jsx)(F8,{asChild:!0,children:(0,M.jsxs)(N,{type:`button`,variant:`ghost`,className:`w-full justify-between`,children:[`Estimated API equivalent`,(0,M.jsx)(Dh,{"aria-hidden":!0,className:j(`transition-transform`,t&&`rotate-180`)})]})}),(0,M.jsxs)(I8,{className:`flex flex-col gap-1 px-3 pb-3 text-sm`,children:[(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`What these tokens would cost at published API rates. This is not a charge or your subscription cost.`}),e.apiEquivalent===null?(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`None of these models has a published API price to compare with.`}):(0,M.jsxs)(`p`,{children:[(0,M.jsxs)(`span`,{className:`font-medium tabular-nums`,children:[`≈`,M9(e.apiEquivalent)]}),e.uncompared>0&&(0,M.jsxs)(`span`,{className:`text-muted-foreground`,children:[` for the calls with a published price; `,N9(e.uncompared,`call`),` had none to compare with.`]})]})]})]})}function Ice({days:e}){if(e.length<2)return null;let t=e=>e.api+e.subscription,n=Math.max(1,...e.map(t));return(0,M.jsxs)(`section`,{"aria-labelledby":`usage-daily`,className:`flex flex-col gap-2`,children:[(0,M.jsx)(`h3`,{id:`usage-daily`,className:c7,children:`Tokens per day`}),(0,M.jsx)(`div`,{className:`border-border-strong flex h-28 items-end gap-0.5 border-b`,role:`list`,"aria-label":`Tokens per day`,children:e.map(e=>{let r=`${new Date(`${e.day}T00:00:00`).toLocaleDateString()}: ${k9.format(t(e))} tokens in ${N9(e.calls,`call`)}`;return(0,M.jsx)(`div`,{role:`listitem`,"aria-label":r,title:r,className:`group flex h-full min-w-1 flex-1 items-end`,children:(0,M.jsx)(`div`,{className:`bg-muted-foreground/60 group-hover:bg-foreground w-full rounded-t-[3px]`,style:{height:`${Math.max(2,t(e)/n*100)}%`}})},e.day)})}),(0,M.jsxs)(`div`,{className:`text-muted-foreground flex justify-between gap-2 font-mono text-[0.72rem] tabular-nums`,children:[(0,M.jsx)(`span`,{children:new Date(`${e[0].day}T00:00:00`).toLocaleDateString()}),(0,M.jsxs)(`span`,{children:[`Peak `,j9(n)]}),(0,M.jsx)(`span`,{children:new Date(`${e.at(-1).day}T00:00:00`).toLocaleDateString()})]})]})}function Lce(e){if(e.billing===`subscription`)return`ChatGPT plan`;let t=e.totals,n=P9(t);return e.billing===void 0&&(t.apiEquivalent!==null||t.uncompared>0)?n===`None`?`ChatGPT plan`:`${n} + ChatGPT plan`:n}function I9({title:e,note:t,rows:n}){if(n.length===0)return null;let r=`usage-${e.toLowerCase().replace(/\s+/g,`-`)}`;return(0,M.jsxs)(`section`,{"aria-labelledby":r,className:`flex flex-col gap-2`,children:[(0,M.jsx)(`h3`,{id:r,className:`font-heading text-[1.05rem] font-medium`,children:e}),t&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:t}),(0,M.jsx)(`div`,{className:`overflow-x-auto`,children:(0,M.jsxs)(`table`,{className:`w-full text-sm`,"aria-labelledby":r,children:[(0,M.jsx)(`thead`,{className:`text-muted-foreground text-left font-mono text-[0.6875rem] tracking-[0.09em] uppercase`,children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{scope:`col`,className:`pb-2 pr-2 font-medium`,children:`Name`}),(0,M.jsx)(`th`,{scope:`col`,className:`pb-2 pr-2 text-right font-medium`,children:`Tokens`}),(0,M.jsx)(`th`,{scope:`col`,className:`pb-2 pr-2 text-right font-medium`,children:`Calls`}),(0,M.jsx)(`th`,{scope:`col`,className:`pb-2 text-right font-medium`,children:`Cost`})]})}),(0,M.jsx)(`tbody`,{children:n.map(e=>(0,M.jsxs)(`tr`,{className:`border-t align-top`,children:[(0,M.jsxs)(`th`,{scope:`row`,className:`py-2.5 pr-2 text-left font-semibold`,children:[(0,M.jsx)(`span`,{className:`block break-words`,children:e.name}),e.detail&&(0,M.jsx)(`span`,{className:`text-muted-foreground block text-xs font-normal`,children:e.detail})]}),(0,M.jsxs)(`td`,{className:`py-2.5 pr-2 text-right font-mono text-[0.8125rem] tabular-nums`,children:[A9(e.totals.total),e.totals.unreported>0&&(0,M.jsxs)(`span`,{className:`text-muted-foreground block text-xs`,children:[`+`,e.totals.unreported,` unknown`]})]}),(0,M.jsx)(`td`,{className:`py-2.5 pr-2 text-right font-mono text-[0.8125rem] tabular-nums`,children:e.totals.calls}),(0,M.jsx)(`td`,{className:`py-2.5 text-right text-xs`,children:Lce(e)})]},e.key))})]})})]})}var L9=[{key:`input`,label:`Input`},{key:`output`,label:`Output`},{key:`cacheRead`,label:`Cached input`}];function Rce({prices:e,onChanged:t}){let[n,r]=(0,v.useState)(!1);return(0,M.jsxs)(P8,{open:n,onOpenChange:r,className:`border-border-strong rounded-lg border`,children:[(0,M.jsx)(F8,{asChild:!0,children:(0,M.jsxs)(N,{type:`button`,variant:`ghost`,className:`w-full justify-between`,children:[`Advanced: custom prices`,(0,M.jsx)(Dh,{"aria-hidden":!0,className:j(`transition-transform`,n&&`rotate-180`)})]})}),(0,M.jsxs)(I8,{className:`flex flex-col gap-3 px-3 pb-3`,children:[(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`US dollars per million tokens. A price you set wins over the published one for calls from now on; costs already recorded don't change. No model needs a price to work: without one its cost stays unknown.`}),e.length===0&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No models yet.`}),e.map(e=>(0,M.jsx)(zce,{price:e,onChanged:t},e.model))]})]})}function zce({price:e,onChanged:t}){let n=t=>String(e.custom?.[t]??``),[r,i]=(0,v.useState)(()=>Object.fromEntries(L9.map(e=>[e.key,n(e.key)]))),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(),l=`price-${e.model.replace(/[^a-z0-9]/gi,`-`)}`,u=e.published?`Published: ${M9(e.published.input)} in, ${M9(e.published.output)} out`:`No published price`,d=async n=>{o(!0),c(void 0);let r=await NN(e.model,n);o(!1),r.ok?t():c(r.error)};return(0,M.jsxs)(`div`,{role:`group`,"aria-labelledby":l,className:`flex flex-col gap-2 border-t pt-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,M.jsx)(`span`,{id:l,className:`text-sm font-medium break-all`,children:e.label}),(0,M.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(t8,{variant:`secondary`,children:e.providerLabel}),e.custom&&(0,M.jsx)(t8,{children:`Custom price`})]})]}),(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:e.billing===`subscription`?`Billed to your ChatGPT plan. Its API comparison uses only published prices, so it has no price of your own. ${u}.`:`${u}.`}),e.billing!==`subscription`&&(0,M.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[L9.map(t=>(0,M.jsxs)(`label`,{className:`flex w-28 flex-col gap-1 text-xs`,children:[t.label,(0,M.jsx)(e5,{inputMode:`decimal`,value:r[t.key],disabled:a,"aria-label":`${t.label} price for ${e.label}, dollars per million tokens`,onChange:e=>i(n=>({...n,[t.key]:e.target.value}))})]},t.key)),(0,M.jsx)(N,{type:`button`,size:`sm`,disabled:a,onClick:()=>{let e=Number(r.input),t=Number(r.output);if(r.input===``||r.output===``||!Number.isFinite(e)||!Number.isFinite(t)||e<0||t<0){c(`Enter input and output prices of 0 or more.`);return}let n=r.cacheRead===``?void 0:Number(r.cacheRead);n!==void 0&&(!Number.isFinite(n)||n<0)?c(`The cached input price must be 0 or more, or empty.`):d({input:e,output:t,...n===void 0?{}:{cacheRead:n}})},children:`Save price`}),e.custom&&(0,M.jsx)(N,{type:`button`,size:`sm`,variant:`outline`,disabled:a,onClick:()=>void d(null),children:`Remove`})]}),s&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:s})]})}function Bce({disabled:e,onCleared:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(),c=async()=>{a(!0),s(void 0);let e=await MN();if(a(!1),!e.ok)return s(e.error);r(!1),t()};return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(N,{type:`button`,variant:`outline`,size:`sm`,disabled:e,onClick:()=>r(!0),children:`Clear usage history`})}),(0,M.jsx)(R8,{open:n,onOpenChange:r,children:(0,M.jsxs)(z8,{children:[(0,M.jsxs)(B8,{children:[(0,M.jsx)(H8,{children:`Clear usage history?`}),(0,M.jsx)(U8,{children:`This deletes Mivra's usage records. Your conversations, lessons and provider settings are kept. It doesn't reset any provider's billing or your plan's limits. Usage starts counting again from the next model call.`})]}),o&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:o}),(0,M.jsxs)(V8,{children:[(0,M.jsx)(N,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Cancel`}),(0,M.jsx)(N,{type:`button`,variant:`destructive`,disabled:i,onClick:()=>void c(),children:`Clear usage history`})]})]})})]})}var R9=768;function Vce(){let[e,t]=v.useState(void 0);return v.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<R9)};return e.addEventListener(`change`,n),t(window.innerWidth<R9),()=>e.removeEventListener(`change`,n)},[]),!!e}var Hce=`sidebar_state`,Uce=604800,Wce=`16rem`,Gce=`18rem`,Kce=`3rem`,qce=`b`,z9=v.createContext(null);function B9(){let e=v.useContext(z9);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Jce({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=Vce(),[c,l]=v.useState(!1),[u,d]=v.useState(e),f=t??u,p=v.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${Hce}=${t}; path=/; max-age=${Uce}`},[n,f]),m=v.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);v.useEffect(()=>{let e=e=>{e.key===qce&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=v.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,M.jsx)(z9.Provider,{value:g,children:(0,M.jsx)(D7,{delayDuration:0,children:(0,M.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":Wce,"--sidebar-width-icon":Kce,...i},className:j(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})})}function Yce({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=B9();return n===`none`?(0,M.jsx)(`div`,{"data-slot":`sidebar`,className:j(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?(0,M.jsx)(e7,{open:c,onOpenChange:l,...a,children:(0,M.jsxs)(t7,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Gce},side:e,children:[(0,M.jsxs)(n7,{className:`sr-only`,children:[(0,M.jsx)(r7,{children:`Sidebar`}),(0,M.jsx)(i7,{children:`Displays the mobile sidebar.`})]}),(0,M.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,M.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,M.jsx)(`div`,{"data-slot":`sidebar-gap`,className:j(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,M.jsx)(`div`,{"data-slot":`sidebar-container`,className:j(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,M.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm`,children:i})})]})}function Xce({className:e,onClick:t,...n}){let{toggleSidebar:r}=B9();return(0,M.jsxs)(N,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:j(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,M.jsx)(c_,{}),(0,M.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Zce({className:e,...t}){let{toggleSidebar:n}=B9();return(0,M.jsx)(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:n,title:`Toggle Sidebar`,className:j(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})}function Qce({className:e,...t}){return(0,M.jsx)(`main`,{"data-slot":`sidebar-inset`,className:j(`relative flex w-full flex-1 flex-col bg-background`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function $ce({className:e,...t}){return(0,M.jsx)(e5,{"data-slot":`sidebar-input`,"data-sidebar":`input`,className:j(`h-8 w-full bg-background shadow-none`,e),...t})}function ele({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:j(`flex flex-col gap-2 p-2`,e),...t})}function tle({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:j(`flex flex-col gap-2 p-2`,e),...t})}function nle({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:j(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function rle({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:j(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function ile({className:e,asChild:t=!1,...n}){let r=t?Wt:`div`;return(0,M.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:j(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...n})}function V9({className:e,...t}){return(0,M.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:j(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function H9({className:e,...t}){return(0,M.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:j(`group/menu-item relative`,e),...t})}var ale=oe(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function U9({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let s=e?Wt:`button`,{isMobile:c,state:l}=B9(),u=(0,M.jsx)(s,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:j(ale({variant:n,size:r}),a),...o});if(!i)return u;typeof i==`string`&&(i={children:i});let d=l!==`collapsed`||c;return(0,M.jsxs)(O7,{open:!d&&void 0,children:[(0,M.jsx)(k7,{asChild:!0,children:u}),(0,M.jsx)(A7,{side:`right`,align:`center`,hidden:d,...i})]})}function ole({className:e,asChild:t=!1,showOnHover:n=!1,...r}){let i=t?Wt:`button`;return(0,M.jsx)(i,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:j(`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 md:pointer-fine:after:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,n&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground data-[state=open]:opacity-100 md:pointer-fine:opacity-0`,e),...r})}function sle({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:j(`pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none`,`peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}var W9=[{value:`system`,label:`System`,Icon:lee},{value:`light`,label:`Light`,Icon:V_},{value:`dark`,label:`Dark`,Icon:uee}];function cle({choice:e,onChange:t}){let{label:n,Icon:r}=W9.find(t=>t.value===e)??W9[0];return(0,M.jsx)(V9,{children:(0,M.jsx)(H9,{children:(0,M.jsxs)(K8,{children:[(0,M.jsx)(q8,{asChild:!0,children:(0,M.jsxs)(U9,{tooltip:`Theme`,"aria-label":`Theme: ${n}`,children:[(0,M.jsx)(r,{}),(0,M.jsx)(`span`,{children:n})]})}),(0,M.jsx)(J8,{side:`top`,align:`start`,children:(0,M.jsx)(X8,{value:e,onValueChange:e=>t(e),children:W9.map(({value:e,label:t,Icon:n})=>(0,M.jsxs)(Z8,{value:e,children:[(0,M.jsx)(n,{}),t]},e))})})]})})})}var G9=`mivra-theme`,K9=()=>window.matchMedia(`(prefers-color-scheme: dark)`);function lle(){try{let e=localStorage.getItem(G9);return e===`light`||e===`dark`?e:`system`}catch{return`system`}}function q9(e){let t=e===`dark`||e===`system`&&K9().matches;document.documentElement.classList.toggle(`dark`,t)}function ule(){let[e,t]=(0,v.useState)(lle);return(0,v.useEffect)(()=>{q9(e);try{e===`system`?localStorage.removeItem(G9):localStorage.setItem(G9,e)}catch{}if(e!==`system`)return;let t=K9(),n=()=>q9(`system`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},[e]),[e,t]}function dle(e,t=new Date){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()-7).getTime(),i=[{label:`Today`,sessions:[]},{label:`Previous 7 days`,sessions:[]},{label:`Older`,sessions:[]}];for(let t of e){let e=new Date(t.updatedAt).getTime();(e>=n?i[0]:e>=r?i[1]:i[2]).sessions.push(t)}return i.filter(e=>e.sessions.length>0)}var fle=120;function ple({onRename:e,onDelete:t}){let n=(0,v.useRef)(!1);return(0,M.jsxs)(K8,{children:[(0,M.jsx)(q8,{asChild:!0,children:(0,M.jsx)(ole,{showOnHover:!0,"aria-label":`Session actions`,children:(0,M.jsx)(yg,{})})}),(0,M.jsxs)(J8,{side:`right`,align:`start`,onCloseAutoFocus:t=>{n.current&&(n.current=!1,t.preventDefault(),e())},children:[(0,M.jsxs)(Y8,{onSelect:()=>n.current=!0,children:[(0,M.jsx)(g_,{}),`Rename`]}),(0,M.jsxs)(Y8,{variant:`destructive`,onSelect:t,children:[(0,M.jsx)(q_,{}),`Delete`]})]})]})}function mle({session:e,onDone:t,onRenamed:n}){let[r,i]=(0,v.useState)(e.title),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(),l=(0,v.useRef)(null),u=(0,v.useRef)(!1);(0,v.useEffect)(()=>{l.current?.focus(),l.current?.select()},[]);let d=async()=>{if(u.current||a)return;let i=r.trim();if(!i||i===e.title)return u.current=!0,t();o(!0),c(void 0);let s=await JN(e.id,i);o(!1),s.ok?(u.current=!0,n(s.value),t()):(c(s.error),l.current?.focus())};return(0,M.jsxs)(`div`,{className:`px-0.5 py-0.5`,children:[(0,M.jsx)($ce,{ref:l,value:r,maxLength:fle,readOnly:a,"aria-label":`Title`,"aria-invalid":s?!0:void 0,"aria-describedby":s?`rename-error-${e.id}`:void 0,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),d()):e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),u.current=!0,t())},onBlur:()=>void d()}),s&&(0,M.jsx)(`p`,{id:`rename-error-${e.id}`,className:`text-destructive px-1 pt-1 text-xs`,role:`alert`,children:s})]})}function hle({session:e,onClose:t,onDeleted:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(),s=async()=>{if(!e)return;i(!0),o(void 0);let t=await YN(e.id);if(i(!1),!t.ok)return o(t.error);n(e)};return(0,M.jsx)(e9,{open:!!e,onOpenChange:e=>{e||r||(o(void 0),t())},children:(0,M.jsxs)(t9,{children:[(0,M.jsxs)(n9,{children:[(0,M.jsxs)(i9,{className:`font-heading wrap-anywhere`,children:[`Delete “`,e?.title,`”?`]}),(0,M.jsx)(a9,{children:e?.courseId?`This deletes the course with its syllabus, lessons and every lesson's chat. It can't be undone. What Mivra remembers about you and your library sources are kept.`:`This deletes the session and its messages. It can't be undone. What Mivra remembers about you and your library sources are kept.`})]}),a&&(0,M.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:a}),(0,M.jsxs)(r9,{children:[(0,M.jsx)(s9,{disabled:r,children:`Cancel`}),(0,M.jsxs)(o9,{variant:`destructive`,disabled:r,onClick:e=>{e.preventDefault(),s()},children:[r&&(0,M.jsx)(JF,{}),`Delete`]})]})]})})}function gle({className:e,...t}){return(0,M.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:j(`group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30`,`h-9 min-w-0 has-[>textarea]:h-auto`,`has-[>[data-align=inline-start]]:[&>input]:pl-2`,`has-[>[data-align=inline-end]]:[&>input]:pr-2`,`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3`,`has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50`,`has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40`,e),...t})}var _le=oe(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]`,"inline-end":`order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]`,"block-start":`order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3`,"block-end":`order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3`}},defaultVariants:{align:`inline-start`}});function J9({className:e,align:t=`inline-start`,...n}){return(0,M.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:j(_le({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot="input-group-control"]`)?.focus()},...n})}function vle({className:e,...t}){return(0,M.jsx)(e5,{"data-slot":`input-group-control`,className:j(`flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent`,e),...t})}function yle(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)({kind:`start`}),i=n.kind===`session`?n.id:void 0,[a,o]=(0,v.useState)(),[s,c]=(0,v.useState)(),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(0),p=(0,v.useRef)({}),m=(0,v.useRef)(void 0),[h,g]=(0,v.useState)(0),_=()=>{xM&&IM().then(e=>{e.ok&&g(e.value.total)})},y=async()=>{_();try{let e=await CM.sessions.$get();if(!e.ok)return o(await wM(e));t(await e.json()),o(void 0)}catch{o(`Can't reach the Mivra server.`)}};(0,v.useEffect)(()=>{y()},[]);let b=()=>{r({kind:`draft`}),f(e=>e+1)},x=(e,n)=>{t(t=>[e,...t]),c({sessionId:e.id,...n}),r({kind:`session`,id:e.id})},S=({session:e,goal:t,documentIds:n})=>{m.current=void 0,x(e,{message:t,documentIds:n})},C=(e,t)=>{u(``),x(e,t)},[w,T]=(0,v.useState)(),[E,D]=(0,v.useState)(!1),O=()=>{E&&(D(!1),_())},k=e=>{O(),T(e)},ee=e=>{O(),T(void 0),r(e)},te=e.find(e=>e.id===i),[ne,re]=(0,v.useState)(),ie=e=>{re(void 0),t(t=>t.filter(t=>t.id!==e.id)),delete p.current[e.id],s?.sessionId===e.id&&c(void 0),i===e.id&&r({kind:`start`})},[ae,A]=ule(),[oe,se]=(0,v.useState)(!1),[ce,le]=(0,v.useState)(!1),[ue,de]=(0,v.useState)(!1),[fe,pe]=(0,v.useState)(!1),[me,he]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=()=>pe(!0),t=()=>{pe(!1),he(!0)};return window.addEventListener(FN,e),window.addEventListener(PN,t),()=>{window.removeEventListener(FN,e),window.removeEventListener(PN,t)}},[]);let[ge,_e]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{xM&&RN().then(e=>{e.ok&&!E9(e.value)&&(_e(!0),de(!0))})},[]),(0,M.jsxs)(Jce,{children:[(0,M.jsx)(ble,{sessions:e,activeId:w||E?void 0:i,theme:ae,onThemeChange:A,drafting:!w&&!E&&n.kind===`draft`,conceptGraphOpen:!E&&w===`__concepts`,memoryOpen:E,onSelect:e=>ee({kind:`session`,id:e}),onDelete:re,onRenamed:e=>t(t=>t.map(t=>t.id===e.id?{...t,title:e.title}:t)),onNew:()=>{O(),T(void 0),b()},onNewCourse:()=>ee({kind:`start`}),onOpenMemory:()=>{T(void 0),D(!0)},dueCount:h,onOpenConceptGraph:()=>k(p9),onOpenSources:()=>se(!0),onOpenImports:()=>le(!0),onOpenProviders:()=>de(!0),onOpenSettings:()=>pe(!0),onOpenUsage:()=>he(!0)}),(0,M.jsx)(Yae,{open:oe,onOpenChange:se,activeSessionId:i,onLibraryChanged:()=>M7(i)}),(0,M.jsx)(Roe,{open:ce,onOpenChange:le,onOpenGraph:k}),(0,M.jsx)(vce,{open:ue,onOpenChange:de,firstRun:ge}),(0,M.jsx)(Tce,{open:fe,onOpenChange:pe}),(0,M.jsx)(kce,{open:me,onOpenChange:he}),(0,M.jsx)(lae,{}),(0,M.jsx)(hle,{session:ne,onClose:()=>re(void 0),onDeleted:ie}),(0,M.jsxs)(Qce,{className:`h-svh min-w-0 overflow-hidden`,children:[(0,M.jsxs)(`header`,{className:`flex h-13 shrink-0 items-center gap-2 border-b px-3`,children:[(0,M.jsx)(Xce,{}),(0,M.jsx)(Uae,{orientation:`vertical`,className:`mr-1 data-[orientation=vertical]:h-4`}),(0,M.jsx)(`h1`,{className:`truncate text-base font-medium outline-none`,tabIndex:w?-1:void 0,"data-notes-graph-start":w?``:void 0,children:E?`Memory`:w===`__concepts`?`Concept graph`:w?`Notes graph`:te?.title??(n.kind===`draft`?`New session`:`Mivra`)})]}),xM?E?(0,M.jsx)(Cse,{onOpenCourse:e=>ee({kind:`session`,id:e}),onStartReview:(e,t)=>{O(),T(void 0),x(e,{message:t})},onLeave:()=>ee({kind:`start`}),onDueTotal:g}):w?(0,M.jsx)(Zse,{importId:w,onScopeChange:T}):a?(0,M.jsx)(Y9,{error:!0,children:a}):i?(0,M.jsx)(xle,{sessionId:i,course:!!te?.courseId,start:s?.sessionId===i?s:void 0,onStartUsed:()=>c(void 0),getDraft:()=>p.current[i]??``,onDraftChange:e=>{e?p.current[i]=e:delete p.current[i]},onReply:y},i):n.kind===`draft`?(0,M.jsx)(wle,{text:l,onTextChange:u,focus:d,onSaved:C}):(0,M.jsx)(yoe,{onStarted:S,onFreeChat:b,getDraft:()=>m.current,onDraftChange:e=>{m.current=e}}):(0,M.jsx)(Y9,{error:!0,children:`No API token found. Start the server, then reload this page.`})]})]})}function Y9({error:e,children:t}){return(0,M.jsx)(`p`,{className:j(`m-auto p-6 text-center`,e?`text-destructive`:`text-muted-foreground`),children:t})}function ble({sessions:e,activeId:t,drafting:n,conceptGraphOpen:r,memoryOpen:i,theme:a,onThemeChange:o,onSelect:s,onDelete:c,onRenamed:l,onNew:u,onNewCourse:d,onOpenMemory:f,dueCount:p,onOpenConceptGraph:m,onOpenSources:h,onOpenImports:g,onOpenProviders:_,onOpenSettings:y,onOpenUsage:b}){let{isMobile:x,setOpenMobile:S}=B9(),[C,w]=(0,v.useState)(),T=e=>{w(void 0),requestAnimationFrame(()=>document.querySelector(`[data-session-id="${CSS.escape(e)}"]`)?.focus())},E=()=>{x&&S(!1)};return(0,M.jsxs)(Yce,{collapsible:`icon`,children:[(0,M.jsxs)(ele,{children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 p-1`,children:[(0,M.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground font-heading grid size-6 shrink-0 place-items-center rounded-md text-sm font-semibold`,children:`M`}),(0,M.jsx)(`span`,{className:`font-heading truncate text-base font-semibold group-data-[collapsible=icon]:hidden`,children:`Mivra`})]}),(0,M.jsxs)(V9,{children:[(0,M.jsx)(H9,{children:(0,M.jsxs)(U9,{variant:`outline`,tooltip:`New session`,isActive:n,onClick:()=>{u(),E()},children:[(0,M.jsx)(y_,{}),(0,M.jsx)(`span`,{children:`New session`})]})}),(0,M.jsx)(H9,{children:(0,M.jsxs)(U9,{tooltip:`New course`,onClick:()=>{d(),E()},children:[(0,M.jsx)(Lg,{}),(0,M.jsx)(`span`,{children:`New course`})]})})]})]}),(0,M.jsx)(nle,{children:dle(e).map(e=>(0,M.jsxs)(rle,{children:[(0,M.jsx)(ile,{children:e.label}),(0,M.jsx)(V9,{children:e.sessions.map(e=>(0,M.jsx)(H9,{children:C===e.id?(0,M.jsx)(mle,{session:e,onRenamed:l,onDone:()=>T(e.id)}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(U9,{"data-session-id":e.id,isActive:e.id===t,tooltip:e.title,onClick:()=>{s(e.id),E()},children:[e.courseId?(0,M.jsx)(w7,{icon:e.icon,"aria-label":`Course`}):(0,M.jsx)(Zg,{}),(0,M.jsx)(`span`,{children:e.title})]}),(0,M.jsx)(ple,{onRename:()=>w(e.id),onDelete:()=>c(e)})]})},e.id))})]},e.label))}),(0,M.jsxs)(tle,{className:`border-t border-sidebar-border`,children:[(0,M.jsxs)(V9,{children:[(0,M.jsxs)(H9,{children:[(0,M.jsxs)(U9,{tooltip:`Memory`,"data-memory-trigger":!0,isActive:i,"aria-current":i?`page`:void 0,onClick:()=>{f(),E()},children:[(0,M.jsx)(ph,{}),(0,M.jsx)(`span`,{children:`Memory`})]}),p>0&&(0,M.jsxs)(sle,{className:`text-muted-foreground`,"data-testid":`due-count`,children:[p>99?`99+`:p,(0,M.jsx)(`span`,{className:`sr-only`,children:` due for review`})]})]}),(0,M.jsx)(H9,{children:(0,M.jsxs)(U9,{tooltip:`Concept graph`,"data-concept-graph-trigger":!0,isActive:r,onClick:()=>{m(),E()},children:[(0,M.jsx)(Z_,{}),(0,M.jsx)(`span`,{children:`Concept graph`})]})}),(0,M.jsx)(H9,{children:(0,M.jsxs)(U9,{tooltip:`Source library`,"data-sources-trigger":!0,onClick:()=>{h(),E()},children:[(0,M.jsx)(dh,{}),(0,M.jsx)(`span`,{children:`Source library`})]})}),(0,M.jsx)(H9,{children:(0,M.jsxs)(U9,{tooltip:`Imported notes`,"data-imports-trigger":!0,onClick:()=>{g(),E()},children:[(0,M.jsx)(Kg,{}),(0,M.jsx)(`span`,{children:`Imported notes`})]})}),(0,M.jsx)(H9,{children:(0,M.jsxs)(U9,{tooltip:`Model providers`,"data-providers-trigger":!0,onClick:()=>{_(),E()},children:[(0,M.jsx)(Vg,{}),(0,M.jsx)(`span`,{children:`Model providers`})]})}),(0,M.jsx)(H9,{children:(0,M.jsxs)(U9,{tooltip:`Settings`,"data-settings-trigger":!0,onClick:()=>{y(),E()},children:[(0,M.jsx)(k_,{}),(0,M.jsx)(`span`,{children:`Settings`})]})}),(0,M.jsx)(H9,{children:(0,M.jsxs)(U9,{tooltip:`Usage`,"data-usage-trigger":!0,onClick:()=>{b(),E()},children:[(0,M.jsx)(xh,{}),(0,M.jsx)(`span`,{children:`Usage`})]})})]}),(0,M.jsx)(cle,{choice:a,onChange:o})]}),(0,M.jsx)(Zce,{})]})}function xle({course:e,...t}){return e?(0,M.jsx)(Sle,{...t}):(0,M.jsx)(X9,{...t})}function Sle(e){let{sessionId:t}=e,[n,r]=(0,v.useState)(),[i,a]=(0,v.useState)(),[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)(),[u,d]=(0,v.useState)(!1),f=(0,v.useRef)(0),p=()=>{f.current=performance.now(),d(!0)},[m,h]=(0,v.useState)(),[g,_]=(0,v.useState)(),[y,b]=(0,v.useState)(),x=(0,v.useRef)(void 0),S=(0,v.useRef)(e.onReply);S.current=e.onReply;let C=(0,v.useRef)(!1),w=(0,v.useCallback)(async()=>{let e=await gN(t);if(!e.ok)return h(e.error);if(r(e.value),C.current&&e.value.status!==`interviewing`&&S.current(),C.current=e.value.status===`interviewing`,e.value.status===`interviewing`)return;let n=await _N(e.value.id);n.ok&&a(n.value)},[t]);(0,v.useEffect)(()=>{w()},[w]);let T=async e=>{if(!n)return;let t=await yN(n.id,e);if(!t.ok)return h(t.error);s(t.value.lesson.id),await w()},E=o??i?.currentLessonId??void 0,D=i?.topics.find(e=>e.lesson&&e.lesson.id===i.currentLessonId&&e.lesson.status!==`finished`);(0,v.useEffect)(()=>{if(!E)return;let e=e=>{(e.ctrlKey||e.metaKey)&&!e.altKey&&e.key.toLowerCase()===`k`&&(e.preventDefault(),f.current=performance.now(),d(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[E]);let O=(0,v.useRef)(0),k=(e,t)=>{_({text:e,send:t,nonce:++O.current}),p()},ee=async e=>{if(!E)return`No lesson is open.`;let t=x.current?.lessonId===E&&y?.id===E&&y.sections.some(e=>e.id===x.current.section.id)?x.current.section:void 0,n=t??(y?.id===E?y.sections.at(-1):void 0),r=await CN(E,{messageId:e,afterSectionId:n?.id??null,title:t?`More on ${t.title}`.slice(0,120):`From the tutor`});if(!r.ok)return r.error;b(r.value.lesson)},te=n?.syllabus?.version,ne=y?.syllabusVersion;(0,v.useEffect)(()=>{ne&&te&&ne!==te&&w()},[ne,te,w]);let re=y?.status,ie=y&&i?.topics.find(e=>e.lesson?.id===y.id)?.lesson?.status;(0,v.useEffect)(()=>{re&&ie&&re!==ie&&w()},[re,ie,w]);let ae=async()=>{if(!n?.syllabus)return;let e=await wN(n.id,n.syllabus.version);if(!e.ok)return e.error;await w()};if(m)return(0,M.jsx)(Y9,{error:!0,children:m});if(!n)return null;let A=i?.topics.find(e=>e.topicId===i.nextTopicId);return E?(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,M.jsx)(C7,{course:n,onUndo:ae,children:(0,M.jsxs)(N,{size:`sm`,variant:`outline`,onClick:p,"data-tutor-trigger":!0,children:[(0,M.jsx)($g,{"aria-hidden":!0}),` Tutor`]})}),(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[i&&(0,M.jsx)(`aside`,{className:`hidden w-60 shrink-0 overflow-y-auto border-r p-3 md:block`,children:(0,M.jsx)(E7,{lessons:i,selectedId:E,onSelect:e=>{l(void 0),s(e)}})}),(0,M.jsxs)(`div`,{className:`min-w-0 flex-1 overflow-y-auto`,"data-testid":`lesson-scroll`,children:[i&&(0,M.jsxs)(`details`,{className:`border-b px-4 py-2 md:hidden`,children:[(0,M.jsx)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:`Lessons`}),(0,M.jsx)(`div`,{className:`pt-2`,children:(0,M.jsx)(E7,{lessons:i,selectedId:E,onSelect:e=>{l(void 0),s(e)}})})]}),D&&E!==D.lesson.id&&(0,M.jsxs)(`div`,{className:`bg-muted mx-auto mt-4 flex max-w-3xl flex-wrap items-center gap-2 rounded-lg px-4 py-2 text-sm`,role:`status`,children:[(0,M.jsx)(`span`,{children:`You're looking at an earlier lesson.`}),(0,M.jsxs)(N,{size:`xs`,variant:`outline`,onClick:()=>{l(void 0),s(D.lesson.id)},children:[`Back to lesson `,i.topics.indexOf(D)+1,`: `,D.title]})]}),(0,M.jsx)(Toe,{courseComplete:n.status===`complete`,lessonId:E,nextTopic:A&&{id:A.topicId,title:A.title},onFinished:()=>void w(),onStartNext:T,onLoaded:b,focusSectionId:c,onOpenSection:(e,t)=>{s(e),l(t)},onExplain:e=>{x.current={lessonId:E,section:e},k(`Explain "${e.title}"`,!0)},onChange:e=>{x.current=void 0,k(`Change "${e.title}": `,!1)},onPracticeMilestone:e=>{x.current=void 0,k(e,!0)}},E)]})]}),(0,M.jsx)(e7,{open:u,onOpenChange:d,children:(0,M.jsxs)(t7,{className:`flex w-full flex-col gap-0 p-0 sm:max-w-lg`,onPointerDownOutside:e=>{e.detail.originalEvent.timeStamp<f.current&&e.preventDefault()},children:[(0,M.jsxs)(n7,{className:`border-b`,children:[(0,M.jsx)(r7,{className:`font-heading`,children:`Tutor`}),(0,M.jsxs)(i7,{children:[`Ask anything and the lesson stays as it is, or ask for a change. `,(0,M.jsx)(`kbd`,{className:`text-xs`,children:`Ctrl K`}),` opens and closes this.`]})]}),(0,M.jsx)(X9,{...e,onSettled:w,lessonId:E,prompt:g,onPromptUsed:()=>_(void 0),foldThroughMessageId:n.interviewMessageId,placeholder:`Ask the tutor…`,onAddToLesson:y?.status===`ready`?ee:void 0})]})})]}):(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,M.jsx)(C7,{course:n,children:A&&(0,M.jsx)(N,{size:`sm`,onClick:()=>void T(A.topicId),children:`Start lesson 1`})}),(0,M.jsx)(X9,{...e,onSettled:w,prompt:g,onPromptUsed:()=>_(void 0)})]})}function X9({sessionId:e,onReply:t,...n}){let[r,i]=(0,v.useState)(()=>n.start?[]:void 0),[a,o]=(0,v.useState)();return(0,v.useEffect)(()=>{r||jM(e).then(e=>e.ok?i(e.messages):o(e.error))},[e]),a?(0,M.jsxs)(Y9,{error:!0,children:[`Couldn't load this session: `,a]}):r?(0,M.jsx)(Cle,{sessionId:e,initialMessages:r,onReply:t,...n}):(0,M.jsxs)(`div`,{className:`text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Loading the session…`]})}function Cle({sessionId:e,initialMessages:t,start:n,onStartUsed:r,getDraft:i,onDraftChange:a,onReply:o,onSettled:s,lessonId:c,prompt:l,onPromptUsed:u,onAddToLesson:d,foldThroughMessageId:f,placeholder:p=`What do you want to learn?`}){let[m,h]=(0,v.useState)(!1),g=(0,v.useRef)(c);g.current=c;let[_,y]=(0,v.useState)(()=>n?.input??i?.()??``),b=(0,v.useRef)(a);b.current=a;let x=e=>{y(e),b.current?.(e)};(0,v.useEffect)(()=>{n?.input&&b.current?.(n.input)},[n?.input]);let S=Doe(e),C=z5(),T=(0,v.useRef)(S);T.current=S;let[E,D]=(0,v.useState)({}),O=w({initial:`instant`,resize:`instant`}),k=(0,v.useRef)(!1),ee=(0,v.useRef)(null),[te,ne]=(0,v.useState)(),[re,ie]=(0,v.useState)(),ae=(0,v.useRef)(void 0),A=(0,v.useRef)(!1),oe=(0,v.useRef)(0),se=(0,v.useRef)(!1),ce=(0,v.useRef)(!1),le=(0,v.useRef)(!1),ue=(0,v.useRef)(0),de=(0,v.useRef)(!0),{messages:fe,sendMessage:pe,setMessages:me,status:he,error:ge,resumeStream:_e,stop:ve}=fO({id:e,experimental_throttle:50,messages:t,transport:new eO({api:`/api/sessions/${e}/chat`,headers:SM,prepareReconnectToStreamRequest:()=>({api:`/api/sessions/${e}/continuation`}),prepareSendMessagesRequest:({messages:e,body:t})=>({body:{...t,message:e.at(-1),...g.current?{lessonId:g.current}:{}}}),fetch:async(e,t)=>{let n=ue.current,r=await fetch(e,t);if(t?.method===`GET`){ae.current=r.headers.get(`x-mivra-continuation-stop-id`)??void 0,A.current=r.status===200,A.current&&(le.current=!1),r.status===204&&await Te(n),ce.current=!1;let e=r.headers.get(`x-mivra-continuation-error`);if(e&&(ie(e),r.status===204))throw Error(e)}else r.ok&&await T.current.refresh();return r}}),onFinish:({message:t,isDisconnect:n})=>{se.current||n||!de.current||(A.current?(A.current=!1,ae.current=void 0,Te(ue.current)):k.current&&jM(e).then(e=>{e.ok&&me(n=>n.at(-1)?.id===t.id?e.messages:n)}),o())}}),ye=(0,v.useRef)(0);(0,v.useEffect)(()=>{l&&l.nonce!==ye.current&&(ye.current=l.nonce,u?.(),l.send&&!we.current.busy?pe({text:l.text},{body:{documentIds:[]}}):(x(l.text),requestAnimationFrame(()=>ee.current?.focus())))},[l,pe,u]);let be=(0,v.useRef)(!1),{upload:xe}=S;(0,v.useEffect)(()=>{!n||be.current||t.length>0||(be.current=!0,r(),n.file&&xe(n.file),n.message&&pe({text:n.message},{body:{documentIds:n.documentIds??[]}}))},[n,t.length,r,pe,xe]),(0,v.useEffect)(()=>{let e=O.scrollRef.current;if(!e)return;e.dataset.testid=`transcript`,e.tabIndex=0,e.setAttribute(`aria-label`,`Conversation messages`);let t,n=e=>{let n=e.touches[0];t=n?{x:n.clientX,y:n.clientY}:void 0},r=n=>{let r=n.touches[0];if(!t||!r||e.scrollTop<=0)return;let i=r.clientY-t.y;i>8&&i>Math.abs(r.clientX-t.x)&&O.stopScroll()},i=t=>{t.target===e&&([`ArrowUp`,`PageUp`,`Home`].includes(t.key)||t.key===` `&&t.shiftKey)&&O.stopScroll()};return e.addEventListener(`touchstart`,n,{passive:!0}),e.addEventListener(`touchmove`,r,{passive:!0}),e.addEventListener(`keydown`,i),()=>{e.removeEventListener(`touchstart`,n),e.removeEventListener(`touchmove`,r),e.removeEventListener(`keydown`,i)}},[O.scrollRef,O.stopScroll]),(0,v.useEffect)(()=>{let e=requestAnimationFrame(()=>{let e=O.scrollRef.current;e&&e.scrollHeight-e.clientHeight-e.scrollTop<=1&&O.scrollToBottom(`instant`)});return()=>cancelAnimationFrame(e)},[E,O.scrollRef,O.scrollToBottom]);let Se=he===`submitted`||he===`streaming`,Ce=(0,v.useRef)(s);Ce.current=s,(0,v.useEffect)(()=>{Se||Ce.current?.()},[Se,fe.length]);let we=(0,v.useRef)({busy:Se,resumeStream:_e,stop:ve});we.current={busy:Se,resumeStream:_e,stop:ve};async function Te(t){let n=await jM(e);n.ok&&de.current&&ue.current===t&&me(n.messages)}let Ee=async(e=!1)=>{if(ce.current){e&&(le.current=!0);return}if(we.current.busy&&!ae.current)return;ce.current=!0;let t=++oe.current,n=ue.current;try{if(ae.current&&(se.current=!0,await we.current.stop(),se.current=!1),!de.current||ue.current!==n)return;ce.current=!0,k.current=!1,await we.current.resumeStream()}finally{oe.current===t&&(ce.current=!1,le.current&&de.current&&(le.current=!1,De.current())),se.current=!1}},De=(0,v.useRef)(Ee);De.current=Ee;let Oe=(0,v.useRef)(!!n?.message&&t.length===0);(0,v.useEffect)(()=>{de.current=!0;let e=()=>{document.visibilityState===`visible`&&De.current()};return Oe.current||e(),window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{de.current=!1,window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[]);let ke=async()=>{let t=await jM(e);t.ok&&D(e=>N8(e,iae(t.messages))),Ee(!0)},Ae=async e=>{e.preventDefault();let t=_.trim();if(!t||Se)return;k.current=!1,ne(void 0),ie(void 0),ue.current++,oe.current++,le.current=!1,se.current=!0,await ve(),ce.current=!1,se.current=!1,A.current=!1,ae.current=void 0,O.scrollToBottom(`instant`);let n=S.documents.filter(e=>e.messageId===null).map(e=>e.id);pe({text:t},{body:{documentIds:n}}),x(``)},je=f?fe.findIndex(e=>e.id===f):-1;return(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,M.jsxs)(tv,{"aria-busy":Se,instance:O,initial:`instant`,resize:`instant`,className:`min-h-0 min-w-0`,children:[(0,M.jsxs)(nv,{className:`relative mx-auto max-w-3xl gap-5 px-4 py-6 leading-relaxed`,scrollClassName:`overflow-y-auto overscroll-contain [scrollbar-gutter:auto]!`,onPointerDownCapture:e=>{e.target.closest(`button, input, [role=button]`)&&O.stopScroll()},onKeyDownCapture:e=>{e.key!==`Tab`&&e.target.closest(`button, input, [role=region]`)&&O.stopScroll()},children:[fe.length===0&&!Se&&(0,M.jsx)(Z9,{}),je>=0&&!m&&(0,M.jsx)(N,{variant:`ghost`,size:`sm`,className:`text-muted-foreground self-center`,onClick:()=>h(!0),children:`Show the placement interview`}),fe.map((e,t)=>!m&&t<=je?null:(0,M.jsxs)(`div`,{"data-message-id":e.id,"data-message-role":e.role,className:j(`flex min-w-0 flex-col gap-3`,e.role===`user`&&`bg-sunken text-foreground max-w-[min(80%,34rem)] self-end rounded-2xl rounded-br-sm px-4 py-2.5 leading-relaxed whitespace-pre-wrap wrap-anywhere`),children:[e.role===`user`&&(0,M.jsx)(N7,{documents:S,messageId:e.id}),e.role===`assistant`&&e.parts.some(e=>e.type===`reasoning`&&e.text.length>0)&&(0,M.jsxs)(F7,{defaultOpen:!1,children:[(0,M.jsxs)(I7,{children:[`Thinking`,j8(he,t,fe.length)&&e.parts.some(e=>e.type===`reasoning`&&e.state===`streaming`)&&(0,M.jsx)(`span`,{className:`ml-2 text-xs`,children:`In progress…`})]}),(0,M.jsx)(R7,{children:e.parts.map((e,n)=>e.type===`reasoning`&&(0,M.jsx)(L7,{label:(0,M.jsx)(`span`,{className:`whitespace-pre-wrap`,children:e.text}),status:j8(he,t,fe.length)&&e.state===`streaming`?`active`:`complete`},n))})]}),e.parts.map((n,r)=>n.type===`text`?e.role===`user`?(0,M.jsx)(`p`,{children:n.text},r):(0,M.jsx)(V0,{text:n.text,citations:!0},r):n.type===`data-artifact`?(0,M.jsx)(A8,{data:rae(n,E),replyInProgress:j8(he,t,fe.length),onUpdate:e=>{D(t=>N8(t,{[e.id]:e})),Ee(!0)},onRefresh:ke},n.id??r):null),e.role===`assistant`&&typeof e.metadata?.model==`string`&&(0,M.jsx)(`p`,{className:`text-muted-foreground text-xs`,"data-reply-model":!0,children:R5(e.metadata.model,C.view?.models,C.view?.providers)}),d&&e.role===`assistant`&&t>je&&!j8(he,t,fe.length)&&e.parts.some(e=>e.type===`text`&&e.text.trim())&&(0,M.jsx)(Tle,{onAdd:()=>d(e.id)})]},e.id)),he===`submitted`&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Thinking…`]}),te&&(0,M.jsx)(`p`,{className:`text-destructive`,children:te}),(ge||re)&&((ge?$9(ge):re)===`ChatGPT usage limit reached. Review your plan or this app's limit in ChatGPT settings.`?(0,M.jsx)(cae,{}):(0,M.jsx)(`p`,{className:`text-destructive`,children:ge?$9(ge):re}))]}),(0,M.jsx)(rv,{"aria-label":`Scroll to bottom`,onClick:()=>void O.scrollToBottom(`instant`)})]}),(0,M.jsx)(Q9,{documents:S,input:_,onInputChange:x,onSubmit:Ae,inputRef:ee,placeholder:p,modelPicker:C,action:Se?(0,M.jsx)(N,{type:`button`,variant:`secondary`,onClick:async t=>{let n=t.currentTarget,r=document.activeElement===n;try{if(k.current)return;k.current=!0;let t=ae.current??fe.findLast(e=>e.role===`user`)?.id;if(!t)return;let i=await CM.sessions[`:id`].stop.$post({param:{id:e},json:{messageId:t}});i.ok&&r&&(document.activeElement===n||document.activeElement===document.body)&&ee.current?.focus(),i.ok||(k.current=!1),i.ok||ne(`Couldn’t stop the reply. Try again.`)}catch{k.current=!1,ne(`Couldn’t stop the reply. Try again.`)}},children:`Stop`}):(0,M.jsx)(N,{type:`submit`,disabled:!_.trim(),children:`Send`})})]})}function Z9(){return(0,M.jsx)(U5,{className:`my-auto`,children:(0,M.jsxs)(W5,{children:[(0,M.jsx)(G5,{variant:`icon`,children:(0,M.jsx)($g,{"aria-hidden":`true`})}),(0,M.jsx)(K5,{children:`Start a conversation`}),(0,M.jsx)(q5,{children:`Ask a question, explore a concept or attach course notes to learn from.`})]})})}function Q9({documents:e,input:t,onInputChange:n,onSubmit:r,inputRef:i,placeholder:a,modelPicker:o,action:s,disabled:c}){return(0,M.jsxs)(`form`,{onSubmit:r,className:`bg-background border-t`,children:[(0,M.jsx)(N7,{documents:e}),(0,M.jsx)(`div`,{className:`mx-auto w-full max-w-3xl p-3`,children:(0,M.jsxs)(gle,{className:`bg-card dark:bg-card border-border-strong shadow-paper h-auto min-h-11 rounded-xl`,"aria-label":`Message composer`,children:[(0,M.jsxs)(J9,{align:`inline-start`,children:[(0,M.jsx)(Ooe,{documents:e}),(0,M.jsx)(koe,{documents:e})]}),(0,M.jsx)(vle,{ref:i,value:t,onChange:e=>n(e.target.value),placeholder:a,"aria-label":`Message`,readOnly:c,autoFocus:!0}),(0,M.jsx)(J9,{align:`inline-end`,children:s})]})}),(0,M.jsx)(`div`,{className:`mx-auto flex max-w-3xl px-3 pb-2`,children:(0,M.jsx)(H5,{state:o})})]})}function wle({text:e,onTextChange:t,focus:n,onSaved:r}){let i=z5(),a=(0,v.useRef)(null),[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)();(0,v.useEffect)(()=>{a.current?.focus()},[n]);let u=async(e,t)=>{if(o)return;s({file:t}),l(void 0);let n=await NM();if(s(void 0),!n.ok)return l(n.error);r(n.value,e)},d={documents:[],uploading:o?.file,error:c,upload:t=>u({file:t,input:e},t.name),attachFromLibrary:async t=>{let n=await NM();if(!n.ok)return n.error;let i=await $M(n.value.id,t);if(!i.ok)return await YN(n.value.id),i.error;r(n.value,{input:e})},pasteText:async t=>{let n=await NM();if(!n.ok)return n.error;let i=await QM(n.value.id,t);if(!i.ok)return await YN(n.value.id),i.error;r(n.value,{input:e})},remove:async()=>{},refresh:async()=>{}};return(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,M.jsxs)(`div`,{className:`mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col overflow-y-auto p-4`,children:[(0,M.jsx)(Z9,{}),o&&!o.file&&(0,M.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,M.jsx)(JF,{"aria-hidden":`true`}),` Thinking…`]})]}),(0,M.jsx)(Q9,{documents:d,input:e,onInputChange:t,onSubmit:t=>{t.preventDefault();let n=e.trim();n&&u({message:n})},inputRef:a,placeholder:`What do you want to learn?`,modelPicker:i,disabled:o!==void 0,action:(0,M.jsx)(N,{type:`submit`,disabled:!e.trim()||o!==void 0,children:`Send`})})]})}function Tle({onAdd:e}){let[t,n]=(0,v.useState)(`idle`),[r,i]=(0,v.useState)();return(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsxs)(N,{variant:`outline`,size:`xs`,className:`self-start`,disabled:t!==`idle`,onClick:async()=>{n(`adding`),i(void 0);let t=await e();i(t),n(t?`idle`:`added`)},children:[(0,M.jsx)(F_,{"aria-hidden":!0}),` `,t===`added`?`Added to lesson`:`Add to lesson`]}),r&&(0,M.jsx)(`span`,{className:`text-destructive text-xs`,children:r})]})}function $9(e){try{let t=JSON.parse(e.message);if(t.error)return t.error}catch{}return e.message}(0,ne.createRoot)(document.getElementById(`root`)).render((0,M.jsx)(v.StrictMode,{children:(0,M.jsx)(yle,{})}));
|