@okhay-p/mivra 0.1.5 → 0.1.7

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.
Files changed (62) hide show
  1. package/README.md +1 -0
  2. package/THIRD_PARTY_NOTICES.md +250 -0
  3. package/dist/{chunk-ODFBAPPH.js → chunk-M62PZTK3.js} +125 -6
  4. package/dist/chunk-M62PZTK3.js.map +7 -0
  5. package/dist/{chunk-KE5ZEREE.js → chunk-T5WM74CI.js} +2 -1
  6. package/dist/chunk-TKDX5OCX.js +2555 -0
  7. package/dist/chunk-TKDX5OCX.js.map +7 -0
  8. package/dist/{chunk-KUKQU7EQ.js → chunk-VHOVRHI3.js} +38 -10
  9. package/dist/{chunk-KUKQU7EQ.js.map → chunk-VHOVRHI3.js.map} +2 -2
  10. package/dist/cli.js +1099 -53
  11. package/dist/cli.js.map +4 -4
  12. package/dist/{client-5YDLS4KV.js → client-76YUHG4T.js} +2 -2
  13. package/dist/exercise-child.js +37 -0
  14. package/dist/exercise-child.js.map +7 -0
  15. package/dist/extract-child.js +2 -2
  16. package/dist/python-child.js +51 -0
  17. package/dist/python-child.js.map +7 -0
  18. package/dist/{start-2RXX57ZZ.js → start-GVAACONX.js} +5809 -2377
  19. package/dist/start-GVAACONX.js.map +7 -0
  20. package/drizzle/0019_public_doctor_faustus.sql +1 -0
  21. package/drizzle/0020_early_wolfpack.sql +3 -0
  22. package/drizzle/0021_strange_gamma_corps.sql +2 -0
  23. package/drizzle/0022_fast_forgotten_one.sql +28 -0
  24. package/drizzle/0023_low_wiccan.sql +17 -0
  25. package/drizzle/0024_windy_annihilus.sql +1 -0
  26. package/drizzle/0025_brief_rictor.sql +6 -0
  27. package/drizzle/0026_greedy_sally_floyd.sql +1 -0
  28. package/drizzle/0027_regular_calypso.sql +41 -0
  29. package/drizzle/0028_lazy_agent_zero.sql +17 -0
  30. package/drizzle/meta/0019_snapshot.json +2288 -0
  31. package/drizzle/meta/0020_snapshot.json +2297 -0
  32. package/drizzle/meta/0021_snapshot.json +2313 -0
  33. package/drizzle/meta/0022_snapshot.json +2529 -0
  34. package/drizzle/meta/0023_snapshot.json +2654 -0
  35. package/drizzle/meta/0024_snapshot.json +2662 -0
  36. package/drizzle/meta/0025_snapshot.json +2707 -0
  37. package/drizzle/meta/0026_snapshot.json +2714 -0
  38. package/drizzle/meta/0027_snapshot.json +2816 -0
  39. package/drizzle/meta/0028_snapshot.json +2940 -0
  40. package/drizzle/meta/_journal.json +70 -0
  41. package/package.json +6 -1
  42. package/web/assets/emscripten-module-uFzwHH0Y.wasm +0 -0
  43. package/web/assets/emscripten-module.browser-D72eEgXo.js +1 -0
  44. package/web/assets/exercise-workers/exercise.worker-LCHlYekD.js +265 -0
  45. package/web/assets/exercise-workers/python-exercise.worker-DeTriNjh.js +236 -0
  46. package/web/assets/ffi-4V2b7xu3.js +1 -0
  47. package/web/assets/index-CQjNLnxP.js +540 -0
  48. package/web/assets/index-DpV5il_3.css +1 -0
  49. package/web/assets/module-ES6BEMUI-B2wjplZC.js +1 -0
  50. package/web/assets/notes-graph.worker-Dqb5HK34.js +1 -0
  51. package/web/assets/render.worker-OksjuBjV.js +537 -0
  52. package/web/index.html +2 -2
  53. package/dist/chunk-ODFBAPPH.js.map +0 -7
  54. package/dist/chunk-YACRW47X.js +0 -1203
  55. package/dist/chunk-YACRW47X.js.map +0 -7
  56. package/dist/start-2RXX57ZZ.js.map +0 -7
  57. package/web/assets/index-DJ2D5ZXo.css +0 -1
  58. package/web/assets/index-DcYzUL1W.js +0 -413
  59. package/web/assets/notes-graph.worker-DaVQvftJ.js +0 -1
  60. package/web/assets/render.worker-BAfybD27.js +0 -416
  61. /package/dist/{chunk-KE5ZEREE.js.map → chunk-T5WM74CI.js.map} +0 -0
  62. /package/dist/{client-5YDLS4KV.js.map → client-76YUHG4T.js.map} +0 -0
@@ -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 ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function ie(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 ae(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,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+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+re(a,u),c+=ae(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+re(a,u++),c+=ae(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ae(ie(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 oe(e,t,n){if(e==null)return e;var r=[],i=0;return ae(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function k(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 se=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 ce(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,se)}catch(e){se(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function le(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 ce(le.bind(null,e))}var ue={map:oe,forEach:function(e,t,n){oe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return oe(e,function(){t++}),t},toArray:function(e){return oe(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ue,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=le,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=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:k}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ce,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&&ne(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&&ne(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 ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(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,ne(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`),ee=Symbol.for(`react.transitional.element`),te=Symbol.for(`react.portal`),ne=Symbol.for(`react.fragment`),re=Symbol.for(`react.strict_mode`),ie=Symbol.for(`react.profiler`),ae=Symbol.for(`react.consumer`),oe=Symbol.for(`react.context`),k=Symbol.for(`react.forward_ref`),se=Symbol.for(`react.suspense`),ce=Symbol.for(`react.suspense_list`),le=Symbol.for(`react.memo`),ue=Symbol.for(`react.lazy`),de=Symbol.for(`react.activity`),fe=Symbol.for(`react.legacy_hidden`),pe=Symbol.for(`react.memo_cache_sentinel`),me=Symbol.for(`react.view_transition`),he=Symbol.for(`react.recoverable`),ge=Symbol.iterator;function _e(e){return typeof e!=`object`||!e?null:(e=ge&&e[ge]||e[`@@iterator`],typeof e==`function`?e:null)}var ve=Symbol.for(`react.client.reference`);function ye(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ne:return`Fragment`;case ie:return`Profiler`;case re:return`StrictMode`;case se:return`Suspense`;case ce:return`SuspenseList`;case de:return`Activity`;case me:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case te:return`Portal`;case oe:return e.displayName||`Context`;case ae:return(e._context.displayName||`Context`)+`.Consumer`;case k:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case le:return t=e.displayName||null,t===null?ye(e.type)||`Memo`:t;case ue:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var be=Array.isArray,xe=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Se=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ce={pending:!1,data:null,method:null,action:null},we=[],Te=-1;function Ee(e){return{current:e}}function De(e){0>Te||(e.current=we[Te],we[Te]=null,Te--)}function Oe(e,t){Te++,we[Te]=e.current,e.current=t}var ke=Ee(null),Ae=Ee(null),je=Ee(null),Me=Ee(null);function Ne(e,t){switch(Oe(je,t),Oe(Ae,e),Oe(ke,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jp(t),e=Mp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}De(ke),Oe(ke,e)}function Pe(){De(ke),De(Ae),De(je)}function Fe(e){var t=e.memoizedState;t!==null&&(Eh._currentValue=t.memoizedState,Oe(Me,e)),t=ke.current;var n=Mp(t,e.type);t!==n&&(Oe(Ae,e),Oe(ke,n))}function Ie(e){Ae.current===e&&(De(ke),De(Ae)),Me.current===e&&(De(Me),Eh._currentValue=Ce)}var Le,Re;function ze(e){if(Le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Le=t&&t[1]||``,Re=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+Le+e+Re}var Be=!1;function Ve(e,t){if(!e||Be)return``;Be=!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{Be=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ze(n):``}function He(e,t){switch(e.tag){case 26:case 27:case 5:return ze(e.type);case 16:return ze(`Lazy`);case 13:return e.child!==t&&t!==null?ze(`Suspense Fallback`):ze(`Suspense`);case 19:return ze(`SuspenseList`);case 0:case 15:return Ve(e.type,!1);case 11:return Ve(e.type.render,!1);case 1:return Ve(e.type,!0);case 31:return ze(`Activity`);case 30:return ze(`ViewTransition`);default:return``}}function Ue(e){try{var t=``,n=null;do t+=He(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var We=Object.prototype.hasOwnProperty,Ge=t.unstable_scheduleCallback,Ke=t.unstable_cancelCallback,qe=t.unstable_shouldYield,Je=t.unstable_requestPaint,Ye=t.unstable_now,Xe=t.unstable_getCurrentPriorityLevel,Ze=t.unstable_ImmediatePriority,Qe=t.unstable_UserBlockingPriority,$e=t.unstable_NormalPriority,et=t.unstable_LowPriority,tt=t.unstable_IdlePriority,nt=t.log,rt=t.unstable_setDisableYieldValue,it=null,at=null;function ot(e){if(typeof nt==`function`&&rt(e),at&&typeof at.setStrictMode==`function`)try{at.setStrictMode(it,e)}catch{}}var st=Math.clz32?Math.clz32:ut,ct=Math.log,lt=Math.LN2;function ut(e){return e>>>=0,e===0?32:31-(ct(e)/lt|0)|0}var dt=256,ft=262144,pt=4194304;function mt(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 ht(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=mt(n))):i=mt(o):i=mt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=mt(n))):i=mt(o)):i=mt(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 gt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _t(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-st(n),i=1<<r;t|=e[r],n&=~i}return t}function vt(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 yt(){var e=pt;return pt<<=1,!(pt&62914560)&&(pt=4194304),e}function bt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function St(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-st(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&&Ct(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ct(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-st(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function wt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Tt(e,t){var n=t&-t;return n=n&42?1:Et(n),(n&(e.suspendedLanes|t))===0?n:0}function Et(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 Dt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ot(){var e=Se.p;return e===0?(e=window.event,e===void 0?32:Hh(e.type)):e}function kt(e,t){var n=Se.p;try{return Se.p=e,t()}finally{Se.p=n}}var At=Math.random().toString(36).slice(2),jt=`__reactFiber$`+At,Mt=`__reactProps$`+At,Nt=`__reactContainer$`+At,Pt=`__reactEvents$`+At,Ft=`__reactListeners$`+At,A=`__reactHandles$`+At,It=`__reactResources$`+At,Lt=`__reactMarker$`+At,Rt=`__reactLoad$`+At;function zt(e){delete e[jt],delete e[Mt],delete e[Ft],delete e[A]}function Bt(e){var t;if(t=e[jt])return t;for(var n=e.parentNode;n;){if(t=n[Nt]||n[jt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Nm(e);e!==null;){if(n=e[jt])return n;e=Nm(e)}return t}e=n,n=e.parentNode}return null}function Vt(e){if(e=e[jt]||e[Nt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ut(e){var t=e[It];return t||=e[It]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Wt(e){e[Lt]=!0}function Gt(e){e[Rt]=void 0}var Kt=new Set,qt={};function Jt(e,t){Yt(e,t),Yt(e+`Capture`,t)}function Yt(e,t){for(qt[e]=t,e=0;e<t.length;e++)Kt.add(t[e])}var Xt=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]*$`),Zt={},Qt={};function $t(e){return We.call(Qt,e)?!0:We.call(Zt,e)?!1:Xt.test(e)?Qt[e]=!0:(Zt[e]=!0,!1)}var en=!1;function tn(){var e=en;return en=!1,e}function nn(e,t,n){if($t(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 rn(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 an(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 on(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function sn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function j(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 cn(e){if(!e._valueTracker){var t=sn(e)?`checked`:`value`;e._valueTracker=j(e,t,``+e[t])}}function ln(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=sn(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var un=/[\n"\\]/g;function dn(e){return e.replace(un,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function fn(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=``+on(t)):e.value!==``+on(t)&&(e.value=``+on(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):mn(e,on(n)):o===`number`&&e.value==t?mn(e,on(e.value)):mn(e,on(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=``+on(s):e.removeAttribute(`name`)}function pn(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)){cn(e);return}n=n==null?``:``+on(n),t=t==null?n:``+on(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),cn(e)}function mn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function hn(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=``+on(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 gn(e,t,n){t!=null&&(t=``+on(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+on(n)}function _n(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(be(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=on(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),cn(e)}function vn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var yn=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 bn(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||yn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function xn(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]=``,en=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(bn(e,a,r),en=!0)}else for(var o in t)t.hasOwnProperty(o)&&bn(e,o,t[o])}function Sn(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 Cn=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`]]),wn=/^[\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 Tn(e){return wn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function En(){}var Dn=null;function On(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kn=null,An=null;function jn(e){var t=Vt(e);if(t&&(e=t.stateNode)){var n=e[Mt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(fn(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="`+dn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Mt]||null;if(!a)throw Error(i(90));fn(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&&ln(r)}break a;case`textarea`:gn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&hn(e,!!n.multiple,t,!1)}}}var Mn=!1;function Nn(e,t,n){if(Mn)return e(t,n);Mn=!0;try{return e(t)}finally{if(Mn=!1,(kn!==null||An!==null)&&(af(),kn&&(t=kn,e=An,An=kn=null,jn(t),e)))for(t=0;t<e.length;t++)jn(e[t])}}function Pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Mt]||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 Fn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,In=!1;if(Fn)try{var Ln={};Object.defineProperty(Ln,"passive",{get:function(){In=!0}}),window.addEventListener(`test`,Ln,Ln),window.removeEventListener(`test`,Ln,Ln)}catch{In=!1}var Rn=null,zn=null,Bn=null;function Vn(){if(Bn)return Bn;var e,t=zn,n=t.length,r,i=`value`in Rn?Rn.value:Rn.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 Bn=i.slice(e,1<r?1-r:void 0)}function Hn(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 Un(){return!0}function Wn(){return!1}function Gn(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)?Un:Wn,this.isPropagationStopped=Wn,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=Un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Un)},persist:function(){},isPersistent:Un}),t}var Kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qn=Gn(Kn),Jn=D({},Kn,{view:0,detail:0}),Yn=Gn(Jn),Xn,Zn,Qn,$n=D({},Jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ur,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!==Qn&&(Qn&&e.type===`mousemove`?(Xn=e.screenX-Qn.screenX,Zn=e.screenY-Qn.screenY):Zn=Xn=0,Qn=e),Xn)},movementY:function(e){return`movementY`in e?e.movementY:Zn}}),er=Gn($n),tr=Gn(D({},$n,{dataTransfer:0})),nr=Gn(D({},Jn,{relatedTarget:0})),rr=Gn(D({},Kn,{animationName:0,elapsedTime:0,pseudoElement:0})),ir=Gn(D({},Kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),ar=Gn(D({},Kn,{data:0})),or={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},sr={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`},cr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function lr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cr[e])?!!t[e]:!1}function ur(){return lr}var dr=Gn(D({},Jn,{key:function(e){if(e.key){var t=or[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?sr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ur,charCode:function(e){return e.type===`keypress`?Hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),fr=Gn(D({},$n,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),pr=Gn(D({},Kn,{submitter:0})),mr=Gn(D({},Jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ur})),hr=Gn(D({},Kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),gr=Gn(D({},$n,{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})),_r=Gn(D({},Kn,{newState:0,oldState:0,source:0})),vr=[9,13,27,32],yr=Fn&&`CompositionEvent`in window,br=null;Fn&&`documentMode`in document&&(br=document.documentMode);var xr=Fn&&`TextEvent`in window&&!br,Sr=Fn&&(!yr||br&&8<br&&11>=br),Cr=` `,wr=!1;function Tr(e,t){switch(e){case`keyup`:return vr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Dr=!1;function Or(e,t){switch(e){case`compositionend`:return Er(t);case`keypress`:return t.which===32?(wr=!0,Cr):null;case`textInput`:return e=t.data,e===Cr&&wr?null:e;default:return null}}function kr(e,t){if(Dr)return e===`compositionend`||!yr&&Tr(e,t)?(e=Vn(),Bn=zn=Rn=null,Dr=!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 Sr&&t.locale!==`ko`?null:t.data;default:return null}}var Ar={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 jr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Ar[e.type]:t===`textarea`}function Mr(e,t,n,r){kn?An?An.push(r):An=[r]:kn=r,t=hp(t,`onChange`),0<t.length&&(n=new qn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Nr=null,Pr=null;function Fr(e){sp(e,0)}function Ir(e){if(ln(Ht(e)))return e}function Lr(e,t){if(e===`change`)return t}var Rr=!1;if(Fn){var zr;if(Fn){var Br=`oninput`in document;if(!Br){var Vr=document.createElement(`div`);Vr.setAttribute(`oninput`,`return;`),Br=typeof Vr.oninput==`function`}zr=Br}else zr=!1;Rr=zr&&(!document.documentMode||9<document.documentMode)}function Hr(){Nr&&(Nr.detachEvent(`onpropertychange`,Ur),Pr=Nr=null)}function Ur(e){if(e.propertyName===`value`&&Ir(Pr)){var t=[];Mr(t,Pr,e,On(e)),Nn(Fr,t)}}function Wr(e,t,n){e===`focusin`?(Hr(),Nr=t,Pr=n,Nr.attachEvent(`onpropertychange`,Ur)):e===`focusout`&&Hr()}function Gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ir(Pr)}function Kr(e,t){if(e===`click`)return Ir(t)}function qr(e,t){if(e===`input`||e===`change`)return Ir(t)}function Jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Yr=typeof Object.is==`function`?Object.is:Jr;function Xr(e,t){if(Yr(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(!We.call(t,i)||!Yr(e[i],t[i]))return!1}return!0}function Zr(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 Qr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $r(e,t){var n=Qr(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=Qr(n)}}function ei(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ei(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ti(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zr(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=Zr(e.document)}return t}function ni(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 ri=Fn&&`documentMode`in document&&11>=document.documentMode,ii=null,ai=null,oi=null,si=!1;function ci(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;si||ii==null||ii!==Zr(r)||(r=ii,`selectionStart`in r&&ni(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}),oi&&Xr(oi,r)||(oi=r,r=hp(ai,`onSelect`),0<r.length&&(t=new qn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=ii)))}function li(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ui={animationend:li(`Animation`,`AnimationEnd`),animationiteration:li(`Animation`,`AnimationIteration`),animationstart:li(`Animation`,`AnimationStart`),transitionrun:li(`Transition`,`TransitionRun`),transitionstart:li(`Transition`,`TransitionStart`),transitioncancel:li(`Transition`,`TransitionCancel`),transitionend:li(`Transition`,`TransitionEnd`)},di={},fi={};Fn&&(fi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),`TransitionEvent`in window||delete ui.transitionend.transition);function pi(e){if(di[e])return di[e];if(!ui[e])return e;var t=ui[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in fi)return di[e]=t[n];return e}var mi=pi(`animationend`),hi=pi(`animationiteration`),gi=pi(`animationstart`),_i=pi(`transitionrun`),vi=pi(`transitionstart`),yi=pi(`transitioncancel`),bi=pi(`transitionend`),xi=new Map,Si=`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(` `);Si.push(`scrollEnd`);function Ci(e,t){xi.set(e,t),Jt(t,[e])}var wi=0;function Ti(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=zd.identifierPrefix;var n=wi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function Ei(e){if(e==null||typeof e==`string`)return e;var t=null,n=qd;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 Di(e,t){return e=Ei(e),t=Ei(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Oi=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)},ki=[],Ai=0,ji=0;function Mi(){for(var e=Ai,t=ji=Ai=0;t<e;){var n=ki[t];ki[t++]=null;var r=ki[t];ki[t++]=null;var i=ki[t];ki[t++]=null;var a=ki[t];if(ki[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&&Ii(n,i,a)}}function Ni(e,t,n,r){ki[Ai++]=e,ki[Ai++]=t,ki[Ai++]=n,ki[Ai++]=r,ji|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Pi(e,t,n,r){return Ni(e,t,n,r),Li(e)}function Fi(e,t){return Ni(e,null,null,t),Li(e)}function Ii(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-st(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Li(e){if(50<Jd)throw Jd=0,Yd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ri={};function zi(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 Bi(e,t,n,r){return new zi(e,t,n,r)}function Vi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hi(e,t){var n=e.alternate;return n===null?(n=Bi(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 Ui(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 Wi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Vi(r)&&(s=1);else if(typeof r==`string`)s=ph(e,n,ke.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case de:return e=Bi(31,n,t,a),e.elementType=de,e.lanes=o,e;case ne:return Gi(n.children,a,o,t);case re:s=8,a|=24;break;case ie:return e=Bi(12,n,t,a|2),e.elementType=ie,e.lanes=o,e;case se:return e=Bi(13,n,t,a),e.elementType=se,e.lanes=o,e;case ce:return e=Bi(19,n,t,a),e.elementType=ce,e.lanes=o,e;case fe:case me:return e=a|32,e=Bi(30,n,t,e),e.elementType=me,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case oe:s=10;break a;case ae:s=9;break a;case k:s=11;break a;case le:s=14;break a;case ue:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Bi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Gi(e,t,n,r){return e=Bi(7,e,r,t),e.lanes=n,e}function Ki(e,t,n){return e=Bi(6,e,null,t),e.lanes=n,e}function qi(e){var t=Bi(18,null,null,0);return t.stateNode=e,t}function Ji(e,t,n){return t=Bi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yi=new WeakMap;function Xi(e,t){if(typeof e==`object`&&e){var n=Yi.get(e);return n===void 0?(t={value:e,source:t,stack:Ue(t)},Yi.set(e,t),t):n}return{value:e,source:t,stack:Ue(t)}}var Zi=[],Qi=0,$i=null,ea=0,ta=[],na=0,ra=null,ia=1,aa=``;function oa(e,t){Zi[Qi++]=ea,Zi[Qi++]=$i,$i=e,ea=t}function sa(e,t,n){ta[na++]=ia,ta[na++]=aa,ta[na++]=ra,ra=e;var r=ia;e=aa;var i=32-st(r)-1;r&=~(1<<i),n+=1;var a=32-st(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ia=1<<32-st(t)+i|n<<i|r,aa=a+e}else ia=1<<a|n<<i|r,aa=e}function ca(e){e.return!==null&&(oa(e,1),sa(e,1,0))}function la(e){for(;e===$i;)$i=Zi[--Qi],Zi[Qi]=null,ea=Zi[--Qi],Zi[Qi]=null;for(;e===ra;)ra=ta[--na],ta[na]=null,aa=ta[--na],ta[na]=null,ia=ta[--na],ta[na]=null}function ua(e,t){ta[na++]=ia,ta[na++]=aa,ta[na++]=ra,ia=t.id,aa=t.overflow,ra=e}var da=null,fa=null,pa=!1,ma=null,ha=!1,ga=Error(i(519));function _a(e){throw Ca(Xi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ga}function va(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[jt]=e,t[Mt]=r,n){case`dialog`:cp(`cancel`,t),cp(`close`,t);break;case`iframe`:case`object`:case`embed`:cp(`load`,t);break;case`video`:case`audio`:for(n=0;n<ap.length;n++)cp(ap[n],t);break;case`source`:cp(`error`,t);break;case`img`:case`image`:case`link`:cp(`error`,t),cp(`load`,t);break;case`details`:cp(`toggle`,t);break;case`input`:cp(`invalid`,t),pn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:cp(`invalid`,t);break;case`textarea`:cp(`invalid`,t),_n(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||xp(t.textContent,n)?(r.popover!=null&&(cp(`beforetoggle`,t),cp(`toggle`,t)),r.onScroll!=null&&cp(`scroll`,t),r.onScrollEnd!=null&&cp(`scrollend`,t),r.onClick!=null&&(t.onclick=En),t=!0):t=!1,t||_a(e,!0)}function ya(e){for(da=e.return;da;)switch(da.tag){case 5:case 31:case 13:ha=!1;return;case 27:case 3:ha=!0;return;default:da=da.return}}function ba(e){if(e!==da)return!1;if(!pa)return ya(e),pa=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Pp(e.type,e.memoizedProps)),n=!n),n&&fa&&_a(e),ya(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));fa=Mm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));fa=Mm(e)}else t===27?(t=fa,Up(e.type)?(e=jm,jm=null,fa=e):fa=t):fa=da?Am(e.stateNode.nextSibling):null;return!0}function xa(){fa=da=null,pa=!1}function Sa(){var e=ma;return e!==null&&(jd===null?jd=e:jd.push.apply(jd,e),ma=null),e}function Ca(e){ma===null?ma=[e]:ma.push(e)}var wa=Ee(null),Ta=null,Ea=null;function Da(e,t,n){Oe(wa,t._currentValue),t._currentValue=n}function Oa(e){e._currentValue=wa.current,De(wa)}function ka(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 Aa(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),ka(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),ka(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),ka(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 ja(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;Yr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Me.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Eh]:e.push(Eh))}a=a.return}return e!==null&&Aa(t,e,n,r),t.flags|=262144,e!==null}function Ma(e){for(e=e.firstContext;e!==null;){if(!Yr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Na(e){Ta=e,Ea=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pa(e){return Ia(Ta,e)}function Fa(e,t){return Ta===null&&Na(e),Ia(e,t)}function Ia(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ea===null){if(e===null)throw Error(i(308));Ea=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ea=Ea.next=t;return n}var La=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()})}},Ra=t.unstable_scheduleCallback,za=t.unstable_NormalPriority,Ba={$$typeof:oe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Va(){return{controller:new La,data:new Map,refCount:0}}function Ha(e){e.refCount--,e.refCount===0&&Ra(za,function(){e.controller.abort()})}function Ua(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 Wa=null;function Ga(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ka=null,qa=0,Ja=0,Ya=null;function Xa(e,t){if(Ka===null){var n=Ka=[];qa=0,Ja=ep(),Ya={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return qa++,t.then(Za,Za),t}function Za(){if(--qa===0&&(Wa=null,Ka!==null)){Ya!==null&&(Ya.status=`fulfilled`);var e=Ka;Ka=null,Ja=0,Ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Qa(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 $a=xe.S;xe.S=function(e,t){if(Pd=Ye(),typeof t==`object`&&t&&typeof t.then==`function`&&Xa(e,t),Wa!==null)for(var n=Bf;n!==null;)Ua(n,Wa),n=n.next;if(n=e.types,n!==null){for(var r=Bf;r!==null;)Ua(r,n),r=r.next;if(Ja!==0){r=Wa,r===null&&(r=Wa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}$a!==null&&$a(e,t)};var eo=Ee(null);function to(){var e=eo.current;return e===null?hd.pooledCache:e}function no(e,t){t===null?Oe(eo,eo.current):Oe(eo,t.pool)}function ro(){var e=to();return e===null?null:{parent:Ba._currentValue,pool:e}}var io=Error(i(460)),ao=Error(i(474)),oo=Error(i(542)),so={then:function(){}};function co(e){return e=e.status,e===`fulfilled`||e===`rejected`}function lo(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(En,En),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,mo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(En,En);else{if(e=hd,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,mo(e),e}throw fo=t,io}}function uo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(fo=e,io):e}}var fo=null;function po(){if(fo===null)throw Error(i(459));var e=fo;return fo=null,e}function mo(e){if(e===io||e===oo)throw Error(i(483))}var ho=null,go=0;function _o(e){var t=go;return go+=1,ho===null&&(ho=[]),lo(ho,e,t)}function vo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function yo(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 bo(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=Hi(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=Ki(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===ne?(e=d(e,t,n.props.children,r,n.key),vo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ue&&uo(i)===t.type)?(t=a(t,n.props),vo(t,n),t.return=e,t):(t=Wi(n.type,n.key,n.props,null,e.mode,r),vo(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=Ji(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=Gi(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=Ki(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ee:return n=Wi(t.type,t.key,t.props,null,e.mode,n),vo(n,t),n.return=e,n;case te:return t=Ji(t,e.mode,n),t.return=e,t;case ue:return t=uo(t),f(e,t,n)}if(be(t)||_e(t))return t=Gi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,_o(t),n);if(t.$$typeof===oe)return f(e,Fa(e,t),n);yo(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 ee:return n.key===i?l(e,t,n,r):null;case te:return n.key===i?u(e,t,n,r):null;case ue:return n=uo(n),p(e,t,n,r)}if(be(n)||_e(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,_o(n),r);if(n.$$typeof===oe)return p(e,t,Fa(e,n),r);yo(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 ee:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case te:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ue:return r=uo(r),m(e,t,n,r,i)}if(be(r)||_e(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,_o(r),i);if(r.$$typeof===oe)return m(e,t,n,Fa(t,r),i);yo(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),pa&&oa(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 pa&&oa(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)}),pa&&oa(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),pa&&oa(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 pa&&oa(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)}),pa&&oa(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ne&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ee:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ne){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),vo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ue&&uo(l)===r.type){n(e,r.sibling),c=a(r,o.props),vo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ne?(c=Gi(o.props.children,e.mode,c,o.key),vo(c,o),c.return=e,e=c):(c=Wi(o.type,o.key,o.props,null,e.mode,c),vo(c,o),c.return=e,e=c)}return s(e);case te: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=Ji(o,e.mode,c),c.return=e,e=c}return s(e);case ue:return o=uo(o),_(e,r,o,c)}if(be(o))return h(e,r,o,c);if(_e(o)){if(l=_e(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,_o(o),c);if(o.$$typeof===oe)return _(e,r,Fa(e,o),c);yo(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=Ki(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{go=0;var i=_(e,t,n,r);return ho=null,i}catch(t){if(t===io||t===oo)throw t;var a=Bi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var xo=bo(!0),So=bo(!1),Co=!1;function wo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function To(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 Eo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Do(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,md&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Li(e),Ii(e,null,n),t}return Ni(e,r,t,n),Li(e)}function Oo(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,wt(e,n)}}function ko(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 Ao=!1;function jo(){if(Ao){var e=Ya;if(e!==null)throw e}}function Mo(e,t,n,r){Ao=!1;var i=e.updateQueue;Co=!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?(_d&f)===f:(r&f)===f){f!==0&&f===Ja&&(Ao=!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:Co=!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),Td|=o,e.lanes=o,e.memoizedState=d}}function No(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Po(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)No(n[e],t)}var Fo=Ee(null),Io=Ee(0);function Lo(e,t){e=Cd,Oe(Io,e),Oe(Fo,t),Cd=e|t.baseLanes}function Ro(){Oe(Io,Cd),Oe(Fo,Fo.current)}function zo(){Cd=Io.current,De(Fo),De(Io)}var Bo=Ee(null),Vo=null;function Ho(e){var t=e.alternate;Oe(qo,qo.current&1),Oe(Bo,e),Vo===null&&(t===null||Fo.current!==null||t.memoizedState!==null)&&(Vo=e)}function Uo(e){Oe(qo,qo.current),Oe(Bo,e),Vo===null&&(Vo=e)}function Wo(e){e.tag===22?(Oe(qo,qo.current),Oe(Bo,e),Vo===null&&(Vo=e)):Go()}function Go(){Oe(qo,qo.current),Oe(Bo,Bo.current)}function Ko(e){De(Bo),Vo===e&&(Vo=null),De(qo)}var qo=Ee(0);function Jo(e,t){Oe(Bo,Bo.current),Oe(qo,t)}function Yo(e){De(qo),De(Bo),Vo===e&&(Vo=null)}function Xo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Dm(n)||Om(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 Zo=0,Qo=null,$o=null,es=null,ts=!1,ns=!1,rs=!1,is=0,as=0,os=null,ss=0;function cs(){throw Error(i(321))}function ls(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Yr(e[n],t[n]))return!1;return!0}function us(e,t,n,r,i,a){return Zo=a,Qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xe.H=e===null||e.memoizedState===null?Dc:Oc,rs=!1,a=n(r,i),rs=!1,ns&&(a=fs(t,n,r,i)),ds(e),a}function ds(e){xe.H=Ec;var t=$o!==null&&$o.next!==null;if(Zo=0,es=$o=Qo=null,ts=!1,as=0,os=null,t)throw Error(i(300));e===null||Gc||(e=e.dependencies,e!==null&&Ma(e)&&(Gc=!0))}function fs(e,t,n,r){Qo=e;var a=0;do{if(ns&&(os=null),as=0,ns=!1,25<=a)throw Error(i(301));if(a+=1,es=$o=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}xe.H=kc,o=t(n,r)}while(ns);return o}function ps(){var e=xe.H,t=e.useState()[0];return t=typeof t.then==`function`?bs(t):t,e=e.useState()[0],($o===null?null:$o.memoizedState)!==e&&(Qo.flags|=1024),t}function ms(){var e=is!==0;return is=0,e}function hs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function gs(e){if(ts){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ts=!1}Zo=0,es=$o=Qo=null,ns=!1,as=is=0,os=null}function _s(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return es===null?Qo.memoizedState=es=e:es=es.next=e,es}function vs(){if($o===null){var e=Qo.alternate;e=e===null?null:e.memoizedState}else e=$o.next;var t=es===null?Qo.memoizedState:es.next;if(t!==null)es=t,$o=e;else{if(e===null)throw Qo.alternate===null?Error(i(467)):Error(i(310));$o=e,e={memoizedState:$o.memoizedState,baseState:$o.baseState,baseQueue:$o.baseQueue,queue:$o.queue,next:null},es===null?Qo.memoizedState=es=e:es=es.next=e}return es}function ys(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bs(e){var t=as;return as+=1,os===null&&(os=[]),e=lo(os,e,t),t=Qo,(es===null?t.memoizedState:es.next)===null&&(t=t.alternate,xe.H=t===null||t.memoizedState===null?Dc:Oc),e}function xs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return bs(e);if(e.$$typeof===he)return;if(e.$$typeof===oe)return Pa(e)}throw Error(i(438,String(e)))}function Ss(e){var t=null,n=Qo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Qo.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=ys(),Qo.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]=pe;return t.index++,n}function Cs(e,t){return typeof t==`function`?t(e):t}function ws(e){return Ts(vs(),$o,e)}function Ts(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?(Zo&f)===f:(_d&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===Ja&&(d=!0);else if((Zo&p)===p){u=u.next,p===Ja&&(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,Qo.lanes|=p,Td|=p;f=u.action,rs&&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,Qo.lanes|=f,Td|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Yr(o,e.memoizedState)&&(Gc=!0,d&&(n=Ya,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 Es(e){var t=vs(),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);Yr(o,t.memoizedState)||(Gc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ds(e,t,n){var r=Qo,a=vs(),o=pa;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Yr(($o||a).memoizedState,n);if(s&&(a.memoizedState=n,Gc=!0),a=a.queue,Qs(As.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||es!==null&&!!(es.memoizedState.tag&1),qs(e?9:8,{destroy:void 0},ks.bind(null,r,a,n,t),null),e){if(r.flags|=2048,hd===null)throw Error(i(349));o||Zo&127||Os(r,t,n)}return n}function Os(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Qo.updateQueue,t===null?(t=ys(),Qo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ks(e,t,n,r){t.value=n,t.getSnapshot=r,js(t)&&Ms(e)}function As(e,t,n){return n(function(){js(t)&&Ms(e)})}function js(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Yr(e,n)}catch{return!0}}function Ms(e){var t=Fi(e,2);t!==null&&$d(t,e,2)}function Ns(e){var t=_s();if(typeof e==`function`){var n=e;if(e=n(),rs){ot(!0);try{n()}finally{ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:e},t}function Ps(e,t,n,r){return e.baseState=n,Ts(e,$o,typeof r==`function`?r:Cs)}function Fs(e,t,n,r,a){if(Cc(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)}};xe.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Is(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Is(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=xe.T,o={};o.types=a===null?null:a.types,xe.T=o;try{var s=n(i,r),c=xe.S;c!==null&&c(o,s),Ls(e,t,s)}catch(n){zs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),xe.T=a}}else try{a=n(i,r),Ls(e,t,a)}catch(n){zs(e,t,n)}}function Ls(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Rs(e,t,n)},function(n){return zs(e,t,n)}):Rs(e,t,n)}function Rs(e,t,n){t.status=`fulfilled`,t.value=n,Bs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Is(e,n)))}function zs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Bs(t),t=t.next;while(t!==r)}e.action=null}function Bs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vs(e,t){return t}function Hs(e,t){if(pa){var n=hd.formState;if(n!==null){a:{var r=Qo;if(pa){if(fa){b:{for(var i=fa,a=ha;i.nodeType!==8;)if(!a||(i=Am(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){fa=Am(i.nextSibling),r=i.data===`F!`;break a}}_a(r)}r=!1}r&&(t=n[0])}}return n=_s(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vs,lastRenderedState:t},n.queue=r,n=bc.bind(null,Qo,r),r.dispatch=n,r=Ns(!1),a=Sc.bind(null,Qo,!1,r.queue),r=_s(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Fs.bind(null,Qo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Us(e){return Ws(vs(),$o,e)}function Ws(e,t,n){if(t=Ts(e,t,Vs)[0],e=ws(Cs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=bs(t)}catch(e){throw e===io?oo:e}else r=t;t=vs();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Qo.flags|=2048,qs(9,{destroy:void 0},Gs.bind(null,i,n),null)),[r,a,e]}function Gs(e,t){e.action=t}function Ks(e){var t=vs(),n=$o;if(n!==null)return Ws(t,n,e);vs(),t=t.memoizedState,n=vs();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function qs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Qo.updateQueue,t===null&&(t=ys(),Qo.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 Js(){return vs().memoizedState}function Ys(e,t,n,r){var i=_s();Qo.flags|=e,i.memoizedState=qs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Xs(e,t,n,r){var i=vs();r=r===void 0?null:r;var a=i.memoizedState.inst;$o!==null&&r!==null&&ls(r,$o.memoizedState.deps)?i.memoizedState=qs(t,a,n,r):(Qo.flags|=e,i.memoizedState=qs(1|t,a,n,r))}function Zs(e,t){Ys(8390656,8,e,t)}function Qs(e,t){Xs(2048,8,e,t)}function $s(e){Qo.flags|=4;var t=Qo.updateQueue;if(t===null)t=ys(),Qo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ec(e){var t=vs().memoizedState;return $s({ref:t,nextImpl:e}),function(){if(md&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function tc(e,t){return Xs(4,2,e,t)}function nc(e,t){return Xs(4,4,e,t)}function rc(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 ic(e,t,n){n=n==null?null:n.concat([e]),Xs(4,4,rc.bind(null,t,e),n)}function ac(){}function oc(e,t){var n=vs();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ls(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function sc(e,t){var n=vs();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ls(t,r[1]))return r[0];if(r=e(),rs){ot(!0);try{e()}finally{ot(!1)}}return n.memoizedState=[r,t],r}function cc(e,t,n){return n===void 0||Zo&1073741824&&!(_d&261930)?e.memoizedState=t:(e.memoizedState=n,e=Zd(),Qo.lanes|=e,Td|=e,n)}function lc(e,t,n,r){return Yr(n,t)?n:Fo.current===null?!(Zo&106)||Zo&1073741824&&!(_d&261930)?(Gc=!0,e.memoizedState=n):(e=Zd(),Qo.lanes|=e,Td|=e,t):(e=cc(e,n,r),Yr(e,t)||(Gc=!0),e)}function uc(e,t,n,r,i){var a=Se.p;Se.p=a!==0&&8>a?a:8;var o=xe.T,s={};s.types=o===null?null:o.types,xe.T=s,Sc(e,!1,t,n);try{var c=i(),l=xe.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?xc(e,t,Qa(c,r),Xd(e)):xc(e,t,r,Xd(e))}catch(n){xc(e,t,{then:function(){},status:`rejected`,reason:n},Xd())}finally{Se.p=a,o!==null&&s.types!==null&&(o.types=s.types),xe.T=o}}function dc(){}function fc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=pc(e).queue;uc(e,a,t,Ce,n===null?dc:function(){return mc(e),n(r)})}function pc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ce,baseState:Ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:Ce},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function mc(e){var t=pc(e);t.next===null&&(t=e.alternate.memoizedState),xc(e,t.next.queue,{},Xd())}function hc(){return Pa(Eh)}function gc(){return vs().memoizedState}function _c(){return vs().memoizedState}function vc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Xd();e=Eo(n);var r=Do(t,e,n);r!==null&&($d(r,t,n),Oo(r,t,n)),t={cache:Va()},e.payload=t;return}t=t.return}}function yc(e,t,n){var r=Xd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cc(e)?wc(t,n):(n=Pi(e,t,n,r),n!==null&&($d(n,e,r),Tc(n,t,r)))}function bc(e,t,n){xc(e,t,n,Xd())}function xc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cc(e))wc(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,Yr(s,o))return Ni(e,t,i,0),hd===null&&Mi(),!1}catch{}if(n=Pi(e,t,i,r),n!==null)return $d(n,e,r),Tc(n,t,r),!0}return!1}function Sc(e,t,n,r){if(r={lane:2,revertLane:ep(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Cc(e)){if(t)throw Error(i(479))}else t=Pi(e,n,r,2),t!==null&&$d(t,e,2)}function Cc(e){var t=e.alternate;return e===Qo||t!==null&&t===Qo}function wc(e,t){ns=ts=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Tc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wt(e,n)}}var Ec={readContext:Pa,use:xs,useCallback:cs,useContext:cs,useEffect:cs,useImperativeHandle:cs,useLayoutEffect:cs,useInsertionEffect:cs,useMemo:cs,useReducer:cs,useRef:cs,useState:cs,useDebugValue:cs,useDeferredValue:cs,useTransition:cs,useSyncExternalStore:cs,useId:cs,useHostTransitionStatus:cs,useFormState:cs,useActionState:cs,useOptimistic:cs,useMemoCache:cs,useCacheRefresh:cs,useEffectEvent:cs},Dc={readContext:Pa,use:xs,useCallback:function(e,t){return _s().memoizedState=[e,t===void 0?null:t],e},useContext:Pa,useEffect:Zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ys(4194308,4,rc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ys(4194308,4,e,t)},useInsertionEffect:function(e,t){Ys(4,2,e,t)},useMemo:function(e,t){var n=_s();t=t===void 0?null:t;var r=e();if(rs){ot(!0);try{e()}finally{ot(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=_s();if(n!==void 0){var i=n(t);if(rs){ot(!0);try{n(t)}finally{ot(!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=yc.bind(null,Qo,e),[r.memoizedState,e]},useRef:function(e){var t=_s();return e={current:e},t.memoizedState=e},useState:function(e){e=Ns(e);var t=e.queue,n=bc.bind(null,Qo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ac,useDeferredValue:function(e,t){return cc(_s(),e,t)},useTransition:function(){var e=Ns(!1);return e=uc.bind(null,Qo,e.queue,!0,!1),_s().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Qo,a=_s();if(pa){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),hd===null)throw Error(i(349));_d&127||Os(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Zs(As.bind(null,r,o,e),[e]),r.flags|=2048,qs(9,{destroy:void 0},ks.bind(null,r,o,n,t),null),n},useId:function(){var e=_s(),t=hd.identifierPrefix;if(pa){var n=aa,r=ia;n=(r&~(1<<32-st(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=is++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ss++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:hc,useFormState:Hs,useActionState:Hs,useOptimistic:function(e){var t=_s();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Sc.bind(null,Qo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ss,useCacheRefresh:function(){return _s().memoizedState=vc.bind(null,Qo)},useEffectEvent:function(e){var t=_s(),n={impl:e};return t.memoizedState=n,function(){if(md&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Oc={readContext:Pa,use:xs,useCallback:oc,useContext:Pa,useEffect:Qs,useImperativeHandle:ic,useInsertionEffect:tc,useLayoutEffect:nc,useMemo:sc,useReducer:ws,useRef:Js,useState:function(){return ws(Cs)},useDebugValue:ac,useDeferredValue:function(e,t){return lc(vs(),$o.memoizedState,e,t)},useTransition:function(){var e=ws(Cs)[0],t=vs().memoizedState;return[typeof e==`boolean`?e:bs(e),t]},useSyncExternalStore:Ds,useId:gc,useHostTransitionStatus:hc,useFormState:Us,useActionState:Us,useOptimistic:function(e,t){return Ps(vs(),$o,e,t)},useMemoCache:Ss,useCacheRefresh:_c,useEffectEvent:ec},kc={readContext:Pa,use:xs,useCallback:oc,useContext:Pa,useEffect:Qs,useImperativeHandle:ic,useInsertionEffect:tc,useLayoutEffect:nc,useMemo:sc,useReducer:Es,useRef:Js,useState:function(){return Es(Cs)},useDebugValue:ac,useDeferredValue:function(e,t){var n=vs();return $o===null?cc(n,e,t):lc(n,$o.memoizedState,e,t)},useTransition:function(){var e=Es(Cs)[0],t=vs().memoizedState;return[typeof e==`boolean`?e:bs(e),t]},useSyncExternalStore:Ds,useId:gc,useHostTransitionStatus:hc,useFormState:Ks,useActionState:Ks,useOptimistic:function(e,t){var n=vs();return $o===null?(n.baseState=e,[e,n.queue.dispatch]):Ps(n,$o,e,t)},useMemoCache:Ss,useCacheRefresh:_c,useEffectEvent:ec};function Ac(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 jc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xd(),i=Eo(r);i.payload=t,n!=null&&(i.callback=n),t=Do(e,i,r),t!==null&&($d(t,e,r),Oo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xd(),i=Eo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Do(e,i,r),t!==null&&($d(t,e,r),Oo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xd(),r=Eo(n);r.tag=2,t!=null&&(r.callback=t),t=Do(e,r,n),t!==null&&($d(t,e,n),Oo(t,e,n))}};function Mc(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?!Xr(n,r)||!Xr(i,a):!0}function Nc(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&&jc.enqueueReplaceState(t,t.state,null)}function Pc(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 Fc(e){Oi(e)}function Ic(e){console.error(e)}function Lc(e){Oi(e)}function Rc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function zc(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 Bc(e,t,n){return n=Eo(n),n.tag=3,n.payload={element:null},n.callback=function(){Rc(e,t)},n}function Vc(e){return e=Eo(e),e.tag=3,e}function Hc(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(){zc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){zc(t,n,r),typeof i!=`function`&&(Ld===null?Ld=new Set([this]):Ld.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Uc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ja(t,n,a,!0),n=Bo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Vo===null?ff():n.alternate===null&&wd===0&&(wd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===so?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Pf(e,r,a)),!1;case 22:return n.flags|=65536,r===so?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)),Pf(e,r,a)),!1}throw Error(i(435,n.tag))}return Pf(e,r,a),ff(),!1}if(pa)return t=Bo.current,t===null?(r!==ga&&(t=Error(i(423),{cause:r}),Ca(Xi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Xi(r,n),a=Bc(e.stateNode,r,a),ko(e,a),wd!==4&&(wd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ga&&(e=Error(i(422),{cause:r}),Ca(Xi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Xi(o,n),Ad===null?Ad=[o]:Ad.push(o),wd!==4&&(wd=2),t===null)return!0;r=Xi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Bc(n.stateNode,r,e),ko(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`&&(Ld===null||!Ld.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Vc(a),Hc(a,e,n,r),ko(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Wc=Error(i(461)),Gc=!1;function Kc(e,t,n,r){t.child=e===null?So(t,null,n,r):xo(t,e.child,n,r)}function qc(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 Na(t),r=us(e,t,n,o,a,i),s=ms(),e!==null&&!Gc?(hs(e,t,i),xl(e,t,i)):(pa&&s&&ca(t),t.flags|=1,Kc(e,t,r,i),t.child)}function Jc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Vi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Yc(e,t,a,r,i)):(e=Wi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Sl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Xr:n,n(o,r)&&e.ref===t.ref)return xl(e,t,i)}return t.flags|=1,e=Hi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Yc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Xr(a,r)&&e.ref===t.ref){if(Gc=!1,t.pendingProps=r=a,Sl(e,i))e.flags&131072&&(Gc=!0);else return t.lanes=e.lanes,xl(e,t,i)}}return rl(e,t,n,r,i)}function Xc(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 Qc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&no(t,a===null?null:a.cachePool),a===null?Ro():Lo(t,a),Wo(t);else return r=t.lanes=536870912,Qc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&no(t,null),Ro(),Go()):(no(t,a.cachePool),Lo(t,a),Go(),t.memoizedState=null);return Kc(e,t,i,n),t.child}function Zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Qc(e,t,n,r,i){var a=to();return a=a===null?null:{parent:Ba._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&no(t,null),Ro(),Wo(t),e!==null&&ja(e,t,r,!0),t.childLanes=i,null}function $c(e,t){return t=fl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function el(e,t,n){return xo(t,e.child,null,n),e=$c(t,t.pendingProps),e.flags|=2,Ko(t),t.memoizedState=null,e}function tl(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(pa){if(r.mode===`hidden`)return e=$c(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Zc(null,e);if(Uo(t),(e=fa)?(e=Em(e,ha),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ra===null?null:{id:ia,overflow:aa},retryLane:536870912,hydrationErrors:null},n=qi(e),n.return=t,t.child=n,da=t,fa=null)):e=null,e===null)throw _a(t);return t.lanes=536870912,null}return $c(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Uo(t),a){if(t.flags&256)t.flags&=-257,t=el(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Gc||ja(e,t,n,!1),a=(n&e.childLanes)!==0,Gc||a){if(Fo.current===null){if(r=hd,r!==null&&(s=Tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Fi(e,s),$d(r,e,s),Wc;ff()}t=el(e,t,n)}else e=o.treeContext,fa=Am(s.nextSibling),da=t,pa=!0,ma=null,ha=!1,e!==null&&ua(t,e),t=$c(t,r),t.flags|=134221824;return t}return e=Hi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function nl(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 rl(e,t,n,r,i){return Na(t),n=us(e,t,n,r,void 0,i),r=ms(),e!==null&&!Gc?(hs(e,t,i),xl(e,t,i)):(pa&&r&&ca(t),t.flags|=1,Kc(e,t,n,i),t.child)}function il(e,t,n,r,i,a){return Na(t),t.updateQueue=null,n=fs(t,r,n,i),ds(e),r=ms(),e!==null&&!Gc?(hs(e,t,a),xl(e,t,a)):(pa&&r&&ca(t),t.flags|=1,Kc(e,t,n,a),t.child)}function al(e,t,n,r,i){if(Na(t),t.stateNode===null){var a=Ri,o=n.contextType;typeof o==`object`&&o&&(a=Pa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=jc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},wo(t),o=n.contextType,a.context=typeof o==`object`&&o?Pa(o):Ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ac(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&&jc.enqueueReplaceState(a,a.state,null),Mo(t,r,a,i),jo(),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=Pc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ri,typeof u==`object`&&u&&(o=Pa(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)&&Nc(t,a,r,o),Co=!1;var f=t.memoizedState;a.state=f,Mo(t,r,a,i),jo(),l=t.memoizedState,s||f!==l||Co?(typeof d==`function`&&(Ac(t,n,d,r),l=t.memoizedState),(c=Co||Mc(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,To(e,t),o=t.memoizedProps,u=Pc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ri,typeof l==`object`&&l&&(c=Pa(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)&&Nc(t,a,r,c),Co=!1,f=t.memoizedState,a.state=f,Mo(t,r,a,i),jo();var p=t.memoizedState;o!==d||f!==p||Co||e!==null&&e.dependencies!==null&&Ma(e.dependencies)?(typeof s==`function`&&(Ac(t,n,s,r),p=t.memoizedState),(u=Co||Mc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ma(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,nl(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=xo(t,e.child,null,i),t.child=xo(t,null,n,i)):Kc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=xl(e,t,i),e}function ol(e,t,n,r){return xa(),t.flags|=256,Kc(e,t,n,r),t.child}var sl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cl(e){return{baseLanes:e,cachePool:ro()}}function ll(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Od),e}function ul(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(qo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(pa){if(i?Ho(t):Go(),(e=fa)?(e=Em(e,ha),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ra===null?null:{id:ia,overflow:aa},retryLane:536870912,hydrationErrors:null},n=qi(e),n.return=t,t.child=n,da=t,fa=null)):e=null,e===null)throw _a(t);return t.lanes=Om(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Go(),i=t.mode,a=fl({mode:`hidden`,children:a},i),r=Gi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=cl(n),r.childLanes=ll(e,o,n),t.memoizedState=sl,Zc(null,r)):(Ho(t),dl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return ml(e,t,a,o,r,c,s,n)}return i?(Go(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Hi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Gi(i,a,n,null),i.flags|=2):i=Hi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=cl(n):(a=i.cachePool,a===null?a=ro():(s=Ba._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=ll(e,o,n),t.memoizedState=sl,Zc(e.child,r)):(Ho(t),n=e.child,e=n.sibling,n=Hi(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 dl(e,t){return t=fl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function fl(e,t){return e=Bi(22,e,null,t),e.lanes=0,e}function pl(e,t,n){return xo(t,e.child,null,n),e=dl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ml(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Ho(t),t.flags&=-257,pl(e,t,c)):t.memoizedState===null?(Go(),o=a.fallback,s=t.mode,a=fl({mode:`visible`,children:a.children},s),o=Gi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,xo(t,e.child,null,c),a=t.child,a.memoizedState=cl(c),a.childLanes=ll(e,r,c),t.memoizedState=sl,Zc(null,a)):(Go(),t.child=e.child,t.flags|=128,null);if(Ho(t),Om(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,Ca({value:a,source:null,stack:null})),pl(e,t,c)}if(Gc||ja(e,t,c,!1),r=(c&e.childLanes)!==0,Gc||r){if(Fo.current!==null)return pl(e,t,c);if(r=hd,r!==null&&(a=Tt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Fi(e,a),$d(r,e,a),Wc;return Dm(o)||ff(),pl(e,t,c)}return Dm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,fa=Am(o.nextSibling),da=t,pa=!0,ma=null,ha=!1,e!==null&&ua(t,e),t=dl(t,a.children),t.flags|=134221824,t)}function hl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ka(e.return,t,n)}function gl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Xo(n)===null&&(t=e),e=e.sibling}return t}function _l(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 vl(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 yl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=qo.current;if(t.flags&128)return Jo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Jo(t,o),i===`backwards`&&e!==null?(vl(e),Kc(e,t,r,n),vl(e)):Kc(e,t,r,n),r=pa?ea:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hl(e,n,t);else if(e.tag===19)hl(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=gl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,vl(t)),_l(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&&Xo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}_l(t,!0,n,null,a,r);break;case`together`:_l(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=gl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),_l(t,!1,i,n,a,r)}return t.child}function bl(e,t,n){var r=t.pendingProps;return Da(t,t.type,r.value),Kc(e,t,r.children,n),t.child}function xl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Td|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ja(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=Hi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Hi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ma(e)))}function Cl(e,t,n){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),Da(t,Ba,e.memoizedState.cache),xa();break;case 27:case 5:Fe(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:Da(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Uo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Ho(t),t.flags|=128,null;r=ja(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?ul(e,t,n):(Ho(t),e=xl(e,t,n),e===null?null:e.sibling)}Ho(t);break;case 19:if(t.flags&128)return yl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ja(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return yl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Jo(t,qo.current),r)break;return null;case 22:return t.lanes=0,Xc(e,t,n,t.pendingProps);case 24:Da(t,Ba,e.memoizedState.cache)}return xl(e,t,n)}function wl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Gc=!0;else{if(!Sl(e,n)&&!(t.flags&128))return Gc=!1,Cl(e,t,n);Gc=!!(e.flags&131072)}}else Gc=!1,pa&&t.flags&1048576&&sa(t,ea,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=uo(t.elementType),t.type=e,typeof e==`function`)Vi(e)?(r=Pc(e,r),t.tag=1,t=al(null,t,e,r,n)):(t.tag=0,t=rl(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===k){t.tag=11,t=qc(null,t,e,r,n);break a}if(a===le){t.tag=14,t=Jc(null,t,e,r,n);break a}if(a===oe){t.tag=10,t.type=e,t=bl(null,t,n);break a}}throw t=ye(e)||e,Error(i(306,t,``))}}return t;case 0:return rl(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Pc(r,t.pendingProps),al(e,t,r,a,n);case 3:a:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,To(e,t),Mo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Da(t,Ba,r),r!==o.cache&&Aa(t,[Ba],n,!0),jo(),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=ol(e,t,r,n);break a}if(r!==a){a=Xi(Error(i(424)),t),Ca(a),t=ol(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(fa=Am(e.firstChild),da=t,pa=!0,ma=null,ha=!0,n=So(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(xa(),r===a){t=xl(e,t,n);break a}Kc(e,t,r,n)}t=t.child}return t;case 26:return nl(e,t),e===null?(n=eh(t.type,null,t.pendingProps,null))?t.memoizedState=n:pa||(t.stateNode=Np(t.type,t.pendingProps,je.current,t)):t.memoizedState=eh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Fe(t),e===null&&pa&&(r=t.stateNode=Im(t.type,t.pendingProps,je.current),da=t,ha=!0,a=fa,Up(t.type)?(jm=a,fa=Am(r.firstChild)):fa=a),Kc(e,t,t.pendingProps.children,n),nl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&pa&&((a=r=fa)&&(r=wm(r,t.type,t.pendingProps,ha),r===null?a=!1:(t.stateNode=r,da=t,fa=Am(r.firstChild),ha=!1,a=!0)),a||_a(t)),Fe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Pp(a,o)?r=null:s!==null&&Pp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=us(e,t,ps,null,null,n),Eh._currentValue=a),nl(e,t),Kc(e,t,r,n),t.child;case 6:return e===null&&pa&&((e=n=fa)&&(n=Tm(n,t.pendingProps,ha),n===null?e=!1:(t.stateNode=n,da=t,fa=null,e=!0)),e||_a(t)),null;case 13:return ul(e,t,n);case 4:return Ne(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xo(t,null,r,n):Kc(e,t,r,n),t.child;case 11:return qc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,nl(e,t),Kc(e,t,r,n),t.child;case 8:return Kc(e,t,t.pendingProps.children,n),t.child;case 12:return Kc(e,t,t.pendingProps.children,n),t.child;case 10:return bl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Na(t),a=Pa(a),r=r(a),t.flags|=1,Kc(e,t,r,n),t.child;case 14:return Jc(e,t,t.type,t.pendingProps,n);case 15:return Yc(e,t,t.type,t.pendingProps,n);case 19:return yl(e,t,n);case 31:return tl(e,t,n);case 22:return Xc(e,t,n,t.pendingProps);case 24:return Na(t),r=Pa(Ba),e===null?(a=to(),a===null&&(a=hd,o=Va(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},wo(t),Da(t,Ba,a)):((e.lanes&n)!==0&&(To(e,t),Mo(t,null,null,n),jo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Da(t,Ba,r),r!==a.cache&&Aa(t,[Ba],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Da(t,Ba,r))),Kc(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:pa&&ca(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:nl(e,t),Kc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Tl(e){e.flags|=4}function El(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?mh(t,r):mh(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(lf())e.flags|=8192;else throw fo=so,ao}}else e.flags&=-16777217}function Dl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!hh(t)){if(lf())e.flags|=8192;else throw fo=so,ao}}function Ol(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:yt(),e.lanes|=t,kd|=t)}function kl(e,t){if(!pa)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 Al(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 jl(e,t,n){var r=t.pendingProps;switch(la(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Al(t),null;case 1:return Al(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Oa(Ba),Pe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ba(t)?Tl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Sa())),Al(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Tl(t),o===null?(Al(t),El(t,a,null,r,n)):(Al(t),Dl(t,o))):o?o===e.memoizedState?(Al(t),t.flags&=-16777217):(Tl(t),Al(t),Dl(t,o)):(e=e.memoizedProps,e!==r&&Tl(t),Al(t),El(t,a,e,r,n)),null;case 27:if(Ie(t),n=je.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Al(t),t.subtreeFlags&=-33554433,null}e=ke.current,ba(t)?va(t,e):(e=Im(a,r,n),t.stateNode=e,Tl(t))}return Al(t),t.subtreeFlags&=-33554433,null;case 5:if(Ie(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Al(t),t.subtreeFlags&=-33554433,null}if(o=ke.current,ba(t))va(t,o);else{var s=Ap(je.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[jt]=t,o[Mt]=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(wp(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&&Tl(t)}}return Al(t),t.subtreeFlags&=-33554433,El(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Tl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=je.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=da,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[jt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||xp(e.nodeValue,n)),e||_a(t,!0)}else e=Ap(e).createTextNode(r),e[jt]=t,t.stateNode=e}return Al(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ba(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[jt]=t}else xa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Al(t),e=!1}else n=Sa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ko(t),t):(Ko(t),null);if(t.flags&128)throw Error(i(558))}return Al(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ba(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[jt]=t}else xa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Al(t),a=!1}else a=Sa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Ko(t),t):(Ko(t),null)}return Ko(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),Ol(t,t.updateQueue),Al(t),null);case 4:return Pe(),e===null&&dp(t.stateNode.containerInfo),t.flags|=67108864,Al(t),null;case 10:return Oa(t.type),Al(t),null;case 19:if(Yo(t),r=t.memoizedState,r===null)return Al(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)kl(r,!1);else{if(wd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Xo(e),o!==null){for(t.flags|=128,kl(r,!1),e=o.updateQueue,t.updateQueue=e,Ol(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ui(n,e),n=n.sibling;return Jo(t,qo.current&1|2),pa&&oa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ye()>Fd&&(t.flags|=128,a=!0,kl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Xo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ol(t,e),kl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!pa)return Al(t),null}else 2*Ye()-r.renderingStartTime>Fd&&n!==536870912&&(t.flags|=128,a=!0,kl(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=Ye(),e.sibling=null,o=qo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||pa?Jo(t,o):(n=o,Oe(Bo,t),Oe(qo,n),Vo===null&&(Vo=t)),pa&&oa(t,r.treeForkCount),e}return Al(t),null;case 22:case 23:return Ko(t),zo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Al(t),t.subtreeFlags&6&&(t.flags|=8192)):Al(t),n=t.updateQueue,n!==null&&Ol(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&&De(eo),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Oa(Ba),Al(t),null;case 25:return null;case 30:return t.flags|=33554432,Al(t),null}throw Error(i(156,t.tag))}function Ml(e,t){switch(la(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oa(Ba),Pe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ie(t),null;case 31:if(t.memoizedState!==null){if(Ko(t),t.alternate===null)throw Error(i(340));xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ko(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Yo(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 Pe(),null;case 10:return Oa(t.type),null;case 22:case 23:return Ko(t),zo(),e!==null&&De(eo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Oa(Ba),null;case 25:return null;default:return null}}function Nl(e,t){switch(la(t),t.tag){case 3:Oa(Ba),Pe();break;case 26:case 27:case 5:Ie(t);break;case 4:Pe();break;case 31:t.memoizedState!==null&&Ko(t);break;case 13:Ko(t);break;case 19:Yo(t);break;case 10:Oa(t.type);break;case 22:case 23:Ko(t),zo(),e!==null&&De(eo);break;case 24:Oa(Ba)}}function Pl(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){Nf(t,t.return,e)}}function Fl(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){Nf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Nf(t,t.return,e)}}function Il(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Po(t,n)}catch(t){Nf(e,e.return,t)}}}function Ll(e,t,n){n.props=Pc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Nf(e,t,n)}}function Rl(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=Ti(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=tm(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new nm(e);m(e.child,!1,ym,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){Nf(e,t,n)}}function zl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Nf(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){Nf(e,t,n)}else n.current=null}}function Bl(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++)xm(e.stateNode,t[n])}function Vl(e){for(var t=e.return;t!==null&&(Wl(t)&&xm(e.stateNode,t.stateNode),!Ul(t));)t=t.return}function Hl(e){for(var t=e.return;t!==null&&(Wl(t)&&Sm(e.stateNode,t.stateNode),!Ul(t));)t=t.return}function Ul(e){return e.tag===5||e.tag===3||e.tag===27}function Wl(e){return e&&e.tag===7&&e.stateNode!==null}function Gl(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){Nf(e,e.return,t)}}function Kl(e,t,n){try{var r=e.stateNode;eee(r,e.type,n,t),r[Mt]=t}catch(t){Nf(e,e.return,t)}}function ql(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Up(e.type)||e.tag===4}function Jl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||ql(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&&Up(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 Yl(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=En)),Bl(e,r),en=!0;else if(i!==4&&(i===27&&(Bl(e,r),r=null,Up(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Yl(e,t,n,r),e=e.sibling;e!==null;)Yl(e,t,n,r),e=e.sibling}function Xl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Bl(e,r),en=!0;else if(i!==4&&(i===27&&(Bl(e,r),r=null,Up(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Xl(e,t,n,r),e=e.sibling;e!==null;)Xl(e,t,n,r),e=e.sibling}function Zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);wp(t,r,n),t[jt]=e,t[Mt]=n}catch(t){Nf(e,e.return,t)}}var Ql=!1,$l=null;function eu(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ql=!0)}var tu=null;function nu(){var e=tu;return tu=null,e}var ru=0;function iu(e,t,n,r,i){return ru=0,au(e.child,t,n,r,i)}function au(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Yp(o);r.push(s),s.view&&(a=!0)}else a||Yp(o).view&&(a=!0);Ql=!0,Kp(o,ru===0?t:t+`_`+ru,n),ru++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||au(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function ou(e,t){for(;e!==null;)e.tag===5?qp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||ou(e.child,t),e=e.sibling}function su(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(su(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=Di(t.default,t.share),t!==`none`&&(iu(e,n,t,null,!1)||ou(e.child,!1))}e=e.sibling}}function cu(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=Ti(r,n),a=Di(r.default,n.paired?r.share:r.enter);a===`none`?su(e):iu(e,i,a,null,!1)?(su(e),n.paired||t||Qd(e,r.onEnter)):ou(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)cu(e,t),e=e.sibling;else su(e)}function lu(e){if($l!==null&&$l.size!==0){var t=$l;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=Di(n.default,n.share);if(a!==`none`&&(iu(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Qd(e,n.onShare)):ou(e.child,!1)),t.delete(r),t.size===0)break}}}lu(e)}e=e.sibling}}}function uu(e){if(e.tag===30){var t=e.memoizedProps,n=Ti(t,e.stateNode),r=$l===null?void 0:$l.get(n),i=Di(t.default,r===void 0?t.exit:t.share);i!==`none`&&(iu(e,n,i,null,!1)?r===void 0?Qd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,$l.delete(n),Qd(e,t.onShare)):ou(e.child,!1)),$l!==null&&lu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)uu(e),e=e.sibling;else $l!==null&&lu(e)}function du(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Ti(t,e.stateNode);t=Di(t.default,t.update),e.flags&=-5,t!==`none`&&iu(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&du(e);e=e.sibling}}function fu(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,ou(e.child,!1))}fu(e)}e=e.sibling}}function pu(e){if(e.tag===30)e.stateNode.paired=null,ou(e.child,!1),fu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)pu(e),e=e.sibling;else fu(e)}function mu(e){for(e=e.child;e!==null;)e.tag===30?ou(e.child,!1):e.subtreeFlags&33554432&&mu(e),e=e.sibling}function hu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&ru<a.length){var l=a[ru],u=Yp(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&&Kp(c,ru===0?n:n+`_`+ru,i),s&&e.flags&4||(tu===null&&(tu=[]),tu.push(c,ru===0?r:r+`_`+ru,t.memoizedProps)),ru++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:hu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function gu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=Ti(n,r),a=Di(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Xp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;ru=0,i=hu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Qd(e,n.onUpdate))}else e.subtreeFlags&33554432&&gu(e,t);e=e.sibling}}var _u=!1,vu=!1,yu=!1,bu=!1,xu=typeof WeakSet==`function`?WeakSet:Set,Su=null,Cu=!1,wu=!1,Tu=!1,Eu=!1;function Du(e,t,n){if(e=e.containerInfo,Op=Fh,e=ti(e),ni(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(kp={focusedElem:e,selectionRange:r},Fh=!1,n=(n&335544064)===n,Su=t,t=n?9270:1024;Su!==null;){if(e=Su,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&uu(r[a]);if(e.alternate===null&&e.flags&2)n&&eu(e),Ou(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&uu(r),Ou(n);continue}if(r!==null&&r.memoizedState!==null){n&&eu(e),Ou(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,Su=r):(n&&du(e),Ou(n))}}$l=null}function Ou(e){for(;Su!==null;){var t=Su,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=Pc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){Nf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)Cm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:Cm(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=Ti(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=Di(a.default,a.update),a!==`none`&&iu(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,Su=r;break}Su=t.return}}function ku(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Yu(e,n),r&4&&Pl(5,n);break;case 1:if(Yu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Nf(n,n.return,e)}else{var i=Pc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Nf(n,n.return,e)}}}r&64&&Il(n),r&512&&Rl(n,n.return);break;case 3:if(Yu(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{Po(e,t)}catch(e){Nf(n,n.return,e)}}break;case 27:t===null&&r&4&&Zl(n);case 26:case 5:Yu(e,n),t===null&&r&4&&Gl(n),r&512&&Rl(n,n.return);break;case 12:Yu(e,n);break;case 31:Yu(e,n),r&4&&Ru(e,n);break;case 13:Yu(e,n),r&4&&zu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Lf.bind(null,n),km(e,n))));break;case 22:if(r=n.memoizedState!==null||_u,!r){var a=t!==null&&t.memoizedState!==null||vu;t=_u,i=vu,_u=r,(vu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Zu(e,n,r)):Yu(e,n),_u=t,vu=i}break;case 30:Yu(e,n),r&512&&Rl(n,n.return);break;case 7:r&512&&Rl(n,n.return);default:Yu(e,n)}}function Au(e,t){for(e=e.child;e!==null;)ju(e,t),e=e.sibling}function ju(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){Nf(e,e.return,t)}Mu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,en=!0}catch(t){Nf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Gp(s,!0):Gp(e.stateNode,!1)}catch(t){Nf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&Au(e,t);break;default:Au(e,t)}}function Mu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:ju(n,r);break a;case 22:n.memoizedState===null&&Mu(n,r);break a;default:Mu(n,r)}}e=e.sibling}}function Nu(e){var t=e.alternate;t!==null&&(e.alternate=null,Nu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&zt(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 Pu=null,Fu=!1;function Iu(e,t,n){for(n=n.child;n!==null;)Lu(e,t,n),n=n.sibling}function Lu(e,t,n){if(at&&typeof at.onCommitFiberUnmount==`function`)try{at.onCommitFiberUnmount(it,n)}catch{}switch(n.tag){case 26:vu||zl(n,t),Iu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!vu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:vu||zl(n,t),Hl(n);var r=Pu,i=Fu;Up(n.type)&&(Pu=n.stateNode,Fu=!1),Iu(e,t,n),Lm(n.stateNode,n.type,n.memoizedProps),Pu=r,Fu=i;break;case 5:vu||zl(n,t),Hl(n);case 6:if(n.tag===6&&Hl(n),r=Pu,i=Fu,Pu=null,Iu(e,t,n),Pu=r,Fu=i,Pu!==null){if(Fu)try{(Pu.nodeType===9?Pu.body:Pu.nodeName===`HTML`?Pu.ownerDocument.body:Pu).removeChild(n.stateNode),en=!0}catch(e){Nf(n,t,e)}else try{Pu.removeChild(n.stateNode),en=!0}catch(e){Nf(n,t,e)}}break;case 18:Pu!==null&&(Fu?(e=Pu,Wp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),sg(e)):Wp(Pu,n.stateNode));break;case 4:r=Pu,i=Fu,Pu=n.stateNode.containerInfo,Fu=!0,Iu(e,t,n),Pu=r,Fu=i;break;case 0:case 11:case 14:case 15:Fl(2,n,t),vu||Fl(4,n,t),Iu(e,t,n);break;case 1:vu||(zl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ll(n,t,r)),Iu(e,t,n);break;case 21:Iu(e,t,n);break;case 22:vu=(r=vu)||n.memoizedState!==null,Iu(e,t,n),vu=r;break;case 30:zl(n,t),Iu(e,t,n);break;case 7:vu||zl(n,t),Iu(e,t,n);break;default:Iu(e,t,n)}}function Ru(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{sg(e)}catch(e){Nf(t,t.return,e)}}}function zu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{sg(e)}catch(e){Nf(t,t.return,e)}}function Bu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xu),t;default:throw Error(i(435,e.tag))}}function Vu(e,t){var n=Bu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Rf.bind(null,e,t);t.then(r,r)}})}function Hu(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(Up(l.type)){Pu=l.stateNode,Fu=!1;break a}break;case 5:Pu=l.stateNode,Fu=!1;break a;case 3:case 4:Pu=l.stateNode.containerInfo,Fu=!0;break a}l=l.return}if(Pu===null)throw Error(i(160));Lu(s,c,o),Pu=null,Fu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Wu(t,e,n),t=t.sibling}var Uu=null;function Wu(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}Hu(t,e,n),Gu(e),a&4&&(Fl(3,e,e.return),Pl(3,e),Fl(5,e,e.return));break;case 1:Hu(t,e,n),Gu(e),a&512&&(vu||r===null||zl(r,r.return)),a&64&&_u&&(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=Uu,Hu(t,e,n),Gu(e),a&512&&(vu||r===null||zl(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(_u)e.stateNode=Np(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[Lt]||r[jt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),wp(r,t,n),r[jt]=e,Wt(r),t=r;break a;case`link`:if(o=dh(`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),wp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=dh(`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),wp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[jt]=e,Wt(r),t=r}e.stateNode=t}}else _u||fh(o,e.type,e.stateNode)}else e.stateNode=sh(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Kl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||vu||t.parentNode.removeChild(t)):a.count--,n===null?_u||fh(o,e.type,e.stateNode):sh(o,n,e.memoizedProps))}break;case 27:Hu(t,e,n),Gu(e),a&512&&(vu||r===null||zl(r,r.return)),r!==null&&a&4&&Kl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=yu,yu=!1,Hu(t,e,n),yu=o,Gu(e),a&512&&(vu||r===null||zl(r,r.return)),e.flags&32){t=e.stateNode;try{vn(t,``),en=!0}catch(t){Nf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Kl(e,t,r===null?t:r.memoizedProps)),a&1024&&(bu=!0);break;case 6:if(Hu(t,e,n),Gu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,en=!0}catch(t){Nf(e,e.return,t)}}break;case 3:if(en=!1,M=null,o=Uu,Uu=Vm(t.containerInfo),Hu(t,e,n),Uu=o,Gu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{sg(t.containerInfo)}catch(t){Nf(e,e.return,t)}bu&&(bu=!1,Ku(e)),en=!1;break;case 4:a=yu,yu=_u,r=tn(),o=Uu,Uu=Vm(e.stateNode.containerInfo),Hu(t,e,n),Gu(e),Uu=o,en&&wu&&(Tu=!0),en=r,yu=a;break;case 12:Hu(t,e,n),Gu(e);break;case 31:Hu(t,e,n),Gu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Vu(e,t)));break;case 13:Hu(t,e,n),Gu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Nd=Ye()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Vu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=_u,l=vu,u=yu;_u=c||o,yu=u||o,vu=l||s,Hu(t,e,n),vu=l,yu=u,_u=c,Gu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||_u||vu||(t=s||vu,n=_u,r=vu,_u=o||_u,vu=t,Xu(e,2),_u=n,vu=r),!o&&yu||Au(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Vu(e,n))));break;case 19:Hu(t,e,n),Gu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Vu(e,t)));break;case 30:a&512&&(vu||r===null||zl(r,r.return)),a=tn(),o=wu,s=(n&335544064)===n,c=e.memoizedProps,wu=s&&Di(c.default,c.update)!==`none`,Hu(t,e,n),Gu(e),s&&r!==null&&en&&(e.flags|=4),wu=o,en=a;break;case 21:break;case 7:a&512&&(vu||r===null||zl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Hu(t,e,n),Gu(e)}}function Gu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(ql(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Wl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Ul(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Xl(e,Jl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(vn(l,``),n.flags&=-33),Xl(e,Jl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Yl(e,Jl(e),u,s);break;default:throw Error(i(161))}}catch(t){Nf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ku(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ku(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Fh=!0,t.reset(),Fh=!1),e=e.sibling}}function qu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ju(t,e),t=t.sibling;else gu(t,!1)}function Ju(e,t){var n=e.alternate;if(n===null)cu(e,!1);else switch(e.tag){case 3:if(Eu=Cu=!1,nu(),qu(t,e),!Cu&&!Tu){if(e=tu,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];qp(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`})),Eu=!0}tu=null;break;case 5:qu(t,e);break;case 4:r=Cu,Cu=!1,qu(t,e),Cu&&(Tu=!0),Cu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?qu(t,e):cu(e,!1));break;case 30:r=Cu,i=nu(),Cu=!1,qu(t,e),Cu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=Ti(a,o),o=Ti(n.memoizedProps,o);var s=Di(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,ru=0,t=hu(e,n,t,o,s,a,!0),ru!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Qd(e,e.memoizedProps.onUpdate),tu=i):i!==null&&(i.push.apply(i,tu),tu=i),Cu=e.flags&32?!0:r;break;default:qu(t,e)}}function Yu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ku(e,t.alternate,t),t=t.sibling}function Xu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Fl(4,n,n.return),Xu(n,r);break;case 1:zl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Ll(n,n.return,i),Xu(n,r);break;case 27:r&2&&Lm(n.stateNode,n.type,n.memoizedProps);case 5:zl(n,n.return),n.tag!==5&&n.tag!==27||Hl(n),Xu(n,r);break;case 6:Hl(n);break;case 26:zl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||vu||i.parentNode.removeChild(i),Xu(n,r);break;case 22:n.memoizedState===null&&Xu(n,r);break;case 30:zl(n,n.return),Xu(n,r);break;case 7:zl(n,n.return);default:Xu(n,r)}e=e.sibling}}function Zu(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:Zu(i,a,n),Pl(4,a);break;case 1:if(Zu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Nf(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++)No(l[i],c)}catch(e){Nf(r,r.return,e)}}s&&o&64&&Il(a),Rl(a,a.return);break;case 27:n&2&&Zl(a);case 5:a.tag!==5&&a.tag!==27||Vl(a),Zu(i,a,n),s&&r===null&&o&4&&Gl(a),Rl(a,a.return);break;case 6:Vl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||_u||fh(Vm(c.ownerDocument),a.type,c),Zu(i,a,n),s&&r===null&&o&4&&Gl(a),Rl(a,a.return);break;case 12:Zu(i,a,n);break;case 31:Zu(i,a,n),s&&o&4&&Ru(i,a);break;case 13:Zu(i,a,n),s&&o&4&&zu(i,a);break;case 22:a.memoizedState===null&&Zu(i,a,n),Rl(a,a.return);break;case 30:Zu(i,a,n),Rl(a,a.return);break;case 7:Rl(a,a.return);default:Zu(i,a,n)}t=t.sibling}}function Qu(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&&Ha(n))}function $u(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ha(e))}function ed(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)td(e,t,n,r),t=t.sibling;else i&&mu(t)}function td(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&pu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:ed(e,t,n,r),a&2048&&Pl(9,t);break;case 1:ed(e,t,n,r);break;case 3:ed(e,t,n,r),i&&Eu&&(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&&Ha(a)));break;case 12:if(a&2048){ed(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){Nf(t,t.return,e)}}else ed(e,t,n,r);break;case 31:ed(e,t,n,r);break;case 13:ed(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&&pu(t),o._visibility&2?ed(e,t,n,r):(o._visibility|=2,nd(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&pu(s),o._visibility&2?ed(e,t,n,r):rd(e,t)),a&2048&&Qu(s,t);break;case 24:ed(e,t,n,r),a&2048&&$u(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(ou(a.child,!0),ou(t.child,!0))),ed(e,t,n,r);break;default:ed(e,t,n,r)}}function nd(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:nd(a,o,s,c,i),Pl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,nd(a,o,s,c,i)):u._visibility&2?nd(a,o,s,c,i):rd(a,o),i&&l&2048&&Qu(o.alternate,o);break;case 24:nd(a,o,s,c,i),i&&l&2048&&$u(o.alternate,o);break;default:nd(a,o,s,c,i)}t=t.sibling}}function rd(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:rd(n,r),i&2048&&Qu(r.alternate,r);break;case 24:rd(n,r),i&2048&&$u(r.alternate,r);break;default:rd(n,r)}t=t.sibling}}var id=8192;function ad(e,t,n){if(e.subtreeFlags&id)for(e=e.child;e!==null;)od(e,t,n),e=e.sibling}function od(e,t,n){switch(e.tag){case 26:ad(e,t,n),e.flags&id&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&_h(n,e)):vh(n,Uu,e.memoizedState,e.memoizedProps));break;case 5:ad(e,t,n),e.flags&id&&(e=e.stateNode,(t&335544128)===t&&_h(n,e));break;case 3:case 4:var r=Uu;Uu=Vm(e.stateNode.containerInfo),ad(e,t,n),Uu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=id,id=16777216,ad(e,t,n),id=r):ad(e,t,n));break;case 30:if((e.flags&id)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,$l===null&&($l=new Map),$l.set(r,i)}ad(e,t,n);break;default:ad(e,t,n)}}function sd(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 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];Su=r,dd(r,e)}sd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ld(e),e=e.sibling}function ld(e){switch(e.tag){case 0:case 11:case 15:cd(e),e.flags&2048&&Fl(9,e,e.return);break;case 3:cd(e);break;case 12:cd(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ud(e)):cd(e);break;default:cd(e)}}function ud(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Su=r,dd(r,e)}sd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fl(8,t,t.return),ud(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ud(t));break;default:ud(t)}e=e.sibling}}function dd(e,t){for(;Su!==null;){var n=Su;switch(n.tag){case 0:case 11:case 15:Fl(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:Ha(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Su=r;else a:for(n=e;Su!==null;){r=Su;var i=r.sibling,a=r.return;if(Nu(r),r===n){Su=null;break a}if(i!==null){i.return=a,Su=i;break a}Su=a}}}var fd={getCacheForType:function(e){var t=Pa(Ba),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Pa(Ba).controller.signal}},pd=typeof WeakMap==`function`?WeakMap:Map,md=0,hd=null,gd=null,_d=0,vd=0,yd=null,bd=!1,xd=!1,Sd=!1,Cd=0,wd=0,Td=0,Ed=0,Dd=0,Od=0,kd=0,Ad=null,jd=null,Md=!1,Nd=0,Pd=0,Fd=1/0,Id=null,Ld=null,Rd=0,zd=null,Bd=null,Vd=0,Hd=0,Ud=null,Wd=null,Gd=null,Kd=null,qd=null,Jd=0,Yd=null;function Xd(){return md&2&&_d!==0?_d&-_d:xe.T===null?Ot():ep()}function Zd(){if(Od===0){if(!(_d&536870912)||pa){var e=ft;ft<<=1,!(ft&3932160)&&(ft=262144),Od=e}else Od=536870912}return e=Bo.current,e!==null&&(e.flags|=32),Od}function Qd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=tm(Ti(e.memoizedProps,n))),Kd===null&&(Kd=[]),Kd.push(t.bind(null,r))}}function $d(e,t,n){(e===hd&&(vd===2||vd===9)||e.cancelPendingCommit!==null)&&(sf(e,0),rf(e,_d,Od,!1)),xt(e,n),md&2&&e===hd||(e===hd&&(!(md&2)&&(Ed|=n),wd===4&&rf(e,_d,Od,!1)),Kf(e))}function ef(e,t,n){if(md&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||gt(e,t),a=r?hf(e,t):pf(e,t,!0),o=r;do{if(a===0){xd&&!r&&rf(e,t,0,!1);break}if(n=e.current.alternate,o&&!nf(n))a=pf(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=Ad;var l=c.current.memoizedState.isDehydrated;if(l&&(sf(c,s).flags|=256),s=pf(c,s,!1),s!==2&&s!==6){if(Sd&&!l){c.errorRecoveryDisabledLanes|=o,Ed|=o,a=4;break a}o=jd,jd=a,o!==null&&(jd===null?jd=o:jd.push.apply(jd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){sf(e,0),rf(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:rf(r,t,Od,!bd);break a;case 2:jd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Nd+300-Ye(),10<a)){if(rf(r,t,Od,!bd),ht(r,0,!0)!==0)break a;Vd=t,r.timeoutHandle=Lp(tf.bind(null,r,n,jd,Id,Md,t,Od,Ed,kd,bd,o,`Throttled`,-0,0),a);break a}tf(r,n,jd,Id,Md,t,Od,Ed,kd,bd,o,null,-0,0)}break}}while(1);Kf(e)}function tf(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:En},$l=null,od(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=Sh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?Nd-Ye():(a&4194048)===a?Pd-Ye():0,m=bh(d,m),m!==null)?(Vd=a,e.cancelPendingCommit=m(Sf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),rf(e,a,o,!l)):Sf(e,t,a,n,r,i,o,s,c,l,u,d)}function nf(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(!Yr(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 rf(e,t,n,r){t=_t(e,t),t&=~Dd,t&=~Ed,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-st(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ct(e,n,t)}function af(){return md&6?!0:(qf(0,!1),!1)}function of(){if(gd!==null){if(vd===0)var e=gd.return;else e=gd,Ea=Ta=null,gs(e),ho=null,go=0,e=gd;for(;e!==null;)Nl(e.alternate,e),e=e.return;gd=null}}function sf(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Rp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Vd=0,of(),hd=e,gd=n=Hi(e.current,null),_d=t,vd=0,yd=null,bd=!1,xd=gt(e,t),Sd=!1,kd=Od=Dd=Ed=Td=wd=0,jd=Ad=null,Md=!1,Cd=_t(e,t),Mi(),n}function cf(e,t){Qo=null,xe.H=Ec,t===io||t===oo?(t=po(),vd=3):t===ao?(t=po(),vd=4):vd=t===Wc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,yd=t,gd===null&&(wd=1,Rc(e,Xi(t,e.current)))}function lf(){var e=Bo.current;return e===null?!0:(_d&4194048)===_d?Vo===null:(_d&62914560)===_d||_d&536870912?e===Vo:!1}function uf(){var e=xe.H;return xe.H=Ec,e===null?Ec:e}function df(){var e=xe.A;return xe.A=fd,e}function ff(){wd=4,bd||(_d&4194048)!==_d&&Bo.current!==null||(xd=!0),!(Td&134217727)&&!(Ed&134217727)||hd===null||rf(hd,_d,Od,!1)}function pf(e,t,n){var r=md;md|=2;var i=uf(),a=df();(hd!==e||_d!==t)&&(Id=null,sf(e,t)),t=!1;var o=wd;a:do try{if(vd!==0&&gd!==null){var s=gd,c=yd;switch(vd){case 8:of(),o=6;break a;case 3:case 2:case 9:case 6:Bo.current===null&&(t=!0);var l=vd;if(vd=0,yd=null,yf(e,s,c,l),n&&xd){o=0;break a}break;default:l=vd,vd=0,yd=null,yf(e,s,c,l)}}mf(),o=wd;break}catch(t){cf(e,t)}while(1);return t&&e.shellSuspendCounter++,Ea=Ta=null,md=r,xe.H=i,xe.A=a,gd===null&&(hd=null,_d=0,Mi()),o}function mf(){for(;gd!==null;)_f(gd)}function hf(e,t){var n=md;md|=2;var r=uf(),a=df();hd!==e||_d!==t?(Id=null,Fd=Ye()+500,sf(e,t)):xd=gt(e,t);a:do try{if(vd!==0&&gd!==null){t=gd;var o=yd;b:switch(vd){case 1:vd=0,yd=null,yf(e,t,o,1);break;case 2:case 9:if(co(o)){vd=0,yd=null,vf(t);break}t=function(){vd!==2&&vd!==9||hd!==e||(vd=7),Kf(e)},o.then(t,t);break a;case 3:vd=7;break a;case 4:vd=5;break a;case 7:co(o)?(vd=0,yd=null,vf(t)):(vd=0,yd=null,yf(e,t,o,7));break;case 5:var s=null;switch(gd.tag){case 26:s=gd.memoizedState;case 5:case 27:var c=gd;if(s?hh(s):c.stateNode.complete){vd=0,yd=null;var l=c.sibling;if(l!==null)gd=l;else{var u=c.return;u===null?gd=null:(gd=u,bf(u))}break b}}vd=0,yd=null,yf(e,t,o,5);break;case 6:vd=0,yd=null,yf(e,t,o,6);break;case 8:of(),wd=6;break a;default:throw Error(i(462))}}gf();break}catch(t){cf(e,t)}while(1);return Ea=Ta=null,xe.H=r,xe.A=a,md=n,gd===null?(hd=null,_d=0,Mi(),wd):0}function gf(){for(;gd!==null&&!qe();)_f(gd)}function _f(e){var t=wl(e.alternate,e,Cd);e.memoizedProps=e.pendingProps,t===null?bf(e):gd=t}function vf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=il(n,t,t.pendingProps,t.type,void 0,_d);break;case 11:t=il(n,t,t.pendingProps,t.type.render,t.ref,_d);break;case 5:gs(t);var r=t;r===da&&(pa?(ya(r),r.tag===5&&r.stateNode!=null&&(fa=r.stateNode)):(ya(r),pa=!0));default:Nl(n,t),t=gd=Ui(t,Cd),t=wl(n,t,Cd)}e.memoizedProps=e.pendingProps,t===null?bf(e):gd=t}function yf(e,t,n,r){Ea=Ta=null,gs(t),ho=null,go=0;var i=t.return;try{if(Uc(e,i,t,n,_d)){wd=1,Rc(e,Xi(n,e.current)),gd=null;return}}catch(t){if(i!==null)throw gd=i,t;wd=1,Rc(e,Xi(n,e.current)),gd=null;return}t.flags&32768?(pa||r===1?e=!0:xd||_d&536870912?e=!1:(bd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Bo.current,r!==null&&r.tag===13&&(r.flags|=16384))),xf(t,e)):bf(t)}function bf(e){var t=e;do{if(t.flags&32768){xf(t,bd);return}e=t.return;var n=jl(t.alternate,t,Cd);if(n!==null){gd=n;return}if(t=t.sibling,t!==null){gd=t;return}gd=t=e}while(t!==null);wd===0&&(wd=5)}function xf(e,t){do{var n=Ml(e.alternate,e);if(n!==null){n.flags&=32767,gd=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){gd=e;return}gd=e=n}while(e!==null);wd=6,gd=null}function Sf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do Af();while(Rd!==0);if(md&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===hd&&(gd=hd=null,_d=0),Bd=t,zd=e,Vd=n,Ud=a,Wd=r,Cf(e,t,n,s,c,l,f)}}function Cf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Hd=s,s|=ji,St(e,n,s,r,i,a),Kd=null,(n&335544064)===n?(qd=Ga(e),r=10262):(qd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,zf($e,function(){return jf(),null})):(e.callbackNode=null,e.callbackPriority=0),Ql=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=xe.T,xe.T=null,i=Se.p,Se.p=2,a=md,md|=4;try{Du(e,t,n)}finally{md=a,Se.p=i,xe.T=r}}Rd=1,Ql?Gd=$p(o,e.containerInfo,qd,Ef,Df,Tf,Of,jf,wf,null,null):(Ef(),Df(),Of())}function wf(e){if(Rd!==0){var t=zd.onRecoverableError;t(e,{componentStack:null})}}function Tf(){Rd===3&&(Rd=0,Ju(Bd,zd),Rd=4)}function Ef(){if(Rd===1){Rd=0;var e=zd,t=Bd,n=Vd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=xe.T,xe.T=null;var i=Se.p;Se.p=2;var a=md;md|=4;try{wu=Tu=!1,Wu(t,e,n),n=kp;var o=ti(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&ei(s.ownerDocument.documentElement,s)){if(c!==null&&ni(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 _=$r(s,h),v=$r(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}}Fh=!!Op,kp=Op=null}finally{md=a,Se.p=i,xe.T=r}}e.current=t,Rd=2}}function Df(){if(Rd===2){Rd=0;var e=zd,t=Bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=xe.T,xe.T=null;var r=Se.p;Se.p=2;var i=md;md|=4;try{ku(e,t.alternate,t)}finally{md=i,Se.p=r,xe.T=n}}Rd=3}}function Of(){if(Rd===4||Rd===3){Rd=0;var e=Gd;Gd=null,Je();var t=zd,n=Bd,r=Vd,i=Wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Rd=5:(Rd=0,Bd=zd=null,kf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Ld=null),Dt(r),n=n.stateNode,at&&typeof at.onCommitFiberRoot==`function`)try{at.onCommitFiberRoot(it,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=xe.T,a=Se.p,Se.p=2,xe.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{xe.T=n,Se.p=a}}if(i=Kd,o=qd,qd=null,i!==null&&(Kd=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);Vd&3&&Af(),Kf(t),a=t.pendingLanes,r&261930&&a&42?t===Yd?Jd++:(Jd=0,Yd=t):(Jd=0,Yd=null),qf(0,!1)}}function kf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ha(t)))}function Af(){return Gd!==null&&(Gd.skipTransition(),Gd=null),Ef(),Df(),Of(),jf()}function jf(){if(Rd!==5)return!1;var e=zd,t=Hd;Hd=0;var n=Dt(Vd),r=xe.T,a=Se.p;try{Se.p=32>n?32:n,xe.T=null,n=Ud,Ud=null;var o=zd,s=Vd;if(Rd=0,Bd=zd=null,Vd=0,md&6)throw Error(i(331));var c=md;if(md|=4,ld(o.current),td(o,o.current,s,n),md=c,qf(0,!1),at&&typeof at.onPostCommitFiberRoot==`function`)try{at.onPostCommitFiberRoot(it,o)}catch{}return!0}finally{Se.p=a,xe.T=r,kf(e,t)}}function Mf(e,t,n){t=Xi(n,t),t=Bc(e.stateNode,t,2),e=Do(e,t,2),e!==null&&(xt(e,2),Kf(e))}function Nf(e,t,n){if(e.tag===3)Mf(e,e,n);else for(;t!==null;){if(t.tag===3){Mf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Ld===null||!Ld.has(r))){e=Xi(n,e),n=Vc(2),r=Do(t,n,2),r!==null&&(Hc(n,r,t,e),xt(r,2),Kf(r));break}}t=t.return}}function Pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new pd;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)||(Sd=!0,i.add(n),e=Ff.bind(null,e,t,n),t.then(e,e))}function Ff(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,hd===e&&(_d&n)===n&&(wd===4||wd===3&&(_d&62914560)===_d&&300>Ye()-Nd?md&2?Dd|=n:sf(e,0):Dd|=n,kd===_d&&(kd=0)),Kf(e)}function If(e,t){t===0&&(t=yt()),e=Fi(e,t),e!==null&&(xt(e,t),Kf(e))}function Lf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),If(e,n)}function Rf(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),If(e,n)}function zf(e,t){return Ge(e,t)}var Bf=null,Vf=null,Hf=!1,Uf=!1,Wf=!1,Gf=0;function Kf(e){e!==Vf&&e.next===null&&(Vf===null?Bf=Vf=e:Vf=Vf.next=e),Uf=!0,Hf||(Hf=!0,$f())}function qf(e,t){if(!Wf&&Uf){Wf=!0;do for(var n=!1,r=Bf;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-st(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Qf(r,a))}else a=_d,a=ht(r,r===hd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||gt(r,a)||(n=!0,Qf(r,a))}r=r.next}while(n);Wf=!1}}function Jf(){Yf()}function Yf(){Uf=Hf=!1;var e=0;Gf!==0&&Ip()&&(e=Gf);for(var t=Ye(),n=null,r=Bf;r!==null;){var i=r.next,a=Xf(r,t);a===0?(r.next=null,n===null?Bf=i:n.next=i,i===null&&(Vf=n)):(n=r,(e!==0||a&3)&&(Uf=!0)),r=i}Rd!==0&&Rd!==5||qf(e,!1),Gf!==0&&(Gf=0)}function Xf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-st(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=vt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=hd,n=_d,n=ht(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(vd===2||vd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ke(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||gt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ke(r),Dt(n)){case 2:case 8:n=Qe;break;case 32:n=$e;break;case 268435456:n=tt;break;default:n=$e}return r=Zf.bind(null,e),n=Ge(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ke(r),e.callbackPriority=2,e.callbackNode=null,2}function Zf(e,t){if(Rd!==0&&Rd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Af()&&e.callbackNode!==n)return null;var r=_d;return r=ht(e,e===hd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(ef(e,r,t),Xf(e,Ye()),e.callbackNode!=null&&e.callbackNode===n?Zf.bind(null,e):null)}function Qf(e,t){if(Af())return null;ef(e,t,!0)}function $f(){Vp(function(){md&6?Ge(Ze,Jf):Yf()})}function ep(){if(Gf===0){var e=Ja;e===0&&(e=dt,dt<<=1,!(dt&261888)&&(dt=256)),Gf=e}return Gf}function tp(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Tn(e)}function np(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=tp((i[Mt]||null).action),o=r.submitter;o&&(t=(t=o[Mt]||null)?tp(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new qn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Gf!==0){var e=new FormData(i,o);fc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),fc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var rp=0;rp<Si.length;rp++){var ip=Si[rp];Ci(ip.toLowerCase(),`on`+(ip[0].toUpperCase()+ip.slice(1)))}Ci(mi,`onAnimationEnd`),Ci(hi,`onAnimationIteration`),Ci(gi,`onAnimationStart`),Ci(`dblclick`,`onDoubleClick`),Ci(`focusin`,`onFocus`),Ci(`focusout`,`onBlur`),Ci(_i,`onTransitionRun`),Ci(vi,`onTransitionStart`),Ci(yi,`onTransitionCancel`),Ci(bi,`onTransitionEnd`),Yt(`onMouseEnter`,[`mouseout`,`mouseover`]),Yt(`onMouseLeave`,[`mouseout`,`mouseover`]),Yt(`onPointerEnter`,[`pointerout`,`pointerover`]),Yt(`onPointerLeave`,[`pointerout`,`pointerover`]),Jt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Jt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Jt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Jt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Jt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Jt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ap=`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(` `),op=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(ap));function sp(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){Oi(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){Oi(e)}i.currentTarget=null,a=c}}}}function cp(e,t){var n=t[Pt];n===void 0&&(n=t[Pt]=new Set);var r=e+`__bubble`;n.has(r)||(fp(t,e,2,!1),n.add(r))}function lp(e,t,n){var r=0;t&&(r|=4),fp(n,e,r,t)}var up=`_reactListening`+Math.random().toString(36).slice(2);function dp(e){if(!e[up]){e[up]=!0,Kt.forEach(function(t){t!==`selectionchange`&&(op.has(t)||lp(t,!1,e),lp(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[up]||(t[up]=!0,lp(`selectionchange`,!1,t))}}function fp(e,t,n,r){switch(Hh(t)){case 2:var i=Ih;break;case 8:i=Lh;break;default:i=Rh}n=i.bind(null,t,n,e),i=void 0,!In||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 pp(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=Bt(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}Nn(function(){var r=a,i=On(n),s=[];a:{var c=xi.get(e);if(c!==void 0){var l=qn,u=e;switch(e){case`keypress`:if(Hn(n)===0)break a;case`keydown`:case`keyup`:l=dr;break;case`focusin`:u=`focus`,l=nr;break;case`focusout`:u=`blur`,l=nr;break;case`beforeblur`:case`afterblur`:l=nr;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=er;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=tr;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=mr;break;case mi:case hi:case gi:l=rr;break;case bi:l=hr;break;case`scroll`:case`scrollend`:l=Yn;break;case`wheel`:l=gr;break;case`copy`:case`cut`:case`paste`:l=ir;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=fr;break;case`submit`:l=pr;break;case`toggle`:case`beforetoggle`:l=_r}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=Pn(m,p),g!=null&&d.push(mp(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!==Dn&&(u=n.relatedTarget||n.fromElement)&&(Bt(u)||u[Nt]))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?Bt(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=er,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=fr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ht(c),h=l==null?u:Ht(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Bt(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,gp):null,c!==null&&_p(s,u,c,d,!1),l!==null&&f!==null&&_p(s,f,l,d,!0)))}a:{if(c=r?Ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Lr;else if(jr(c)){if(Rr)_=qr;else{_=Gr;var v=Wr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Sn(r.elementType)&&(_=Lr):_=Kr;if(_&&=_(e,r)){Mr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ht(r):window,e){case`focusin`:(jr(v)||v.contentEditable===`true`)&&(ii=v,ai=r,oi=null);break;case`focusout`:oi=ai=ii=null;break;case`mousedown`:si=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:si=!1,ci(s,n,i);break;case`selectionchange`:if(ri)break;case`keydown`:case`keyup`:ci(s,n,i)}var y;if(yr)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 Dr?Tr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(Sr&&n.locale!==`ko`&&(Dr||b!==`onCompositionStart`?b===`onCompositionEnd`&&Dr&&(y=Vn()):(Rn=i,zn=`value`in Rn?Rn.value:Rn.textContent,Dr=!0)),v=hp(r,b),0<v.length&&(b=new ar(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=Er(n),y!==null&&(b.data=y)))),(y=xr?Or(e,n):kr(e,n))&&(b=hp(r,`onBeforeInput`),0<b.length&&(v=new ar(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),np(s,e,r,n,i)}sp(s,t)})}function mp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hp(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=Pn(e,n),i!=null&&r.unshift(mp(e,i,a)),i=Pn(e,t),i!=null&&r.push(mp(e,i,a))),e.tag===3)return r;e=e.return}return[]}function gp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _p(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=Pn(n,a),l!=null&&o.unshift(mp(n,l,c))):i||(l=Pn(n,a),l!=null&&o.push(mp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var vp=/\r\n?/g,yp=/\u0000|\uFFFD/g;function bp(e){return(typeof e==`string`?e:``+e).replace(vp,`
9
+ `).replace(yp,``)}function xp(e,t){return t=bp(t),bp(e)===t}function Sp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||vn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&vn(e,``+r);else return;break;case`className`:rn(e,`class`,r);break;case`tabIndex`:rn(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:rn(e,n,r);break;case`style`:xn(e,r,o);return;case`data`:if(t!==`object`){rn(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=Tn(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`&&Sp(e,t,`name`,a.name,a,null),Sp(e,t,`formEncType`,a.formEncType,a,null),Sp(e,t,`formMethod`,a.formMethod,a,null),Sp(e,t,`formTarget`,a.formTarget,a,null)):(Sp(e,t,`encType`,a.encType,a,null),Sp(e,t,`method`,a.method,a,null),Sp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Tn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=En);return;case`onScroll`:r!=null&&cp(`scroll`,e);return;case`onScrollEnd`:r!=null&&cp(`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=Tn(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`:cp(`beforetoggle`,e),cp(`toggle`,e),nn(e,`popover`,r);break;case`xlinkActuate`:an(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:an(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:an(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:an(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:an(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:an(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:an(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:an(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:an(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:nn(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=Cn.get(n)||n,nn(e,n,r);else return}en=!0}function Cp(e,t,n,r,a,o){switch(n){case`style`:xn(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`)vn(e,r);else if(typeof r==`number`||typeof r==`bigint`)vn(e,``+r);else return;break;case`onScroll`:r!=null&&cp(`scroll`,e);return;case`onScrollEnd`:r!=null&&cp(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=En);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!qt.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[Mt]||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}en=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):nn(e,n,r)}return}en=!0}function wp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:cp(`error`,e),cp(`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:Sp(e,t,o,s,n,null)}}a&&Sp(e,t,`srcSet`,n.srcSet,n,null),r&&Sp(e,t,`src`,n.src,n,null);return;case`input`:cp(`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:Sp(e,t,r,d,n,null)}}pn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in cp(`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:Sp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&hn(e,!!r,n,!0):hn(e,!!r,t,!1);return;case`textarea`:for(s in cp(`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:Sp(e,t,s,c,n,null)}_n(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:Sp(e,t,l,r,n,null)}return;case`dialog`:cp(`beforetoggle`,e),cp(`toggle`,e),cp(`cancel`,e),cp(`close`,e);break;case`iframe`:case`object`:cp(`load`,e);break;case`video`:case`audio`:for(r=0;r<ap.length;r++)cp(ap[r],e);break;case`image`:cp(`error`,e),cp(`load`,e);break;case`details`:cp(`toggle`,e);break;case`embed`:case`source`:case`link`:cp(`error`,e),cp(`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:Sp(e,t,u,r,n,null)}return;default:if(Sn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Cp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Sp(e,t,c,r,n,null))}var Tp={};function eee(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)||Sp(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&&(en=!0),o=m;break;case`name`:m!==f&&(en=!0),a=m;break;case`checked`:m!==f&&(en=!0),u=m;break;case`defaultChecked`:m!==f&&(en=!0),d=m;break;case`value`:m!==f&&(en=!0),s=m;break;case`defaultValue`:m!==f&&(en=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Sp(e,t,p,m,r,f)}}fn(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)||Sp(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&&(en=!0),p=o;break;case`defaultValue`:o!==l&&(en=!0),c=o;break;case`multiple`:o!==l&&(en=!0),s=o;default:o!==l&&Sp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?hn(e,!!n,n?[]:``,!1):hn(e,!!n,t,!0)):hn(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:Sp(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&&(en=!0),p=a;break;case`defaultValue`:a!==o&&(en=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Sp(e,t,s,a,r,o)}gn(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:Sp(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&&(en=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Sp(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)&&Sp(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:Sp(e,t,u,p,r,m)}return;default:if(Sn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Cp(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||Cp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Sp(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||Sp(e,t,f,p,r,m)}function Ep(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Dp(){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&&Ep(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&&Ep(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 Op=null,kp=null;function Ap(e){return e.nodeType===9?e:e.ownerDocument}function jp(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 Mp(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 Np(e,t,n,r){return n=Ap(n).createElement(e),n[jt]=r,n[Mt]=t,wp(n,e,t),Wt(n),n}function Pp(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 Fp=null;function Ip(){var e=window.event;return e&&e.type===`popstate`?e!==Fp&&(Fp=e,!0):(Fp=null,!1)}var Lp=typeof setTimeout==`function`?setTimeout:void 0,Rp=typeof clearTimeout==`function`?clearTimeout:void 0,zp=typeof Promise==`function`?Promise:void 0,Bp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Lp,Vp=typeof queueMicrotask==`function`?queueMicrotask:zp===void 0?Lp:function(e){return zp.resolve(null).then(e).catch(Hp)};function Hp(e){setTimeout(function(){throw e})}function Up(e){return e===`head`}function Wp(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),sg(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Rm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Rm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Lt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Rm(e.ownerDocument.body)}n=i}while(n);sg(t)}function Gp(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 Kp(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 qp(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 Jp(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 Yp(e){return Jp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Xp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Jp(t,n,e)}function Zp(e){return e.documentElement.clientHeight}function Qp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function $p(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`&&(Zp(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+=gh(f),u>yh){s.length=o;break}f=new Promise(Qp.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 em(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}em.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},em.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},em.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function tm(e){return{name:e,group:new em(`group`,e),imagePair:new em(`image-pair`,e),old:new em(`old`,e),new:new em(`new`,e)}}function nm(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}nm.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(sm(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=am(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,rm,e,s,r)}this._eventListeners=a}};function rm(e,t,n,r){return b(e).addEventListener(t,n,r),!1}nm.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=sm(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=am(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,im,e,n,i),r.splice(t,1),a!==null&&a()}};function im(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function am(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function om(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function sm(e,t,n,r){if(e.length===0)return-1;r=om(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&om(a.optionsOrUseCapture)===r)return i}return-1}nm.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,am(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,am(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},nm.prototype.focus=function(e){m(this._fragmentFiber.child,!0,cm,e,void 0,void 0)};function cm(e,t){return e.tag!==6&&(e=b(e),Pm(e,t))}nm.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,lm,t,void 0,void 0);for(var n=t.length-1;0<=n&&!cm(t[n],e);n--);};function lm(e,t){return t.push(e),!1}nm.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=Ap(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,um,e,void 0,void 0))};function um(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}nm.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,dm,e,void 0,void 0)};function dm(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}nm.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,fm,e,void 0,void 0);for(var n=t=0;n<pm.length;n++){var r=pm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):pm[t++]=r}pm.length=t}};function fm(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var pm=[],mm=!1;function hm(e,t,n){pm.push({fragmentInstance:e,observer:t,instance:n}),mm||(mm=!0,Fm(function(){mm=!1;var e=pm;pm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}nm.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,gm,e,void 0,void 0),e};function gm(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}nm.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},nm.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,lm,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||_m(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function _m(e,t,n,r,i){var a=Bt(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 vm(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)}nm.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,lm,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),vm(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),vm(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function ym(e,t){return e=b(e),bm(e,t),!1}function bm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function xm(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,am(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<pm.length;i++){var a=pm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(pm[r++]=a)}pm.length=r,n.observe(e)}),bm(e,t))}function Sm(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,am(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?hm(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Cm(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`:Cm(n),zt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function wm(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[Lt])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=Am(e.nextSibling),e===null)break}return null}function Tm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Am(e.nextSibling),e===null))return null;return e}function Em(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Am(e.nextSibling),e===null))return null;return e}function Dm(e){return e.data===`$?`||e.data===`$~`}function Om(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function km(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 Am(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 jm=null;function Mm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Am(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Nm(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 Pm(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 Fm(e){Bp(function(){Bp(function(t){return e(t)})})}function Im(e,t,n){switch(t=Ap(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 Lm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&Sp(e,t,r,null,Tp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===En&&(e.onclick=null),zt(e)}function Rm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);zt(e)}var zm=new Map,Bm=new Set;function Vm(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 Hm=Se.d;Se.d={f:Um,r:Wm,D:qm,C:Jm,L:Ym,m:Xm,X:Qm,S:Zm,M:$m};function Um(){var e=Hm.f(),t=af();return e||t}function Wm(e){var t=Vt(e);t!==null&&t.tag===5&&t.type===`form`?mc(t):Hm.r(e)}var Gm=typeof document>`u`?null:document;function Km(e,t,n){var r=Gm;if(r&&typeof t==`string`&&t){var i=dn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Bm.has(i)||(Bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),wp(t,`link`,e),Wt(t),r.head.appendChild(t)))}}function qm(e){Hm.D(e),Km(`dns-prefetch`,e,null)}function Jm(e,t){Hm.C(e,t),Km(`preconnect`,e,t)}function Ym(e,t,n){Hm.L(e,t,n);var r=Gm;if(r&&e&&t){var i=`link[rel="preload"][as="`+dn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+dn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+dn(n.imageSizes)+`"]`)):i+=`[href="`+dn(e)+`"]`;var a=i;switch(t){case`style`:a=th(e);break;case`script`:a=ah(e)}if(!(zm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),zm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(nh(a))||t===`script`&&r.querySelector(oh(a))))){var o=r.createElement(`link`);wp(o,`link`,e),t===`style`&&(o[Rt]=!0,o.onload=o.onerror=function(){Gt(o)}),Wt(o),r.head.appendChild(o)}}}function Xm(e,t){Hm.m(e,t);var n=Gm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+dn(r)+`"][href="`+dn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=ah(e)}if(!zm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),zm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(oh(a)))return}r=n.createElement(`link`),wp(r,`link`,e),Wt(r),n.head.appendChild(r)}}}function Zm(e,t,n){Hm.S(e,t,n);var r=Gm;if(r&&e){var i=Ut(r).hoistableStyles,a=th(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(nh(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=zm.get(a))&&lh(e,n);var c=o=r.createElement(`link`);Wt(c),wp(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,ch(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Qm(e,t){Hm.X(e,t);var n=Gm;if(n&&e){var r=Ut(n).hoistableScripts,i=ah(e),a=r.get(i);a||(a=n.querySelector(oh(i)),a||(e=D({src:e,async:!0},t),(t=zm.get(i))&&uh(e,t),a=n.createElement(`script`),Wt(a),wp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function $m(e,t){Hm.M(e,t);var n=Gm;if(n&&e){var r=Ut(n).hoistableScripts,i=ah(e),a=r.get(i);a||(a=n.querySelector(oh(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=zm.get(i))&&uh(e,t),a=n.createElement(`script`),Wt(a),wp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function eh(e,t,n,r){var a=(a=je.current)?Vm(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=th(n.href),t=Ut(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=th(n.href);var o=Ut(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(nh(e)))?o._p||(s.instance=o,s.state.loading=5):(o=zm.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},zm.set(e,o)),ih(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=ah(n),t=Ut(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 th(e){return`href="`+dn(e)+`"`}function nh(e){return`link[rel="stylesheet"][`+e+`]`}function rh(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function ih(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Rt]){r.loading=1;return}}else t=e.createElement(`link`),t[Rt]=!0,t.onload=t.onerror=Gt.bind(null,t),wp(t,`link`,n),Wt(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 ah(e){return`[src="`+dn(e)+`"]`}function oh(e){return`script[async]`+e}function sh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+dn(n.href)+`"]`);if(r)return t.instance=r,Wt(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`),Wt(r),wp(r,`style`,a),ch(r,n.precedence,e),t.instance=r;case`stylesheet`:a=th(n.href);var o=e.querySelector(nh(a));if(o)return t.state.loading|=4,t.instance=o,Wt(o),o;r=rh(n),(a=zm.get(a))&&lh(r,a),o=(e.ownerDocument||e).createElement(`link`),Wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),wp(o,`link`,r),t.state.loading|=4,ch(o,n.precedence,e),t.instance=o;case`script`:return o=ah(n.src),(a=e.querySelector(oh(o)))?(t.instance=a,Wt(a),a):(r=n,(a=zm.get(o))&&(r=D({},n),uh(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Wt(a),wp(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,ch(r,n.precedence,e));return t.instance}function ch(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 lh(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function uh(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var M=null;function dh(e,t,n){if(M===null){var r=new Map,i=M=new Map;i.set(n,r)}else i=M,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[Lt]||a[jt]||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 fh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ph(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 mh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function hh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function gh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function _h(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=gh(t),e.suspenseyImages.push(t)),e=Ch.bind(e),t.decode().then(e,e))}function vh(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=th(r.href),a=t.querySelector(nh(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Sh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Wt(a);return}a=t.ownerDocument||t,r=rh(r),(i=zm.get(i))&&lh(r,i),a=a.createElement(`link`),Wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),wp(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=Sh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var yh=0;function bh(e,t){return e.stylesheets&&e.count===0&&wh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&wh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&yh===0&&(yh=62500*Dp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>yh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function xh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)wh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Sh(){this.count--,xh(this)}function Ch(){this.imgCount--,xh(this)}var N=null;function wh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,N=new Map,t.forEach(Th,e),N=null,Sh.call(e))}function Th(e,t){if(!(t.state.loading&4)){var n=N.get(e);if(n)var r=n.get(null);else{n=new Map,N.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=Sh.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 Eh={$$typeof:oe,Provider:null,Consumer:null,_currentValue:Ce,_currentValue2:Ce,_threadCount:0};function Dh(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=bt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bt(0),this.hiddenUpdates=bt(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 Oh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new Dh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Bi(3,null,null,t),e.current=a,a.stateNode=e,t=Va(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},wo(a),e}function kh(e){return e?(e=Ri,e):Ri}function Ah(e,t,n,r,i,a){i=kh(i),r.context===null?r.context=i:r.pendingContext=i,r=Eo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Do(e,r,t),n!==null&&($d(n,e,t),Oo(n,e,t))}function jh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Mh(e,t){jh(e,t),(e=e.alternate)&&jh(e,t)}function Nh(e){if(e.tag===13||e.tag===31){var t=Fi(e,67108864);t!==null&&$d(t,e,67108864),Mh(e,67108864)}}function Ph(e){if(e.tag===13||e.tag===31){var t=Xd();t=Et(t);var n=Fi(e,t);n!==null&&$d(n,e,t),Mh(e,t)}}var Fh=!0;function Ih(e,t,n,r){var i=xe.T;xe.T=null;var a=Se.p;try{Se.p=2,Rh(e,t,n,r)}finally{Se.p=a,xe.T=i}}function Lh(e,t,n,r){var i=xe.T;xe.T=null;var a=Se.p;try{Se.p=8,Rh(e,t,n,r)}finally{Se.p=a,xe.T=i}}function Rh(e,t,n,r){if(Fh){var i=zh(r);if(i===null)pp(e,t,r,Bh,n),Zh(e,r);else if($h(i,e,t,n,r))r.stopPropagation();else if(Zh(e,r),t&4&&-1<Xh.indexOf(e)){for(;i!==null;){var a=Vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=mt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-st(o);s.entanglements[1]|=c,o&=~c}Kf(a),!(md&6)&&(Fd=Ye()+500,qf(0,!1))}}break;case 31:case 13:s=Fi(a,2),s!==null&&$d(s,a,2),af(),Mh(a,2)}if(a=zh(r),a===null&&pp(e,t,r,Bh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else pp(e,t,r,null,n)}}function zh(e){return e=On(e),Vh(e)}var Bh=null;function Vh(e){if(Bh=null,e=Bt(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 Bh=e,null}function Hh(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(Xe()){case Ze:return 2;case Qe:return 8;case $e:case et:return 32;case tt:return 268435456;default:return 32}default:return 32}}var Uh=!1,Wh=null,Gh=null,Kh=null,qh=new Map,Jh=new Map,Yh=[],Xh=`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 Zh(e,t){switch(e){case`focusin`:case`focusout`:Wh=null;break;case`dragenter`:case`dragleave`:Gh=null;break;case`mouseover`:case`mouseout`:Kh=null;break;case`pointerover`:case`pointerout`:qh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Jh.delete(t.pointerId)}}function Qh(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=Vt(t),t!==null&&Nh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function $h(e,t,n,r,i){switch(t){case`focusin`:return Wh=Qh(Wh,e,t,n,r,i),!0;case`dragenter`:return Gh=Qh(Gh,e,t,n,r,i),!0;case`mouseover`:return Kh=Qh(Kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return qh.set(a,Qh(qh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Jh.set(a,Qh(Jh.get(a)||null,e,t,n,r,i)),!0}return!1}function eg(e){var t=Bt(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,kt(e.priority,function(){Ph(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,kt(e.priority,function(){Ph(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 tg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=zh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dn=r,n.target.dispatchEvent(r),Dn=null}else return t=Vt(n),t!==null&&Nh(t),e.blockedOn=n,!1;t.shift()}return!0}function ng(e,t,n){tg(e)&&n.delete(t)}function rg(){Uh=!1,Wh!==null&&tg(Wh)&&(Wh=null),Gh!==null&&tg(Gh)&&(Gh=null),Kh!==null&&tg(Kh)&&(Kh=null),qh.forEach(ng),Jh.forEach(ng)}function ig(e,n){e.blockedOn===n&&(e.blockedOn=null,Uh||(Uh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,rg)))}var ag=null;function og(e){ag!==e&&(ag=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){ag===e&&(ag=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(Vh(r||n)===null)continue;break}var a=Vt(n);a!==null&&(e.splice(t,3),t-=3,fc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function sg(e){function t(t){return ig(t,e)}Wh!==null&&ig(Wh,e),Gh!==null&&ig(Gh,e),Kh!==null&&ig(Kh,e),qh.forEach(t),Jh.forEach(t);for(var n=0;n<Yh.length;n++){var r=Yh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Yh.length&&(n=Yh[0],n.blockedOn===null);)eg(n),n.blockedOn===null&&Yh.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[Mt]||null;if(typeof a==`function`)o||og(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Mt]||null)s=o.formAction;else if(Vh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),og(n)}}}function cg(){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 lg(e){this._internalRoot=e}ug.prototype.render=lg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;Ah(n,Xd(),e,t,null,null)},ug.prototype.unmount=lg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ah(e.current,2,null,e,null,null),af(),t[Nt]=null}};function ug(e){this._internalRoot=e}ug.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yh.length&&t!==0&&t<Yh[n].priority;n++);Yh.splice(n,0,e),n===0&&eg(e)}};var dg=n.version;if(dg!==`19.3.1`)throw Error(i(527,dg,`19.3.1`));Se.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 fg={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:xe,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var pg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pg.isDisabled&&pg.supportsFiber)try{it=pg.inject(fg),at=pg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Fc,s=Ic,c=Lc;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=Oh(e,1,!1,null,null,n,r,null,o,s,c,cg),e[Nt]=t.current,dp(e),new lg(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),ee=typeof window<`u`?v.useLayoutEffect:v.useEffect;function te({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]),ee(()=>{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=ne();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})(te||={});function ne(){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 re=_();function ie(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=ie(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ae(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ie(e))&&(r&&(r+=` `),r+=t);return r}var oe=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,k=ae,se=(e,t)=>n=>{if(t?.variants==null)return k(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=oe(t)||oe(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 k(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)},ce=(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},le=(e,t)=>({classGroupId:e,validator:t}),ue=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),de=`-`,fe=[],pe=`arbitrary..`,me=e=>{let t=_e(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ge(e);let n=e.split(de);return he(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ce(i,t):t:i||fe}return n[e]||fe}}},he=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=he(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(de):e.slice(t).join(de),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ge=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?pe+r:void 0})(),_e=e=>{let{theme:t,classGroups:n}=e;return ve(n,t)},ve=(e,t)=>{let n=ue();for(let r in e){let i=e[r];ye(i,n,r,t)}return n},ye=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];be(i,t,n,r)}},be=(e,t,n,r)=>{typeof e==`string`?xe(e,t,n):typeof e==`function`?Se(e,t,n,r):Ce(e,t,n,r)},xe=(e,t,n)=>{let r=e===``?t:we(t,e);r.classGroupId=n},Se=(e,t,n,r)=>{Te(e)?ye(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(le(n,e)))},Ce=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ye(o,we(t,a),n,r)}},we=(e,t)=>{let n=e,r=t.split(de),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ue(),n.nextPart.set(t,i)),n=i}return n},Te=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ee=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)}}},De=`!`,Oe=`:`,ke=[],Ae=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),je=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===Oe){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(De)?(c=s.slice(0,-1),l=!0):s.startsWith(De)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Ae(t,l,c,u)};if(t){let e=t+Oe,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Ae(ke,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Me=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}},Ne=e=>({cache:Ee(e.cacheSize),parseClassName:je(e),sortModifiers:Me(e),postfixLookupClassGroupIds:Pe(e),...me(e)}),Pe=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},Fe=/\s+/,Ie=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Fe),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?_+De:_,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},Le=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Re(n))&&(i&&(i+=` `),i+=r);return i},Re=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Re(e[r]))&&(n&&(n+=` `),n+=t);return n},ze=(e,...t)=>{let n,r,i,a,o=o=>(n=Ne(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=Ie(e,n);return i(e,a),a};return a=o,(...e)=>a(Le(...e))},Be=[],Ve=e=>{let t=t=>t[e]||Be;return t.isThemeGetter=!0,t.themeKey=e,t},He=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ue=/^\((?:(\w[\w-]*):)?(.+)\)$/i,We=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ke=/\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$/,qe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Je=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ye=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xe=e=>We.test(e),Ze=e=>!!e&&!Number.isNaN(Number(e)),Qe=e=>!!e&&Number.isInteger(Number(e)),$e=e=>e.endsWith(`%`)&&Ze(e.slice(0,-1)),et=e=>Ge.test(e),tt=()=>!0,nt=e=>Ke.test(e)&&!qe.test(e),rt=()=>!1,it=e=>Je.test(e),at=e=>Ye.test(e),ot=e=>!lt(e)&&!_t(e),st=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)),ct=e=>Tt(e,kt,rt),lt=e=>He.test(e),ut=e=>Tt(e,At,nt),dt=e=>Tt(e,jt,Ze),ft=e=>Tt(e,Nt,tt),pt=e=>Tt(e,Mt,rt),mt=e=>Tt(e,Dt,rt),ht=e=>Tt(e,Ot,at),gt=e=>Tt(e,Pt,it),_t=e=>Ue.test(e),vt=e=>Et(e,At),yt=e=>Et(e,Mt),bt=e=>Et(e,Dt),xt=e=>Et(e,kt),St=e=>Et(e,Ot),Ct=e=>Et(e,Pt,!0),wt=e=>Et(e,Nt,!0),Tt=(e,t,n)=>{let r=He.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Et=(e,t,n=!1)=>{let r=Ue.exec(e);return r?r[1]?t(r[1]):n:!1},Dt=e=>e===`position`||e===`percentage`,Ot=e=>e===`image`||e===`url`,kt=e=>e===`length`||e===`size`||e===`bg-size`,At=e=>e===`length`,jt=e=>e===`number`,Mt=e=>e===`family-name`,Nt=e=>e===`number`||e===`weight`,Pt=e=>e===`shadow`,Ft=ze(()=>{let e=Ve(`color`),t=Ve(`font`),n=Ve(`text`),r=Ve(`font-weight`),i=Ve(`tracking`),a=Ve(`leading`),o=Ve(`breakpoint`),s=Ve(`container`),c=Ve(`spacing`),l=Ve(`radius`),u=Ve(`shadow`),d=Ve(`inset-shadow`),f=Ve(`text-shadow`),p=Ve(`drop-shadow`),m=Ve(`blur`),h=Ve(`perspective`),g=Ve(`aspect`),_=Ve(`ease`),v=Ve(`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(),_t,lt],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[_t,lt,c],T=()=>[Xe,`full`,`auto`,...w()],E=()=>[Qe,`none`,`subgrid`,_t,lt],D=()=>[`auto`,{span:[`full`,Qe,_t,lt]},Qe,_t,lt],O=()=>[Qe,`auto`,_t,lt],ee=()=>[`auto`,`min`,`max`,`fr`,_t,lt],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],re=()=>[`auto`,...w()],ie=()=>[Xe,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ae=()=>[s,Xe,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],oe=()=>[Xe,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[e,_t,lt],se=()=>[...b(),bt,mt,{position:[_t,lt]}],ce=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],le=()=>[`auto`,`cover`,`contain`,xt,ct,{size:[_t,lt]}],ue=()=>[$e,vt,ut],de=()=>[``,`none`,`full`,l,_t,lt],fe=()=>[``,Ze,vt,ut],pe=()=>[`solid`,`dashed`,`dotted`,`double`],me=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],he=()=>[Ze,$e,bt,mt],ge=()=>[``,`none`,m,_t,lt],_e=()=>[`none`,Ze,_t,lt],ve=()=>[`none`,Ze,_t,lt],ye=()=>[Ze,_t,lt],be=()=>[Xe,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[et],breakpoint:[et],color:[tt],container:[et],"drop-shadow":[et],ease:[`in`,`out`,`in-out`],font:[ot],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[et],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[et],shadow:[et],spacing:[`px`,Ze],text:[et],"text-shadow":[et],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Xe,lt,_t,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,_t,lt]}],"container-named":[st],columns:[{columns:[Ze,`auto`,lt,_t,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:[Qe,`auto`,_t,lt]}],basis:[{basis:[Xe,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Ze,Xe,`auto`,`initial`,`none`,lt]}],grow:[{grow:[``,Ze,_t,lt]}],shrink:[{shrink:[``,Ze,_t,lt]}],order:[{order:[Qe,`first`,`last`,`none`,_t,lt]}],"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":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],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:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mbs:[{mbs:re()}],mbe:[{mbe:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ie()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...oe()]}],"min-block-size":[{"min-block":[`auto`,...oe()]}],"max-block-size":[{"max-block":[`none`,...oe()]}],w:[{w:[s,`screen`,...ie()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ie()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ie()]}],h:[{h:[`screen`,`lh`,...ie()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ie()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...ie()]}],"font-size":[{text:[`base`,n,vt,ut]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,wt,ft]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,$e,lt]}],"font-family":[{font:[yt,pt,t]}],"font-features":[{"font-features":[lt]}],"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,_t,lt]}],"line-clamp":[{"line-clamp":[Ze,`none`,_t,dt]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,_t,lt]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,_t,lt]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...pe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Ze,`from-font`,`auto`,_t,ut]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[Ze,`auto`,_t,lt]}],"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:[Qe,_t,lt]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,_t,lt]}],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`,_t,lt]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:le()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Qe,_t,lt],radial:[``,_t,lt],conic:[``,Qe,_t,lt]},St,ht]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...pe(),`hidden`,`none`]}],"divide-style":[{divide:[...pe(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...pe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Ze,_t,lt]}],"outline-w":[{outline:[``,Ze,vt,ut]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`inner`,`none`,u,Ct,gt]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ct,gt]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:fe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[Ze,ut]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,Ct,gt]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[Ze,_t,lt]}],"mix-blend":[{"mix-blend":[...me(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":me()}],"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":[Ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[_t,lt]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":[Ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,_t,lt]}],filter:[{filter:[``,`none`,_t,lt]}],blur:[{blur:ge()}],brightness:[{brightness:[Ze,_t,lt]}],contrast:[{contrast:[Ze,_t,lt]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ct,gt]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,Ze,_t,lt]}],"hue-rotate":[{"hue-rotate":[Ze,_t,lt]}],invert:[{invert:[``,Ze,_t,lt]}],saturate:[{saturate:[Ze,_t,lt]}],sepia:[{sepia:[``,Ze,_t,lt]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,_t,lt]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ze,_t,lt]}],"backdrop-contrast":[{"backdrop-contrast":[Ze,_t,lt]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Ze,_t,lt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ze,_t,lt]}],"backdrop-invert":[{"backdrop-invert":[``,Ze,_t,lt]}],"backdrop-opacity":[{"backdrop-opacity":[Ze,_t,lt]}],"backdrop-saturate":[{"backdrop-saturate":[Ze,_t,lt]}],"backdrop-sepia":[{"backdrop-sepia":[``,Ze,_t,lt]}],"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`,_t,lt]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Ze,`initial`,_t,lt]}],ease:[{ease:[`linear`,`initial`,_,_t,lt]}],delay:[{delay:[Ze,_t,lt]}],animate:[{animate:[`none`,v,_t,lt]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,_t,lt]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":[`scale-3d`],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[_t,lt,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":[`translate-none`],zoom:[{zoom:[Qe,_t,lt]}],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"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`,_t,lt]}],"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":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"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`,_t,lt]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[Ze,vt,ut,dt]}],stroke:[{stroke:[`none`,...k()]}],"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 A(...e){return Ft(ae(e))}var It=l(h(),1),Lt=Object.defineProperty,Rt=(e,t)=>Lt(e,`name`,{value:t,configurable:!0});function zt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Rt(zt,`setRef`);function Bt(...e){return t=>{let n=!1,r=e.map(e=>{let r=zt(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():zt(e[t],null)}}}}Rt(Bt,`composeRefs`);function Vt(...e){return v.useCallback(Bt(...e),e)}Rt(Vt,`useComposedRefs`);var Ht=Object.defineProperty,Ut=(e,t)=>Ht(e,`name`,{value:t,configurable:!0});function Wt(e){let t=v.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=tn(r),v.Children.forEach(r,e=>{if(Zt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;$t(n)&&typeof on==`function`;)n=on(n._payload);a=Jt(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?Xt(a):void 0,l=Vt(n,c);if(!a){if(r||r===0)throw Error(o?an(e):rn(e));return r}let u=Yt(i,a.props??{});return a.type!==v.Fragment&&(u.ref=n?l:c),v.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Ut(Wt,`createSlot`);var Gt=Wt(`Slot`),Kt=Symbol.for(`radix.slottable`);function qt(e){let t=Ut(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Kt,t}Ut(qt,`createSlottable`);var Jt=Ut((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 Yt(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]=nn(a,i))}return{...e,...n}}Ut(Yt,`mergeProps`);function Xt(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)}Ut(Xt,`getElementRef`);function Zt(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Kt}Ut(Zt,`isSlottable`);var Qt=Symbol.for(`react.lazy`);function $t(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Qt&&`_payload`in e&&en(e._payload)}Ut($t,`isLazyComponent`);function en(e){return typeof e==`object`&&!!e&&`then`in e}Ut(en,`isPromiseLike`);function tn(e){let t=e;for(;$t(t)&&typeof on==`function`;)t=on(t._payload);return t}Ut(tn,`useUnwrappedLazy`);function nn(...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}Ut(nn,`concatAriaDescribedby`);var rn=Ut(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),an=Ut(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),on=v.use,sn=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})),j=o(((e,t)=>{t.exports=sn()}))(),cn=Object.defineProperty,ln=(e,t)=>cn(e,`name`,{value:t,configurable:!0}),un=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Wt(`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,j.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dn(e,t){e&&It.flushSync(()=>e.dispatchEvent(t))}ln(dn,`dispatchDiscreteCustomEvent`);var fn=Object.defineProperty,pn=(e,t)=>fn(e,`name`,{value:t,configurable:!0}),mn=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`}),hn=v.forwardRef(pn(function(e,t){return(0,j.jsx)(un.span,{...e,ref:t,style:{...mn,...e.style}})},`VisuallyHidden`)),gn=Object.defineProperty,_n=(e,t)=>gn(e,`name`,{value:t,configurable:!0});function vn(e,t){let n=v.createContext(t);n.displayName=e+`Context`;let r=_n(e=>{let{children:t,...r}=e,i=v.useMemo(()=>r,Object.values(r));return(0,j.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 _n(i,`useContext`),[r,i]}_n(vn,`createContext`);function yn(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=_n(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=v.useMemo(()=>o,Object.values(o));return(0,j.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 _n(s,`useContext`),[o,s]}_n(r,`createContext`);let i=_n(()=>{let t=n.map(e=>v.createContext(e));return _n(function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,bn(i,...t)]}_n(yn,`createContextScope`);function bn(...e){let t=e[0];if(e.length===1)return t;let n=_n(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return _n(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}_n(bn,`composeContextScopes`);var xn=globalThis?.document?v.useLayoutEffect:()=>{},Sn=Object.defineProperty,Cn=(e,t)=>Sn(e,`name`,{value:t,configurable:!0});function wn(e){let t=e+`CollectionProvider`,[n,r]=yn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Cn(e=>{let{scope:t,children:n}=e,r=v.useRef(null),a=v.useRef(new Map).current;return(0,j.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Wt(s),l=v.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Vt(t,a(s,n).collectionRef);return(0,j.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Wt(u),p=v.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=v.useRef(null),s=Vt(t,o),c=a(u,n);return v.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,j.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 Cn(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Cn(wn,`createCollection`);var Tn=new WeakMap,En=class e extends Map{static{Cn(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Tn.set(this,!0)}set(e,t){return Tn.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=kn(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=Dn(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Dn(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Dn(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 Dn(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=On(e,t);return n===-1?void 0:e[n]}Cn(Dn,`at`);function On(e,t){let n=e.length,r=kn(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Cn(On,`toSafeIndex`);function kn(e){return e!==e||e===0?0:Math.trunc(e)}Cn(kn,`toSafeInteger`);function An(e){let t=e+`CollectionProvider`,[n,r]=yn(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=Cn(({state:e,...t})=>e?(0,j.jsx)(u,{...t,state:e}):(0,j.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=Cn(e=>{let t=_();return(0,j.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let u=Cn(e=>{let{scope:t,children:n,state:r}=e,a=v.useRef(null),[s,c]=v.useState(null),l=Vt(a,c),[u,d]=r,f=v.useRef(new En),p=v.useCallback(()=>{let e=f.current;return Nn(e)||e.sort(Pn),e},[]);return v.useEffect(()=>{if(!s)return;let e=Fn(()=>{d(e=>{let t=e.toSorted(Pn);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,j.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,j.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);u.displayName=e+`CollectionProviderImpl`;let d=e+`CollectionSlot`,f=Wt(d),p=v.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Vt(t,a(d,n).collectionElementRef);return(0,j.jsx)(f,{ref:i,children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,h=Wt(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);jn(l.current,i)||(l.current=i);let u=l.current,d=Vt(t,v.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),o);xn(()=>{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 En(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(Pn)}))}),v.useEffect(()=>()=>{let e=f.current;f.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new En(t);return n.delete(e.element),n})},[s]),(0,j.jsx)(h,{"data-radix-collection-item":``,ref:d,children:r})});g.displayName=m;function _(){return v.useState(new En)}Cn(_,`useInitCollection`);function y(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}Cn(y,`useCollection`);function b(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return Cn(b,`useGetCollection`),[{Provider:c,Slot:p,ItemSlot:g},{createCollectionScope:r,useCollection:y,useGetCollection:b,useInitCollection:_}]}Cn(An,`createCollection`);function jn(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}Cn(jn,`shallowEqual`);function Mn(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Cn(Mn,`isElementPreceding`);function Nn(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}Cn(Nn,`isInDocumentOrder`);function Pn(e,t){return!e[1].element||!t[1].element?0:Mn(e[1].element,t[1].element)?-1:1}Cn(Pn,`sortByDocumentPosition`);function Fn(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Cn(Fn,`getChildListObserver`);var In=Object.defineProperty,Ln=(e,t)=>In(e,`name`,{value:t,configurable:!0}),Rn=!!(typeof window<`u`&&window.document&&window.document.createElement);function zn(e,t,{checkForDefaultPrevented:n=!0}={}){return Ln(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Ln(zn,`composeEventHandlers`);function Bn(e){if(!Rn)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Ln(Bn,`getOwnerWindow`);function Vn(e){if(!Rn)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Ln(Vn,`getOwnerDocument`);function Hn(e,t=!1){let{activeElement:n}=Vn(e);if(!n?.nodeName)return null;if(Un(n)&&n.contentDocument)return Hn(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Vn(n).getElementById(e);if(t)return t}}return n}Ln(Hn,`getActiveElement`);function Un(e){return e.tagName===`IFRAME`}Ln(Un,`isFrame`);var Wn=Object.defineProperty,Gn=(e,t)=>Wn(e,`name`,{value:t,configurable:!0}),Kn=v.useEffectEvent,qn=v.useInsertionEffect;function Jn(e){if(typeof Kn==`function`)return Kn(e);let t=v.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof qn==`function`?qn(()=>{t.current=e}):xn(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}Gn(Jn,`useEffectEvent`);var Yn=Object.defineProperty,Xn=(e,t)=>Yn(e,`name`,{value:t,configurable:!0}),Zn=v.useInsertionEffect||xn;function Qn({prop:e,defaultProp:t,onChange:n=Xn(()=>{},`onChange`),caller:r}){let[i,a,o]=$n({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,v.useCallback(t=>{if(s){let n=er(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Xn(Qn,`useControllableState`);function $n({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return Zn(()=>{a.current=t},[t]),v.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Xn($n,`useUncontrolledState`);function er(e){return typeof e==`function`}Xn(er,`isFunction`);var tr=Symbol(`RADIX:SYNC_STATE`);function nr(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Jn(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=v.useReducer((t,n)=>{if(n.type===tr)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:tr,state:i})},[i,d.state,c]),[h,f]}Xn(nr,`useControllableStateReducer`);var rr=Object.defineProperty,ir=(e,t)=>rr(e,`name`,{value:t,configurable:!0});function ar(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}ir(ar,`useStateMachine`);var or=ir(e=>{let{present:t,children:n}=e,r=sr(t),i=typeof n==`function`?n({present:r.isPresent}):v.Children.only(n),a=lr(r.ref,dr(i));return typeof n==`function`||r.isPresent?v.cloneElement(i,{ref:a}):null},`Presence`);function sr(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]=ar(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??ur(r.current),o.current=void 0):a.current=`none`},[s]),xn(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=ur(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]),xn(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=ir(a=>{let o=ur(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=ir(e=>{e.target===t&&(a.current=ur(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=ur(t)}else r.current=null;n(e)},[])}}ir(sr,`usePresence`);function cr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ir(cr,`setRef`);function lr(...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=cr(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():cr(n[e],null)}}},[])}ir(lr,`useStableComposedRefs`);function ur(e){return e?.animationName||`none`}ir(ur,`getAnimationName`);function dr(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)}ir(dr,`getElementRef`);var fr=Object.defineProperty,pr=(e,t)=>fr(e,`name`,{value:t,configurable:!0}),mr=v.useId||(()=>void 0),hr=0;function gr(e){let[t,n]=v.useState(mr());return xn(()=>{e||n(e=>e??String(hr++))},[e]),e||(t?`radix-${t}`:``)}pr(gr,`useId`);var _r=Object.defineProperty,vr=(e,t)=>_r(e,`name`,{value:t,configurable:!0}),yr=`Collapsible`,[br,xr]=yn(yr),[Sr,Cr]=br(yr),wr=v.forwardRef(vr(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Qn({prop:r,defaultProp:i??!1,onChange:o,caller:yr});return(0,j.jsx)(Sr,{scope:n,disabled:a,contentId:gr(),open:c,onOpenToggle:v.useCallback(()=>l(e=>!e),[l]),children:(0,j.jsx)(un.div,{"data-state":Ar(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),Tr=`CollapsibleTrigger`,Er=v.forwardRef(vr(function(e,t){let{__scopeCollapsible:n,...r}=e,i=Cr(Tr,n);return(0,j.jsx)(un.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":Ar(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:zn(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),Dr=`CollapsibleContent`,Or=v.forwardRef(vr(function(e,t){let{forceMount:n,...r}=e,i=Cr(Dr,e.__scopeCollapsible);return(0,j.jsx)(or,{present:n||i.open,children:({present:e})=>(0,j.jsx)(kr,{...r,ref:t,present:e})})},`CollapsibleContent`)),kr=v.forwardRef(vr(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Cr(Dr,n),[s,c]=v.useState(r),l=v.useRef(null),u=Vt(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)},[]),xn(()=>{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,j.jsx)(un.div,{"data-state":Ar(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 Ar(e){return e?`open`:`closed`}vr(Ar,`getState`);var jr=Object.defineProperty,Mr=(e,t)=>jr(e,`name`,{value:t,configurable:!0}),Nr={LTR:`ltr`,RTL:`rtl`},Pr=v.createContext(void 0);function Fr(e){let t=v.useContext(Pr);return e||t||Nr.LTR}Mr(Fr,`useDirection`);var Ir=Object.defineProperty,Lr=(e,t)=>Ir(e,`name`,{value:t,configurable:!0}),Rr=v.useInsertionEffect;function zr(e){let t=v.useRef(e);return typeof Rr==`function`?Rr(()=>{t.current=e}):xn(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}Lr(zr,`useCallbackRef`);var Br=Object.defineProperty,Vr=(e,t)=>Br(e,`name`,{value:t,configurable:!0}),Hr=`dismissableLayer.update`,Ur=`dismissableLayer.pointerDownOutside`,Wr=`dismissableLayer.focusOutside`,Gr,Kr=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),qr=v.forwardRef(Vr(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(Kr),[d,f]=v.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=v.useState({}),h=Vt(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=Xr(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=Zr(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=zr(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&&(Gr=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Qr(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Gr))}},[d,p,n,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Qr())},[d,u]),v.useEffect(()=>{let e=Vr(()=>m({}),`handleUpdate`);return document.addEventListener(Hr,e),()=>document.removeEventListener(Hr,e)},[]),(0,j.jsx)(un.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:zn(e.onFocusCapture,T.onFocusCapture),onBlurCapture:zn(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:zn(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Jr(){let e=v.useContext(Kr),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Vr(Jr,`useDismissableLayerSurface`);var Yr=Vr(()=>!0,`IS_TRUE`);function Xr(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Yr}=t,s=zr(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()}Vr(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Vr(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)}Vr(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Vr(p,`handleInteractionBubble`);let m=Vr(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||$r(Ur,s,p,{discrete:!0})};if(Vr(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:Vr(()=>c.current=!0,`onPointerDownCapture`)}}Vr(Xr,`usePointerDownOutside`);function Zr(e,t=globalThis?.document){let n=zr(e),r=v.useRef(!1);return v.useEffect(()=>{let e=Vr(e=>{e.target&&!r.current&&$r(Wr,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Vr(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Vr(()=>r.current=!1,`onBlurCapture`)}}Vr(Zr,`useFocusOutside`);function Qr(){let e=new CustomEvent(Hr);document.dispatchEvent(e)}Vr(Qr,`dispatchUpdate`);function $r(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?dn(i,a):i.dispatchEvent(a)}Vr($r,`handleAndDispatchCustomEvent`);var ei=Object.defineProperty,ti=(e,t)=>ei(e,`name`,{value:t,configurable:!0}),ni=`focusScope.autoFocusOnMount`,ri=`focusScope.autoFocusOnUnmount`,ii={bubbles:!1,cancelable:!0},ai=v.forwardRef(ti(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=v.useState(null),u=zr(a),d=zr(o),f=v.useRef(null),p=Vt(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:gi(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||gi(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&gi(c)};ti(e,`handleFocusIn`),ti(t,`handleFocusOut`),ti(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){_i.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(ni,ii);c.addEventListener(ni,u),c.dispatchEvent(t),t.defaultPrevented||(ui(bi(fi(c)),{select:!0}),document.activeElement===e&&gi(c))}return()=>{c.removeEventListener(ni,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(ri,ii);c.addEventListener(ri,d),c.dispatchEvent(r),r.defaultPrevented||gi(e??t.body,{select:!0}),c.removeEventListener(ri,d),_i.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]=di(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&gi(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&gi(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,j.jsx)(un.div,{tabIndex:-1,...s,ref:p,onKeyDown:_})},`FocusScope`)),oi=v.createContext(null);function si({registry:e,children:t}){return e?(0,j.jsx)(oi.Provider,{value:e,children:t}):t}ti(si,`FocusScopeBranchProvider`);function ci(){let[e,t]=v.useState([]);return{nodes:e,registry:v.useMemo(()=>({add:ti(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:ti(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}ti(ci,`useFocusScopeBranchRegistry`);function li(e){let t=v.useContext(oi);v.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}ti(li,`useFocusScopeBranch`);function ui(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(gi(r,{select:t}),document.activeElement!==n)return}ti(ui,`focusFirst`);function di(e){let t=fi(e);return[pi(t,e),pi(t.reverse(),e)]}ti(di,`getTabbableEdges`);function fi(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ti(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}ti(fi,`getTabbableCandidates`);function pi(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):mi(r,{upTo:t})))return r}ti(pi,`findVisible`);function mi(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}ti(mi,`isHidden`);function hi(e){return e.tagName===`INPUT`&&typeof e.select==`function`}ti(hi,`isSelectableInput`);function gi(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&hi(e)&&t&&e.select()}}ti(gi,`focus`);var _i=vi();function vi(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=yi(e,t),e.unshift(t)},remove(t){e=yi(e,t),e[0]?.resume()}}}ti(vi,`createFocusScopesStack`);function yi(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}ti(yi,`arrayRemove`);function bi(e){return e.filter(e=>e.tagName!==`A`)}ti(bi,`removeLinks`);var xi=Object.defineProperty,Si=v.forwardRef(((e,t)=>xi(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=v.useState(!1);xn(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?It.createPortal((0,j.jsx)(un.div,{...r,ref:t}),o):null},`Portal`)),Ci=Object.defineProperty,wi=(e,t)=>Ci(e,`name`,{value:t,configurable:!0}),Ti=0,Ei=null;function Di(e){return Oi(),e.children}wi(Di,`FocusGuards`);function Oi(){v.useEffect(()=>{Ei||={start:ki(),end:ki()};let{start:e,end:t}=Ei;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Ti++,()=>{Ti===1&&(Ei?.start.remove(),Ei?.end.remove(),Ei=null),Ti=Math.max(0,Ti-1)}},[])}wi(Oi,`useFocusGuards`);function ki(){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}wi(ki,`createFocusGuard`);var Ai=function(){return Ai=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},Ai.apply(this,arguments)};function ji(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 Mi(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 Ni=`right-scroll-bar-position`,Pi=`width-before-scroll-bar`,Fi=`with-scroll-bars-hidden`,Ii=`--removed-body-scroll-bar-size`;function Li(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ri(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 zi=typeof window<`u`?v.useLayoutEffect:v.useEffect,Bi=new WeakMap;function Vi(e,t){var n=Ri(t||null,function(t){return e.forEach(function(e){return Li(e,t)})});return zi(function(){var t=Bi.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Li(e,null)}),i.forEach(function(e){r.has(e)||Li(e,a)})}Bi.set(n,e)},[e]),n}function Hi(e){return e}function Ui(e,t){t===void 0&&(t=Hi);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 Wi(e){e===void 0&&(e={});var t=Ui(null);return t.options=Ai({async:!0,ssr:!1},e),t}var Gi=function(e){var t=e.sideCar,n=ji(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,Ai({},n))};Gi.isSideCarExport=!0;function Ki(e,t){return e.useMedium(t),Gi}var qi=Wi(),Ji=function(){},Yi=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Ji,onWheelCapture:Ji,onTouchMoveCapture:Ji}),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=ji(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Vi([n,t]),w=Ai(Ai({},x),i);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:qi,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),Ai(Ai({},w),{ref:C})):v.createElement(y,Ai({},w,{className:c,ref:C}),s))});Yi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Yi.classNames={fullWidth:Pi,zeroRight:Ni};var Xi=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Zi(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Xi();return t&&e.setAttribute(`nonce`,t),e}function Qi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $i(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ea=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zi())&&(Qi(t,n),$i(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ta=function(){var e=ea();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},na=function(){var e=ta();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ra={left:0,top:0,right:0,gap:0},ia=function(e){return parseInt(e||``,10)||0},aa=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[ia(n),ia(r),ia(i)]},oa=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ra;var t=aa(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])}},sa=na(),ca=`data-scroll-locked`,la=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
+ .${Fi} {
11
+ overflow: hidden ${r};
12
+ padding-right: ${s}px ${r};
13
+ }
14
+ body[${ca}] {
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
+ .${Ni} {
28
+ right: ${s}px ${r};
29
+ }
30
+
31
+ .${Pi} {
32
+ margin-right: ${s}px ${r};
33
+ }
34
+
35
+ .${Ni} .${Ni} {
36
+ right: 0 ${r};
37
+ }
38
+
39
+ .${Pi} .${Pi} {
40
+ margin-right: 0 ${r};
41
+ }
42
+
43
+ body[${ca}] {
44
+ ${Ii}: ${s}px;
45
+ }
46
+ `},ua=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},da=function(){v.useEffect(function(){return document.body.setAttribute(ca,(ua()+1).toString()),function(){var e=ua()-1;e<=0?document.body.removeAttribute(ca):document.body.setAttribute(ca,e.toString())}},[])},fa=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;da();var a=v.useMemo(function(){return oa(i)},[i]);return v.createElement(sa,{styles:la(a,!t,i,n?``:`!important`)})},pa=!1;if(typeof window<`u`)try{var ma=Object.defineProperty({},"passive",{get:function(){return pa=!0,!0}});window.addEventListener(`test`,ma,ma),window.removeEventListener(`test`,ma,ma)}catch{pa=!1}var ha=pa?{passive:!1}:!1,ga=function(e){return e.tagName===`TEXTAREA`},_a=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ga(e)&&n[t]===`visible`)},va=function(e){return _a(e,`overflowY`)},ya=function(e){return _a(e,`overflowX`)},ba=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Ca(e,r)){var i=wa(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},xa=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Sa=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ca=function(e,t){return e===`v`?va(t):ya(t)},wa=function(e,t){return e===`v`?xa(t):Sa(t)},Ta=function(e,t){return e===`h`&&t===`rtl`?-1:1},Ea=function(e,t,n,r,i){var a=Ta(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=wa(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Ca(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},Da=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Oa=function(e){return[e.deltaX,e.deltaY]},ka=function(e){return e&&`current`in e?e.current:e},Aa=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ja=function(e){return`
47
+ .block-interactivity-${e} {pointer-events: none;}
48
+ .allow-interactivity-${e} {pointer-events: all;}
49
+ `},Ma=0,Na=[];function Pa(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(Ma++)[0],a=v.useState(na)[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=Mi([e.lockRef.current],(e.shards||[]).map(ka),!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=Da(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=ba(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ba(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 Ea(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(Na.length&&Na[Na.length-1]===a){var r=`deltaY`in n?Oa(n):Da(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Aa(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(ka).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:Fa(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=Da(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,Oa(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,Da(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return Na.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,ha),document.addEventListener(`touchmove`,c,ha),document.addEventListener(`touchstart`,u,ha),function(){Na=Na.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,ha),document.removeEventListener(`touchmove`,c,ha),document.removeEventListener(`touchstart`,u,ha)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:ja(i)}):null,p?v.createElement(fa,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Fa(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ia=Ki(qi,Pa),La=v.forwardRef(function(e,t){return v.createElement(Yi,Ai({},e,{ref:t,sideCar:Ia}))});La.classNames=Yi.classNames;var Ra=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},za=new WeakMap,Ba=new WeakMap,Va={},Ha=0,Ua=function(e){return e&&(e.host||Ua(e.parentNode))},Wa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ua(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})},Ga=function(e,t,n,r){var i=Wa(t,Array.isArray(e)?e:[e]);Va[n]||(Va[n]=new WeakMap);var a=Va[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=(za.get(e)||0)+1,l=(a.get(e)||0)+1;za.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ba.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(),Ha++,function(){o.forEach(function(e){var t=za.get(e)-1,i=a.get(e)-1;za.set(e,t),a.set(e,i),t||(Ba.has(e)||e.removeAttribute(r),Ba.delete(e)),i||e.removeAttribute(n)}),Ha--,Ha||(za=new WeakMap,za=new WeakMap,Ba=new WeakMap,Va={})}},Ka=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ra(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ga(r,i,n,`aria-hidden`)):function(){return null}},qa=Object.defineProperty,Ja=(e,t)=>qa(e,`name`,{value:t,configurable:!0}),Ya=`Dialog`,[Xa,Za]=yn(Ya),[Qa,$a]=Xa(Ya),eo=Ja(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}=ci(),[d,f]=Qn({prop:r,defaultProp:i??!1,onChange:a,caller:Ya}),[p,m]=v.useState(0),[h,g]=v.useState(0);return(0,j.jsx)(Qa,{scope:t,triggerRef:s,contentRef:c,contentId:gr(),titleId:gr(),descriptionId:gr(),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`),to=`DialogTrigger`,no=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(to,n),a=Vt(t,i.triggerRef);return(0,j.jsx)(un.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":So(i.open),...r,ref:a,onClick:zn(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),ro=`DialogPortal`,[io,ao]=Xa(ro,{forceMount:void 0}),oo=Ja(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$a(ro,t);return(0,j.jsx)(io,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,j.jsx)(or,{present:n||a.open,children:(0,j.jsx)(Si,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),so=`DialogOverlay`,co=v.forwardRef(Ja(function(e,t){let n=ao(so,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$a(so,e.__scopeDialog);return a.modal?(0,j.jsx)(or,{present:r||a.open,children:(0,j.jsx)(uo,{...i,ref:t})}):null},`DialogOverlay`)),lo=Wt(`DialogOverlay.RemoveScroll`),uo=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(so,n),a=Vt(t,Jr());return(0,j.jsx)(La,{as:lo,allowPinchZoom:!0,shards:v.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,j.jsx)(un.div,{"data-state":So(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),fo=`DialogContent`,po=v.forwardRef(Ja(function(e,t){let n=ao(fo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$a(fo,e.__scopeDialog);return(0,j.jsx)(or,{present:r||a.open,children:a.modal?(0,j.jsx)(mo,{...i,ref:t}):(0,j.jsx)(ho,{...i,ref:t})})},`DialogContent`)),mo=v.forwardRef(Ja(function(e,t){let n=$a(fo,e.__scopeDialog),r=v.useRef(null),i=Vt(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return Ka(e)},[]),(0,j.jsx)(go,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:zn(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:zn(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:zn(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),ho=v.forwardRef(Ja(function(e,t){let n=$a(fo,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,j.jsx)(go,{...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`)),go=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=$a(fo,n);return Oi(),(0,j.jsx)(si,{registry:l.branchRegistry,children:(0,j.jsx)(ai,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,j.jsx)(qr,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?xo(o,l.descriptionId):o,"data-state":So(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),_o=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(`DialogTitle`,n),{setTitleCount:a}=i;return xn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,j.jsx)(un.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),vo=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(`DialogDescription`,n),{setDescriptionCount:a}=i;return xn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,j.jsx)(un.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),yo=`DialogClose`,bo=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(yo,n);return(0,j.jsx)(un.button,{type:`button`,...r,ref:t,onClick:zn(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function xo(...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}Ja(xo,`concatAriaDescribedby`);function So(e){return e?`open`:`closed`}Ja(So,`getState`);var Co=Object.defineProperty,wo=(e,t)=>Co(e,`name`,{value:t,configurable:!0}),[To,Eo]=yn(`AlertDialog`,[Za]),Do=Za(),Oo=wo(e=>{let{__scopeAlertDialog:t,...n}=e,r=Do(t);return(0,j.jsx)(eo,{...r,...n,modal:!0})},`AlertDialog`),ko=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(no,{...i,...r,ref:t})},`AlertDialogTrigger`)),Ao=wo(e=>{let{__scopeAlertDialog:t,...n}=e,r=Do(t);return(0,j.jsx)(oo,{...r,...n})},`AlertDialogPortal`),jo=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(co,{...i,...r,ref:t})},`AlertDialogOverlay`)),[Mo,No]=To(`AlertDialogContent`),Po=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=Do(n),o=Vt(t,v.useRef(null)),s=v.useRef(null);return(0,j.jsx)(Mo,{scope:n,cancelRef:s,children:(0,j.jsx)(po,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:zn(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),Fo=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(_o,{...i,...r,ref:t})},`AlertDialogTitle`)),Io=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(vo,{...i,...r,ref:t})},`AlertDialogDescription`)),Lo=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(bo,{...i,...r,ref:t})},`AlertDialogAction`)),Ro=`AlertDialogCancel`,zo=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=No(Ro,n),a=Do(n),o=Vt(t,i);return(0,j.jsx)(bo,{...a,...r,ref:o})},`AlertDialogCancel`)),Bo=Object.defineProperty,Vo=(e,t)=>Bo(e,`name`,{value:t,configurable:!0});function Ho(e){let[t,n]=v.useState(void 0);return xn(()=>{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}Vo(Ho,`useSize`);var Uo=Object.defineProperty,Wo=(e,t)=>Uo(e,`name`,{value:t,configurable:!0}),Go=`Checkbox`,[Ko,qo]=yn(Go),[Jo,Yo]=Ko(Go);function Xo(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=Qn({prop:n,defaultProp:i??!1,onChange:c,caller:Go}),[m,h]=v.useState(null),[g,_]=v.useState(null),[y,b]=v.useState(null),x=!m||!!o||!!m.closest(`form`),S={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,userClick:y,onUserClick:b,required:l,defaultChecked:!as(i)&&i,isFormControl:x,bubbleInput:g,setBubbleInput:_};return(0,j.jsx)(Jo,{scope:t,...S,children:is(d)?d(S):r})}Wo(Xo,`CheckboxProvider`);var Zo=`CheckboxTrigger`,Qo=v.forwardRef(Wo(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:m}=Yo(Zo,e),h=Vt(i,u),g=v.useRef(c);return v.useEffect(()=>{let e=a?.form;if(e){let t=Wo(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,j.jsx)(un.button,{type:`button`,role:`checkbox`,"aria-checked":as(c)?`mixed`:c,"aria-required":l,"data-state":os(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:zn(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:zn(n,e=>{let t=e.isPropagationStopped();f({requestedChecked:as(c)?!0:!c,hasConsumerStoppedPropagation:t}),d(e=>as(e)?!0:!e),m&&p&&(t||e.stopPropagation())})})},`CheckboxTrigger`)),$o=v.forwardRef(Wo(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,j.jsx)(Xo,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Qo,{...d,ref:t,__scopeCheckbox:n}),e&&(0,j.jsx)(rs,{__scopeCheckbox:n})]})})},`Checkbox`)),es=`CheckboxIndicator`,ts=v.forwardRef(Wo(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Yo(es,n);return(0,j.jsx)(or,{present:r||as(a.checked)||a.checked===!0,children:(0,j.jsx)(un.span,{"data-state":os(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),ns=`CheckboxBubbleInput`,rs=v.forwardRef(Wo(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=Yo(ns,e),h=Vt(r,m),g=Ho(i),_=v.useRef(!1),y=v.useRef(o),b=v.useRef(a),x=v.useRef(null);v.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=y.current!==o;y.current=o;let i=a!==null&&a!==b.current;if(b.current=a,i)x.current=r?null:a,r&&(e.indeterminate=as(o),n.call(e,!as(o)&&o)),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=x.current;x.current=null;let r=t?.requestedChecked===o;_.current=!0,e.indeterminate=as(o),n.call(e,!as(o)&&o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),_.current=!1}},[p,o,a]);let S=v.useRef(!as(o)&&o);return(0,j.jsx)(un.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??S.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:h,onClick:zn(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function is(e){return typeof e==`function`}Wo(is,`isFunction`);function as(e){return e===`indeterminate`}Wo(as,`isIndeterminate`);function os(e){return as(e)?`indeterminate`:e?`checked`:`unchecked`}Wo(os,`getState`);var ss=[`top`,`right`,`bottom`,`left`],cs=Math.min,ls=Math.max,us=Math.round,ds=Math.floor,fs=e=>({x:e,y:e}),ps={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ms(e,t,n){return ls(e,cs(t,n))}function hs(e,t){return typeof e==`function`?e(t):e}function gs(e){return e.split(`-`)[0]}function _s(e){return e.split(`-`)[1]}function vs(e){return e===`x`?`y`:`x`}function ys(e){return e===`y`?`height`:`width`}function bs(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function xs(e){return vs(bs(e))}function Ss(e,t,n){n===void 0&&(n=!1);let r=_s(e),i=xs(e),a=ys(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=js(o)),[o,js(o)]}function Cs(e){let t=js(e);return[ws(e),t,ws(t)]}function ws(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ts=[`left`,`right`],Es=[`right`,`left`],Ds=[`top`,`bottom`],Os=[`bottom`,`top`];function ks(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Es:Ts:t?Ts:Es;case`left`:case`right`:return t?Ds:Os;default:return[]}}function As(e,t,n,r){let i=_s(e),a=ks(gs(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ws)))),a}function js(e){let t=gs(e);return ps[t]+e.slice(t.length)}function Ms(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ns(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ms(e)}function Ps(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 Fs(e,t,n){let{reference:r,floating:i}=e,a=bs(t),o=xs(t),s=ys(o),c=gs(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=_s(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Is(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}=hs(t,e),p=Ns(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ps(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=Ps(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 Ls=50,Rs=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Is},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Fs(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<Ls&&(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}=Fs(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},zs=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}=hs(e,t)||{};if(l==null)return{};let d=Ns(u),f={x:n,y:r},p=xs(i),m=ys(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=cs(d[_],T),D=cs(d[v],T),O=C-h[m]-D,ee=C/2-h[m]/2+w,te=ms(E,ee,O),ne=!c.arrow&&_s(i)!=null&&ee!==te&&a.reference[m]/2-(ee<E?E:D)-h[m]/2<0,re=ne?ee<E?ee-E:ee-O:0;return{[p]:f[p]+re,data:{[p]:te,centerOffset:ee-te-re,...ne&&{alignmentOffset:re}},reset:ne}}}),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}=hs(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=gs(r),_=bs(o),v=gs(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[js(o)]:Cs(o)),x=p!==`none`;!d&&x&&b.push(...As(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=Ss(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`||_===bs(t)||T.every(e=>bs(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=bs(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 Vs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hs(e){return ss.some(t=>e[t]>=0)}var Us=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=hs(e,t);switch(i){case`referenceHidden`:{let e=Vs(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Hs(e)}}}case`escaped`:{let e=Vs(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Hs(e)}}}default:return{}}}}},Ws=new Set([`left`,`top`]);async function Gs(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=gs(n),s=_s(n),c=bs(n)===`y`,l=Ws.has(o)?-1:1,u=a&&c?-1:1,d=hs(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 Ks=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 Gs(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}}}}},qs=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}=hs(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=bs(i),p=vs(f),m=u[p],h=u[f],g=(e,t)=>ms(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}}}}}},Js=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}=hs(e,t),u={x:n,y:r},d=bs(i),f=vs(d),p=u[f],m=u[d],h=hs(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(gs(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}}}},Ys=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}=hs(e,t),c=await i.detectOverflow(t,s),l=gs(n),u=_s(n),d=bs(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=cs(p-c[m],g),y=cs(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*ls(c.left,c.right):S=p-2*ls(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 Xs(){return typeof window<`u`}function Zs(e){return ec(e)?(e.nodeName||``).toLowerCase():`#document`}function Qs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $s(e){return((ec(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ec(e){return Xs()?e instanceof Node||e instanceof Qs(e).Node:!1}function tc(e){return Xs()?e instanceof Element||e instanceof Qs(e).Element:!1}function nc(e){return Xs()?e instanceof HTMLElement||e instanceof Qs(e).HTMLElement:!1}function rc(e){return!Xs()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Qs(e).ShadowRoot}function ic(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=hc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ac(e){return/^(table|td|th)$/.test(Zs(e))}function oc(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var sc=/transform|translate|scale|rotate|perspective|filter/,cc=/paint|layout|strict|content/,lc=e=>!!e&&e!==`none`,uc;function dc(e){let t=tc(e)?hc(e):e;return lc(t.transform)||lc(t.translate)||lc(t.scale)||lc(t.rotate)||lc(t.perspective)||!pc()&&(lc(t.backdropFilter)||lc(t.filter))||sc.test(t.willChange||``)||cc.test(t.contain||``)}function fc(e){let t=_c(e);for(;nc(t)&&!mc(t);){if(dc(t))return t;if(oc(t))return null;t=_c(t)}return null}function pc(){return uc??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),uc}function mc(e){return/^(html|body|#document)$/.test(Zs(e))}function hc(e){return Qs(e).getComputedStyle(e)}function gc(e){return tc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _c(e){if(Zs(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||rc(e)&&e.host||$s(e);return rc(t)?t.host:t}function vc(e){let t=_c(e);return mc(t)?(e.ownerDocument||e).body:nc(t)&&ic(t)?t:vc(t)}function yc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=vc(e),i=r===e.ownerDocument?.body,a=Qs(r);if(i){let e=bc(a);return t.concat(a,a.visualViewport||[],ic(r)?r:[],e&&n?yc(e):[])}return t.concat(r,yc(r,[],n))}function bc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xc(e){let t=hc(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=nc(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=us(n)!==a||us(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Sc(e){return tc(e)?e:e.contextElement}function Cc(e){let t=Sc(e);if(!nc(t))return fs(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=xc(t),o=(a?us(n.width):n.width)/r,s=(a?us(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var wc=fs(0);function Tc(e){let t=Qs(e);return!pc()||!t.visualViewport?wc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ec(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Qs(e)}function Dc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Sc(e),o=fs(1);t&&(r?tc(r)&&(o=Cc(r)):o=Cc(e));let s=Ec(a,n,r)?Tc(a):fs(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=Qs(a),t=tc(r)?Qs(r):r,n=e,i=bc(n);for(;i&&t!==n;){let e=Cc(i),t=i.getBoundingClientRect(),r=hc(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=Qs(i),i=bc(n)}}return Ps({width:u,height:d,x:c,y:l})}function Oc(e,t){let n=gc(e).scrollLeft;return t?t.left+n:Dc($s(e)).left+n}function kc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Oc(e,n),y:n.top+t.scrollTop}}function Ac(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=$s(r),s=t?oc(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=fs(1),u=fs(0),d=nc(r);if((d||!a)&&((Zs(r)!==`body`||ic(o))&&(c=gc(r)),d)){let e=Dc(r);l=Cc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?kc(o,c):fs(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 jc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Mc(e){let t=gc(e),n=e.ownerDocument.body,r=ls(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ls(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Oc(e),o=-t.scrollTop;return hc(n).direction===`rtl`&&(a+=ls(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Nc=25;function Pc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Qs(e),a=$s(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!pc()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Oc(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<=Nc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Fc(e,t){let n=Dc(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Cc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ic(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Pc(e,n,t);else if(t===`document`)r=Mc($s(e));else if(tc(t))r=Fc(t,n);else{let n=Tc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ps(r)}function Lc(e,t){let n=t.get(e);if(n)return n;let r=yc(e,[],!1).filter(e=>tc(e)&&Zs(e)!==`body`),i=null,a=hc(e).position===`fixed`,o=a?_c(e):e;for(;tc(o)&&!mc(o);){let e=hc(o),t=dc(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=_c(o)}return t.set(e,r),r}function Rc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?oc(t)?[]:Lc(t,this._c):[].concat(n),r],o=Ic(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=Ic(t,a[e],i);s=ls(n.top,s),c=cs(n.right,c),l=cs(n.bottom,l),u=ls(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function zc(e){let{width:t,height:n}=xc(e);return{width:t,height:n}}function Bc(e,t,n){let r=nc(t),i=$s(t),a=n===`fixed`,o=Dc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=fs(0);if((r||!a)&&((Zs(t)!==`body`||ic(i))&&(s=gc(t)),r)){let e=Dc(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Oc(i));let l=i&&!r&&!a?kc(i,s):fs(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 Vc(e){return hc(e).position===`static`}function Hc(e,t){if(!nc(e)||hc(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return $s(e)===n&&(n=n.ownerDocument.body),n}function Uc(e,t){let n=Qs(e);if(oc(e))return n;if(!nc(e)){let t=_c(e);for(;t&&!mc(t);){if(tc(t)&&!Vc(t))return t;t=_c(t)}return n}let r=Hc(e,t);for(;r&&ac(r)&&Vc(r);)r=Hc(r,t);return r&&mc(r)&&Vc(r)&&!dc(r)?n:r||fc(e)||n}var Wc=async function(e){let t=this.getOffsetParent||Uc,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 Gc(e){return hc(e).direction===`rtl`}var Kc={convertOffsetParentRelativeRectToViewportRelativeRect:Ac,getDocumentElement:$s,getClippingRect:Rc,getOffsetParent:Uc,getElementRects:Wc,getClientRects:jc,getDimensions:zc,getScale:Cc,isElement:tc,isRTL:Gc};function qc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jc(e,t,n){let r=null,i,a=$s(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=ds(d),h=ds(a.clientWidth-(u+f)),g=ds(a.clientHeight-(d+p)),_=ds(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ls(0,cs(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!qc(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=Qs(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Yc(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=Sc(e),u=i||a?[...l?yc(l):[],...t?yc(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Jc(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?Dc(e):null;c&&g();function g(){let t=Dc(e);h&&!qc(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 Xc=Ks,Zc=qs,Qc=Bs,$c=Ys,el=Us,tl=zs,nl=Js,rl=(e,t,n)=>{let r=new Map,i=n??{},a={...Kc,...i.platform,_c:r};return Rs(e,t,{...i,platform:a})},il=typeof document<`u`?v.useLayoutEffect:function(){};function al(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(!al(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)&&!al(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ol(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sl(e,t){let n=ol(e);return Math.round(t*n)/n}function cl(e){let t=v.useRef(e);return il(()=>{t.current=e}),t}function ll(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);al(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=cl(c),O=cl(i),ee=cl(l),te=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),rl(C.current,w.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};ne.current&&!al(T.current,t)&&(T.current=t,It.flushSync(()=>{d(t)}))})},[f,t,n,O,ee]);il(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ne=v.useRef(!1);il(()=>(ne.current=!0,()=>{ne.current=!1}),[]),il(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,te);te()}},[x,S,te,D,E]);let re=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),ie=v.useMemo(()=>({reference:x,floating:S}),[x,S]),ae=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!ie.floating)return e;let t=sl(ie.floating,u.x),r=sl(ie.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ol(ie.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ie.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:te,refs:re,elements:ie,floatingStyles:ae}),[u,te,re,ie,ae])}var ul=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?{}:tl({element:r.current,padding:i}).fn(n):r?tl({element:r,padding:i}).fn(n):{}}}},dl=(e,t)=>{let n=Xc(e);return{name:n.name,fn:n.fn,options:[e,t]}},fl=(e,t)=>{let n=Zc(e);return{name:n.name,fn:n.fn,options:[e,t]}},pl=(e,t)=>({fn:nl(e).fn,options:[e,t]}),ml=(e,t)=>{let n=Qc(e);return{name:n.name,fn:n.fn,options:[e,t]}},hl=(e,t)=>{let n=$c(e);return{name:n.name,fn:n.fn,options:[e,t]}},gl=(e,t)=>{let n=el(e);return{name:n.name,fn:n.fn,options:[e,t]}},_l=(e,t)=>{let n=ul(e);return{name:n.name,fn:n.fn,options:[e,t]}},vl=Object.defineProperty,yl=v.forwardRef(((e,t)=>vl(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,j.jsx)(un.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,j.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),bl=Object.defineProperty,xl=(e,t)=>bl(e,`name`,{value:t,configurable:!0}),Sl={Partial:`partial`,Always:`always`},Cl={Optimized:`optimized`,Always:`always`},wl=`Popper`,[Tl,El]=yn(wl),[Dl,Ol]=Tl(wl),kl=xl(e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[a,o]=v.useState(void 0);return(0,j.jsx)(Dl,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Al=`PopperAnchor`,jl=v.forwardRef(xl(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Ol(Al,n),o=v.useRef(null),s=a.onAnchorChange,c=Vt(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&&Vl(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,j.jsx)(un.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),Ml=`PopperContent`,[Nl,Pl]=Tl(Ml),Fl=v.forwardRef(xl(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=Sl.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=Cl.Optimized,onPlaced:m,...h}=e,g=Ol(Ml,n),[_,y]=v.useState(null),b=Vt(t,y),[x,S]=v.useState(null),C=Ho(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],ee=O.length>0,te={padding:D,boundary:O.filter(zl),altBoundary:ee},{refs:ne,floatingStyles:re,placement:ie,isPositioned:ae,middlewareData:oe}=ll({strategy:`fixed`,placement:E,whileElementsMounted:xl((...e)=>Yc(...e,{animationFrame:p===Cl.Always}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[dl({mainAxis:i+T,alignmentAxis:o}),c&&fl({mainAxis:!0,crossAxis:!1,...d===Sl.Partial?{limiter:pl()}:{},...te}),c&&ml({...te}),hl({...te,apply:xl(({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&&_l({element:x,padding:s}),Bl({arrowWidth:w,arrowHeight:T}),f&&gl(ee?{strategy:`referenceHidden`,...te}:{strategy:`referenceHidden`,padding:te.padding,altBoundary:te.altBoundary})]}),k=g.setPlacementState;xn(()=>(k(ie),()=>{k(void 0)}),[ie,k]);let[se,ce]=Vl(ie),le=zr(m);xn(()=>{ae&&le?.()},[ae,le]);let ue=oe.arrow?.x,de=oe.arrow?.y,fe=oe.arrow?.centerOffset!==0,[pe,me]=v.useState();return xn(()=>{_&&me(window.getComputedStyle(_).zIndex)},[_]),(0,j.jsx)(`div`,{ref:ne.setFloating,"data-radix-popper-content-wrapper":``,style:{...re,transform:ae?re.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:pe,"--radix-popper-transform-origin":[oe.transformOrigin?.x,oe.transformOrigin?.y].join(` `),...oe.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,j.jsx)(Nl,{scope:n,placedSide:se,placedAlign:ce,onArrowChange:S,arrowX:ue,arrowY:de,shouldHideArrow:fe,children:(0,j.jsx)(un.div,{"data-side":se,"data-align":ce,...h,ref:b,style:{...h.style,animation:ae?h.style?.animation:`none`}})})})},`PopperContent`)),Il=`PopperArrow`,Ll={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Rl=v.forwardRef(xl(function(e,t){let{__scopePopper:n,...r}=e,i=Pl(Il,n),a=Ll[i.placedSide];return(0,j.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,j.jsx)(yl,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function zl(e){return e!==null}xl(zl,`isNotNull`);var Bl=xl(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]=Vl(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 Vl(e){let[t,n=`center`]=e.split(`-`);return[t,n]}xl(Vl,`getSideAndAlignFromPlacement`);var Hl=Object.defineProperty,Ul=(e,t)=>Hl(e,`name`,{value:t,configurable:!0}),Wl=!1;function Gl(){let[e,t]=v.useState(Wl);return v.useEffect(()=>{Wl||(Wl=!0,t(!0))},[]),e}Ul(Gl,`useIsHydrated`);var Kl=v.useSyncExternalStore;function ql(){return()=>{}}Ul(ql,`subscribe`);function Jl(){return Kl(ql,()=>!0,()=>!1)}Ul(Jl,`useIsHydratedModern`);var Yl=typeof Kl==`function`?Jl:Gl,Xl=Object.defineProperty,Zl=(e,t)=>Xl(e,`name`,{value:t,configurable:!0}),Ql=`rovingFocusGroup.onEntryFocus`,$l={bubbles:!1,cancelable:!0},eu=`RovingFocusGroup`,[tu,nu,ru]=wn(eu),[iu,au]=yn(eu,[ru]),ou={Vertical:`vertical`,Horizontal:`horizontal`},su={LTR:`ltr`,RTL:`rtl`},[cu,lu]=iu(eu),uu=v.forwardRef(Zl(function(e,t){return(0,j.jsx)(tu.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,j.jsx)(tu.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,j.jsx)(du,{...e,ref:t})})})},`RovingFocusGroup`)),du=v.forwardRef(Zl(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=Vt(t,f),m=Fr(a),[h,g]=Qn({prop:o,defaultProp:s??null,onChange:c,caller:eu}),[_,y]=v.useState(!1),b=zr(l),x=nu(n),S=v.useRef(!1),[C,w]=v.useState(0);return v.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Ql,b),()=>e.removeEventListener(Ql,b)},[b]),(0,j.jsx)(cu,{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,j.jsx)(un.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:zn(e.onMouseDown,()=>{S.current=!0}),onFocus:zn(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Ql,$l);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);_u([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:zn(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),fu=`RovingFocusGroupItem`,pu=v.forwardRef(Zl(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=gr(),l=a||c,u=lu(fu,n),d=u.currentTabStopId===l,f=nu(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Yl();return xn(()=>{if(g&&r)return p(),()=>m()},[g,r,p,m]),v.useEffect(()=>{if(!g&&r)return p(),()=>m()},[g,r,p,m]),(0,j.jsx)(tu.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,j.jsx)(un.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:zn(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:zn(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:zn(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=gu(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?vu(n,r+1):n.slice(r+1)}setTimeout(()=>_u(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),mu={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function hu(e,t){return t===su.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Zl(hu,`getDirectionAwareKey`);function gu(e,t,n){let r=hu(e.key,n);if(!(t===ou.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===ou.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return mu[r]}Zl(gu,`getFocusIntent`);function _u(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Zl(_u,`focusFirst`);function vu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Zl(vu,`wrapArray`);var yu=Object.defineProperty,bu=(e,t)=>yu(e,`name`,{value:t,configurable:!0}),xu=[`Enter`,` `],Su=[`ArrowDown`,`PageUp`,`Home`],Cu=[`ArrowUp`,`PageDown`,`End`],wu=[...Su,...Cu];[...xu],[...xu];var Tu=`Menu`,[Eu,Du,Ou]=wn(Tu),[ku,Au]=yn(Tu,[Ou,El,au]),ju=El(),Mu=au(),[Nu,Pu]=ku(Tu),[Fu,Iu]=ku(Tu),Lu=bu(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=ju(t),[c,l]=v.useState(null),u=v.useRef(!1),d=zr(a),f=Fr(i);return v.useEffect(()=>{let e=bu(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=bu(()=>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=bu(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,j.jsx)(kl,{...s,children:(0,j.jsx)(Nu,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,j.jsx)(Fu,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Ru=v.forwardRef(bu(function(e,t){let{__scopeMenu:n,...r}=e,i=ju(n);return(0,j.jsx)(jl,{...i,...r,ref:t})},`MenuAnchor`)),zu=`MenuPortal`,[Bu,Vu]=ku(zu,{forceMount:void 0}),Hu=bu(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Pu(zu,t);return(0,j.jsx)(Bu,{scope:t,forceMount:n,children:(0,j.jsx)(or,{present:n||a.open,children:(0,j.jsx)(Si,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Uu=`MenuContent`,[Wu,Gu]=ku(Uu),Ku=v.forwardRef(bu(function(e,t){let n=Vu(Uu,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Pu(Uu,e.__scopeMenu),o=Iu(Uu,e.__scopeMenu);return(0,j.jsx)(Eu.Provider,{scope:e.__scopeMenu,children:(0,j.jsx)(or,{present:r||a.open,children:(0,j.jsx)(Eu.Slot,{scope:e.__scopeMenu,children:o.modal?(0,j.jsx)(qu,{...i,ref:t}):(0,j.jsx)(Ju,{...i,ref:t})})})})},`MenuContent`)),qu=v.forwardRef(bu(function(e,t){let n=Pu(Uu,e.__scopeMenu),r=v.useRef(null),i=Vt(t,r);return v.useEffect(()=>{let e=r.current;if(e)return Ka(e)},[]),(0,j.jsx)(Xu,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:zn(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Ju=v.forwardRef(bu(function(e,t){let n=Pu(Uu,e.__scopeMenu);return(0,j.jsx)(Xu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Yu=Wt(`MenuContent.ScrollLock`),Xu=v.forwardRef(bu(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=Pu(Uu,n),_=Iu(Uu,n),y=ju(n),b=Mu(n),x=Du(n),[S,C]=v.useState(null),w=v.useRef(null),[T,E]=v.useState(null);li(T);let{nodes:D,registry:O}=ci(),ee=!!(i||m),te=Vt(t,w,g.onContentChange,E),ne=v.useRef(0),re=v.useRef(``),ie=v.useRef(0),ae=v.useRef(null),oe=v.useRef(`right`),k=v.useRef(0),se=v.useMemo(()=>m?[w,...D.map(e=>({current:e}))]:[],[w,D,m]),ce=m?La:v.Fragment,le=m?{as:Yu,allowPinchZoom:!0,shards:se}:void 0,ue=bu(e=>{let t=re.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=bd(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){re.current=e,window.clearTimeout(ne.current),e!==``&&(ne.current=window.setTimeout(()=>s(``),1e3))}bu(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);v.useEffect(()=>()=>window.clearTimeout(ne.current),[]),Oi();let de=v.useCallback(e=>oe.current===ae.current?.side&&Sd(e,ae.current?.area),[]);return(0,j.jsx)(Wu,{scope:n,searchRef:re,onItemEnter:v.useCallback(e=>{de(e)&&e.preventDefault()},[de]),onItemLeave:v.useCallback(e=>{de(e)||(w.current?.focus(),C(null))},[de]),onTriggerLeave:v.useCallback(e=>{de(e)&&e.preventDefault()},[de]),pointerGraceTimerRef:ie,onPointerGraceIntentChange:v.useCallback(e=>{ae.current=e},[]),children:(0,j.jsx)(si,{registry:ee?O:null,children:(0,j.jsx)(ce,{...le,children:(0,j.jsx)(ai,{asChild:!0,trapped:i,branches:D,onMountAutoFocus:zn(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,j.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,j.jsx)(uu,{asChild:!0,...b,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:zn(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,j.jsx)(Fl,{role:`menu`,"aria-orientation":`vertical`,"data-state":hd(g.open),"data-radix-menu-content":``,dir:_.dir,...y,...h,ref:te,style:{outline:`none`,...h.style},onKeyDown:zn(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&&ue(e.key));let i=w.current;if(e.target!==i||!wu.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);Cu.includes(e.key)&&a.reverse(),vd(a)}),onBlur:zn(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(ne.current),re.current=``)}),onPointerMove:zn(e.onPointerMove,Cd(e=>{let t=e.target,n=k.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>k.current?`right`:`left`;oe.current=t,k.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),Zu=v.forwardRef(bu(function(e,t){let{__scopeMenu:n,...r}=e;return(0,j.jsx)(un.div,{role:`group`,...r,ref:t})},`MenuGroup`)),Qu=v.forwardRef(bu(function(e,t){let{__scopeMenu:n,...r}=e;return(0,j.jsx)(un.div,{...r,ref:t})},`MenuLabel`)),$u=`MenuItem`,ed=`menu.itemSelect`,td=v.forwardRef(bu(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=v.useRef(null),o=Iu($u,e.__scopeMenu),s=Gu($u,e.__scopeMenu),c=Vt(t,a),l=v.useRef(!1),u=bu(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(ed,{bubbles:!0,cancelable:!0});e.addEventListener(ed,e=>r?.(e),{once:!0}),dn(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,j.jsx)(nd,{...i,ref:c,disabled:n,onClick:zn(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:zn(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:zn(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&xu.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),nd=v.forwardRef(bu(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Gu($u,n),s=Mu(n),c=v.useRef(null),l=Vt(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,j.jsx)(Eu.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,j.jsx)(pu,{asChild:!0,...s,focusable:!r,children:(0,j.jsx)(un.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:zn(e.onPointerMove,Cd(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:zn(e.onPointerLeave,Cd(e=>o.onItemLeave(e))),onFocus:zn(e.onFocus,()=>d(!0)),onBlur:zn(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[rd,id]=ku(`MenuRadioGroup`,{value:void 0,onValueChange:bu(()=>{},`onValueChange`)}),ad=v.forwardRef(bu(function(e,t){let{value:n,onValueChange:r,...i}=e,a=zr(r);return(0,j.jsx)(rd,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,j.jsx)(Zu,{...i,ref:t})})},`MenuRadioGroup`)),od=`MenuRadioItem`,sd=v.forwardRef(bu(function(e,t){let{value:n,...r}=e,i=id(od,e.__scopeMenu),a=n===i.value;return(0,j.jsx)(ld,{scope:e.__scopeMenu,checked:a,children:(0,j.jsx)(td,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":_d(a),onSelect:zn(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),cd=`MenuItemIndicator`,[ld,ud]=ku(cd,{checked:!1}),dd=v.forwardRef(bu(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=ud(cd,n);return(0,j.jsx)(or,{present:r||gd(a.checked)||a.checked===!0,children:(0,j.jsx)(un.span,{...i,ref:t,"data-state":_d(a.checked)})})},`MenuItemIndicator`)),fd=v.forwardRef(bu(function(e,t){let{__scopeMenu:n,...r}=e;return(0,j.jsx)(un.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[pd,md]=ku(`MenuSub`);function hd(e){return e?`open`:`closed`}bu(hd,`getOpenState`);function gd(e){return e===`indeterminate`}bu(gd,`isIndeterminate`);function _d(e){return gd(e)?`indeterminate`:e?`checked`:`unchecked`}bu(_d,`getCheckedState`);function vd(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}bu(vd,`focusFirst`);function yd(e,t){return e.map((n,r)=>e[(t+r)%e.length])}bu(yd,`wrapArray`);function bd(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=yd(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}bu(bd,`getNextMatch`);function xd(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}bu(xd,`isPointInPolygon`);function Sd(e,t){return t?xd({x:e.clientX,y:e.clientY},t):!1}bu(Sd,`isPointerInGraceArea`);function Cd(e){return t=>t.pointerType===`mouse`?e(t):void 0}bu(Cd,`whenMouse`);var wd=Object.defineProperty,Td=(e,t)=>wd(e,`name`,{value:t,configurable:!0}),Ed=`DropdownMenu`,[Dd,Od]=yn(Ed,[Au]),kd=Au(),[Ad,jd]=Dd(Ed),Md=Td(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=kd(t),l=v.useRef(null),[u,d]=Qn({prop:i,defaultProp:a??!1,onChange:o,caller:Ed});return(0,j.jsx)(Ad,{scope:t,triggerId:gr(),triggerRef:l,contentId:gr(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,j.jsx)(Lu,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),Nd=`DropdownMenuTrigger`,Pd=v.forwardRef(Td(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=jd(Nd,n),o=kd(n),s=Vt(t,a.triggerRef);return(0,j.jsx)(Ru,{asChild:!0,...o,children:(0,j.jsx)(un.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:zn(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:zn(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Fd=Td(e=>{let{__scopeDropdownMenu:t,...n}=e,r=kd(t);return(0,j.jsx)(Hu,{...r,...n})},`DropdownMenuPortal`),Id=`DropdownMenuContent`,Ld=v.forwardRef(Td(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=jd(Id,n),a=kd(n),o=v.useRef(!1);return(0,j.jsx)(Ku,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:zn(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:zn(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`)),Rd=v.forwardRef(Td(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=kd(n);return(0,j.jsx)(Qu,{...i,...r,ref:t})},`DropdownMenuLabel`)),zd=v.forwardRef(Td(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=kd(n);return(0,j.jsx)(td,{...i,...r,ref:t})},`DropdownMenuItem`)),Bd=v.forwardRef(Td(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=kd(n);return(0,j.jsx)(ad,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),Vd=v.forwardRef(Td(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=kd(n);return(0,j.jsx)(sd,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),Hd=v.forwardRef(Td(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=kd(n);return(0,j.jsx)(dd,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),Ud=v.forwardRef(Td(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=kd(n);return(0,j.jsx)(fd,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Wd=Object.defineProperty,Gd=v.forwardRef(((e,t)=>Wd(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,j.jsx)(un.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),Kd=Object.defineProperty,qd=(e,t)=>Kd(e,`name`,{value:t,configurable:!0});function Jd(e,[t,n]){return Math.min(n,Math.max(t,e))}qd(Jd,`clamp`);var Yd=Object.defineProperty,Xd=(e,t)=>Yd(e,`name`,{value:t,configurable:!0}),Zd=`Popover`,[Qd,$d]=yn(Zd,[El]),ef=El(),[tf,nf]=Qd(Zd),rf=Xd(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=ef(t),c=v.useRef(null),[l,u]=v.useState(!1),[d,f]=v.useState(0),[p,m]=v.useState(0),[h,g]=Qn({prop:r,defaultProp:i??!1,onChange:a,caller:Zd});return(0,j.jsx)(kl,{...s,children:(0,j.jsx)(tf,{scope:t,contentId:gr(),titleId:gr(),descriptionId:gr(),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`),af=`PopoverTrigger`,of=v.forwardRef(Xd(function(e,t){let{__scopePopover:n,...r}=e,i=nf(af,n),a=ef(n),o=Vt(t,i.triggerRef),s=(0,j.jsx)(un.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":_f(i.open),...r,ref:o,onClick:zn(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,j.jsx)(jl,{asChild:!0,...a,children:s})},`PopoverTrigger`)),sf=`PopoverPortal`,[cf,lf]=Qd(sf,{forceMount:void 0}),uf=Xd(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=nf(sf,t);return(0,j.jsx)(cf,{scope:t,forceMount:n,children:(0,j.jsx)(or,{present:n||a.open,children:(0,j.jsx)(Si,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),df=`PopoverContent`,ff=v.forwardRef(Xd(function(e,t){let n=lf(df,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=nf(df,e.__scopePopover);return(0,j.jsx)(or,{present:r||a.open,children:a.modal?(0,j.jsx)(mf,{...i,ref:t}):(0,j.jsx)(hf,{...i,ref:t})})},`PopoverContent`)),pf=Wt(`PopoverContent.RemoveScroll`),mf=v.forwardRef(Xd(function(e,t){let n=nf(df,e.__scopePopover),r=v.useRef(null),i=Vt(t,r),a=v.useRef(!1),{nodes:o,registry:s}=ci();return v.useEffect(()=>{let e=r.current;if(e)return Ka(e)},[]),(0,j.jsx)(La,{as:pf,allowPinchZoom:!0,shards:v.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,j.jsx)(gf,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zn(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:zn(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:zn(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),hf=v.forwardRef(Xd(function(e,t){let n=nf(df,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return(0,j.jsx)(gf,{...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`)),gf=v.forwardRef(Xd(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=nf(df,n),g=ef(n),[_,y]=v.useState(null),b=Vt(t,y);return li(_),Oi(),(0,j.jsx)(si,{registry:p,children:(0,j.jsx)(ai,{asChild:!0,loop:!0,trapped:r,branches:f,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,j.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,j.jsx)(Fl,{"data-state":_f(h.open),role:`dialog`,id:h.contentId,"aria-labelledby":h.titlePresent?h.titleId:void 0,"aria-describedby":h.descriptionPresent?vf(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 _f(e){return e?`open`:`closed`}Xd(_f,`getState`);function vf(...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}Xd(vf,`concatAriaDescribedby`);var yf=Object.defineProperty,bf=(e,t)=>yf(e,`name`,{value:t,configurable:!0}),xf=`Progress`,Sf=100,[Cf,wf]=yn(xf),[Tf,Ef]=Cf(xf),Df=v.forwardRef(bf(function(e,t){let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=Af,...o}=e;(i||i===0)&&!Nf(i)&&console.error(Ff(`${i}`,`Progress`));let s=Nf(i)?i:Sf;r!==null&&!Pf(r,s)&&console.error(If(`${r}`,`Progress`));let c=Pf(r,s)?r:null,l=Mf(c)?a(c,s):void 0;return(0,j.jsx)(Tf,{scope:n,value:c,max:s,children:(0,j.jsx)(un.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Mf(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":jf(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})},`Progress`)),Of=`ProgressIndicator`,kf=v.forwardRef(bf(function(e,t){let{__scopeProgress:n,...r}=e,i=Ef(Of,n);return(0,j.jsx)(un.div,{"data-state":jf(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})},`ProgressIndicator`));function Af(e,t){return`${Math.round(e/t*100)}%`}bf(Af,`defaultGetValueLabel`);function jf(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}bf(jf,`getProgressState`);function Mf(e){return typeof e==`number`}bf(Mf,`isNumber`);function Nf(e){return Mf(e)&&!isNaN(e)&&e>0}bf(Nf,`isValidMaxNumber`);function Pf(e,t){return Mf(e)&&!isNaN(e)&&e<=t&&e>=0}bf(Pf,`isValidValueNumber`);function Ff(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Sf}\`.`}bf(Ff,`getInvalidMaxError`);function If(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 ${Sf} if no \`max\` prop is set)
52
+ - \`null\` or \`undefined\` if the progress is indeterminate.
53
+
54
+ Defaulting to \`null\`.`}bf(If,`getInvalidValueError`);var Lf=Object.defineProperty,Rf=(e,t)=>Lf(e,`name`,{value:t,configurable:!0}),zf=`Radio`,[Bf,Vf]=yn(zf),[Hf,Uf]=Bf(zf);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:Rf(()=>s?.(),`onCheck`)};return(0,j.jsx)(Hf,{scope:t,..._,children:Zf(u)?u(_):r})}Rf(Wf,`RadioProvider`);var Gf=`RadioTrigger`,Kf=v.forwardRef(Rf(function({__scopeRadio:e,onClick:t,...n},r){let{checked:i,disabled:a,value:o,setControl:s,onCheck:c,onUserClick:l,isFormControl:u,bubbleInput:d}=Uf(Gf,e),f=Vt(r,s);return(0,j.jsx)(un.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":Qf(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:f,onClick:zn(t,e=>{let t=e.isPropagationStopped();i||(l({hasConsumerStoppedPropagation:t}),c()),d&&u&&(t||e.stopPropagation())})})},`RadioTrigger`)),qf=`RadioIndicator`,Jf=v.forwardRef(Rf(function(e,t){let{__scopeRadio:n,forceMount:r,...i}=e,a=Uf(qf,n);return(0,j.jsx)(or,{present:r||a.checked,children:(0,j.jsx)(un.span,{"data-state":Qf(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})},`RadioIndicator`)),Yf=`RadioBubbleInput`,Xf=v.forwardRef(Rf(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}=Uf(Yf,e),m=Vt(r,f),h=Ho(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,j.jsx)(un.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:zn(t,e=>{g.current&&e.stopPropagation()}),style:{...n.style,...h,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`RadioBubbleInput`));function Zf(e){return typeof e==`function`}Rf(Zf,`isFunction`);function Qf(e){return e?`checked`:`unchecked`}Rf(Qf,`getState`);var $f=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],ep=`RadioGroup`,[tp,np]=yn(ep,[au,Vf]),rp=au(),ip=Vf(),[ap,op]=tp(ep),sp=v.forwardRef(Rf(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=rp(n),h=Fr(u),[g,_]=Qn({prop:o,defaultProp:a??null,onChange:f,caller:ep}),[y,b]=v.useState(null),x=Vt(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=Rf(()=>_(S.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[y,i,_]),(0,j.jsx)(ap,{scope:n,name:r,form:i,required:s,disabled:c,value:g,onValueChange:_,children:(0,j.jsx)(uu,{asChild:!0,...m,orientation:l,dir:h,loop:d,children:(0,j.jsx)(un.div,{role:`radiogroup`,"aria-required":s,"aria-orientation":l,"data-disabled":c?``:void 0,dir:h,...p,ref:x})})})},`RadioGroup`)),cp=`RadioGroupItemProvider`,lp=`RadioGroupItemTrigger`;function up(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=op(cp,t),s=ip(t),c=o.disabled||r;return(0,j.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})}Rf(up,`RadioGroupItemProvider`);var dp=v.forwardRef(Rf(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=rp(n),a=ip(n),{checked:o,disabled:s}=Uf(lp,a.__scopeRadio),c=v.useRef(null),l=Vt(t,c),u=v.useRef(!1);return v.useEffect(()=>{let e=Rf(e=>{$f.includes(e.key)&&(u.current=!0)},`handleKeyDown`),t=Rf(()=>u.current=!1,`handleKeyUp`);return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,j.jsx)(pu,{asChild:!0,...i,focusable:!s,active:o,children:(0,j.jsx)(Kf,{...a,...r,ref:l,onKeyDown:zn(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:zn(r.onFocus,()=>{u.current&&c.current?.click()})})})},`RadioGroupItemTrigger`)),fp=v.forwardRef(Rf(function(e,t){let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,j.jsx)(up,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(dp,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,j.jsx)(pp,{__scopeRadioGroup:n})]})})},`RadioGroupItem`)),pp=v.forwardRef(Rf(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=ip(n);return(0,j.jsx)(Xf,{...i,...r,ref:t})},`RadioGroupItemBubbleInput`)),mp=v.forwardRef(Rf(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=ip(n);return(0,j.jsx)(Jf,{...i,...r,ref:t})},`RadioGroupIndicator`)),hp=Object.defineProperty,gp=(e,t)=>hp(e,`name`,{value:t,configurable:!0}),_p={ItemAligned:`item-aligned`,Popper:`popper`},vp={LTR:`ltr`,RTL:`rtl`},yp=[` `,`Enter`,`ArrowUp`,`ArrowDown`],bp=[` `,`Enter`],xp=`Select`,[Sp,Cp,wp]=wn(xp),[Tp,eee]=yn(xp,[wp,El]),Ep=El(),[Dp,Op]=Tp(xp),[kp,Ap]=Tp(xp);function jp(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=Ep(t),[_,y]=v.useState(null),[b,x]=v.useState(null),[S,C]=v.useState(!1),w=Fr(l),[T,E]=Qn({prop:r,defaultProp:i??!1,onChange:a,caller:xp}),[D,O]=Qn({prop:o,defaultProp:s,onChange:c,caller:xp}),ee=v.useRef(null),te=v.useRef(!1),[ne,re]=v.useState(null),ie=gp(e=>{re({value:e,hasConsumerStoppedPropagation:te.current}),O(e)},`handleUserSelect`),ae=v.useRef(D);v.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=gp(()=>O(ae.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let oe=!_||!!m||!!_.closest(`form`),[k,se]=v.useState(new Set),ce=gr(),le=Array.from(k).map(e=>e.props.value).join(`;`),ue=v.useCallback(e=>{se(t=>new Set(t).add(e))},[]),de=v.useCallback(e=>{se(t=>{let n=new Set(t);return n.delete(e),n})},[]),fe={required:p,trigger:_,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:ce,value:D,onValueChange:O,hasConsumerStoppedPropagationRef:te,userSelection:ne,onUserSelect:ie,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:ee,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:k,nativeSelectKey:le,isFormControl:oe};return(0,j.jsx)(kl,{...g,children:(0,j.jsx)(Dp,{scope:t,...fe,children:(0,j.jsx)(Sp.Provider,{scope:t,children:(0,j.jsx)(kp,{scope:t,onNativeOptionAdd:ue,onNativeOptionRemove:de,children:vm(h)?h(fe):n})})})})}gp(jp,`SelectProvider`);var Mp=gp(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,j.jsx)(jp,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,j.jsxs)(j.Fragment,{children:[n,e?(0,j.jsx)(_m,{__scopeSelect:t}):null]})})},`Select`),Np=`SelectTrigger`,Pp=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Ep(n),o=Op(Np,n),s=o.disabled||r,c=Vt(t,o.onTriggerChange),l=Cp(n),u=v.useRef(`touch`),[d,f,p]=bm(e=>{let t=l().filter(e=>!e.disabled),n=xm(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),m=gp(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,j.jsx)(jl,{asChild:!0,...a,children:(0,j.jsx)(un.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":ym(o.value)?``:void 0,...i,ref:c,onClick:zn(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:zn(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:zn(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===` `)&&yp.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),Fp=`SelectValue`,Ip=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Op(Fp,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Vt(t,c.onValueNodeChange);xn(()=>{l(u)},[l,u]);let f=ym(c.value);return(0,j.jsx)(un.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,j.jsx)(v.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),Lp=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,j.jsx)(un.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Rp,zp]=Tp(`SelectPortal`,{forceMount:void 0}),Bp=gp(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,j.jsx)(Rp,{scope:e.__scopeSelect,forceMount:n,children:(0,j.jsx)(Si,{asChild:!0,...r})})},`SelectPortal`),Vp=`SelectContent`,Hp=v.forwardRef(gp(function(e,t){let n=zp(Vp,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Op(Vp,e.__scopeSelect),[o,s]=v.useState();return xn(()=>{s(new DocumentFragment)},[]),(0,j.jsx)(or,{present:r||a.open,children:({present:e})=>e?(0,j.jsx)(Jp,{...i,ref:t}):(0,j.jsx)(Up,{...i,fragment:o})})},`SelectContent`)),Up=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?It.createPortal((0,j.jsx)(Gp,{scope:n,children:(0,j.jsx)(Sp.Slot,{scope:n,children:(0,j.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Wp=10,[Gp,Kp]=Tp(Vp),qp=Wt(`SelectContent.RemoveScroll`),Jp=v.forwardRef(gp(function(e,t){let{__scopeSelect:n}=e,{position:r=_p.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=Op(Vp,n),[b,x]=v.useState(null),[S,C]=v.useState(null),w=Vt(t,x),[T,E]=v.useState(null),[D,O]=v.useState(null),ee=Cp(n),[te,ne]=v.useState(!1),re=v.useRef(!1),ie=v.useRef(!1),ae=v.useRef(!1);v.useEffect(()=>{if(b)return Ka(b)},[b]),Oi();let oe=v.useCallback(e=>{let[t,...n]=ee().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},[ee,S]),k=v.useCallback(()=>oe([T,b]),[oe,T,b]);v.useEffect(()=>{te&&k()},[te,k]);let{onOpenChange:se,triggerPointerDownPosRef:ce}=y;v.useEffect(()=>{if(b){let e={x:0,y:0},t=gp(t=>{e={x:Math.abs(Math.round(t.pageX)-(ce.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ce.current?.y??0))}},`handlePointerMove`),n=gp(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||se(!1),document.removeEventListener(`pointermove`,t),ce.current=null},`handlePointerUp`);return ce.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,se,ce]),v.useEffect(()=>{let e=gp(()=>se(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[se]);let[le,ue]=bm(e=>{let t=ee().filter(e=>!e.disabled),n=xm(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),de=v.useCallback((e,t,n)=>{let r=!ie.current;r&&(ie.current=!0);let i=!re.current&&!n;y.value!==void 0&&y.value===t||i?(E(e),i&&(re.current=!0)):r&&E(e)},[y.value]),fe=v.useCallback(()=>b?.focus(),[b]),pe=v.useCallback((e,t,n)=>{if(!e)return;let r=!ae.current;r&&(ae.current=!0);let i=!re.current&&!n;(y.value!==void 0&&y.value===t||i||r)&&O(e)},[y.value]),me=r===_p.Popper?Xp:Yp,he=me===Xp?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,j.jsx)(Gp,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:de,selectedItem:T,onItemLeave:fe,itemTextRefCallback:pe,focusSelectedItem:k,selectedItemText:D,position:r,isPositioned:te,searchRef:le,children:(0,j.jsx)(La,{as:qp,allowPinchZoom:!0,children:(0,j.jsx)(ai,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:zn(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,j.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,j.jsx)(me,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),..._,...he,onPlaced:()=>ne(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:zn(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ue(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=ee().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(()=>oe(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),Yp=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Op(Vp,n),o=Kp(Vp,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=Vt(t,u),f=Cp(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!==vp.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-Wp,d=Jd(a,[Wp,Math.max(Wp,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-Wp,d=Jd(a,[Wp,Math.max(Wp,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Wp*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-Wp,D=c-E,O=g.offsetHeight/2,ee=g.offsetTop+O,te=m+v+ee,ne=x-te;if(te<=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=te+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)+ne;s.style.height=t+`px`,h.scrollTop=te-E+h.offsetTop}s.style.margin=`${Wp}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]);xn(()=>b(),[b]);let[x,S]=v.useState();xn(()=>{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,j.jsx)(Zp,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,j.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,j.jsx)(un.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),Xp=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Wp,...a}=e,o=Ep(n);return(0,j.jsx)(Fl,{...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`)),[Zp,Qp]=Tp(Vp,{}),$p=`SelectViewport`,em=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Kp($p,n),o=Qp($p,n),s=Vt(t,a.onViewportChange),c=v.useRef(0);return(0,j.jsxs)(j.Fragment,{children:[(0,j.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,j.jsx)(Sp.Slot,{scope:n,children:(0,j.jsx)(un.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:zn(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-Wp*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`)),[tm,nm]=Tp(`SelectGroup`),rm=`SelectItem`,[im,am]=Tp(rm),om=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Op(rm,n),c=Kp(rm,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=Vt(t,zr(e=>c.itemRefCallback?.(e,r,i))),h=gr(),g=v.useRef(`touch`);function _(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return gp(_,`handleSelect`),(0,j.jsx)(im,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,j.jsx)(Sp.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,j.jsx)(un.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:zn(o.onFocus,()=>p(!0)),onBlur:zn(o.onBlur,()=>p(!1)),onClick:zn(o.onClick,e=>{i||g.current!==`mouse`&&_(e)}),onPointerUp:zn(o.onPointerUp,e=>{i||g.current===`mouse`&&_(e)}),onPointerDown:zn(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:zn(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:zn(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:zn(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(bp.includes(e.key)&&_(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),sm=`SelectItemText`,cm=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Op(sm,n),s=Kp(sm,n),c=am(sm,n),l=Ap(sm,n),[u,d]=v.useState(null),f=zr(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Vt(t,d,c.onItemTextChange,f),m=u?.textContent,h=v.useMemo(()=>(0,j.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return xn(()=>(g(h),()=>_(h)),[g,_,h]),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(un.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!ym(o.value)?It.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),lm=`SelectItemIndicator`,um=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,...r}=e;return am(lm,n).isSelected?(0,j.jsx)(un.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),dm=`SelectScrollUpButton`,fm=v.forwardRef(gp(function(e,t){let n=Kp(dm,e.__scopeSelect),r=Qp(dm,e.__scopeSelect),[i,a]=v.useState(!1),o=Vt(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};gp(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,j.jsx)(hm,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),pm=`SelectScrollDownButton`,mm=v.forwardRef(gp(function(e,t){let n=Kp(pm,e.__scopeSelect),r=Qp(pm,e.__scopeSelect),[i,a]=v.useState(!1),o=Vt(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};gp(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,j.jsx)(hm,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),hm=v.forwardRef(gp(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Kp(`SelectScrollButton`,n),o=v.useRef(null),s=Cp(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),xn(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,j.jsx)(un.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:zn(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:zn(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:zn(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),gm=`SelectBubbleInput`,_m=v.forwardRef(gp(function({__scopeSelect:e,...t},n){let r=Op(gm,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=Vt(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,j.jsxs)(un.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:{...mn,...t.style},ref:h,defaultValue:g,children:[ym(i)&&!x?(0,j.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function vm(e){return typeof e==`function`}gp(vm,`isFunction`);function ym(e){return e===``||e===void 0}gp(ym,`shouldShowPlaceholder`);function bm(e){let t=zr(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))}gp(a,`updateSearch`),a(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}gp(bm,`useTypeaheadSearch`);function xm(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=Sm(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}gp(xm,`findNextItem`);function Sm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}gp(Sm,`wrapArray`);var Cm=Object.defineProperty,wm=(e,t)=>Cm(e,`name`,{value:t,configurable:!0}),Tm={Horizontal:`horizontal`,Vertical:`vertical`},Em=Tm.Horizontal,Dm=Object.values(Tm),Om=v.forwardRef(wm(function(e,t){let{decorative:n,orientation:r=Em,...i}=e,a=km(r)?r:Em,o=a===Tm.Vertical?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,j.jsx)(un.div,{"data-orientation":a,...s,...i,ref:t})},`Separator`));function km(e){return Dm.includes(e)}wm(km,`isValidOrientation`);var Am=Object.defineProperty,jm=(e,t)=>Am(e,`name`,{value:t,configurable:!0}),[Mm,Nm]=yn(`Tooltip`,[El]),Pm=El(),Fm=`TooltipProvider`,Im=700,Lm=`tooltip.open`,[Rm,zm]=Mm(Fm),Bm=jm(e=>{let{__scopeTooltip:t,delayDuration:n=Im,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,j.jsx)(Rm,{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`),Vm=`Tooltip`,[Hm,Um]=Mm(Vm),Wm=jm(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=zm(Vm,e.__scopeTooltip),l=Pm(t),[u,d]=v.useState(null),[f,p]=v.useState(void 0),m=gr(),h=v.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,y=v.useRef(!1),[b,x]=Qn({prop:r,defaultProp:i??!1,onChange:jm(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Lm))):c.onClose(),a?.(e)},`onChange`),caller:Vm}),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,j.jsx)(kl,{...l,children:(0,j.jsx)(Hm,{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`),Gm=`TooltipTrigger`,Km=v.forwardRef(jm(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=Um(Gm,n),o=zm(Gm,n),s=Pm(n),c=Vt(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,j.jsx)(jl,{asChild:!0,...s,children:(0,j.jsx)(un.button,{"aria-describedby":a.open?lh(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:zn(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:zn(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:zn(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:zn(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:zn(e.onBlur,a.onClose),onClick:zn(e.onClick,a.onClose)})})},`TooltipTrigger`)),qm=`TooltipPortal`,[Jm,Ym]=Mm(qm,{forceMount:void 0}),Xm=jm(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Um(qm,t);return(0,j.jsx)(Jm,{scope:t,forceMount:n,children:(0,j.jsx)(or,{present:n||a.open,children:(0,j.jsx)(Si,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),Zm=`TooltipContent`,Qm=v.forwardRef(jm(function(e,t){let n=Ym(Zm,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Um(Zm,e.__scopeTooltip);return(0,j.jsx)(or,{present:r||o.open,children:o.disableHoverableContent?(0,j.jsx)(th,{side:i,...a,ref:t}):(0,j.jsx)($m,{side:i,...a,ref:t})})},`TooltipContent`)),$m=v.forwardRef(jm(function(e,t){let n=Um(Zm,e.__scopeTooltip),r=zm(Zm,e.__scopeTooltip),i=v.useRef(null),a=Vt(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=ih(r,rh(r,n.getBoundingClientRect())),a=ah(t.getBoundingClientRect()),o=sh([...i,...a]);s(o),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(c&&u){let e=jm(e=>p(e,u),`handleTriggerLeave`),t=jm(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=jm(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!oh(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,j.jsx)(th,{...e,ref:a})},`TooltipContentHoverable`)),eh=qt(`TooltipContent`),th=v.forwardRef(jm(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=Um(Zm,n),u=Pm(n),{onClose:d}=l,[f,p]=v.useState(null),m=Vt(t,p);li(f),v.useEffect(()=>(document.addEventListener(Lm,d),()=>document.removeEventListener(Lm,d)),[d]),v.useEffect(()=>{if(l.trigger){let e=jm(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 xn(()=>(h(a),()=>{h(void 0)}),[a,h]),(0,j.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,j.jsxs)(Fl,{"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,j.jsx)(eh,{children:r}),i?(0,j.jsx)(hn,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),nh=v.forwardRef(jm(function(e,t){let{__scopeTooltip:n,...r}=e,i=Pm(n);return(0,j.jsx)(Rl,{...i,...r,ref:t})},`TooltipArrow`));function rh(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`)}}jm(rh,`getExitSideFromRect`);function ih(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}jm(ih,`getPaddedExitPoints`);function ah(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}]}jm(ah,`getPointsFromRect`);function oh(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}jm(oh,`isPointInPolygon`);function sh(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)),ch(t)}jm(sh,`getHull`);function ch(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)}jm(ch,`getHullPresorted`);function lh(...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}jm(lh,`concatAriaDescribedby`);var uh=se(`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 M({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Gt:`button`;return(0,j.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:A(uh({variant:t,size:n,className:e})),...i})}var dh=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function fh(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:dh(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var ph=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},mh=e=>{let t=ph(e);return t.charAt(0).toUpperCase()+t.slice(1)},hh=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),gh={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 _h(e){return e!=null}function vh(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??gh.width,a=e.size??e.height??gh.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?hh(...c):hh(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??gh[`stroke-width`])*Number(e.size??e.width??gh.width)/Number(t.size??t.width??gh.width):t.strokeWidth??gh[`stroke-width`];return[`svg`,{...Object.entries(gh).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&_h(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&_h(t.width)&&{[r(`width`)]:t.width},...`height`in t&&_h(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 yh(e,t={}){return vh(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var bh=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},xh=(0,v.createContext)({}),Sh=()=>(0,v.useContext)(xh),Ch=(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=``}=Sh()??{},b=!!c||bh(d),[x,S,C=[]]=yh(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:hh(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 N(e,t=[],n=[]){let r=typeof e==`string`?fh(e,t,n):e,i=(0,v.forwardRef)(({className:e,...t},n)=>(0,v.createElement)(Ch,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=mh(r.name)),i}var wh={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};wh.node;var Th=N(wh),Eh={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};Eh.node;var Dh=N(Eh),Oh={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`}]]};Oh.node;var kh=N(Oh),Ah={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`}]]};Ah.node;var jh=N(Ah),Mh={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`}]]};Mh.node;var Nh=N(Mh),Ph={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`}]]};Ph.node;var Fh=N(Ph),Ih={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`}]]};Ih.node;var Lh=N(Ih),Rh={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`}]]};Rh.node;var zh=N(Rh),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 Vh=N(Bh),Hh={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`]};Hh.node;var Uh=N(Hh),Wh={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Wh.node;var Gh=N(Wh),Kh={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Kh.node;var qh=N(Kh),Jh={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};Jh.node;var Yh=N(Jh),Xh={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Xh.node;var Zh=N(Xh),Qh={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Qh.node;var $h=N(Qh),eg={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`}]]};eg.node;var tg=N(eg),ng={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`]};ng.node;var rg=N(ng),ig={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`]};ig.node;var ag=N(ig),og={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`}]]};og.node;var sg=N(og),cg={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};cg.node;var lg=N(cg),ug={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`]};ug.node;var dg=N(ug),fg={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};fg.node;var pg=N(fg),mg={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`}]]};mg.node;var hg=N(mg),gg={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`]};gg.node;var _g=N(gg),vg={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`}]]};vg.node;var yg=N(vg),bg={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`}]]};bg.node;var xg=N(bg),Sg={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`}]]};Sg.node;var Cg=N(Sg),wg={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`}]]};wg.node;var Tg=N(wg),Eg={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`}]]};Eg.node;var Dg=N(Eg),Og={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`}]]};Og.node;var kg=N(Og),Ag={name:`dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]};Ag.node;var jg=N(Ag),Mg={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`}]]};Mg.node;var tee=N(Mg),Ng={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`}]]};Ng.node;var nee=N(Ng),Pg={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`]};Pg.node;var ree=N(Pg),Fg={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`]};Fg.node;var iee=N(Fg),Ig={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`}]]};Ig.node;var Lg=N(Ig),Rg={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`}]]};Rg.node;var aee=N(Rg),zg={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`}]]};zg.node;var oee=N(zg),Bg={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`}]]};Bg.node;var see=N(Bg),Vg={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`}]]};Vg.node;var Hg=N(Vg),Ug={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`}]]};Ug.node;var cee=N(Ug),Wg={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`}]]};Wg.node;var Gg=N(Wg),Kg={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`}]]};Kg.node;var qg=N(Kg),Jg={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`}]]};Jg.node;var Yg=N(Jg),Xg={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`}]]};Xg.node;var Zg=N(Xg),Qg={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`}]]};Qg.node;var $g=N(Qg),e_={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`}]]};e_.node;var t_=N(e_),n_={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`}]]};n_.node;var r_=N(n_),i_={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`}]]};i_.node;var lee=N(i_),a_={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`}]]};a_.node;var o_=N(a_),s_={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};s_.node;var c_=N(s_),l_={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`}]]};l_.node;var u_=N(l_),d_={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`}]]};d_.node;var f_=N(d_),p_={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`}]]};p_.node;var m_=N(p_),h_={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};h_.node;var g_=N(h_),__={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`}]]};__.node;var v_=N(__),y_={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`}]]};y_.node;var b_=N(y_),x_={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`}]]};x_.node;var S_=N(x_),C_={name:`notebook-pen`,size:24,node:[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]};C_.node;var w_=N(C_),T_={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`}]]};T_.node;var E_=N(T_),D_={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`]};D_.node;var O_=N(D_),k_={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`}]]};k_.node;var A_=N(k_),j_={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`}]]};j_.node;var M_=N(j_),N_={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`}]]};N_.node;var P_=N(N_),F_={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`}]]};F_.node;var I_=N(F_),L_={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`}]]};L_.node;var uee=N(L_),R_={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};R_.node;var z_=N(R_),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 dee=N(B_),V_={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`}]]};V_.node;var H_=N(V_),U_={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`}]]};U_.node;var fee=N(U_),W_={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};W_.node;var G_=N(W_),K_={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`}]]};K_.node;var q_=N(K_),J_={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`}]]};J_.node;var Y_=N(J_),X_={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`}]]};X_.node;var Z_=N(X_),Q_={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`]};Q_.node;var $_=N(Q_),ev={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`}]]};ev.node;var tv=N(ev),nv={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`}]]};nv.node;var rv=N(nv),iv={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`}]]};iv.node;var av=N(iv),ov={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`}]]};ov.node;var sv=N(ov),cv={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};cv.node;var lv=N(cv),uv={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`]};uv.node;var dv=N(uv),fv={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`}]]};fv.node;var pv=N(fv),mv={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`}]]};mv.node;var hv=N(mv),gv={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`}]]};gv.node;var _v=N(gv),vv={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};vv.node;var yv=N(vv),bv=({className:e,...t})=>(0,j.jsx)(te,{className:A(`relative flex-1 overflow-y-hidden`,e),initial:`smooth`,resize:`smooth`,role:`log`,...t}),xv=({className:e,...t})=>(0,j.jsx)(te.Content,{className:A(`flex flex-col gap-8 p-4`,e),...t}),Sv=({className:e,...t})=>{let{isAtBottom:n,scrollToBottom:r}=ne(),i=(0,v.useCallback)(()=>{r()},[r]);return!n&&(0,j.jsx)(M,{className:A(`absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full`,e),onClick:i,size:`icon`,type:`button`,variant:`outline`,...t,children:(0,j.jsx)(Th,{className:`size-4`})})},Cv=`vercel.ai.error`,wv=Symbol.for(Cv),Tv=class e extends Error{constructor({name:e,message:t,cause:n}){super(t),this[wv]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,Cv)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}},Ev=`AI_APICallError`,Dv=`vercel.ai.error.${Ev}`,Ov=Symbol.for(Dv),kv=class extends Tv{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:Ev,message:e,cause:o}),this[Ov]=!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 Tv.hasMarker(e,Dv)}},Av=`AI_EmptyResponseBodyError`,jv=`vercel.ai.error.${Av}`,Mv=Symbol.for(jv),Nv=class extends Tv{constructor({message:e=`Empty response body`}={}){super({name:Av,message:e}),this[Mv]=!0}static isInstance(e){return Tv.hasMarker(e,jv)}};function Pv(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.toString():JSON.stringify(e)}var Fv=`AI_InvalidArgumentError`,Iv=`vercel.ai.error.${Fv}`,Lv=Symbol.for(Iv),Rv=class extends Tv{constructor({message:e,cause:t,argument:n}){super({name:Fv,message:e,cause:t}),this[Lv]=!0,this.argument=n}static isInstance(e){return Tv.hasMarker(e,Iv)}},zv=`AI_JSONParseError`,Bv=`vercel.ai.error.${zv}`,Vv=Symbol.for(Bv),Hv=class extends Tv{constructor({text:e,cause:t}){super({name:zv,message:`JSON parsing failed: Text: ${e}.\nError message: ${Pv(t)}`,cause:t}),this[Vv]=!0,this.text=e}static isInstance(e){return Tv.hasMarker(e,Bv)}},Uv=`AI_TypeValidationError`,Wv=`vercel.ai.error.${Uv}`,Gv=Symbol.for(Wv),Kv=class e extends Tv{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:Uv,message:`${r}: Value: ${JSON.stringify(e)}.\nError message: ${Pv(t)}`,cause:t}),this[Gv]=!0,this.value=e,this.context=n}static isInstance(e){return Tv.hasMarker(e,Wv)}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})}},qv=`AI_UnsupportedFunctionalityError`,Jv=`vercel.ai.error.${qv}`,Yv=Symbol.for(Jv),Xv=class extends Tv{constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:qv,message:t}),this[Yv]=!0,this.functionality=e}static isInstance(e){return Tv.hasMarker(e,Jv)}};function Zv(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 Qv(e,t=`|`){return e.map(e=>xy(e)).join(t)}function $v(e,t){return typeof t==`bigint`?t.toString():t}var ey=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 ty(e){return new ey(e)}function ny(e){return e==null}function ry(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function iy(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 ay=Symbol(`evaluating`);function oy(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ay)return r===void 0&&(r=ay,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function sy(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function cy(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function ly(e){return cy(e._zod.def)??e._zod.def.shape}function uy(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return sy(this,t,e),e},enumerable:!0,configurable:!0})}function dy(e,t,n){t in e?sy(e,t,n):e[t]=n}function fy(e,t,n,r){let i=ly(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?uy(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):dy(e,a,r?r(n.value,a):n.value))}}function pee(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?uy(e,n,()=>t[n]):dy(e,n,r.value))}}function py(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function mee(e){return JSON.stringify(e)}function hee(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var my=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function hy(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var gee=ty(()=>{if(Ky.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function gy(e){if(hy(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return hy(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function _y(e){return gy(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var _ee=new Set([`string`,`number`,`symbol`]);function vy(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function yy(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function by(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 xy(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function vee(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Sy={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},yee={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function bee(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 fy(i,e,Cy(e,t)),yy(e,py(n,{shape:i,checks:[]}))}function Cy(e,t){let n=ly(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 xee(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(Cy(e,t)),a={};return fy(a,e,Reflect.ownKeys(ly(e)).filter(e=>!i.has(e))),yy(e,py(n,{shape:a,checks:[]}))}function See(e,t){if(!gy(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=ly(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 yy(e,py(e._zod.def,{shape:wy(e,t)}))}function wy(e,t){let n={};return fy(n,e,Reflect.ownKeys(ly(e))),pee(n,t),n}function Cee(e,t){if(!gy(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return yy(e,py(e._zod.def,{shape:wy(e,t)}))}function wee(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 fy(n,e,Reflect.ownKeys(ly(e))),fy(n,t,Reflect.ownKeys(ly(t))),yy(e,py(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Ty(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(Cy(t,n)):void 0,o={};return fy(o,t,Reflect.ownKeys(ly(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),yy(t,py(t._zod.def,{shape:o,checks:[]}))}function Tee(e,t,n){let r=n?new Set(Cy(t,n)):void 0,i={};return fy(i,t,Reflect.ownKeys(ly(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),yy(t,py(t._zod.def,{shape:i}))}function Ey(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 Eee(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 Dy(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Oy(e){return typeof e==`string`?e:e?.message}function ky(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 Ay(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function jy(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:Oy(e.inst?._zod.def?.error?.(e))??Oy(a?.(e))??Oy(t?.error?.(e))??Oy(n.customError?.(e))??Oy(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 Dee=/[\uD800-\uDBFF]/;function My(e){let t=e.length;if(!Dee.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 Ny(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Oee(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 Py(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function kee(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Aee(e,n,r.value)}}function Fy(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Iy(e,t,n){return Fy(e,t,n,!1)}function Ly(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Fy(this,n,r(this))},set(e){Fy(this,n,e)}})}return t}function Aee(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Fy(this,t,n.bind(this))},set(e){Fy(this,t,e)}})}function jee(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ry,zy=!1,Mee={configurable:!0,get(){zy=!0}};function By(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Ry!==e._zod?Ry=void 0:(Ry=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Mee);let e=zy;zy=!1;try{let r=n(this);return zy?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),zy||=e,r}catch(n){throw delete this[t],zy||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Nee(e,t,n,r){let i=jee(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 Pee=`~constantCatch`;function Fee(e){let t=()=>e;return t[Pee]=!0,t}var Vy,Hy={value:void 0,enumerable:!1},Uy=`captureStackTrace`in Error?Error:null;function Iee(e){let t=Uy;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Uy=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function P(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){Hy.value=new a(r);try{Object.defineProperty(n,"_zod",Hy)}finally{Hy.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),kee(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?Iee(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 Wy=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Gy=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Vy=globalThis).__zod_globalConfig??(Vy.__zod_globalConfig={});var Ky=globalThis.__zod_globalConfig;function qy(e){return e&&Object.assign(Ky,e),Ky}function Lee(){let e=this._zod;return e.message??=JSON.stringify(e.def,$v,2),e.message}function Ree(e){this._zod.message=e}var zee={get:Lee,set:Ree,enumerable:!0,configurable:!0},Jy={value:void 0,enumerable:!1},Yy=new WeakSet([Object.prototype,Error.prototype]),Bee=P(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Jy.value=t,Object.defineProperty(e,"issues",Jy),Jy.value=void 0,Object.defineProperty(e,"message",zee);let n=Object.getPrototypeOf(e);Yy.has(n)||(Yy.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 Vee(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 Hee(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Vee(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Uee(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 Xy(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Zy=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 Wy;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>jy(e,o,qy())));throw my(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=>jy(e,o,qy())));throw my(n,a?.callee??t),n}return s.value};return t},$y=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 Wy;return a.issues.length?eb(e,a.issues,i):{success:!0,data:a.value}};function eb(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>jy(e,n,qy()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var tb=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?eb(e,a.issues,i):{success:!0,data:a.value}},nb=Symbol.for(`zod.compile.invalid`),rb=Symbol.for(`zod.compile.fallback`),ib=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==nb)return!0;if(r.definite===!0&&n===void 0)return!1}return ab(e,t,n)});function ab(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[rb]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Wy;return a.issues.length===0}var ob=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},sb=e=>{let t=Zy(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Xy(n,a))};return n},cb=e=>{let t=Zy(e),n=(e,r,i,a)=>t(e,r,i,Xy(n,a));return n},lb=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,Xy(n,a))};return n},ub=e=>{let t=Qy(e),n=async(e,r,i,a)=>await t(e,r,i,Xy(n,a));return n},db=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return $y(e)(t,n,i)},fb=e=>(t,n,r)=>$y(e)(t,n,r),pb=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return tb(e)(t,n,i)},mb=e=>async(t,n,r)=>tb(e)(t,n,r),hb=/^[cC][0-9a-z]{6,}$/,gb=/^[0-9a-z]+$/,_b=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,vb=/^[0-9a-vA-V]{20}$/,yb=/^[A-Za-z0-9]{27}$/,bb=/^[a-zA-Z0-9_-]{21}$/;function xb(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Sb=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cb=/^([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})$/,wb=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)$/,Tb=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Eb=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Db(){return new RegExp(Eb,`u`)}var Ob=/^(?:(?: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])$/,kb=/^(([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}|:))$/,Ab=/^((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])$/,jb=/^(([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])$/,Mb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Nb=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Pb=/^https?$/,Fb=/^\+[1-9]\d{6,14}$/,Ib=`(?:(?:\\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 Lb(e){return RegExp(`^${e}$`)}var Rb=Lb(Ib);function zb(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 Bb(e){return RegExp(`^${zb(e)}$`)}function Vb(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${zb({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${zb({precision:e.precision})}`:n;return RegExp(`^${Ib}T(?:${r})$`)}var Hb=/^[\s\S]{0,}$/,Ub=/^-?\d+$/,Wb=/^-?\d+(?:\.\d+)?$/,Gb=/^(?:true|false)$/i,Kb=/^null$/i,qb=/^[^A-Z]*$/,Jb=/^[^a-z]*$/,Yb=P(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Xb=e=>{let t=e.value;return!ny(t)&&t.length!==void 0},Zb={number:`number`,bigint:`bigint`,object:`date`},Qb=P(`$ZodCheckLessThan`,(e,t)=>{Yb.init(e,t);let n=Zb[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Zb[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})}}),$b=P(`$ZodCheckGreaterThan`,(e,t)=>{Yb.init(e,t);let n=Zb[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Zb[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})}}),ex=P(`$ZodCheckMultipleOf`,(e,t)=>{Yb.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):iy(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})}}),tx=P(`$ZodCheckNumberFormat`,(e,t)=>{Yb.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Sy[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})}}),nx=P(`$ZodCheckMaxLength`,(e,t)=>{var n;Yb.init(e,t),(n=e._zod.def).when??(n.when=Xb),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?My(r):i)<=t.maximum)return;let a=Ny(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rx=P(`$ZodCheckMinLength`,(e,t)=>{var n;Yb.init(e,t),(n=e._zod.def).when??(n.when=Xb),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?My(r):i)>=t.minimum)return;let a=Ny(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ix=P(`$ZodCheckLengthEquals`,(e,t)=>{var n;Yb.init(e,t),(n=e._zod.def).when??(n.when=Xb),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?My(r):i;if(a===t.length)return;let o=Ny(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})}}),ax=P(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Yb.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=()=>{})}),ox=P(`$ZodCheckRegex`,(e,t)=>{ax.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})}}),sx=P(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=qb,ax.init(e,t)}),cx=P(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Jb,ax.init(e,t)}),lx=P(`$ZodCheckIncludes`,(e,t)=>{Yb.init(e,t);let n=vy(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})}}),ux=P(`$ZodCheckStartsWith`,(e,t)=>{Yb.init(e,t);let n=RegExp(`^${vy(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})}}),dx=P(`$ZodCheckEndsWith`,(e,t)=>{Yb.init(e,t);let n=RegExp(`.*${vy(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 fx(e,t,n){e.issues.length&&t.issues.push(...Dy(n,e.issues))}var px=P(`$ZodCheckProperties`,(e,t)=>{Yb.init(e,t),Iy(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=>fx(t,r,e)))):fx(n,r,e)}if(a)return Promise.all(a).then(()=>void 0)}}),mx=P(`$ZodCheckOverwrite`,(e,t)=>{Yb.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),hx=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))}},gx={major:4,minor:6,patch:7},_x=P(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gx;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=Ey(t),a;for(let o of n){if(o._zod.def.when){if(Eee(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 Wy;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ay(t.issues,n,e),i||=Ey(t,n))});else{if(t.issues.length===n)continue;Ay(t.issues,n,e),i||=Ey(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Ey(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Wy;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 Wy;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Iy(this,`~standard`,bx(this))},set"~standard"(e){Fy(this,`~standard`,e)}}),vx=(e,t)=>e.issues.length?{issues:e.issues.map(e=>jy(e,t,qy()))}:{value:e.value};async function yx(e,t){let n={async:!0};return vx(await e._zod.run({value:t,issues:[]},n),n)}function bx(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return vx(r,n)}catch{}return yx(e,t)},vendor:`zod`,version:1}}var xx=P(`$ZodString`,(e,t)=>{_x.init(e,t),e._zod.pattern=t.pattern??Hb,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}}),Sx=P(`$ZodStringFormat`,(e,t)=>{ax.init(e,t),xx.init(e,t)}),Cx=P(`$ZodGUID`,(e,t)=>{t.pattern??=Cb,Sx.init(e,t)}),wx=P(`$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??=wb(e)}else t.pattern??=wb();Sx.init(e,t)}),Tx=P(`$ZodEmail`,(e,t)=>{t.pattern??=Tb,Sx.init(e,t)});function Ex(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Dx(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Ex(e)||2:Ox(e,t)}function Ox(e,t){if(!t.normalize&&t.protocol?.source===Pb.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 kx=/[\t\n\r]/g;function Ax(e){return e.replace(kx,``)}function jx(e,t){return t.lastIndex=0,t.test(e.hostname)}function Mx(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Nx=P(`$ZodURL`,(e,t)=>{Sx.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Dx(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=Ax(r);return}t.hostname&&!jx(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&&!Mx(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:Ax(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Px=P(`$ZodEmoji`,(e,t)=>{t.pattern??=Db(),Sx.init(e,t)}),Fx=P(`$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?bb:xb(t.length),Sx.init(e,t)}),Ix=P(`$ZodCUID`,(e,t)=>{t.pattern??=hb,Sx.init(e,t)}),Lx=P(`$ZodCUID2`,(e,t)=>{t.pattern??=gb,Sx.init(e,t)}),Rx=P(`$ZodULID`,(e,t)=>{t.pattern??=_b,Sx.init(e,t)}),zx=P(`$ZodXID`,(e,t)=>{t.pattern??=vb,Sx.init(e,t)}),Bx=P(`$ZodKSUID`,(e,t)=>{t.pattern??=yb,Sx.init(e,t)}),Vx=P(`$ZodISODateTime`,(e,t)=>{t.pattern??=Vb(t),Sx.init(e,t)}),Hx=P(`$ZodISODate`,(e,t)=>{t.pattern??=Rb,Sx.init(e,t)}),Ux=P(`$ZodISOTime`,(e,t)=>{t.pattern??=Bb(t),Sx.init(e,t)}),Wx=P(`$ZodISODuration`,(e,t)=>{t.pattern??=Sb,Sx.init(e,t)}),Gx=P(`$ZodIPv4`,(e,t)=>{t.pattern??=Ob,Sx.init(e,t)}),Kx=/^[0-9a-fA-F:.]+$/;function qx(e){return Kx.test(e)?Ex(`http://[${e}]`):!1}var Jx=P(`$ZodIPv6`,(e,t)=>{t.pattern??=kb,Sx.init(e,t),e._zod.check=n=>{qx(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Yx=P(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Ab,Sx.init(e,t)});function Xx(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:qx(n)}var Zx=P(`$ZodCIDRv6`,(e,t)=>{t.pattern??=jb,Sx.init(e,t),e._zod.check=n=>{Xx(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Qx(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var $x=/^[0-9a-zA-Z+/]*={0,2}$/,eS=P(`$ZodBase64`,(e,t)=>{t.pattern??=$x,Sx.init(e,t),e._zod.check=n=>{Qx(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),tS=/^[A-Za-z0-9_-]*$/;function nS(e){if(!tS.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Qx(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var rS=P(`$ZodBase64URL`,(e,t)=>{t.pattern??=tS,Sx.init(e,t),e._zod.check=n=>{nS(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),iS=P(`$ZodE164`,(e,t)=>{t.pattern??=Fb,Sx.init(e,t)});function aS(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 oS=P(`$ZodJWT`,(e,t)=>{Sx.init(e,t),e._zod.check=n=>{aS(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),sS=P(`$ZodNumber`,(e,t)=>{_x.init(e,t),e._zod.pattern=Wb,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}}),cS=P(`$ZodNumberFormat`,(e,t)=>{tx.init(e,t),sS.init(e,t)}),lS=P(`$ZodBoolean`,(e,t)=>{_x.init(e,t),e._zod.pattern=Gb,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}}),uS=P(`$ZodNull`,(e,t)=>{_x.init(e,t),e._zod.pattern=Kb,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}}),dS=P(`$ZodUnknown`,(e,t)=>{_x.init(e,t),e._zod.parse=e=>e}),fS=P(`$ZodNever`,(e,t)=>{_x.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function pS(e,t){let n=ky(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 ky(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,Ay(n.issues,t,e),n}}return i(n,a)}}var mS=e=>Array.isArray(e)?e.length:-1;function hS(e,t,n){e.issues.length&&t.issues.push(...Dy(n,e.issues)),t.value[n]=e.value}var gS=P(`$ZodArray`,(e,t)=>{_x.init(e,t);let n=Ky.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=>hS(t,r,e)));else if(hS(c,r,e),s&&c.issues.length!==0&&Ey(c))break}return o.length?Promise.all(o).then(()=>r):r},pS(e,mS)});function _S(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(...Dy(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 vS=[];function yS(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:vS,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=vee(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function bS(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(Ey(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=>_S(e,n,i,t,d,f))):_S(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 xS=P(`$ZodObject`,(e,t)=>{_x.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=ty(()=>yS(t));By(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)||sy(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=hy,o=t.catchall,s,c=Ky.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(Ey(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=>_S(n,t,e,r,a,o))):_S(s,t,e,r,a,o)}return o?bS(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),SS=P(`$ZodObjectJIT`,(e,t)=>{xS.init(e,t);let n=e._zod.parse,r=ty(()=>yS(t)),i=Ky.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new hx([`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)}]`:mee(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=hy,c=!Ky.jitless,l=c&&gee.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?bS([],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 CS(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=>!Ey(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=>jy(e,r,qy())))}),t)}var wS=P(`$ZodUnion`,(e,t)=>{_x.init(e,t),By(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),By(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),By(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)))}),By(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=>ry(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=>CS(t,r,e,i)):CS(o,r,e,i)}});function TS(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 ES=P(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,wS.init(e,t);let n=e._zod.parse;By(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)||sy(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=cy(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ty(()=>TS(t));e._zod.parse=(i,a)=>{let o=i.value;if(!hy(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)}}),DS=P(`$ZodIntersection`,(e,t)=>{_x.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])=>kS(e,t,n)):kS(e,i,a)}});function OS(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(gy(e)&&gy(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=OS(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=OS(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 kS(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=OS(t.value,n.value);if(!c.valid){if(Ey(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var AS=P(`$ZodRecord`,(e,t)=>{_x.init(e,t);let n=Ky.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!gy(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=>jy(e,i,qy())),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(...Dy(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Dy(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`&&Wb.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=>jy(e,i,qy())),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(...Dy(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Dy(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}}),jS=P(`$ZodEnum`,(e,t)=>{_x.init(e,t);let n=Zv(t.entries),r=new Set(n);e._zod.values=r,By(e,`pattern`,e=>{let t=Zv(e.def.entries).filter(e=>_ee.has(typeof e));return RegExp(t.length?`^(${t.map(e=>vy(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}}),MS=P(`$ZodLiteral`,(e,t)=>{_x.init(e,t);let n=new Set(t.values);e._zod.values=n,By(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?vy(e):e?vy(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}}),NS=P(`$ZodTransform`,(e,t)=>{_x.init(e,t),e._zod.optin=`optional`,Ky.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Gy(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 Wy;return n.value=i,n}});function PS(e,t){return e.value=t.issues.length?void 0:t.value,e}var FS=P(`$ZodOptional`,(e,t)=>{_x.init(e,t),By(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,By(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),By(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ry(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=>PS(e,t)):PS(e,r)}return t.innerType._zod.run(e,n)}}),IS=P(`$ZodExactOptional`,(e,t)=>{FS.init(e,t),By(e,`values`,e=>e.def.innerType._zod.values),By(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),LS=P(`$ZodNullable`,(e,t)=>{_x.init(e,t),By(e,`optin`,e=>e.def.innerType._zod.optin),By(e,`optout`,e=>e.def.innerType._zod.optout),By(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ry(t.source)}|null)$`):void 0}),By(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)}),RS=P(`$ZodDefault`,(e,t)=>{_x.init(e,t),e._zod.optin=`defaulted`,By(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=>zS(e,t)):zS(r,t)}});function zS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var BS=P(`$ZodPrefault`,(e,t)=>{_x.init(e,t),e._zod.optin=`defaulted`,By(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))}),VS=P(`$ZodNonOptional`,(e,t)=>{_x.init(e,t),By(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=>HS(t,e)):HS(i,e)}});function HS(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 US(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>jy(e,r,qy()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var WS=P(`$ZodCatch`,(e,t)=>{_x.init(e,t),By(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),By(e,`optout`,e=>e.def.innerType._zod.optout),By(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=>US(e,r,t,n)):US(e,r,t,n)}}),GS=P(`$ZodPipe`,(e,t)=>{_x.init(e,t),By(e,`values`,e=>e.def.in._zod.values),By(e,`optin`,e=>e.def.in._zod.optin),By(e,`optout`,e=>e.def.out._zod.optout),By(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=>KS(e,t.in,n)):KS(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>KS(e,t.out,n)):KS(r,t.out,n)}});function KS(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 qS=P(`$ZodReadonly`,(e,t)=>{_x.init(e,t),By(e,`propValues`,e=>e.def.innerType._zod.propValues),By(e,`values`,e=>e.def.innerType._zod.values),By(e,`optin`,e=>e.def.innerType?._zod?.optin),By(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(JS):JS(r)}});function JS(e){return e.memo||(e.value=Object.freeze(e.value)),e}var YS=P(`$ZodLazy`,(e,t)=>{_x.init(e,t),oy(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),By(e,`pattern`,e=>e.innerType?._zod?.pattern),By(e,`propValues`,e=>e.innerType?._zod?.propValues),By(e,`optin`,e=>e.innerType?._zod?.optin??void 0),By(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),XS=P(`$ZodCustom`,(e,t)=>{Yb.init(e,t),_x.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=>ZS(t,n,r,e));ZS(i,n,r,e)}});function ZS(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(Py(e))}}var QS=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},$S=`~memo`,eC=[];function tC(e){return typeof e==`object`&&!!e}function nC(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var rC=new WeakMap,iC=0,aC=1,oC=2;function sC(e,t,n){let r=rC.get(e);if(r!==void 0)return r?oC:iC;if(t.has(e))return oC;t.add(e);let i=iC,a=e=>{if(i!==oC&&e?._zod){let r=sC(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=iC;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?aC:o.value?._zod?sC(o.value,t,n):iC;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=cy(c);s(e?o(e,!0):aC),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?sC(r,t,!1):aC);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),cC(e,i)}function cC(e,t){return t!==aC&&rC.set(e,t===oC),t}function lC(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var uC,dC=[],fC={alloc(e,t,n){let r=uC;if(!r)return n;uC=void 0;let i={value:n,issues:null};return r.set(t.value,i),dC.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`&&mC(n,e.value))throw new QS;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=sC(e,new Set,!1);if(i===iC)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===oC||r?n=!0:r=!0}let l=s.value;if(!tC(l))return t(s,c);let u=c[$S];u||(u={buckets:new WeakMap,backEdges:void 0},c[$S]=u);let d;i===c?d=a:(d=lC(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(...nC(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;uC=d;let p=dC.length,m=t(s,c);uC=void 0;let h=dC.length>p?dC.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?nC(e.issues):eC),e)):(h&&(h.issues=m.issues.length?nC(m.issues):eC),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function pC(){return fC}function mC(e,t){let n=e[$S]?.backEdges;return n!==void 0&&tC(t)&&n.has(t)}var hC=()=>{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(Oee(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${xy(e.values[0])}`:`Invalid option: expected one of ${Qv(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`:``}: ${Qv(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 gC(){return{localeError:hC()}}var _C,vC=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 yC(){return new vC}(_C=globalThis).__zod_globalRegistry??(_C.__zod_globalRegistry=yC());var bC=globalThis.__zod_globalRegistry;function xC(e){return e.checks&&=[...e.checks],e}function SC(e,t){return new e(xC({type:`string`,...by(t)}))}function CC(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...by(t)})}function wC(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...by(t)})}function TC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...by(t)})}function EC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...by(t)})}function DC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...by(t)})}function OC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...by(t)})}function kC(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...by(t)})}function AC(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...by(t)})}function jC(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...by(t)})}function MC(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...by(t)})}function NC(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...by(t)})}function PC(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...by(t)})}function FC(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...by(t)})}function IC(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...by(t)})}function LC(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...by(t)})}function RC(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...by(t)})}function zC(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...by(t)})}function BC(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...by(t)})}function VC(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...by(t)})}function HC(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...by(t)})}function UC(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...by(t)})}function WC(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...by(t)})}function GC(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...by(t)})}function KC(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...by(t)})}function qC(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...by(t)})}function JC(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...by(t)})}function YC(e,t){return new e(xC({type:`number`,checks:[],...by(t)}))}function XC(e,t){return new e(xC({type:`number`,coerce:!0,checks:[],...by(t)}))}function ZC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...by(t)})}function QC(e,t){return new e({type:`boolean`,...by(t)})}function $C(e,t){return new e({type:`null`,...by(t)})}function ew(e){return new e({type:`unknown`})}function tw(e,t){return new e({type:`never`,...by(t)})}function nw(e,t){return new Qb({check:`less_than`,...by(t),value:e,inclusive:!1})}function rw(e,t){return new Qb({check:`less_than`,...by(t),value:e,inclusive:!0})}function iw(e,t){return new $b({check:`greater_than`,...by(t),value:e,inclusive:!1})}function aw(e,t){return new $b({check:`greater_than`,...by(t),value:e,inclusive:!0})}function ow(e,t){return new ex({check:`multiple_of`,...by(t),value:e})}function sw(e,t){return new nx({check:`max_length`,...by(t),maximum:e})}function cw(e,t){return new rx({check:`min_length`,...by(t),minimum:e})}function lw(e,t){return new ix({check:`length_equals`,...by(t),length:e})}function uw(e,t){return new ox({check:`string_format`,format:`regex`,...by(t),pattern:e})}function dw(e){return new sx({check:`string_format`,format:`lowercase`,...by(e)})}function fw(e){return new cx({check:`string_format`,format:`uppercase`,...by(e)})}function pw(e,t){return new lx({check:`string_format`,format:`includes`,...by(t),includes:e})}function mw(e,t){return new ux({check:`string_format`,format:`starts_with`,...by(t),prefix:e})}function hw(e,t){return new dx({check:`string_format`,format:`ends_with`,...by(t),suffix:e})}function gw(e,t){return new px({check:`properties`,shape:e,...by(t)})}function _w(e){return new mx({check:`overwrite`,tx:e})}function vw(e){return _w(t=>t.normalize(e))}function yw(){return _w(e=>e.trim())}function bw(){return _w(e=>e.toLowerCase())}function xw(){return _w(e=>e.toUpperCase())}function Sw(){return _w(e=>hee(e))}function Cw(e,t,n){return new e({type:`array`,element:t,...by(n)})}function ww(e,t,n){let r=by(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Tw(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...by(n)})}function Ew(e,t){let n=Dw(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Py(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(Py(r))}},e(t.value,t)),t);return n}function Dw(e,t){let n=new Yb({check:`custom`,...by(t)});return n._zod.check=e,n}function Ow(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&sy(e,t,n[t]);return e}function kw(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??bC,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 Aw(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 jw(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,jw(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Ow(o.schema,c),t.io===`input`&&Vw(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 Mw(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Nw(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}/${Mw(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+Mw(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 Pw(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;Pw(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 Fw=new Set([`type`,`properties`,`required`,`additionalProperties`]),Iw=[`oneOf`,`anyOf`];function Lw(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Rw(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Fw.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]??Lw(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}sy(n,r,e.length===1?e[0]:Rw(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=Lw(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 zw(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Fw)if(t in e)return;let n=t.filter(e=>Iw.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Rw(t);else{let e=n[0],i=Iw.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=>Rw([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Ow(e,r))}function Bw(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)):Ow(i,s),Ow(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())Pw(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)??[])zw(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)}Ow(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,sy(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:Uw(t,`input`,e.processors),output:Uw(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Vw(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 Vw(r.element,n);if(r.type===`set`)return Vw(r.valueType,n);if(r.type===`lazy`)return Vw(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 Vw(r.innerType,n);if(r.type===`intersection`)return Vw(r.left,n)||Vw(r.right,n);if(r.type===`record`||r.type===`map`)return Vw(r.keyType,n)||Vw(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Vw(r.in,n)||Vw(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Vw(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Vw(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Vw(e,n))return!0;return!!(r.rest&&Vw(r.rest,n))}return!1}var Hw=(e,t={})=>n=>{let r=kw({...n,processors:t});return jw(e,r),Nw(r,e),Bw(r,e)},Uw=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=kw({...i??{},target:a,io:t,processors:n});return jw(e,o),Nw(o,e),Bw(o,e)},Ww=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Gw=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Kw=(e,t)=>{Ww(e,`minimum`,t),Gw(e,`maximum`,t)},qw=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Jw=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Yw=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Xw=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Zw=(e,t)=>Ww(e,`minimum`,t.minimum),Qw=(e,t)=>Gw(e,`maximum`,t.maximum),$w=e=>(t,n)=>{Xw(t,n.format);let[r,i]=e[n.format];Ww(t,`minimum`,r),Gw(t,`maximum`,i)},eT={greater_than:(e,t)=>Ww(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Gw(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>qw(e,t.value),number_format:$w(Sy),bigint_format:$w(yee),min_length:Zw,max_length:Qw,length_equals:(e,t)=>Kw(e,t.length),min_size:Zw,max_size:Qw,size_equals:(e,t)=>Kw(e,t.size),string_format:(e,t)=>{Xw(e,t.format),t.pattern&&Jw(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)=>Yw(e,t.mime)};function tT(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)eT[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Ww(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Ww(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Gw(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Gw(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&qw(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Yw(t,i.mime);for(let e of i.patterns??[])Jw(t,e);return t}var nT={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},rT=new Map([[$x,Mb],[tS,Nb]]),iT=e=>rT.get(e)??e,aT=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=tT(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=nT[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(iT);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}))])}},oT=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=tT(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)):Aw(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}))])}},sT=(e,t,n,r)=>{n.type=`boolean`},cT=(e,t,n,r)=>{Aw(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},lT=(e,t,n,r)=>{Aw(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},uT=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},dT=(e,t,n,r)=>{Aw(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},fT=(e,t,n,r)=>{Aw(e,t,n,r,`Void cannot be represented in JSON Schema`)},pT=(e,t,n,r)=>{n.not={}},mT=(e,t,n,r)=>{},hT=(e,t,n,r)=>{},Wee=(e,t,n,r)=>{Aw(e,t,n,r,`Date cannot be represented in JSON Schema`)},gT=(e,t,n,r)=>{let i=e._zod.def,a=Zv(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)},_T=(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(Aw(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Aw(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}},Gee=(e,t,n,r)=>{Aw(e,t,n,r,`NaN cannot be represented in JSON Schema`)},Kee=(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},qee=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=tT(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})))},Jee=(e,t,n,r)=>{n.type=`boolean`},vT=(e,t,n,r)=>{Aw(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Yee=(e,t,n,r)=>{Aw(e,t,n,r,`Function types cannot be represented in JSON Schema`)},yT=(e,t,n,r)=>{Aw(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Xee=(e,t,n,r)=>{Aw(e,t,n,r,`Map cannot be represented in JSON Schema`)},Zee=(e,t,n,r)=>{Aw(e,t,n,r,`Set cannot be represented in JSON Schema`)},bT=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=tT(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=jw(a.element,t,{...r,path:[...r.path,`items`]})};function xT(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?xT(t.out):t.type===`catch`?xT(t.innerType):e._zod.optin}var ST=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Aw(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)sy(i.properties,e,jw(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`?xT(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=jw(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},CT=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>jw(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},wT=(e,t,n,r)=>{let i=e._zod.def,a=jw(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=jw(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)},Qee=(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)=>jw(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?jw(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`?xT(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}=tT(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function TT(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=TT(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=>TT(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`)?Wb:Ub).source)),p}var ET=new WeakMap;function $ee(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 ET.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=TT(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 DT=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=tT(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=jw(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)sy(i.patternProperties,iT(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=jw(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=ET.get(t);n||(n=[],ET.set(t,n),t.deferred.push(()=>$ee(t))),n.push(e)}i.additionalProperties=jw(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&xT(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))}},OT=(e,t,n,r)=>{let i=e._zod.def,a=jw(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`}]},kT=(e,t,n,r)=>{let i=e._zod.def;jw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},AT=Symbol();function jT(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Aw(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),AT):JSON.parse(o)}var MT=(e,t,n,r)=>{let i=e._zod.def;jw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=jT(i.defaultValue,e,t,n,r);o!==AT&&(n.default=o)},NT=(e,t,n,r)=>{let i=e._zod.def;jw(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=jT(i.defaultValue,e,t,n,r);o!==AT&&(n._prefault=o)},PT=(e,t,n,r)=>{let i=e._zod.def;jw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Aw(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},FT=(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;jw(o,t,r);let s=t.seen.get(e);s.ref=o},IT=(e,t,n,r)=>{let i=e._zod.def;jw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ete=(e,t,n,r)=>{let i=e._zod.def;jw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},LT=(e,t,n,r)=>{let i=e._zod.def;jw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},RT=(e,t,n,r)=>{let i=e._zod.innerType;jw(i,t,r);let a=t.seen.get(e);a.ref=i},zT={string:aT,number:oT,boolean:sT,bigint:cT,symbol:lT,null:uT,undefined:dT,void:fT,never:pT,any:mT,unknown:hT,date:Wee,enum:gT,literal:_T,nan:Gee,template_literal:Kee,file:qee,success:Jee,custom:vT,function:Yee,transform:yT,map:Xee,set:Zee,array:bT,object:ST,union:CT,intersection:wT,tuple:Qee,record:DT,nullable:OT,nonoptional:kT,default:MT,prefault:NT,catch:PT,pipe:FT,readonly:IT,promise:ete,optional:LT,lazy:RT};function tte(e,t){if(`_idmap`in e){let n=e,r=kw({...t,processors:zT}),i={};for(let e of n._idmap.entries()){let[t,n]=e;jw(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Nw(r,n),sy(a,t,Bw(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=kw({...t,processors:zT});return jw(e,n),Nw(n,e),Bw(n,e)}var BT=new WeakSet([Object.prototype,Error.prototype]);function VT(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 HT=P(`ZodError`,(e,t)=>{Bee.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);BT.has(n)||(BT.add(n),VT(n,`format`,e=>t=>Uee(e,t)),VT(n,`flatten`,e=>t=>Hee(e,t)),VT(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,$v,2)}),VT(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,$v,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),nte=Zy(HT),rte=Qy(HT),ite=$y(HT),UT=tb(HT),ate=sb(HT),ote=cb(HT),ste=lb(HT),cte=ub(HT),lte=db(HT),ute=fb(HT),dte=pb(HT),fte=mb(HT);function pte(){Ky.localeError||qy(gC())}function WT(){Ky.memoizer||qy({memoizer:pC()})}var GT=P(`ZodType`,(e,t)=>(pte(),_x.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(py(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 yy(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(wE(e,t))},superRefine(e,t){return this.check(TE(e,t))},overwrite(e){return this.check(_w(e))},optional(){return lE(this)},exactOptional(){return Qte(this)},nullable(){return dE(this)},nullish(){return lE(dE(this))},nonoptional(e){return tne(this,e)},array(){return L(this)},or(e){return nE([this,e])},and(e){return qte(this,e)},transform(e){return _E(this,Zte(e))},default(e){return fE(this,e)},prefault(e){return mE(this,e)},catch(e){return rne(this,e)},pipe(e){return _E(this,e)},readonly(){return yE(this)},describe(e){let t=this.clone();return bC.add(t,{description:e}),t},meta(...e){if(e.length===0)return bC.get(this);let t=this.clone();return bC.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 Iy(this,`~standard`,{...bx(this),jsonSchema:{input:Uw(this,`input`),output:Uw(this,`output`)}})},set"~standard"(e){Fy(this,`~standard`,e)},parse:function e(t,n){return nte(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await rte(this,t,n,{callee:e})},safeParse(e,t){return ite(this,e,t)},async safeParseAsync(e,t){return UT(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Fy(this,`spa`,e)},validate(e,t){return ib(this,e,t)},validateAsync(e,t){return ob(this,e,t)},encode:function e(t,n){return ate(this,t,n,{callee:e})},decode:function e(t,n){return ote(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await ste(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await cte(this,t,n,{callee:e})},safeEncode(e,t){return lte(this,e,t)},safeDecode(e,t){return ute(this,e,t)},async safeEncodeAsync(e,t){return dte(this,e,t)},async safeDecodeAsync(e,t){return fte(this,e,t)},toJSONSchema(e){return Hw(this,{})(e)},get description(){return bC.get(this)?.description},get _def(){return this._zod.def}}),KT=P(`_ZodString`,(e,t)=>{xx.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aT(e,t,n,r)},Ly({format:e=>tT(e).format??null,minLength:e=>tT(e).minimum??null,maxLength:e=>tT(e).maximum??null},{regex(...e){return this.check(uw(...e))},includes(...e){return this.check(pw(...e))},startsWith(...e){return this.check(mw(...e))},endsWith(...e){return this.check(hw(...e))},min(...e){return this.check(cw(...e))},max(...e){return this.check(sw(...e))},length(...e){return this.check(lw(...e))},nonempty(...e){return this.check(cw(1,...e))},lowercase(e){return this.check(dw(e))},uppercase(e){return this.check(fw(e))},trim(){return this.check(yw())},normalize(...e){return this.check(vw(...e))},toLowerCase(){return this.check(bw())},toUpperCase(){return this.check(xw())},slugify(){return this.check(Sw())}})),mte=P(`ZodString`,(e,t)=>{xx.init(e,t),KT.init(e,t)},{email(e){return this.check(CC(yte,e))},url(e){return this.check(kC(xte,e))},jwt(e){return this.check(WC(Ite,e))},emoji(e){return this.check(AC(Ste,e))},guid(e){return this.check(wC(bte,e))},uuid(e){return this.check(TC(JT,e))},uuidv4(e){return this.check(EC(JT,e))},uuidv6(e){return this.check(DC(JT,e))},uuidv7(e){return this.check(OC(JT,e))},nanoid(e){return this.check(jC(Cte,e))},cuid(e){return this.check(MC(wte,e))},cuid2(e){return this.check(NC(Tte,e))},ulid(e){return this.check(PC(Ete,e))},base64(e){return this.check(VC(Nte,e))},base64url(e){return this.check(HC(Pte,e))},xid(e){return this.check(FC(Dte,e))},ksuid(e){return this.check(IC(Ote,e))},ipv4(e){return this.check(LC(kte,e))},ipv6(e){return this.check(RC(Ate,e))},cidrv4(e){return this.check(zC(jte,e))},cidrv6(e){return this.check(BC(Mte,e))},e164(e){return this.check(UC(Fte,e))},datetime(e){return this.check(GC(hte,e))},date(e){return this.check(KC(gte,e))},time(e){return this.check(qC(_te,e))},duration(e){return this.check(JC(vte,e))}});function F(e){return SC(mte,e)}var qT=P(`ZodStringFormat`,(e,t)=>{Sx.init(e,t),KT.init(e,t)}),hte=P(`ZodISODateTime`,(e,t)=>{Vx.init(e,t),qT.init(e,t)}),gte=P(`ZodISODate`,(e,t)=>{Hx.init(e,t),qT.init(e,t)}),_te=P(`ZodISOTime`,(e,t)=>{Ux.init(e,t),qT.init(e,t)}),vte=P(`ZodISODuration`,(e,t)=>{Wx.init(e,t),qT.init(e,t)}),yte=P(`ZodEmail`,(e,t)=>{Tx.init(e,t),qT.init(e,t)}),bte=P(`ZodGUID`,(e,t)=>{Cx.init(e,t),qT.init(e,t)}),JT=P(`ZodUUID`,(e,t)=>{wx.init(e,t),qT.init(e,t)}),xte=P(`ZodURL`,(e,t)=>{Nx.init(e,t),qT.init(e,t)}),Ste=P(`ZodEmoji`,(e,t)=>{Px.init(e,t),qT.init(e,t)}),Cte=P(`ZodNanoID`,(e,t)=>{Fx.init(e,t),qT.init(e,t)}),wte=P(`ZodCUID`,(e,t)=>{Ix.init(e,t),qT.init(e,t)}),Tte=P(`ZodCUID2`,(e,t)=>{Lx.init(e,t),qT.init(e,t)}),Ete=P(`ZodULID`,(e,t)=>{Rx.init(e,t),qT.init(e,t)}),Dte=P(`ZodXID`,(e,t)=>{zx.init(e,t),qT.init(e,t)}),Ote=P(`ZodKSUID`,(e,t)=>{Bx.init(e,t),qT.init(e,t)}),kte=P(`ZodIPv4`,(e,t)=>{Gx.init(e,t),qT.init(e,t)}),Ate=P(`ZodIPv6`,(e,t)=>{Jx.init(e,t),qT.init(e,t)}),jte=P(`ZodCIDRv4`,(e,t)=>{Yx.init(e,t),qT.init(e,t)}),Mte=P(`ZodCIDRv6`,(e,t)=>{Zx.init(e,t),qT.init(e,t)}),Nte=P(`ZodBase64`,(e,t)=>{eS.init(e,t),qT.init(e,t)}),Pte=P(`ZodBase64URL`,(e,t)=>{rS.init(e,t),qT.init(e,t)}),Fte=P(`ZodE164`,(e,t)=>{iS.init(e,t),qT.init(e,t)}),Ite=P(`ZodJWT`,(e,t)=>{oS.init(e,t),qT.init(e,t)}),YT=P(`ZodNumber`,(e,t)=>{sS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oT(e,t,n,r),e.isFinite=!0},Ly({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=tT(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=tT(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=tT(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>tT(e).format??null},{gt(e,t){return this.check(iw(e,t))},gte(e,t){return this.check(aw(e,t))},min(e,t){return this.check(aw(e,t))},lt(e,t){return this.check(nw(e,t))},lte(e,t){return this.check(rw(e,t))},max(e,t){return this.check(rw(e,t))},int(e){return this.check(XT(e))},safe(e){return this.check(XT(e))},positive(e){return this.check(iw(0,e))},nonnegative(e){return this.check(aw(0,e))},negative(e){return this.check(nw(0,e))},nonpositive(e){return this.check(rw(0,e))},multipleOf(e,t){return this.check(ow(e,t))},step(e,t){return this.check(ow(e,t))},finite(){return this}}));function I(e){return YC(YT,e)}var Lte=P(`ZodNumberFormat`,(e,t)=>{cS.init(e,t),YT.init(e,t)});function XT(e){return ZC(Lte,e)}var Rte=P(`ZodBoolean`,(e,t)=>{lS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sT(e,t,n,r)});function ZT(e){return QC(Rte,e)}var zte=P(`ZodNull`,(e,t)=>{uS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uT(e,t,n,r)});function Bte(e){return $C(zte,e)}var Vte=P(`ZodUnknown`,(e,t)=>{dS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function QT(){return ew(Vte)}var Hte=P(`ZodNever`,(e,t)=>{fS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pT(e,t,n,r)});function $T(e){return tw(Hte,e)}var Ute=P(`ZodArray`,(e,t)=>{WT(),gS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bT(e,t,n,r),e.element=t.element},{min(e,t){return this.check(cw(e,t))},nonempty(e){return this.check(cw(1,e))},max(e,t){return this.check(sw(e,t))},length(e,t){return this.check(lw(e,t))},unwrap(){return this.element}});function L(e,t){return Cw(Ute,e,t)}var eE=P(`ZodObject`,(e,t)=>{WT(),SS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ST(e,t,n,r),Nee(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return oE(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(py(this._zod.def,{catchall:e}))},passthrough(){return this.clone(py(this._zod.def,{catchall:QT()}))},loose(){return this.clone(py(this._zod.def,{catchall:QT()}))},strict(){return this.clone(py(this._zod.def,{catchall:$T()}))},strip(){return this.clone(py(this._zod.def,{catchall:void 0}))},extend(e){return See(this,e)},safeExtend(e){return Cee(this,e)},merge(e){return wee(this,e)},pick(e){return bee(this,e)},omit(e){return xee(this,e)},partial(...e){return Ty(cE,this,e[0])},exactPartial(...e){return Ty(uE,this,e[0],`exactPartial`)},required(...e){return Tee(hE,this,e[0])}});function R(e,t){return new eE({type:`object`,shape:e??{},...by(t)})}function Wte(e,t){return new eE({type:`object`,shape:e,catchall:QT(),...by(t)})}var tE=P(`ZodUnion`,(e,t)=>{wS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CT(e,t,n,r),e.options=t.options});function nE(e,t){return new tE({type:`union`,options:e,...by(t)})}var Gte=P(`ZodDiscriminatedUnion`,(e,t)=>{tE.init(e,t),ES.init(e,t)});function rE(e,t,n){return new Gte({type:`union`,options:t,discriminator:e,...by(n)})}var Kte=P(`ZodIntersection`,(e,t)=>{DS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wT(e,t,n,r)});function qte(e,t){return new Kte({type:`intersection`,left:e,right:t})}var iE=P(`ZodRecord`,(e,t)=>{WT(),AS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DT(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Jte(e,t,n){return!t||!t._zod?new iE({type:`record`,keyType:F(),valueType:e,...by(t)}):new iE({type:`record`,keyType:e,valueType:t,...by(n)})}var aE=P(`ZodEnum`,(e,t)=>{jS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gT(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 aE({...t,checks:[],...by(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 aE({...t,checks:[],...by(r),entries:i})}});function oE(e,t){return new aE({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...by(t)})}var Yte=P(`ZodLiteral`,(e,t)=>{MS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_T(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 sE(e,t){return new Yte({type:`literal`,values:Array.isArray(e)?e:[e],...by(t)})}var Xte=P(`ZodTransform`,(e,t)=>{WT(),NS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yT(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Gy(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Py(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(Py(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zte(e){return new Xte({type:`transform`,transform:e})}var cE=P(`ZodOptional`,(e,t)=>{FS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lE(e){return new cE({type:`optional`,innerType:e})}var uE=P(`ZodExactOptional`,(e,t)=>{IS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qte(e){return new uE({type:`optional`,innerType:e})}var $te=P(`ZodNullable`,(e,t)=>{LS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function dE(e){return new $te({type:`nullable`,innerType:e})}var ene=P(`ZodDefault`,(e,t)=>{RS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fE(e,t){return new ene({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():_y(t)}})}var pE=P(`ZodPrefault`,(e,t)=>{BS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mE(e,t){return new pE({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():_y(t)}})}var hE=P(`ZodNonOptional`,(e,t)=>{VS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tne(e,t){return new hE({type:`nonoptional`,innerType:e,...by(t)})}var nne=P(`ZodCatch`,(e,t)=>{WS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rne(e,t){return new nne({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Fee(t)})}var gE=P(`ZodPipe`,(e,t)=>{GS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FT(e,t,n,r),e.in=t.in,e.out=t.out});function _E(e,t){return new gE({type:`pipe`,in:e,out:t})}var vE=P(`ZodReadonly`,(e,t)=>{qS.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 yE(e){return new vE({type:`readonly`,innerType:e})}var bE=P(`ZodLazy`,(e,t)=>{YS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RT(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function xE(e){return new bE({type:`lazy`,getter:e})}var SE=P(`ZodCustom`,(e,t)=>{XS.init(e,t),GT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vT(e,t,n,r)});function CE(e,t){return ww(SE,e??(()=>!0),t)}function wE(e,t={}){return Tw(SE,e,t)}function TE(e,t){return Ew(e,t)}var EE=P(`ZodInstanceOf`,(e,t)=>{SE.init(e,t)},{properties(e,t){return this.check(gw(e,t))}});function DE(e,t={}){let n=new EE({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...by(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 OE(e){return XC(YT,e)}var kE=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}},AE=10,ine=13,jE=32;function ME(e){}function NE(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=ME,onError:n=ME,onRetry:r=ME,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 kE(`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(PE(e,n,i)){let i=e.charCodeAt(n+5)===jE?n+6:n+5,a=e.slice(i,r);if(d===0&&e.charCodeAt(r+1)===AE){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 FE(e,n,i)?f=e.slice(e.charCodeAt(n+6)===jE?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)===ine&&e.charCodeAt(n)===AE&&n++}return e.slice(n)}function _(e,t,n){if(t===n){y();return}let r=e.charCodeAt(t);if(PE(e,t,r)){let r=e.charCodeAt(t+5)===jE?t+6:t+5,i=e.slice(r,n);u=d===0?i:`${u}
116
+ ${i}`,d++;return}if(FE(e,t,r)){f=e.slice(e.charCodeAt(t+6)===jE?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)===jE?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)===jE?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)===jE?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 kE(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new kE(`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 PE(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 FE(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 IE=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n,maxBufferSize:r}={}){let i;super({start(a){i=NE({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:ane,atob:one}=globalThis;function LE(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 RE=({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 Rv({argument:`separator`,message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${i()}`},zE=RE();function BE(e){return globalThis.Buffer?.isBuffer(e)??!1}var VE=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,HE=/"(?: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 UE(e){let t=JSON.parse(e);return typeof t!=`object`||!t||VE.test(e)===!1&&HE.test(e)===!1?t:WE(t)}function WE(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 GE(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return UE(e)}try{return UE(e)}finally{Error.stackTraceLimit=t}}function KE(e){if(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)){let{additionalProperties:t}=e;e.additionalProperties=t!=null&&typeof t!=`boolean`&&qE(t);let{properties:n}=e;if(n!=null)for(let e of Object.keys(n))n[e]=qE(n[e])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(qE):qE(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(qE)),e.allOf!=null&&(e.allOf=e.allOf.map(qE)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(qE));let{definitions:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=qE(t[e]);return e}function qE(e){return typeof e==`boolean`?e:KE(e)}var JE=Symbol(`Let zodToJsonSchema decide on which parser to use`),YE={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`},XE=e=>typeof e==`string`?{...YE,name:e}:{...YE,...e};function ZE(){return{}}function QE(e,t){let n={type:`array`};return e.type?._def&&e.type?._def?.typeName!==`ZodAny`&&(n.items=wD(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 $E(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 eD(){return{type:`boolean`}}function tD(e,t){return wD(e.type._def,t)}var nD=(e,t)=>wD(e.innerType._def,t);function rD(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(n=>rD(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 iD(e)}}var iD=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 aD(e,t){return{...wD(e.innerType._def,t),default:e.defaultValue()}}function oD(e,t){return t.effectStrategy===`input`?wD(e.schema._def,t):ZE()}function sD(e){return{type:`string`,enum:Array.from(e.values)}}var cD=e=>`type`in e&&e.type===`string`?!1:`allOf`in e;function lD(e,t){let n=[wD(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),wD(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=[];return n.forEach(e=>{if(cD(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 uD(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 dD=void 0,fD={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:()=>(dD===void 0&&(dD=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),dD),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-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]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-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 pD(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`:gD(n,`email`,r.message,t);break;case`format:idn-email`:gD(n,`idn-email`,r.message,t);break;case`pattern:zod`:_D(n,fD.email,r.message,t)}break;case`url`:gD(n,`uri`,r.message,t);break;case`uuid`:gD(n,`uuid`,r.message,t);break;case`regex`:_D(n,r.regex,r.message,t);break;case`cuid`:_D(n,fD.cuid,r.message,t);break;case`cuid2`:_D(n,fD.cuid2,r.message,t);break;case`startsWith`:_D(n,RegExp(`^${mD(r.value,t)}`),r.message,t);break;case`endsWith`:_D(n,RegExp(`${mD(r.value,t)}$`),r.message,t);break;case`datetime`:gD(n,`date-time`,r.message,t);break;case`date`:gD(n,`date`,r.message,t);break;case`time`:gD(n,`time`,r.message,t);break;case`duration`:gD(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`:_D(n,RegExp(mD(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&gD(n,`ipv4`,r.message,t),r.version!==`v4`&&gD(n,`ipv6`,r.message,t);break;case`base64url`:_D(n,fD.base64url,r.message,t);break;case`jwt`:_D(n,fD.jwt,r.message,t);break;case`cidr`:r.version!==`v6`&&_D(n,fD.ipv4Cidr,r.message,t),r.version!==`v4`&&_D(n,fD.ipv6Cidr,r.message,t);break;case`emoji`:_D(n,fD.emoji(),r.message,t);break;case`ulid`:_D(n,fD.ulid,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:gD(n,`binary`,r.message,t);break;case`contentEncoding:base64`:n.contentEncoding=`base64`;break;case`pattern:zod`:_D(n,fD.base64,r.message,t)}break;case`nanoid`:_D(n,fD.nanoid,r.message,t)}return n}function mD(e,t){return t.patternStrategy===`escape`?sne(e):e}var hD=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function sne(e){let t=``;for(let n=0;n<e.length;n++)hD.has(e[n])||(t+=`\\`),t+=e[n];return t}function gD(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 _D(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:vD(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=vD(t,r)}function vD(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 yD(e,t){let n={type:`object`,additionalProperties:wD(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}=pD(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}=tD(e.keyType._def,t);return{...n,propertyNames:i}}return n}function cne(e,t){return t.mapStrategy===`record`?yD(e,t):{type:`array`,maxItems:125,items:{type:`array`,items:[wD(e.keyType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`0`]})||ZE(),wD(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`1`]})||ZE()],minItems:2,maxItems:2}}}function lne(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 une(){return{not:ZE()}}function dne(){return{type:`null`}}var bD={ZodString:`string`,ZodNumber:`number`,ZodBigInt:`integer`,ZodBoolean:`boolean`,ZodNull:`null`};function fne(e,t){let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in bD&&(!e._def.checks||!e._def.checks.length))){let e=n.reduce((e,t)=>{let n=bD[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 pne(e,t)}var pne=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>wD(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 mne(e,t){if([`ZodString`,`ZodNumber`,`ZodBigInt`,`ZodBoolean`,`ZodNull`].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[bD[e.innerType._def.typeName],`null`]};let n=wD(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`0`]});return n&&{anyOf:[n,{type:`null`}]}}function hne(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 gne(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=vne(a),s=wD(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=_ne(e,t);return a!==void 0&&(n.additionalProperties=a),n}function _ne(e,t){if(e.catchall._def.typeName!==`ZodNever`)return wD(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 vne(e){try{return e.isOptional()}catch{return!0}}var yne=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return wD(e.innerType._def,t);let n=wD(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`1`]});return n?{anyOf:[{not:ZE()},n]}:ZE()},bne=(e,t)=>{if(t.pipeStrategy===`input`)return wD(e.in._def,t);if(t.pipeStrategy===`output`)return wD(e.out._def,t);let n=wD(e.in._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]});return{allOf:[n,wD(e.out._def,{...t,currentPath:[...t.currentPath,`allOf`,n?`1`:`0`]})].filter(e=>e!==void 0)}};function xne(e,t){return wD(e.type._def,t)}function Sne(e,t){let n={type:`array`,uniqueItems:!0,items:wD(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 Cne(e,t){return e.rest?{type:`array`,minItems:e.items.length,items:e.items.map((e,n)=>wD(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[]),additionalItems:wD(e.rest._def,{...t,currentPath:[...t.currentPath,`additionalItems`]})}:{type:`array`,minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>wD(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[])}}function wne(){return{not:ZE()}}function Tne(){return ZE()}var xD=(e,t)=>wD(e.innerType._def,t),SD=(e,t,n)=>{switch(t){case`ZodString`:return pD(e,n);case`ZodNumber`:return hne(e);case`ZodObject`:return gne(e,n);case`ZodBigInt`:return $E(e);case`ZodBoolean`:return eD();case`ZodDate`:return rD(e,n);case`ZodUndefined`:return wne();case`ZodNull`:return dne();case`ZodArray`:return QE(e,n);case`ZodUnion`:case`ZodDiscriminatedUnion`:return fne(e,n);case`ZodIntersection`:return lD(e,n);case`ZodTuple`:return Cne(e,n);case`ZodRecord`:return yD(e,n);case`ZodLiteral`:return uD(e);case`ZodEnum`:return sD(e);case`ZodNativeEnum`:return lne(e);case`ZodNullable`:return mne(e,n);case`ZodOptional`:return yne(e,n);case`ZodMap`:return cne(e,n);case`ZodSet`:return Sne(e,n);case`ZodLazy`:return()=>e.getter()._def;case`ZodPromise`:return xne(e,n);case`ZodNaN`:case`ZodNever`:return une();case`ZodEffects`:return oD(e,n);case`ZodAny`:return ZE();case`ZodUnknown`:return Tne();case`ZodDefault`:return aD(e,n);case`ZodBranded`:return tD(e,n);case`ZodReadonly`:return xD(e,n);case`ZodCatch`:return nD(e,n);case`ZodPipeline`:return bne(e,n);case`ZodFunction`:case`ZodVoid`:case`ZodSymbol`:return;default:return(e=>void 0)(t)}},CD=(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 wD(e,t,n=!1){let r=t.seen.get(e);if(t.override){let i=t.override?.(e,t,r,n);if(i!==JE)return i}if(r&&!n){let e=TD(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=SD(e,e.typeName,t),o=typeof a==`function`?wD(a(),t):a;if(o&&ED(e,t,o),t.postProcess){let n=t.postProcess(o,e,t);return i.jsonSchema=o,n}return i.jsonSchema=o,o}var TD=(e,t)=>{switch(t.$refStrategy){case`root`:return{$ref:e.path.join(`/`)};case`relative`:return{$ref:CD(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`),ZE()):t.$refStrategy===`seen`?ZE():void 0}},ED=(e,t,n)=>(e.description&&(n.description=e.description),n),DD=e=>{let t=XE(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}]))}},OD=(e,t)=>{let n=DD(t),r=typeof t==`object`&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:wD(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??ZE()}),{}):void 0,i=typeof t==`string`?t:t?.nameStrategy===`title`?void 0:t?.name,a=wD(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??ZE(),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},kD=Symbol.for(`vercel.ai.schema`);function AD(e){let t;return()=>(t??=e(),t)}function jD(e,{validate:t}={}){return{[kD]:!0,_type:void 0,get jsonSchema(){return typeof e==`function`&&(e=e()),e},validate:t}}function MD(e){return typeof e==`object`&&!!e&&kD in e&&e[kD]===!0&&`jsonSchema`in e&&`validate`in e}function ND(e){return e==null?jD({type:`object`,properties:{},additionalProperties:!1}):MD(e)?e:`~standard`in e?e[`~standard`].vendor===`zod`?zD(e):PD(e):e()}function PD(e){return jD(()=>{if(!FD(e))throw Error(`Standard schema vendor '${e[`~standard`].vendor}' does not support JSON Schema conversion.`);return KE(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 Kv({value:t,cause:n.issues})}}})}function FD(e){return e[`~standard`].jsonSchema!=null}function ID(e,t){let n=t?.useReferences??!1;return jD(()=>OD(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 LD(e,t){let n=t?.useReferences??!1;return jD(()=>KE(tte(e,{target:`draft-7`,io:`input`,reused:n?`ref`:`inline`})),{validate:async t=>{let n=await UT(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function RD(e){return`_zod`in e}function zD(e,t){return RD(e)?LD(e,t):ID(e,t)}async function BD({value:e,schema:t,context:n}){let r=await VD({value:e,schema:t,context:n});if(!r.success)throw Kv.wrap({value:e,cause:r.error,context:n});return r.value}async function VD({value:e,schema:t,context:n}){let r=ND(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:Kv.wrap({value:e,cause:t.error,context:n}),rawValue:e}}catch(t){return{success:!1,error:Kv.wrap({value:e,cause:t,context:n}),rawValue:e}}}async function HD({text:e,schema:t}){try{let n=GE(e);return t==null?{success:!0,value:n,rawValue:n}:await VD({value:n,schema:t})}catch(t){return{success:!1,error:Hv.isInstance(t)?t:new Hv({text:e,cause:t}),rawValue:void 0}}}function UD({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new IE).pipeThrough(new TransformStream({async transform({data:e},n){e!==`[DONE]`&&n.enqueue(await HD({text:e,schema:t}))}}))}async function WD(e){return typeof e==`function`&&(e=e()),e}new TextDecoder;var GD=`AI_InvalidArgumentError`,KD=`vercel.ai.error.${GD}`,qD=Symbol.for(KD),JD=class extends Tv{constructor({parameter:e,value:t,message:n}){super({name:GD,message:`Invalid argument for parameter ${e}: ${n}`}),this[qD]=!0,this.parameter=e,this.value=t}static isInstance(e){return Tv.hasMarker(e,KD)}},YD=`AI_UIMessageStreamError`,XD=`vercel.ai.error.${YD}`,ZD=Symbol.for(XD),QD=class extends Tv{constructor({chunkType:e,chunkId:t,message:n}){super({name:YD,message:n}),this[ZD]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return Tv.hasMarker(e,XD)}};function $D(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?$D(a,i):i}return n}function eO(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 tO(e){if(e===void 0)return{value:void 0,state:`undefined-input`};let t=await HD({text:e});return t.success?{value:t.value,state:`successful-parse`}:(t=await HD({text:eO(e)}),t.success?{value:t.value,state:`repaired-parse`}:{value:void 0,state:`failed-parse`})}RE({prefix:`steer`,size:24}),new TextEncoder,new TextEncoder,RE({prefix:`aitxt`,size:24}),RE({prefix:`call`,size:24}),TransformStream;var z={array:L,boolean:ZT,custom:CE,discriminatedUnion:rE,enum:oE,instanceof:DE,lazy:xE,literal:sE,looseObject:Wte,never:$T,null:Bte,number:I,object:R,record:Jte,string:F,union:nE,unknown:QT},nO=z.lazy(()=>z.union([z.null(),z.string(),z.number(),z.boolean(),z.record(z.string(),nO.optional()),z.array(nO)])),rO=z.record(z.string(),z.record(z.string(),nO.optional())),iO=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:rO.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:rO.optional()})]),startIndex:z.number().int().nonnegative().optional(),endIndex:z.number().int().nonnegative().optional(),citedText:z.string().optional()}),aO=z.record(z.string(),nO.optional()),oO=AD(()=>zD(z.union([z.looseObject({type:z.literal(`text-start`),id:z.string(),providerMetadata:rO.optional()}),z.looseObject({type:z.literal(`text-delta`),id:z.string(),delta:z.string(),providerMetadata:rO.optional()}),z.looseObject({type:z.literal(`text-end`),id:z.string(),citations:z.array(iO).optional(),providerMetadata:rO.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:rO.optional(),toolMetadata:aO.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:rO.optional(),toolMetadata:aO.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:rO.optional(),toolMetadata:aO.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:rO.optional()}),z.looseObject({type:z.literal(`tool-output-available`),toolCallId:z.string(),output:z.unknown(),providerExecuted:z.boolean().optional(),providerMetadata:rO.optional(),toolMetadata:aO.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:rO.optional(),toolMetadata:aO.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:rO.optional()}),z.looseObject({type:z.literal(`reasoning-delta`),id:z.string(),delta:z.string(),providerMetadata:rO.optional()}),z.looseObject({type:z.literal(`reasoning-end`),id:z.string(),providerMetadata:rO.optional()}),z.looseObject({type:z.literal(`custom`),kind:z.string().transform(e=>e),providerMetadata:rO.optional()}),z.looseObject({type:z.literal(`source-url`),sourceId:z.string(),url:z.string(),title:z.string().optional(),providerMetadata:rO.optional()}),z.looseObject({type:z.literal(`source-document`),sourceId:z.string(),mediaType:z.string(),title:z.string(),filename:z.string().optional(),providerMetadata:rO.optional()}),z.looseObject({type:z.literal(`file`),url:z.string(),mediaType:z.string(),providerMetadata:rO.optional()}),z.looseObject({type:z.literal(`reasoning-file`),url:z.string(),mediaType:z.string(),providerMetadata:rO.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 sO(e){return e.type.startsWith(`data-`)}function cO(){return Object.create(null)}function lO(e){return e.type.startsWith(`tool-`)}function uO(e){return e.type===`dynamic-tool`}function dO(e){return lO(e)||uO(e)}function fO(e){return e.type.split(`-`).slice(1).join(`-`)}function pO({lastMessage:e,messageId:t}){let n=e?.role===`assistant`?e:{id:t,metadata:void 0,role:`assistant`,parts:[]},r=cO(),i=n.parts.findLastIndex(e=>e.type===`step-start`),a=0;for(let e of n.parts.slice(i+1)){if(!dO(e))continue;let t=a;lO(e)&&a++,e.state===`input-streaming`&&(r[e.toolCallId]={text:e.rawInput??``,inputEncoding:e.inputEncoding,index:t,toolName:e.type===`dynamic-tool`?e.toolName:fO(e),dynamic:e.type===`dynamic-tool`,title:e.title,toolMetadata:e.toolMetadata})}return{message:n,activeTextParts:cO(),activeReasoningParts:cO(),partialToolCalls:r}}function mO({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(dO)}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(dO(i)&&i.toolCallId===e){t=i;break}}}if(t==null)throw new QD({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(dO).find(t=>t.approval?.id===e);if(t==null)throw new QD({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=>lO(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:$D(r.message.metadata,e);t!=null&&await BD({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 QD({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 QD({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 QD({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 QD({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(lO);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 QD({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 tO(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(dO).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:fO(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:fO(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=cO(),r.activeReasoningParts=cO(),r.partialToolCalls=cO(),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,pO({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(sO(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 BD({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 hO({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 gO(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}RE({prefix:`aitxt`,size:24}),RE({prefix:`call`,size:24}),RE({prefix:`aitxt`,size:24}),RE({prefix:`call`,size:24}),z.record(z.string(),nO.optional()),z.record(z.string(),z.string()),RE({prefix:`call`,size:24}),RE({prefix:`call`,size:24}),new TextEncoder,RE({prefix:`call`,size:24}),RE({prefix:`aiobj`,size:24});var{atob:Ene}=globalThis,_O=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)})}};RE({prefix:`aiobj`,size:24}),RE({prefix:`call`,size:24});var vO=z.union([z.string(),z.instanceof(Uint8Array),z.instanceof(ArrayBuffer),z.custom(BE,{message:`Must be a Buffer`})]),yO=z.record(z.string(),z.string()),bO=z.object({type:z.literal(`text`),text:z.string(),providerOptions:rO.optional()}),xO=z.object({type:z.literal(`image`),image:z.union([vO,z.instanceof(URL),yO]),mediaType:z.string().optional(),providerOptions:rO.optional()}),SO=z.discriminatedUnion(`type`,[z.object({type:z.literal(`data`),data:vO}),z.object({type:z.literal(`url`),url:z.instanceof(URL)}),z.object({type:z.literal(`reference`),reference:yO}),z.object({type:z.literal(`text`),text:z.string()})]),CO=z.discriminatedUnion(`type`,[z.object({type:z.literal(`data`),data:vO}),z.object({type:z.literal(`url`),url:z.instanceof(URL)})]),wO=z.object({type:z.literal(`file`),data:z.union([SO,vO,z.instanceof(URL),yO]),filename:z.string().optional(),mediaType:z.string(),providerOptions:rO.optional()}),TO=z.object({type:z.literal(`reasoning`),text:z.string(),providerOptions:rO.optional()}),EO=z.object({type:z.literal(`custom`),kind:z.string().transform(e=>e),providerOptions:rO.optional()}),DO=z.object({type:z.literal(`reasoning-file`),data:z.union([CO,vO,z.instanceof(URL)]),mediaType:z.string(),providerOptions:rO.optional()}),OO=z.object({type:z.literal(`tool-call`),toolCallId:z.string(),toolName:z.string(),input:z.unknown(),providerOptions:rO.optional(),providerExecuted:z.boolean().optional()}),kO=z.discriminatedUnion(`type`,[z.object({type:z.literal(`text`),value:z.string(),providerOptions:rO.optional()}),z.object({type:z.literal(`json`),value:nO,providerOptions:rO.optional()}),z.object({type:z.literal(`execution-denied`),reason:z.string().optional(),providerOptions:rO.optional()}),z.object({type:z.literal(`error-text`),value:z.string(),providerOptions:rO.optional()}),z.object({type:z.literal(`error-json`),value:nO,providerOptions:rO.optional()}),z.object({type:z.literal(`content`),value:z.array(z.union([z.object({type:z.literal(`text`),text:z.string(),providerOptions:rO.optional()}),z.object({type:z.literal(`file`),data:SO,mediaType:z.string(),filename:z.string().optional(),providerOptions:rO.optional()}),z.object({type:z.literal(`file-data`),data:z.string(),mediaType:z.string(),filename:z.string().optional(),providerOptions:rO.optional()}),z.object({type:z.literal(`file-url`),url:z.string(),mediaType:z.string().optional(),providerOptions:rO.optional()}),z.object({type:z.literal(`file-id`),fileId:z.union([z.string(),z.record(z.string(),z.string())]),providerOptions:rO.optional()}),z.object({type:z.literal(`file-reference`),providerReference:z.record(z.string(),z.string()),providerOptions:rO.optional()}),z.object({type:z.literal(`image-data`),data:z.string(),mediaType:z.string(),providerOptions:rO.optional()}),z.object({type:z.literal(`image-url`),url:z.string(),providerOptions:rO.optional()}),z.object({type:z.literal(`image-file-id`),fileId:z.union([z.string(),z.record(z.string(),z.string())]),providerOptions:rO.optional()}),z.object({type:z.literal(`image-file-reference`),providerReference:z.record(z.string(),z.string()),providerOptions:rO.optional()}),z.object({type:z.literal(`custom`),providerOptions:rO.optional()})]))})]),AO=z.object({type:z.literal(`tool-result`),toolCallId:z.string(),toolName:z.string(),output:kO,providerOptions:rO.optional()}),jO=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()}),MO=z.object({type:z.literal(`tool-approval-response`),approvalId:z.string(),approved:z.boolean(),reason:z.string().optional()}),NO=z.object({role:z.literal(`system`),content:z.string(),providerOptions:rO.optional()}),PO=z.object({role:z.literal(`user`),content:z.union([z.string(),z.array(z.union([bO,xO,wO]))]),providerOptions:rO.optional()}),FO=z.object({role:z.literal(`assistant`),content:z.union([z.string(),z.array(z.union([bO,EO,wO,TO,DO,OO,AO,jO]))]),providerOptions:rO.optional()}),IO=z.object({role:z.literal(`tool`),content:z.array(z.union([AO,MO])),providerOptions:rO.optional()});z.union([NO,PO,FO,IO]),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()}),RE({prefix:`call`,size:24}),RE({prefix:`call`,size:24}),RE({prefix:`call`,size:24});async function LO({response:e,url:t,fallbackMessage:n}){let r=await e.text();return new kv({message:r||n,url:t,requestBodyValues:void 0,statusCode:e.status,responseBody:r})}async function RO(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Xv({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 zO(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 BO=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 WD(this.body),r=await WD(this.headers),i=await WD(this.credentials),a={...LE(r),...LE(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:LE(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 LO({response:d,url:s,fallbackMessage:`Failed to fetch the chat response.`});if(!d.body)throw new Nv({message:`The response body is empty.`});return this.processResponseStream(d.body)}async reconnectToStream(e){let t=await WD(this.body),n=await WD(this.headers),r=await WD(this.credentials),i={...LE(n),...LE(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 JD({parameter:`chatId`,value:e.chatId,message:`Chat IDs must not be "." or ".." when using the default reconnect URL.`});o=zO(this.api,`/${encodeURIComponent(e.chatId)}/stream`)}let s=a?.headers===void 0?i:LE(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 LO({response:l,url:o,fallbackMessage:`Failed to fetch the chat response.`});if(!l.body)throw new Nv({message:`The response body is empty.`});return this.processResponseStream(l.body)}},VO=class extends BO{constructor({resumeStreamIsReplay:e=!0,...t}={}){super(t),this.resumeStreamIsReplay=e}processResponseStream(e){return UD({stream:e,schema:oO}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},HO=class{get id(){return this._id??=this.generateId()}constructor({generateId:e=zE,id:t,transport:n=new VO,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 _O,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=>dO(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 RO(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 JD({parameter:`message.messageId`,value:e.messageId,message:`message with id ${e.messageId} not found`});if(this.state.messages[t].role!==`user`)throw new JD({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 JD({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=>dO(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=>dO(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(!dO(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=>dO(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=gO();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=>dO(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:pO({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 hO({stream:mO({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}))}},UO=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 WO(e,t){return t==null?e:(0,UO.default)(e,t)}function GO(e){return Array.isArray(e)?[...e]:typeof e==`object`&&e&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)?{...e}:e}var KO=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=GO(t.metadata)),n},this[`~registerMessagesCallback`]=(e,t)=>{let n=t?WO(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},qO=class extends HO{#e;constructor({messages:e,...t}){let n=new KO(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}},JO=new WeakMap;function YO({chat:e,state:t}){if(document.visibilityState!==`visible`||t.pendingVisibilityResume!=null)return;let n=()=>JO.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 XO({chat:e,registration:t}){let n=JO.get(e);if(n==null){let t={registrations:new Set};if(JO.set(e,t),n=t,typeof document<`u`){let n=()=>YO({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?.(),JO.delete(e))}}function ZO(e){return{chat:e,messages:e.messages,status:e.status,error:e.error}}function QO(e,t){return e.chat===t.chat&&e.messages===t.messages&&e.status===t.status&&e.error===t.error}function $O({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 VO),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 qO(l),isExternallyManaged:`chat`in r}),[u]);(0,v.useEffect)(()=>{if(!f)return()=>{d.stop()}},[d,f]);let[p,m]=(0,v.useState)(()=>ZO(d));p.chat!==d&&m(ZO(d)),(0,v.useEffect)(()=>{let e=!0,t=()=>{if(!e)return;let t=ZO(d);m(e=>e.chat!==d||QO(e,t)?e:t)},n=[d[`~registerMessagesCallback`](t,i),d[`~registerStatusCallback`](t),d[`~registerErrorCallback`](t)],r=ZO(d);return m(e=>QO(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 XO({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 ek=e=>e!==void 0&&/\s/.test(e),tk=e=>e!==void 0&&e>=`0`&&e<=`9`;function nk(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=rk(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 rk(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]===`$`)&&!(ek(e[t+1])||ek(e[n-1])||tk(e[n+1])))return/`|\n\s*\n/.test(e.slice(t,n))?void 0:n}var ik=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 ak(e,t,n){typeof e==`string`&&nk(e).some(e=>`text`in e&&/\\[a-zA-Z]{2,}/.test(e.text))&&n.addIssue({code:`custom`,path:t,message:ik})}function ok(e,t,n){return e.superRefine((e,r)=>{let i=(e,t,n)=>{if(t.length===0)return ak(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 sk=64,ck=200,lk=4e3;function uk(e){return e.replace(/\r\n?/g,`
120
+ `).replace(/\n$/,``).split(`
121
+ `)}var dk=F().trim().min(1).max(40),fk=nE([I(),F().max(24)]),pk=I().int().nonnegative(),mk=R({name:dk.describe(`Pointer label shown under the cell, e.g. "left", "right", "mid", "i".`),index:pk.describe(`0-based index into the sequence as it is at this step.`)}).strict(),hk=R({start:pk.describe(`0-based start index, inclusive, within the sequence as it is at this step.`),end:pk.describe(`0-based end index, inclusive. Must be >= start and within the sequence.`),label:dk.optional().describe(`Optional label, e.g. "window".`),tone:oE([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished/sorted, muted = ruled out. Defaults to active.`)}).strict(),gk=R({name:dk,value:nE([I(),F().max(80),ZT()])}).strict(),_k=R({language:F().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:F().min(1).max(lk).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=uk(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`})}),vk=R({explanation:F().trim().min(1).max(500).describe(`What happens in this step, in one or two sentences.`),values:L(fk).min(1).max(sk).optional().describe(`The whole sequence after this step. Omit unless the values changed (e.g. a swap); omitted means unchanged.`),pointers:L(mk).max(8).optional().describe(`All pointers to show at this step. Not carried over from earlier steps: repeat any that still apply.`),ranges:L(hk).max(8).optional().describe(`All highlighted ranges at this step. Not carried over from earlier steps.`),variables:L(gk).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(I().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(),yk=R({title:F().trim().min(1).max(120),values:L(fk).min(1).max(sk).describe(`The input sequence before the first step.`),code:_k.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(vk).min(1).max(ck)}).strict().superRefine((e,t)=>{let n=e.values.length,r=e.code?uk(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}`})})})}),bk=oE([`javascript`,`python`]),xk=1e4,Sk=5e4,Ck=1e4,wk=2e4,Tk=2e3,Ek={timeMs:2e3,memoryBytes:67108864,stackBytes:393216,outputChars:wk},Dk=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Ok=/^[A-Za-z_][A-Za-z0-9_]*$/,kk=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(` `)),Ak=ZT().optional().describe(`Hidden from the learner's view until they submit: use for edge cases. At least one case must be visible.`),jk=R({kind:sE(`stdio`),stdin:F().max(Ck).describe('The text the program reads: in JavaScript the global `stdin` string or `readLine()`, in Python input() or sys.stdin. Use "" for none.'),hidden:Ak}).strict(),Mk=R({kind:sE(`call`),args:F().max(Ck).describe(`The arguments to call functionName with, as a JSON array, e.g. "[[3, 1, 2], 2]" or "[]".`),hidden:Ak}).strict(),Dne=rE(`kind`,[jk,Mk]),Nk=nE([R({stdout:F().max(wk)}).strict(),R({returned:F().max(wk)}).strict()]),Pk={concept:F().trim().min(1).max(80).describe(`Short label for the concept being practised, e.g. "array reduce". Used to track progress.`),title:F().trim().min(1).max(120),instructions:F().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:bk,starterCode:F().max(xk).describe(`The code the editor starts with, e.g. the function's signature with an empty body. May be empty.`),functionName:F().regex(Dk).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 One(e,t){e.language===`python`&&e.functionName!==void 0&&(!Ok.test(e.functionName)||kk.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 kne=R({...Pk,cases:L(Dne).min(1).max(20).describe(`1-20 test cases. Keep each fast: every case has a 2 s limit.`),referenceSolution:F().min(1).max(xk).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(One),Ane=rE(`kind`,[jk.extend({expected:Nk}),Mk.extend({expected:Nk})]),jne=R({...Pk,cases:L(Ane).min(1).max(20),referenceSolution:F().max(xk)}).strict(),Mne=rE(`kind`,[R({kind:sE(`stdio`),stdin:F(),hidden:ZT(),expected:Nk.optional()}).strict(),R({kind:sE(`call`),args:F(),hidden:ZT(),expected:Nk.optional()}).strict()]),Nne=R({concept:F(),title:F(),instructions:F(),language:bk,starterCode:F(),functionName:F().optional(),cases:L(Mne)}).strict(),Pne=R({stdout:F().max(wk),stderr:F().max(wk).optional(),returned:F().max(wk).optional(),error:F().max(Tk).optional()}).strict(),Fne=R({code:F().max(Sk),results:L(Pne).min(1).max(20)}).strict(),Ine=R({correct:ZT(),passed:I().int().nonnegative(),total:I().int().positive(),cases:L(R({passed:ZT()}).strict())}).strict();function Fk(e){return e.replace(/\r\n?/g,`
122
+ `).split(`
123
+ `).map(e=>e.replace(/[ \t]+$/,``)).join(`
124
+ `).replace(/\n+$/,``)}function Ik(e){return Array.isArray(e)?e.map(Ik):e&&typeof e==`object`?Object.fromEntries(Object.keys(e).sort().map(t=>[t,Ik(e[t])])):e}function Lne(e,t){if(e===`undefined`||t===`undefined`)return e===t;try{return JSON.stringify(Ik(JSON.parse(e)))===JSON.stringify(Ik(JSON.parse(t)))}catch{return!1}}function Lk(e,t){return t.error===void 0?`stdout`in e?Fk(t.stdout)===Fk(e.stdout):t.returned!==void 0&&Lne(t.returned,e.returned):!1}var Rne=R({explanation:F().trim().min(1).max(500).describe(`What happens at this step and why, in one or two sentences.`),label:F().trim().min(1).max(80).optional().describe(`Optional short name for the step, e.g. "Initial render", "Click handler", "Render 2".`),lines:L(I().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(gk).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:F().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(),Rk=R({title:F().trim().min(1).max(120),code:_k.describe(`The source shown on every step. It stays the same across steps.`),steps:L(Rne).min(1).max(200)}).strict().superRefine((e,t)=>{let n=uk(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)})})}),zk=1e3,Bk=4e3,Vk=F().trim().min(1).max(24),Hk=F().trim().min(1).max(32),zne=oE([`active`,`done`,`muted`]),Uk=L(R({name:Hk.describe(`Literal property name, unique within its list. Not a formula.`),value:nE([I(),ZT(),F().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),Bne=rE(`type`,[R({type:sE(`text`),text:F().trim().min(1).max(280).describe(`A short note. Only $...$ is a formula; no Markdown.`)}).strict(),R({type:sE(`code`),language:Hk.describe(`The language, e.g. "Python" or "bytecode". Shown as a label; any language is accepted.`),code:F().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:sE(`math`),source:F().trim().min(1).max(300).describe(`One display formula as LaTeX, without dollar delimiters.`)}).strict()]),Vne=R({id:Vk.describe(`Unique id, used by each step's placements.`),label:Hk.describe(`The container's name. Only $...$ is a formula.`),ordered:ZT().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(),Hne=R({id:Vk.describe(`Unique id, used by connections and steps.`),label:Hk.describe(`Short name on the card. Only $...$ is a formula.`),properties:Uk.describe("The entity's declared properties, in display order; [] for none. A step shows these unless its `state` replaces them."),body:L(Bne).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 ${zk} characters per entity and ${Bk} over all entities.`)}).strict(),Une=R({id:Vk.describe(`Unique id, listed by each step that shows this connection.`),from:Vk.describe(`Id of the entity that holds the reference.`),to:Vk.describe("Id of the entity it refers to. Must differ from `from`."),label:Hk.optional().describe(`Optional name of the reference, e.g. "next". Only $...$ is a formula.`)}).strict(),Wne=R({label:F().trim().min(1).max(80).optional().describe("Optional literal text for the step, shown in monospace, e.g. the statement `b = a`."),explanation:F().trim().min(1).max(500).describe(`What this step shows and what changed, in one or two sentences.`),placements:L(R({groupId:Vk,entityIds:L(Vk).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(Vk).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(Vk).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:Vk,properties:Uk.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:Vk,tone:zne.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:Vk,text:F().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 Wk(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 Gne=e=>(e.type===`text`?e.text:e.type===`code`?e.code:e.source).length;function Kne(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)=>Wk(e.properties,[`steps`,t,`state`,n,`properties`],r))}var Gk=R({title:F().trim().min(1).max(120),groups:L(Vne).min(1).max(4).describe(`The containers, in reading order. Groups don't nest.`),entities:L(Hne).min(1).max(16).describe(`Everything that is ever shown, declared once. Steps place or hide each one.`),connections:L(Une).max(24).describe(`Every directed reference that is ever shown; [] for none. Two entities may have several, each with its own id.`),steps:L(Wne).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)=>{Wk(e.properties,[`entities`,n,`properties`],t);let r=0;e.body?.forEach((e,i)=>{if(r+=Gne(e),e.type!==`code`)return;let a=[`entities`,n,`body`,i,`code`],o=uk(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 ${zk} are allowed: shorten its blocks`})}),i>4e3&&t.addIssue({code:`custom`,path:[`entities`],message:`the bodies total ${i} characters; at most ${Bk} 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)=>Kne(e,n,o,t))});function Kk(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 qk=e=>e===``?`""`:String(e).replaceAll(`$`,`\\$`);function qne(e,t){let n=Kk(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=Kk(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}: ${qk(e)} changes from ${qk(i.get(e))} to ${qk(a)}.`}):l.push({type:`property_added`,entityId:t,name:e,text:`${n} gains ${qk(e)} = ${qk(a)}.`});for(let{name:r}of e.properties)a.has(r)||l.push({type:`property_removed`,entityId:t,name:r,text:`${n} loses ${qk(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 Jne={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:Gk,input:ok(Gk,[`title`,`groups.*.label`,`entities.*.label`,`entities.*.body.*.text`,`connections.*.label`,`steps.*.explanation`,`steps.*.callouts.*.text`])},Yne=R({id:F(),createdAt:F().datetime(),kind:sE(`composition`),version:sE(1),spec:Gk}).strict(),Xne=R({id:F().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:F().trim().min(1).max(500).describe(`The prompt side: a question, term or cue.`),back:F().trim().min(1).max(1e3).describe(`The answer side, shown when the learner flips the card.`),concept:F().trim().min(1).max(200).optional().describe(`Optional concept the card practises, named as in <learner_concepts>.`)}).strict(),Jk=R({title:F().trim().min(1).max(120),cards:L(Xne).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(),Yk=oE([`again`,`good`,`easy`]);R({rating:Yk}).strict();var Xk=R({cardId:F(),rating:Yk,reviews:I().int().positive(),repetitions:I().int().nonnegative(),intervalDays:I().int().nonnegative(),ease:I().positive(),dueAt:F().datetime(),ratedAt:F().datetime()}).strict(),Zne=R({artifactId:F(),cards:L(Xk)}).strict(),Qne=F().trim().min(1).max(300),Zk=oE([`lessons`,`project`]),$ne=oE([`quick`,`thorough`,`skip`]);R({goal:Qne,kind:Zk.optional(),placementDepth:$ne.optional()}).strict();var Qk=F().trim().min(1).max(80),$k=R({concept:Qk.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:F().trim().min(1).max(1e3),options:L(R({text:F().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:I().int().nonnegative().describe(`0-based index of the single correct option.`),explanation:F().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`})})}),ere=R({concept:F(),question:F(),options:L(R({text:F()}).strict())}).strict(),tre=nE([R({optionIndex:I().int().nonnegative()}).strict(),R({unsure:sE(!0)}).strict(),R({skipped:sE(!0)}).strict()]),nre=R({result:oE([`correct`,`incorrect`,`unsure`,`skipped`]),correctOptionIndex:I().int().nonnegative(),explanation:F()}).strict(),eA=2e3,tA=R({question:F().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(),rre=nE([R({text:F().trim().max(eA)}).strict(),R({skipped:sE(!0)}).strict()]),ire=R({result:oE([`answered`,`skipped`])}).strict(),are=oE([`memory`,`test`,`guess`]),nA=R({title:F().trim().min(1).max(120),summary:F().trim().min(1).max(400).describe(`What the lesson on this topic will cover, in one or two sentences.`),reason:F().trim().min(1).max(300).describe(`Why this topic is here for this learner, e.g. "You missed the question on local minima".`),requestedByLearner:ZT().describe(`True if the learner explicitly asked for this topic. Such topics are never removed automatically.`),concepts:L(Qk).min(1).max(8).describe(`Concept names this topic teaches; reuse names from the learner's record and the placement questions.`)}).strict(),rA=oE(`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(`.`)),iA=R({title:F().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:rA.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(nA).min(1).max(20).describe(`The ordered topics, first to learn first. Each topic gets one lesson.`),known:L(R({concept:Qk,source:are.describe(`memory = from their record or memories; test = from this placement interview; guess = your inference`),note:F().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)})}),aA=nA.extend({id:F()}).strict(),oA=R({version:I().int().positive(),source:oE([`interview`,`tutor`,`adaptive`,`undo`]),reason:F().nullable(),changedTopicIds:L(F()),canUndo:ZT(),topics:L(aA),known:iA.shape.known,createdAt:F().datetime()}).strict(),sA=oE([`interviewing`,`active`,`complete`]),cA=R({id:F(),sessionId:F(),goal:F(),kind:Zk,status:sA,syllabus:oA.nullable(),interviewMessageId:F().nullable(),createdAt:F().datetime()}).strict(),lA=R({id:F(),sessionId:F(),title:F(),icon:rA.nullable(),kind:Zk,status:sA,lessonsFinished:I().int().nonnegative(),topicCount:I().int().nonnegative(),completedAt:F().datetime().nullable()}).strict(),uA=60,dA=200,fA=200,pA=F().trim().min(1).max(24),mA=F().trim().min(1).max(24),hA=oE([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished/visited, muted = ruled out. Defaults to active.`),gA=R({id:pA.describe(`Unique id, used by edges and steps. Shown on the node if it has no label.`),label:mA.optional().describe(`Short text on the node. Only $...$ is a formula, e.g. $v_1$.`)}).strict(),_A=R({from:pA.describe(`Id of a node. In a tree, the parent.`),to:pA.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:oE([`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:I().optional().describe(`Numeric weight shown on the edge. Give a weight or a label, not both.`),label:mA.optional().describe(`Text shown on the edge. Only $...$ is a formula.`)}).strict(),vA=R({id:pA.describe(`Id of a node.`),tone:hA}).strict(),yA=R({from:pA,to:pA,nth:I().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:hA}).strict().describe(`An edge of the graph. In an undirected graph, from and to may be in either order.`),bA=R({explanation:F().trim().min(1).max(500).describe(`What happens in this step, in one or two sentences.`),nodeStates:L(vA).max(uA).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(yA).max(dA).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(gk).max(12).optional().describe(`All running state at this step, e.g. the queue or current distances. Not carried over from earlier steps.`)}).strict(),xA=(e,t,n)=>JSON.stringify(n||e<=t?[e,t]:[t,e]);function SA(e){let t=new Map;return e.edges.forEach((n,r)=>{let i=xA(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(xA(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 CA(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 wA(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=CA(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 TA=R({title:F().trim().min(1).max(120),directed:ZT().describe("True draws arrowheads from `from` to `to`."),kind:oE([`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(gA).min(1).max(uA),edges:L(_A).max(dA).describe(`Self-loops and parallel edges are allowed.`),steps:L(bA).min(1).max(fA).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))&&wA(e,t);let r=SA(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)})})}),EA=R({text:F().trim().min(1).max(300),feedback:F().trim().min(1).max(500).optional().describe(`Shown if the learner picks this option: why it is right or what misconception it reflects.`)}).strict(),DA=R({concept:F().trim().min(1).max(80).describe(`Short label for the concept being checked, e.g. "sliding window invariant". Used to track progress.`),question:F().trim().min(1).max(1e3),options:L(EA).min(2).max(6).describe(`2-6 options with distinct text.`),correctOptionIndex:I().int().nonnegative().describe(`0-based index of the single correct option; must be less than the number of options.`),explanation:F().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}`})})}),OA=R({concept:F(),question:F(),options:L(R({text:F()}).strict())}).strict(),kA=R({optionIndex:I().int().nonnegative()}).strict(),AA=R({correct:ZT(),correctOptionIndex:I().int().nonnegative(),explanation:F(),feedback:F().optional()}).strict(),jA=oE([`tests`,`review`]),MA=oE([`stdout`,`run_output`]),NA=2e4,PA=2e3,FA=6e4,IA=24e4,LA=F().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/),RA=R({name:F().trim().min(1).max(80).describe(`A short name the learner sees, e.g. "empty input" or "nested parentheses".`),input:F().max(Ck).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:MA.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(),zA={concept:F().trim().min(1).max(80).describe(`Short label for what this milestone practises, e.g. "tokenizing". Used to track progress.`),title:F().trim().min(1).max(120),spec:F().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:F().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:jA.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:F().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 BA(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 VA=R({...zA,cases:L(RA).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:F().min(1).max(NA).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(BA),HA=RA.extend({expected:F().max(wk),withdrawn:ZT().optional()}).strict(),UA=2e3,WA=oE([`kept`,`withdrawn`,`corrected`,`upheld`,`overturned`]),GA=R({id:F(),target:oE([`case`,`review`]),caseIndex:I().int().nonnegative().optional(),caseName:F().optional(),reason:F().max(UA),outcome:WA,explanation:F().max(2e3),before:R({input:F(),expected:F()}).strict().optional(),createdAt:F().datetime()}).strict(),KA=R({...zA,cases:L(HA).max(20),referenceSolution:F().max(NA).optional(),disputes:L(GA).max(20).optional()}).strict(),qA=R({concept:F(),title:F(),spec:F(),outputFormat:F(),checkType:jA,reviewFocus:F().optional(),cases:L(R({name:F(),input:F(),compare:MA,expected:F(),withdrawn:ZT().optional()}).strict()),disputes:L(GA)}).strict();R({courseId:F(),lessonId:F(),artifactId:F(),position:I().int().positive(),title:F(),checkType:jA,revision:F().regex(/^[0-9a-f]{8,64}$/),since:LA.nullable(),cases:L(R({name:F(),input:F().max(Ck),compare:MA}).strict()).max(20)}).strict();var JA=oE([`timeout`,`output_limit`,`start_failed`,`no_run_output_command`]),YA=R({stdout:F().max(wk),truncated:ZT().optional(),stderr:F().max(PA).optional(),exitCode:I().int().nullable(),error:JA.optional()}).strict(),XA=R({path:F().min(1).max(500),content:F().max(FA)}).strict(),ZA=oE([`binary`,`too_large`,`size_cap`,`lockfile`]),QA={commit:LA.optional(),source:oE([`git`,`none`]).optional(),files:L(XA).max(200).optional(),skipped:L(R({path:F().max(500),reason:ZA}).strict()).max(1e3).optional(),deleted:L(F().max(500)).max(1e3).optional()};R({results:L(YA).max(20),revision:F().max(64).optional(),...QA}).strict().superRefine((e,t)=>{(e.files??[]).reduce((e,t)=>e+t.content.length,0)>24e4&&t.addIssue({code:`custom`,path:[`files`],message:`At most ${IA} characters of files can be sent.`})});var $A=R({correct:ZT(),passed:I().int().nonnegative(),total:I().int().nonnegative(),cases:L(R({passed:ZT(),case:I().int().nonnegative().optional()}).strict())}).strict(),ej=R({passed:ZT(),note:F().trim().min(1).max(1e3).describe(`One to three sentences for the learner, pointing at the file and the code you mean.`)}).strict(),tj=R({noHardCodedOutputs:ej.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:ej.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:ej.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:F().trim().min(1).max(1500).describe(`What you'd tell the learner: what's good, and what to change if anything.`),suggestions:L(F().trim().min(1).max(500)).max(8).describe(`Optional next steps, most useful first. Never write the solution.`)}).strict().extend({approved:ZT(),judgedBy:sE(`model`),model:F()}).strict(),nj=rE(`status`,[R({status:sE(`done`),review:tj}).strict(),R({status:sE(`skipped`),reason:oE([`tests_failed`,`no_files`])}).strict(),R({status:sE(`failed`),error:F()}).strict()]);R({grade:$A,expected:L(F()),review:nj,passed:ZT()}).strict(),rE(`target`,[R({target:sE(`case`),caseIndex:I().int().nonnegative().max(19),reason:F().trim().min(1).max(UA)}).strict(),R({target:sE(`review`),reason:F().trim().min(1).max(UA)}).strict()]),R({outcome:oE([`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:F().trim().min(1).max(2e3).describe(`For the learner: why, in two or three sentences.`),input:F().max(Ck).optional().describe(`correct only: the case's corrected input, if the input was wrong.`),referenceSolution:F().min(1).max(NA).optional().describe(`correct only: the whole corrected Python reference, if its output was wrong. Mivra reruns it on every case.`)}).strict();var rj=R({results:L(YA),files:L(F()),skipped:L(R({path:F(),reason:ZA}).strict()).optional(),source:oE([`git`,`none`]).optional()}).strict(),ij=3,aj=8,oj=30,sj=40,cj=F().trim().min(1).max(24),lj=/^[^\n\r\v\f\u0085\u2028\u2029]*$/,uj=e=>F().trim().min(1).max(e).regex(lj,`must not contain line breaks`),dj=nE([I(),uj(24)]);function fj(e){return JSON.stringify([...e].sort())}var pj=L(cj).max(ij),mj=R({id:cj.describe(`Short id used to refer to this set, e.g. "a". Unique within the diagram.`),label:uj(32).describe(`Shown next to the circle, e.g. "$A$" or "Multiples of 3", on one line. Only $...$ is a formula.`)}).strict(),hj=R({in:pj.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(dj).max(oj).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:I().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(),gj=R({in:pj.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:oE([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished, muted = ruled out. Defaults to active.`)}).strict(),_j=R({explanation:F().trim().min(1).max(500).describe(`What this step shows, in one or two sentences.`),highlights:L(gj).max(aj).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(gk).max(12).optional().describe(`All running state at this step, e.g. |A ∪ B| so far. Not carried over from earlier steps.`)}).strict(),vj=R({title:F().trim().min(1).max(120),sets:L(mj).min(1).max(ij).describe(`The circles, 1 to 3.`),universe:uj(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(hj).max(aj).describe(`What each region contains, each region at most once.`),steps:L(_j).min(1).max(sj).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=fj(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`})})}),yj=16,bj=64,xj=100,Sj=F().trim().min(1).max(80),Cj=nE([I(),ZT(),F().max(120)]),wj=I().int().nonnegative(),Tj=R({row:wj.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:wj.optional().describe(`0-based data column, below the number of columns. With no row, highlights the whole column. With both, highlights one cell.`),tone:oE([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished, muted = ruled out. Defaults to active. Where highlights overlap, the later one wins.`)}).strict(),Ej=R({row:wj.describe(`0-based data row, below the number of rows.`),column:wj.describe(`0-based data column, below the number of columns.`),value:Cj.describe(`The cell's value from this step on.`)}).strict(),Dj=R({explanation:F().trim().min(1).max(500).describe(`What happens in this step, in one or two sentences.`),highlight:L(Tj).max(32).optional().describe(`All cells, rows and columns to highlight at this step. Not carried over from earlier steps.`),cells:L(Ej).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(),Oj=R({title:F().trim().min(1).max(120),columns:L(Sj).min(1).max(yj).describe(`Column headers, one per data column. Don't include a header for rowHeaders.`),rows:L(L(Cj).min(1).max(yj)).min(1).max(bj).describe(`Data rows, each with exactly one cell per column. A boolean shows as T or F; "" is a blank cell.`),rowHeaders:L(Sj).max(bj).optional().describe(`Optional label for each row, e.g. a relation matrix's elements. Exactly one per row.`),steps:L(Dj).min(1).max(xj).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`])})})}),kj=50,Aj=R({label:F().trim().min(1).max(40).optional().describe(`Optional heading for this part of the working, e.g. "Base case", "Inductive step".`),statement:F().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:F().trim().min(1).max(500).describe(`Why it follows, e.g. "by the inductive hypothesis".`)}).strict(),jj=R({title:F().trim().min(1).max(120),goal:F().trim().min(1).max(500).optional().describe(`Optional statement of what is being shown, e.g. the claim to prove.`),steps:L(Aj).min(1).max(kj)}).strict(),Mj=`[A-Za-z0-9-]{1,64}`,Nj=`doc:${Mj}:p[1-9]\\d{0,5}|note:${Mj}:[0-9a-f]{8}`;RegExp(`^(?:${Nj})$`);var Pj=RegExp(`\\[cite:(${Nj})\\]`,`g`),Fj=/[ \t]*\[cite:[^\]\n]{0,200}\]/g;function Ij(e){return[...new Set([...e.matchAll(Pj)].map(e=>e[1]))]}R({refs:L(F().max(200)).min(1).max(50)});var Lj=R({citations:L(R({ref:F(),status:oE([`ok`,`changed`,`missing`,`invalid`]),kind:oE([`doc`,`note`]).optional(),source:F().optional(),locator:F().optional(),text:F().optional()}))}),Rj=`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 == "${Rj}":
183
+ line = error.lineno
184
+ for frame, lineno in _mivra_traceback.walk_tb(error.__traceback__):
185
+ if frame.f_code.co_filename == "${Rj}":
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, "${Rj}", "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 zj=oE([`prose`,`algorithm_trace`,`code_exercise`,`code_walkthrough`,`composition`,`flashcard_deck`,`graph`,`multiple_choice`,`project_milestone`,`set_diagram`,`table`,`worked_steps`]),Bj=R({title:F().trim().min(1).max(120),sections:L(R({title:F().trim().min(1).max(120),kind:zj.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:F().trim().min(1).max(300).describe(`What this section does for the learner, in one sentence.`)}).strict()).min(2).max(10)}).strict();Bj.extend({sections:Bj.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`})})}),Bj.extend({sections:Bj.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:F().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(F().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 Vj=oE([`generating`,`ready`,`failed`,`finished`]),Hj=R({title:F(),sections:L(R({title:F(),kind:zj}).strict())}).strict(),Uj=R({id:F(),courseId:F(),topicId:F(),topicTitle:F(),position:I().int().nonnegative(),status:Vj,version:I().int().positive().nullable(),outline:Hj.nullable(),sections:L(rE(`kind`,[R({id:F(),title:F(),kind:sE(`prose`),markdown:F(),revisits:L(R({lessonId:F(),sectionId:F(),title:F(),lessonTitle:F()}).strict())}).strict(),R({id:F(),title:F(),kind:sE(`artifact`),artifact:QT()}).strict()])),checks:R({total:I().int().nonnegative(),answered:I().int().nonnegative()}).strict(),syllabusVersion:I().int().positive().nullable(),changedSectionIds:L(F()),changeReason:F().nullable(),canFinish:ZT(),error:F().nullable(),errorAction:oE([`lesson-model`]).nullable(),createdAt:F().datetime(),finishedAt:F().datetime().nullable()}).strict(),Wj=R({topics:L(R({topicId:F(),title:F(),lesson:R({id:F(),status:Vj}).strict().nullable()}).strict()),currentLessonId:F().nullable(),nextTopicId:F().nullable()}).strict(),Gj=F().trim().min(1).max(120),Kj=F().trim().min(1).max(6e3),qj=F().trim().min(1).max(300);R({reason:qj.describe(`What the learner asked for, in a few words, e.g. "Simpler intro with an example".`),operations:L(rE(`op`,[R({op:sE(`rewrite`),sectionId:F().min(1),markdown:Kj,title:Gj.optional()}).strict().describe(`Replace a prose section's text (and optionally its title).`),R({op:sE(`insert`),afterSectionId:F().min(1).nullable(),title:Gj,markdown:Kj}).strict().describe(`Add a prose section after the given section, or first if null.`),R({op:sE(`insert_artifact`),afterSectionId:F().min(1).nullable(),title:Gj,artifactId:F().min(1)}).strict().describe(`Add a card you created earlier in this reply (its artifactId) as a section.`),R({op:sE(`remove`),sectionId:F().min(1)}).strict(),R({op:sE(`move`),sectionId:F().min(1),afterSectionId:F().min(1).nullable()}).strict()])).min(1).max(10)}).strict(),R({reason:qj.describe(`What the learner asked for, e.g. "Add a topic on vectors before gradients".`),operations:L(rE(`op`,[R({op:sE(`insert`),afterTopicId:F().min(1).nullable().describe(`Insert after this topic; null to insert before the first future topic.`),title:Gj,summary:F().trim().min(1).max(400),reason:qj,concepts:L(F().trim().min(1).max(80)).min(1).max(8)}).strict(),R({op:sE(`edit`),topicId:F().min(1),title:Gj.optional(),summary:F().trim().min(1).max(400).optional()}).strict(),R({op:sE(`remove`),topicId:F().min(1)}).strict(),R({op:sE(`move`),topicId:F().min(1),afterTopicId:F().min(1).nullable()}).strict()])).min(1).max(10)}).strict(),R({messageId:F().min(1).max(128),afterSectionId:F().min(1).max(128).nullable(),title:Gj}).strict();var Jj=R({title:Gj,summary:F().trim().min(1).max(400),concepts:L(F().trim().min(1).max(80)).min(1).max(8)}).strict();R({reason:qj.describe(`Shown to the learner, with the evidence, e.g. "Added a chain rule refresher: you missed 3 of 4 checks on derivatives".`),operation:rE(`op`,[Jj.extend({op:sE(`insert`),afterTopicId:F().min(1).nullable().describe(`null = straight after this lesson's topic`)}).strict(),R({op:sE(`split`),topicId:F().min(1),into:L(Jj).min(2).max(3)}).strict(),R({op:sE(`move`),topicId:F().min(1),afterTopicId:F().min(1).nullable()}).strict()])}).strict();var Yj=oE([`missed`,`unsure`,`retention`]),Xj=R({concept:F(),reason:Yj,lastAttemptAt:F().datetime(),streak:I().int().nonnegative(),intervalDays:I().int().nonnegative(),dueAt:F().datetime(),overdueDays:I().int().nonnegative(),course:R({id:F(),title:F()}).strict().nullable()}).strict(),Zj=oE([`focus`,`unsure`,`not_started`]),Qj=R({concept:F(),prerequisite:F(),prerequisiteStatus:Zj}).strict(),$j=R({items:L(Xj),total:I().int().nonnegative(),asOf:F().datetime(),truncated:ZT().optional(),recommendations:L(Qj).max(5).optional()}).strict();R({concepts:L(F().trim().min(1).max(200)).min(1).max(5).optional()}).strict(),R({prerequisite:F().trim().min(1).max(200),concept:F().trim().min(1).max(200)}).strict();var eM=oE([`goal`,`preference`,`misconception`,`known`]),tM=oE([`goal`,`preference`,`misconception`]),nM=F().trim().min(1).max(300);R({kind:tM.describe(`goal = what they want to learn or do; preference = how they like to learn; misconception = something they believe that is wrong.`),text:nM.describe(`One short sentence about the learner. Never include the answer to a check they haven't answered.`),concept:F().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:F().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 rM=oE([`wrong_answer`,`chat`,`import`]),iM=R({id:F(),kind:eM,held:ZT(),text:F().nullable(),concept:F().nullable(),basis:rM.nullable(),source:R({noteId:F(),importId:F(),importName:F(),path:F(),title:F()}).strict().nullable(),createdAt:F().datetime(),editedAt:F().datetime().nullable()}).strict();R({text:nM}).strict(),R({basis:sE(`import`)}).strict();var aM=26214400,oM=5e5,sM=oE([`pdf`,`pptx`,`text`,`markdown`]),cM=R({id:F(),sessionId:F(),messageId:F().nullable(),filename:F(),kind:sM,byteSize:I().int(),pageCount:I().int(),pagesWithText:I().int(),status:sE(`ready`),createdAt:F().datetime()}),lM=R({id:F(),filename:F(),kind:sM,byteSize:I().int(),textChars:I().int(),pageCount:I().int(),pagesWithText:I().int(),status:sE(`ready`),attachmentCount:I().int(),createdAt:F().datetime()}),uM=F().regex(/^n\d{1,3}$/),dM=F().trim().min(1).max(80),fM=oE([`prerequisite`,`related`]);R({from:dM.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:dM.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:fM.describe("prerequisite = `from` must be understood before `to`; related = the two concepts are closely linked.")}).strict(),R({concepts:L(R({name:dM.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(uM).min(1).max(20).describe(`The refs of the notes that cover it.`)}).strict()).max(30),edges:L(R({from:dM,to:dM,kind:fM.describe(`prerequisite = from must be understood before to; related = they're closely linked.`),note:uM.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:oE([`known`,`goal`,`misconception`]).describe(`known = the notes cover this concept; goal = a goal the notes state; misconception = a wrong belief the notes state.`),text:nM.describe(`One short sentence about the learner.`),concept:dM.optional().describe(`Required for known and misconception: a concept named in this call or in <existing_concepts>.`),note:uM.describe(`The ref of the note it comes from.`)}).strict()).max(30)}).strict();var pM=R({status:oE([`idle`,`queued`,`running`,`cancelled`,`failed`]),pendingNotes:I().int(),groups:I().int(),groupsDone:I().int(),error:F().nullable(),concepts:I().int(),memories:I().int(),conceptsSkipped:I().int().optional()}).strict();R({concepts:L(R({id:F(),name:F(),notes:L(F()),fromSessions:ZT().optional()}).strict()),edges:L(R({from:F(),to:F(),kind:fM,notes:L(F()),fromSessions:ZT().optional()}).strict())}).strict();var mM=R({id:F(),name:F()}).strict(),hM=R({status:oE([`strength`,`focus`,`practicing`,`unsure`,`not_started`]),attempts:I().int(),correct:I().int(),incorrect:I().int(),unsure:I().int(),modelJudged:I().int(),modelApproved:I().int()}).strict(),gM=hM.extend({concept:F(),lastResult:oE([`correct`,`incorrect`,`unsure`]).nullable(),lastSeen:F().nullable(),topics:L(F()).optional()}).strict(),_M=R({scope:oE([`global`,`course`]),courseId:F().optional(),evidence:R({attempts:I().int(),graded:I().int(),modelJudged:I().int(),unsure:I().int(),recent:I().int(),recentDays:I().int()}).strict(),truncated:ZT(),strengths:L(gM),focus:L(gM),practicing:L(gM),unsure:L(gM),notStarted:L(gM)}).strict(),vM=1e4,yM=1e6,bM=67108864,xM=L(R({path:F().min(1).max(512),text:F().max(yM)}).strict()).max(vM);R({name:F().trim().min(1).max(120),files:xM}).strict(),R({files:xM}).strict();var SM=R({id:F(),name:F(),source:sE(`obsidian`),noteCount:I().int(),createdAt:F().datetime(),updatedAt:F().datetime(),distillation:pM}).strict(),CM=oE([`not_markdown`,`hidden`,`bad_path`,`duplicate`,`too_long`,`symlink`,`generated`]),wM=R({import:SM,added:I().int(),updated:I().int(),removed:I().int(),unchanged:I().int(),skippedCount:I().int(),skipped:L(R({path:F(),reason:CM}).strict()),truncated:ZT()}).strict(),TM=R({id:F(),importId:F(),path:F(),title:F(),aliases:L(F()),tags:L(F()),body:F(),updatedAt:F().datetime()}).strict();R({notes:L(R({id:F(),path:F(),title:F(),tags:L(F())}).strict()),links:L(R({from:F(),to:F().nullable(),target:F(),kind:oE([`link`,`embed`])}).strict())}).strict(),R({mode:oE([`auto`,`local`]).default(`auto`),focus:F().max(64).optional(),depth:OE().int().min(1).max(3).default(2),tag:F().max(200).optional(),folder:F().max(512).optional()}).strict(),R({mode:oE([`auto`,`local`]).default(`auto`),focus:F().max(80).optional(),depth:OE().int().min(1).max(3).default(2)}).strict();var EM=oE([`note`,`ghost`,`tag`,`concept`]),DM=oE([`link`,`tag`,`concept`,`prerequisite`,`related`]),OM=R({mode:oE([`whole`,`local`]),focus:F().nullable(),depth:I().int(),totalNotes:I().int(),matchingNotes:I().int(),totalConcepts:I().int().optional(),truncated:ZT(),nodes:L(R({id:F(),kind:EM,label:F(),path:F().optional(),notes:I().int().optional(),hops:I().int().optional(),fromSessions:ZT().optional(),mastery:hM.optional()}).strict()),edges:L(R({from:F(),to:F(),kind:DM,fromSessions:ZT().optional()}).strict()),tags:L(R({name:F(),notes:I().int()}).strict()),folders:L(R({path:F(),notes:I().int()}).strict())}).strict(),kM=R({id:F(),title:F(),path:F()}).strict(),AM={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:yk,input:ok(yk,[`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:jne,input:ok(kne,[`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:Rk,input:ok(Rk,[`title`,`steps.*.explanation`])},composition:Jne,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:Jk,input:ok(Jk,[`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:TA,input:ok(TA,[`title`,`nodes.*.label`,`edges.*.label`,`steps.*.explanation`],(e,t)=>{e.nodes.forEach((e,n)=>{e.label===void 0&&ak(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:tA,input:ok(tA,[`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:DA,input:ok(DA,[`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:$k,input:ok($k,[`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:KA,input:ok(VA,[`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:vj,input:ok(vj,[`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:Oj,input:ok(Oj,[`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:jj,input:ok(jj,[`title`,`goal`,`steps.*.label`,`steps.*.statement`,`steps.*.justification`])}};oE(Object.keys(AM));var jM={id:F(),createdAt:F().datetime()},MM=R({answer:kA,grade:AA,createdAt:F().datetime()}).strict(),NM=R({answer:Fne,grade:Ine,createdAt:F().datetime()}).strict(),PM=R({answer:rre,grade:ire,createdAt:F().datetime()}).strict(),FM=R({answer:rj,grade:$A,createdAt:F().datetime()}).strict(),IM=R({review:tj,createdAt:F().datetime()}).strict(),LM=R({answer:tre,grade:nre,createdAt:F().datetime()}).strict(),RM=rE(`kind`,[R({...jM,kind:sE(`algorithm_trace`),version:sE(1),spec:yk}).strict(),R({...jM,kind:sE(`code_exercise`),version:sE(1),spec:Nne,latestAttempt:NM.optional()}).strict(),R({...jM,kind:sE(`code_walkthrough`),version:sE(1),spec:Rk}).strict(),Yne,R({...jM,kind:sE(`flashcard_deck`),version:sE(1),spec:Jk}).strict(),R({...jM,kind:sE(`graph`),version:sE(1),spec:TA}).strict(),R({...jM,kind:sE(`interview_context`),version:sE(1),spec:tA,latestAttempt:PM.optional()}).strict(),R({...jM,kind:sE(`multiple_choice`),version:sE(1),spec:OA,latestAttempt:MM.optional()}).strict(),R({...jM,kind:sE(`placement_question`),version:sE(1),spec:ere,latestAttempt:LM.optional()}).strict(),R({...jM,kind:sE(`project_milestone`),version:sE(1),spec:qA,latestAttempt:FM.optional(),latestReview:IM.optional(),passed:ZT().optional()}).strict(),R({...jM,kind:sE(`set_diagram`),version:sE(1),spec:vj}).strict(),R({...jM,kind:sE(`table`),version:sE(1),spec:Oj}).strict(),R({...jM,kind:sE(`worked_steps`),version:sE(1),spec:jj}).strict()]),zM=`https://chatgpt.com/settings/usage`,BM=(e,t)=>(e=e.replace(/\/+$/,``),e+=`/`,t=t.replace(/^\/+/,``),e+t),VM=(e,t)=>{for(let[n,r]of Object.entries(t)){let t=RegExp(`/:`+n+`(?:{[^/]+})?\\??(?=/|$)`);e=e.replace(t,()=>r?`/${r}`:``)}return e},HM=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`)}},WM=e=>/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(e)?e.replace(/\/index(?=\?|$)/,`/`):e.replace(/\/index(?=\?|$)/,``);function GM(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function KM(e,t){if(!GM(e)&&!GM(t))return t;let n={...e};for(let e in t){let r=t[e];n[e]=GM(n[e])&&GM(r)?KM(n[e],r):r}return n}var qM=/^[\w!#$%&'*.^`|~+-]+$/,JM=(e,t,n={})=>{if(!qM.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},YM=(e,t,n)=>(t=encodeURIComponent(t),JM(e,t,n)),XM=(e,t)=>new Proxy(()=>{},{get(n,r){if(typeof r==`string`&&r!==`then`)return XM(e,[...t,r])},apply(n,r,i){return e({path:t,args:i})}}),ZM=(e,t)=>{let n=t.toString();return n?`${e}?${n}`:e},QM=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(YM(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=WM(a),a=VM(a,this.pathParams),this.queryParams&&(a=ZM(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})}},$M=(e,t)=>XM(function n(r){let i=t?.buildSearchParams??HM,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=BM(e,a.join(`/`));if(s===`url`||s===`path`){let t=WM(c);return r.args[0]&&(r.args[0].param&&(t=VM(t,r.args[0].param)),r.args[0].query&&(t=ZM(t,i(r.args[0].query)))),s===`url`?new URL(t):t.slice(e.replace(/\/+$/,``).length).replace(/^\/?/,`/`)}if(s===`ws`){let e=WM(c),n=UM(r.args[0]?.param?VM(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 QM(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=KM(t,e);return l.fetch(r.args[0],a)}return l},[]),eN=document.querySelector(`meta[name="mivra-token"]`)?.content??``,tN={Authorization:`Bearer ${eN}`},nN=$M(window.location.origin,{headers:tN}).api;async function rN(e){try{let t=await e.json();if(t.error)return t.error}catch{}return`${e.status} ${e.statusText}`}var iN=(e,t)=>cN(e,{optionIndex:t}),aN=(e,t)=>cN(e,t),oN=(e,t)=>cN(e,t),sN=(e,t)=>cN(e,t);async function cN(e,t){try{let n=await nN.artifacts[`:id`].attempts.$post({param:{id:e},json:{answer:t}});if(!n.ok)return{ok:!1,error:await rN(n)};let r=RM.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 lN(e,t){try{let n=await nN.artifacts[`:id`].disputes.$post({param:{id:e},json:t});if(!n.ok)return{ok:!1,error:await rN(n)};let r=RM.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 uN(e){try{let t=await nN.sessions[`:id`].messages.$get({param:{id:e}});return t.ok?{ok:!0,messages:await t.json()}:{ok:!1,error:await rN(t)}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}async function dN(e,t){try{let n=await e();return n.ok?{ok:!0,value:await t(n)}:{ok:!1,error:await rN(n)}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}var fN=()=>dN(()=>nN.sessions.$post({json:{}}),async e=>await e.json()),pN=()=>dN(()=>nN.memories.$get(),async e=>iM.array().parse(await e.json())),mN=()=>dN(()=>nN.mastery.$get(),async e=>_M.parse(await e.json())),hN=()=>dN(()=>nN.review.due.$get(),async e=>$j.parse(await e.json())),gN=e=>dN(()=>nN.review.start.$post({json:e?{concepts:e}:{}}),async e=>{let t=await e.json();return{session:t.session,concepts:Xj.array().parse(t.concepts),message:t.message}}),_N=(e,t)=>dN(()=>nN.review.drill.$post({json:{prerequisite:e,concept:t}}),async e=>{let t=await e.json();return{session:t.session,message:t.message}}),vN=e=>dN(()=>nN.artifacts[`:id`].flashcards.$get({param:{id:e}}),async e=>Zne.parse(await e.json())),yN=(e,t,n)=>dN(()=>nN.artifacts[`:id`].flashcards[`:cardId`].ratings.$post({param:{id:e,cardId:t},json:{rating:n}}),async e=>Xk.parse(await e.json())),bN=e=>dN(()=>nN.courses[`:id`].mastery.$get({param:{id:e}}),async e=>_M.parse(await e.json())),xN=()=>dN(()=>nN.courses.$get(),async e=>lA.array().parse(await e.json())),SN=(e,t)=>dN(()=>nN.memories[`:id`].$patch({param:{id:e},json:{text:t}}),async e=>iM.parse(await e.json())),CN=e=>dN(()=>nN.memories[`:id`].$delete({param:{id:e}}),()=>void 0),wN=()=>dN(()=>nN.memories.$delete({query:{basis:`import`}}),async e=>(await e.json()).deleted),TN=e=>dN(()=>nN.sessions[`:id`].documents.$get({param:{id:e}}),async e=>cM.array().parse(await e.json())),EN=(e,t)=>{let n=new FormData;return n.append(`file`,t),dN(()=>fetch(`/api/sessions/${e}/documents`,{method:`POST`,headers:tN,body:n}),async e=>cM.parse(await e.json()))},DN=e=>dN(()=>nN.citations.resolve.$post({json:{refs:e}}),async e=>Lj.parse(await e.json()).citations),ON=()=>dN(()=>nN.sources.$get(),async e=>lM.array().parse(await e.json())),kN=e=>dN(()=>nN.sources.text.$post({json:e}),async e=>lM.parse(await e.json())),AN=e=>dN(()=>nN.sources[`:id`].$delete({param:{id:e}}),()=>void 0),jN=(e,t)=>dN(()=>nN.sessions[`:id`].documents.text.$post({param:{id:e},json:t}),async e=>cM.parse(await e.json())),MN=(e,t)=>dN(()=>nN.sessions[`:id`].documents.attach.$post({param:{id:e},json:{documentId:t}}),async e=>cM.parse(await e.json())),NN=(e,t)=>dN(()=>nN.sessions[`:id`].documents[`:documentId`].$delete({param:{id:e,documentId:t}}),()=>void 0),PN=()=>dN(()=>nN.imports.$get(),async e=>SM.array().parse(await e.json())),FN=e=>dN(()=>nN.imports[`:id`].$delete({param:{id:e}}),()=>void 0),IN=e=>dN(()=>nN.imports[`:id`].distillation.$post({param:{id:e}}),async e=>pM.parse(await e.json())),LN=e=>dN(()=>nN.imports[`:id`].distillation.$delete({param:{id:e}}),async e=>pM.parse(await e.json())),RN=(e,{mode:t,focus:n,depth:r,tag:i,folder:a})=>dN(()=>nN.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=>OM.parse(await e.json())),zN=({mode:e,focus:t,depth:n})=>dN(()=>nN.concepts.graph.view.$get({query:{mode:e,depth:String(n),...t?{focus:t}:{}}}),async e=>OM.parse(await e.json())),BN=e=>dN(()=>nN.concepts.search.$get({query:{q:e}}),async e=>mM.array().parse(await e.json())),VN=e=>dN(()=>nN.concepts[`:id`].$delete({param:{id:e}}),async e=>await e.json()),HN=e=>dN(()=>nN.concepts.edges.$delete({query:e}),async e=>await e.json()),UN=(e,t)=>dN(()=>nN.imports[`:id`].notes.$get({param:{id:e},query:{q:t}}),async e=>kM.array().parse(await e.json())),WN=e=>dN(()=>nN.notes[`:id`].$get({param:{id:e}}),async e=>TM.parse(await e.json())),GN=`These notes come to more than ${bM/1048576} MB, more than one import can take.`,KN=(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:GN}):dN(()=>`importId`in e?fetch(`/api/imports/${encodeURIComponent(e.importId)}/files`,{method:`PUT`,headers:{...tN,"content-type":`application/json`},body:n}):fetch(`/api/imports`,{method:`POST`,headers:{...tN,"content-type":`application/json`},body:n}),async e=>wM.parse(await e.json()))},qN=(e,t)=>{if(t.size>67108864)return Promise.resolve({ok:!1,error:`This zip is over the ${bM/1048576} MB limit.`});let n=new FormData;return`name`in e&&n.append(`name`,e.name),n.append(`file`,t),dN(()=>`importId`in e?fetch(`/api/imports/${encodeURIComponent(e.importId)}/zip`,{method:`PUT`,headers:tN,body:n}):fetch(`/api/imports/zip`,{method:`POST`,headers:tN,body:n}),async e=>wM.parse(await e.json()))},JN=(e,t=`lessons`,n=`quick`)=>dN(()=>nN.courses.$post({json:{goal:e,kind:t,placementDepth:n}}),async e=>{let t=await e.json();return{course:cA.parse(t.course),session:t.session}}),YN=e=>dN(()=>nN.sessions[`:id`].course.$get({param:{id:e}}),async e=>cA.parse(await e.json())),XN=e=>dN(()=>nN.courses[`:id`].lessons.$get({param:{id:e}}),async e=>Wj.parse(await e.json())),ZN=async e=>{let t=await e.json();return{lesson:Uj.parse(t.lesson),revision:t.revision}},QN=(e,t)=>dN(()=>nN.courses[`:id`].lessons.$post({param:{id:e},json:{topicId:t}}),ZN),$N=(e,t,n)=>dN(()=>nN.lessons[`:id`].$get({param:{id:e},query:t?{after:t}:{}},{init:{signal:n}}),ZN),eP=e=>dN(()=>nN.lessons[`:id`].finish.$post({param:{id:e}}),ZN),tP=e=>dN(()=>nN.lessons[`:id`].retry.$post({param:{id:e}}),ZN),nP=(e,t)=>dN(()=>nN.lessons[`:id`].sections.$post({param:{id:e},json:t}),ZN),rP=(e,t)=>dN(()=>nN.courses[`:id`].syllabus.undo.$post({param:{id:e},json:{version:t}}),async e=>cA.parse(await e.json())),iP=()=>dN(()=>nN.models.$get(),async e=>await e.json()),aP=e=>dN(()=>nN.settings.model.$put({json:e}),async e=>await e.json()),oP=e=>dN(()=>nN.settings[`pinned-models`].$put({json:{models:e}}),async e=>(await e.json()).pinned),sP=()=>dN(()=>nN.settings.tasks.$get(),async e=>(await e.json()).tasks),cP=(e,t)=>dN(()=>nN.settings.tasks[`:task`].$put({param:{task:e},json:t}),async e=>await e.json()),lP=e=>dN(()=>nN.settings.tasks[`:task`].$delete({param:{task:e}}),async e=>await e.json()),uP=e=>dN(()=>nN.usage.$get({query:{...e?{from:e.toISOString()}:{},tz:String(new Date().getTimezoneOffset())}}),async e=>await e.json()),dP=()=>dN(()=>nN.usage.$delete(),async e=>await e.json()),fP=(e,t)=>dN(()=>nN.usage.prices.$put({json:{model:e,price:t}}),async e=>await e.json()),pP=`mivra:open-usage`,mP=`mivra:open-settings`,hP=`mivra:providers-changed`,gP=async e=>(window.dispatchEvent(new Event(hP)),await e.json()),_P=()=>dN(()=>nN.settings.providers.$get(),async e=>await e.json()),vP=(e,t)=>dN(()=>nN.settings.providers[`:id`].$put({param:{id:e},json:{key:t}}),gP),yP=e=>dN(()=>nN.settings.providers[`:id`].$delete({param:{id:e}}),gP),bP=(e=!1)=>dN(()=>nN.settings.chatgpt[`sign-in`].$post({json:{newAccount:e}}),async e=>await e.json()),xP=e=>dN(()=>nN.settings.chatgpt[`sign-in`].complete.$post({json:{address:e}}),gP),SP=()=>dN(()=>nN.settings.chatgpt[`sign-in`].$delete(),gP),CP=()=>dN(()=>nN.settings.chatgpt.$delete(),gP),wP=()=>dN(()=>nN.settings.chatgpt.welcomed.$post(),async e=>await e.json()),TP=()=>dN(()=>nN.settings.chatgpt.check.$post(),async e=>await e.json()),EP=e=>dN(()=>nN.settings.providers[`:id`].check.$post({param:{id:e}}),async e=>await e.json()),DP=(e,t)=>dN(()=>nN.sessions[`:id`].$patch({param:{id:e},json:{title:t}}),async e=>await e.json()),OP=e=>dN(()=>nN.sessions[`:id`].$delete({param:{id:e}}),()=>void 0),kP=e=>dN(()=>nN.settings.providers.custom.$post({json:e}),gP),AP=(e,t)=>dN(()=>nN.settings.providers.custom[`:id`].$put({param:{id:e},json:t}),gP),jP=e=>dN(()=>nN.settings.providers.custom[`:id`].$delete({param:{id:e}}),gP),MP=e=>dN(()=>nN.settings.providers.custom[`:id`].refresh.$post({param:{id:e}}),gP),NP=(e,t,n)=>dN(()=>nN.settings.providers.custom[`:id`].test.$post({param:{id:e},json:{model:t}},{init:{signal:n}}),async e=>(window.dispatchEvent(new Event(hP)),await e.json()));async function PP(){let e;try{e=await fetch(`${window.location.origin}/api/export/obsidian`,{headers:tN})}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}if(!e.ok)return{ok:!1,error:await rN(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 FP(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var IP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LP=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,RP={};function zP(e,t){return((t||RP).jsx?LP:IP).test(e)}var BP=/[ \t\n\f\r]/g;function VP(e){return typeof e==`object`?e.type===`text`&&HP(e.value):HP(e)}function HP(e){return e.replace(BP,``)===``}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 WP(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 GP(e){return e.toLowerCase()}var KP=class{constructor(e,t){this.attribute=t,this.property=e}};KP.prototype.attribute=``,KP.prototype.booleanish=!1,KP.prototype.boolean=!1,KP.prototype.commaOrSpaceSeparated=!1,KP.prototype.commaSeparated=!1,KP.prototype.defined=!1,KP.prototype.mustUseProperty=!1,KP.prototype.number=!1,KP.prototype.overloadedBoolean=!1,KP.prototype.property=``,KP.prototype.spaceSeparated=!1,KP.prototype.space=void 0;var qP=s({boolean:()=>YP,booleanish:()=>XP,commaOrSpaceSeparated:()=>eF,commaSeparated:()=>$P,number:()=>B,overloadedBoolean:()=>ZP,spaceSeparated:()=>QP}),JP=0,YP=tF(),XP=tF(),ZP=tF(),B=tF(),QP=tF(),$P=tF(),eF=tF();function tF(){return 2**++JP}var nF=Object.keys(qP),rF=class extends KP{constructor(e,t,n,r){let i=-1;if(super(e,t),iF(this,`space`,r),typeof n==`number`)for(;++i<nF.length;){let e=nF[i];iF(this,nF[i],(n&qP[e])===qP[e])}}};rF.prototype.defined=!0;function iF(e,t,n){n&&(e[t]=n)}function aF(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new rF(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[GP(r)]=r,n[GP(a.attribute)]=r}return new UP(t,n,e.space)}var oF=aF({properties:{ariaActiveDescendant:null,ariaAtomic:XP,ariaAutoComplete:null,ariaBusy:XP,ariaChecked:XP,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:QP,ariaCurrent:null,ariaDescribedBy:QP,ariaDetails:null,ariaDisabled:XP,ariaDropEffect:QP,ariaErrorMessage:null,ariaExpanded:XP,ariaFlowTo:QP,ariaGrabbed:XP,ariaHasPopup:null,ariaHidden:XP,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:QP,ariaLevel:B,ariaLive:null,ariaModal:XP,ariaMultiLine:XP,ariaMultiSelectable:XP,ariaOrientation:null,ariaOwns:QP,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:XP,ariaReadOnly:XP,ariaRelevant:null,ariaRequired:XP,ariaRoleDescription:QP,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:XP,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 sF(e,t){return t in e?e[t]:t}function cF(e,t){return sF(e,t.toLowerCase())}var lF=aF({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:$P,acceptCharset:QP,accessKey:QP,action:null,allow:null,allowFullScreen:YP,allowPaymentRequest:YP,allowUserMedia:YP,alpha:YP,alt:null,as:null,async:YP,autoCapitalize:null,autoComplete:QP,autoFocus:YP,autoPlay:YP,blocking:QP,capture:null,charSet:null,checked:YP,cite:null,className:QP,closedBy:null,colorSpace:null,cols:B,colSpan:B,command:null,commandFor:null,content:null,contentEditable:XP,controls:YP,controlsList:QP,coords:B|$P,crossOrigin:null,data:null,dateTime:null,decoding:null,default:YP,defer:YP,dir:null,dirName:null,disabled:YP,download:ZP,draggable:XP,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:YP,formTarget:null,headers:QP,height:B,hidden:ZP,high:B,href:null,hrefLang:null,htmlFor:QP,httpEquiv:QP,id:null,imageSizes:null,imageSrcSet:null,inert:YP,inputMode:null,integrity:null,is:null,isMap:YP,itemId:null,itemProp:QP,itemRef:QP,itemScope:YP,itemType:QP,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:YP,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:YP,muted:YP,name:null,nonce:null,noModule:YP,noValidate:YP,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:YP,optimum:B,pattern:null,ping:QP,placeholder:null,playsInline:YP,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:YP,referrerPolicy:null,rel:QP,required:YP,reversed:YP,rows:B,rowSpan:B,sandbox:QP,scope:null,scoped:YP,seamless:YP,selected:YP,shadowRootClonable:YP,shadowRootCustomElementRegistry:YP,shadowRootDelegatesFocus:YP,shadowRootMode:null,shadowRootSerializable:YP,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:XP,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:YP,useMap:null,value:XP,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:QP,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:YP,declare:YP,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:YP,noHref:YP,noShade:YP,noWrap:YP,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:XP,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:YP,disablePictureInPicture:YP,disableRemotePlayback:YP,exportParts:$P,part:QP,prefix:null,property:null,results:B,security:null,unselectable:null},space:`html`,transform:cF}),uF=aF({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:eF,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:QP,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:YP,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:$P,g2:$P,glyphName:$P,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:eF,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:QP,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:eF,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:eF,rev:eF,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:eF,requiredFeatures:eF,requiredFonts:eF,requiredFormats:eF,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:eF,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:eF,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:eF,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:sF}),dF=aF({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()}}),fF=aF({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:cF}),pF=aF({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),mF={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`},hF=/[A-Z]/g,gF=/-[a-z]/g,_F=/^data[-\w.:]+$/i;function vF(e,t){let n=GP(t),r=t,i=KP;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&_F.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(gF,bF);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!gF.test(e)){let n=e.replace(hF,yF);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=rF}return new i(r,t)}function yF(e){return`-`+e.toLowerCase()}function bF(e){return e.charAt(1).toUpperCase()}var xF=WP([oF,lF,dF,fF,pF],`html`),SF=WP([oF,uF,dF,fF,pF],`svg`);function CF(e){return e.join(` `).trim()}var wF=/\/\*(?:[^*]|\*(?!\/))*\*\//g,TF=/\n/g,EF=/^\s*/,DF=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,OF=/^:\s*/,kF=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,AF=/^[;\s]*/,jF=`
243
+ `,MF=`/`,NF=`*`,PF=``,FF=`comment`,IF=`declaration`;function LF(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(TF);t&&(n+=t.length);var i=e.lastIndexOf(jF);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(EF)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(MF==e.charAt(0)&&NF==e.charAt(1)){for(var n=2;PF!=e.charAt(n)&&(NF!=e.charAt(n)||MF!=e.charAt(n+1));)++n;if(n+=2,PF===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:FF,comment:o})}}function f(){var e=a(),t=c(DF);if(t){if(d(),!c(OF))return s(`property missing ':'`);var n=c(kF),r=e({type:IF,property:t[0].replace(wF,PF).trim(),value:n?n[0].replace(wF,PF).trim():PF});return c(AF),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function RF(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=LF(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 zF=VF(`end`),BF=VF(`start`);function VF(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 HF(e){let t=BF(e),n=zF(e);if(t&&n)return{start:t,end:n}}function UF(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?GF(e.position):`start`in e||`end`in e?GF(e):`line`in e||`column`in e?WF(e):``}function WF(e){return KF(e&&e.line)+`:`+KF(e&&e.column)}function GF(e){return WF(e&&e.start)+`-`+WF(e&&e.end)}function KF(e){return e&&typeof e==`number`?e:1}var qF=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}};qF.prototype.file=``,qF.prototype.name=``,qF.prototype.reason=``,qF.prototype.message=``,qF.prototype.stack=``,qF.prototype.column=void 0,qF.prototype.line=void 0,qF.prototype.ancestors=void 0,qF.prototype.cause=void 0,qF.prototype.fatal=void 0,qF.prototype.place=void 0,qF.prototype.ruleId=void 0,qF.prototype.source=void 0;var JF={}.hasOwnProperty,YF=new Map,XF=/[A-Z]/g,ZF=/-([a-z])/g,QF=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),$F=new Set([`td`,`th`]),eI=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function tI(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=fI(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=dI(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`?SF:xF,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=nI(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function nI(e,t,n){if(t.type===`element`)return rI(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return iI(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return oI(e,t,n);if(t.type===`mdxjsEsm`)return aI(e,t);if(t.type===`root`)return sI(e,t,n);if(t.type===`text`)return cI(e,t)}function rI(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=SF,e.schema=i),e.ancestors.push(t);let a=mI(e,t.tagName,!1),o=ore(e,t),s=pI(e,t);return QF.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!VP(e)})),lI(e,o,a,t),uI(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function iI(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)}hI(e,t.position)}function aI(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hI(e,t.position)}function oI(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=SF,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:mI(e,t.name,!0),o=sre(e,t),s=pI(e,t);return lI(e,o,a,t),uI(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function sI(e,t,n){let r={};return uI(r,pI(e,t)),e.create(t,e.Fragment,r,n)}function cI(e,t){return t.value}function lI(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function uI(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function dI(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 fI(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=BF(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 ore(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&JF.call(t.properties,i)){let a=cre(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&$F.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 sre(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 hI(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 hI(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function pI(e,t){let n=[],r=-1,i=e.passKeys?new Map:YF;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=nI(e,a,o);s!==void 0&&n.push(s)}return n}function cre(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=vF(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?FP(n):CF(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:ure(n):lre(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?mF[r.property]||r.property:r.attribute,n]}function lre(e,t){let n={};try{RF(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(ZF,pre))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new qF("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=eI+`#cannot-parse-style-attribute`,r}return n}function mI(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=zP(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=zP(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return JF.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);hI(e)}function hI(e,t){let n=new qF("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=eI+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function ure(e){let t={},n;for(n in e)JF.call(e,n)&&(t[dre(n)]=e[n]);return t}function dre(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(XF,fre);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function fre(e){return`-`+e.toLowerCase()}function pre(e,t){return t.toUpperCase()}function gI({...e}){return(0,j.jsx)(rf,{"data-slot":`popover`,...e})}function _I({...e}){return(0,j.jsx)(of,{"data-slot":`popover-trigger`,...e})}function vI({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,j.jsx)(uf,{children:(0,j.jsx)(ff,{"data-slot":`popover-content`,align:t,sideOffset:n,className:A(`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 yI({className:e,...t}){return(0,j.jsx)(c_,{role:`status`,"aria-label":`Loading`,className:A(`size-4 animate-spin motion-reduce:animate-none`,e),...t})}var bI=(0,v.createContext)(void 0);function mre(e,t){let[n,r]=(0,v.useState)({state:`loading`});return(0,v.useEffect)(()=>{if(!t)return;let n=!0;return r({state:`loading`}),DN([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 hre({loaded:e}){if(e.state===`loading`)return(0,j.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,j.jsx)(yI,{}),` Reading the passage…`]});if(e.state===`failed`)return(0,j.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,j.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,j.jsx)(`p`,{className:`text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:n?`Your note`:`Your document`}),t.source&&(0,j.jsx)(`p`,{className:`text-sm font-semibold break-words text-foreground`,children:t.source}),t.locator&&(0,j.jsx)(`p`,{className:`text-xs break-words text-muted-foreground`,children:t.locator})]});if(t.status===`ok`)return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,(0,j.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,j.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,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,(0,j.jsx)(`p`,{"data-testid":`citation-unavailable`,className:`text-sm text-muted-foreground`,children:i})]})}function gre({refId:e,number:t}){let[n,r]=(0,v.useState)(!1),i=mre(e,n);return(0,j.jsxs)(gI,{open:n,onOpenChange:r,children:[(0,j.jsx)(_I,{asChild:!0,children:(0,j.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,j.jsx)(vI,{align:`start`,className:`w-80 max-w-[calc(100vw-2rem)]`,"aria-label":`Source ${t}`,children:(0,j.jsx)(hre,{loaded:i})})]})}function _re({refId:e}){let t=(0,v.useContext)(bI)?.get(e);return t===void 0?null:(0,j.jsx)(gre,{refId:e,number:t})}var vre={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}},yre=/([A-Z])/g,bre=e=>e.replace(yre,`-$1`).toLowerCase(),xre={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},Sre=/[&><"']/g,xI=e=>String(e).replace(Sre,e=>xre[e]),SI=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?SI(e.body[0]):e:e.type===`font`?SI(e.body):e,Cre=new Set([`mathord`,`textord`,`atom`]),CI=e=>Cre.has(SI(e).type),wre=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},wI={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 TI=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(wI)){var n=wI[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)}},EI=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 FI[Ore[this.id]]}sub(){return FI[kre[this.id]]}fracNum(){return FI[Are[this.id]]}fracDen(){return FI[jre[this.id]]}cramp(){return FI[Mre[this.id]]}text(){return FI[Nre[this.id]]}isTight(){return this.size>=2}},DI=0,OI=1,kI=2,AI=3,jI=4,MI=5,NI=6,PI=7,FI=[new EI(DI,0,!1),new EI(OI,0,!0),new EI(kI,1,!1),new EI(AI,1,!0),new EI(jI,2,!1),new EI(MI,2,!0),new EI(NI,3,!1),new EI(PI,3,!0)],Ore=[jI,MI,jI,MI,NI,PI,NI,PI],kre=[MI,MI,MI,MI,PI,PI,PI,PI],Are=[kI,AI,jI,MI,NI,PI,NI,PI],jre=[AI,AI,MI,MI,PI,PI,PI,PI],Mre=[OI,OI,AI,AI,MI,MI,PI,PI],Nre=[DI,OI,kI,AI,kI,AI,kI,AI],II={DISPLAY:FI[DI],TEXT:FI[kI],SCRIPT:FI[jI],SCRIPTSCRIPT:FI[NI]},LI=[{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<LI.length;t++)for(var n=LI[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 RI=[];LI.forEach(e=>e.blocks.forEach(e=>RI.push(...e)));function zI(e){for(var t=0;t<RI.length;t+=2)if(e>=RI[t]&&e<=RI[t+1])return!0;return!1}var BI=e=>e+` `+e,VI=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,VI);break;case`sqrtSize1`:r=Ire(t,VI);break;case`sqrtSize2`:r=Lre(t,VI);break;case`sqrtSize3`:r=Rre(t,VI);break;case`sqrtSize4`:r=zre(t,VI);break;case`sqrtTall`:r=Vre(t,VI,n)}return r},Ure=function(e,t){switch(e){case`⎜`:return BI(`M291 0 H417 V`+t+` H291z`);case`∣`:return BI(`M145 0 H188 V`+t+` H145z`);case`∥`:return BI(`M145 0 H188 V`+t+` H145z`)+BI(`M367 0 H410 V`+t+` H367z`);case`⎟`:return BI(`M457 0 H583 V`+t+` H457z`);case`⎢`:return BI(`M319 0 H403 V`+t+` H319z`);case`⎥`:return BI(`M263 0 H347 V`+t+` H263z`);case`⎪`:return BI(`M384 0 H504 V`+t+` H384z`);case`⏐`:return BI(`M312 0 H355 V`+t+` H312z`);case`‖`:return BI(`M257 0 H300 V`+t+` H257z`)+BI(`M478 0 H521 V`+t+` H478z`);default:return``}},HI={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:BI(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:BI(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:BI(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:BI(`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:BI(`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:BI(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:BI(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:BI(`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 UI=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(``)}},WI={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},GI=function(e){return typeof e!=`string`&&(e=e.unit),e in WI||e in Kre||e===`ex`},KI=function(e,t){var n;if(e.unit in WI)n=WI[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`},qI=function(e){return e.filter(e=>e).join(` `)},JI=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=bre(n)+`:`+r+`;`)}return t},YI=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)}},XI=function(e){var t=document.createElement(e);t.className=qI(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]/,ZI=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+xI(qI(this.classes))+`"`);var n=JI(this.style);n&&(t+=` style="`+xI(n)+`"`);for(var r of Object.keys(this.attributes)){if(qre.test(r))throw new V(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+xI(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},QI=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,YI.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return XI.call(this,`span`)}toMarkup(){return ZI.call(this,`span`)}},$I=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,YI.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 XI.call(this,`a`)}toMarkup(){return ZI.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="`+xI(this.src)+`"`+(` alt="`+xI(this.alt)+`"`),t=JI(this.style);return t&&(e+=` style="`+xI(t)+`"`),e+=`'/>`,e}},Yre={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},eL=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=qI(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+=xI(qI(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+H(this.italic)+`;`),n+=JI(this.style),n&&(e=!0,t+=` style="`+xI(n)+`"`);var r=xI(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},tL=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+`="`+xI(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},nL=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`,HI[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+xI(this.alternate)+`"/>`:`<path d="`+xI(HI[this.pathName])+`"/>`}},rL=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+`="`+xI(this.attributes[t])+`"`;return e+=`/>`,e}};function Xre(e){if(e instanceof eL)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Zre(e){if(e instanceof QI)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var Qre=e=>e instanceof QI||e instanceof $I||e instanceof UI,iL={"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]}},aL={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]},oL={Å:`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){iL[e]=t}function sL(e,t,n){if(!iL[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=iL[t][r];if(!i&&e[0]in oL&&(r=oL[e[0]].charCodeAt(0),i=iL[t][r]),!i&&n===`text`&&zI(r)&&(i=iL[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var cL={};function eie(e){var t=e>=5?0:e>=3?1:2;if(!cL[t]){var n=cL[t]={cssEmPerMu:aL.quad[t]/18};for(var r in aL)aL.hasOwnProperty(r)&&(n[r]=aL[r][t])}return cL[t]}var lL={math:{},text:{}};function U(e,t,n,r,i,a){lL[e][i]={font:t,group:n,replace:r},a&&r&&(lL[e][r]=lL[e][i])}var W=`math`,G=`text`,K=`main`,q=`ams`,uL=`accent-token`,dL=`bin`,fL=`close`,pL=`inner`,mL=`mathord`,hL=`op-token`,gL=`open`,_L=`punct`,J=`rel`,vL=`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,_L,`.`,`\\ldotp`),U(W,K,_L,`⋅`,`\\cdotp`),U(W,K,_L,`⋅`,`·`),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,fL,`⎱`,`\\rmoustache`,!0),U(W,K,gL,`⎰`,`\\lmoustache`,!0),U(W,K,fL,`⟯`,`\\rgroup`,!0),U(W,K,gL,`⟮`,`\\lgroup`,!0),U(W,K,dL,`∓`,`\\mp`,!0),U(W,K,dL,`⊖`,`\\ominus`,!0),U(W,K,dL,`⊎`,`\\uplus`,!0),U(W,K,dL,`⊓`,`\\sqcap`,!0),U(W,K,dL,`∗`,`\\ast`),U(W,K,dL,`⊔`,`\\sqcup`,!0),U(W,K,dL,`◯`,`\\bigcirc`,!0),U(W,K,dL,`∙`,`\\bullet`,!0),U(W,K,dL,`‡`,`\\ddagger`),U(W,K,dL,`≀`,`\\wr`,!0),U(W,K,dL,`⨿`,`\\amalg`),U(W,K,dL,`&`,`\\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,dL,`⊴`,`\\unlhd`),U(W,q,dL,`⊵`,`\\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,gL,`┌`,`\\@ulcorner`,!0),U(W,q,fL,`┐`,`\\@urcorner`,!0),U(W,q,gL,`└`,`\\@llcorner`,!0),U(W,q,fL,`┘`,`\\@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,dL,`⋖`,`\\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,dL,`⋗`,`\\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,dL,`⊲`,`\\lhd`),U(W,q,dL,`⊳`,`\\rhd`),U(W,q,J,`≂`,`\\eqsim`,!0),U(W,K,J,`⋈`,`\\Join`),U(W,q,J,`≑`,`\\Doteq`,!0),U(W,q,dL,`∔`,`\\dotplus`,!0),U(W,q,dL,`∖`,`\\smallsetminus`),U(W,q,dL,`⋒`,`\\Cap`,!0),U(W,q,dL,`⋓`,`\\Cup`,!0),U(W,q,dL,`⩞`,`\\doublebarwedge`,!0),U(W,q,dL,`⊟`,`\\boxminus`,!0),U(W,q,dL,`⊞`,`\\boxplus`,!0),U(W,q,dL,`⋇`,`\\divideontimes`,!0),U(W,q,dL,`⋉`,`\\ltimes`,!0),U(W,q,dL,`⋊`,`\\rtimes`,!0),U(W,q,dL,`⋋`,`\\leftthreetimes`,!0),U(W,q,dL,`⋌`,`\\rightthreetimes`,!0),U(W,q,dL,`⋏`,`\\curlywedge`,!0),U(W,q,dL,`⋎`,`\\curlyvee`,!0),U(W,q,dL,`⊝`,`\\circleddash`,!0),U(W,q,dL,`⊛`,`\\circledast`,!0),U(W,q,dL,`⋅`,`\\centerdot`),U(W,q,dL,`⊺`,`\\intercal`,!0),U(W,q,dL,`⋒`,`\\doublecap`),U(W,q,dL,`⋓`,`\\doublecup`),U(W,q,dL,`⊠`,`\\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,`Θ`,`\\The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mL,`σ`,`\\sigma`,!0),U(W,K,mL,`τ`,`\\tau`,!0),U(W,K,mL,`υ`,`\\upsilon`,!0),U(W,K,mL,`ϕ`,`\\phi`,!0),U(W,K,mL,`χ`,`\\chi`,!0),U(W,K,mL,`ψ`,`\\psi`,!0),U(W,K,mL,`ω`,`\\omega`,!0),U(W,K,mL,`ε`,`\\varepsilon`,!0),U(W,K,mL,`ϑ`,`\\vartheta`,!0),U(W,K,mL,`ϖ`,`\\varpi`,!0),U(W,K,mL,`ϱ`,`\\varrho`,!0),U(W,K,mL,`ς`,`\\varsigma`,!0),U(W,K,mL,`φ`,`\\varphi`,!0),U(W,K,dL,`∗`,`*`,!0),U(W,K,dL,`+`,`+`),U(W,K,dL,`−`,`-`,!0),U(W,K,dL,`⋅`,`\\cdot`,!0),U(W,K,dL,`∘`,`\\circ`,!0),U(W,K,dL,`÷`,`\\div`,!0),U(W,K,dL,`±`,`\\pm`,!0),U(W,K,dL,`×`,`\\times`,!0),U(W,K,dL,`∩`,`\\cap`,!0),U(W,K,dL,`∪`,`\\cup`,!0),U(W,K,dL,`∖`,`\\setminus`,!0),U(W,K,dL,`∧`,`\\land`),U(W,K,dL,`∨`,`\\lor`),U(W,K,dL,`∧`,`\\wedge`,!0),U(W,K,dL,`∨`,`\\vee`,!0),U(W,K,Y,`√`,`\\surd`),U(W,K,gL,`⟨`,`\\langle`,!0),U(W,K,gL,`∣`,`\\lvert`),U(W,K,gL,`∥`,`\\lVert`),U(W,K,fL,`?`,`?`),U(W,K,fL,`!`,`!`),U(W,K,fL,`⟩`,`\\rangle`,!0),U(W,K,fL,`∣`,`\\rvert`),U(W,K,fL,`∥`,`\\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,vL,`\xA0`,`\\ `),U(W,K,vL,`\xA0`,`\\space`),U(W,K,vL,`\xA0`,`\\nobreakspace`),U(G,K,vL,`\xA0`,`\\ `),U(G,K,vL,`\xA0`,` `),U(G,K,vL,`\xA0`,`\\space`),U(G,K,vL,`\xA0`,`\\nobreakspace`),U(W,K,vL,``,`\\nobreak`),U(W,K,vL,``,`\\allowbreak`),U(W,K,_L,`,`,`,`),U(W,K,_L,`;`,`;`),U(W,q,dL,`⊼`,`\\barwedge`,!0),U(W,q,dL,`⊻`,`\\veebar`,!0),U(W,K,dL,`⊙`,`\\odot`,!0),U(W,K,dL,`⊕`,`\\oplus`,!0),U(W,K,dL,`⊗`,`\\otimes`,!0),U(W,K,Y,`∂`,`\\partial`,!0),U(W,K,dL,`⊘`,`\\oslash`,!0),U(W,q,dL,`⊚`,`\\circledcirc`,!0),U(W,q,dL,`⊡`,`\\boxdot`,!0),U(W,K,dL,`△`,`\\bigtriangleup`),U(W,K,dL,`▽`,`\\bigtriangledown`),U(W,K,dL,`†`,`\\dagger`),U(W,K,dL,`⋄`,`\\diamond`),U(W,K,dL,`⋆`,`\\star`),U(W,K,dL,`◃`,`\\triangleleft`),U(W,K,dL,`▹`,`\\triangleright`),U(W,K,gL,`{`,`\\{`),U(G,K,Y,`{`,`\\{`),U(G,K,Y,`{`,`\\textbraceleft`),U(W,K,fL,`}`,`\\}`),U(G,K,Y,`}`,`\\}`),U(G,K,Y,`}`,`\\textbraceright`),U(W,K,gL,`{`,`\\lbrace`),U(W,K,fL,`}`,`\\rbrace`),U(W,K,gL,`[`,`\\lbrack`,!0),U(G,K,Y,`[`,`\\lbrack`,!0),U(W,K,fL,`]`,`\\rbrack`,!0),U(G,K,Y,`]`,`\\rbrack`,!0),U(W,K,gL,`(`,`\\lparen`,!0),U(W,K,fL,`)`,`\\rparen`,!0),U(G,K,Y,`<`,`\\textless`,!0),U(G,K,Y,`>`,`\\textgreater`,!0),U(W,K,gL,`⌊`,`\\lfloor`,!0),U(W,K,fL,`⌋`,`\\rfloor`,!0),U(W,K,gL,`⌈`,`\\lceil`,!0),U(W,K,fL,`⌉`,`\\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,hL,`∐`,`\\coprod`),U(W,K,hL,`⋁`,`\\bigvee`),U(W,K,hL,`⋀`,`\\bigwedge`),U(W,K,hL,`⨄`,`\\biguplus`),U(W,K,hL,`⋂`,`\\bigcap`),U(W,K,hL,`⋃`,`\\bigcup`),U(W,K,hL,`∫`,`\\int`),U(W,K,hL,`∫`,`\\intop`),U(W,K,hL,`∬`,`\\iint`),U(W,K,hL,`∭`,`\\iiint`),U(W,K,hL,`∏`,`\\prod`),U(W,K,hL,`∑`,`\\sum`),U(W,K,hL,`⨂`,`\\bigotimes`),U(W,K,hL,`⨁`,`\\bigoplus`),U(W,K,hL,`⨀`,`\\bigodot`),U(W,K,hL,`∮`,`\\oint`),U(W,K,hL,`∯`,`\\oiint`),U(W,K,hL,`∰`,`\\oiiint`),U(W,K,hL,`⨆`,`\\bigsqcup`),U(W,K,hL,`∫`,`\\smallint`),U(G,K,pL,`…`,`\\textellipsis`),U(W,K,pL,`…`,`\\mathellipsis`),U(G,K,pL,`…`,`\\ldots`,!0),U(W,K,pL,`…`,`\\ldots`,!0),U(W,K,pL,`⋯`,`\\@cdots`,!0),U(W,K,pL,`⋱`,`\\ddots`,!0),U(W,K,Y,`⋮`,`\\varvdots`),U(G,K,Y,`⋮`,`\\varvdots`),U(W,K,uL,`ˊ`,`\\acute`),U(W,K,uL,`ˋ`,`\\grave`),U(W,K,uL,`¨`,`\\ddot`),U(W,K,uL,`~`,`\\tilde`),U(W,K,uL,`ˉ`,`\\bar`),U(W,K,uL,`˘`,`\\breve`),U(W,K,uL,`ˇ`,`\\check`),U(W,K,uL,`^`,`\\hat`),U(W,K,uL,`⃗`,`\\vec`),U(W,K,uL,`˙`,`\\dot`),U(W,K,uL,`˚`,`\\mathring`),U(W,K,mL,``,`\\@imath`),U(W,K,mL,``,`\\@jmath`),U(W,K,Y,`ı`,`ı`),U(W,K,Y,`ȷ`,`ȷ`),U(G,K,Y,`ı`,`\\i`,!0),U(G,K,Y,`ȷ`,`\\j`,!0),U(G,K,Y,`ß`,`\\ss`,!0),U(G,K,Y,`æ`,`\\ae`,!0),U(G,K,Y,`œ`,`\\oe`,!0),U(G,K,Y,`ø`,`\\o`,!0),U(G,K,Y,`Æ`,`\\AE`,!0),U(G,K,Y,`Œ`,`\\OE`,!0),U(G,K,Y,`Ø`,`\\O`,!0),U(G,K,uL,`ˊ`,`\\'`),U(G,K,uL,`ˋ`,"\\`"),U(G,K,uL,`ˆ`,`\\^`),U(G,K,uL,`˜`,`\\~`),U(G,K,uL,`ˉ`,`\\=`),U(G,K,uL,`˘`,`\\u`),U(G,K,uL,`˙`,`\\.`),U(G,K,uL,`¸`,`\\c`),U(G,K,uL,`˚`,`\\r`),U(G,K,uL,`ˇ`,`\\v`),U(G,K,uL,`¨`,`\\"`),U(G,K,uL,`˝`,`\\H`),U(G,K,uL,`◯`,`\\textcircled`);var yL={"--":!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 bL=`0123456789/@."`,xL=0;xL<bL.length;xL++){var SL=bL.charAt(xL);U(W,K,Y,SL,SL)}for(var CL=`0123456789!@*()-=+";:?/.,`,wL=0;wL<CL.length;wL++){var TL=CL.charAt(wL);U(G,K,Y,TL,TL)}for(var EL=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,DL=0;DL<EL.length;DL++){var OL=EL.charAt(DL);U(W,K,mL,OL,OL),U(G,K,Y,OL,OL)}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,mL,`h`,`ℎ`),U(G,K,mL,`h`,`ℎ`);for(var kL,AL=0;AL<EL.length;AL++){var jL=EL.charAt(AL);kL=String.fromCharCode(55349,56320+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),kL=String.fromCharCode(55349,56372+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),kL=String.fromCharCode(55349,56424+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),kL=String.fromCharCode(55349,56580+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),kL=String.fromCharCode(55349,56684+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),kL=String.fromCharCode(55349,56736+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),kL=String.fromCharCode(55349,56788+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),kL=String.fromCharCode(55349,56840+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),kL=String.fromCharCode(55349,56944+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),AL<26&&(kL=String.fromCharCode(55349,56632+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL),kL=String.fromCharCode(55349,56476+AL),U(W,K,mL,jL,kL),U(G,K,Y,jL,kL))}kL=String.fromCharCode(55349,56668),U(W,K,mL,`k`,kL),U(G,K,Y,`k`,kL);for(var ML=0;ML<10;ML++){var NL=ML.toString();kL=String.fromCharCode(55349,57294+ML),U(W,K,mL,NL,kL),U(G,K,Y,NL,kL),kL=String.fromCharCode(55349,57314+ML),U(W,K,mL,NL,kL),U(G,K,Y,NL,kL),kL=String.fromCharCode(55349,57324+ML),U(W,K,mL,NL,kL),U(G,K,Y,NL,kL),kL=String.fromCharCode(55349,57334+ML),U(W,K,mL,NL,kL),U(G,K,Y,NL,kL)}for(var PL=`ÐÞþ`,FL=0;FL<PL.length;FL++){var IL=PL.charAt(FL);U(W,K,mL,IL,IL),U(G,K,Y,IL,IL)}var LL={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},RL={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},zL={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},tie={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},BL={mathClass:``,textClass:``,font:``},VL={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},HL={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},UL={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},WL={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},GL={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},KL={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},qL={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},JL=[LL,LL,RL,RL,zL,zL,tie,BL,BL,BL,VL,VL,HL,HL,UL,UL,WL,WL,GL,GL,KL,KL,BL,BL,qL,qL],YL=[LL,BL,WL,GL,qL],XL=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return JL[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return YL[Math.floor((r-120782)/10)];if(r===120485||r===120486)return JL[0];if(120486<r&&r<120782)return BL;throw new V(`Unsupported character: `+e)},ZL=function(e,t,n){if(lL[n][e]){var r=lL[n][e].replace;r&&(e=r)}return{value:e,metrics:sL(e,t,n)}},QL=function(e,t,n,r,i){var a=ZL(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 eL(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 eL(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},$L=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&ZL(e,`Main-Bold`,t).metrics?QL(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||lL[t][e].font===`main`?QL(e,`Main-Regular`,t,n,r):QL(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},eR=function(e,t,n){return n!==`textord`&&ZL(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},tR=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=XL(i);f=m.font,p=m[r+`Class`]}if(f)return QL(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=eR(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=mR[o].fontName,g=[o]):(h=pR(s,c,l),g=[s,c,l]);if(ZL(i,h,r).metrics)return QL(i,h,r,t,a.concat(g));if(yL.hasOwnProperty(i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(QL(i[y],h,r,t,a.concat(g)));return cR(v)}}if(n===`mathord`)return QL(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=lL[r][i]&&lL[r][i].font;if(b===`ams`)return QL(i,pR(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return QL(i,pR(`textrm`,c,l),r,t,a.concat(c,l));var x=pR(b,c,l);return QL(i,x,r,t,a.concat(x,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},nR=(e,t)=>{if(qI(e.classes)!==qI(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},rR=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof eL&&r instanceof eL&&nR(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},iR=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 QI(e,t,n,r);return iR(i),i},aR=(e,t,n,r)=>new QI(e,t,n,r),oR=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},sR=function(e,t,n,r){var i=new $I(e,t,n,r);return iR(i),i},cR=function(e){var t=new UI(e);return iR(t),t},lR=function(e,t){return e instanceof UI?X([],[e],t):e},uR=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}},dR=function(e,t){for(var{children:n,depth:r}=uR(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 eL(`​`)])]),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},fR=(e,t)=>{var n=X([`mspace`],[],t),r=KI(e,t);return n.style.marginRight=H(r),n},pR=(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},mR={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`}},hR={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},gR=function(e,t){var[n,r,i]=hR[e],a=aR([`overlay`],[new tL([new nL(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},_R={number:3,unit:`mu`},vR={number:4,unit:`mu`},yR={number:5,unit:`mu`},bR={mord:{mop:_R,mbin:vR,mrel:yR,minner:_R},mop:{mord:_R,mop:_R,mrel:yR,minner:_R},mbin:{mord:vR,mop:vR,mopen:vR,minner:vR},mrel:{mord:yR,mop:yR,mopen:yR,minner:yR},mopen:{},mclose:{mop:_R,mbin:vR,mrel:yR,minner:_R},mpunct:{mord:_R,mop:_R,mrel:yR,mopen:_R,mclose:_R,mpunct:_R,minner:_R},minner:{mord:_R,mop:_R,mbin:vR,mrel:yR,mopen:_R,mpunct:_R,minner:_R}},xR={mord:{mop:_R},mop:{mord:_R,mop:_R},mbin:{},mrel:{},mopen:{},mclose:{mop:_R},mpunct:{},minner:{mop:_R}},SR={},CR={},wR={};function TR(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)SR[n[c]]=s;t&&(a&&(CR[t]=a),o&&(wR[t]=o))}function ER(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;TR({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}var DR=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},OR=function(e){return e.type===`ordgroup`?e.body:[e]},kR=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),AR=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),jR={display:II.DISPLAY,text:II.TEXT,script:II.SCRIPT,scriptscript:II.SCRIPTSCRIPT},MR={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},NR=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=zR(e[a],t);if(o instanceof UI){var s=o.children;i.push(...s)}else i.push(o)}if(rR(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(jR[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`&&AR.has(r)?t.classes[0]=`mord`:r===`mbin`&&kR.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),PR(i,(e,t)=>{var n=LR(t),r=LR(e),i=n&&r?e.hasClass(`mtight`)?xR[n]?.[r]:bR[n]?.[r]:null;if(i)return fR(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=FR(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()},FR=function(e){return e instanceof UI||e instanceof $I||e instanceof QI&&e.hasClass(`enclosing`)?e:null},IR=function(e,t){var n=FR(e);if(n){var r=n.children;if(r.length){if(t===`right`)return IR(r[r.length-1],`right`);if(t===`left`)return IR(r[0],`left`)}}return e},LR=function(e,t){return e?(t&&(e=IR(e,t)),MR[e.classes[0]]||null):null},RR=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return X(t.concat(n))},zR=function(e,t,n){if(!e)return X();if(CR[e.type]){var r=CR[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 BR(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 VR(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=NR(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(BR(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(BR(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(BR(o,t));var l;n?(l=BR(NR(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 HR(e){return new UI(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=qI(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof UR&&this.children[n+1]instanceof UR){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof UR;)r+=this.children[++n].toText();e.appendChild(new UR(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+=xI(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+xI(qI(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(``)}},UR=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return xI(this.toText())}toText(){return this.text}},WR=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:` `}},GR=new Set([`\\imath`,`\\jmath`]),KR=new Set([`mrow`,`mtable`]),qR=function(e,t,n){return lL[t][e]&&lL[t][e].replace&&e.charCodeAt(0)!==55349&&!(yL.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=lL[t][e].replace),new UR(e)},JR=function(e){return e.length===1?e[0]:new Z(`mrow`,e)},YR={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`},XR=(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=YR[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(GR.has(a))return null;if(lL[r][a]){var o=lL[r][a].replace;o&&(a=o)}var s=mR[n].fontName;return sL(a,s,r)?mR[n].variant:null};function ZR(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof UR&&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 UR&&n.text===`,`}return!1}var QR=function(e,t,n){if(e.length===1){var r=ez(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=ez(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`||ZR(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&ZR(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||ZR(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 UR&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof UR&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},$R=function(e,t,n){return JR(QR(e,t,n))},ez=function(e,t){if(!e)return new Z(`mrow`);if(wR[e.type])return wR[e.type](e,t);throw new V(`Got group of unknown type: '`+e.type+`'`)};function tz(e,t,n,r,i){var a=QR(e,n),o=a.length===1&&a[0]instanceof Z&&KR.has(a[0].type)?a[0]:new Z(`mrow`,a),s=new Z(`annotation`,[new UR(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 nz=[[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]],rz=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],iz=function(e,t){return t.size<2?e:nz[e-1][t.size-1]},az=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=rz[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:iz(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:rz[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=iz(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}};az.BASESIZE=6;var oz=function(e){return new az({style:e.displayMode?II.DISPLAY:II.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},sz=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},cz=function(e,t,n){var r=oz(n),i;return n.output===`mathml`?tz(e,t,r,n.displayMode,!0):(i=n.output===`html`?X([`katex`],[VR(e,r)]):X([`katex`],[tz(e,t,r,n.displayMode,!1),VR(e,r)]),sz(i,n))},lz=function(e,t,n){return sz(X([`katex`],[VR(e,oz(n))]),n)},uz={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":`=`},dz=function(e){var t=new Z(`mo`,[new UR(uz[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},fz={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]},pz=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),mz=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(pz.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:aR([],[new tL([new nL(o)],{width:`100%`,height:H(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=fz[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 tL([new nL(d[v])],{width:`400em`,height:H(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=aR([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},hz=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 rL({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new rL({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=aR([],[new tL(c,{width:`100%`,height:H(o)})],i)}return a.height=o,a.style.height=H(o),a},gz={bin:1,close:1,inner:1,open:1,punct:1,rel:1},_z={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function vz(e){return e in gz}function yz(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 bz(e){var t=xz(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function xz(e){return e&&(e.type===`atom`||_z.hasOwnProperty(e.type))?e:null}var Sz=e=>{if(e instanceof eL)return e;if(Qre(e)&&e.children.length===1)return Sz(e.children[0])},Cz=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=yz(e.base,`accent`),n=r.base,e.base=n,i=Zre(zR(e,t)),e.base=r):(r=yz(e,`accent`),n=r.base);var a=zR(n,t.havingCrampedStyle()),o=r.isShifty&&CI(n),s=0;o&&(s=Sz(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=mz(r,t),u=dR({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=gR(`vec`,t),f=hR.vec[1]):(d=tR({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=dR({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},wz=(e,t)=>{var n=e.isStretchy?dz(e.label):new Z(`mo`,[qR(e.label,e.mode)]),r=new Z(`mover`,[ez(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},Tz=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));TR({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=DR(t[0]),r=!Tz.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:Cz,mathmlBuilder:wz}),TR({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:Cz,mathmlBuilder:wz}),TR({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=zR(e.base,t),r=mz(e,t),i=e.label===`\\utilde`?.12:0;return X([`mord`,`accentunder`],[dR({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=dz(e.label),r=new Z(`munder`,[ez(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var Ez=e=>{var t=new Z(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};TR({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=lR(zR(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=lR(zR(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=mz(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=dR({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=dR({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=dz(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=Ez(ez(e.body,t));r=e.below?new Z(`munderover`,[n,Ez(ez(e.below,t)),i]):new Z(`mover`,[n,i])}else e.below?r=new Z(`munder`,[n,Ez(ez(e.below,t))]):(r=Ez(),r=new Z(`mover`,[n,r]));return r}});function Dz(e,t){var n=NR(e.body,t,!0);return X([e.mclass],n,t)}function Oz(e,t){var n,r=QR(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}TR({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:OR(i),isCharacterBox:CI(i)}},htmlBuilder:Dz,mathmlBuilder:Oz});var kz=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`};TR({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:kz(t[0]),body:OR(t[1]),isCharacterBox:CI(t[1])}}}),TR({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`:kz(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:OR(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:CI(c)}},htmlBuilder:Dz,mathmlBuilder:Oz}),TR({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:kz(t[0]),body:OR(t[0])}},htmlBuilder(e,t){var n=NR(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`,QR(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var Az={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},jz=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),Mz=e=>e.type===`textord`&&e.text===`@`,Nz=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function Pz(e,t,n){var r=Az[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 Fz(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=jz(),c=0;c<o.length;c++)if(!Mz(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=bz(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(Nz(o[p],l)){f=!1,c=p;break}if(Mz(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=jz()}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([])}}TR({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=lR(zR(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`,[ez(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}}),TR({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=lR(zR(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Z(`mrow`,[ez(e.fragment,t)])}}),TR({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=yz(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=yz(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 Iz=(e,t)=>cR(NR(e.body,t.withColor(e.color),!1)),Lz=(e,t)=>{var n=new Z(`mstyle`,QR(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};TR({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=yz(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:OR(i)}},htmlBuilder:Iz,mathmlBuilder:Lz}),TR({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=yz(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:Iz,mathmlBuilder:Lz}),TR({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&&yz(i,`size`).value}},htmlBuilder(e,t){var n=X([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=H(KI(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(KI(e.size,t)))),n}});var Rz={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},zz=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new V(`Expected a control sequence`,e);return t},Bz=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},Vz=(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)};TR({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(Rz[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=Rz[r.text]),yz(t.parseFunction(),`internal`);throw new V(`Invalid token after macro prefix`,r)}}),TR({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===Rz[n]),{type:`internal`,mode:t.mode}}}),TR({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=zz(t.gullet.popToken());return t.gullet.consumeSpaces(),Vz(t,r,Bz(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),TR({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=zz(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Vz(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var Hz=function(e,t,n){var r=sL(lL.math[e]&&lL.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},Uz=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},Wz=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},Gz=function(e,t,n,r,i,a){var o=Uz(QL(e,`Main-Regular`,i,r),t,r,a);return n&&Wz(o,r,t),o},Kz=function(e,t,n,r){return QL(e,`Size`+t+`-Regular`,n,r)},qz=function(e,t,n,r,i,a){var o=Kz(e,t,i,r),s=Uz(X([`delimsizing`,`size`+t],[o],r),II.TEXT,r,a);return n&&Wz(s,r,II.TEXT),s},Jz=function(e,t,n){return{type:`elem`,elem:X([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[X([],[QL(e,t,n)])])}},Yz=function(e,t,n){var r=iL[`Size4-Regular`][e.charCodeAt(0)]?iL[`Size4-Regular`][e.charCodeAt(0)][4]:iL[`Size1-Regular`][e.charCodeAt(0)][4],i=aR([],[new tL([new nL(`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}},Xz=.008,Zz={type:`kern`,size:-1*Xz},Qz=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),$z=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),eB=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`):Qz.has(e)?(c=`∣`,u=`vert`,d=333):$z.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=Hz(o,f,i),m=p.height+p.depth,h=Hz(c,f,i),g=h.height+h.depth,_=Hz(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=Hz(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),ee=Wre(u,Math.round(D*1e3)),te=new nL(u,ee),ne=H(d/1e3),re=H(O/1e3),ie=aR([],[new tL([te],{width:ne,height:re,viewBox:`0 0 `+d+` `+O})],r);ie.height=O/1e3,ie.style.width=ne,ie.style.height=re,E.push({type:`elem`,elem:ie})}else{if(E.push(Jz(l,f,i)),E.push(Zz),s===null){var ae=C-m-v+2*Xz;E.push(Yz(c,ae,r))}else{var oe=(C-m-v-y)/2+2*Xz;E.push(Yz(c,oe,r)),E.push(Zz),E.push(Jz(s,f,i)),E.push(Zz),E.push(Yz(c,oe,r))}E.push(Zz),E.push(Jz(o,f,i))}var k=r.havingBaseStyle(II.TEXT);return Uz(X([`delimsizing`,`mult`],[dR({positionType:`bottom`,positionData:T,children:E})],k),II.TEXT,r,a)},tB=80,nB=.08,rB=function(e,t,n,r,i){return aR([`hide-tail`],[new tL([new nL(e,Hre(e,r,n))],{width:`400em`,height:H(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},iB=function(e,t){var n=t.havingBaseSizing(),r=mB(`\\surd`,e*n.sizeMultiplier,fB,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+tB,e<1?i=1:e<1.4&&(i=.7),s=(1+a+nB)/i,c=(1+a)/i,o=rB(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+tB)*cB[r.size],c=(cB[r.size]+a)/i,s=(cB[r.size]+a+nB)/i,o=rB(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+nB,c=e+a,l=Math.floor(1e3*e+a)+tB,o=rB(`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}},aB=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),oB=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),sB=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),cB=[0,1.2,1.8,2.4,3],lB=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),aB.has(e)||sB.has(e))return qz(e,t,!1,n,r,i);if(oB.has(e))return eB(e,cB[t],!1,n,r,i);throw new V(`Illegal delimiter: '`+e+`'`)},uB=[{type:`small`,style:II.SCRIPTSCRIPT},{type:`small`,style:II.SCRIPT},{type:`small`,style:II.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],dB=[{type:`small`,style:II.SCRIPTSCRIPT},{type:`small`,style:II.SCRIPT},{type:`small`,style:II.TEXT},{type:`stack`}],fB=[{type:`small`,style:II.SCRIPTSCRIPT},{type:`small`,style:II.SCRIPT},{type:`small`,style:II.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],pB=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.`)},mB=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=Hz(e,pB(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]},hB=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=sB.has(e)?uB:aB.has(e)?fB:dB,s=mB(e,t,o,r);return s.type===`small`?Gz(e,s.style,n,r,i,a):s.type===`large`?qz(e,s.size,n,r,i,a):eB(e,t,n,r,i,a)},gB=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 hB(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},_B={"\\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}},vB=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 yB(e){return`isMiddle`in e}function bB(e,t){var n=xz(e);if(n&&vB.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)}TR({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=bB(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:_B[e.funcName].size,mclass:_B[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?X([e.mclass]):lB(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(qR(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(cB[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function xB(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}TR({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:bB(t[0],e).text,color:n}}}),TR({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=bB(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=yz(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{xB(e);for(var n=NR(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];yB(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===`.`?RR(t,[`mopen`]):gB(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(yB(u)){var d=u.isMiddle;n[l]=gB(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=RR(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=gB(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),X([`minner`],n,t)},mathmlBuilder:(e,t)=>{xB(e);var n=QR(e.body,t);if(e.left!==`.`){var r=new Z(`mo`,[qR(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Z(`mo`,[qR(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return JR(n)}}),TR({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=bB(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=RR(t,[]):(n=lB(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===`|`?qR(`|`,`text`):qR(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var SB=(e,t)=>{var n=lR(zR(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=CI(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=KI({number:.6,unit:`pt`},t),l=KI({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=aR([`hide-tail`],[new tL([new nL(`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=hz(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=dR({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=dR({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)},CB=(e,t)=>{var n,r=new Z(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[ez(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};TR({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=yz(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:SB,mathmlBuilder:CB}),TR({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=yz(t[0],`color-token`).color,o=yz(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:SB,mathmlBuilder:CB}),TR({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]}}}),TR({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:SB,mathmlBuilder:CB}),TR({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:SB,mathmlBuilder:CB}),TR({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 wB={};function TB(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)wB[n[c]]=s;a&&(CR[t]=a),o&&(wR[t]=o)}var EB={};function Q(e,t){EB[e]=t}var DB=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}},OB=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,DB.range(this,t))}};function kB(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 AB=e=>{if(!e.parser.settings.displayMode)throw new V(`{`+e.envName+`} can be used only in display mode.`)},jB=new Set([`gather`,`gather*`]);function MB(e){if(!e.includes(`ed`))return!e.includes(`*`)}function NB(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 OB(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(kB(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(kB(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 FB=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(II.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?KI({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=zR(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=KI(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=[],ee,te,ne=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var re=s[n],ie=re.pos-E,ae=e.tags[n],oe=void 0;oe=ae===!0?X([`eqn-num`],[],t):ae===!1?X([],[],t):X([],NR(ae,t,!0),t),oe.depth=re.depth,oe.height=re.height,ne.push({type:`elem`,elem:oe,shift:ie})}for(r=0,te=0;r<o||te<D.length;++r,++te){for(var k=D[te],se=!0;(ce=k)?.type===`separator`;){var ce;if(se||(ee=X([`arraycolsep`],[]),ee.style.width=H(t.fontMetrics().doubleRuleSep),O.push(ee)),k.separator===`|`||k.separator===`:`){var le=k.separator===`|`?`solid`:`dashed`,ue=X([`vertical-separator`],[],t);ue.style.height=H(_),ue.style.borderRightWidth=H(l),ue.style.borderRightStyle=le,ue.style.margin=`0 `+H(-l/2);var de=_-E;de&&(ue.style.verticalAlign=H(-de)),O.push(ue)}else throw new V(`Invalid separator type: `+k.separator);te++,k=D[te],se=!1}if(!(r>=o)){var fe=void 0;(r>0||e.hskipBeforeAndAfter)&&(fe=k?.pregap??d,fe!==0&&(ee=X([`arraycolsep`],[]),ee.style.width=H(fe),O.push(ee)));var pe=[];for(n=0;n<i;++n){var me=s[n],he=me.cells[r];if(he){var ge=me.pos-E;he.depth=me.depth,he.height=me.height,pe.push({type:`elem`,elem:he,shift:ge})}}var _e=dR({positionType:`individualShift`,children:pe}),ve=X([`col-align-`+(k?.align||`c`)],[_e]);O.push(ve),(r<o-1||e.hskipBeforeAndAfter)&&(fe=k?.postgap??d,fe!==0&&(ee=X([`arraycolsep`],[]),ee.style.width=H(fe),O.push(ee)))}}var ye=X([`mtable`],O);if(c.length>0){for(var be=oR(`hline`,t,l),xe=oR(`hdashline`,t,l),Se=[{type:`elem`,elem:ye,shift:0}];c.length>0;){var Ce=c.pop(),we=Ce.pos-E;Ce.isDashed?Se.push({type:`elem`,elem:xe,shift:we}):Se.push({type:`elem`,elem:be,shift:we})}ye=dR({positionType:`individualShift`,children:Se})}if(ne.length===0)return X([`mord`],[ye],t);var Te=X([`tag`],[dR({positionType:`individualShift`,children:ne})],t);return cR([ye,Te])},IB={c:`center `,l:`left `,r:`right `},LB=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`,[ez(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+=IB[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},RB=function(e,t){e.envName.includes(`ed`)||AB(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=NB(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:MB(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=yz(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)yz(yz(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};TB({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(xz(t[0])?[t[0]]:yz(t[0],`ordgroup`).body).map(function(e){var t=bz(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 NB(e.parser,r,PB(e.envName))},htmlBuilder:FB,mathmlBuilder:LB}),TB({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=NB(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:FB,mathmlBuilder:LB}),TB({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=NB(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:FB,mathmlBuilder:LB}),TB({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(xz(t[0])?[t[0]]:yz(t[0],`ordgroup`).body).map(function(e){var t=bz(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=NB(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:FB,mathmlBuilder:LB}),TB({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=NB(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:FB,mathmlBuilder:LB}),TB({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:RB,htmlBuilder:FB,mathmlBuilder:LB}),TB({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){jB.has(e.envName)&&AB(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:MB(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return NB(e.parser,t,`display`)},htmlBuilder:FB,mathmlBuilder:LB}),TB({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:RB,htmlBuilder:FB,mathmlBuilder:LB}),TB({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){AB(e);var t={autoTag:MB(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return NB(e.parser,t,`display`)},htmlBuilder:FB,mathmlBuilder:LB}),TB({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return AB(e),Fz(e.parser)},htmlBuilder:FB,mathmlBuilder:LB}),Q(`\\nonumber`,`\\gdef\\@eqnsw{0}`),Q(`\\notag`,`\\nonumber`),TR({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 zB=wB;TR({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+=yz(i.body[o],`textord`).text;if(r===`\\begin`){if(!zB.hasOwnProperty(a))throw new V(`No such environment: `+a,i);var s=zB[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=yz(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 BB=(e,t)=>{var n=e.font,r=t.withFont(n);return zR(e.body,r)},VB=(e,t)=>{var n=e.font,r=t.withFont(n);return ez(e.body,r)},HB={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};TR({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=DR(t[0]),a=r;return a in HB&&(a=HB[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:BB,mathmlBuilder:VB}),TR({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:kz(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:CI(r)}}}),TR({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:BB,mathmlBuilder:VB});var UB=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=zR(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=zR(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=KI(e.barSize,t),u=oR(`frac-line`,t,d)):u=oR(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===II.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=dR({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=dR({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===II.DISPLAY.size?t.fontMetrics().delim1:n.size===II.SCRIPTSCRIPT.size?t.havingStyle(II.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?RR(t,[`mopen`]):hB(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?X([]):e.rightDelim==null?RR(t,[`mclose`]):hB(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return X([`mord`].concat(a.sizingClasses(t)),[x,X([`mfrac`],[g]),S],t)},WB=(e,t)=>{var n=new Z(`mfrac`,[ez(e.numer,t),ez(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=KI(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 UR(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Z(`mo`,[new UR(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return JR(i)}return n},GB=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;TR({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`),GB({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:UB,mathmlBuilder:WB}),TR({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 KB=[`display`,`text`,`script`,`scriptscript`],qB=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};TR({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=DR(t[0]),o=a.type===`atom`&&a.family===`open`?qB(a.text):null,s=DR(t[1]),c=s.type===`atom`&&s.family===`close`?qB(s.text):null,l=yz(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=yz(p.body[0],`textord`);f=KB[Number(m.text)]}}else p=yz(p,`textord`),f=KB[Number(p.text)];return GB({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),TR({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:yz(t[0],`size`).value,token:i}}}),TR({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=yz(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 JB=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?zR(e.sup,t.havingStyle(n.sup()),t):zR(e.sub,t.havingStyle(n.sub()),t),i=yz(e.base,`horizBrace`)):i=yz(e,`horizBrace`);var a=zR(i.base,t.havingBaseStyle(II.DISPLAY)),o=mz(i,t),s=i.isOver?dR({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):dR({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?dR({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):dR({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)};TR({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:JB,mathmlBuilder:(e,t)=>{var n=dz(e.label);return new Z(e.isOver?`mover`:`munder`,[ez(e.base,t),n])}}),TR({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=yz(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:OR(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=NR(e.body,t,!1);return sR(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=$R(e.body,t);return n instanceof Z||(n=new Z(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),TR({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=yz(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:OR(s)}}}),TR({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:OR(t[0])}},htmlBuilder(e,t){return cR(NR(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new Z(`mrow`,QR(e.body,t.withFont(``)))}}),TR({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=yz(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:OR(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=NR(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)=>$R(e.body,t)}),TR({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:OR(t[0]),mathml:OR(t[1])}},htmlBuilder:(e,t)=>cR(NR(e.html,t,!1)),mathmlBuilder:(e,t)=>$R(e.mathml,t)});var YB=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(!GI(n))throw new V(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};TR({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=yz(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=YB(d);break;case`height`:a=YB(d);break;case`totalheight`:o=YB(d);break;default:throw new V(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=yz(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=KI(e.height,t),r=0;e.totalheight.number>0&&(r=KI(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=KI(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=KI(e.height,t),i=0;if(e.totalheight.number>0&&(i=KI(e.totalheight,t)-r,n.setAttribute(`valign`,H(-i))),n.setAttribute(`height`,H(r+i)),e.width.number>0){var a=KI(e.width,t);n.setAttribute(`width`,H(a))}return n.setAttribute(`src`,e.src),n}}),TR({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=yz(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 fR(e.dimension,t)},mathmlBuilder(e,t){return new WR(KI(e.dimension,t))}}),TR({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([],[zR(e.body,t)]),n=X([`inner`],[n],t)):n=X([`inner`],[zR(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`,[ez(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}}),TR({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}}}),TR({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new V(`Mismatched `+e.funcName)}});var XB=(e,t)=>{switch(t.style.size){case II.DISPLAY.size:return e.display;case II.TEXT.size:return e.text;case II.SCRIPT.size:return e.script;case II.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};TR({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:OR(t[0]),text:OR(t[1]),script:OR(t[2]),scriptscript:OR(t[3])}},htmlBuilder:(e,t)=>cR(NR(XB(e,t),t,!1)),mathmlBuilder:(e,t)=>$R(XB(e,t),t)});var ZB=(e,t,n,r,i,a,o)=>{e=X([],[e]);var s=n&&CI(n),c,l;if(t){var u=zR(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=zR(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=dR({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=dR({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=dR({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)},QB=new Set([`\\smallint`]),$B=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=yz(e.base,`op`),i=!0):a=yz(e,`op`);var o=t.style,s=!1;o.size===II.DISPLAY.size&&a.symbol&&!QB.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=QL(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=gR(d+`Size`+(s?`2`:`1`),t);c=dR({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=NR(a.body,t,!0);p.length===1&&p[0]instanceof eL?(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($L(a.name[h],a.mode,t));c=X([`mop`],m,t)}var g=0,_=0;return(c instanceof eL||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?ZB(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=H(g)),c)},eV=(e,t)=>{var n;if(e.symbol)n=new Z(`mo`,[qR(e.name,e.mode)]),QB.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Z(`mo`,QR(e.body,t));else{n=new Z(`mi`,[new UR(e.name.slice(1))]);var r=new Z(`mo`,[qR(`⁡`,`text`)]);n=e.parentIsSupSub?new Z(`mrow`,[n,r]):HR([n,r])}return n},tV={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};TR({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=tV[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:$B,mathmlBuilder:eV}),TR({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:OR(r)}},htmlBuilder:$B,mathmlBuilder:eV});var nV={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};TR({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:$B,mathmlBuilder:eV}),TR({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:$B,mathmlBuilder:eV}),TR({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=nV[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:$B,mathmlBuilder:eV});var rV=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=yz(e.base,`operatorname`),i=!0):a=yz(e,`operatorname`);var o;if(a.body.length>0){for(var s=NR(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 eL&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=X([`mop`],s,t)}else o=X([`mop`],[],t);return i?ZB(o,n,r,t,t.style,0,0):o};TR({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:OR(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:rV,mathmlBuilder:(e,t)=>{for(var n=QR(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof WR)){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 UR?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new UR(n.map(e=>e.toText()).join(``))]);var s=new Z(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Z(`mo`,[qR(`⁡`,`text`)]);return e.parentIsSupSub?new Z(`mrow`,[s,c]):HR([s,c])}}),Q(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),ER({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?cR(NR(e.body,t,!1)):X([`mord`],NR(e.body,t,!0),t)},mathmlBuilder(e,t){return $R(e.body,t,!0)}}),TR({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=zR(e.body,t.havingCrampedStyle()),r=oR(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`overline`],[dR({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 UR(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Z(`mover`,[ez(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),TR({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:OR(r)}},htmlBuilder:(e,t)=>cR(NR(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new Z(`mphantom`,QR(e.body,t))}),Q(`\\hphantom`,`\\smash{\\phantom{#1}}`),TR({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`],[zR(e.body,t.withPhantom())]),X([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new Z(`mpadded`,[new Z(`mphantom`,QR(OR(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),TR({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=yz(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=zR(e.body,t);return dR({positionType:`shift`,positionData:-KI(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Z(`mpadded`,[ez(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),TR({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),TR({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=yz(t[0],`size`),o=yz(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&yz(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=X([`mord`,`rule`],[],t),r=KI(e.width,t),i=KI(e.height,t),a=e.shift?KI(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=KI(e.width,t),r=KI(e.height,t),i=e.shift?KI(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 iV(e,t,n){for(var r=NR(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 cR(r)}var aV=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];TR({type:`sizing`,names:aV,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:aV.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return iV(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new Z(`mstyle`,QR(e.body,n));return r.setAttribute(`mathsize`,H(n.sizeMultiplier)),r}}),TR({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]&&yz(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=bz(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([],[zR(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`],[dR({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new Z(`mpadded`,[ez(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),TR({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=zR(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=lR(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<II.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=iB(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=dR({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(II.SCRIPTSCRIPT),p=zR(e.index,f,t);return X([`mord`,`sqrt`],[X([`root`],[dR({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`,[ez(n,t),ez(r,t)]):new Z(`msqrt`,[ez(n,t)])}});var oV={display:II.DISPLAY,text:II.TEXT,script:II.SCRIPT,scriptscript:II.SCRIPTSCRIPT};function sV(e){return e in oV}TR({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(!sV(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=oV[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),iV(e.body,r,t)},mathmlBuilder(e,t){var n=oV[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new Z(`mstyle`,QR(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 cV=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===II.DISPLAY.size||n.alwaysHandleSupSub)?$B:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===II.DISPLAY.size||n.limits)?rV:null:n.type===`accent`?CI(n.base)?Cz:null:n.type===`horizBrace`&&!e.sub===n.isOver?JB:null:null};ER({type:`supsub`,htmlBuilder(e,t){var n=cV(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=zR(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&CI(r);if(i){var p=t.havingStyle(t.style.sup());s=zR(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=zR(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===II.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 eL||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=dR({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=dR({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=dR({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return X([LR(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=[ez(e.base,t)];e.sub&&a.push(ez(e.sub,t)),e.sup&&a.push(ez(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===II.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===II.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===II.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===II.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===II.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===II.DISPLAY)?`munder`:`msub`}return new Z(o,a)}}),ER({type:`atom`,htmlBuilder(e,t){return $L(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Z(`mo`,[qR(e.text,e.mode)]);if(e.family===`bin`){var r=XR(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 lV={mi:`italic`,mn:`normal`,mtext:`normal`};ER({type:`mathord`,htmlBuilder(e,t){return tR(e,t,`mathord`)},mathmlBuilder(e,t){var n=new Z(`mi`,[qR(e.text,e.mode,t)]),r=XR(e,t)||`italic`;return r!==lV[n.type]&&n.setAttribute(`mathvariant`,r),n}}),ER({type:`textord`,htmlBuilder(e,t){return tR(e,t,`textord`)},mathmlBuilder(e,t){var n=qR(e.text,e.mode,t),r=XR(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!==lV[i.type]&&i.setAttribute(`mathvariant`,r),i}});var uV={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},dV={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};ER({type:`spacing`,htmlBuilder(e,t){if(dV.hasOwnProperty(e.text)){var n=dV[e.text].className||``;if(e.mode===`text`){var r=tR(e,t,`textord`);return r.classes.push(n),r}return X([`mspace`,n],[$L(e.text,e.mode,t)],t)}if(uV.hasOwnProperty(e.text))return X([`mspace`,uV[e.text]],[],t);throw new V(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(dV.hasOwnProperty(e.text))n=new Z(`mtext`,[new UR(`\xA0`)]);else if(uV.hasOwnProperty(e.text))return new Z(`mspace`);else throw new V(`Unknown type of space "`+e.text+`"`);return n}});var fV=()=>{var e=new Z(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};ER({type:`tag`,mathmlBuilder(e,t){var n=new Z(`mtable`,[new Z(`mtr`,[fV(),new Z(`mtd`,[$R(e.body,t)]),fV(),new Z(`mtd`,[$R(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var pV={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},mV={"\\textbf":`textbf`,"\\textmd":`textmd`},hV={"\\textit":`textit`,"\\textup":`textup`},gV=(e,t)=>{var n=e.font;return n?pV[n]?t.withTextFontFamily(pV[n]):mV[n]?t.withTextFontWeight(mV[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(hV[n]):t};TR({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:OR(i),font:r}},htmlBuilder(e,t){var n=gV(e,t);return X([`mord`,`text`],NR(e.body,n,!0),n)},mathmlBuilder(e,t){var n=gV(e,t);return $R(e.body,n)}}),TR({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=zR(e.body,t),r=oR(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return X([`mord`,`underline`],[dR({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 UR(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Z(`munder`,[ez(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),TR({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=zR(e.body,t),r=t.fontMetrics().axisHeight;return dR({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`,[ez(e.body,t)],[`vcenter`])])}}),TR({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=_V(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(QL(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return X([`mord`,`text`].concat(i.sizingClasses(t)),rR(r),i)},mathmlBuilder(e,t){var n=new Z(`mtext`,[new UR(_V(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var _V=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),vV=SR,yV=`[ \r
495
+ ]`,bV=`\\\\[a-zA-Z@]+`,xV=`\\\\[^\ud800-\udfff]`,SV=`(`+bV+`)`+yV+`*`,CV=`\\\\(
496
+ |[ \r ]+
497
+ ?)[ \r ]*`,wV=`[̀-ͯ]`,TV=RegExp(wV+`+$`),EV=`(`+yV+`+)|`+(CV+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(wV+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(wV+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+SV)+(`|`+xV+`)`),DV=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(EV,`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 OB(`EOF`,new DB(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new V(`Unexpected character: '`+e[t]+`'`,new OB(e[t],new DB(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 OB(r,new DB(this,t,this.tokenRegex.lastIndex))}},OV=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}},kV=EB;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 AV={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=AV[t.text],r==null||r>=n)throw new V(`Invalid base-`+n+` digit `+t.text);for(var i;(i=AV[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var jV=(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=>jV(e,!1,!0,!1)),Q(`\\renewcommand`,e=>jV(e,!0,!1,!1)),Q(`\\providecommand`,e=>jV(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),vV[n],lL.math[n],lL.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 MV={",":`\\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`},NV=new Set([`bin`,`rel`]);Q(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in MV?t=MV[n]:(n.slice(0,4)===`\\not`||n in lL.math&&NV.has(lL.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 FV=H(iL[`Main-Regular`][84][1]-.7*iL[`Main-Regular`][65][1]);Q(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+FV+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),Q(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+FV+`}{\\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 IV=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`,IV(!1)),Q(`\\bra@set`,IV(!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 LV={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},RV=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 OV(kV,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new DV(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 OB(`EOF`,n.loc)),this.pushTokens(r),new OB(``,DB.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 OB(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 DV(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)||vV.hasOwnProperty(e)||lL.math.hasOwnProperty(e)||lL.text.hasOwnProperty(e)||LV.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?vV.hasOwnProperty(e)&&!vV[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},zV=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,BV=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),VV={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},HV={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},UV=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 RV(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 OB(`}`)),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&&vV[i.text]&&vV[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(BV[i.text]){var s=zV.test(i.text),c=[];for(c.push(new OB(BV[i.text])),this.consume();;){var l=this.fetch().text;if(!BV[l]||zV.test(l)!==s)break;c.unshift(new OB(BV[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=vV[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=vV[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(!GI(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:DB.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!LV.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:DB.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:DB.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:DB.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}}HV.hasOwnProperty(t[0])&&!lL[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=HV[t[0]]+t.slice(1));var i=TV.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(lL[this.mode][t]){this.settings.strict&&this.mode===`math`&&PL.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=lL[this.mode][t].group,s=DB.range(e);a=vz(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&&(zI(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:DB.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(!VV[l])throw new V(`Unknown accent ' `+l+`'`,e);var u=VV[l][this.mode]||VV[l].text;if(!u)throw new V(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:DB.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};UV.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var WV=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new UV(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 OB(`\\df@tag`)])}]}return r},GV=function(e,t,n){t.textContent=``;var r=YV(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.`),GV=function(){throw new V(`KaTeX doesn't work in quirks mode.`)});var KV=function(e,t){return YV(e,t).toMarkup()},qV=function(e,t){return WV(e,new TI(t))},JV=function(e,t,n){if(n.throwOnError||!(e instanceof V))throw e;var r=X([`katex-error`],[new eL(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},YV=function(e,t){var n=new TI(t);try{return cz(WV(e,n),e,n)}catch(t){return JV(t,e,n)}},XV={version:`0.16.47`,render:GV,renderToString:KV,ParseError:V,SETTINGS_SCHEMA:wI,__parse:qV,__renderToDomTree:YV,__renderToHTMLTree:function(e,t){var n=new TI(t);try{return lz(WV(e,n),e,n)}catch(t){return JV(t,e,n)}},__setFontMetrics:$re,__defineSymbol:U,__defineFunction:TR,__defineMacro:Q,__domTree:{Span:QI,Anchor:$I,SymbolNode:eL,SvgNode:tL,PathNode:nL,LineNode:rL}};function ZV(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 QV=uH(/[A-Za-z]/),$V=uH(/[\dA-Za-z]/),eH=uH(/[#-'*+\--9=?A-Z^-~]/);function tH(e){return e!==null&&(e<32||e===127)}var nH=uH(/\d/),rH=uH(/[\dA-Fa-f]/),iH=uH(/[!-/:-@[-`{-~]/);function aH(e){return e!==null&&e<-2}function oH(e){return e!==null&&(e<0||e===32)}function sH(e){return e===-2||e===-1||e===32}var cH=uH(/\p{P}|\p{S}/u),lH=uH(/\s/);function uH(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function dH(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var fH=(function(e){if(e==null)return _H;if(typeof e==`function`)return gH(e);if(typeof e==`object`)return Array.isArray(e)?pH(e):mH(e);if(typeof e==`string`)return hH(e);throw Error(`Expected function, string, or object as test`)});function pH(e){let t=[],n=-1;for(;++n<e.length;)t[n]=fH(e[n]);return gH(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function mH(e){let t=e;return gH(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function hH(e){return gH(t);function t(t){return t&&t.type===e}}function gH(e){return t;function t(t,n,r){return!!(vH(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function _H(){return!0}function vH(e){return typeof e==`object`&&!!e&&`type`in e}function yH(e){return e}var bH=[],xH=`skip`;function SH(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=fH(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 (`+yH(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=bH;if(s&&r&&(o=CH(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=CH(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 CH(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?bH:[e]}function wH(e,t,n){let r=fH((n||{}).ignore||[]),i=TH(t),a=-1;for(;++a<i.length;)SH(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 xH}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 TH(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([EH(e[0]),DH(e[1])])}return t}function EH(e){return typeof e==`string`?new RegExp(dH(e),`g`):e}function DH(e){return typeof e==`function`?e:function(){return e}}var OH=`phrasing`,kH=[`autolink`,`link`,`image`,`label`];function AH(){return{transforms:[RH],enter:{literalAutolink:MH,literalAutolinkEmail:NH,literalAutolinkHttp:NH,literalAutolinkWww:NH},exit:{literalAutolink:LH,literalAutolinkEmail:IH,literalAutolinkHttp:PH,literalAutolinkWww:FH}}}function jH(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:OH,notInConstruct:kH},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:OH,notInConstruct:kH},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:OH,notInConstruct:kH}]}}function MH(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function NH(e){this.config.enter.autolinkProtocol.call(this,e)}function PH(e){this.config.exit.autolinkProtocol.call(this,e)}function FH(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 IH(e){this.config.exit.autolinkEmail.call(this,e)}function LH(e){this.exit(e)}function RH(e){wH(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zH],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,BH]],{ignore:[`link`,`linkReference`]})}function zH(e,t,n,r,i){let a=``;if(!UH(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!VH(n)))return!1;let o=HH(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 BH(e,t,n,r){return!UH(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function VH(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 HH(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=ZV(e,`(`),a=ZV(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 UH(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||lH(n)||cH(n))&&(!t||n!==47)}function WH(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}eU.peek=$H;function GH(){this.buffer()}function KH(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function qH(){this.buffer()}function JH(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function YH(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=WH(this.sliceSerialize(e)).toLowerCase(),n.label=t}function XH(e){this.exit(e)}function ZH(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=WH(this.sliceSerialize(e)).toLowerCase(),n.label=t}function QH(e){this.exit(e)}function $H(){return`[`}function eU(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 tU(){return{enter:{gfmFootnoteCallString:GH,gfmFootnoteCall:KH,gfmFootnoteDefinitionLabelString:qH,gfmFootnoteDefinition:JH},exit:{gfmFootnoteCallString:YH,gfmFootnoteCall:XH,gfmFootnoteDefinitionLabelString:ZH,gfmFootnoteDefinition:QH}}}function nU(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:eU},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?iU:rU))),s(),o}}function rU(e,t,n){return t===0?e:iU(e,t,n)}function iU(e,t,n){return(n?``:` `)+e}var aU=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];uU.attention=dU,uU.peek=fU;function oU(){return{canContainEols:[`delete`],enter:{strikethrough:cU},exit:{strikethrough:lU}}}function sU(){return{handlers:{delete:uU},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:aU}]}}function cU(e){this.enter({type:`delete`,children:[],position:void 0},e)}function lU(e){this.exit(e)}function uU(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 dU(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function fU(){return`~`}function pU(e){return e.length}function mU(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||pU,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=hU(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]=gU(r[d]);else{let e=gU(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 hU(e){return e==null?``:String(e)}function gU(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 _U=fH([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function vU(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()),yU);return i(),o}function yU(e,t,n){return`>`+(n?``:` `)+e}function bU(e,t){return xU(e,t.inConstruct,!0)&&!xU(e,t.notInConstruct,!1)}function xU(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 SU(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&&bU(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
503
+ `}function CU(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 wU(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 TU(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function EU(e,t,n,r){let i=TU(n),a=e.value||``;if(wU(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,DU);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(CU(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 DU(e,t,n){return(n?``:` `)+e}function OU(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function kU(e,t,n,r){let i=OU(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 AU(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function jU(e){if(e===null||oH(e)||lH(e))return 1;if(cH(e))return 2}function MU(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function NU(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 FU(e,t,n){let r=jU(e),i=jU(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 IU=`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(`.`),LU=[`pre`,`script`,`style`,`textarea`];function RU(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:QV(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!QV(a))return;for(;a===45||$V(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&LU.includes(o)?1:IU.includes(o)?6:7}var zU=new Map([[`*`,!1],[`_`,!0]]);function BU(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 VU(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=zU.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=jU(u.charCodeAt(u.length-1)),f=jU((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(WU(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:BU(e,t,a),index:o}}}function HU(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?MU(n.value):NU(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 UU(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=JU(e,c,r,i),u=VU(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function WU(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 GU(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(!iH(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 KU(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?MU(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`&&RU(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(YU(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=qU(l,f.attention,t,c);a.push(e),s=NU(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=NU(n)}}return r.pop(),a}function qU(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=GU(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=KU(e,n,{...r.current(),before:c,after:c});return r.move(YU(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function JU(e,t,n,r){let i=[],a,o=NU(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===MU(n)&&HU([e],!0),a=void 0,i.push(e),e.value&&(o=NU(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=MU(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=JU(n.children,t,c,c),m=p.length>0?p[0].value:``,h=FU(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&HU(p,!0);let g=p.length>0?NU(p[p.length-1].value):``,_=FU(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&HU(p,!1),h.outside&&d!==`
509
+ `&&d!==`\r`&&HU(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 YU(e,t,n){let r=new Map,i=JU(e,r,t,n),a=i,o=VU(a,t,n);for(;o;){let s=UU(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}XU.attention=ZU,XU.peek=QU;function XU(e,t,n,r){let i=n.enter(`phrasing`),a=YU([qU(e,ZU,n,n.createTracker(r))],r.before,r.after);return i(),a}function ZU(e,t){return{construct:`emphasis`,markers:AU(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function QU(e,t,n){return n.options.emphasis||`*`}function $U(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`?SH(e,i,tW(a),o):SH(e,i,eW(a),o)}function eW(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?tW(e.enter):e.enter,exit:typeof e.exit==`function`?tW(e.exit):e.exit}}function tW(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var nW={};function rW(e,t){let n=t||nW;return iW(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function iW(e,t,n){if(oW(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 aW(e.children,t,n)}return Array.isArray(e)?aW(e,t,n):``}function aW(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=iW(e[i],t,n);return r.join(``)}function oW(e){return!!(e&&typeof e==`object`)}function sW(e,t){let n=!1;return $U(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)&&rW(e)&&(t.options.setext||n))}function cW(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(sW(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}lW.peek=uW;function lW(e){return e.value||``}function uW(){return`<`}dW.peek=fW;function dW(e,t,n,r){let i=OU(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 fW(){return`!`}pW.peek=mW;function pW(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 mW(){return`!`}hW.peek=gW;function hW(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 gW(){return"`"}function _W(e,t){let n=rW(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))}vW.peek=yW;function vW(e,t,n,r){let i=OU(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(_W(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 yW(e,t,n){return _W(e,n)?`<`:`[`}bW.peek=xW;function bW(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 xW(){return`[`}function SW(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 CW(e){let t=SW(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 wW(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function TW(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 EW(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?wW(n):SW(n),s=e.ordered?o===`.`?`)`:`.`:CW(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),TW(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 DW(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 OW(e,t,n,r){let i=DW(n),a=n.bulletCurrent||SW(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 kW(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function AW(e,t,n,r){if(!e.children.some(function(e){return _U(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function jW(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}MW.attention=NW,MW.peek=PW;function MW(e,t,n,r){let i=n.enter(`phrasing`),a=YU([qU(e,NW,n,n.createTracker(r))],r.before,r.after);return i(),a}function NW(e,t){return{construct:`strong`,markers:jW(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function PW(e,t,n){return n.options.strong||`*`}function FW(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 IW(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 LW(e,t,n){let r=(TW(n)+(n.options.ruleSpaces?` `:``)).repeat(IW(n));return n.options.ruleSpaces?r.slice(0,-1):r}var RW={blockquote:vU,break:SU,code:EU,definition:kU,emphasis:XU,hardBreak:SU,heading:cW,html:lW,image:dW,imageReference:pW,inlineCode:hW,link:vW,linkReference:bW,list:EW,listItem:OW,paragraph:kW,root:AW,strong:MW,text:FW,thematicBreak:LW},zW=document.createElement(`i`);function BW(e){let t=`&`+e+`;`;zW.innerHTML=t;let n=zW.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function VW(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 HW=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function UW(e){return e.replace(HW,WW)}function WW(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return VW(n.slice(t?2:1),t?16:10)}return BW(n)||e}function GW(){return{enter:{table:KW,tableData:XW,tableHeader:XW,tableRow:JW},exit:{codeText:ZW,table:qW,tableData:YW,tableHeader:YW,tableRow:YW}}}function KW(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 qW(e){this.exit(e),this.data.inTable=void 0}function JW(e){this.enter({type:`tableRow`,children:[]},e)}function YW(e){this.exit(e)}function XW(e){this.enter({type:`tableCell`,children:[]},e)}function ZW(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,QW));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function QW(e,t){return t===`|`?t:e}function $W(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 mU(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=RW.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function eG(){return{exit:{taskListCheckValueChecked:nG,taskListCheckValueUnchecked:nG,paragraph:rG}}}function tG(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:iG}}}function nG(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function rG(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 iG(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=RW.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 aG(){return[AH(),tU(),oU(),GW(),eG()]}function oG(e){return{extensions:[jH(),nU(e),sU(),$W(e),tG()]}}function sG(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 cG(e,t){return e.length>0?(sG(e,e.length,0,t),e):t}var lG={}.hasOwnProperty;function uG(e){let t={},n=-1;for(;++n<e.length;)dG(t,e[n]);return t}function dG(e,t){let n;for(n in t){let r=(lG.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){lG.call(r,a)||(r[a]=[]);let e=i[a];fG(r[a],Array.isArray(e)?e:e?[e]:[])}}}function fG(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);sG(e,0,0,r)}var pG={tokenize:DG,partial:!0},mG={tokenize:OG,partial:!0},hG={tokenize:kG,partial:!0},gG={tokenize:AG,partial:!0},_G={tokenize:jG,partial:!0},vG={name:`wwwAutolink`,tokenize:TG,previous:MG},yG={name:`protocolAutolink`,tokenize:EG,previous:NG},bG={name:`emailAutolink`,tokenize:wG,previous:PG},xG={};function SG(){return{text:xG}}for(var CG=48;CG<123;)xG[CG]=bG,CG++,CG===58?CG=65:CG===91&&(CG=97);xG[43]=bG,xG[45]=bG,xG[46]=bG,xG[95]=bG,xG[72]=[bG,yG],xG[104]=[bG,yG],xG[87]=[bG,vG],xG[119]=[bG,vG];function wG(e,t,n){let r=this,i,a;return o;function o(t){return!FG(t)||!PG.call(r,r.previous)||IG(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return FG(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(_G,u,l)(t):t===45||t===95||$V(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&&QV(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function TG(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!MG.call(r,r.previous)||IG(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(pG,e.attempt(mG,e.attempt(hG,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function EG(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&NG.call(r,r.previous)&&!IG(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(QV(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||tH(t)||oH(t)||lH(t)||cH(t)?n(t):e.attempt(mG,e.attempt(hG,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function DG(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 OG(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(gG,c,s)(t):t===null||oH(t)||lH(t)||t!==45&&cH(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 kG(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(gG,t,a)(o):o===null||oH(o)||lH(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function AG(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||oH(o)||lH(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||oH(e)||lH(e)?t(e):r(e)}function a(e){return QV(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):QV(t)?(e.consume(t),o):n(t)}}function jG(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return $V(e)?n(e):t(e)}}function MG(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oH(e)}function NG(e){return!QV(e)}function PG(e){return!(e===47||FG(e))}function FG(e){return e===43||e===45||e===46||e===95||$V(e)}function IG(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 LG(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&$V(e.charCodeAt(n+1))&&$V(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 RG(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 zG={name:`attention`,resolveAll:BG,tokenize:VG};function BG(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};HG(o,-a),HG(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=cG(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=cG(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=cG(r,RG(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=cG(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=cG(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),sG(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 VG(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=jU(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=jU(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 HG(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var UG={name:`autolink`,tokenize:WG};function WG(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 QV(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||$V(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||$V(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||tH(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):eH(t)?(e.consume(t),l):n(t)}function u(e){return $V(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||$V(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function GG(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return sH(r)?(e.enter(n),s(r)):t(r)}function s(r){return sH(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function KG(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&sH(t)?(e.enter(r),c(t)):l(t)}function c(t){return sH(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var qG={partial:!0,tokenize:JG};function JG(e,t,n){return r;function r(t){return sH(t)?GG(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||aH(e)?t(e):n(e)}}var YG={continuation:{tokenize:ZG},exit:QG,name:`blockQuote`,tokenize:XG};function XG(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 sH(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ZG(e,t,n){let r=this;return i;function i(t){return sH(t)?GG(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(YG,t,n)(r)}}function QG(e){e.exit(`blockQuote`)}var $G={name:`characterEscape`,tokenize:eK};function eK(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 iH(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var tK={name:`characterReference`,tokenize:nK};function nK(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=$V,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=rH,u):(e.enter(`characterReferenceValue`),a=7,o=nH,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===$V&&!BW(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 rK={partial:!0,tokenize:iK};function iK(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 aK={concrete:!0,name:`codeFenced`,tokenize:oK};function oK(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`),sH(t)?GG(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||aH(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(rK,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||aH(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):sH(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),GG(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||aH(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||aH(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&&sH(t)?GG(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||aH(t)?e.check(rK,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||aH(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`),sH(t)?GG(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`),sH(t)?GG(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||aH(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var sK={name:`codeIndented`,tokenize:lK},cK={partial:!0,tokenize:uK};function lK(e,t,n){return r;function r(t){return e.enter(`codeIndented`),KG(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):aH(t)?e.attempt(cK,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||aH(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function uK(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):aH(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):KG(e,t,a,`linePrefix`,4,4)(o)}function a(e){return aH(e)?i(e):n(e)}}var dK={name:`codeText`,previous:pK,resolve:fK,tokenize:mK};function fK(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 pK(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function mK(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)):aH(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||aH(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 hK=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&&gK(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),gK(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),gK(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);gK(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);gK(this.left,t.reverse())}}}};function gK(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 _K(e){let t={},n=-1,r,i,a,o,s,c,l,u=new hK(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,vK(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 sG(e,0,1/0,u.slice(0)),!l}function vK(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 yK={resolve:xK,tokenize:SK},bK={partial:!0,tokenize:CK};function xK(e){return _K(e),e}function SK(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):aH(t)?e.check(bK,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 CK(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),GG(e,a,`linePrefix`)}function a(i){if(i===null||aH(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 wK(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||tH(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||aH(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||oH(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||tH(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 TK(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):aH(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||aH(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!sH(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function EK(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):aH(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),GG(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||aH(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 DK(e,t){let n;return r;function r(i){return aH(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):sH(i)?GG(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var OK={name:`definition`,tokenize:AK},kK={partial:!0,tokenize:jK};function AK(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return TK.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=WH(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 oH(t)?DK(e,l)(t):l(t)}function l(t){return wK(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(kK,d,d)(t)}function d(t){return sH(t)?GG(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||aH(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function jK(e,t,n){return r;function r(t){return oH(t)?DK(e,i)(t):n(t)}function i(t){return EK(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return sH(t)?GG(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||aH(e)?t(e):n(e)}}var MK={name:`hardBreakEscape`,tokenize:NK};function NK(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return aH(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var PK={name:`headingAtx`,resolve:FK,tokenize:IK};function FK(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`};sG(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function IK(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||oH(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||aH(n)?(e.exit(`atxHeading`),t(n)):sH(n)?GG(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||oH(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var LK={concrete:!0,name:`htmlFlow`,resolveTo:zK,tokenize:BK},RK={partial:!0,tokenize:VK};function zK(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 BK(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:k):QV(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):QV(a)?(e.consume(a),i=4,r.interrupt?t:k):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:k):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 QV(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||oH(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&LU.includes(l)?(i=1,r.interrupt?t(s):O(s)):IU.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||$V(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 sH(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||QV(t)?(e.consume(t),b):sH(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||$V(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):sH(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):sH(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||aH(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||oH(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||sH(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||aH(t)?O(t):sH(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),re):t===60&&i===1?(e.consume(t),ie):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),k):t===93&&i===5?(e.consume(t),oe):aH(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(RK,ce,ee)(t)):t===null||aH(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(rK,te,ce)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return t===null||aH(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function re(t){return t===45?(e.consume(t),k):O(t)}function ie(t){return t===47?(e.consume(t),o=``,ae):O(t)}function ae(t){if(t===62){let n=o.toLowerCase();return LU.includes(n)?(e.consume(t),se):O(t)}return QV(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):O(t)}function oe(t){return t===93?(e.consume(t),k):O(t)}function k(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),k):O(t)}function se(t){return t===null||aH(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function VK(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(qG,t,n)}}var HK={name:`htmlText`,tokenize:UK};function UK(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):QV(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):QV(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):aH(t)?(o=d,ie(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?re(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):aH(t)?(o=h,ie(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?re(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?re(t):aH(t)?(o=v,ie(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):aH(t)?(o=y,ie(t)):(e.consume(t),y)}function b(e){return e===62?re(e):y(e)}function x(t){return QV(t)?(e.consume(t),S):n(t)}function S(t){return t===45||$V(t)?(e.consume(t),S):C(t)}function C(t){return aH(t)?(o=C,ie(t)):sH(t)?(e.consume(t),C):re(t)}function w(t){return t===45||$V(t)?(e.consume(t),w):t===47||t===62||oH(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),re):t===58||t===95||QV(t)?(e.consume(t),E):aH(t)?(o=T,ie(t)):sH(t)?(e.consume(t),T):re(t)}function E(t){return t===45||t===46||t===58||t===95||$V(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):aH(t)?(o=D,ie(t)):sH(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,ee):aH(t)?(o=O,ie(t)):sH(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,ne):t===null?n(t):aH(t)?(o=ee,ie(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||oH(t)?T(t):(e.consume(t),te)}function ne(e){return e===47||e===62||oH(e)?T(e):n(e)}function re(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ie(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return sH(t)?GG(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}var WK={name:`labelEnd`,resolveAll:JK,resolveTo:YK,tokenize:XK},GK={tokenize:ZK},KK={tokenize:QK},qK={tokenize:$K};function JK(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&&sG(e,0,e.length,n),e}function YK(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=cG(o,e.slice(i+1,i+r+3)),o=cG(o,[[`enter`,l,t]]),o=cG(o,RG(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=cG(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=cG(o,e.slice(a+1)),o=cG(o,[[`exit`,s,t]]),sG(e,i,e.length,o),e}function XK(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(WH(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(GK,u,o?u:d)(t):t===91?e.attempt(KK,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(qK,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function ZK(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 oH(t)?DK(e,a)(t):a(t)}function a(t){return t===41?u(t):wK(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return oH(t)?DK(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?EK(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return oH(t)?DK(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 QK(e,t,n){let r=this;return i;function i(t){return TK.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(WH(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function $K(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 eq={name:`labelStartImage`,resolveAll:WK.resolveAll,tokenize:tq};function tq(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 nq={name:`labelStartLink`,resolveAll:WK.resolveAll,tokenize:rq};function rq(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 iq={name:`lineEnding`,tokenize:aq};function aq(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),GG(e,t,`linePrefix`)}}var oq={name:`thematicBreak`,tokenize:sq};function sq(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||aH(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),sH(t)?GG(e,s,`whitespace`)(t):s(t))}}var cq={continuation:{tokenize:fq},exit:mq,name:`list`,tokenize:dq},lq={partial:!0,tokenize:hq},uq={partial:!0,tokenize:pq};function dq(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:nH(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(oq,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 nH(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(qG,r.interrupt?n:u,e.attempt(lq,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return sH(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 fq(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(qG,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,GG(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!sH(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(uq,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,GG(e,e.attempt(cq,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function pq(e,t,n){let r=this;return GG(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 mq(e){e.exit(this.containerState.type)}function hq(e,t,n){let r=this;return GG(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!sH(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var gq=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){_q(this,e,t,n,!1)}addBefore(e,t,n){_q(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 _q(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 vq={name:`setextUnderline`,resolveTo:yq,tokenize:bq};function yq(e,t){let n=new gq,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 bq(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`),sH(t)?GG(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||aH(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var xq={tokenize:kq,partial:!0};function Sq(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Eq,continuation:{tokenize:Dq},exit:Oq}},text:{91:{name:`gfmFootnoteCall`,tokenize:Tq},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Cq,resolveTo:wq}}}}function Cq(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=WH(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 wq(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 Tq(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||oH(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(WH(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return oH(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 Eq(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||oH(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=WH(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return oH(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),GG(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Dq(e,t,n){return e.check(qG,t,e.attempt(xq,t,n))}function Oq(e){e.exit(`gfmFootnoteDefinition`)}function kq(e,t,n){let r=this;return GG(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 Aq(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&&sG(o,o.length,0,RG(s,e.slice(r+1,n),t)),sG(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),sG(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=jU(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=jU(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var jq=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Mq(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 Mq(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 Nq(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:Fq,resolveAll:Iq}}}}function Fq(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):aH(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):sH(t)?GG(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||oH(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,sH(t)?GG(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 sH(t)?GG(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||aH(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 sH(t)?GG(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||aH(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||aH(n)?(e.exit(`tableRow`),t(n)):sH(n)?GG(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||oH(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 Iq(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 jq;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Rq(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=Lq(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=Lq(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=Lq(f,t,o,i,n,d)):(o[0]=o[1],d=Lq(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Rq(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=Nq(t.events,n))}return e}function Lq(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},zq(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=zq(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=zq(t.events,n[2]),a=zq(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({},zq(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Rq(e,t,n,r,i){let a=[],o=zq(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 zq(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Bq={name:`tasklistCheck`,tokenize:Hq};function Vq(){return{text:{91:Bq}}}function Hq(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 oH(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 aH(r)?t(r):sH(r)?e.check({tokenize:Uq},t,n)(r):n(r)}}function Uq(e,t,n){return GG(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Wq(e){return uG([SG(),Sq(),Aq(e),Pq(),Vq()])}var Gq={};function Kq(e){let t=this,n=e||Gq,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Wq(n)),a.push(aG()),o.push(oG(n))}function qq(){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 Jq(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(CU(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 Yq={tokenize:Zq,concrete:!0,name:`mathFlow`},Xq={tokenize:Qq,partial:!0};function Zq(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`),GG(e,l,`whitespace`)(t))}function l(t){return t===null||aH(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||aH(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(Xq,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?GG(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):aH(t)?e.attempt(Xq,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||aH(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 GG(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`),GG(e,c,`whitespace`)(t))}function c(r){return r===null||aH(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function Qq(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 $q(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:eJ,previous:tJ,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):aH(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||aH(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 eJ(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 tJ(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function nJ(e){return{flow:{36:Yq},text:{36:$q(e)}}}var rJ={};function iJ(e){let t=this,n=e||rJ,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(nJ(n)),a.push(qq()),o.push(Jq(n))}var aJ={tokenize:oJ};function oJ(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`),GG(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 aH(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var sJ={tokenize:lJ},cJ={tokenize:uJ};function lJ(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 gq;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(cJ,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(cJ,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 aH(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 gq;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 uJ(e,t,n){return GG(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var dJ={tokenize:fJ};function fJ(e){let t=this,n=e.attempt(qG,r,e.attempt(this.parser.constructs.flowInitial,i,GG(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yK,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 pJ={resolveAll:_J()},mJ=gJ(`string`),hJ=gJ(`text`);function gJ(e){return{resolveAll:_J(e===`text`?vJ: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 _J(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 vJ(e,t){let n=new gq,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 yJ=s({attentionMarkers:()=>DJ,contentInitial:()=>xJ,disable:()=>OJ,document:()=>bJ,flow:()=>CJ,flowInitial:()=>SJ,insideSpan:()=>EJ,string:()=>wJ,text:()=>TJ}),bJ={42:cq,43:cq,45:cq,48:cq,49:cq,50:cq,51:cq,52:cq,53:cq,54:cq,55:cq,56:cq,57:cq,62:YG},xJ={91:OK},SJ={[-2]:sK,[-1]:sK,32:sK},CJ={35:PK,42:oq,45:[vq,oq],60:LK,61:vq,95:oq,96:aK,126:aK},wJ={38:tK,92:$G},TJ={[-5]:iq,[-4]:iq,[-3]:iq,33:eq,38:tK,42:zG,60:[UG,HK],91:nq,92:[MK,$G],93:WK,95:zG,96:dK},EJ={null:[zG,pJ]},DJ={null:[42,95]},OJ={null:[]};function kJ(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=cG(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=RG(a,l.events,l),l.events):[]}function f(e,t){return jJ(p(e),t)}function p(e){return AJ(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){aH(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&&sG(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 AJ(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 jJ(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 MJ(e){let t={constructs:uG([yJ,...(e||{}).extensions||[]]),content:n(aJ),defined:[],document:n(sJ),flow:n(dJ),lazy:{},string:n(mJ),text:n(hJ)};return t;function n(e){return n;function n(n){return kJ(t,e,n)}}}function NJ(e){for(;!_K(e););return e}var PJ=/[\0\t\n\r]/g;function FJ(){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 IJ={}.hasOwnProperty;function LJ(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),RJ(n)(NJ(MJ(n).document().write(FJ()(e,t,!0))))}function RJ(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(Ee),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(Se),blockQuote:o(_e),characterEscape:E,characterReference:E,codeFenced:o(ve),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ve,s),codeText:o(ye,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(be),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(xe),hardBreakEscape:o(Ce),hardBreakTrailing:o(Ce),htmlFlow:o(we,s),htmlFlowData:E,htmlText:o(we,s),htmlTextData:E,image:o(Te),label:s,link:o(Ee),listItem:o(Oe),listItemValue:p,listOrdered:o(De,f),listUnordered:o(De),paragraph:o(ke),reference:ue,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Se),strong:o(Ae),thematicBreak:o(Me)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ge,autolinkProtocol:he,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:me,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(re),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(ee),hardBreakTrailing:l(ee),htmlFlow:l(te),htmlFlowData:D,htmlText:l(ne),htmlTextData:D,image:l(ae),label:k,labelText:oe,lineEnding:O,link:l(ie),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:de,resourceDestinationString:se,resourceTitleString:ce,resource:le,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};BJ(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]),IJ.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]||HJ).call(o,void 0,e[0])}for(r.position={start:zJ(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:zJ(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:zJ(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]||HJ).call(this,e,r[0])),n.position.end=zJ(e.end)}function d(){return rW(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=WH(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=je(),n.position={start:zJ(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=zJ(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=zJ(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 ee(){this.data.atHardBreak=!0}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.resume(),t=this.stack[this.stack.length-1];t.value=e}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(){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 oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=UW(t),n.identifier=WH(t).toLowerCase()}function k(){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 se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function le(){this.data.inReference=void 0}function ue(){this.data.referenceType=`collapsed`}function de(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=WH(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function fe(e){this.data.characterReferenceType=e.type}function pe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=VW(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=BW(t);let i=this.stack[this.stack.length-1];i.value+=r}function me(e){let t=this.stack.pop();t.position.end=zJ(e.end)}function he(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ge(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function _e(){return{type:`blockquote`,children:[],position:void 0}}function ve(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ye(){return{type:`inlineCode`,value:``,position:void 0}}function be(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function xe(){return{type:`emphasis`,children:[],position:void 0}}function Se(){return{type:`heading`,depth:0,children:[],position:void 0}}function Ce(){return{type:`break`,position:void 0}}function we(){return{type:`html`,value:``,position:void 0}}function Te(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function Ee(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function De(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function Oe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ke(){return{type:`paragraph`,children:[],position:void 0}}function Ae(){return{type:`strong`,children:[],position:void 0}}function je(){return{type:`text`,value:``,position:void 0}}function Me(){return{type:`thematicBreak`,position:void 0}}}function zJ(e){return{line:e.line,column:e.column,offset:e.offset}}function BJ(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?BJ(e,r):VJ(e,r)}}function VJ(e,t){let n;for(n in t)if(IJ.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 HJ(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 UJ(e){let t=this;t.parser=n;function n(n){return LJ(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function WJ(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 GJ(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
524
+ `}]}function KJ(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 qJ(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JJ(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YJ(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=LG(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 XJ(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 ZJ(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function QJ(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 $J(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return QJ(e,t);let i={src:LG(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 eY(e,t){let n={src:LG(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 tY(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 nY(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return QJ(e,t);let i={href:LG(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 rY(e,t){let n={href:LG(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 iY(e,t,n){let r=e.all(t),i=n?aY(n):oY(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 aY(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=oY(n[r])}return t}function oY(e){return e.spread??e.children.length>1}function sY(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 cY(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lY(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function uY(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dY(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=BF(t.children[1]),o=zF(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 fY(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 pY(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var mY=9,hY=32;function gY(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(_Y(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(_Y(t.slice(i),i>0,!1)),a.join(``)}function _Y(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===mY||t===hY;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===mY||t===hY;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function vY(e,t){let n={type:`text`,value:gY(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function yY(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var bY={blockquote:WJ,break:GJ,code:KJ,delete:qJ,emphasis:JJ,footnoteReference:YJ,heading:XJ,html:ZJ,imageReference:$J,image:eY,inlineCode:tY,linkReference:nY,link:rY,listItem:iY,list:sY,paragraph:cY,root:lY,strong:uY,table:dY,tableCell:pY,tableRow:fY,text:vY,thematicBreak:yY,toml:xY,yaml:xY,definition:xY,footnoteDefinition:xY};function xY(){}var{defineProperty:SY}=Object,CY=typeof self==`object`?self:globalThis,wY=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new CY[e](t)},TY=(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__`?SY(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 CY[e]==`function`?wY(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(wY(a,o),i)};return r},EY=e=>TY(new Map,e)(0),DY=``,{toString:OY}={},{keys:kY,is:AY}=Object,jY=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=OY.call(e).slice(8,-1);switch(n){case`Array`:return[1,DY];case`Object`:return[2,DY];case`Date`:return[3,DY];case`RegExp`:return[4,DY];case`Map`:return[5,DY];case`Set`:return[6,DY];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},MY=([e,t])=>e===0&&(t===`function`||t===`symbol`),NY=(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]=jY(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&AY(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 kY(o))(e||!MY(jY(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?DY: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||!(MY(jY(n))||MY(jY(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!MY(jY(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 NY(!(t||n),!!t,new Map,r)(e),r},FY=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?EY(PY(e,t)):structuredClone(e):(e,t)=>EY(PY(e,t));function IY(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 LY(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function RY(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||IY,r=e.options.footnoteBackLabel||LY,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=LG(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:{...FY(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 zY={}.hasOwnProperty,BY={};function VY(e,t){let n=t||BY,r=new Map,i=new Map,a={all:s,applyData:UY,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...bY,...n.handlers},one:o,options:n,patch:HY,wrap:GY};return $U(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(zY.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=FY(n);return r.children=a.all(e),r}return FY(e)}return(a.options.unknownHandler||WY)(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=KY(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=KY(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function HY(e,t){e.position&&(t.position=HF(e))}function UY(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,FY(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function WY(e,t){let n=t.data||{},r=`value`in t&&!(zY.call(n,`hProperties`)||zY.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 GY(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 KY(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qY(e,t){let n=VY(e,t),r=n.one(e,void 0),i=RY(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 JY(e,t){return e&&`run`in e?async function(n,r){let i=qY(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qY(n,{file:r,...e||t})}}function YY(e){if(e)throw e}var XY=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 ZY(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 QY(){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?$Y(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 $Y(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 eX={basename:tX,dirname:nX,extname:rX,join:iX,sep:`/`};function tX(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);sX(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 nX(e){if(sX(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 rX(e){sX(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 iX(...e){let t=-1,n;for(;++t<e.length;)sX(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:aX(n)}function aX(e){sX(e);let t=e.codePointAt(0)===47,n=oX(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function oX(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 sX(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var cX={cwd:lX};function lX(){return`/`}function uX(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function dX(e){if(typeof e==`string`)e=new URL(e);else if(!uX(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 fX(e)}function fX(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 pX=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],mX=class{constructor(e){let t;t=e?uX(e)?{path:e}:typeof e==`string`||vX(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:cX.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<pX.length;){let e=pX[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)pX.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?eX.basename(this.path):void 0}set basename(e){gX(e,`basename`),hX(e,`basename`),this.path=eX.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?eX.dirname(this.path):void 0}set dirname(e){_X(this.basename,`dirname`),this.path=eX.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?eX.extname(this.path):void 0}set extname(e){if(hX(e,`extname`),_X(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=eX.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){uX(e)&&(e=dX(e)),gX(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?eX.basename(this.path,this.extname):void 0}set stem(e){gX(e,`stem`),hX(e,`stem`),this.path=eX.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 qF(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 hX(e,t){if(e&&e.includes(eX.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+eX.sep+"`")}function gX(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function _X(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function vX(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var yX=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),bX=l(XY(),1),xX={}.hasOwnProperty,SX=new class e extends yX{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=QY()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,bX.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(TX(`data`,this.frozen),this.namespace[e]=t,this):xX.call(this.namespace,e)&&this.namespace[e]||void 0:e?(TX(`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=OX(e),n=this.parser||this.Parser;return CX(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),CX(`process`,this.parser||this.Parser),wX(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=OX(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);AX(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(),CX(`processSync`,this.parser||this.Parser),wX(`processSync`,this.compiler||this.Compiler),this.process(e,r),DX(`processSync`,`process`,t),n;function r(e,r){t=!0,YY(e),n=r}}run(e,t,n){EX(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=OX(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),DX(`runSync`,`run`,n),r;function i(e,t){YY(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=OX(t),r=this.compiler||this.Compiler;return wX(`stringify`,r),EX(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(TX(`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,bX.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];ZY(o)&&ZY(r)&&(r=(0,bX.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function CX(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function wX(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function TX(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 EX(e){if(!ZY(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function DX(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function OX(e){return kX(e)?e:new mX(e)}function kX(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function AX(e){return typeof e==`string`||jX(e)}function jX(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var MX=1024,NX=0,PX=class{constructor(e,t){this.from=e,this.to=t}},FX=class{constructor(e={}){this.id=NX++,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=RX.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};FX.closedBy=new FX({deserialize:e=>e.split(` `)}),FX.openedBy=new FX({deserialize:e=>e.split(` `)}),FX.group=new FX({deserialize:e=>e.split(` `)}),FX.isolate=new FX({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),FX.contextHash=new FX({perNode:!0}),FX.lookAhead=new FX({perNode:!0}),FX.mounted=new FX({perNode:!0});var IX=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[FX.mounted.id]}},LX=Object.create(null),RX=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):LX,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(FX.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(FX.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};RX.none=new RX(``,Object.create(null),0,8);var zX=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 RX(e.name,r,e.id,e.flags):e)}return new e(n)}},BX=new WeakMap,VX=new WeakMap,HX;(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`})(HX||={});var UX=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=IX.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 rZ(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new rZ(BX.get(this)||this.topNode);return r.moveTo(e,t),BX.set(this,r._tree),r}get topNode(){return new YX(this,0,0,null)}resolve(e,t=0){let n=qX(BX.get(this)||this.topNode,e,t,!1);return BX.set(this,n),n}resolveInner(e,t=0){let n=qX(VX.get(this)||this.topNode,e,t,!0);return VX.set(this,n),n}resolveStack(e,t=0){return nZ(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&HX.IncludeAnonymous)>0;for(let e=this.cursor(a|HX.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:cZ(RX.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(RX.none,t,n,r)))}static build(e){return aZ(e)}};UX.empty=new UX(RX.none,[],[],0);var WX=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)}},GX=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return RX.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&&!(KX(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 KX(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 qX(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 YX&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:HX.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof YX&&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 JX=class{cursor(e=0){return new rZ(this,e)}getChild(e,t=null,n=null){let r=XX(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return XX(this,e,t,n)}resolve(e,t=0){return qX(this,e,t,!1)}resolveInner(e,t=0){return qX(this,e,t,!0)}matchContext(e){return ZX(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}},YX=class e extends JX{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&HX.EnterBracketed&&l instanceof UX&&(d=IX.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||KX(i,r,u,u+l.length)){if(l instanceof GX){if(a&HX.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new $X(new QX(o,l,t,u),null,e)}else if(a&HX.IncludeAnonymous||!l.type.isAnonymous||iZ(l)){let s;if(!(a&HX.IgnoreMounts)&&(s=IX.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&HX.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&HX.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&HX.IgnoreOverlays)&&(i=IX.get(this._tree))&&i.overlay){let a=t-this.from,o=r&HX.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 XX(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 ZX(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 QX=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},$X=class e extends JX{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&HX.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 UX(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function eZ(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 YX&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new tZ(i,n)}var tZ=class{constructor(e,t){this.heads=e,this.node=t}get next(){return eZ(this.heads)}};function nZ(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof YX?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=IX.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new YX(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(qX(o,t,n,!1))}}return i?eZ(i):r}var rZ=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&~HX.EnterBracketed,e instanceof YX)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 YX?(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&HX.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&HX.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&HX.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&HX.IncludeAnonymous||e instanceof GX||!e.type.isAnonymous||iZ(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 $X(this.buffer,t,this.stack[e]);return this.bufferNode=new $X(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 ZX(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 ZX(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 iZ(e){return e.children.some(e=>e instanceof GX||!e.type.isAnonymous||iZ(e))}function aZ(e){let{buffer:t,nodeSet:n,maxBufferLength:r=MX,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new WX(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,ee,te=S-e;if(C-S<=r&&(ee=h(o.pos-t,y))){let t=new Uint16Array(ee.size-ee.skip),r=o.pos-ee.size,i=t.length;for(;o.pos>r;)i=g(ee.start,t,i);O=new GX(t,C-ee.start,n),te=ee.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=cZ(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(te)}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 GX(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 UX){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(FX.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=[FX.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[FX.lookAhead,i];o=o?[e].concat(o):[e]}return new UX(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 UX(s[e.topID],_.reverse(),v.reverse(),y)}var oZ=new WeakMap;function sZ(e,t){if(!e.isAnonymous||t instanceof GX||t.type!=e)return 1;let n=oZ.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof UX)){n=1;break}n+=sZ(e,r)}oZ.set(t,n)}return n}function cZ(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=sZ(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=sZ(e,t[s]);for(s++;s<i;s++){let n=sZ(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(cZ(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 lZ=class{startParse(e,t,n){return typeof e==`string`&&(e=new uZ(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}}},uZ=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 FX({perNode:!0});var dZ=0,fZ=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=dZ++}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 mZ(e);return e=>e.modified.indexOf(t)>-1?e:mZ.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},pZ=0,mZ=class e{constructor(e){this.name=e,this.instances=[],this.id=pZ++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&hZ(n,e.modified));if(r)return r;let i=[],a=new fZ(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=gZ(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 hZ(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function gZ(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 _Z(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 yZ(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return vZ.add(t)}var vZ=new FX({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 yZ(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),yZ=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}};yZ.empty=new yZ([],2,null);function bZ(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 xZ(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function SZ(e,t,n,r=0,i=e.length){let a=new wZ(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}function CZ(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}}SZ(t,n,(e,t,n)=>{c(e,``),c(t,n)},a,o),c(o,``)}var wZ=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=TZ(e)||yZ.empty,u=xZ(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(FX.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 TZ(e){let t=e.type.prop(vZ);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var EZ=fZ.define,DZ=EZ(),OZ=EZ(),kZ=EZ(OZ),AZ=EZ(OZ),jZ=EZ(),MZ=EZ(jZ),NZ=EZ(jZ),PZ=EZ(),FZ=EZ(PZ),IZ=EZ(),LZ=EZ(),RZ=EZ(),zZ=EZ(RZ),BZ=EZ(),$={comment:DZ,lineComment:EZ(DZ),blockComment:EZ(DZ),docComment:EZ(DZ),name:OZ,variableName:EZ(OZ),typeName:kZ,tagName:EZ(kZ),propertyName:AZ,attributeName:EZ(AZ),className:EZ(OZ),labelName:EZ(OZ),namespace:EZ(OZ),macroName:EZ(OZ),literal:jZ,string:MZ,docString:EZ(MZ),character:EZ(MZ),attributeValue:EZ(MZ),number:NZ,integer:EZ(NZ),float:EZ(NZ),bool:EZ(jZ),regexp:EZ(jZ),escape:EZ(jZ),color:EZ(jZ),url:EZ(jZ),keyword:IZ,self:EZ(IZ),null:EZ(IZ),atom:EZ(IZ),unit:EZ(IZ),modifier:EZ(IZ),operatorKeyword:EZ(IZ),controlKeyword:EZ(IZ),definitionKeyword:EZ(IZ),moduleKeyword:EZ(IZ),operator:LZ,derefOperator:EZ(LZ),arithmeticOperator:EZ(LZ),logicOperator:EZ(LZ),bitwiseOperator:EZ(LZ),compareOperator:EZ(LZ),updateOperator:EZ(LZ),definitionOperator:EZ(LZ),typeOperator:EZ(LZ),controlOperator:EZ(LZ),punctuation:RZ,separator:EZ(RZ),bracket:zZ,angleBracket:EZ(zZ),squareBracket:EZ(zZ),paren:EZ(zZ),brace:EZ(zZ),content:PZ,heading:FZ,heading1:EZ(FZ),heading2:EZ(FZ),heading3:EZ(FZ),heading4:EZ(FZ),heading5:EZ(FZ),heading6:EZ(FZ),contentSeparator:EZ(PZ),list:EZ(PZ),quote:EZ(PZ),emphasis:EZ(PZ),strong:EZ(PZ),link:EZ(PZ),monospace:EZ(PZ),strikethrough:EZ(PZ),inserted:EZ(),deleted:EZ(),changed:EZ(),invalid:EZ(),meta:BZ,documentMeta:EZ(BZ),annotation:EZ(BZ),processingInstruction:EZ(BZ),definition:fZ.defineModifier(`definition`),constant:fZ.defineModifier(`constant`),function:fZ.defineModifier(`function`),standard:fZ.defineModifier(`standard`),local:fZ.defineModifier(`local`),special:fZ.defineModifier(`special`)};for(let e in $){let t=$[e];t instanceof fZ&&(t.name=e)}var VZ=bZ([{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`}]),HZ=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 UZ(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 WZ(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 UZ(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()}},UZ=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},WZ=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}},GZ=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 KZ(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 qZ=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},JZ=new qZ,YZ=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=JZ,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=JZ,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}},XZ=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;$Z(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};XZ.prototype.contextual=XZ.prototype.fallback=XZ.prototype.extend=!1;var ZZ=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?KZ(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if($Z(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))}};ZZ.prototype.contextual=XZ.prototype.fallback=XZ.prototype.extend=!1;var QZ=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function $Z(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||tQ(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 eQ(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function tQ(e,t,n,r){let i=eQ(n,r,t);return i<0||eQ(n,r,e)<i}var nQ=typeof process<`u`&&/\bparse\b/.test({}.LOG),rQ=null;function iQ(e,t,n){let r=e.cursor(HX.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 aQ=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?iQ(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?iQ(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 UX){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(FX.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}}},oQ=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new qZ)}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 qZ,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 qZ,{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=pQ(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(pQ(o,s+2),t,n,r));break}}o[s]==t&&(r=this.putAction(pQ(o,s+1),t,n,r))}return r}},sQ=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 YZ(t,r),this.tokens=new oQ(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[HZ.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new aQ(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&&mQ(r);if(e)return nQ&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw nQ&&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 nQ&&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(FX.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 UX&&(!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=nQ?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 nQ&&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),nQ&&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),nQ&&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 cQ(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=nQ?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),nQ&&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()&&(nQ&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)nQ&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))nQ&&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),nQ&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),cQ(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),UX.build({buffer:GZ.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=(rQ||=new WeakMap).get(e);return t||rQ.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function cQ(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 lQ=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},uQ=e=>e,dQ=class{constructor(e){this.start=e.start,this.shift=e.shift||uQ,this.reduce=e.reduce||uQ,this.reuse=e.reuse||uQ,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},fQ=class e extends lZ{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=FX[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 zX(t.map((t,i)=>RX.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=MX;let a=KZ(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(hQ),this.states=KZ(e.states,Uint32Array),this.data=KZ(e.stateData),this.goto=KZ(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new XZ(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 sQ(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=pQ(n,i+2)];else if(n[i+1]==2)return pQ(n,i+2);else break}if(a==t||a==0)return pQ(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=pQ(this.data,n+2);else break}r=t(pQ(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=pQ(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]=hQ(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 lQ(e,n,r)}static deserialize(t){return new e(t)}};function pQ(e,t){return e[t]|e[t+1]<<16}function mQ(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 hQ(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var gQ=317,_Q=318,vQ=1,yQ=2,bQ=3,xQ=4,SQ=319,CQ=321,wQ=322,TQ=5,EQ=6,DQ=0,OQ=[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],kQ=125,AQ=59,jQ=47,MQ=42,NQ=43,PQ=45,FQ=60,IQ=44,LQ=63,RQ=46,zQ=91,BQ=new dQ({start:!1,shift(e,t){return t==TQ||t==EQ||t==CQ?e:t==wQ},strict:!1}),VQ=new QZ((e,t)=>{let{next:n}=e;(n==kQ||n==-1||t.context)&&e.acceptToken(SQ)},{contextual:!0,fallback:!0}),HQ=new QZ((e,t)=>{let{next:n}=e,r;OQ.indexOf(n)>-1||(n!=jQ||(r=e.peek(1))!=jQ&&r!=MQ)&&n!=kQ&&n!=AQ&&n!=-1&&!t.context&&e.acceptToken(gQ)},{contextual:!0}),UQ=new QZ((e,t)=>{e.next==zQ&&!t.context&&e.acceptToken(_Q)},{contextual:!0}),WQ=new QZ((e,t)=>{let{next:n}=e;if(n==NQ||n==PQ){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(vQ);e.acceptToken(n?vQ:yQ)}}else n==LQ&&e.peek(1)==RQ&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(bQ))},{contextual:!0});function GQ(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var KQ=new QZ((e,t)=>{if(e.next!=FQ||!t.dialectEnabled(DQ)||(e.advance(),e.next==jQ))return;let n=0;for(;OQ.indexOf(e.next)>-1;)e.advance(),n++;if(GQ(e.next,!0)){for(e.advance(),n++;GQ(e.next,!1);)e.advance(),n++;for(;OQ.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==IQ)return;for(let t=0;;t++){if(t==7){if(!GQ(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(xQ,-n)}),qQ=_Z({"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)}),JQ={__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},YQ={__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},XQ={__proto__:null,"<":193},ZQ=fQ.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`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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:BQ,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`,-3,88,103,109,`ClassItem`],[`openedBy`,23,`<`,38,`InterpolationStart`,56,`[`,60,`{`,73,`(`,161,`JSXStartCloseTag`],[`closedBy`,-2,24,169,`>`,40,`InterpolationEnd`,50,`]`,61,`}`,74,`)`,166,`JSXEndTag`]],propSources:[qQ],skippedNodes:[0,5,6,279],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A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t(U,2j(f$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[HQ,UQ,WQ,KQ,2,3,4,5,6,7,8,9,10,11,12,13,14,VQ,new ZZ("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(d~~",141,341),new ZZ(`j~RQYZXz{^~^O(R~~aP!P!Qd~iO(S~~`,25,324)],topRules:{Script:[0,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=>JQ[e]||-1},{term:344,get:e=>YQ[e]||-1},{term:95,get:e=>XQ[e]||-1}],tokenPrec:15205}),QQ=1,$Q=194,e$=195,t$=196,n$=197,r$=198,i$=199,a$=200,o$=2,s$=3,c$=201,l$=24,u$=25,d$=49,f$=50,p$=55,m$=56,h$=57,g$=59,_$=60,v$=61,y$=62,b$=63,x$=65,S$=238,C$=71,w$=241,T$=242,E$=243,D$=244,O$=245,k$=246,A$=247,j$=248,M$=72,N$=249,P$=250,F$=251,I$=252,L$=253,R$=254,z$=255,B$=256,V$=73,H$=77,U$=263,W$=112,G$=130,K$=151,q$=152,J$=155,Y$=10,X$=13,Z$=32,Q$=9,$$=35,e1=40,t1=46,n1=123,r1=125,i1=39,a1=34,o1=92,s1=111,c1=120,l1=78,u1=117,d1=85,f1=new Set([u$,d$,f$,U$,x$,G$,m$,h$,S$,y$,b$,M$,V$,H$,_$,v$,K$,q$,J$,W$]);function p1(e){return e==Y$||e==X$}function m1(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}var h1=new QZ((e,t)=>{let n;if(e.next<0)e.acceptToken(i$);else if(t.context.flags&_1)p1(e.next)&&e.acceptToken(r$,1);else if(((n=e.peek(-1))<0||p1(n))&&t.canShift(n$)){let t=0;for(;e.next==Z$||e.next==Q$;)e.advance(),t++;(e.next==Y$||e.next==X$||e.next==$$)&&e.acceptToken(n$,-t)}else p1(e.next)&&e.acceptToken(t$,1)},{contextual:!0}),g1=new QZ((e,t)=>{let n=t.context;if(n.flags)return;let r=e.peek(-1);if(r==Y$||r==X$){let t=0,r=0;for(;;){if(e.next==Z$)t++;else if(e.next==Q$)t+=8-t%8;else break;e.advance(),r++}t!=n.indent&&e.next!=Y$&&e.next!=X$&&e.next!=$$&&(t<n.indent?e.acceptToken(e$,-r):e.acceptToken($Q))}}),_1=1,v1=2,y1=4,b1=8,x1=16,S1=32;function C1(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 w1=new C1(null,0,0);function T1(e){let t=0;for(let n=0;n<e.length;n++)t+=e.charCodeAt(n)==Q$?8-t%8:1;return t}var E1=new Map([[w$,0],[T$,y1],[E$,b1],[D$,12],[O$,x1],[k$,20],[A$,24],[j$,28],[N$,S1],[P$,36],[F$,40],[I$,44],[L$,48],[R$,52],[z$,56],[B$,60]].map(([e,t])=>[e,t|v1])),D1=new dQ({start:w1,reduce(e,t,n,r){return e.flags&_1&&f1.has(t)||(t==C$||t==M$)&&e.flags&v1?e.parent:e},shift(e,t,n,r){return t==$Q?new C1(e,T1(r.read(r.pos,n.pos)),0):t==e$?e.parent:t==l$||t==p$||t==g$||t==s$?new C1(e,0,_1):E1.has(t)?new C1(e,0,E1.get(t)|e.flags&_1):e},hash(e){return e.hash}}),O1=new QZ(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!=Z$&&n!=Q$){n!=e1&&n!=t1&&n!=Y$&&n!=X$&&n!=$$&&e.acceptToken(QQ);return}}}),k1=new QZ((e,t)=>{let{flags:n}=t.context,r=n&y1?a1:i1,i=(n&b1)>0,a=!(n&x1),o=(n&S1)>0,s=e.pos;for(;!(e.next<0);)if(o&&e.next==n1){if(e.peek(1)==n1)e.advance(2);else{if(e.pos==s){e.acceptToken(s$,1);return}break}}else if(a&&e.next==o1){if(e.pos==s){e.advance();let t=e.next;t>=0&&(e.advance(),A1(e,t)),e.acceptToken(o$);return}break}else if(e.next==o1&&!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(c$,i?3:1);return}break}else if(e.next==Y$){if(i)e.advance();else if(e.pos==s){e.acceptToken(c$);return}break}else e.advance();e.pos>s&&e.acceptToken(a$)});function A1(e,t){if(t==s1)for(let t=0;t<2&&e.next>=48&&e.next<=55;t++)e.advance();else if(t==c1)for(let t=0;t<2&&m1(e.next);t++)e.advance();else if(t==u1)for(let t=0;t<4&&m1(e.next);t++)e.advance();else if(t==d1)for(let t=0;t<8&&m1(e.next);t++)e.advance();else if(t==l1&&e.next==n1){for(e.advance();e.next>=0&&e.next!=r1&&e.next!=i1&&e.next!=a1&&e.next!=Y$;)e.advance();e.next==r1&&e.advance()}}var j1=_Z({'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}),M1={__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},N1=fQ.deserialize({version:14,states:"##jQ`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4i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(c%pQ(f%qQ*|(`Q,f*bQ-t,pQ.m-uR/].lQ$StQ(R%cR*s(SQ.l-sR/}/sR#QZR#V[R%Q!iQ%O!iV*c'm*d,g!Z!lQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gR%T!kT#]^#_Q%x#[R,{+YQ(m%xS+_(n(oQ,}+`Q-x,{S.n-y-zR/^.oT+Z(k+]Q$`}Q&g$QQ)o'PR+{)pQ$XzQ)W&qR+i)XQ$XzQ&o$WQ)W&qR+i)XQ#khW$Vz$W&q)XQ$[{Q&r$ZZ)R&l)S+f+g-RR$^|R)c&wXlOn)t,PQ$f!RR'Q$gQ$m!UR'R$hR*X'_Q*V'_V-g,`-h.TQ.d-lQ/P.^R/Q._U.]-l.^._Q/U.aQ/b.tQ/g.zU/i.|/j/yQ/n/RQ/|/oQ0O/tU0Q/u0S0[Q0]0UQ0a0ZR0b0^R/T.`R/d.t",nodeNames:`⚠ print Escape { 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:D1,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:[j1],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tuv,dvw-hwx.Uxy/tyz0[z{0r{|2S|}2p}!O3W!O!P4_!P!Q:Z!Q!R;k!R![>_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!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q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[O1,g1,h1,k1,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:e=>M1[e]||-1}],tokenPrec:7668}),P1=new Map;function F1(e){let t=P1.get(e);return t||(t=e===`python`?N1:ZQ.configure({dialect:e}),P1.set(e,t)),t}var I1={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 L1(e){if(!e)return;let t=e.trim().toLowerCase();return Object.hasOwn(I1,t)?I1[t]:void 0}function R1(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 z1(e,t){let n=L1(t);if(n===void 0)return;let r=[[]];try{let t=R1(F1(n),e);if(!t)return;CZ(e,t,VZ,(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 B1=36,V1=92,H1=96,U1=32,W1=e=>e!==null&&e<-2,G1=e=>e===null||e<0||e===U1,K1=e=>e!==null&&e>=48&&e<=57;function q1(e,t,n){let r=0,i=0,a,o=null,s=t=>t===B1?(e.consume(t),r+=1,s):r>2||r===1&&G1(t)?n(t):(e.exit(`mathTextSequence`),c(t)),c=t=>{if(t===null||t===H1)return n(t);if(t===B1)return a=e.enter(`mathTextSequence`),i=0,d(t);if(t===U1||W1(t)){let n=t===U1?`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===H1||t===U1||t===B1||W1(t)?(e.exit(`mathTextData`),c(t)):(e.consume(t),o=t,t===V1?u:l),u=t=>t!==B1&&t!==V1?l(t):(e.consume(t),o=t,l),d=s=>s===B1?(e.consume(s),i+=1,d):i===r?K1(s)||r===1&&G1(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 J1(){for(let e of this.data().micromarkExtensions??[]){let t=e.text?.[B1];t&&(e.text[B1]={...t,tokenize:q1})}}var Y1=/^(?:[ \t>]|[-*+][ \t]|\d{1,9}[.)][ \t])*\[(?:[^[\]\\]|\\[\s\S]){1,999}\]:/m,X1=/^ {0,3}<[a-z/!?]/im,Z1=/^ {0,3}(?:[-*+]|\d{1,9}[.)])(?:[ \t]|$)/,Q1=/^ {0,3}(`{3,}(?=[^`]*$)|~{3,})/,$1=/^ {0,3}(\$\$+)[^$]*$/,e0=/^ {0,3}(`+|~+|\$+)[ \t]*$/;function*t0(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 n0(e){if(Y1.test(e)||X1.test(e))return[e];let t=[],n=0,r,i=!1,a=!1,o=!1,s=!1;for(let{text:c,start:l}of t0(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=Z1.test(c);a&&!/^\s/.test(c)&&!(u&&o)&&!(s&&i0.test(c))&&(t.push(e.slice(n,l)),n=l,o=!1),o||=u,s=/^\s/.test(c),a=!1,r=h0(c),i=o&&/^\s/.test(c)}}return t.push(e.slice(n)),t}function r0(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 i0=/^ {0,3}(?:>|(?:[-*+]|\d{1,9}[.)])(?:[ \t]|$))/,a0=/^ {0,3}(?:#{1,6}(?:[ \t]|$)|(?:(?:\*[ \t]*){3,}|(?:-[ \t]*){3,}|(?:_[ \t]*){3,})$)/;function o0(e){let t=s0(e),n=new Map,r=0;for(let[i,a]of[...t0(e)].entries())n.set(r,a.start),r+=t[i].length;n.set(r,e.length);let i=n0(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 s0(e){let t=[...t0(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(`$$`)||X1.test(e)||e.startsWith(``))return n;let r,i,a=u0;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=e0.exec(o)?.[1];if(r?.[0]===`$`&&r.length>=i)i=void 0;else{let r=m0(o,i);if(r&&p0(f0(a,o.slice(0,r.start)))){let a=o.slice(0,r.start),c=l0(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=f0(a,o)}}else if(/^[ \t]/.test(o)){if(Q1.test(o.trimStart())||$1.test(o.trimStart()))break}else if(Q1.test(o))r=h0(o);else{let r=r0(o);if(r){let{fence:o,rest:c}=r;i=o.length,a=c?f0(u0,c):u0,c&&(n[e]=o+t+c+s)}}}return n}var c0=new RegExp([i0.source,a0.source,"^(?:`{3}|~{3}|\\$\\$)",`^\\[(?:[^\\]\\\\]|\\\\.)*(?:\\]:|$)`,`^<(?![a-z][a-z\\d+.-]{1,31}:[^\\s<>]*>|[^\\s<>@]+@[^\\s<>]+>)[a-z/!?]`].join(`|`));function l0(e){return c0.test(e)?/^\d/.test(e)?e.replace(/^(\d+)/,`$1\\`):`\\${e}`:e}var u0={depth:0,uncertain:!1},d0=new Set([`verb`,`def`,`gdef`,`edef`,`xdef`,`let`,`futurelet`,`newcommand`,`renewcommand`,`providecommand`,`catcode`,`csname`,`expandafter`,`noexpand`,`includegraphics`]);function f0(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(d0.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 p0=e=>!e.uncertain&&e.depth===0;function m0(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 h0(e){let t=Q1.exec(e)?.[1]??$1.exec(e)?.[1];if(t)return e=>{let n=e0.exec(e)?.[1];return n!==void 0&&n[0]===t[0]&&n.length>=t.length}}var g0=5e4,_0=32,v0=200,y0=/\[{33}/,b0=/\*{1001}|_{1001}|~{1001}/,nie=/^[ \t]*(?:(?:>|[-*+](?=[ \t])|\d{1,9}[.)](?=[ \t]))[ \t]*)+/,x0=/>|[-*+]|\d{1,9}[.)]/g;function S0(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 t0(e))if(i)i(o.text)&&a(o.next,o.start);else{let a=/^\s/.test(o.text)?void 0:h0(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 C0(e){return e.length>g0?!0:Y1.test(e)||X1.test(e)?w0(e):S0(e).some(e=>e.kind===`prose`&&w0(e.text))}function w0(e){for(let{text:t}of t0(e)){if(y0.test(t)||b0.test(t)||/^[ \t]*/.exec(t)[0].length>v0)return!0;let e=nie.exec(t)?.[0];if(e&&(e.match(x0)?.length??0)>_0)return!0}return!1}var T0=[`http:`,`https:`,`mailto:`];function E0(e){try{let t=new URL(e);return T0.includes(t.protocol)?t.href:``}catch{return``}}function D0(){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 O0=[Kq,iJ,J1,D0],k0=SX().use(UJ).use(O0).use(JY,{allowDangerousHtml:!0}),A0=1e3,j0=new Map;function M0(e,t){let n=`${t?`D`:`I`}${e}`,r=j0.get(n);if(r!==void 0)return j0.delete(n),j0.set(n,r),r;let i;try{i=XV.renderToString(e,{displayMode:t,trust:!1,strict:`ignore`,throwOnError:!1,errorColor:`var(--destructive)`})}catch{return}return j0.set(n,i),j0.size>A0&&j0.delete(j0.keys().next().value),i}var N0=e=>{let t=e.properties.className;return Array.isArray(t)?t.map(String):[]},P0=e=>e?.type===`element`&&e.tagName===`code`&&N0(e).includes(`language-math`),F0=e=>e.children.map(e=>e.type===`text`?e.value:``).join(``);function I0(e){let t=N0(e).find(e=>e.startsWith(`language-`))?.slice(9),n=z1(F0(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 L0(e){let t=[...e.value.matchAll(Pj)];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 R0(e){let t=k0.runSync(k0.parse(e),e),n=[],r=(e,t)=>{let r=M0(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 $U(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=L0(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&&P0(e.children[0]))return n.children[t]=r(F0(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 I0(e.children[0]),`skip`;if(P0(e))return n.children[t]=r(F0(e),N0(e).includes(`math-display`)),`skip`;if(e.tagName===`code`)return`skip`;for(let[t,n]of Object.entries(vre))Object.hasOwn(e.properties,t)&&(n===null||n.includes(e.tagName))&&(e.properties[t]=E0(String(e.properties[t]??``)))}}}}),{tree:t,formulas:n}}var z0=8e3,B0=250,V0=2e3,H0=/\\(?:[gex]?def|let|futurelet|(?:re|provide)?newcommand|(?:re)?newenvironment)(?![a-zA-Z])/,U0=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>U0&&this.entries.delete(this.entries.keys().next().value)}};function G0(e){try{return R0(e)}catch{return`plain`}}function K0(){let e=new W0,t=t=>{let n=e.get(t);return n===void 0&&e.set(t,n=G0(t)),n};return{peek:t,render:async e=>t(e),dispose(){}}}function q0(e,t={}){let{timeoutMs:n=z0,cancelGraceMs:r=B0,syncLimit:i=V0}=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||H0.test(e))return t;let n=G0(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 J0=(0,v.memo)(function({source:e,display:t}){let n=M0(e,t);return n===void 0?(0,j.jsx)(`span`,{className:`katex-error`,children:e}):(0,j.jsx)(`span`,{className:`math-text-formula`,dangerouslySetInnerHTML:{__html:n}})});function Y0({source:e}){return(0,j.jsx)(J0,{source:e,display:!0})}function X0({block:e}){return(0,v.useMemo)(()=>tI(e.tree,{Fragment:v.Fragment,jsx:j.jsx,jsxs:j.jsxs,components:{a:({href:e,children:t})=>e?(0,j.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,j.jsx)(`span`,{children:t}),span:t=>{let n=t[`data-citation`];if(n!==void 0)return(0,j.jsx)(_re,{refId:String(n)});let r=t[`data-formula`];return r===void 0?(0,j.jsx)(`span`,{className:t.className,children:t.children}):(0,j.jsx)(`span`,{className:`math-text-formula`,dangerouslySetInnerHTML:{__html:e.formulas[Number(r)]??``}})},img:({alt:e})=>e?(0,j.jsx)(`span`,{children:e}):null,table:e=>(0,j.jsx)(`div`,{className:`math-text-scroll`,children:(0,j.jsx)(`table`,{children:e.children})}),h1:`h4`,h2:`h4`,h3:`h5`,h4:`h6`,h5:`h6`},passKeys:!0,ignoreInvalidStyle:!0}),[e])}function Z0({text:e}){return S0(e).map((e,t)=>e.kind===`code`?(0,j.jsx)(`pre`,{children:(0,j.jsx)(`code`,{children:e.code})},t):(0,j.jsx)(`p`,{className:`math-text-literal`,children:e.text.replace(Fj,``)},t))}var Q0=class extends v.Component{state={};componentDidCatch(){this.setState({failedText:this.props.text})}render(){return this.state.failedText===this.props.text?(0,j.jsx)(Z0,{text:this.props.text}):this.props.children}},$0;function e2(){return $0??=typeof Worker>`u`?K0():q0(()=>new Worker(new URL(`/assets/render.worker-OksjuBjV.js`,``+import.meta.url),{type:`module`,name:`mivra-render`})),$0}var t2=(0,v.createContext)(void 0);function n2(e){let t=(0,v.useContext)(t2)??e2(),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 r2=(0,v.memo)(function({text:e,source:t}){let n=(0,v.useMemo)(()=>C0(e),[e]),r=n2(n?void 0:e);return n||r===void 0||r===`plain`?(0,j.jsx)(Z0,{text:t}):(0,j.jsx)(Q0,{text:t,children:(0,j.jsx)(X0,{block:r})})}),i2=2e4;function a2(e,t){let n=0,r=0;for(;r<e.length&&(r===0||n<t);)n+=e[r++].text.length;return r}function o2({text:e,className:t}){let n=(0,v.useDeferredValue)(e),r=(0,v.useMemo)(()=>o0(n),[n]),[i,a]=(0,v.useState)(i2),o=a2(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)+i2),0);return()=>clearTimeout(t)},[o,r]),(0,j.jsx)(`div`,{className:t,children:r.slice(0,o).map((e,t)=>(0,j.jsx)(r2,{text:e.text,source:e.source},t))})}function s2({text:e,className:t}){let n=(0,v.useMemo)(()=>nk(e),[e]);return(0,j.jsx)(`span`,{className:`${t} math-text-literal`,children:n.map((e,t)=>`formula`in e?(0,j.jsx)(J0,{source:e.formula,display:!1},t):e.text)})}function c2({text:e,mode:t=`block`,className:n,citations:r=!1}){let i=n?`math-text ${n}`:`math-text`;return t===`math`?(0,j.jsx)(s2,{text:e,className:i}):r?(0,j.jsx)(l2,{text:e,className:i}):(0,j.jsx)(o2,{text:e,className:i})}function l2({text:e,className:t}){let n=Ij(e).join(` `),r=(0,v.useMemo)(()=>new Map(n?n.split(` `).map((e,t)=>[e,t+1]):[]),[n]);return(0,j.jsx)(bI.Provider,{value:r,children:(0,j.jsx)(o2,{text:e,className:t})})}function u2({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`card`,className:A(`flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm`,e),...t})}function d2({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`card-content`,className:A(`px-6`,e),...t})}var f2=1500,p2={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`},m2={current:`bg-foreground text-background`,other:`bg-sunken text-muted-foreground ring-1 ring-inset ring-border-strong`};function h2(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)),f2);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 g2({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,j.jsx)(`span`,{ref:r,className:A(`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 _2({children:e}){return(0,j.jsx)(g2,{children:(0,j.jsx)(`span`,{"aria-hidden":`true`,children:e})})}function v2({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,j.jsxs)(`div`,{"data-slot":n===`footer`?`artifact-footer`:`artifact-controls`,className:A(`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,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,className:l,onClick:()=>s(i-1),"aria-disabled":i===0,children:[(0,j.jsx)(Yh,{}),`Prev`]}),t&&(0,j.jsxs)(M,{type:`button`,size:`sm`,className:`min-w-20`,onClick:c,children:[o?(0,j.jsx)(M_,{className:`fill-current`}):(0,j.jsx)(uee,{className:`fill-current`}),o?`Pause`:`Play`]}),(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,className:l,onClick:()=>s(i+1),"aria-disabled":i===a,children:[`Next`,(0,j.jsx)(Zh,{})]}),r]}),(0,j.jsxs)(`div`,{className:`ml-auto flex min-w-0 max-w-full items-center gap-3`,children:[(0,j.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,j.jsx)(`i`,{className:A(`h-[3px] w-3 min-w-[2px] shrink rounded-full`,t<i?`bg-muted-foreground`:t===i?`bg-foreground`:`bg-border-strong`)},t))}),(0,j.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 y2({className:e,...t}){return(0,j.jsx)(u2,{"data-artifact-card":``,className:A(`border-border-strong shadow-paper gap-0 py-0 whitespace-normal`,e),...t})}function b2({kind:e,kindId:t,aside:n,children:r}){return(0,j.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,j.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,j.jsx)(`span`,{className:`text-muted-foreground ml-auto font-mono text-[0.6875rem] leading-snug tracking-[0.09em] uppercase`,children:n})]})}function x2({id:e,text:t}){return(0,j.jsx)(`h3`,{className:`font-heading min-w-0 flex-[1_1_12rem] text-[1.0625rem] leading-snug font-medium`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(`span`,{id:e,children:(0,j.jsx)(c2,{text:t,mode:`math`})})})})}function S2({className:e,...t}){return(0,j.jsx)(d2,{className:A(`flex flex-col gap-3 px-4 py-4 sm:px-5 sm:py-5`,e),...t})}function C2({index:e}){return(0,j.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 w2({code:e,lines:t}){let n=(0,v.useMemo)(()=>uk(e.source),[e.source]),r=(0,v.useMemo)(()=>z1(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,j.jsxs)(`div`,{className:`flex min-w-0 flex-col rounded-md border`,"data-testid":`code-pane`,children:[(0,j.jsx)(`div`,{className:`text-muted-foreground border-b px-3 py-1 font-mono text-xs`,"aria-hidden":`true`,children:e.language}),(0,j.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,j.jsx)(`pre`,{className:`w-max min-w-full font-mono text-xs leading-relaxed [tab-size:4]`,children:(0,j.jsx)(`code`,{children:n.map((e,t)=>{let n=i.has(t+1);return(0,j.jsxs)(`span`,{className:A(`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,j.jsx)(`span`,{className:`text-muted-foreground w-9 shrink-0 pr-3 text-right select-none`,children:t+1}),(0,j.jsx)(`span`,{className:`whitespace-pre`,children:e?(0,j.jsx)(T2,{text:e,tokens:r?.[t]}):` `}),n&&(0,j.jsx)(`span`,{className:`sr-only`,children:` (current line)`})]},t)})})})})]})}function T2({text:e,tokens:t}){return t?t.map((e,t)=>e.className?(0,j.jsx)(`span`,{className:e.className,children:e.text},t):e.text):e}var E2={active:``,done:`, done`,muted:`, ruled out`};function D2(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 O2(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 k2({view:e}){let{spec:t}=e,n=h2(t.steps.length),r=(0,v.useId)(),i=(0,v.useId)(),a=D2(t,n.index),o=(0,v.useRef)({index:n.index,from:a.values});o.current.index!==n.index&&(o.current={index:n.index,from:D2(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?uk(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,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`p`,{className:`sr-only`,"data-testid":`trace-description`,children:[`Values: `,a.values.map((e,t)=>`index ${t}: ${String(e)}`).join(`, `)]}),(0,j.jsx)(g2,{label:`Values, scrolls sideways`,className:`pb-1`,children:(0,j.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,j.jsx)(`span`,{className:A(`min-h-5 rounded-sm px-1 text-center text-xs font-medium`,p2[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,j.jsxs)(`span`,{className:A(`bg-card border-border-strong relative grid h-11 place-items-center rounded-md border px-2 font-mono text-[0.95rem]`,n&&p2[n]),style:{gridColumn:t+1,gridRow:c.length+1},"data-testid":`trace-cell`,children:[String(e),(0,j.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,j.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,j.jsx)(`dl`,{className:`flex flex-wrap gap-2`,"aria-hidden":`true`,children:a.variables.map((e,t)=>(0,j.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,j.jsx)(`dt`,{className:`min-w-0`,children:e.name}),(0,j.jsxs)(`dd`,{className:`min-w-0`,children:[`= `,String(e.value)]})]},t))}),(0,j.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`trace-status`,children:[(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Step `,n.index+1,` of `,n.last+1,`.`,` `]}),(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:a.explanation,mode:`math`})}),(0,j.jsxs)(`span`,{className:`sr-only`,children:[O2(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}${E2[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,j.jsxs)(y2,{role:`region`,"aria-labelledby":`${r} ${i}`,tabIndex:0,onKeyDown:n.onKeyDown,children:[(0,j.jsx)(b2,{kind:`Algorithm trace`,kindId:i,children:(0,j.jsx)(x2,{id:r,text:t.title})}),(0,j.jsx)(S2,{children:t.code?(0,j.jsx)(`div`,{className:`@container`,children:(0,j.jsxs)(`div`,{className:`grid gap-3 @xl:grid-cols-2`,children:[(0,j.jsx)(w2,{code:t.code,lines:d}),(0,j.jsx)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:p})]})}):p}),(0,j.jsx)(v2,{stepper:n,play:!0})]})}var A2=se(`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 j2({className:e,variant:t,...n}){return(0,j.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:A(A2({variant:t}),e),...n})}function M2({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`alert-title`,className:A(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function N2({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`alert-description`,className:A(`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,j.jsx)(`textarea`,{"data-slot":`textarea`,className:A(`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 F2=Ek.timeMs+3e3,I2=12e4,L2=1e3,R2=`The runner was still busy with code from an earlier run, so it was restarted. Run again.`,z2=e=>e.kind===`stdio`?{kind:`stdio`,stdin:e.stdin}:{kind:`call`,args:e.args},B2=class extends Error{constructor(){super(`Stopped`)}},V2=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 H2({spawn:e=V2(`javascript`),hardLimitMs:t=F2,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()},L2))};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 (${Ek.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(()=>_(R2),t):setTimeout(()=>_(`Python took too long to start. Check your connection to Mivra and try again.`),n),a=()=>{h(),o(),s(new B2)},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 U2=e=>H2(e===`python`?{spawn:V2(`python`),startupLimitMs:I2}:{spawn:V2(`javascript`)}),W2={javascript:`JavaScript`,python:`Python`},G2=e=>`mivra.exercise.${e}`;function K2(e){try{return localStorage.getItem(G2(e))??void 0}catch{return}}function q2(e,t){try{t===void 0?localStorage.removeItem(G2(e)):localStorage.setItem(G2(e),t)}catch{}}function J2(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 Y2({label:e,text:t,tone:n}){return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,j.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem] tracking-[0.06em] uppercase`,children:e}),(0,j.jsx)(`pre`,{className:A(`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,j.jsx)(`span`,{className:`text-muted-foreground italic`,children:`(nothing)`}):t})]})}function X2({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,j.jsxs)(`li`,{className:A(`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,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:o}),(0,j.jsxs)(`span`,{className:A(`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,j.jsxs)(`div`,{className:`grid min-w-0 gap-2 @lg:grid-cols-2`,children:[t.kind===`call`?(0,j.jsx)(Y2,{label:`Call`,text:J2(i,t.args)}):(0,j.jsx)(Y2,{label:`Input`,text:t.stdin}),t.expected&&(`stdout`in t.expected?(0,j.jsx)(Y2,{label:`Expected output`,text:t.expected.stdout}):(0,j.jsx)(Y2,{label:`Expected return value`,text:t.expected.returned})),n&&n.error!==void 0&&(0,j.jsx)(Y2,{label:`Error`,text:n.error,tone:`error`}),n&&n.error===void 0&&t.kind===`call`&&(0,j.jsx)(Y2,{label:`Returned`,text:n.returned??``}),n&&(t.kind===`stdio`||n.stdout!==``)&&(0,j.jsx)(Y2,{label:t.kind===`stdio`?`Your output`:`Printed`,text:n.stdout}),n?.stderr&&(0,j.jsx)(Y2,{label:a,text:n.stderr})]}),t.hidden&&n?.error!==void 0&&r===!1&&(0,j.jsx)(`p`,{className:`text-destructive text-sm wrap-anywhere`,children:n.error})]})}function Z2({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??K2(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??=U2(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?Lk(e.expected,n):void 0}),[i.cases,f,E]),O=t=>{d(t),q2(e.id,t===i.starterCode?void 0:t)},ee=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,z2(i.cases[o]),{onStart:()=>h({mode:e,done:a,total:t.length})}),p([...r]);return r}catch(t){if(!(t instanceof B2))throw t;_(e===`submit`?`Stopped. Nothing was submitted.`:`Stopped.`);return}finally{h(void 0)}},te=i.cases.flatMap((e,t)=>e.hidden?[]:[t]),ne=async()=>{let e=await ee(`run`,te);if(!e)return;let t=te.filter(t=>e[t]&&i.cases[t].expected&&Lk(i.cases[t].expected,e[t])).length;_(`${t} of ${te.length} visible ${te.length===1?`case`:`cases`} passed.`)},re=async()=>{if(u.length>5e4){b(`The code is too long to submit (over ${Sk.toLocaleString(`en-US`)} characters).`);return}let t=await ee(`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 sN(e.id,a);if(o.ok)return h(void 0),q2(e.id,void 0),n(o.view);b(o.error);try{await r()}catch{}finally{h(void 0)}},ie=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))},ae=m!==void 0,oe=o||t||ae,k=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,j.jsxs)(y2,{role:`region`,"aria-labelledby":s,children:[(0,j.jsx)(b2,{kind:`Exercise`,aside:`${W2[i.language]} · runs in your browser`,children:(0,j.jsx)(x2,{id:s,text:i.title})}),(0,j.jsxs)(S2,{className:`@container gap-4`,children:[(0,j.jsx)(`div`,{className:`text-[0.95rem]`,"data-testid":`exercise-instructions`,children:(0,j.jsx)(c2,{text:i.instructions,mode:`block`})}),(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,j.jsx)(`label`,{htmlFor:c,className:`text-sm font-medium`,children:o?`Your submitted code`:`Your code`}),(0,j.jsx)(P2,{id:c,"aria-describedby":l,value:u,onChange:e=>O(e.target.value),onKeyDown:ie,onFocus:()=>{C&&!o&&T().warm()},readOnly:o||ae,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,wrap:`off`,className:A(`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,j.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,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[!o&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(M,{type:`button`,variant:`outline`,onClick:()=>void ne(),disabled:ae,children:`Run`}),(0,j.jsx)(M,{type:`button`,onClick:()=>void re(),disabled:oe,children:`Submit`})]}),ae&&m.done<m.total&&(0,j.jsx)(M,{type:`button`,variant:`destructive`,onClick:()=>x.current?.stop(),children:`Stop`}),!o&&!ae&&u!==i.starterCode&&(0,j.jsx)(M,{type:`button`,variant:`ghost`,onClick:()=>O(i.starterCode),children:`Reset code`})]}),(0,j.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2`,"data-testid":`exercise-status`,children:[k&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:k}),!k&&g&&(0,j.jsx)(`p`,{className:`text-sm`,children:g}),!o&&t&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Submit once the reply finishes. You can run your code now.`}),y&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:y}),E&&(0,j.jsxs)(j2,{className:`bg-sunken border-0 px-4 py-3`,children:[(0,j.jsx)(M2,{className:A(`font-heading text-[1.15rem] font-medium`,E.correct?`text-success`:`text-destructive`),children:E.correct?`All cases passed!`:`Not quite.`}),(0,j.jsxs)(N2,{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,j.jsx)(`ol`,{className:`flex flex-col gap-2`,"aria-label":`Test cases`,children:i.cases.map((e,t)=>(0,j.jsx)(X2,{index:t,testCase:e,run:f[t],passed:D[t],functionName:i.functionName,stderrLabel:C?`stderr`:`console.error / warn`},t))})]})]})}var Q2=200;function $2({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,j.jsxs)(`div`,{className:`flex min-w-0 flex-col rounded-md border`,"data-testid":`walkthrough-output`,children:[(0,j.jsx)(`div`,{className:`text-muted-foreground border-b px-3 py-1 font-mono text-xs`,children:`Output`}),(0,j.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,j.jsx)(`p`,{className:`text-muted-foreground text-xs italic`,children:`No output yet`}):(0,j.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 e4({view:e}){let{spec:t}=e,n=h2(t.steps.length),r=(0,v.useId)(),i=(0,v.useId)(),a=t.steps[n.index],o=uk(t.code.source),s=(a.lines??[]).filter(e=>e>=1&&e<=o.length),c=a.output===``?0:uk(a.output).length;return(0,j.jsxs)(y2,{role:`region`,"aria-labelledby":`${r} ${i}`,tabIndex:0,onKeyDown:n.onKeyDown,children:[(0,j.jsx)(b2,{kind:`Illustrated walkthrough`,kindId:i,children:(0,j.jsx)(x2,{id:r,text:t.title})}),(0,j.jsxs)(S2,{children:[(0,j.jsx)(`div`,{className:`@container`,children:(0,j.jsxs)(`div`,{className:`grid gap-3 @xl:grid-cols-2`,children:[(0,j.jsx)(w2,{code:t.code,lines:s}),(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,j.jsxs)(`section`,{className:`flex min-w-0 flex-col rounded-md border`,"aria-label":`Variables`,"data-testid":`walkthrough-variables`,children:[(0,j.jsx)(`div`,{className:`text-muted-foreground border-b px-3 py-1 font-mono text-xs`,"aria-hidden":`true`,children:`Variables`}),(0,j.jsx)(`div`,{className:`px-3 py-2`,children:a.variables.length===0?(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs italic`,children:`No variables at this step`}):(0,j.jsx)(`dl`,{className:`flex flex-col gap-1 font-mono text-xs`,children:a.variables.map(e=>(0,j.jsxs)(`div`,{className:`flex min-w-0 gap-1.5 wrap-anywhere`,"data-testid":`walkthrough-variable`,children:[(0,j.jsx)(`dt`,{className:`min-w-0`,children:e.name}),(0,j.jsxs)(`dd`,{className:`min-w-0`,children:[`= `,String(e.value)]})]},e.name))})})]}),(0,j.jsx)($2,{output:a.output})]})]})}),(0,j.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`walkthrough-status`,className:`flex flex-col gap-1`,children:[(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Step `,n.index+1,` of `,n.last+1,`.`,` `]}),a.label&&(0,j.jsxs)(`span`,{className:`text-muted-foreground font-mono text-xs`,"data-testid":`walkthrough-label`,children:[a.label,(0,j.jsx)(`span`,{className:`sr-only`,children:`.`})]}),(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:a.explanation,mode:`math`})}),(0,j.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<=Q2?` Output: ${a.output}`:` Output: ${c} ${c===1?`line`:`lines`}, in the output pane.`]})]})]}),(0,j.jsx)(v2,{stepper:n,play:!0})]})}var t4=3,n4=5,r4=8,i4=6,a4=3.5,o4=14,s4=e=>e.x+e.width,c4=e=>e.y+e.height,l4=e=>Math.round(e*10)/10;function u4(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-t4&&r<s4(n)+t4&&o>n.y-t4&&a<c4(n)+t4}var d4=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(o4,n.height/2)+i*n4;return a<=c4(n)-t4||i===0?a:void 0}};function f4(e,t,n,r,i){if(e<452)return{narrow:!0,connectors:[]};let a=new d4,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(s4(i)+12<=l.x||s4(l)+12<=i.x){let e=s4(i)<=l.x,[t,n]=e?[s4(i),l.x]:[s4(l),i.x],r=s(`g\u0000${Math.round(t)}\u0000${Math.round(n)}`),c=(r%2==0?r/2:-(r+1)/2)*n4,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?s4(i):i.x,n=e?l.x:s4(l);u=[{x:t,y:f},{x:d,y:f},{x:d,y:p},{x:n,y:p}]}}else if(c4(i)<=l.y||c4(l)<=i.y){let t=Math.max(s4(i),s4(l)),n=t+r4+s(`m\u0000${Math.round(t)}`)*n4,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:s4(i),y:r},{x:n,y:r},{x:n,y:c},{x:s4(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=>u4(e,t,n))&&!(n===0?[l]:n===f.length-1?[i]:[i,l]).some(n=>u4(e,t,n)))&&!u.some(n=>n.x<0||n.y<0||n.x>e||n.y>t)&&c.push(p4(o.id,u))}return{narrow:!1,connectors:c}}function p4(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*i4,y:n.y-o*i4},c=[n,{x:s.x-o*a4,y:s.y+a*a4},{x:s.x+o*a4,y:s.y-a*a4}];return{id:e,path:[...t.slice(0,-1),s].map((e,t)=>`${t?`L`:`M`}${l4(e.x)} ${l4(e.y)}`).join(` `),arrow:c.map(e=>`${l4(e.x)},${l4(e.y)}`).join(` `),points:t}}var m4=`cubic-bezier(0.2, 0, 0, 1)`,h4=`[data-testid="composition-entity"]`,g4=`[data-composition-obstacle]`,_4=`[tabindex], a[href], button, input, select, textarea`,v4=(e,t)=>[...e.querySelectorAll(h4)].find(e=>e.dataset.entity===t),y4=()=>typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function b4(e,t){let n=e.getBoundingClientRect();return{x:n.left-t.left,y:n.top-t.top,width:n.width,height:n.height}}function x4(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}:b4(e,t.getBoundingClientRect())}var S4=(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 C4(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(h4):null;if(u.current=p?{entity:p.dataset.entity,at:[...p.querySelectorAll(_4)].indexOf(d)}:null,c===a.current&&i===`seek`&&s.current.length&&(g(),f(!1)),l&&i===`step`&&Math.abs(c-a.current)===1&&!y4()){let e=l.getBoundingClientRect();o.current={to:c,from:new Map([...l.querySelectorAll(h4)].map(t=>[t.dataset.entity,b4(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(h4)){let r=n.get(t.dataset.entity);if(!r||typeof t.animate!=`function`)continue;let a=b4(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:m4}))}}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=v4(n,t.entity)?.querySelectorAll(_4)[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(h4)].map(e=>[e.dataset.entity,x4(e,t)])),r=[...t.querySelectorAll(g4)].map(e=>x4(e,t)),i=f4(t.clientWidth,t.clientHeight,n,r,h.current);m(e=>S4(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(h4))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 w4={active:`, current`,done:`, done`,muted:`, muted`},T4=e=>e===``?`""`:String(e);function E4({view:e}){let{spec:t}=e,n=h2(t.steps.length),{index:r,last:i,go:a}=n,o=(0,v.useId)(),s=(0,v.useId)(),c=Kk(t,r),l=qne(t,r),u=(0,v.useRef)(null),{layout:d,moving:f,navigate:p}=C4(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,j.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:l.map((e,t)=>(0,j.jsx)(`li`,{"data-testid":`composition-change`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:e.text,mode:`math`})})},t))});return(0,j.jsxs)(y2,{role:`region`,"aria-labelledby":`${o} ${s}`,tabIndex:0,onKeyDown:g,"data-testid":`composition`,children:[(0,j.jsx)(b2,{kind:`Composition`,kindId:s,children:(0,j.jsx)(x2,{id:o,text:t.title})}),(0,j.jsxs)(v2,{stepper:{...n,go:e=>p(e,`step`)},placement:`header`,children:[(0,j.jsxs)(M,{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,j.jsx)(H_,{}),`Restart`]}),(0,j.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,j.jsx)(`option`,{value:t,children:`Step ${t+1}${e.label?`: ${e.label}`:``}`},t))})]}),(0,j.jsxs)(S2,{children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,"data-testid":`composition-step`,children:[c.label&&(0,j.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,j.jsx)(g2,{label:`Step label, scrolls sideways`,children:(0,j.jsx)(`span`,{className:`whitespace-pre`,children:c.label})})}),(0,j.jsx)(`p`,{className:`leading-normal`,"data-testid":`composition-explanation`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:c.explanation,mode:`math`})})}),(0,j.jsxs)(`div`,{className:`text-muted-foreground text-sm`,"data-testid":`composition-changes`,children:[(0,j.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,j.jsx)(`p`,{children:`Nothing visible changed.`})]})]}),(0,j.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`composition-status`,children:h.current.moved&&(0,j.jsxs)(j.Fragment,{children:[`Step `,r+1,` of `,i+1,`. `,c.label&&(0,j.jsxs)(j.Fragment,{children:[c.label,`. `]}),(0,j.jsx)(c2,{text:c.explanation,mode:`math`}),` `,l.map((e,t)=>(0,j.jsxs)(`span`,{children:[(0,j.jsx)(c2,{text:e.text,mode:`math`}),` `]},t))]})}),(0,j.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,j.jsx)(D4,{group:e,drawn:m},e.id)),(0,j.jsx)(`svg`,{className:A(`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,j.jsxs)(`g`,{"data-testid":`composition-connector`,"data-connection":e.id,children:[(0,j.jsx)(`path`,{d:e.path,className:`stroke-muted-foreground`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,j.jsx)(`polygon`,{points:e.arrow,className:`fill-muted-foreground`})]},e.id))})]})]})]})}function D4({group:e,drawn:t}){let n=(0,v.useId)(),r=e.ordered?`ol`:`ul`;return(0,j.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,j.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline justify-between gap-x-2`,"data-composition-obstacle":!0,children:[(0,j.jsx)(`h4`,{id:n,className:`min-w-0 text-sm font-semibold`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:e.label,mode:`math`})})}),e.ordered&&(0,j.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem]`,children:`first at top`})]}),e.entities.length?(0,j.jsx)(r,{className:`flex min-w-0 flex-col gap-2`,children:e.entities.map(e=>(0,j.jsx)(O4,{entity:e,drawn:t},e.id))}):(0,j.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 O4({entity:e,drawn:t}){return(0,j.jsxs)(`li`,{className:A(`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&&p2[e.tone]),"data-testid":`composition-entity`,"data-entity":e.id,"data-tone":e.tone,children:[(0,j.jsxs)(`p`,{className:`min-w-0 font-medium`,children:[(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:e.label,mode:`math`})}),e.tone&&(0,j.jsx)(`span`,{className:`sr-only`,children:w4[e.tone]})]}),e.properties.length>0&&(0,j.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,j.jsxs)(`div`,{className:`contents`,"data-testid":`composition-property`,children:[(0,j.jsx)(`dt`,{className:`text-muted-foreground wrap-anywhere`,children:e.name}),(0,j.jsx)(`dd`,{className:`wrap-anywhere whitespace-pre-wrap`,children:T4(e.value)})]},e.name))}),e.body.map((e,t)=>(0,j.jsx)(k4,{block:e},t)),e.callout&&(0,j.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,j.jsxs)(g2,{children:[(0,j.jsx)(`span`,{className:`sr-only`,children:`Note: `}),(0,j.jsx)(c2,{text:e.callout,mode:`math`})]})}),e.references.length>0&&(0,j.jsx)(`ul`,{className:`flex min-w-0 flex-wrap gap-1.5`,"aria-label":`References`,children:e.references.map(e=>(0,j.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,j.jsx)(`span`,{"aria-hidden":`true`,children:`→`}),(0,j.jsx)(`span`,{className:`sr-only`,children:`refers to `}),(0,j.jsx)(`span`,{className:`min-w-0 wrap-anywhere`,children:(0,j.jsx)(c2,{text:e.toLabel,mode:`math`})}),e.label&&(0,j.jsxs)(`span`,{className:`text-muted-foreground min-w-0 wrap-anywhere`,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,children:`· `}),(0,j.jsx)(`span`,{className:`sr-only`,children:`, as `}),(0,j.jsx)(c2,{text:e.label,mode:`math`})]})]},e.connectionId))})]})}function k4({block:e}){return e.type===`code`?(0,j.jsx)(w2,{code:{language:e.language,source:e.code},lines:[]}):e.type===`math`?(0,j.jsx)(`div`,{className:`min-w-0 text-sm`,"data-testid":`composition-math`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(Y0,{source:e.source})})}):(0,j.jsx)(`p`,{className:`min-w-0 text-sm leading-snug`,"data-testid":`composition-text`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:e.text,mode:`math`})})})}var A4={again:`Again`,good:`Good`,easy:`Easy`},j4=[`again`,`good`,`easy`],M4=864e5;function N4(e,t=new Date){if(e.intervalDays===0)return`Back again this session`;let n=Math.ceil((new Date(e.dueAt).getTime()-t.getTime())/M4);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||vN(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 yN(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,j.jsxs)(y2,{role:`region`,"aria-labelledby":`${p} ${m}`,"data-testid":`flashcard-deck`,children:[(0,j.jsx)(b2,{kind:`Flashcards`,kindId:m,aside:`${S.toLocaleString(`en`)} of ${n.cards.length.toLocaleString(`en`)} rated`,children:(0,j.jsx)(x2,{id:p,text:n.title})}),(0,j.jsxs)(S2,{children:[(0,j.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,j.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,j.jsxs)(`div`,{className:A(`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,j.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,j.jsx)(c2,{text:_.front,mode:`math`})}),(0,j.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,j.jsx)(c2,{text:_.back,mode:`math`})})]})}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>b(r-1),disabled:r===0,"aria-label":`Previous card`,children:[(0,j.jsx)(Yh,{"aria-hidden":!0}),` Previous`]}),(0,j.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>o(e=>!e),children:[(0,j.jsx)(H_,{"aria-hidden":!0}),` `,a?`Show question`:`Flip`]}),(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>b(r+1),disabled:r===g,"aria-label":`Next card`,className:`ml-auto`,children:[`Next `,(0,j.jsx)(Zh,{"aria-hidden":!0})]})]}),a&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-2 border-t pt-3`,role:`group`,"aria-label":`How well did you recall it?`,children:[(0,j.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,j.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:j4.map(e=>(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:l||t,onClick:()=>void x(e),"data-rating":e,children:[l&&(0,j.jsx)(yI,{"aria-hidden":`true`}),A4[e]]},e))})]}),y&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,"data-testid":`flashcard-schedule`,children:[`Rated `,A4[y.rating],` · `,N4(y)]}),d&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:d})]})]})}function F4(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return I4(this.cover(t,n),t,n,e)}function I4(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 L4(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)I4(this,o[n],s[n],e[n]);return this}function R4(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 z4(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function B4(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 V4(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function H4(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 V4(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 V4(p[3],g,_,c,l),new V4(p[2],o,_,g,l),new V4(p[1],g,s,c,_),new V4(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 U4(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 W4(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function G4(){return this._root}function K4(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function q4(e){var t=[],n,r=this._root,i,a,o,s,c;for(r&&t.push(new V4(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 V4(i,l,u,s,c)),(i=r[2])&&t.push(new V4(i,a,u,l,c)),(i=r[1])&&t.push(new V4(i,l,o,s,u)),(i=r[0])&&t.push(new V4(i,a,o,l,u))}return this}function J4(e){var t=[],n=[],r;for(this._root&&t.push(new V4(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 V4(a,o,s,u,d)),(a=i[1])&&t.push(new V4(a,u,s,c,d)),(a=i[2])&&t.push(new V4(a,o,d,u,l)),(a=i[3])&&t.push(new V4(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 Y4(e){return e[0]}function X4(e){return arguments.length?(this._x=e,this):this._x}function Z4(e){return e[1]}function Q4(e){return arguments.length?(this._y=e,this):this._y}function $4(e,t,n){var r=new e3(t??Y4,n??Z4,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function e3(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 t3(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var n3=$4.prototype=e3.prototype;n3.copy=function(){var e=new e3(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=t3(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]=t3(r));return e},n3.add=F4,n3.addAll=L4,n3.cover=R4,n3.data=z4,n3.extent=B4,n3.find=H4,n3.remove=U4,n3.removeAll=W4,n3.root=G4,n3.size=K4,n3.visit=q4,n3.visitAfter=J4,n3.x=X4,n3.y=Q4;function r3(e){return function(){return e}}function i3(e){return(e()-.5)*1e-6}function a3(e){return e.x+e.vx}function o3(e){return e.y+e.vy}function s3(e){var t,n,r,i=1,a=1;typeof e!=`function`&&(e=r3(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=$4(t,a3,o3).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=i3(r),_+=h*h),g===0&&(g=i3(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:r3(+t),c(),o):e},o}function c3(e){return e.index}function l3(e,t){var n=e.get(t);if(!n)throw Error(`node not found: `+t);return n}function u3(e){var t=c3,n=d,r,i=r3(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||i3(l),m=f.y+f.vy-d.y-d.vy||i3(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=l3(u,d.source)),typeof d.target!=`object`&&(d.target=l3(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:r3(+e),m(),f):n},f.distance=function(e){return arguments.length?(i=typeof e==`function`?e:r3(+e),h(),f):i},f}var d3={value:()=>{}};function f3(){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 p3(n)}function p3(e){this._=e}function m3(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}})}p3.prototype=f3.prototype={constructor:p3,on:function(e,t){var n=this._,r=m3(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=h3(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]=g3(n[i],e.name,t);else if(t==null)for(i in n)n[i]=g3(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 p3(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 h3(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function g3(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=d3,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var _3=0,v3=0,y3=0,b3=1e3,x3,S3,C3=0,w3=0,T3=0,E3=typeof performance==`object`&&performance.now?performance:Date,D3=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function O3(){return w3||=(D3(k3),E3.now()+T3)}function k3(){w3=0}function A3(){this._call=this._time=this._next=null}A3.prototype=j3.prototype={constructor:A3,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?O3():+n)+(t==null?0:+t),!this._next&&S3!==this&&(S3?S3._next=this:x3=this,S3=this),this._call=e,this._time=n,I3()},stop:function(){this._call&&(this._call=null,this._time=1/0,I3())}};function j3(e,t,n){var r=new A3;return r.restart(e,t,n),r}function M3(){O3(),++_3;for(var e=x3,t;e;)(t=w3-e._time)>=0&&e._call.call(void 0,t),e=e._next;--_3}function N3(){w3=(C3=E3.now())+T3,_3=v3=0;try{M3()}finally{_3=0,F3(),w3=0}}function P3(){var e=E3.now(),t=e-C3;t>b3&&(T3-=t,C3=e)}function F3(){for(var e,t=x3,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:x3=n);S3=e,I3(r)}function I3(e){_3||(v3&&=clearTimeout(v3),e-w3>24?(e<1/0&&(v3=setTimeout(N3,e-E3.now()-T3)),y3&&=clearInterval(y3)):(y3||=(C3=E3.now(),setInterval(P3,b3)),_3=1,D3(N3)))}var L3=1664525,R3=1013904223,z3=4294967296;function B3(){let e=1;return()=>(e=(L3*e+R3)%z3)/z3}function V3(e){return e.x}function H3(e){return e.y}var U3=10,W3=Math.PI*(3-Math.sqrt(5));function G3(e){var t,n=1,r=.001,i=1-r**(1/300),a=0,o=.6,s=new Map,c=j3(d),l=f3(`tick`,`end`),u=B3();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=U3*Math.sqrt(.5+t),a=t*W3;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 K3(){var e,t,n,r,i=r3(-30),a,o=1,s=1/0,c=.81;function l(n){var i,a=e.length,o=$4(e,V3,H3).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=i3(n),m+=d*d),f===0&&(f=i3(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=i3(n),m+=d*d),f===0&&(f=i3(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:r3(+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 q3(e){var t=r3(.1),n,r,i;typeof e!=`function`&&(e=r3(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:r3(+e),o(),a):t},a.x=function(t){return arguments.length?(e=typeof t==`function`?t:r3(+t),o(),a):e},a}function J3(e){var t=r3(.1),n,r,i;typeof e!=`function`&&(e=r3(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:r3(+e),o(),a):t},a.y=function(t){return arguments.length?(e=typeof t==`function`?t:r3(+t),o(),a):e},a}function Y3(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 X3(){return this.eachAfter(Y3)}function Z3(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function Q3(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 $3(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 e6(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function t6(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 n6(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function r6(e){for(var t=this,n=i6(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 i6(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 a6(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function o6(){return Array.from(this)}function s6(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function c6(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*l6(){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 u6(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=p6)):t===void 0&&(t=f6);for(var n=new g6(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 g6(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(h6)}function d6(){return u6(this).eachBefore(m6)}function f6(e){return e.children}function p6(e){return Array.isArray(e)?e[1]:null}function m6(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function h6(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function g6(e){this.data=e,this.depth=this.height=0,this.parent=null}g6.prototype=u6.prototype={constructor:g6,count:X3,each:Z3,eachAfter:$3,eachBefore:Q3,find:e6,sum:t6,sort:n6,path:r6,ancestors:a6,descendants:o6,leaves:s6,links:c6,copy:d6,[Symbol.iterator]:l6};function _6(e,t){return e.parent===t.parent?1:2}function v6(e){var t=e.children;return t?t[0]:e.t}function y6(e){var t=e.children;return t?t[t.length-1]:e.t}function b6(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 x6(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 S6(e,t,n){return e.a.parent===t.parent?e.a:n}function C6(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}C6.prototype=Object.create(g6.prototype);function w6(e){for(var t=new C6(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 C6(a[o],o)),i.parent=n;return(t.parent=new C6(null,0)).children=[t],t}function T6(){var e=_6,t=1,n=1,r=null;function i(i){var s=w6(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){x6(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=y6(o),i=v6(i),o&&i;)s=v6(s),a=y6(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(b6(S6(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!y6(a)&&(a.t=o,a.m+=u-l),i&&!v6(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 E6=7.8,D6=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\u3000-\u303F\uFF01-\uFF60]/gu,O6=30,k6=18,A6=72,j6=18,M6=30,N6=1500,P6=15,F6=28,I6=34,L6=30,R6=16,z6=.6,B6=9,V6=4.5,H6=8,U6=18,W6=4,G6=[.5,.4,.6,.3,.7,.22,.78],K6=6,q6=150;function J6(e){let t=e=>e.length*E6+(e.match(D6)?.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 Y6=e=>e.weight===void 0?e.label:String(e.weight),X6=e=>(e?J6(e):0)+8;function Z6(e,t){let n=Math.max(...[...e.values()].map(e=>e.width)),r=u6(t.root,e=>t.children.get(e));T6().nodeSize([n+j6,A6]).separation(()=>1)(r),r.each(t=>Object.assign(e.get(t.data),{x:t.x,y:t.y}))}function Q6(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=>X6(Y6(e)))),o=Math.max((i+j6)/2,a+W6),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*A6}),d};c(n.root,0,0)}var $6=e=>t=>{let n=N6*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+F6,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 e8(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=u3([...r.values()]).id(e=>e.id).distance(e=>M6+e.source.radius+e.target.radius);G3(n).stop().alphaDecay(1-.001**(1/q6)).force(`link`,s).force(`repel`,$6(n)).force(`edgeClearance`,o).force(`x`,q3().strength(.05)).force(`y`,J3().strength(.05)).tick(q6);for(let e of n)Object.assign(t.get(e.id),{x:e.x,y:e.y})}function rie(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 iie(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):rie(i,o,s),l=(a.from===a.to?o.width/2+L6+(c-1)*R6:(c-1)*I6/2)+(e.directed?V6: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 t8(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 n8(e,t,n){for(let r=0;r<14;r++){let r=(e+t)/2;n(r)?e=r:t=r}return e}var r8=(e,t,n)=>e+(t-e)*n,i8=(e,t,n)=>({x:r8(e.x,t.x,n),y:r8(e.y,t.y,n)}),a8=(e,t,n)=>r=>i8(i8(e,t,r),i8(t,n,r),r),aie=(e,t,n,r)=>i=>i8(a8(e,t,n)(i),a8(t,n,r)(i),i);function o8(e,t,n,r,i){let a=t8(t,e(.5))?.5:n8(0,.5,n=>t8(t,e(n))),o=t8(n,e(.5))?.5:n8(1,.5,t=>t8(n,e(t))),s=e(o),c=i?n8(o,a,t=>Math.hypot(e(t).x-s.x,e(t).y-s.y)<B6):o,l=Array.from({length:r+1},(t,n)=>e(r8(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*V6,y:(s.x-u.x)/d*V6};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 oie(e,t,n){return n8(0,e.width+e.height,r=>t8(e,{x:e.x+t*r,y:e.y+n*r}))}var s8=(e,t)=>Math.abs(e.x-t.x)<(e.width+t.width)/2&&Math.abs(e.y-t.y)<(e.height+t.height)/2,c8=e=>Math.round(e*100)/100,l8=(e,t)=>e.map(e=>`${c8(e.x+t.x)},${c8(e.y+t.y)}`);function sie(e){let t=new Map(e.nodes.map(e=>[e.id,{x:0,y:0,width:Math.max(O6,J6(e.label??e.id)+k6),height:O6}])),n=e.kind===`tree`?CA(e):void 0;n?e.edges.some(e=>e.side)?Q6(e,t,n):Z6(t,n):e8(e,t),iie(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=(oie(u,Math.cos(t),Math.sin(t))+L6+l*R6)/(.75*Math.cos(z6)),r=e=>({x:u.x+Math.cos(e)*n,y:u.y+Math.sin(e)*n}),a=aie(u,r(t-z6),r(t+z6),u);return{...o8(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)*I6*2,_=i8(u,d,.5),v=a8(u,{x:_.x+(p.y-m.y)/h*g,y:_.y+(m.x-p.x)/h*g},d);return{...o8(v,u,d,f>1?16:1,e.directed),curve:v}}),u=[...r],d=l.map((t,n)=>{let r=Y6(e.edges[n]),i={width:X6(r),height:U6},a=G6.map(e=>({...t.curve(e),...i}));if(!r)return a[0];let o=a.map(e=>u.filter(t=>s8(t,e)).length),s=a[o.indexOf(Math.min(...o))],c=Array.from({length:K6},(e,t)=>t+1).flatMap(e=>{let[t,n]=[e*(i.height+W6),e*(i.width+W6)];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=>s8(t,e)))??s;return u.push(l),l}),f=[...r,...d.filter((t,n)=>Y6(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))-H6,m=Math.min(...f.map(e=>e.y-e.height/2))-H6,h=Math.max(...f.map(e=>e.x+e.width/2))+H6,g=Math.max(...f.map(e=>e.y+e.height/2))+H6,_={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:c8(n.x+_.x),y:c8(n.y+_.y),width:n.width,height:n.height}}),edges:l.map((e,t)=>({path:`M${l8(e.points,_).join(`L`)}`,...e.arrow?{arrow:l8(e.arrow,_).join(` `)}:{},label:{x:c8(d[t].x+_.x),y:c8(d[t].y+_.y),width:d[t].width,height:d[t].height}}))}}var cie=11/13,u8={x:2,y:4},d8=.5,f8=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`},p8={active:`active`,done:`done`,muted:`ruled out`};function fie(e,t){let n=e.steps?.[t],r=SA(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 m8({labelKey:e,width:t,height:n,truncated:r,children:i}){return(0,j.jsxs)(`span`,{className:`relative block overflow-hidden`,style:{width:f8(t),height:f8(n)},"data-label-clip":e,"data-truncated":r?`true`:void 0,children:[(0,j.jsx)(`span`,{className:A(`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,j.jsx)(`span`,{className:`w-max whitespace-nowrap`,"data-label-content":!0,children:i})}),r&&(0,j.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=h2(n.length),i=JSON.stringify([t.directed,t.kind,t.nodes,t.edges]),a=(0,v.useMemo)(()=>sie(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+d8||i>t.height+d8}).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,j.jsxs)(y2,{role:`region`,"aria-labelledby":`${_} ${y}`,tabIndex:h?0:void 0,onKeyDown:h?p:void 0,children:[(0,j.jsx)(b2,{kind:t.directed?`Directed graph`:`Graph`,kindId:y,children:(0,j.jsx)(x2,{id:_,text:t.title})}),(0,j.jsxs)(S2,{children:[(0,j.jsx)(gie,{spec:t}),(0,j.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,j.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,j.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,j.jsxs)(`g`,{"data-testid":`graph-edge`,"data-tone":n,children:[(0,j.jsx)(`path`,{d:e.path,className:r.stroke,strokeWidth:r.width,strokeDasharray:r.dash,strokeLinecap:`round`}),e.arrow&&(0,j.jsx)(`polygon`,{points:e.arrow,className:r.fill,"data-testid":`graph-arrow`})]},t)})}),(0,j.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=Y6(e),r=a.edges[t].label,i=m.edges.get(t);return n===void 0?null:(0,j.jsx)(`span`,{className:A(`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,j.jsx)(m8,{labelKey:`e-${t}`,width:r.width,height:r.height,truncated:u.has(`e-${t}`),children:e.weight===void 0?(0,j.jsx)(c2,{text:n,mode:`math`}):n})},t)}),a.nodes.map((e,n)=>{let r=m.nodes.get(e.id);return(0,j.jsxs)(`div`,{className:A(`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,j.jsx)(m8,{labelKey:`n-${e.id}`,width:e.width-u8.x,height:e.height-u8.y,truncated:u.has(`n-${e.id}`),children:(0,j.jsx)(`span`,{className:f.has(e.id)?`invisible`:void 0,children:(0,j.jsx)(c2,{text:t.nodes[n].label??e.id,mode:`math`})})}),f.has(e.id)&&(0,j.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,j.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,j.jsx)(Gh,{className:`size-[0.8em]`,strokeWidth:3.5})})]},e.id)})]})]})}),(0,j.jsx)(mie,{spec:t,truncated:u,nodeKeys:f}),m.variables.length>0&&(0,j.jsx)(`dl`,{className:`flex flex-wrap gap-2`,"aria-hidden":h?!0:void 0,children:m.variables.map((e,t)=>(0,j.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,j.jsx)(`dt`,{className:`min-w-0`,children:e.name}),(0,j.jsxs)(`dd`,{className:`min-w-0`,children:[`= `,String(e.value)]})]},t))}),h&&(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(hie,{spec:t,state:m,step:r.index+1,of:n.length})})]}),h&&(0,j.jsx)(v2,{stepper:r,play:!0})]})}function mie({spec:e,truncated:t,nodeKeys:n}){if(t.size===0)return null;let r=e.directed?`→`:`–`;return(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,"data-testid":`graph-overflow`,children:[(0,j.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,j.jsxs)(_2,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[`Node `,n.get(r.id),`:`]}),` `,(0,j.jsx)(h8,{spec:e,id:r.id})]},r.id):null),e.edges.map((i,a)=>t.has(`e-${a}`)?(0,j.jsxs)(_2,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[`Edge `,n.get(i.from)??(0,j.jsx)(h8,{spec:e,id:i.from}),` `,r,` `,n.get(i.to)??(0,j.jsx)(h8,{spec:e,id:i.to}),`:`]}),` `,i.weight===void 0?(0,j.jsx)(c2,{text:i.label,mode:`math`}):i.weight]},a):null)]})}function h8({spec:e,id:t}){return(0,j.jsx)(c2,{text:e.nodes.find(e=>e.id===t)?.label??t,mode:`math`})}function g8({spec:e,index:t}){let n=e.edges[t];return(0,j.jsxs)(j.Fragment,{children:[n.from===n.to?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(h8,{spec:e,id:n.from}),` to itself`]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(h8,{spec:e,id:n.from}),` `,e.directed?`to`:`and`,` `,(0,j.jsx)(h8,{spec:e,id:n.to})]}),n.side&&`, ${n.side} child`,n.weight!==void 0&&`, weight ${n.weight}`,n.label!==void 0&&(0,j.jsxs)(j.Fragment,{children:[`, labelled `,(0,j.jsx)(c2,{text:n.label,mode:`math`})]})]})}function hie({spec:e,state:t,step:n,of:r}){return(0,j.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`graph-status`,children:[(0,j.jsxs)(`p`,{className:`sr-only`,children:[`Step `,n,` of `,r,`.`]}),(0,j.jsx)(`div`,{"data-testid":`graph-explanation`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:t.explanation,mode:`math`})})}),(0,j.jsxs)(`ul`,{className:`sr-only`,children:[[...t.nodes].map(([t,n])=>(0,j.jsxs)(`li`,{children:[`Node `,(0,j.jsx)(h8,{spec:e,id:t}),` is `,p8[n],`.`]},`n-${t}`)),[...t.edges].map(([t,n])=>(0,j.jsxs)(`li`,{children:[`Edge `,(0,j.jsx)(g8,{spec:e,index:t}),` is `,p8[n],`.`]},`e-${t}`)),t.variables.map((e,t)=>(0,j.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,j.jsxs)(`ul`,{className:`sr-only`,"data-testid":`graph-description`,children:[(0,j.jsxs)(`li`,{children:[e.directed?`Directed`:`Undirected`,` graph with `,t,` `,t===1?`node`:`nodes`,` and `,n,` `,n===1?`edge`:`edges`,`.`]}),(0,j.jsxs)(`li`,{children:[`Nodes:`,` `,e.nodes.map((t,n)=>(0,j.jsxs)(`span`,{children:[n>0&&`, `,(0,j.jsx)(h8,{spec:e,id:t.id})]},t.id))]}),e.edges.map((t,n)=>(0,j.jsxs)(`li`,{children:[`Edge: `,(0,j.jsx)(g8,{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 oN(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,j.jsxs)(y2,{role:`region`,"aria-label":`Anything else to add`,children:[(0,j.jsx)(b2,{kind:`Placement`,aside:`Optional`}),(0,j.jsxs)(S2,{className:`gap-4`,children:[(0,j.jsx)(`label`,{htmlFor:f,className:`font-heading text-[1.2rem] leading-snug font-medium text-pretty`,children:(0,j.jsx)(c2,{text:i.question,mode:`math`})}),p?h===void 0?(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm font-medium`,children:`Skipped.`}):(0,j.jsx)(`p`,{className:`bg-sunken rounded-md px-3 py-2 text-sm whitespace-pre-wrap wrap-anywhere`,children:h}):(0,j.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),_&&g({text:_})},children:[(0,j.jsx)(P2,{id:f,value:o,maxLength:eA,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,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(M,{type:`submit`,size:`sm`,disabled:m||!_,children:`Send`}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground`,disabled:m,onClick:()=>void g({skipped:!0}),children:`Skip`}),(0,j.jsxs)(`span`,{id:`${f}-help`,className:`text-muted-foreground ml-auto text-xs`,children:[`Fine to leave blank · `,o.length,`/`,eA]})]})]}),(0,j.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-1 text-sm`,children:[!p&&t&&(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Answer once the reply finishes.`}),u&&(0,j.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 iN(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,j.jsxs)(y2,{role:`region`,"aria-label":`Check: ${i.concept}`,children:[(0,j.jsx)(b2,{kind:`Check`,aside:`Graded against an answer key`,children:(0,j.jsx)(`span`,{className:`text-muted-foreground min-w-0 text-sm font-semibold wrap-anywhere`,children:i.concept})}),(0,j.jsxs)(S2,{className:`gap-4`,children:[(0,j.jsx)(`div`,{"data-slot":`check-question`,className:`font-heading text-[1.2rem] leading-snug font-medium text-pretty`,children:(0,j.jsx)(c2,{text:i.question,mode:`math`})}),(0,j.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,j.jsxs)(M,{type:`button`,variant:`outline`,"data-result":n,className:A(`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,j.jsx)(C2,{index:t}),(0,j.jsx)(`span`,{className:`min-w-0 flex-[1_1_10rem] wrap-anywhere`,children:(0,j.jsx)(c2,{text:e.text,mode:`math`})}),g(t)&&(0,j.jsx)(`span`,{className:A(`shrink-0 pl-9 text-sm font-semibold sm:pl-0`,n===`incorrect`?`text-destructive`:`text-success`),children:g(t)})]},t)})}),(0,j.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2`,children:[!u&&t&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Answer once the reply finishes.`}),c&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:c}),p&&(0,j.jsxs)(j2,{className:`bg-sunken border-0 px-4 py-3`,children:[(0,j.jsx)(M2,{className:A(`font-heading text-[1.15rem] font-medium`,p.correct?`text-success`:`text-destructive`),children:p.correct?`Correct!`:`Not quite.`}),(0,j.jsxs)(N2,{className:`text-foreground`,children:[p.feedback&&(0,j.jsx)(`p`,{children:(0,j.jsx)(c2,{text:p.feedback,mode:`math`})}),(0,j.jsx)(`p`,{children:(0,j.jsx)(c2,{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 aN(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,j.jsxs)(y2,{role:`region`,"aria-label":`Placement question: ${i.concept}`,children:[(0,j.jsx)(b2,{kind:`Placement`,children:(0,j.jsx)(`span`,{className:`text-muted-foreground min-w-0 text-sm font-semibold wrap-anywhere`,children:i.concept})}),(0,j.jsxs)(S2,{className:`gap-4`,children:[(0,j.jsx)(`div`,{className:`font-heading text-[1.2rem] leading-snug font-medium text-pretty`,children:(0,j.jsx)(c2,{text:i.question,mode:`math`})}),(0,j.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,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,"data-result":n,"aria-pressed":m===t,className:A(`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,j.jsx)(c2,{text:e.text,mode:`math`})},t)}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-pressed":f?.result===`unsure`,className:A(u&&`disabled:opacity-100`,f?.result===`unsure`&&`bg-muted`),disabled:d,onClick:()=>void h(`unsure`),children:`Not sure`}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-pressed":f?.result===`skipped`,className:A(`text-muted-foreground`,u&&`disabled:opacity-100`,f?.result===`skipped`&&`bg-muted`),disabled:d,onClick:()=>void h(`skipped`),children:`Skip`})]}),(0,j.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-1 text-sm`,children:[!u&&t&&(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Answer once the reply finishes.`}),c&&(0,j.jsx)(`p`,{className:`text-destructive`,children:c}),f&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:A(`font-medium`,f.result===`correct`?`text-success`:f.result===`incorrect`?`text-destructive`:`text-muted-foreground`),children:_}),f.result!==`skipped`&&(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:(0,j.jsx)(c2,{text:f.explanation,mode:`math`})})]})]})]})]})}var xie=se(`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 _8({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Gt:`span`;return(0,j.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:A(xie({variant:t}),e),...r})}var Sie=4e4,v8=e=>e===``?[]:e.split(`
539
+ `);function Cie(e,t){let n=v8(Fk(e)),r=v8(Fk(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,y8=(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 "${y8(r.expected)}", got "${y8(s.stdout)}"`)}}if(r&&!r.review.approved)for(let[e,t]of Die)r.review[e].passed||i.push(`- Code review (${t}): ${y8(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 b8=(0,v.createContext)(void 0),x8=(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 S8({label:e,text:t,tone:n}){return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,j.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem] tracking-[0.06em] uppercase`,children:e}),(0,j.jsx)(`pre`,{className:A(`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,j.jsx)(`span`,{className:`text-muted-foreground italic`,children:`(nothing)`}):t})]})}function C8({text:e,label:t}){let[n,r]=(0,v.useState)(!1);return(0,j.jsxs)(`div`,{className:`bg-sunken flex min-w-0 items-center gap-2 rounded-md py-1 pr-1 pl-3`,children:[(0,j.jsx)(`code`,{className:`min-w-0 flex-1 overflow-x-auto font-mono text-xs whitespace-pre`,children:e}),(0,j.jsx)(M,{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,j.jsx)(Gh,{"aria-hidden":!0}):(0,j.jsx)(xg,{"aria-hidden":!0})})]})}function Aie({expected:e,actual:t,truncated:n}){let r=Cie(e,t);return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,"data-testid":`milestone-case-diff`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem] tracking-[0.06em] uppercase`,children:`Output diff`}),(0,j.jsx)(`span`,{className:`text-success font-mono text-[0.6875rem]`,children:`- expected`}),(0,j.jsx)(`span`,{className:`text-destructive font-mono text-[0.6875rem]`,children:`+ got`})]}),(0,j.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,j.jsxs)(`div`,{"data-diff-kind":e.kind,className:A(`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,j.jsx)(`span`,{"aria-hidden":!0,className:`select-none`,children:e.kind===`expected`?`- `:e.kind===`actual`?`+ `:` `}),e.kind!==`same`&&(0,j.jsx)(`span`,{className:`sr-only`,children:e.kind===`expected`?`expected: `:`got: `}),e.text===``?` `:e.text]},t)),n&&(0,j.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 w8({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 lN(e,{...t,reason:a.trim()});c(!1),n.ok?await r():u(n.error)};return(0,j.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:e=>{e.preventDefault(),a.trim()&&!s&&f()},children:[(0,j.jsx)(`label`,{htmlFor:d,className:`text-sm font-medium`,children:n}),(0,j.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,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(M,{type:`submit`,size:`sm`,disabled:s||!a.trim(),children:[s&&(0,j.jsx)(yI,{}),s?`The tutor is looking again…`:`Send dispute`]}),(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`ghost`,disabled:s,onClick:i,children:`Cancel`})]}),l&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:l})]})}function Nie({review:e,createdAt:t}){return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-testid":`milestone-review`,"data-approved":e.approved,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,j.jsx)(`span`,{className:A(`font-medium`,e.approved?`text-success`:`text-destructive`),children:e.approved?`Approved`:`Changes requested`}),(0,j.jsx)(_8,{variant:`outline`,children:`Judged by a model`}),(0,j.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[e.model,`, `,(0,j.jsx)(`time`,{dateTime:t,children:new Date(t).toLocaleString()})]})]}),(0,j.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:jie.map(([t,n])=>(0,j.jsxs)(`li`,{className:`flex gap-2 text-sm`,children:[e[t].passed?(0,j.jsx)(Gh,{className:`text-success mt-0.5 size-4 shrink-0`,"aria-hidden":!0}):(0,j.jsx)(yv,{className:`text-destructive mt-0.5 size-4 shrink-0`,"aria-hidden":!0}),(0,j.jsxs)(`span`,{className:`min-w-0`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:n}),(0,j.jsx)(`span`,{className:`sr-only`,children:e[t].passed?`: passed`:`: not yet`}),` `,(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:e[t].note})]})]},t))}),(0,j.jsx)(`div`,{className:`text-[0.95rem]`,children:(0,j.jsx)(c2,{text:e.summary,mode:`block`})}),e.suggestions.length>0&&(0,j.jsx)(`ul`,{className:`text-muted-foreground list-disc pl-5 text-sm`,children:e.suggestions.map((e,t)=>(0,j.jsx)(`li`,{children:e},t))})]})}function Pie({view:e,onRefresh:t}){let{spec:n,latestAttempt:r,latestReview:i}=e,a=(0,v.useContext)(b8),o=(0,v.useContext)(x8),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,j.jsxs)(y2,{role:`region`,"aria-labelledby":s,"data-testid":`project-milestone`,children:[(0,j.jsx)(b2,{kind:`Milestone`,aside:p?`Checked by a code review`:`Checked in your repository`,children:(0,j.jsx)(x2,{id:s,text:n.title})}),(0,j.jsxs)(S2,{className:`@container gap-4`,children:[(0,j.jsx)(`div`,{className:`text-[0.95rem]`,"data-testid":`milestone-spec`,children:(0,j.jsx)(c2,{text:n.spec,mode:`block`})}),(0,j.jsxs)(`section`,{className:`flex flex-col gap-1.5`,"aria-label":`Output format`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`Output format`}),(0,j.jsx)(`div`,{className:`text-[0.95rem]`,children:(0,j.jsx)(c2,{text:n.outputFormat,mode:`block`})})]}),n.reviewFocus&&(0,j.jsxs)(`section`,{className:`flex flex-col gap-1.5`,"aria-label":`What the review looks for`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`What the review looks for`}),(0,j.jsx)(`div`,{className:`text-[0.95rem]`,children:(0,j.jsx)(c2,{text:n.reviewFocus,mode:`block`})})]}),(0,j.jsxs)(`section`,{className:`flex flex-col gap-2`,"aria-label":`Check it`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`Check it`}),(0,j.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,j.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,j.jsx)(C8,{label:`link command`,text:`mivra link ${a} --run "./your-program {input}"${f?` --run-output "./run-it {output}"`:``}`}),(0,j.jsx)(C8,{label:`check command`,text:`mivra check`}),(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Use `,(0,j.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,j.jsx)(`code`,{className:`font-mono text-xs`,children:`.gitignore`}),` and never sends `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`.env`}),` files or keys; `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check --dry-run`}),` lists exactly what it would send.`]}),f&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Some cases run what your program prints: `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`{output}`}),` in your run-output command becomes the path to a file holding it.`]})]}),(0,j.jsx)(`div`,{"aria-live":`polite`,"data-testid":`milestone-status`,children:u?(0,j.jsxs)(j2,{className:`bg-sunken border-0 px-4 py-3`,children:[(0,j.jsx)(M2,{className:A(`font-heading text-[1.15rem] font-medium`,e.passed?`text-success`:`text-destructive`),children:e.passed?`Milestone passed.`:`Not yet.`}),(0,j.jsxs)(N2,{className:`text-foreground flex flex-col gap-2`,children:[(0,j.jsxs)(`span`,{children:[`Latest check`,u.total>0?`: ${u.passed} of ${u.total} ${u.total===1?`case`:`cases`} passed`:``,`,`,` `,(0,j.jsx)(`time`,{dateTime:r.createdAt,children:new Date(r.createdAt).toLocaleString()}),`.`]}),g&&o&&(0,j.jsx)(`div`,{className:`pt-0.5`,children:(0,j.jsxs)(M,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>o(Oie(e)),children:[(0,j.jsx)(_g,{"aria-hidden":!0}),`Practice this concept`]})})]})]}):(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Not checked yet.`})}),r&&(0,j.jsxs)(`section`,{className:`flex flex-col gap-2 rounded-lg border px-3 py-2.5`,"aria-label":`Code review`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`Code review`}),i?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Nie,{review:i.review,createdAt:i.createdAt}),!i.review.approved&&(c===`review`?(0,j.jsx)(w8,{artifactId:e.id,target:{target:`review`},label:`Why is the verdict wrong?`,onDone:_,onCancel:()=>l(void 0)}):(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`outline`,className:`self-start`,onClick:()=>l(`review`),children:`Dispute this verdict`}))]}):(0,j.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,j.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,j.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,j.jsxs)(`li`,{className:A(`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,j.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[i===!0&&(0,j.jsx)(Gh,{className:`text-success size-4 shrink-0`,"aria-hidden":!0}),i===!1&&(0,j.jsx)(yv,{className:`text-destructive size-4 shrink-0`,"aria-hidden":!0}),(0,j.jsx)(`span`,{className:A(`min-w-0 font-medium wrap-anywhere`,t.withdrawn&&`line-through`),children:t.name}),i!==void 0&&(0,j.jsx)(`span`,{className:`sr-only`,children:i?` passed`:` failed`}),t.withdrawn&&(0,j.jsx)(_8,{variant:`outline`,children:`Withdrawn`}),(0,j.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[t.compare===`run_output`&&(0,j.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`runs your output`}),!t.withdrawn&&c!==n&&(0,j.jsx)(M,{type:`button`,size:`xs`,variant:`ghost`,onClick:()=>l(n),"aria-label":`Dispute case: ${t.name}`,children:`Dispute`})]})]}),c===n&&(0,j.jsx)(w8,{artifactId:e.id,target:{target:`case`,caseIndex:n},label:`Why is "${t.name}" wrong?`,onDone:_,onCancel:()=>l(void 0)}),(0,j.jsxs)(`div`,{className:`grid gap-2 @[34rem]:grid-cols-2`,children:[(0,j.jsx)(S8,{label:`Input`,text:t.input}),(0,j.jsx)(S8,{label:t.compare===`run_output`?`Running your output prints`:`Expected output`,text:t.expected})]}),i===!1&&a&&(0,j.jsxs)(j.Fragment,{children:[a.error?(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:kie[a.error]}):(0,j.jsxs)(j.Fragment,{children:[a.exitCode!==0&&(0,j.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Exited with code `,a.exitCode,`.`]}),(0,j.jsx)(S8,{label:`Your program printed`,text:a.truncated?`${a.stdout}\n… (cut short)`:a.stdout}),(Fk(a.stdout)!==Fk(t.expected)||a.truncated)&&(0,j.jsx)(Aie,{expected:t.expected,actual:a.stdout,truncated:a.truncated})]}),a.stderr&&(0,j.jsx)(S8,{label:`stderr`,text:a.stderr,tone:`error`})]})]},n)})}),n.disputes.length>0&&(0,j.jsxs)(`section`,{className:`flex flex-col gap-2`,"aria-label":`Disputes`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`Disputes`}),(0,j.jsx)(`ul`,{className:`flex flex-col gap-2`,"data-testid":`milestone-disputes`,children:n.disputes.map(e=>(0,j.jsxs)(`li`,{className:`bg-sunken flex flex-col gap-1 rounded-md px-3 py-2 text-sm`,children:[(0,j.jsxs)(`span`,{children:[(0,j.jsx)(`span`,{className:`font-medium`,children:e.target===`case`?`Case "${e.caseName??``}"`:`Review verdict`}),`: `,Mie[e.outcome]]}),(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`You said: `,e.reason]}),(0,j.jsx)(`span`,{children:e.explanation})]},e.id))})]})]})]})}var T8=380,E8=100,Fie={1:{width:T8,height:320,radius:E8,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:T8,height:320,radius:E8,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:T8,height:410,radius:E8,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/T8);function Iie(e,t,n){let r=n/e.width;return{width:t.width*r,height:t.rows*D8*r}}var O8=.5,k8=(e,t)=>e.width<=t.width+O8&&e.height<=t.height+O8;function Lie(e,t,n){return k8(t,e)?`contents`:k8(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,A8=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${A8(e.from.x)} ${A8(e.from.y)}`,r=e;for(;r;){let{to:e,large:i,sweep:o}=r;t+=`A${n} ${n} 0 ${+!!i} ${o} ${A8(e.x)} ${A8(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`,j8={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 M8(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(M8(e,t.in),t.tone??`active`);return{explanation:n?.explanation??``,tones:r,variables:n?.variables??[]}}function N8(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 P8({text:e}){return(0,j.jsx)(c2,{text:e,mode:`math`})}function F8({elements:e}){return e.map((e,t)=>(0,j.jsxs)(v.Fragment,{children:[t>0&&`, `,(0,j.jsx)(P8,{text:Wie(e)})]},t))}function I8(e,t){return e.map((n,r)=>(0,j.jsxs)(v.Fragment,{children:[r>0&&(r===e.length-1?` ${t} `:`, `),n]},r))}function L8({spec:e,mask:t}){let n=e=>(0,j.jsx)(P8,{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,j.jsxs)(j.Fragment,{children:[`outside `,I8(i,`and`)]}):(0,j.jsxs)(j.Fragment,{children:[`in `,I8(r,`and`),i.length>0&&(0,j.jsxs)(j.Fragment,{children:[`, not `,I8(i,`or`)]})]})}var R8=e=>e.count??e.elements.length;function z8({total:e}){return(0,j.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`n = `,e]})}function B8({region:e}){let t=R8(e);return e.elements.length===0?(0,j.jsx)(z8,{total:t}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(F8,{elements:e.elements}),t!==e.elements.length&&(0,j.jsxs)(j.Fragment,{children:[` `,`(`,(0,j.jsx)(z8,{total:t}),`)`]})]})}function V8({slot:e,layout:t,children:n,...r}){let i=(e,t)=>`${e/t*100}%`;return(0,j.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,j.jsx)(`span`,{className:`bg-card/85 rounded-sm px-0.5`,children:n})})}function H8(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 N8(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),H8(e),H8(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,It.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&&j8[n],a=`${r.clip}-${t}`;return(0,j.jsxs)(`g`,{"data-testid":`set-region`,"data-mask":t,"data-tone":n??`none`,children:[(0,j.jsx)(`path`,{d:e,fillRule:`evenodd`,className:i?i.tint:`fill-transparent`,"data-testid":`set-region-shape`}),i&&(0,j.jsxs)(j.Fragment,{children:[i.pattern&&(0,j.jsx)(`path`,{d:e,fillRule:`evenodd`,fill:`url(#${i.pattern===`hatch`?r.hatch:r.dots})`}),(0,j.jsx)(`clipPath`,{id:a,children:(0,j.jsx)(`path`,{d:e,clipRule:`evenodd`})}),(0,j.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=N8(e),p=new Map(e.regions.map(t=>[M8(e,t.in),t]));return(0,j.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,j.jsxs)(`svg`,{viewBox:`0 0 ${s} ${c}`,className:`absolute inset-0 size-full`,children:[(0,j.jsxs)(`defs`,{children:[(0,j.jsx)(`pattern`,{id:o.hatch,patternUnits:`userSpaceOnUse`,width:`10`,height:`10`,patternTransform:`rotate(45)`,children:(0,j.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`10`,strokeWidth:`2`,className:`stroke-foreground/45`})}),(0,j.jsx)(`pattern`,{id:o.dots,patternUnits:`userSpaceOnUse`,width:`10`,height:`10`,children:(0,j.jsx)(`circle`,{cx:`5`,cy:`5`,r:`1.6`,className:`fill-success/70`})})]}),f.map(e=>(0,j.jsx)(Yie,{d:Vie(t,e),mask:e,tone:n.get(e),ids:o},e)),e.universe!==void 0&&(0,j.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,j.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,j.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,j.jsx)(`span`,{className:`bg-card/85 rounded-sm px-0.5`,children:(0,j.jsx)(P8,{text:t.label})})},t.id)),e.universe!==void 0&&(0,j.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,j.jsx)(`span`,{className:`bg-card/85 rounded-sm px-0.5`,children:(0,j.jsx)(P8,{text:e.universe})})}),f.map(e=>{let n=p.get(e);if(!n)return null;let i=r.get(e)??`contents`;return(0,j.jsx)(V8,{slot:d[e],layout:t,"data-testid":`set-elements`,"data-mask":e,"data-fit":i,children:R8(n)===0?`∅`:i===`contents`?(0,j.jsx)(B8,{region:n}):i===`marker`?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(z8,{total:R8(n)}),` ↓`]}):`↓`},e)}),(0,j.jsx)(`div`,{className:`invisible absolute inset-0 overflow-hidden`,children:f.map(e=>{let n=p.get(e);return!n||R8(n)===0?null:(0,j.jsxs)(v.Fragment,{children:[(0,j.jsx)(V8,{slot:d[e],layout:t,"data-probe":`contents`,"data-mask":e,children:(0,j.jsx)(B8,{region:n})}),(0,j.jsxs)(V8,{slot:d[e],layout:t,"data-probe":`marker`,"data-mask":e,children:[(0,j.jsx)(z8,{total:R8(n)}),` ↓`]})]},e)})})]})}function Zie({view:e}){let{spec:t}=e,n=t.steps?.length??0,r=h2(n),{index:i}=r,a=(0,v.useId)(),o=(0,v.useId)(),s=Fie[t.sets.length],c=Uie(t,i),l=N8(t),u=new Map(t.regions.map(e=>[M8(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,j.jsxs)(y2,{role:`region`,"aria-labelledby":`${a} ${o}`,...n>0?{tabIndex:0,onKeyDown:r.onKeyDown}:{},children:[(0,j.jsx)(b2,{kind:`Set diagram`,kindId:o,children:(0,j.jsx)(x2,{id:a,text:t.title})}),(0,j.jsxs)(S2,{children:[(0,j.jsxs)(`ul`,{className:`sr-only`,"data-testid":`set-description`,children:[t.sets.map(e=>(0,j.jsxs)(`li`,{children:[`Set: `,(0,j.jsx)(P8,{text:e.label})]},e.id)),t.universe!==void 0&&(0,j.jsxs)(`li`,{children:[`Universe: `,(0,j.jsx)(P8,{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,j.jsxs)(`li`,{children:[(0,j.jsx)(L8,{spec:t,mask:e}),`: `,r&&`empty`,(0,j.jsx)(F8,{elements:n.elements}),n.count!==void 0&&n.count!==n.elements.length&&!r&&`${n.elements.length>0?`, `:``}${n.count} in total`]},e)})]}),(0,j.jsx)(Xie,{spec:t,layout:s,tones:c.tones,fits:p,drawing:f}),(h.length>0||m.length>0)&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,"data-testid":`set-overflow`,children:[(0,j.jsx)(`p`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`↓ Doesn't fit in the diagram:`}),m.map(e=>(0,j.jsxs)(_2,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[e===`universe`?`Universe`:`${qie[Number(e)]} label`,`:`]}),` `,(0,j.jsx)(P8,{text:e===`universe`?t.universe:t.sets[Number(e)].label})]},e)),h.map(e=>(0,j.jsxs)(_2,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[(0,j.jsx)(L8,{spec:t,mask:e}),`:`]}),` `,(0,j.jsx)(`span`,{className:`font-mono`,children:(0,j.jsx)(B8,{region:u.get(e)})})]},e))]}),d.length>0&&(0,j.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,j.jsx)(`div`,{className:`max-w-full min-w-0`,"data-tone":n,children:(0,j.jsxs)(_2,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[j8[n].word,`:`]}),` `,(0,j.jsx)(L8,{spec:t,mask:e})]})},e)})}),c.variables.length>0&&(0,j.jsx)(`div`,{className:`flex flex-wrap gap-2`,"data-testid":`set-variables`,children:c.variables.map((e,t)=>(0,j.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,j.jsxs)(_2,{children:[(0,j.jsx)(P8,{text:e.name}),` = `,(0,j.jsx)(P8,{text:String(e.value)})]})},t))}),n>0&&(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`set-announcement`,children:[(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Step `,i+1,` of `,n,`:`,` `]}),(0,j.jsx)(`div`,{"data-testid":`set-explanation`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:c.explanation,mode:`math`})})}),(0,j.jsxs)(`span`,{className:`sr-only`,children:[d.length===0&&`Nothing highlighted. `,d.map(e=>(0,j.jsxs)(v.Fragment,{children:[j8[c.tones.get(e)].word,`: `,(0,j.jsx)(L8,{spec:t,mask:e}),`.`,` `]},e)),c.variables.map((e,t)=>(0,j.jsxs)(v.Fragment,{children:[(0,j.jsx)(P8,{text:e.name}),` = `,(0,j.jsx)(P8,{text:String(e.value)}),`.`,` `]},t))]})]})})]}),n>0&&(0,j.jsx)(v2,{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 U8=e=>typeof e==`boolean`?e?`T`:`F`:String(e),W8=({row:e,column:t})=>[e!==void 0&&`row ${e+1}`,t!==void 0&&`column ${t+1}`].filter(Boolean).join(`, `),G8=`wrap-normal!`;function eae({view:e}){let{spec:t}=e,n=h2(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,j.jsxs)(y2,{role:`region`,"aria-labelledby":`${o} ${s}`,...a?{tabIndex:0,onKeyDown:n.onKeyDown}:{},children:[(0,j.jsx)(b2,{kind:`Table`,kindId:s,children:(0,j.jsx)(x2,{id:o,text:t.title})}),(0,j.jsxs)(S2,{children:[(0,j.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,j.jsxs)(`table`,{className:`mx-auto border-collapse text-sm`,children:[(0,j.jsx)(`caption`,{className:`sr-only`,children:(0,j.jsx)(c2,{text:t.title,mode:`math`})}),(0,j.jsx)(`thead`,{children:(0,j.jsxs)(`tr`,{children:[t.rowHeaders&&(0,j.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,j.jsx)(`th`,{scope:`col`,className:A(`border-b px-3 py-1.5 text-center font-medium`,n&&p2[n]),children:(0,j.jsx)(c2,{text:e,mode:`math`,className:G8})},t)})]})}),(0,j.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,j.jsxs)(`tr`,{className:`border-b last:border-b-0`,children:[a!==void 0&&(0,j.jsx)(`th`,{scope:`row`,className:A(`border-r px-3 py-1.5 text-center font-medium`,r&&p2[r]),children:(0,j.jsx)(c2,{text:a,mode:`math`,className:G8})}),e.map((e,t)=>{let r=i(e=>(e.row===void 0||e.row===n)&&(e.column===void 0||e.column===t));return(0,j.jsx)(`td`,{className:A(`px-3 py-1.5 text-center tabular-nums`,r&&p2[r]),"data-tone":r,"data-testid":`table-cell`,children:(0,j.jsx)(c2,{text:U8(e),mode:`math`,className:G8})},t)})]},n)})})]})}),a&&(0,j.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`table-live`,children:[(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Step `,n.index+1,` of `,n.last+1,`.`,` `]}),(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:r.explanation??``,mode:`math`})}),(0,j.jsxs)(`span`,{className:`sr-only`,"data-testid":`table-description`,children:[r.highlight.map(e=>` ${Qie[e.tone??`active`]}: ${W8(e)}.`),r.changes.map(e=>` Changed ${W8(e)} to ${U8(e.value)}.`)]})]})]}),(0,j.jsx)(v2,{stepper:n,play:!0})]})}function tae({view:e}){let{spec:t}=e,n=h2(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,j.jsxs)(y2,{role:`region`,"aria-labelledby":`${c} ${l}`,tabIndex:0,onKeyDown:n.onKeyDown,children:[(0,j.jsx)(b2,{kind:`Worked steps`,kindId:l,children:(0,j.jsx)(x2,{id:c,text:t.title})}),(0,j.jsxs)(S2,{children:[t.goal&&(0,j.jsx)(`p`,{className:`bg-sunken rounded-lg px-3.5 py-2.5 leading-normal`,children:(0,j.jsxs)(g2,{children:[(0,j.jsx)(`span`,{className:`font-semibold`,children:`Goal: `}),(0,j.jsx)(c2,{text:t.goal,mode:`math`})]})}),(0,j.jsx)(`ol`,{className:`flex flex-col`,children:t.steps.slice(0,r+1).map((e,t)=>(0,j.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,j.jsx)(`span`,{"aria-hidden":`true`,className:A(`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?m2.current:m2.other),"data-testid":`worked-step-number`,children:t+1}),e.label&&(0,j.jsx)(`p`,{className:`text-muted-foreground font-mono text-[0.6875rem] font-medium tracking-[0.06em] uppercase`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:e.label,mode:`math`})})}),(0,j.jsx)(`div`,{className:`font-heading text-[1.0625rem] leading-normal`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:e.statement,mode:`math`})})}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm leading-snug`,children:(0,j.jsx)(g2,{children:(0,j.jsx)(c2,{text:e.justification,mode:`math`})})})]},t))}),(0,j.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,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c2,{text:s.label,mode:`math`}),`.`,` `]}),s&&(0,j.jsx)(c2,{text:s.statement,mode:`math`}),` `,s&&(0,j.jsx)(c2,{text:s.justification,mode:`math`})]})]}),(0,j.jsx)(v2,{stepper:n,children:(0,j.jsx)(M,{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:k2,code_exercise:Z2,code_walkthrough:e4,composition:E4,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 K8({data:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let i=RM.safeParse(e);if(!i.success)return(0,j.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,j.jsx)(o,{view:a,replyInProgress:t,onUpdate:n,onRefresh:r})}function q8(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=RM.safeParse(e.data);n.success&&(t[n.data.id]=n.data)}return t}var J8=e=>e!==void 0&&`latestAttempt`in e&&e.latestAttempt!==void 0;function Y8(e,t){let n={...e};for(let[r,i]of Object.entries(t))(!J8(e[r])||J8(i))&&(n[r]=i);return n}function aae({className:e,...t}){return(0,j.jsx)($o,{"data-slot":`checkbox`,className:A(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-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-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary`,e),...t,children:(0,j.jsx)(ts,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,j.jsx)(Gh,{className:`size-3.5`})})})}function X8({...e}){return(0,j.jsx)(wr,{"data-slot":`collapsible`,...e})}function Z8({...e}){return(0,j.jsx)(Er,{"data-slot":`collapsible-trigger`,...e})}function Q8({...e}){return(0,j.jsx)(Or,{"data-slot":`collapsible-content`,...e})}function oae({className:e,...t}){return(0,j.jsx)(Gd,{"data-slot":`label`,className:A(`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 sae({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,j.jsx)(Om,{"data-slot":`separator`,decorative:n,orientation:t,className:A(`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 cae=se(`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 $8({className:e,orientation:t=`vertical`,...n}){return(0,j.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:A(cae({orientation:t}),e),...n})}function e5({className:e,...t}){return(0,j.jsx)(oae,{"data-slot":`field-label`,className:A(`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 t5({className:e,...t}){return(0,j.jsx)(`p`,{"data-slot":`field-description`,className:A(`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 n5({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,j.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,j.jsx)(`li`,{children:e.message},t))})},[t,n]);return i?(0,j.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:A(`text-sm font-normal text-destructive`,e),...r,children:i}):null}function r5({className:e,type:t,...n}){return(0,j.jsx)(`input`,{type:t,"data-slot":`input`,className:A(`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})}function i5({className:e,...t}){return(0,j.jsx)(sp,{"data-slot":`radio-group`,className:A(`grid gap-3`,e),...t})}function a5({className:e,...t}){return(0,j.jsx)(fp,{"data-slot":`radio-group-item`,className:A(`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,j.jsx)(mp,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,j.jsx)(pg,{className:`absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary`})})})}var o5=`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,s5=`bg-card gap-0`,c5=`border-b px-5 py-4`,l5=`font-heading text-[1.35rem] leading-tight font-medium tracking-[-0.015em]`,u5=`bg-sunken inline-flex max-w-full flex-wrap gap-0.5 self-start rounded-lg border p-0.5`,d5=e=>A(`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`),f5={strength:`Strength`,focus:`Focus area`,practicing:`Practicing`,unsure:`Unsure`,not_started:`Not started`},lae={strength:ag,focus:rg,practicing:lg,unsure:dg,not_started:sg},uae={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`},dae={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 p5({status:e,className:t}){let n=lae[e];return(0,j.jsxs)(_8,{variant:`outline`,className:A(uae[e],t),"data-mastery":e,children:[(0,j.jsx)(n,{"aria-hidden":`true`}),f5[e]]})}var m5=(e,t,n=`${t}s`)=>`${e.toLocaleString(`en`)} ${e===1?t:n}`;function h5(e){let t=e.correct+e.incorrect,n=[];return t>0&&n.push(`${e.correct.toLocaleString(`en`)} of ${m5(t,`answer`)} right`),e.modelJudged>0&&n.push(`${e.modelApproved.toLocaleString(`en`)} of ${m5(e.modelJudged,`code review`)} approved`),e.unsure>0&&n.push(`${e.unsure.toLocaleString(`en`)} not sure`),n.join(` · `)||`Not answered yet`}function g5(e){let{graded:t,modelJudged:n,unsure:r,recent:i,recentDays:a}=e.evidence,o=[m5(t,`graded answer`)];return n>0&&o.push(m5(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 fae={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.`}},_5=8;function v5({record:e,order:t,label:n}){let r=t.map(e=>fae[e]).filter(t=>e[t.key].length>0);return(0,j.jsxs)(`div`,{className:`flex flex-col gap-4`,role:`group`,"aria-label":n,"data-testid":`mastery-groups`,children:[r.map(t=>(0,j.jsx)(pae,{group:t,concepts:e[t.key]},t.key)),e.truncated&&(0,j.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 pae({group:e,concepts:t}){let[n,r]=(0,v.useState)(!1),i=n?t:t.slice(0,_5),a=`mastery-${e.key}`;return(0,j.jsxs)(`section`,{"aria-labelledby":a,className:`flex flex-col gap-1.5`,"data-testid":`mastery-${e.key}`,children:[(0,j.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,j.jsxs)(`h3`,{id:a,className:o5,children:[e.title,` `,(0,j.jsxs)(`span`,{className:`tabular-nums`,children:[`(`,t.length.toLocaleString(`en`),`)`]})]}),(0,j.jsx)(`span`,{className:`text-muted-foreground truncate text-[0.75rem]`,children:e.hint})]}),(0,j.jsx)(`ul`,{className:`flex flex-col`,children:i.map(e=>(0,j.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,j.jsx)(p5,{status:e.status,className:`shrink-0`}),(0,j.jsx)(`span`,{className:`min-w-0 wrap-anywhere`,children:e.concept}),(0,j.jsxs)(`span`,{className:`text-muted-foreground ml-auto text-[0.8125rem]`,children:[e.status===`not_started`&&e.topics?.length?`In ${e.topics.join(`, `)}`:h5(e),e.lastSeen&&(0,j.jsxs)(`span`,{className:`font-mono text-[0.72rem]`,children:[` · `,e.lastSeen]})]})]},e.concept))}),t.length>_5&&(0,j.jsx)(M,{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 y5=e=>e.strengths.length+e.focus.length+e.practicing.length+e.unsure.length+e.notStarted.length>0,b5=1,mae=.9,hae=.8,gae=.17,x5=.1,S5=.999,_ae=.9999,vae=.99,yae=/[\\\/_+.#"@\[\(\{&]/,bae=/[\\\/_+.#"@\[\(\{&]/g,xae=/[\s-]/,C5=/[\s-]/g;function w5(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?b5:vae;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=w5(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=b5:yae.test(e.charAt(l-1))?(d*=hae,p=e.slice(i,l-1).match(bae),p&&i>0&&(d*=S5**+p.length)):xae.test(e.charAt(l-1))?(d*=mae,m=e.slice(i,l-1).match(C5),m&&i>0&&(d*=S5**+m.length)):(d*=gae,i>0&&(d*=S5**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=_ae)),(d<x5&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=w5(e,t,n,r,l+1,a+2,o),f*x5>d&&(d=f*x5)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function T5(e){return e.toLowerCase().replace(C5,` `)}function Sae(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,w5(e,t,T5(e),T5(t),0,0,{})}var E5=`[cmdk-group=""]`,D5=`[cmdk-group-items=""]`,Cae=`[cmdk-group-heading=""]`,O5=`[cmdk-item=""]`,k5=`${O5}:not([aria-disabled="true"])`,A5=`cmdk-item-select`,j5=`data-value`,wae=(e,t,n)=>Sae(e,t,n),M5=v.createContext(void 0),N5=()=>v.useContext(M5),P5=v.createContext(void 0),F5=()=>v.useContext(P5),I5=v.createContext(void 0),L5=v.forwardRef((e,t)=>{let n=V5(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=V5(()=>new Set),i=V5(()=>new Map),a=V5(()=>new Map),o=V5(()=>new Set),s=z5(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,y=gr(),b=gr(),x=gr(),S=v.useRef(null),C=Fae();B5(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),B5(()=>{C(6,te)},[]);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`)ee(),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=ne()?.id,w.emit()}),r||C(5,te),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,()=>{ee(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=ne();C(4,()=>{ee(),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??wae;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;re().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(D5);t?t.appendChild(e.parentElement===t?e:e.closest(`${D5} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${D5} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${E5}[${j5}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=re().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(j5);w.setState(`value`,e||void 0)}function ee(){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 te(){var e;let t=ne();t&&(t.parentElement?.firstChild===t&&((e=t.closest(E5)?.querySelector(Cae))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function ne(){return S.current?.querySelector(`${O5}[aria-selected="true"]`)}function re(){return Array.from(S.current?.querySelectorAll(k5)||[])}function ie(e){let t=re()[e];t&&w.setState(`value`,t.getAttribute(j5))}function ae(e){var t;let n=ne(),r=re(),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(j5))}function oe(e){let t=ne()?.closest(E5),n;for(;t&&!n;)t=e>0?Nae(t,E5):Pae(t,E5),n=t?.querySelector(k5);n?w.setState(`value`,n.getAttribute(j5)):ae(e)}let k=()=>ie(re().length-1),se=e=>{e.preventDefault(),e.metaKey?k():e.altKey?oe(1):ae(1)},ce=e=>{e.preventDefault(),e.metaKey?ie(0):e.altKey?oe(-1):ae(-1)};return v.createElement(un.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&&se(e);break;case`ArrowDown`:se(e);break;case`p`:case`k`:g&&e.ctrlKey&&ce(e);break;case`ArrowUp`:ce(e);break;case`Home`:e.preventDefault(),ie(0);break;case`End`:e.preventDefault(),k();break;case`Enter`:{e.preventDefault();let t=ne();if(t){let e=new Event(A5);t.dispatchEvent(e)}}}}},v.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Lae},c),W5(e,e=>v.createElement(P5.Provider,{value:w},v.createElement(M5.Provider,{value:T},e))))}),Tae=v.forwardRef((e,t)=>{let n=gr(),r=v.useRef(null),i=v.useContext(I5),a=N5(),o=z5(e),s=o.current?.forceMount??i?.forceMount;B5(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=U5(n,r,[e.value,e.children,r],e.keywords),l=F5(),u=H5(e=>e.value&&e.value===c.current),d=H5(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(A5,f),()=>t.removeEventListener(A5,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(un.div,{ref:Bt(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)}),Eae=v.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=gr(),s=v.useRef(null),c=v.useRef(null),l=gr(),u=N5(),d=H5(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));B5(()=>u.group(o),[]),U5(o,s,[e.value,e.heading,c]);let f=v.useMemo(()=>({id:o,forceMount:i}),[i]);return v.createElement(un.div,{ref:Bt(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),W5(e,e=>v.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},v.createElement(I5.Provider,{value:f},e))))}),Dae=v.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=v.useRef(null),a=H5(e=>!e.search);return!n&&!a?null:v.createElement(un.div,{ref:Bt(i,t),...r,"cmdk-separator":``,role:`separator`})}),Oae=v.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=F5(),o=H5(e=>e.search),s=H5(e=>e.selectedItemId),c=N5();return v.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),v.createElement(un.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)}})}),kae=v.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=v.useRef(null),o=v.useRef(null),s=H5(e=>e.selectedItemId),c=N5();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(un.div,{ref:Bt(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},W5(e,e=>v.createElement(`div`,{ref:Bt(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Aae=v.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return v.createElement(eo,{open:n,onOpenChange:r},v.createElement(oo,{container:o},v.createElement(co,{"cmdk-overlay":``,className:i}),v.createElement(po,{"aria-label":e.label,"cmdk-dialog":``,className:a},v.createElement(L5,{ref:t,...s}))))}),jae=v.forwardRef((e,t)=>H5(e=>e.filtered.count===0)?v.createElement(un.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Mae=v.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return v.createElement(un.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},W5(e,e=>v.createElement(`div`,{"aria-hidden":!0},e)))}),R5=Object.assign(L5,{List:kae,Item:Tae,Input:Oae,Group:Eae,Separator:Dae,Dialog:Aae,Empty:jae,Loading:Mae});function Nae(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Pae(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function z5(e){let t=v.useRef(e);return B5(()=>{t.current=e}),t}var B5=typeof window>`u`?v.useEffect:v.useLayoutEffect;function V5(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function H5(e){let t=F5(),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function U5(e,t,n,r=[]){let i=v.useRef(),a=N5();return B5(()=>{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(j5,s),i.current=s}),i}var Fae=()=>{let[e,t]=v.useState(),n=V5(()=>new Map);return B5(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Iae(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function W5({asChild:e,children:t},n){return e&&v.isValidElement(t)?v.cloneElement(Iae(t),{ref:t.ref},n(t.props.children)):n(t)}var Lae={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function G5({...e}){return(0,j.jsx)(eo,{"data-slot":`dialog`,...e})}function Rae({...e}){return(0,j.jsx)(oo,{"data-slot":`dialog-portal`,...e})}function zae({className:e,...t}){return(0,j.jsx)(co,{"data-slot":`dialog-overlay`,className:A(`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 K5({className:e,children:t,showCloseButton:n=!0,...r}){return(0,j.jsxs)(Rae,{"data-slot":`dialog-portal`,children:[(0,j.jsx)(zae,{}),(0,j.jsxs)(po,{"data-slot":`dialog-content`,className:A(`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,j.jsxs)(bo,{"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,j.jsx)(yv,{}),(0,j.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function q5({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`dialog-header`,className:A(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function J5({className:e,showCloseButton:t=!1,children:n,...r}){return(0,j.jsxs)(`div`,{"data-slot":`dialog-footer`,className:A(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,j.jsx)(bo,{asChild:!0,children:(0,j.jsx)(M,{variant:`outline`,children:`Close`})})]})}function Y5({className:e,...t}){return(0,j.jsx)(_o,{"data-slot":`dialog-title`,className:A(`text-lg leading-none font-semibold`,e),...t})}function X5({className:e,...t}){return(0,j.jsx)(vo,{"data-slot":`dialog-description`,className:A(`text-sm text-muted-foreground`,e),...t})}function Z5({className:e,...t}){return(0,j.jsx)(R5,{"data-slot":`command`,className:A(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t})}function Q5({className:e,...t}){return(0,j.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,j.jsx)(G_,{className:`size-4 shrink-0 opacity-50`}),(0,j.jsx)(R5.Input,{"data-slot":`command-input`,className:A(`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 $5({className:e,...t}){return(0,j.jsx)(R5.List,{"data-slot":`command-list`,className:A(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function e7({...e}){return(0,j.jsx)(R5.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function Bae({className:e,...t}){return(0,j.jsx)(R5.Group,{"data-slot":`command-group`,className:A(`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 t7({className:e,...t}){return(0,j.jsx)(R5.Item,{"data-slot":`command-item`,className:A(`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})}function n7({...e}){return(0,j.jsx)(Md,{"data-slot":`dropdown-menu`,...e})}function r7({...e}){return(0,j.jsx)(Pd,{"data-slot":`dropdown-menu-trigger`,...e})}function i7({className:e,sideOffset:t=4,...n}){return(0,j.jsx)(Fd,{children:(0,j.jsx)(Ld,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:A(`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 a7({className:e,inset:t,variant:n=`default`,...r}){return(0,j.jsx)(zd,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:A(`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 o7({...e}){return(0,j.jsx)(Bd,{"data-slot":`dropdown-menu-radio-group`,...e})}function s7({className:e,children:t,...n}){return(0,j.jsxs)(Vd,{"data-slot":`dropdown-menu-radio-item`,className:A(`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,j.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,j.jsx)(Hd,{children:(0,j.jsx)(pg,{className:`size-2 fill-current`})})}),t]})}function Vae({className:e,inset:t,...n}){return(0,j.jsx)(Rd,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:A(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function Hae({className:e,...t}){return(0,j.jsx)(Ud,{"data-slot":`dropdown-menu-separator`,className:A(`-mx-1 my-1 h-px bg-border`,e),...t})}function c7({className:e}){return(0,j.jsx)(`svg`,{viewBox:`0 0 21 21`,fill:`none`,"aria-hidden":`true`,focusable:`false`,className:A(`size-[21px] shrink-0`,e),children:(0,j.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 Uae({busy:e,className:t,...n}){return(0,j.jsxs)(`button`,{type:`button`,"aria-busy":e||void 0,className:A(`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,j.jsx)(c7,{}),e?`Opening ChatGPT…`:`Continue with ChatGPT`]})}function l7({className:e,primary:t=!1}){return(0,j.jsx)(M,{asChild:!0,size:t?`sm`:`xs`,variant:t?`default`:`link`,className:A(!t&&`h-auto p-0`,e),children:(0,j.jsxs)(`a`,{href:zM,target:`_blank`,rel:`noreferrer`,"aria-label":`Manage ChatGPT usage (opens in a new tab)`,children:[`Manage usage `,(0,j.jsx)(Lg,{"aria-hidden":!0})]})})}function Wae(){return(0,j.jsxs)(`span`,{className:`text-muted-foreground inline-flex items-center gap-1.5 text-xs`,"aria-live":`polite`,children:[(0,j.jsx)(c7,{className:`size-4`}),`Using ChatGPT plan`,(0,j.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,j.jsx)(l7,{})]})}function Gae(){return(0,j.jsxs)(`div`,{role:`alert`,className:`flex flex-col gap-1 rounded-lg border p-3 text-sm`,children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground inline-flex items-center gap-1.5 text-xs font-medium`,children:[(0,j.jsx)(c7,{className:`size-4`}),` ChatGPT`]}),(0,j.jsx)(`p`,{className:`font-semibold`,children:`Usage limit reached`}),(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Review your plan or this app's limit in ChatGPT settings.`}),(0,j.jsx)(l7,{primary:!0,className:`mt-1 self-start`})]})}function Kae(){let[e,t]=(0,v.useState)(!1),n=(0,v.useCallback)(()=>{_P().then(e=>{e.ok&&e.value.chatgpt?.welcome&&t(!0)})},[]);(0,v.useEffect)(()=>(n(),window.addEventListener(hP,n),()=>window.removeEventListener(hP,n)),[n]);let r=()=>{t(!1),wP()};return(0,j.jsx)(G5,{open:e,onOpenChange:e=>!e&&r(),children:(0,j.jsxs)(K5,{className:`sm:max-w-sm`,children:[(0,j.jsxs)(q5,{className:`items-center text-center sm:text-center`,children:[(0,j.jsx)(c7,{className:`text-foreground mb-2 size-[72px]`}),(0,j.jsx)(Y5,{children:`You're using your ChatGPT plan`}),(0,j.jsx)(X5,{children:`Eligible usage in this app uses your ChatGPT plan. Manage usage in your ChatGPT settings.`})]}),(0,j.jsx)(J5,{className:`sm:justify-center`,children:(0,j.jsx)(M,{onClick:r,children:`Got it`})})]})})}var u7=50,d7={none:`None`,minimal:`Minimal`,low:`Low`,medium:`Medium`,high:`High`,xhigh:`Extra high`,max:`Max`},qae=`custom:`,f7=e=>e.startsWith(qae)&&e.indexOf(`/`)>7?e.slice(0,e.indexOf(`/`)):void 0,p7=e=>f7(e)?e.slice(e.indexOf(`/`)+1):e.slice(e.indexOf(`:`)+1);function Jae(e,t=[]){if(f7(e))return p7(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 m7={openrouter:`OpenRouter`,anthropic:`Anthropic`,openai:`OpenAI`,chatgpt:`ChatGPT`};function h7(e,t=[]){let n=f7(e);if(n)return t.find(e=>e.id===n)?.name??`Removed provider`;let r=e.slice(0,Math.max(0,e.indexOf(`:`)));return m7[r]??r}function g7(e,t=[],n=[]){let r=Jae(e,t);return f7(e)?`${r} (${h7(e,n)})`:e.startsWith(`openrouter:`)||!(e.split(`:`)[0]in m7)?r:`${r} (${h7(e)})`}var Yae={unverified:`not tested`,verified:`tested`,failed:`test failed`};function Xae(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 Zae(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 _7(){let[e,t]=(0,v.useState)(),[n,r]=(0,v.useState)(),i=(0,v.useCallback)(async()=>{let e=await iP();e.ok?t(e.value):r(e.error)},[]);return(0,v.useEffect)(()=>{i();let e=()=>void i();return window.addEventListener(hP,e),()=>window.removeEventListener(hP,e)},[i]),{view:e,error:n,refresh:i,choose:(0,v.useCallback)(async e=>{r(void 0);let n=await aP(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 oP(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 Qae({model:e,selected:t,names:n}){let r=e.id.startsWith(`chatgpt:`)?`your ChatGPT plan`:e.verification?Yae[e.verification]:Xae(e.price);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Gh,{className:A(`mt-0.5 self-start`,t?`opacity-100`:`opacity-0`),"aria-hidden":!0}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:e.name}),(0,j.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[h7(e.id,n),` · `,p7(e.id),r&&` · ${r}`]})]})]})}function v7({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)(``),_=(0,v.useMemo)(()=>new Map(f?.models.map(e=>[e.id,e])),[f]),y=(0,v.useMemo)(()=>{if(!f)return[];let e=e=>e.flatMap(e=>_.get(e)??[]);if(h.trim()){let e=Zae(f.models,h),t=e.slice(0,u7),n=e.length>u7?`First ${u7} of ${e.length} matches`:void 0,r=[...new Set(t.map(e=>h7(e.id,f.providers)))];return r.length<2?[{heading:n,models:t}]:r.map((e,r)=>({heading:r===0&&n?`${n} · ${e}`:e,models:t.filter(t=>h7(t.id,f.providers)===e)}))}let t=new Set(f.pinned),n=new Set([...f.pinned,...f.recent]),r=f.models.filter(e=>e.id.startsWith(`chatgpt:`)),i=f.providers.filter(e=>!e.removed).map(e=>({heading:e.name,models:f.models.filter(t=>t.id.startsWith(`${e.id}/`)&&!n.has(t.id))})),a=[{heading:`Pinned`,models:e(f.pinned)},{heading:`Recent`,models:e(f.recent.filter(e=>!t.has(e)))},{heading:`ChatGPT plan`,models:r.filter(e=>!n.has(e.id))},...i,{heading:`Suggested`,models:e(f.suggested.filter(e=>!e.startsWith(`chatgpt:`)))}],o=new Set(a.flatMap(e=>e.models.map(e=>e.id))),s=_.get(f.current.model);return[...s&&!o.has(s.id)?[{heading:`Current`,models:[s]}]:[],...a].filter(e=>e.models.length>0)},[f,h,_]);if(!f)return s?(0,j.jsx)(`span`,{className:`text-destructive text-xs`,children:s}):null;let b=_.get(f.current.model),x=g7(f.current.model,f.models,f.providers),S=b?.reasoning?.efforts??[],C=b?.reasoning?.defaultEffort,w=f.pinned.includes(f.current.model),T=e=>{m(!1),g(``);let t=f.current.effort&&e.reasoning?.efforts.includes(f.current.effort)?f.current.effort:null;(e.id!==f.current.model||t!==f.current.effort)&&u({model:e.id,effort:t})};return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1`,children:[(0,j.jsxs)(gI,{open:p,onOpenChange:e=>{m(e),e?c():g(``)},children:[(0,j.jsx)(_I,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-w-64 min-w-0`,"aria-label":`${a}: ${x}. Change model`,disabled:t,children:[(0,j.jsx)(`span`,{className:`truncate`,children:x}),(0,j.jsx)(tg,{"aria-hidden":!0})]})}),(0,j.jsx)(vI,{className:`w-[min(28rem,calc(100vw-2rem))] p-0`,align:`start`,children:(0,j.jsxs)(Z5,{shouldFilter:!1,label:`Choose a model`,children:[(0,j.jsx)(Q5,{placeholder:`Search models…`,value:h,onValueChange:g}),(0,j.jsxs)($5,{className:`max-h-80`,label:`Models`,children:[(0,j.jsx)(e7,{children:f.catalog===`unavailable`?`The model list couldn't be loaded.`:`No models match.`}),y.map((e,t)=>(0,j.jsx)(Bae,{heading:e.heading,children:e.models.map(e=>(0,j.jsx)(t7,{value:e.id,onSelect:()=>T(e),className:`items-start`,children:(0,j.jsx)(Qae,{model:e,selected:e.id===f.current.model,names:f.providers})},e.id))},e.heading??t))]}),f.catalog!==`fresh`&&(0,j.jsx)(`p`,{className:`text-muted-foreground border-t px-3 py-2 text-xs`,children:f.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.`})]})})]}),d&&(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,"aria-label":w?`Unpin ${x}`:`Pin ${x}`,"aria-pressed":w,title:w?`Unpin this model`:`Pin this model to the top of the list`,disabled:t,onClick:()=>void l(f.current.model),children:(0,j.jsx)(tv,{className:A(w&&`fill-current`),"aria-hidden":!0})}),S.length>0&&(0,j.jsxs)(n7,{children:[(0,j.jsx)(r7,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground`,disabled:t,"aria-label":`${d?`Reasoning effort`:`${a} reasoning effort`}: ${f.current.effort?d7[f.current.effort]:`the model's default`}. Change effort`,children:[f.current.effort?d7[f.current.effort]:`Default effort`,(0,j.jsx)(tg,{"aria-hidden":!0})]})}),(0,j.jsxs)(i7,{align:`start`,children:[(0,j.jsx)(Vae,{children:`Reasoning effort`}),(0,j.jsx)(Hae,{}),(0,j.jsxs)(o7,{value:f.current.effort??`default`,onValueChange:e=>void u({model:f.current.model,effort:e==="default"?null:e}),children:[(0,j.jsxs)(s7,{value:`default`,children:[`Default`,C?` (${d7[C]})`:``]}),S.map(e=>(0,j.jsx)(s7,{value:e,children:d7[e]},e))]})]})]}),d&&f.current.model.startsWith(`chatgpt:`)&&(0,j.jsx)(Wae,{}),f.unavailable&&!s&&(0,j.jsx)(`span`,{role:`alert`,className:`text-destructive text-xs`,children:f.unavailable}),s&&(0,j.jsx)(`span`,{role:`alert`,className:`text-destructive text-xs`,children:s})]})}function y7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty`,className:A(`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 b7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty-header`,className:A(`flex max-w-sm flex-col items-center gap-2 text-center`,e),...t})}var $ae=se(`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 x7({className:e,variant:t=`default`,...n}){return(0,j.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:A($ae({variant:t,className:e})),...n})}function S7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty-title`,className:A(`text-lg font-medium tracking-tight`,e),...t})}function C7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty-description`,className:A(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function w7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty-content`,className:A(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...t})}function T7({...e}){return(0,j.jsx)(eo,{"data-slot":`sheet`,...e})}function eoe({...e}){return(0,j.jsx)(oo,{"data-slot":`sheet-portal`,...e})}function toe({className:e,...t}){return(0,j.jsx)(co,{"data-slot":`sheet-overlay`,className:A(`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 E7({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,j.jsxs)(eoe,{children:[(0,j.jsx)(toe,{}),(0,j.jsxs)(po,{"data-slot":`sheet-content`,className:A(`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,j.jsxs)(bo,{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,j.jsx)(yv,{className:`size-4`}),(0,j.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function D7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sheet-header`,className:A(`flex flex-col gap-1.5 p-4`,e),...t})}function O7({className:e,...t}){return(0,j.jsx)(_o,{"data-slot":`sheet-title`,className:A(`font-semibold text-foreground`,e),...t})}function k7({className:e,...t}){return(0,j.jsx)(vo,{"data-slot":`sheet-description`,className:A(`text-sm text-muted-foreground`,e),...t})}var A7={pdf:`PDF`,pptx:`Slides`,markdown:`Markdown`,text:`Text`};function j7(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 noe(e){return e===0?`Not attached`:e===1?`Used in 1 session`:`Used in ${e} sessions`}function M7({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,j.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 ${oM.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,j.jsxs)($8,{children:[(0,j.jsx)(e5,{htmlFor:`${r}-title`,children:`Title (optional)`}),(0,j.jsx)(r5,{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,j.jsxs)($8,{children:[(0,j.jsx)(e5,{children:`Format`}),(0,j.jsxs)(i5,{value:o,onValueChange:e=>s(e),className:`flex gap-4`,disabled:u,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(a5,{value:`markdown`,id:`${r}-kind-md`}),(0,j.jsx)(e5,{htmlFor:`${r}-kind-md`,className:`font-normal`,children:`Markdown`})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(a5,{value:`text`,id:`${r}-kind-text`}),(0,j.jsx)(e5,{htmlFor:`${r}-kind-text`,className:`font-normal`,children:`Plain text`})]})]})]}),(0,j.jsxs)($8,{"data-invalid":!!f,children:[(0,j.jsx)(e5,{htmlFor:`${r}-content`,children:`Content`}),(0,j.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,j.jsx)(t5,{children:`Stored locally in your Source Library and indexed for search. Treated as untrusted reference text.`}),f&&(0,j.jsx)(n5,{role:`alert`,children:f})]}),(0,j.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[n&&(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:n,disabled:u,children:`Cancel`}),(0,j.jsxs)(M,{type:`submit`,size:`sm`,disabled:u||!c.trim(),children:[u&&(0,j.jsx)(yI,{"aria-hidden":`true`}),e]})]})]})}function roe({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),ON().then(e=>{t||(e.ok?a(e.value):s(e.error))}),()=>{t=!0}},[e]);let g=async e=>{let t=await kN(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 MN(n,e.id);if(d(void 0),!t.ok)return s(t.error);let i=await ON();i.ok&&a(i.value),r?.()},y=async e=>{s(void 0),p(e);let t=await AN(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,j.jsx)(T7,{open:e,onOpenChange:t,children:(0,j.jsxs)(E7,{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,j.jsxs)(D7,{children:[(0,j.jsx)(O7,{className:`font-heading`,children:`Source library`}),(0,j.jsx)(k7,{children:`Textbooks, slides and pasted notes kept across your courses and chats. Deleting a chat keeps its sources here.`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-4`,"aria-live":`polite`,children:[!c&&(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,onClick:()=>l(!0),children:[(0,j.jsx)(hg,{"aria-hidden":`true`}),`Paste text or Markdown`]}),c&&(0,j.jsx)(`div`,{className:`bg-muted/40 rounded-lg border p-3`,children:(0,j.jsx)(M7,{submitLabel:`Save to library`,onSubmit:g,onCancel:()=>l(!1)})}),o&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:o}),!i&&!o&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Loading sources…`]}),i?.length===0&&!c&&(0,j.jsxs)(y7,{className:`border p-6 md:p-6`,children:[(0,j.jsxs)(b7,{children:[(0,j.jsx)(x7,{variant:`icon`,children:(0,j.jsx)(jh,{"aria-hidden":`true`})}),(0,j.jsx)(S7,{children:`No sources yet`}),(0,j.jsx)(C7,{children:`Upload a PDF or slide deck in any chat or course, or paste text and Markdown here to reuse across sessions.`})]}),(0,j.jsx)(w7,{children:(0,j.jsxs)(M,{type:`button`,onClick:()=>l(!0),children:[(0,j.jsx)(hg,{"aria-hidden":`true`}),`Paste text or Markdown`]})})]}),i&&i.length>0&&(0,j.jsx)(`ul`,{"aria-label":`Source library`,className:`flex flex-col gap-2`,children:i.map(e=>(0,j.jsxs)(`li`,{className:`bg-card flex flex-col gap-2 rounded-lg border p-3 text-sm`,children:[(0,j.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(Hg,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),(0,j.jsx)(`span`,{className:`truncate font-medium`,title:e.filename,children:e.filename})]}),(0,j.jsx)(_8,{variant:`secondary`,className:`shrink-0`,children:A7[e.kind]})]}),(0,j.jsxs)(`div`,{className:`text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1 text-xs`,children:[(0,j.jsx)(`span`,{children:j7(e)}),(0,j.jsx)(`span`,{children:noe(e.attachmentCount)})]}),m===e.id?(0,j.jsxs)(`div`,{className:`bg-destructive-surface text-destructive flex flex-col gap-2 rounded-md border p-2 text-xs`,children:[(0,j.jsxs)(`p`,{children:[`Permanently delete “`,e.filename,`” from the library?`,e.attachmentCount>0?` It will be detached from every session using it.`:``]}),(0,j.jsxs)(`div`,{className:`flex gap-2`,children:[(0,j.jsxs)(M,{type:`button`,variant:`destructive`,size:`sm`,disabled:f===e.id,onClick:()=>void y(e.id),children:[f===e.id&&(0,j.jsx)(yI,{"aria-hidden":`true`}),`Delete permanently`]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:f===e.id,onClick:()=>h(void 0),children:`Cancel`})]})]}):(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-0.5`,children:[n&&(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:u!==void 0,onClick:()=>void _(e),children:[u===e.id?(0,j.jsx)(yI,{"aria-hidden":`true`}):(0,j.jsx)(z_,{"aria-hidden":`true`}),`Attach to chat`]}),(0,j.jsxs)(M,{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,j.jsx)(dv,{"aria-hidden":`true`}),`Delete`]})]})]},e.id))})]})]})})}function N7({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),ON().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,j.jsx)(G5,{open:e,onOpenChange:t,children:(0,j.jsxs)(K5,{className:`sm:max-w-lg`,children:[(0,j.jsxs)(q5,{children:[(0,j.jsx)(Y5,{className:`font-heading`,children:`Add a source`}),(0,j.jsx)(X5,{children:`Attach an existing document from your Source Library or paste text and Markdown.`})]}),(0,j.jsxs)(`div`,{className:`flex gap-2 border-b pb-3`,role:`tablist`,"aria-label":`Source method`,children:[(0,j.jsxs)(M,{type:`button`,role:`tab`,"aria-selected":o===`library`,variant:o===`library`?`secondary`:`ghost`,size:`sm`,onClick:()=>s(`library`),children:[(0,j.jsx)(o_,{"aria-hidden":`true`}),`From library`]}),(0,j.jsxs)(M,{type:`button`,role:`tab`,"aria-selected":o===`paste`,variant:o===`paste`?`secondary`:`ghost`,size:`sm`,onClick:()=>s(`paste`),children:[(0,j.jsx)(hg,{"aria-hidden":`true`}),`Paste text`]})]}),o===`library`?(0,j.jsxs)(`div`,{className:`flex max-h-80 flex-col gap-2 overflow-y-auto`,"aria-live":`polite`,children:[u&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:u}),!m&&!u&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 py-4 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Loading library…`]}),m&&m.length===0&&(0,j.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,j.jsx)(`ul`,{"aria-label":`Library sources`,className:`flex flex-col gap-1.5`,children:m.map(e=>(0,j.jsxs)(`li`,{className:`bg-muted/40 flex items-center justify-between gap-2 rounded-md border px-3 py-2 text-sm`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,j.jsx)(`span`,{className:`truncate font-medium`,title:e.filename,children:e.filename}),(0,j.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[A7[e.kind],` · `,j7(e)]})]}),(0,j.jsxs)(M,{type:`button`,size:`sm`,variant:`outline`,disabled:f!==void 0,onClick:()=>void h(e),children:[f===e.id?(0,j.jsx)(yI,{"aria-hidden":`true`}):(0,j.jsx)(z_,{"aria-hidden":`true`}),`Attach`]})]},e.id))})]}):(0,j.jsx)(M7,{submitLabel:`Attach text`,onSubmit:async e=>{let n=await a(e);return n||t(!1),n}}),o===`library`&&(0,j.jsx)(J5,{children:(0,j.jsx)(M,{type:`button`,variant:`outline`,onClick:()=>t(!1),children:`Close`})})]})})}var ioe=[{value:`quick`,label:`Quick check`,description:`About 3 questions.`},{value:`thorough`,label:`Thorough`,description:`Up to 8 questions, for a closer fit.`},{value:`skip`,label:`I'm new, skip placement`,description:`No questions: start from the basics.`}],aoe=e=>/\.(pdf|pptx)$/i.test(e.name);function ooe({onStarted:e,onFreeChat:t}){let n=(0,v.useId)(),r=(0,v.useRef)(null),i=(0,v.useRef)(0),a=(0,v.useRef)(!0);(0,v.useEffect)(()=>(a.current=!0,()=>{a.current=!1}),[]);let[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(`lessons`),[u,d]=(0,v.useState)(`quick`),[f,p]=(0,v.useState)([]),[m,h]=(0,v.useState)(),[g,_]=(0,v.useState)({open:!1,mode:`library`}),[y,b]=(0,v.useState)(),[x,S]=(0,v.useState)(!1),[C,w]=(0,v.useState)(),T=_7(),E=f.filter(e=>e.status===`failed`),D=x||y!==void 0,O=(e,t)=>p(n=>n.map(n=>n.key===e?{...n,...t}:n)),ee=e=>{h(void 0);let t=[];for(let n of e)aoe(n)?n.size>26214400?h(`${n.name} is over the ${aM/1048576} MB limit.`):t.push({kind:`file`,key:i.current++,name:n.name,file:n,status:`waiting`}):h(`${n.name} isn't a PDF or PowerPoint (.pptx) file.`);p(e=>[...e,...t])},te=async e=>{h(void 0),p(t=>t.some(t=>t.kind===`library`&&t.sourceId===e.id)?t:[...t,{kind:`library`,key:i.current++,name:e.filename,sourceId:e.id,status:`waiting`}])},ne=async e=>{h(void 0);let t=e.title?.trim()||(e.kind===`markdown`?`Pasted note.md`:`Pasted text.txt`);p(n=>[...n,{kind:`text`,key:i.current++,name:t,title:e.title,content:e.content,textKind:e.kind,status:`waiting`}])},re=(t,n)=>a.current&&e({...t,documentIds:n.flatMap(e=>e.status===`ready`&&e.documentId?[e.documentId]:[])}),ie=async(e,t)=>{let n=[];for(let r of t){if(r.status===`ready`){n.push(r);continue}O(r.key,{status:`reading`,error:void 0});let t=r.kind===`file`?await EN(e,r.file):r.kind===`library`?await MN(e,r.sourceId):await jN(e,{title:r.title,content:r.content,kind:r.textKind});if(!a.current)return n;let i=t.ok?{...r,status:`ready`,documentId:t.value.id,error:void 0}:{...r,status:`failed`,error:t.error};O(r.key,i),n.push(i)}return n},ae=async e=>{e.preventDefault();let t=o.trim();if(!t||x)return;S(!0),w(void 0);let n=y;if(!n){let e=await JN(t,c,u);if(!a.current)return;if(!e.ok)return S(!1),w(e.error);n={session:e.value.session,goal:t},b(n)}let r=await ie(n.session.id,f);a.current&&(S(!1),r.every(e=>e.status===`ready`)&&re(n,r))},oe=()=>{y&&re(y,f)},k=e=>p(t=>t.filter(t=>t.key!==e));return(0,j.jsxs)(`form`,{onSubmit:ae,className:`m-auto flex w-full max-w-xl flex-col gap-5 p-4 sm:p-6`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-2 text-center`,children:[(0,j.jsx)(`h2`,{className:`font-heading text-[2rem] leading-[1.08] font-normal tracking-[-0.024em] text-balance`,children:`What do you want to learn?`}),(0,j.jsx)(t5,{id:`${n}-description`,className:`text-center text-[0.95rem]`,children:`Mivra asks a few quick questions to see what you already know, then plans a course of short lessons.`})]}),(0,j.jsxs)($8,{"data-invalid":!!C,className:`bg-card border-border-strong shadow-paper rounded-xl border p-4 sm:p-5`,children:[(0,j.jsx)(e5,{htmlFor:n,className:o5,children:`Learning goal`}),(0,j.jsxs)(`div`,{className:`flex gap-2 max-[480px]:flex-col`,children:[(0,j.jsx)(r5,{id:n,"aria-describedby":`${n}-description${C?` ${n}-error`:``}`,"aria-invalid":!!C,value:o,onChange:e=>s(e.target.value),maxLength:300,placeholder:`e.g. Calculus for machine learning`,className:`bg-card dark:bg-card h-10 text-base md:text-base`,disabled:y!==void 0,autoFocus:!0}),(0,j.jsxs)(M,{type:`submit`,className:`h-10 px-5`,disabled:!o.trim()||x||E.length>0,children:[x&&(0,j.jsx)(yI,{"aria-hidden":`true`}),x?y?`Reading files…`:`Starting…`:`Start`]})]}),C&&(0,j.jsx)(n5,{id:`${n}-error`,role:`alert`,children:C}),(0,j.jsxs)(`div`,{className:`flex items-start gap-2.5 pt-1`,children:[(0,j.jsx)(aae,{id:`${n}-project`,"aria-describedby":`${n}-project-description`,checked:c===`project`,onCheckedChange:e=>l(e===!0?`project`:`lessons`),disabled:D,className:`mt-0.5`}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,j.jsx)(e5,{htmlFor:`${n}-project`,className:`font-normal`,children:`Build it as a project in my own repository`}),(0,j.jsxs)(t5,{id:`${n}-project-description`,className:`text-[0.8125rem]`,children:[`Milestones instead of lessons, in any language you have installed, each checked with `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check`}),`.`]})]})]}),(0,j.jsxs)(`fieldset`,{className:`flex flex-col gap-2 pt-2`,disabled:D,children:[(0,j.jsx)(`legend`,{className:A(o5,`mb-2`),children:`Placement`}),(0,j.jsx)(i5,{value:u,onValueChange:e=>d(e),disabled:D,"aria-label":`Placement`,className:`gap-2`,children:ioe.map(e=>(0,j.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,j.jsx)(a5,{value:e.value,id:`${n}-depth-${e.value}`,"aria-describedby":`${n}-depth-${e.value}-description`,className:`mt-0.5`}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,j.jsx)(e5,{htmlFor:`${n}-depth-${e.value}`,className:`font-normal`,children:e.label}),(0,j.jsx)(t5,{id:`${n}-depth-${e.value}-description`,className:`text-[0.8125rem]`,children:e.value===`skip`&&c===`project`?`No quiz: Mivra only asks which language you'll use.`:e.description})]})]},e.value))})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-2 pt-2`,children:[(0,j.jsx)(`span`,{className:o5,children:`Sources`}),(0,j.jsx)(t5,{className:`text-[0.8125rem]`,children:`Optional: a textbook or slides to build the course around. Read before the first question.`}),(0,j.jsx)(`input`,{ref:r,type:`file`,accept:`.pdf,.pptx`,multiple:!0,className:`hidden`,"data-testid":`course-document-input`,onChange:e=>{let t=[...e.target.files??[]];e.target.value=``,ee(t)}}),f.length>0&&(0,j.jsx)(`ul`,{"aria-label":`Course sources`,"aria-live":`polite`,className:`flex flex-col gap-1.5 text-sm`,children:f.map(e=>(0,j.jsxs)(`li`,{className:`bg-muted flex min-w-0 flex-col gap-0.5 rounded-md border py-1 pr-1 pl-2`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[e.status===`reading`?(0,j.jsx)(yI,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}):e.status===`ready`?(0,j.jsx)(Gh,{className:`text-success size-3.5 shrink-0`,"aria-hidden":!0}):e.status===`failed`?(0,j.jsx)(rg,{className:`text-destructive size-3.5 shrink-0`,"aria-hidden":!0}):(0,j.jsx)(Hg,{className:`text-muted-foreground size-3.5 shrink-0`,"aria-hidden":!0}),(0,j.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.name,children:e.name}),(0,j.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:e.status===`reading`?`Reading…`:e.status===`ready`?`Ready`:e.status===`failed`?`Couldn't read`:``}),e.status!==`ready`&&e.status!==`reading`&&!x&&(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6`,"aria-label":`Remove ${e.name}`,onClick:()=>k(e.key),children:(0,j.jsx)(yv,{"aria-hidden":`true`})})]}),e.error&&(0,j.jsx)(`span`,{className:`text-destructive text-xs`,children:e.error})]},e.key))}),m&&(0,j.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:m}),y&&E.length>0&&!x?(0,j.jsxs)(`div`,{role:`alert`,className:`flex flex-col gap-2`,children:[(0,j.jsxs)(`p`,{className:`text-sm`,children:[E.length===1?`A file couldn't be read.`:`${E.length} files couldn't be read.`,` Try again, remove it, or start without it.`]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(M,{type:`submit`,size:`sm`,children:`Try again`}),(0,j.jsxs)(M,{type:`button`,size:`sm`,variant:`outline`,onClick:oe,children:[`Start without `,E.length===1?`it`:`them`]})]})]}):(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:x,onClick:()=>r.current?.click(),children:[(0,j.jsx)(A_,{"aria-hidden":`true`}),`Attach PDF or PowerPoint`]}),(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:x,onClick:()=>_({open:!0,mode:`library`}),children:[(0,j.jsx)(o_,{"aria-hidden":`true`}),`From library`]}),(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:x,onClick:()=>_({open:!0,mode:`paste`}),children:[(0,j.jsx)(hg,{"aria-hidden":`true`}),`Paste text`]})]}),(0,j.jsx)(N7,{open:g.open,onOpenChange:e=>_(t=>({...t,open:e})),initialMode:g.mode,excludeIds:f.flatMap(e=>e.kind===`library`?[e.sourceId]:[]),onPickLibrary:te,onPasteText:ne})]})]}),(0,j.jsx)(`div`,{className:`flex justify-center`,children:(0,j.jsx)(v7,{state:T,disabled:x})}),(0,j.jsx)(M,{type:`button`,variant:`link`,className:`text-muted-foreground self-center`,onClick:t,children:`Or just chat`})]})}var soe={memory:`From memory`,test:`From the test`,guess:`Guessed`};function P7({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,j.jsxs)(X8,{open:r,onOpenChange:i,className:`bg-sunken/60 shrink-0 border-b`,"aria-label":`Course`,role:`region`,children:[(0,j.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,j.jsx)(Yg,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":!0}),(0,j.jsx)(_8,{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,j.jsx)(_8,{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,j.jsx)(Z8,{asChild:!0,children:(0,j.jsxs)(M,{variant:`ghost`,size:`sm`,className:`ml-auto shrink-0`,children:[`Syllabus · `,l.topics.length,` `,e.kind===`project`?`milestones`:`topics`,(0,j.jsx)(qh,{className:A(`transition-transform`,r&&`rotate-180`),"aria-hidden":!0})]})}),t&&(0,j.jsx)(`div`,{className:A(`flex shrink-0 gap-2`,!l&&`ml-auto`),children:t})]}),l?.canUndo&&(0,j.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,j.jsxs)(`span`,{children:[`Mivra changed the plan: `,l.reason]}),n&&(0,j.jsx)(M,{variant:`outline`,size:`xs`,disabled:a,onClick:async()=>{o(!0),c(await n()),o(!1)},children:`Undo`}),s&&(0,j.jsx)(`span`,{className:`text-destructive`,children:s})]}),l&&(0,j.jsx)(Q8,{children:(0,j.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 pt-1 pb-4`,children:(0,j.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,j.jsxs)(`p`,{className:`text-muted-foreground wrap-anywhere`,children:[(0,j.jsx)(`span`,{className:`text-foreground font-medium`,children:`Your goal:`}),` `,e.goal]}),l.reason&&l.version>1&&(0,j.jsxs)(`p`,{className:`text-muted-foreground`,role:`status`,children:[`Version `,l.version,l.source===`adaptive`?` (changed by Mivra)`:``,`: `,l.reason]}),(0,j.jsx)(`ol`,{className:`flex flex-col`,"aria-label":`Syllabus topics`,children:l.topics.map((e,t)=>(0,j.jsxs)(`li`,{className:A(`flex gap-3 border-t py-3 first:border-t-0`,l.changedTopicIds.includes(e.id)&&`bg-sunken -mx-4 px-4`),children:[(0,j.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,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5 wrap-anywhere`,children:[(0,j.jsxs)(`p`,{className:`font-heading text-[1.0625rem] leading-snug font-medium`,children:[e.title,l.changedTopicIds.includes(e.id)&&(0,j.jsxs)(_8,{variant:`secondary`,className:`ml-2 align-middle`,children:[`Changed in v`,l.version]}),e.requestedByLearner&&(0,j.jsx)(_8,{variant:`secondary`,className:`ml-2 align-middle`,children:`You asked for this`})]}),(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:e.summary}),(0,j.jsxs)(`p`,{className:`text-muted-foreground text-[0.8125rem] italic`,children:[`Why: `,e.reason]})]})]},e.id))}),r&&(0,j.jsx)(coe,{courseId:e.id}),l.known.length>0&&(0,j.jsxs)(`div`,{className:`border-t pt-3`,children:[(0,j.jsx)(`p`,{className:A(`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,j.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`What Mivra thinks you know`,children:l.known.map((e,t)=>(0,j.jsxs)(`li`,{className:`flex flex-wrap items-baseline gap-x-2 border-t py-1.5 first:border-t-0 wrap-anywhere`,children:[(0,j.jsx)(`span`,{children:e.concept}),(0,j.jsx)(_8,{variant:`outline`,className:`text-xs`,children:soe[e.source]}),(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:e.note})]},t))})]})]})})})]})}function coe({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),bN(e).then(e=>{t||(e.ok?n(e.value):i(e.error))}),()=>{t=!0}},[e]),r?(0,j.jsxs)(`p`,{className:`text-destructive border-t pt-3 text-sm`,children:[`Couldn't load your progress: `,r]}):!t||!y5(t)?null:(0,j.jsxs)(`div`,{className:`flex flex-col gap-3 border-t pt-3`,"data-testid":`course-mastery`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,j.jsx)(`p`,{className:o5,children:`Your progress`}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:g5(t)})]}),(0,j.jsx)(v5,{record:t,order:[`focus`,`strengths`,`practicing`,`unsure`,`notStarted`],label:`Your progress by concept`})]})}var loe={sigma:Z_,calculator:Lh,code:yg,terminal:lv,cpu:Tg,database:Dg,network:S_,shield:Y_,"flask-conical":cee,atom:kh,dna:kg,leaf:lee,telescope:sv,globe:qg,landmark:t_,"book-open":jh,"pen-tool":P_,languages:r_,music:ree,palette:E_,camera:zh,brain:Nh,users:pv,"chart-line":Uh,briefcase:Fh,scale:fee,stethoscope:rv,"heart-pulse":Zg,wrench:_v,dumbbell:nee};function F7({icon:e,...t}){let n=rA.safeParse(e),r=n.success?loe[n.data]:Yg;return(0,j.jsx)(r,{"data-icon":n.success?n.data:`graduation-cap`,...t})}function I7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`skeleton`,className:A(`animate-pulse rounded-md bg-accent`,e),...t})}function uoe(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 $N(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 doe(e){return e===`finished`?` (finished)`:e===`generating`?` (being written)`:e===`failed`?` (stopped)`:e?` (started)`:` (not started)`}function L7({lessons:e,selectedId:t,onSelect:n}){return(0,j.jsx)(`nav`,{"aria-label":`Lessons`,children:(0,j.jsx)(`ol`,{className:`flex flex-col gap-1 text-sm`,children:e.topics.map((e,r)=>{let i=e.lesson?.status;return(0,j.jsx)(`li`,{children:(0,j.jsxs)(`button`,{type:`button`,disabled:!e.lesson,"aria-current":e.lesson?.id===t?`page`:void 0,onClick:()=>e.lesson&&n(e.lesson.id),className:A(`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,j.jsx)(`span`,{className:`mt-0.5 shrink-0`,"aria-hidden":!0,children:i===`finished`?(0,j.jsx)(Gh,{className:`text-success size-4`}):i===`generating`?(0,j.jsx)(yI,{"aria-hidden":`true`}):(0,j.jsx)(sg,{className:`size-4`})}),(0,j.jsxs)(`span`,{className:`min-w-0`,children:[r+1,`. `,e.title,(0,j.jsx)(`span`,{className:`sr-only`,children:doe(i)})]})]})},e.topicId)})})})}function foe({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}=uoe(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,j.jsx)(`p`,{className:`text-destructive m-auto p-6`,children:f}):(0,j.jsxs)(`p`,{className:`text-muted-foreground m-auto flex items-center gap-2 p-6`,role:`status`,children:[(0,j.jsx)(yI,{"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,j.jsx)(b8.Provider,{value:d.courseId,children:(0,j.jsx)(x8.Provider,{value:o,children:(0,j.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,j.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Lesson `,d.position+1]}),(0,j.jsx)(`h2`,{id:`lesson-title`,className:`font-heading text-2xl font-semibold`,children:d.outline?.title??d.topicTitle}),d.status===`finished`&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Finished. This lesson won't change.`}),d.changeReason&&d.version&&d.version>1&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,role:`status`,children:[`Version `,d.version,`: `,d.changeReason]})]}),!d.outline&&C&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Planning the lesson…`]}),d.sections.map(t=>(0,j.jsxs)(`section`,{id:`section-${t.id}`,tabIndex:-1,"aria-label":t.title,"data-changed":T.has(t.id)||void 0,className:A(`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,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`h3`,{className:`font-heading text-lg font-medium`,children:t.title}),T.has(t.id)&&(0,j.jsxs)(_8,{variant:`secondary`,children:[`Changed in v`,d.version]}),(i||a&&w)&&(0,j.jsxs)(`div`,{className:`ml-auto flex gap-1`,children:[i&&(0,j.jsxs)(M,{variant:`ghost`,size:`xs`,onClick:()=>i(t),"aria-label":`Explain: ${t.title}`,children:[(0,j.jsx)(dg,{"aria-hidden":!0}),` Explain`]}),a&&w&&(0,j.jsxs)(M,{variant:`ghost`,size:`xs`,onClick:()=>a(t),"aria-label":`Change: ${t.title}`,children:[(0,j.jsx)(I_,{"aria-hidden":!0}),` Change`]})]})]}),t.kind===`prose`?(0,j.jsxs)(j.Fragment,{children:[t.revisits.length>0&&(0,j.jsx)(`ul`,{className:`flex flex-wrap gap-2 text-sm`,"aria-label":`Revisits`,children:t.revisits.map(e=>(0,j.jsx)(`li`,{children:(0,j.jsxs)(M,{variant:`outline`,size:`xs`,onClick:()=>c?.(e.lessonId,e.sectionId),disabled:!c,children:[(0,j.jsx)(Cg,{"aria-hidden":!0}),` `,e.lessonTitle,`: `,e.title]})},e.sectionId))}),(0,j.jsx)(c2,{text:t.markdown,citations:!0})]}):(0,j.jsx)(K8,{data:t.artifact?.id?m[t.artifact.id]??t.artifact:t.artifact,replyInProgress:!1,onUpdate:e=>h(t=>Y8(t,{[e.id]:e})),onRefresh:async()=>{let t=await $N(e);t.ok&&p(t.value)}})]},t.id)),C&&E.map((e,t)=>(0,j.jsxs)(`section`,{"aria-label":`${e.title} (being written)`,className:`flex flex-col gap-2`,children:[(0,j.jsx)(`h3`,{className:`font-heading text-muted-foreground text-lg font-medium`,children:e.title}),t===0?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Writing…`]}),(0,j.jsx)(I7,{className:`h-16 w-full`})]}):(0,j.jsx)(I7,{className:`h-4 w-1/3`})]},`pending-${t}`)),d.status===`failed`&&(0,j.jsxs)(j2,{variant:`destructive`,children:[(0,j.jsx)(M2,{children:d.error}),(0,j.jsxs)(N2,{children:[(0,j.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,j.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[d.errorAction===`lesson-model`&&(0,j.jsx)(M,{size:`sm`,variant:`outline`,onClick:()=>window.dispatchEvent(new Event(`mivra:open-settings`)),children:`Lesson model settings`}),(0,j.jsx)(M,{size:`sm`,disabled:g,onClick:()=>void D(()=>tP(e)),children:`Continue writing`})]})]})]}),(d.status===`ready`||d.status===`finished`)&&(0,j.jsxs)(`footer`,{className:`flex flex-col gap-3 border-t pt-4`,"aria-live":`polite`,children:[d.status===`ready`?(0,j.jsxs)(j.Fragment,{children:[(0,j.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,j.jsx)(M,{className:`self-start`,disabled:!d.canFinish||g,onClick:async()=>{await D(()=>eP(e))&&n()},children:`Finish lesson`})]}):t?(0,j.jsxs)(M,{className:`self-start`,disabled:g,onClick:async()=>{_(!0),await r(t.id),_(!1)},children:[`Next lesson: `,t.title]}):u?(0,j.jsx)(`p`,{className:`font-medium`,children:`You've reached the end of the syllabus.`}):null,y&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:y})]}),f&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:f})]})})})}function R7({delayDuration:e=0,...t}){return(0,j.jsx)(Bm,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function z7({...e}){return(0,j.jsx)(Wm,{"data-slot":`tooltip`,...e})}function B7({...e}){return(0,j.jsx)(Km,{"data-slot":`tooltip-trigger`,...e})}function V7({className:e,sideOffset:t=0,children:n,...r}){return(0,j.jsx)(Xm,{children:(0,j.jsxs)(Qm,{"data-slot":`tooltip-content`,sideOffset:t,className:A(`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,j.jsx)(nh,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var poe=`Only text is read: images and diagrams aren't, and formulas may come through garbled.`,H7=new Set;function U7(e){for(let t of H7)t(e)}function moe(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 TN(e).then(e=>{t||(e.ok?n(e.value):o(e.error))});r();let a=t=>{t&&t!==e||r()};return H7.add(a),()=>{t=!0,H7.delete(a)}},[e]);let l=(0,v.useCallback)(async()=>{let t=await TN(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 ${aM/1048576} MB limit.`);i(t.name);let r=await EN(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&&U7(e)},[e]),attachFromLibrary:(0,v.useCallback)(async t=>{o(void 0);let r=await MN(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 jN(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 NN(e,t);s.current===e&&(r.ok?n(e=>e.filter(e=>e.id!==t)):o(r.error))},[e]),refresh:l}}function hoe({documents:{uploading:e,upload:t}}){let n=(0,v.useRef)(null);return(0,j.jsxs)(j.Fragment,{children:[(0,j.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,j.jsx)(R7,{delayDuration:400,children:(0,j.jsxs)(z7,{children:[(0,j.jsx)(B7,{asChild:!0,children:(0,j.jsx)(M,{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,j.jsx)(A_,{"aria-hidden":`true`}):(0,j.jsx)(yI,{"aria-hidden":`true`})})}),(0,j.jsx)(V7,{children:`Attach a PDF or PowerPoint file`})]})})]})}function goe({documents:e}){let[t,n]=(0,v.useState)(!1);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(R7,{delayDuration:400,children:(0,j.jsxs)(z7,{children:[(0,j.jsx)(B7,{asChild:!0,children:(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Attach from library or paste text`,disabled:e.uploading!==void 0,onClick:()=>n(!0),children:(0,j.jsx)(o_,{"aria-hidden":`true`})})}),(0,j.jsx)(V7,{children:`Attach from library or paste text`})]})}),(0,j.jsx)(N7,{open:t,onOpenChange:n,excludeIds:e.documents.map(e=>e.id),onPickLibrary:t=>e.attachFromLibrary(t.id),onPasteText:t=>e.pasteText(t)})]})}function W7({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,j.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,j.jsx)(`ul`,{"aria-label":`Attached documents`,className:`flex flex-wrap gap-1.5`,children:a.map(e=>(0,j.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,j.jsx)(Hg,{className:`text-muted-foreground size-3.5 shrink-0`,"aria-hidden":!0}),(0,j.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.filename,children:e.filename}),(0,j.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:j7(e)}),(0,j.jsx)(R7,{delayDuration:400,children:(0,j.jsxs)(z7,{children:[(0,j.jsx)(B7,{asChild:!0,children:(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6`,"aria-label":`Remove ${e.filename}`,onClick:()=>void r(e.id),children:(0,j.jsx)(yv,{"aria-hidden":`true`})})}),(0,j.jsx)(V7,{children:`Detach from session`})]})})]},e.id))}),t!==void 0&&(0,j.jsxs)(`p`,{role:`status`,className:`text-muted-foreground flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),(0,j.jsxs)(`span`,{className:`truncate`,children:[`Reading `,t,`…`]})]}),n&&(0,j.jsx)(`p`,{role:`alert`,className:`text-destructive wrap-anywhere`,children:n}),o&&!i&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:poe})]})}var G7=(0,v.createContext)(null),_oe=()=>{let e=(0,v.useContext)(G7);if(!e)throw Error(`ChainOfThought components must be used within ChainOfThought`);return e},K7=(0,v.memo)(({className:e,open:t,defaultOpen:n=!1,onOpenChange:r,children:i,...a})=>{let[o,s]=Qn({prop:t,defaultProp:n,onChange:r}),c=(0,v.useMemo)(()=>({isOpen:o}),[o]);return(0,j.jsx)(G7.Provider,{value:c,children:(0,j.jsx)(X8,{asChild:!0,open:o,onOpenChange:s,children:(0,j.jsx)(`div`,{className:A(`not-prose min-w-0 max-w-prose space-y-4`,e),...a,children:i})})})}),q7=(0,v.memo)(({className:e,children:t,...n})=>{let{isOpen:r}=_oe();return(0,j.jsxs)(Z8,{className:A(`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,j.jsx)(Nh,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,j.jsx)(`span`,{className:`min-w-0 flex-1 text-left wrap-anywhere`,children:t??`Chain of Thought`}),(0,j.jsx)(qh,{"aria-hidden":`true`,className:A(`size-4 shrink-0`,r?`rotate-180`:`rotate-0`)})]})}),J7=(0,v.memo)(({className:e,icon:t=jg,label:n,description:r,status:i=`complete`,children:a,...o})=>(0,j.jsxs)(`div`,{className:A(`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,j.jsxs)(`div`,{"aria-hidden":`true`,className:`relative mt-0.5 shrink-0`,children:[(0,j.jsx)(t,{className:`size-4`}),(0,j.jsx)(`div`,{className:`-mx-px absolute top-7 bottom-0 left-1/2 w-px bg-border`})]}),(0,j.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 wrap-anywhere`,children:[(0,j.jsx)(`div`,{children:n}),r&&(0,j.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:r}),a]})]})),Y7=(0,v.memo)(({className:e,children:t,...n})=>(0,j.jsx)(Q8,{className:A(`mt-2 min-w-0 space-y-3 text-foreground outline-none`,e),...n,children:t}));K7.displayName=`ChainOfThought`,q7.displayName=`ChainOfThoughtHeader`,J7.displayName=`ChainOfThoughtStep`,Y7.displayName=`ChainOfThoughtContent`;function voe({className:e,value:t,...n}){return(0,j.jsx)(Df,{"data-slot":`progress`,className:A(`relative h-2 w-full overflow-hidden rounded-full bg-primary/20`,e),...n,children:(0,j.jsx)(kf,{"data-slot":`progress-indicator`,className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(t||0)}%)`}})})}function X7(){let[e,t]=(0,v.useState)({step:`idle`}),n=async()=>{t({step:`busy`});let e=await PP();t(e.ok?{step:`done`,filename:e.filename}:{step:`error`,error:e.error})};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,j.jsxs)(M,{type:`button`,variant:`outline`,className:`self-start`,disabled:e.step===`busy`,onClick:()=>void n(),children:[e.step===`busy`?(0,j.jsx)(yI,{"aria-hidden":`true`}):(0,j.jsx)(tee,{"aria-hidden":`true`}),`Export to Obsidian`]}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,role:`status`,children:e.step===`done`?`Downloaded ${e.filename}. Unzip it into your vault: it adds a Mivra folder of concepts and memories that link to your notes.`:`Concepts and memories as linked notes, for your Obsidian vault. Your own notes aren't included.`}),e.step===`error`&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:e.error})]})}var yoe=yM*4,boe=1048576;function xoe(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 Soe(e){let t,n=[],r=[],i=0,a=0;for(let o of Array.from(e)){let e=xoe(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>yoe)r.push(s);else{if(n.length>=1e4)return{ok:!1,error:`This folder has more than ${vM.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 ${bM/boe} 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 Coe(e,t){let n=Soe(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 Z7=(e,t,n=`${t}s`)=>`${e.toLocaleString(`en`)} ${e===1?t:n}`,woe=1500,Q7=e=>e.status===`queued`||e.status===`running`;function Toe({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})),PN().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=>Q7(e.distillation));return(0,v.useEffect)(()=>{if(!e||!p)return;let t=!1,n=setInterval(()=>{PN().then(e=>{!t&&e.ok&&a(e.value)})},woe);return()=>{t=!0,clearInterval(n)}},[e,p]),(0,j.jsxs)(T7,{open:e,onOpenChange:t,children:[(0,j.jsxs)(E7,{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,j.jsxs)(D7,{children:[(0,j.jsx)(O7,{className:`font-heading`,children:`Imported notes`}),(0,j.jsx)(k7,{children:`Notes from your Obsidian vaults. They're read-only here: edit them in Obsidian, then re-import the vault.`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-4`,"aria-live":`polite`,children:[i&&i.length>0&&(0,j.jsxs)(M,{type:`button`,className:`self-start`,onClick:()=>u(),children:[(0,j.jsx)(Gg,{"aria-hidden":`true`}),`Import a vault`]}),i&&i.length>0&&(0,j.jsx)(X7,{}),o&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:o}),!i&&!o&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Loading imports…`]}),i?.length===0&&(0,j.jsxs)(y7,{className:`border p-6 md:p-6`,children:[(0,j.jsxs)(b7,{children:[(0,j.jsx)(x7,{variant:`icon`,children:(0,j.jsx)(o_,{"aria-hidden":`true`})}),(0,j.jsx)(S7,{children:`No vaults imported yet`}),(0,j.jsx)(C7,{children:`Import an Obsidian vault to bring its notes, links and tags into Mivra. Only Markdown notes are read.`})]}),(0,j.jsx)(w7,{children:(0,j.jsxs)(M,{type:`button`,onClick:()=>u(),children:[(0,j.jsx)(Gg,{"aria-hidden":`true`}),`Import a vault`]})})]}),i&&i.length>0&&(0,j.jsx)(`ul`,{className:`flex flex-col gap-2`,"aria-label":`Imported vaults`,children:i.map(e=>(0,j.jsx)(Eoe,{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,j.jsx)(koe,{open:c.open,onOpenChange:e=>{e||l(e=>({...e,open:!1}))},imports:i??[],...c.reimport?{reimport:c.reimport}:{},onImported:d},c.key)]})}function Eoe({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 FN(e.id);c(!1),t.ok?r():u(t.error)};return(0,j.jsxs)(`li`,{className:`flex flex-col gap-2 rounded-lg border p-3 text-sm wrap-anywhere`,"aria-label":e.name,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:e.name}),(0,j.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[Z7(e.noteCount,`note`),` · Updated `,new Date(e.updatedAt).toLocaleDateString()]})]}),(0,j.jsx)(Doe,{entry:e,onChange:i}),a?(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Delete this import and its `,Z7(e.noteCount,`note`),`, with the concepts and memories drawn from them? Your vault itself isn't touched.`]}),(0,j.jsxs)(M,{type:`button`,variant:`destructive`,size:`sm`,disabled:s,onClick:()=>void d(),children:[s&&(0,j.jsx)(yI,{"aria-hidden":`true`}),`Yes, delete`]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:s,onClick:()=>o(!1),children:`Keep`})]}):(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n&&e.noteCount>0&&(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:n,children:[(0,j.jsx)(hv,{"aria-hidden":`true`}),`Graph`]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:t,children:`Re-import`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>o(!0),children:`Delete`})]}),l&&(0,j.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:l})]})}function Doe({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=`${Z7(n.concepts,`concept`)} and ${Z7(n.memories,`memory`,`memories`)} drawn from these notes`,l;if(Q7(n)){let e=n.groups>0?Math.round(n.groupsDone/n.groups*100):0;l=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,j.jsx)(yI,{"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,j.jsx)(voe,{value:e,"aria-label":`Reading notes for concepts`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,disabled:r,onClick:()=>void s(LN),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. ${Z7(n.pendingNotes,`note`)} not read for concepts yet.`:`${Z7(n.pendingNotes,`note`)} not read for concepts yet.`;l=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:n.status===`failed`?`text-destructive`:`text-muted-foreground`,children:e}),(n.concepts>0||n.memories>0)&&(0,j.jsxs)(`p`,{className:`text-muted-foreground`,children:[`So far: `,c,`.`]}),(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,disabled:r,onClick:()=>void s(IN),children:[r&&(0,j.jsx)(yI,{"aria-hidden":`true`}),n.status===`failed`?`Try again`:n.status===`cancelled`?`Resume`:`Read notes`]})]})}else if(n.concepts>0||n.memories>0)l=(0,j.jsxs)(`p`,{className:`text-muted-foreground`,children:[c[0].toUpperCase()+c.slice(1),`.`]});else if(!n.conceptsSkipped)return null;return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,role:`group`,"aria-label":`Concepts from these notes`,children:[l,n.conceptsSkipped?(0,j.jsxs)(`p`,{className:`text-muted-foreground`,children:[Z7(n.conceptsSkipped,`new concept`),` left out: the concept graph is full. Deleting an import you no longer need makes room.`]}):null,a&&(0,j.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:a})]})}var Ooe=e=>e.replace(/\.zip$/i,``).trim(),$7=e=>(e.kind===`zip`?Ooe(e.file.name):e.vault.folder??``).slice(0,120);function koe({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 Coe(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($7(r)),l({step:`ready`,source:r})},g=e=>{f.current++;let t={kind:`zip`,file:e};d($7(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 qN(m,t.file):await KN(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,j.jsx)(G5,{open:e,onOpenChange:t,children:(0,j.jsxs)(K5,{className:`sm:max-w-lg`,children:[(0,j.jsxs)(q5,{children:[(0,j.jsx)(Y5,{className:`font-heading wrap-anywhere`,children:y}),(0,j.jsx)(X5,{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,j.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,j.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,j.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,j.jsxs)($8,{"data-invalid":!!c.error,children:[(0,j.jsxs)(M,{type:`button`,onClick:()=>o.current?.click(),children:[(0,j.jsx)(Gg,{"aria-hidden":`true`}),`Choose vault folder`]}),c.error&&(0,j.jsx)(n5,{role:`alert`,children:c.error})]}),(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Can't choose a folder on this device?`,` `,(0,j.jsx)(M,{type:`button`,variant:`link`,className:`h-auto p-0`,onClick:()=>s.current?.click(),children:`Upload a .zip instead`})]})]}),c.step===`reading`&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"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,j.jsxs)(`form`,{onSubmit:_,className:`flex flex-col gap-4`,children:[(0,j.jsx)(Aoe,{source:c.source}),!r&&(0,j.jsxs)($8,{"data-invalid":c.step===`ready`&&!!c.error,children:[(0,j.jsx)(e5,{htmlFor:a,children:`Import name`}),(0,j.jsx)(r5,{id:a,value:u,maxLength:120,disabled:c.step===`sending`,onChange:e=>d(e.target.value),"aria-describedby":`${a}-description`}),(0,j.jsx)(t5,{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,j.jsx)(n5,{role:`alert`,className:`wrap-anywhere`,children:c.error}),c.step===`sending`&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),c.source.kind===`zip`?`Uploading and unpacking the zip…`:`Sending ${Z7(c.source.vault.files.length,`note`)}…`]}),(0,j.jsxs)(J5,{children:[(0,j.jsx)(M,{type:`button`,variant:`outline`,disabled:c.step===`sending`,onClick:()=>l({step:`choose`}),children:`Choose again`}),(0,j.jsxs)(M,{type:`submit`,disabled:c.step===`sending`||!r&&!u.trim(),children:[c.step===`sending`&&(0,j.jsx)(yI,{"aria-hidden":`true`}),p?`Re-import`:`Import`]})]})]}),c.step===`done`&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,j.jsx)(Moe,{result:c.result,source:c.source,replaced:c.replaced}),(0,j.jsx)(J5,{children:(0,j.jsx)(M,{type:`button`,onClick:()=>t(!1),children:`Done`})})]})]})})}function Aoe({source:e}){if(e.kind===`zip`)return(0,j.jsxs)(`p`,{className:`flex items-center gap-2 text-sm wrap-anywhere`,children:[(0,j.jsx)(see,{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&&Z7(t.notMarkdown,`other file`),t.tooLong.length>0&&Z7(t.tooLong.length,`note`)+` too long to import`].filter(Boolean);return(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 text-sm`,children:[(0,j.jsxs)(`p`,{className:`flex items-center gap-2 wrap-anywhere`,children:[(0,j.jsx)(Gg,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),Z7(t.files.length,`note`),` found`,t.folder?` in ${t.folder}`:``]}),n.length>0&&(0,j.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Left out: `,n.join(`, `),`.`]})]})}var joe={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 Moe({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,j.jsxs)(`div`,{className:`flex flex-col gap-3 text-sm`,role:`status`,children:[(0,j.jsxs)(`p`,{className:`wrap-anywhere`,children:[n?`Re-imported`:`Imported`,` `,(0,j.jsx)(`span`,{className:`font-medium`,children:e.import.name}),`: `,Z7(e.import.noteCount,`note`),` in all.`]}),(0,j.jsx)(`dl`,{className:`grid grid-cols-4 gap-2`,"aria-label":`What changed`,children:s.map(([e,t])=>(0,j.jsxs)(`div`,{className:`bg-muted flex flex-col rounded-md px-2 py-1.5`,children:[(0,j.jsx)(`dt`,{className:`text-muted-foreground text-xs`,children:e}),(0,j.jsx)(`dd`,{className:`font-medium tabular-nums`,children:t.toLocaleString(`en`)})]},e))}),o>0&&(0,j.jsxs)(`div`,{className:`text-muted-foreground flex flex-col gap-1`,children:[(0,j.jsxs)(`p`,{children:[`Skipped `,Z7(o,`file`),i>0?`, including ${Z7(i,`attachment or other file`,`attachments and other files`)}`:``,`.`]}),a.length>0&&(0,j.jsxs)(`ul`,{className:`list-disc pl-5 wrap-anywhere`,children:[a.slice(0,5).map(e=>(0,j.jsxs)(`li`,{children:[e.path,` (`,joe[e.reason],`)`]},`${e.path}:${e.reason}`)),a.length>5&&(0,j.jsx)(`li`,{children:`…`})]})]}),e.truncated&&(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Some links or tags were left out: a note or the vault had more than Mivra keeps.`}),Q7(e.import.distillation)&&(0,j.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.`})]})}var Noe={missed:`Missed`,unsure:`Unsure`,retention:`Keep fresh`},Poe={missed:rg,unsure:dg,retention:dee},Foe={missed:`border-destructive/40 bg-destructive/10 text-destructive`,unsure:`border-border-strong text-muted-foreground border-dashed`,retention:`border-border-strong text-muted-foreground`};function Ioe({reason:e,className:t}){let n=Poe[e];return(0,j.jsxs)(_8,{variant:`outline`,className:A(Foe[e],t),"data-reason":e,children:[(0,j.jsx)(n,{"aria-hidden":`true`}),Noe[e]]})}function Loe(e){return e.reason===`retention`?e.overdueDays===0?`Due today`:`Due ${e.overdueDays.toLocaleString(`en`)} day${e.overdueDays===1?``:`s`} ago`:e.reason===`missed`?`Wrong last time`:`Not sure last time`}var Roe={focus:`weak`,unsure:`unsure`,not_started:`not practised yet`};function zoe(e){return`Missed ${e.concept}; prerequisite ${e.prerequisite} is ${Roe[e.prerequisiteStatus]}`}function Boe({recommendations:e,onStart:t}){let[n,r]=(0,v.useState)(),[i,a]=(0,v.useState)(),o=(0,v.useRef)(!0);(0,v.useEffect)(()=>(o.current=!0,()=>{o.current=!1}),[]);let s=async e=>{if(n)return;let i=`${e.prerequisite}\u0000${e.concept}`;r(i),a(void 0);let s=await _N(e.prerequisite,e.concept);o.current&&(r(void 0),s.ok?t(s.value.session,s.value.message):a(s.error))};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-testid":`prerequisite-recommendations`,children:[(0,j.jsx)(`h3`,{className:o5,children:`What next`}),(0,j.jsx)(`ul`,{className:`flex flex-col gap-2`,"aria-label":`Prerequisites to drill first`,children:e.map(e=>{let t=`${e.prerequisite}\u0000${e.concept}`;return(0,j.jsxs)(`li`,{className:`bg-sunken flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-lg px-3 py-2 text-[0.9rem] leading-snug`,"data-testid":`prerequisite-recommendation`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,j.jsx)(`span`,{className:`wrap-anywhere`,children:zoe(e)}),(0,j.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1 text-[0.8125rem] wrap-anywhere`,children:[`Drill `,e.prerequisite,` first `,(0,j.jsx)(Dh,{className:`size-3.5 shrink-0`,"aria-label":`then`}),` `,e.concept]})]}),(0,j.jsxs)(M,{type:`button`,size:`sm`,variant:`outline`,className:`shrink-0`,disabled:!!n,onClick:()=>void s(e),"aria-label":`Drill prerequisite ${e.prerequisite}`,children:[n===t&&(0,j.jsx)(yI,{"aria-hidden":`true`}),`Drill prerequisite`]})]},t)})}),i&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:i})]})}var e9=8;function Voe({onStart:e}){let[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)(),[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(!0);(0,v.useEffect)(()=>(s.current=!0,hN().then(e=>{s.current&&(e.ok?n(e.value):i(e.error))}),()=>{s.current=!1}),[]);let c=async()=>{if(!t||a)return;o(!0),i(void 0);let n=await gN(t.items.slice(0,5).map(e=>e.concept));s.current&&(o(!1),n.ok?e(n.value.session,n.value.message):i(n.error))};if(!t)return r?(0,j.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Couldn't load your reviews: `,r]}):null;let l=t.total===1?`this concept`:t.total<=5?`these ${t.total}`:`the first 5`;return(0,j.jsxs)(`section`,{"aria-labelledby":`memory-due`,className:`flex flex-col gap-3 border-b pb-5`,"data-testid":`due-review`,children:[(0,j.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,j.jsxs)(`h2`,{id:`memory-due`,className:o5,children:[`Due for review `,t.total>0&&(0,j.jsxs)(`span`,{className:`tabular-nums`,children:[`(`,t.total.toLocaleString(`en`),`)`]})]}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:t.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 ${l}. A right answer takes a concept off the list.`})]}),t.total>0&&(0,j.jsxs)(M,{type:`button`,size:`sm`,className:`shrink-0`,disabled:a,onClick:()=>void c(),children:[a&&(0,j.jsx)(yI,{"aria-hidden":`true`}),`Start review`]})]}),t.items.length>0&&(0,j.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`Concepts due for review`,children:t.items.slice(0,e9).map(e=>(0,j.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,j.jsx)(Ioe,{reason:e.reason,className:`shrink-0`}),(0,j.jsx)(`span`,{className:`min-w-0 wrap-anywhere`,children:e.concept}),(0,j.jsxs)(`span`,{className:`text-muted-foreground ml-auto text-[0.8125rem]`,children:[e.course&&(0,j.jsxs)(j.Fragment,{children:[e.course.title,` · `]}),Loe(e),(0,j.jsxs)(`span`,{className:`font-mono text-[0.72rem]`,children:[` · `,e.lastAttemptAt.slice(0,10)]})]})]},e.concept))}),t.recommendations&&t.recommendations.length>0&&(0,j.jsx)(Boe,{recommendations:t.recommendations,onStart:e}),t.total>e9&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:[`And `,(t.total-e9).toLocaleString(`en`),` more, for later sessions.`]}),r&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:r})]})}var Hoe=[{kind:`goal`,title:`Goals`},{kind:`preference`,title:`Preferences`},{kind:`misconception`,title:`Misconceptions`},{kind:`known`,title:`Known from your notes`}],Uoe=[{value:`all`,label:`All`},{value:`import`,label:`From notes`},{value:`other`,label:`From learning`}],Woe=(e,t)=>e===`all`||e===`import`==(t.basis===`import`),Goe=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`;function Koe({open:e,onOpenChange:t,onOpenCourse:n,onStartReview: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,h]=(0,v.useState)(),[g,_]=(0,v.useState)(`all`),y=i?.filter(e=>e.basis===`import`).length??0,b=i?.filter(e=>Woe(g,e));return(0,v.useEffect)(()=>{if(!e)return;let t=!1;a(void 0),s(void 0),p(void 0),_(`all`);let n=()=>{l(void 0),d(void 0),h(void 0),mN().then(e=>{t||(e.ok?p(e.value):h(e.error))}),pN().then(e=>{t||(e.ok?a(e.value):l(e.error))}),xN().then(e=>{t||(e.ok?s(e.value):d(e.error))})};return n(),window.addEventListener(`focus`,n),()=>{t=!0,window.removeEventListener(`focus`,n)}},[e]),(0,j.jsx)(T7,{open:e,onOpenChange:t,children:(0,j.jsxs)(E7,{className:A(`w-full overflow-y-auto sm:max-w-md`,s5),onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-memory-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,j.jsxs)(D7,{className:c5,children:[(0,j.jsx)(O7,{className:l5,children:`Memory`}),(0,j.jsx)(k7,{children:`Your record from graded answers, and what Mivra has noted about you across sessions. Notes can be wrong, so correct or delete anything here.`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-5 px-5 py-5`,"aria-live":`polite`,children:[c&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:c}),u&&(0,j.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Couldn't load your courses: `,u]}),m&&(0,j.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Couldn't load your record: `,m]}),f&&y5(f)&&r&&(0,j.jsx)(Voe,{onStart:(e,n)=>{r(e,n),t(!1)}}),f&&y5(f)&&(0,j.jsxs)(`section`,{"aria-labelledby":`memory-record`,className:`flex flex-col gap-3 border-b pb-5`,"data-testid":`learner-record`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,j.jsx)(`h2`,{id:`memory-record`,className:`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:`Your record`}),(0,j.jsxs)(`p`,{className:`text-muted-foreground text-[0.8125rem]`,children:[`From your graded answers: `,g5(f),`.`]})]}),(0,j.jsx)(v5,{record:f,order:[`strengths`,`focus`,`practicing`,`unsure`],label:`Your record by concept`})]}),!i&&!c&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Loading memories…`]}),o&&o.length>0&&(0,j.jsxs)(`section`,{"aria-labelledby":`memory-courses`,className:`flex flex-col gap-1.5`,children:[(0,j.jsx)(`h2`,{id:`memory-courses`,className:`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:`Courses`}),(0,j.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:o.map(e=>(0,j.jsx)(Joe,{course:e,onOpen:()=>{n(e.sessionId),t(!1)}},e.id))}),i?.length===0&&(0,j.jsx)(`p`,{className:`text-muted-foreground border-t pt-4 text-sm`,children:`No memories yet. As you learn, Mivra can remember your goals, preferences and concepts to revisit.`})]}),i?.length===0&&!o&&u&&(0,j.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.`}),i?.length===0&&o?.length===0&&(0,j.jsxs)(y7,{className:`bg-sunken/50 border border-dashed p-6 md:p-6`,children:[(0,j.jsxs)(b7,{children:[(0,j.jsx)(x7,{variant:`icon`,children:(0,j.jsx)(Nh,{"aria-hidden":`true`})}),(0,j.jsx)(S7,{children:`No memories yet`}),(0,j.jsx)(C7,{children:`Start a conversation or course. As you learn, Mivra can remember your goals, preferences and concepts to revisit.`})]}),(0,j.jsx)(w7,{children:(0,j.jsx)(M,{variant:`outline`,onClick:()=>t(!1),children:`Back to learning`})})]}),y>0&&(0,j.jsx)(Yoe,{filter:g,onFilter:_,count:y,onDeleted:()=>{a(e=>e?.filter(e=>e.basis!==`import`)),_(`all`)}}),b&&Hoe.map(({kind:e,title:t})=>{let n=b.filter(t=>t.kind===e);return n.length>0?(0,j.jsxs)(`section`,{className:`flex flex-col gap-1.5 [section+&]:border-t [section+&]:pt-4 [section+div+&]:border-t [section+div+&]:pt-4`,children:[(0,j.jsx)(`h2`,{className:`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:t}),(0,j.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:n.map(e=>(0,j.jsx)(Xoe,{memory:e,onChange:e=>a(t=>t?.map(t=>t.id===e.id?e:t)),onDelete:()=>a(t=>t?.filter(t=>t.id!==e.id))},e.id))})]},e):null}),i&&i.length>0&&(0,j.jsx)(`div`,{className:`border-t pt-4`,children:(0,j.jsx)(X7,{})})]})]})})}var qoe={interviewing:`Setting up`,active:`In progress`,complete:`Complete`};function Joe({course:e,onOpen:t}){let n=e.kind===`project`?`milestones`:`lessons`;return(0,j.jsxs)(`li`,{className:`hover:bg-sunken focus-within:bg-sunken -mx-2.5 flex items-start gap-3 rounded-lg px-2.5 py-2.5 text-[0.95rem] leading-snug transition-colors`,children:[(0,j.jsx)(F7,{icon:e.icon,className:`text-muted-foreground mt-0.5 size-4 shrink-0`,"aria-hidden":`true`}),(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,j.jsx)(`p`,{className:`wrap-anywhere`,children:e.title}),(0,j.jsxs)(`div`,{className:`text-muted-foreground flex flex-wrap items-center gap-x-2 gap-y-1 text-[0.8125rem]`,children:[(0,j.jsx)(_8,{variant:`outline`,children:qoe[e.status]}),e.status!==`interviewing`&&(0,j.jsxs)(`span`,{children:[e.lessonsFinished,` of `,e.topicCount,` `,n,` finished`]}),e.completedAt&&(0,j.jsx)(`span`,{className:`font-mono text-[0.72rem]`,children:new Date(e.completedAt).toLocaleDateString()})]})]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 shrink-0 bg-card dark:bg-card border-border-strong dark:border-border-strong hover:bg-sunken dark:hover:bg-sunken`,"aria-label":`${e.status===`interviewing`?`Continue setting up`:`Open`} ${e.title}`,onClick:t,children:e.status===`interviewing`?`Continue`:`Open`})]})}function Yoe({filter:e,onFilter:t,count:n,onDeleted:r}){let[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(),u=async()=>{s(!0),l(void 0);let e=await wN();if(s(!1),!e.ok)return l(e.error);a(!1),r()};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,j.jsx)(`div`,{className:u5,role:`group`,"aria-label":`Show memories`,children:Uoe.map(({value:n,label:r})=>(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`ghost`,className:d5(e===n),"aria-pressed":e===n,onClick:()=>t(n),children:r},n))}),e===`import`&&(i?(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Delete all `,n.toLocaleString(`en`),` memories drawn from your notes? Your notes stay imported.`]}),(0,j.jsxs)(M,{type:`button`,variant:`destructive`,size:`sm`,disabled:o,onClick:()=>void u(),children:[o&&(0,j.jsx)(yI,{"aria-hidden":`true`}),`Yes, delete all`]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:o,onClick:()=>a(!1),children:`Keep`})]}):(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,onClick:()=>a(!0),children:`Delete all from notes`})),c&&(0,j.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:c})]})}function Xoe({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 SN(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 CN(e.id);l(!1),t.ok?n():d(t.error)};return(0,j.jsxs)(`li`,{className:`hover:bg-sunken focus-within:bg-sunken -mx-2.5 flex flex-col gap-1.5 rounded-lg px-2.5 py-2.5 text-[0.95rem] leading-snug wrap-anywhere transition-colors`,children:[i===`edit`?(0,j.jsxs)(`form`,{onSubmit:f,className:`flex flex-col gap-2`,children:[(0,j.jsxs)($8,{"data-invalid":!!u,children:[(0,j.jsx)(e5,{htmlFor:r,children:`Memory text`}),(0,j.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,j.jsx)(t5,{id:`${r}-description`,children:`Correct what Mivra should remember. Up to 300 characters.`}),u&&(0,j.jsx)(n5,{id:`${r}-error`,role:`alert`,children:u})]}),(0,j.jsxs)(`div`,{className:`flex gap-2`,children:[(0,j.jsxs)(M,{type:`submit`,size:`sm`,disabled:c||!o.trim(),children:[c&&(0,j.jsx)(yI,{"aria-hidden":`true`}),c?`Saving…`:`Save`]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{s(e.text??``),d(void 0),a(`view`)},children:`Cancel`})]})]}):(0,j.jsxs)(j.Fragment,{children:[e.held?(0,j.jsx)(`p`,{className:`text-muted-foreground italic`,children:`Hidden until you answer the check in that session.`}):(0,j.jsx)(`p`,{children:e.text}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[!e.held&&(0,j.jsx)(`span`,{className:`text-muted-foreground max-w-full truncate text-[0.8125rem]`,title:e.source?`${e.source.importName}: ${e.source.path}`:void 0,children:Goe(e)}),e.editedAt&&(0,j.jsx)(_8,{variant:`outline`,children:`Edited by you`}),(0,j.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.72rem]`,children:new Date(e.createdAt).toLocaleDateString()})]}),i===`confirm-delete`?(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:`Delete permanently?`}),(0,j.jsx)(M,{type:`button`,variant:`destructive`,size:`sm`,disabled:c,onClick:()=>void p(),children:`Yes, delete`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(`view`),children:`Keep`})]}):(0,j.jsxs)(`div`,{className:`flex gap-1.5`,children:[!e.held&&(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 bg-card dark:bg-card border-border-strong dark:border-border-strong hover:bg-sunken dark:hover:bg-sunken`,onClick:()=>{s(e.text??``),a(`edit`)},children:`Edit`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 bg-card dark:bg-card border-border-strong dark:border-border-strong hover:bg-sunken dark:hover:bg-sunken`,onClick:()=>a(`confirm-delete`),children:`Delete`})]})]}),u&&i!==`edit`&&(0,j.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:u})]})}function t9({...e}){return(0,j.jsx)(Oo,{"data-slot":`alert-dialog`,...e})}function Zoe({...e}){return(0,j.jsx)(ko,{"data-slot":`alert-dialog-trigger`,...e})}function Qoe({...e}){return(0,j.jsx)(Ao,{"data-slot":`alert-dialog-portal`,...e})}function $oe({className:e,...t}){return(0,j.jsx)(jo,{"data-slot":`alert-dialog-overlay`,className:A(`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 n9({className:e,size:t=`default`,...n}){return(0,j.jsxs)(Qoe,{children:[(0,j.jsx)($oe,{}),(0,j.jsx)(Po,{"data-slot":`alert-dialog-content`,"data-size":t,className:A(`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 r9({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:A(`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 i9({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:A(`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 a9({className:e,...t}){return(0,j.jsx)(Fo,{"data-slot":`alert-dialog-title`,className:A(`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 o9({className:e,...t}){return(0,j.jsx)(Io,{"data-slot":`alert-dialog-description`,className:A(`text-sm text-muted-foreground`,e),...t})}function s9({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,j.jsx)(M,{variant:t,size:n,asChild:!0,children:(0,j.jsx)(Lo,{"data-slot":`alert-dialog-action`,className:A(e),...r})})}function c9({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,j.jsx)(M,{variant:t,size:n,asChild:!0,children:(0,j.jsx)(zo,{"data-slot":`alert-dialog-cancel`,className:A(e),...r})})}function ese({...e}){return(0,j.jsx)(Mp,{"data-slot":`select`,...e})}function tse({...e}){return(0,j.jsx)(Ip,{"data-slot":`select-value`,...e})}function nse({className:e,size:t=`default`,children:n,...r}){return(0,j.jsxs)(Pp,{"data-slot":`select-trigger`,"data-size":t,className:A(`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,j.jsx)(Lp,{asChild:!0,children:(0,j.jsx)(qh,{className:`size-4 opacity-50`})})]})}function rse({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,j.jsx)(Bp,{children:(0,j.jsxs)(Hp,{"data-slot":`select-content`,className:A(`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,j.jsx)(ase,{}),(0,j.jsx)(em,{className:A(`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,j.jsx)(ose,{})]})})}function ise({className:e,children:t,...n}){return(0,j.jsxs)(om,{"data-slot":`select-item`,className:A(`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,j.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,j.jsx)(um,{children:(0,j.jsx)(Gh,{className:`size-4`})})}),(0,j.jsx)(cm,{children:t})]})}function ase({className:e,...t}){return(0,j.jsx)(fm,{"data-slot":`select-scroll-up-button`,className:A(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,j.jsx)($h,{className:`size-4`})})}function ose({className:e,...t}){return(0,j.jsx)(mm,{"data-slot":`select-scroll-down-button`,className:A(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,j.jsx)(qh,{className:`size-4`})})}var sse=220,cse=70,lse=4e4,l9=40,u9=14;function use(e=1){let t=e;return()=>(t=(t*1664525+1013904223)%4294967296,t/4294967296)}function dse(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 fse(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:dse(e.kind,r[t])}));if(i.length>0){let e=Math.min(1,60/i.length),t=Math.round(Math.min(sse,Math.max(cse,lse/i.length))),r=Math.round(t*.65);G3(i).stop().randomSource(use()).alphaDecay(1-.001**(1/t)).force(`link`,u3(n.map(([e,t])=>({source:e,target:t}))).id(e=>e.index).distance(e=>26+e.source.radius+e.target.radius)).force(`charge`,K3().strength(-90-120*e).theta(.9).distanceMax(250)).force(`x`,q3().strength(.06)).force(`y`,J3().strength(.06)).tick(r).force(`collide`,s3(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,pse=1.6,mse=150,hse=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 gse(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?`, ${f5[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,_se=0;function vse(e){let[t,n]=(0,v.useState)();return(0,v.useEffect)(()=>{if(!e)return;let t=()=>n({view:e,layout:fse(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=++_se,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 yse({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)(()=>{PN().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?zN({mode:i.mode,focus:i.focus,depth:i.depth}):RN(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=vse(_),[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),ee=o?_?.nodes.find(e=>e.id===o):void 0,te=[{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,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,"data-testid":`notes-graph`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2 border-b p-3`,role:`toolbar`,"aria-label":`Graph filters`,children:[(0,j.jsx)(S9,{label:f?`Graph`:`Import`,value:n,onChange:S,options:te}),!f&&(0,j.jsxs)(j.Fragment,{children:[(0,j.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,j.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,j.jsx)(S9,{label:`Show`,value:i.mode===`local`||O?`local`:`auto`,onChange:e=>a(t=>({...t,mode:e,...e===`local`&&o&&(f||ee?.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,j.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,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(xse,{onPick:e=>w(`concept:${e.id}`)}),ee&&ee.id!==_?.focus&&(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(e=>({...e,mode:`local`,focus:ee.id})),children:[`Centre on `,ee.label]})]}):(0,j.jsx)(Sse,{importId:n,onPick:e=>C(e.id)})]}),(0,j.jsx)(Cse,{view:_,loading:h.loading||y.pending,error:h.error,importName:E,isGlobal:f}),f&&_&&ee?.kind===`concept`&&(0,j.jsx)(bse,{view:_,concept:ee,onChanged:e=>{e&&s(void 0),m(e=>e+1)}},ee.id),!y.drawn&&!h.error&&(h.loading||y.pending)&&(0,j.jsxs)(`div`,{"aria-hidden":!0,className:`text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm`,children:[(0,j.jsx)(yI,{}),`Drawing the graph…`]}),y.drawn&&(0,j.jsx)(Dse,{view:y.drawn.view,layout:y.drawn.layout,selected:o,onSelect:s,onActivate:T}),(0,j.jsx)(kse,{noteId:b,onOpenChange:e=>!e&&x(void 0),onCentre:e=>{x(void 0),a(t=>({...t,mode:`local`,focus:e})),s(e)}})]})}function bse({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 VN(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 HN({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,j.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,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`font-medium wrap-anywhere`,children:t.label}),(0,j.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,j.jsxs)(`span`,{className:`flex items-center gap-1.5`,"data-testid":`concept-mastery`,children:[(0,j.jsx)(p5,{status:t.mastery.status}),(0,j.jsx)(`span`,{className:`text-muted-foreground text-[0.8125rem]`,children:h5(t.mastery)})]}):(0,j.jsx)(`span`,{className:`text-muted-foreground text-[0.8125rem]`,"data-testid":`concept-mastery`,children:`Not answered on yet`}),t.fromSessions&&(0,j.jsxs)(t9,{open:s,onOpenChange:e=>{r||(o(void 0),c(e))},children:[(0,j.jsx)(Zoe,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,className:`text-destructive ml-auto`,disabled:r,children:[(0,j.jsx)(dv,{}),`Remove from sessions`]})}),(0,j.jsxs)(n9,{children:[(0,j.jsxs)(r9,{children:[(0,j.jsxs)(a9,{className:`font-heading wrap-anywhere`,children:[`Remove “`,t.label,`” from your sessions?`]}),(0,j.jsx)(o9,{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,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:a}),(0,j.jsxs)(i9,{children:[(0,j.jsx)(c9,{disabled:r,children:`Cancel`}),(0,j.jsxs)(s9,{variant:`destructive`,disabled:r,onClick:e=>{e.preventDefault(),f()},children:[r&&(0,j.jsx)(yI,{}),`Remove`]})]})]})]})]}),u.length>0&&(0,j.jsx)(`ul`,{className:`flex flex-wrap gap-1.5`,"aria-label":`Links recorded in tutoring sessions`,children:u.map(e=>(0,j.jsx)(`li`,{children:(0,j.jsxs)(_8,{variant:`secondary`,className:`gap-1 pr-0.5`,children:[(0,j.jsx)(`span`,{className:`wrap-anywhere`,children:m(e)}),(0,j.jsx)(M,{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,j.jsx)(yv,{})})]})},`${e.from}|${e.to}|${e.kind}`))}),a&&!s&&(0,j.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,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,j.jsx)(`span`,{id:i,className:`text-muted-foreground text-xs`,children:e}),(0,j.jsxs)(ese,{value:t,onValueChange:n,children:[(0,j.jsx)(nse,{size:`sm`,"aria-labelledby":i,className:`max-w-56`,children:(0,j.jsx)(tse,{})}),(0,j.jsx)(rse,{position:`popper`,className:`max-h-80`,children:r.map(e=>(0,j.jsx)(ise,{value:e.value,disabled:e.disabled,children:e.text},e.value))})]})]})}function xse({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(()=>{BN(e).then(e=>{!t&&e.ok&&o(e.value)})},_9);return()=>{t=!0,clearTimeout(n)}},[r]),(0,j.jsxs)(gI,{open:t,onOpenChange:n,children:[(0,j.jsx)(_I,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,children:[(0,j.jsx)(G_,{}),`Find a concept`]})}),(0,j.jsx)(vI,{className:`w-80 p-0`,align:`start`,children:(0,j.jsxs)(Z5,{shouldFilter:!1,label:`Find a concept by name`,children:[(0,j.jsx)(Q5,{placeholder:`Concept name`,value:r,onValueChange:i,"aria-label":`Find a concept by name`}),(0,j.jsxs)($5,{children:[r.trim()&&(0,j.jsx)(e7,{children:`No concept matches.`}),a.map(t=>(0,j.jsx)(t7,{value:t.id,onSelect:()=>{n(!1),i(``),e(t)},children:(0,j.jsx)(`span`,{className:`truncate`,children:t.name})},t.id))]})]})})]})}function Sse({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,j.jsxs)(gI,{open:n,onOpenChange:r,children:[(0,j.jsx)(_I,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,children:[(0,j.jsx)(G_,{}),`Find a note`]})}),(0,j.jsx)(vI,{className:`w-80 p-0`,align:`start`,children:(0,j.jsxs)(Z5,{shouldFilter:!1,children:[(0,j.jsx)(Q5,{placeholder:`Title or path`,value:i,onValueChange:a,"aria-label":`Find a note by title or path`}),(0,j.jsxs)($5,{children:[i.trim()&&(0,j.jsx)(e7,{children:`No note matches.`}),o.map(e=>(0,j.jsx)(t7,{value:e.id,onSelect:()=>{r(!1),a(``),t(e)},children:(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:e.title}),(0,j.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.path})]})},e.id))]})]})})]})}function Cse({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,j.jsxs)(`div`,{className:`flex min-h-9 items-center gap-2 border-b px-3 py-1.5 text-sm`,children:[r&&(0,j.jsxs)(`span`,{className:`sr-only`,children:[r,`.`]}),(0,j.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:A(`min-w-0 flex-1`,n?`text-destructive`:`text-muted-foreground`),"data-testid":`notes-graph-status`,children:n??a}),t&&(0,j.jsx)(yI,{"aria-label":`Loading the graph`}),(0,j.jsx)(Tse,{isGlobal:i})]})}var wse=[`strength`,`focus`,`practicing`,`unsure`];function Tse({isGlobal:e}){return(0,j.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,j.jsxs)(`li`,{className:`flex items-center gap-1`,children:[(0,j.jsx)(`svg`,{viewBox:`-7 -7 14 14`,className:`size-3.5 overflow-visible`,children:(0,j.jsx)(w9,{kind:e,radius:5,emphasis:!1})}),t]},e)),wse.map(e=>(0,j.jsxs)(`li`,{className:`flex items-center gap-1`,"data-testid":`legend-mastery`,children:[(0,j.jsx)(`svg`,{viewBox:`-4 -4 8 8`,className:`size-2.5 overflow-visible`,children:(0,j.jsx)(C9,{status:e,radius:3})}),f5[e]]},e))]})}function C9({status:e,radius:t}){return(0,j.jsx)(`circle`,{r:t,className:A(`stroke-[1.5]`,dae[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,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(w9,{kind:e,radius:t,emphasis:n}),(0,j.jsx)(`g`,{transform:`translate(${t*.95} ${-t*.95})`,children:(0,j.jsx)(C9,{status:r,radius:i})})]})}switch(e){case`note`:return(0,j.jsx)(`circle`,{r:t,className:n?`fill-foreground`:`fill-muted-foreground`});case`concept`:return(0,j.jsx)(`polygon`,{points:`0,${-t*1.2} ${t*1.2},0 0,${t*1.2} ${-t*1.2},0`,className:A(`stroke-foreground stroke-[1.5]`,n?`fill-foreground`:`fill-card`)});case`tag`:return(0,j.jsx)(`rect`,{x:-t,y:-t,width:t*2,height:t*2,rx:1.5,className:A(`stroke-muted-foreground stroke-[1.5]`,n?`fill-muted-foreground`:`fill-muted`)});case`ghost`:return(0,j.jsx)(`circle`,{r:t,className:A(`fill-card stroke-muted-foreground stroke-[1.5]`,n&&`stroke-foreground`),strokeDasharray:`2 2`})}}function Ese(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 Dse({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(pse,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=Ese(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<=mse||c>=1.5,ee=d!==void 0,te=e=>Math.max(hse,e*2*c),ne=(0,v.useId)(),re=e.nodes[g];return e.nodes.length===0?(0,j.jsx)(`div`,{className:`flex-1`}):(0,j.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,j.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,j.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,j.jsxs)(`svg`,{viewBox:`0 0 ${t.width} ${t.height}`,className:`absolute inset-0 size-full`,"aria-hidden":`true`,children:[(0,j.jsx)(`defs`,{children:(0,j.jsx)(`marker`,{id:`${ne}-arrow`,viewBox:`0 0 10 10`,refX:`10`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,j.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,j.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:A(c?`stroke-foreground`:`stroke-muted-foreground`,ee&&!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(#${ne}-arrow)`:void 0,"data-testid":`notes-graph-edge`,"data-kind":a.kind},i)}),t.nodes.map((t,n)=>(0,j.jsxs)(`g`,{transform:`translate(${t.x} ${t.y})`,className:A(ee&&!D.has(n)&&`opacity-35`),children:[(n===d||e.focus===t.id&&d===void 0)&&(0,j.jsx)(`circle`,{r:t.radius+4,className:`fill-none stroke-foreground stroke-[1.5]`}),(0,j.jsx)(w9,{kind:e.nodes[n].kind,radius:t.radius,emphasis:D.has(n),mastery:e.nodes[n].mastery?.status})]},t.id))]}),(0,j.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,j.jsx)(`span`,{className:A(`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`,ee&&!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,j.jsx)(`div`,{role:`group`,"aria-label":`Notes graph. Arrow keys move between nodes by where they're drawn; Enter opens a note.`,"aria-describedby":ne,className:`absolute inset-0`,children:t.nodes.map((t,n)=>{let r=e.nodes[n],a=te(t.radius);return(0,j.jsx)(`button`,{ref:e=>{e?_.current.set(n,e):_.current.delete(n)},type:`button`,tabIndex:n===g?0:-1,"aria-label":gse(r,o[n].size),"aria-pressed":n===d,className:A(`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,j.jsx)(`p`,{id:ne,className:`sr-only`,"aria-live":`polite`,"data-testid":`notes-graph-neighbours`,children:re&&m!==void 0?Ose(e,o[g],re):``}),(0,j.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,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Zoom out`,onClick:()=>p(c/m9),disabled:c<=h9,children:(0,j.jsx)(g_,{})}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Fit to the window`,onClick:()=>p(u()),children:(0,j.jsx)(u_,{})}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Zoom in`,onClick:()=>p(c*m9),disabled:c>=g9,children:(0,j.jsx)(z_,{})})]})]})}function Ose(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 kse({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}),WN(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,j.jsx)(T7,{open:!!e,onOpenChange:t,children:(0,j.jsxs)(E7,{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,j.jsxs)(D7,{children:[(0,j.jsx)(O7,{className:`font-heading wrap-anywhere`,children:a?.title??`Note`}),(0,j.jsx)(k7,{className:`wrap-anywhere`,children:a?`${a.path} · read-only`:r?.error?`Couldn't open this note.`:`Loading…`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 pb-6`,children:[r?.error&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:r.error}),!a&&!r?.error&&(0,j.jsx)(yI,{"aria-label":`Loading the note`}),a&&(0,j.jsxs)(j.Fragment,{children:[(a.tags.length>0||a.aliases.length>0)&&(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[a.tags.map(e=>(0,j.jsxs)(_8,{variant:`secondary`,children:[`#`,e]},e)),a.aliases.length>0&&(0,j.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`Also called `,a.aliases.join(`, `)]})]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,onClick:()=>n(a.id),children:`Show the graph around this note`}),(0,j.jsx)(`div`,{className:`text-sm leading-relaxed wrap-anywhere whitespace-pre-wrap`,"data-testid":`note-body`,children:a.body})]})]})]})})}function Ase({custom:e,canEdit:t,onChange:n}){let[r,i]=(0,v.useState)(!1);return(0,j.jsxs)(`section`,{className:`flex flex-col gap-3`,"aria-labelledby":`custom-providers-heading`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(`h2`,{id:`custom-providers-heading`,className:`text-sm font-semibold`,children:`OpenAI-compatible providers`}),(0,j.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,j.jsx)(Nse,{provider:e,canEdit:t,onChange:n},e.id)),t&&(r?(0,j.jsx)(Mse,{onDone:()=>i(!1),onChange:n}):(0,j.jsx)(M,{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.`,jse=e=>[...new Set(e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean))];function Mse({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,j.jsxs)(`form`,{onSubmit:async r=>{r.preventDefault(),d(!0),p(void 0);let a=await kP({name:n,baseUrl:i.trim()||null,...o.trim()?{key:o.trim()}:{},models:jse(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 MP(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,j.jsxs)($8,{children:[(0,j.jsx)(e5,{htmlFor:`custom-new-name`,children:`Provider name`}),(0,j.jsx)(r5,{id:`custom-new-name`,value:n,onChange:e=>r(e.target.value),disabled:u,autoComplete:`off`,placeholder:`DeepSeek`})]}),(0,j.jsxs)($8,{children:[(0,j.jsx)(e5,{htmlFor:`custom-new-url`,children:`API base URL`}),(0,j.jsx)(t5,{id:`custom-new-url-help`,children:T9}),(0,j.jsx)(r5,{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,j.jsxs)($8,{children:[(0,j.jsx)(e5,{htmlFor:`custom-new-key`,children:`API key`}),(0,j.jsx)(t5,{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,j.jsx)(r5,{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,j.jsxs)($8,{children:[(0,j.jsx)(e5,{htmlFor:`custom-new-models`,children:`Model ids`}),(0,j.jsx)(t5,{id:`custom-new-models-help`,children:`One per line, as the provider names them. You can also pick from its list after saving.`}),(0,j.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,j.jsx)(n5,{children:f}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsxs)(M,{type:`submit`,disabled:u||!n.trim(),children:[u&&(0,j.jsx)(yI,{"aria-hidden":`true`}),`Save provider`]}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,disabled:u,onClick:e,children:`Cancel`})]})]})}function Nse({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…`,()=>AP(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,j.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-lg border p-3`,"aria-labelledby":`${p}-name`,children:[(0,j.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,j.jsx)(`h3`,{id:`${p}-name`,className:`text-sm font-semibold wrap-anywhere`,children:e.name}),(0,j.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Chat Completions`})]}),(0,j.jsxs)(`div`,{className:`text-muted-foreground flex flex-col gap-0.5 text-xs wrap-anywhere`,children:[(0,j.jsx)(`p`,{children:y}),_.error&&(0,j.jsx)(`p`,{className:`text-destructive`,children:_.error}),(0,j.jsx)(`p`,{children:b})]}),r?(0,j.jsx)(Pse,{provider:e,onDone:()=>i(!1),onChange:n}):t&&(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(M,{size:`sm`,variant:`outline`,disabled:s,onClick:()=>i(!0),children:`Edit`}),_.source===`saved`&&_.env&&(0,j.jsxs)(M,{size:`sm`,variant:`outline`,disabled:s,onClick:()=>void m(`Resetting the URL…`,()=>AP(e.id,{baseUrl:null})),children:[`Use `,e.envNames.baseUrl]}),!a&&(0,j.jsx)(M,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:s,onClick:()=>o(!0),children:`Remove provider`})]}),a&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Remove `,e.name,` and its saved key? Replies it wrote stay in your sessions.`]}),(0,j.jsx)(M,{type:`button`,variant:`destructive`,size:`sm`,disabled:s,onClick:()=>void m(`Removing…`,()=>jP(e.id)).then(e=>e&&o(!1)),children:`Yes, remove`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:s,onClick:()=>o(!1),children:`Keep`})]}),(0,j.jsx)(Ise,{provider:e,canEdit:t,busy:s,onRemove:e=>void h(g.filter(t=>t.id!==e)),onChange:n}),t&&(0,j.jsx)(Lse,{provider:e,busy:s,onAdd:e=>h([...g,e])}),(0,j.jsx)(Rse,{provider:e,busy:s,onRefresh:()=>void m(`Loading the provider's models…`,()=>MP(e.id))}),s&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` `,l]}),d&&(0,j.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 Pse({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 AP(e.id,r);if(u(!1),!i.ok)return f(i.error);n(i.value),t()};return(0,j.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,j.jsxs)($8,{children:[(0,j.jsx)(e5,{htmlFor:`${p}-name`,children:`Provider name`}),(0,j.jsx)(r5,{id:`${p}-name`,value:r,onChange:e=>i(e.target.value),disabled:l,autoComplete:`off`})]}),(0,j.jsxs)($8,{children:[(0,j.jsx)(e5,{htmlFor:`${p}-url`,children:`API base URL`}),(0,j.jsxs)(t5,{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,j.jsx)(r5,{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,j.jsxs)($8,{children:[(0,j.jsx)(e5,{htmlFor:`${p}-key`,children:`New API key`}),(0,j.jsx)(t5,{id:`${p}-key-help`,children:`Leave it empty to keep the current key.`}),(0,j.jsx)(r5,{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,j.jsx)(n5,{children:d}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsxs)(M,{type:`submit`,size:`sm`,disabled:l||!r.trim(),children:[l&&(0,j.jsx)(yI,{"aria-hidden":`true`}),`Save`]}),!m&&e.key.source===`saved`&&(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`outline`,disabled:l,onClick:()=>void h({key:null}),children:`Remove saved key`}),(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`ghost`,disabled:l,onClick:t,children:`Cancel`})]})]})}var Fse={unverified:{text:`Not tested`,className:``},verified:{text:`Works`,className:`text-success`},failed:{text:`Test failed`,className:`text-destructive`}};function Ise({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,j.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 NP(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,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,j.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,j.jsx)(`ul`,{className:`flex flex-col gap-2`,"aria-label":`${e.name} models`,children:e.models.map(i=>{let o=Fse[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,j.jsxs)(`li`,{className:`flex flex-col gap-1 rounded-md border px-2 py-1.5 text-sm`,"aria-label":i.id,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`min-w-0 flex-1 font-mono text-xs wrap-anywhere`,children:i.id}),(0,j.jsx)(_8,{variant:`outline`,className:o.className,children:o.text})]}),d&&(0,j.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:d}),!c&&i.verification.status===`failed`&&i.verification.message&&(0,j.jsx)(`span`,{className:`text-destructive text-xs`,children:i.verification.message}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[a===i.id?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1.5 text-xs`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Testing `,i.id,`…`]}),(0,j.jsx)(M,{size:`xs`,variant:`outline`,onClick:()=>l.current?.abort(),children:`Cancel test`})]}):(0,j.jsx)(M,{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,j.jsx)(M,{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,j.jsx)(`span`,{className:c.kind===`ok`?`text-success text-xs`:`text-destructive text-xs`,role:`status`,children:c.text})]},i.id)})})]})}function Lse({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,j.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,j.jsxs)($8,{children:[(0,j.jsx)(e5,{htmlFor:d,children:`Add a model id`}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(r5,{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,j.jsx)(M,{type:`submit`,size:`sm`,variant:`outline`,disabled:t||!r.trim(),children:`Add`})]}),m.length>0&&(0,j.jsx)(`datalist`,{id:f,children:m.slice(0,500).map(e=>(0,j.jsx)(`option`,{value:e},e))})]}),l&&(0,j.jsx)(n5,{children:l}),(0,j.jsxs)(`details`,{className:`text-sm`,children:[(0,j.jsx)(`summary`,{className:`text-muted-foreground cursor-pointer text-xs`,children:`Advanced: limits`}),(0,j.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2`,children:[(0,j.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,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsxs)($8,{className:`flex-[1_1_8rem]`,children:[(0,j.jsx)(e5,{htmlFor:`${d}-context`,children:`Context length`}),(0,j.jsx)(r5,{id:`${d}-context`,inputMode:`numeric`,value:a,onChange:e=>o(e.target.value),disabled:t,placeholder:`Unknown`})]}),(0,j.jsxs)($8,{className:`flex-[1_1_8rem]`,children:[(0,j.jsx)(e5,{htmlFor:`${d}-output`,children:`Max output tokens`}),(0,j.jsx)(r5,{id:`${d}-output`,inputMode:`numeric`,value:s,onChange:e=>c(e.target.value),disabled:t,placeholder:`Provider default`})]})]})]})]})]})}function Rse({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,j.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,j.jsx)(`p`,{className:r.state===`failed`||r.state===`stale`?`text-destructive text-xs`:`text-muted-foreground text-xs`,children:a}),(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`outline`,className:`self-start`,disabled:t||!e.baseUrl.value,onClick:n,children:`Refresh models`})]})}var zse={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 Bse({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),_P().then(e=>{t||(e.ok?i(e.value):o(e.error))}),()=>{t=!0}},[e]),(0,j.jsx)(T7,{open:e,onOpenChange:t,children:(0,j.jsxs)(E7,{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,j.jsxs)(D7,{children:[(0,j.jsx)(O7,{className:`font-heading`,children:`Model providers`}),(0,j.jsx)(k7,{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,j.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-4`,"aria-live":`polite`,children:[a&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:a}),!r&&!a&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Loading providers…`]}),r&&!r.canEdit&&(0,j.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,j.jsx)(`code`,{children:`mivra auth set <provider>`}),`.`]}),r?.chatgpt&&(0,j.jsx)(Use,{chatgpt:r.chatgpt,canEdit:r.canEdit,onChange:i}),r?.providers.map(e=>(0,j.jsx)(Vse,{provider:e,canEdit:r.canEdit,onChange:i},e.id)),r&&(0,j.jsx)(Ase,{custom:r.custom,canEdit:r.canEdit,onChange:i})]})]})})}function Vse({provider:e,canEdit:t,onChange:n}){let r=zse[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 EP(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 vP(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 yP(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,j.jsxs)(`section`,{className:`flex flex-col gap-2 rounded-lg border p-3`,"aria-labelledby":`${m}-name`,children:[(0,j.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,j.jsx)(`h2`,{id:`${m}-name`,className:`text-sm font-semibold`,children:e.label}),(0,j.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,j.jsx)(Lg,{className:`size-3`,"aria-hidden":!0})]})]}),(0,j.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,j.jsx)(`form`,{onSubmit:g,children:(0,j.jsxs)($8,{"data-invalid":f?.kind===`error`,children:[(0,j.jsxs)(e5,{htmlFor:m,children:[e.label,` API key`]}),(0,j.jsxs)(t5,{id:`${m}-description`,children:[`Paste a key from your `,e.label,` account.`]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(r5,{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,j.jsx)(M,{type:`submit`,disabled:c||!o.trim(),children:c?`Saving…`:`Save`}),i&&(0,j.jsx)(M,{type:`button`,variant:`ghost`,disabled:c,onClick:()=>a(!1),children:`Cancel`})]}),f?.kind===`error`&&(0,j.jsx)(n5,{id:`${m}-status`,children:f.text})]})}):e.source!==null&&(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(M,{size:`sm`,variant:`outline`,disabled:c,onClick:()=>void h(),children:`Check`}),t&&e.source===`saved`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(M,{size:`sm`,variant:`outline`,disabled:c,onClick:()=>a(!0),children:`Replace`}),(0,j.jsx)(M,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:c,onClick:()=>void _(),children:`Remove`})]})]}),c&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` `,u]}),f&&!(y&&f.kind===`error`)&&(0,j.jsx)(`p`,{id:`${m}-status`,className:f.kind===`ok`?`text-success text-sm`:`text-destructive text-sm`,children:f.text})]})}var Hse=1500;function Use({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(()=>{_P().then(e=>{e.ok&&!e.value.chatgpt?.pending&&(n(e.value),f(void 0),window.dispatchEvent(new Event(hP)))})},Hse);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…`,()=>bP(e));if(!r){t?.close();return}t?(t.opener=null,t.location.href=r.url):f(r.url);let i=await _P();i.ok&&n(i.value)},_=async e=>{if(e.preventDefault(),!l.trim())return;let t=await h(`Finishing sign-in…`,()=>xP(l));t&&(u(``),f(void 0),n(t))},y=async()=>{let e=await h(`Cancelling…`,SP);f(void 0),e&&n(e)},b=async()=>{let e=await h(`Disconnecting…`,CP);e&&n(e)},x=async()=>{let e=await h(`Checking the connection…`,TP);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,j.jsxs)(`section`,{className:`flex flex-col gap-2 rounded-lg border p-3`,"aria-labelledby":`${p}-name`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,j.jsxs)(`h2`,{id:`${p}-name`,className:`inline-flex items-center gap-1.5 text-sm font-semibold`,children:[(0,j.jsx)(c7,{className:`size-4`}),`ChatGPT`]}),e.signedIn&&(0,j.jsx)(_8,{variant:`secondary`,children:`Connected`})]}),e.signedIn?(0,j.jsxs)(`p`,{className:`text-sm`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:e.name??`Connected with ChatGPT`}),e.email&&(0,j.jsx)(`span`,{className:`text-muted-foreground block text-xs`,children:e.email})]}):!e.pending&&(0,j.jsx)(`p`,{className:`text-sm font-medium`,children:e.previous&&e.notice?`Reconnect to ChatGPT`:`Use your ChatGPT plan`}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:S}),e.notice&&!e.pending&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:e.notice}),e.pending?(0,j.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Waiting for you to approve Mivra in the ChatGPT tab…`]}),d&&(0,j.jsx)(`a`,{href:d,target:`_blank`,rel:`noreferrer`,className:`text-sm underline underline-offset-2`,children:`Open the ChatGPT sign-in page`}),(0,j.jsx)(`form`,{onSubmit:_,children:(0,j.jsxs)($8,{"data-invalid":s?.kind===`error`,children:[(0,j.jsx)(e5,{htmlFor:`${p}-address`,children:m?`Browser showing an error page?`:`Paste the address from the ChatGPT tab`}),(0,j.jsx)(t5,{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,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(r5,{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,j.jsx)(M,{type:`submit`,disabled:r||!l.trim(),children:`Finish`}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,disabled:r,onClick:()=>void y(),children:`Cancel`})]}),s?.kind===`error`&&(0,j.jsx)(n5,{id:`${p}-status`,children:s.text})]})})]}):e.signedIn?(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(l7,{primary:!0}),(0,j.jsx)(M,{size:`sm`,variant:`outline`,disabled:r,onClick:()=>void x(),children:`Check`}),(0,j.jsx)(M,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:r,onClick:()=>void b(),children:`Disconnect`})]}):(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,j.jsx)(Uae,{busy:r,disabled:r,onClick:()=>void g()}),e.previous&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex flex-wrap items-center gap-x-2 text-xs`,children:[`Signs in as `,e.previous,`.`,(0,j.jsx)(M,{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,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` `,a]}),s&&!(e.pending&&s.kind===`error`)&&(0,j.jsx)(`p`,{id:`${p}-status`,className:s.kind===`ok`?`text-success text-sm`:`text-destructive text-sm`,children:s.text})]})}var Wse=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,j.jsxs)(M,{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,j.jsx)(Gh,{"aria-hidden":`true`}):(0,j.jsx)(xg,{"aria-hidden":`true`}),r?`Copied`:`Copy`]})}function Gse(){let[e,t]=(0,v.useState)(!1),{origin:n,hostname:r}=window.location,i=`mivra link --server ${n}`;return(0,j.jsxs)(`section`,{"aria-labelledby":`settings-cli`,className:`flex flex-col gap-2 px-4 pb-4`,children:[(0,j.jsx)(`h3`,{id:`settings-cli`,className:`font-heading text-base font-medium`,children:`Connect a CLI`}),(0,j.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,j.jsxs)(`div`,{className:`bg-sunken flex min-w-0 items-center gap-2 rounded-md py-1 pr-1 pl-3`,children:[(0,j.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,j.jsx)(D9,{text:i,label:`link command`})]}),Wse.has(r)&&(0,j.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,j.jsx)(`code`,{className:`font-mono text-xs`,children:`tailscale serve`}),` `,`name.`]}),(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(r5,{readOnly:!0,"aria-label":`Token`,type:e?`text`:`password`,value:eN,className:`min-w-0 flex-1 font-mono text-xs`,onFocus:e=>e.currentTarget.select()}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,"aria-pressed":e,"aria-label":e?`Hide token`:`Show token`,onClick:()=>t(e=>!e),children:e?(0,j.jsx)(aee,{"aria-hidden":`true`}):(0,j.jsx)(oee,{"aria-hidden":`true`})}),(0,j.jsx)(D9,{text:eN,label:`token`,onFail:()=>t(!0)})]}),(0,j.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,j.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra token`}),` prints it too, and `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check`}),` there needs no token.`]})]})}var Kse={lesson:{title:`Lesson generation`,label:`Lesson model`,description:`Writes each lesson's outline and sections in the background.`}};function qse({open:e,onOpenChange:t}){return(0,j.jsx)(T7,{open:e,onOpenChange:t,children:(0,j.jsxs)(E7,{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,j.jsxs)(D7,{children:[(0,j.jsx)(O7,{className:`font-heading`,children:`Settings`}),(0,j.jsx)(k7,{children:`Settings apply from the next reply or lesson; anything already being written keeps its model.`})]}),e&&(0,j.jsx)(Jse,{}),e&&(0,j.jsxs)(`section`,{"aria-labelledby":`settings-usage`,className:`flex flex-col gap-2 px-4 pb-4`,children:[(0,j.jsx)(`h3`,{id:`settings-usage`,className:`font-heading text-base font-medium`,children:`Usage`}),(0,j.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,j.jsx)(`div`,{children:(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>window.dispatchEvent(new Event(`mivra:open-usage`)),children:`Open Usage`})})]}),e&&(0,j.jsx)(Gse,{})]})})}function Jse(){let e=_7(),[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)();(0,v.useEffect)(()=>{let e=!1;return sP().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,j.jsxs)(`section`,{"aria-labelledby":`settings-models`,className:`flex flex-col gap-4 px-4 pb-4`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(`h3`,{id:`settings-models`,className:`font-heading text-base font-medium`,children:`Models`}),(0,j.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,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:r}),!t&&!r&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Loading…`]}),t?.map(t=>(0,j.jsx)(Yse,{task:t,picker:e,onChange:a},t.id))]})}function Yse({task:e,picker:t,onChange:n}){let{title:r,label:i,description:a}=Kse[e.id],[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(),u=t.view,d=e=>g7(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,j.jsxs)(`div`,{role:`group`,"aria-labelledby":`task-${e.id}`,className:`flex flex-col gap-2 rounded-md border p-3`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,j.jsx)(`h4`,{id:`task-${e.id}`,className:`text-sm font-medium`,children:r}),(0,j.jsx)(_8,{variant:e.override?`default`:`secondary`,children:e.override?`Own model`:`Uses main model`})]}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:a}),e.override?(0,j.jsx)(`p`,{className:`text-sm`,children:`Always uses the model below, whatever the main model is.`}):(0,j.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,j.jsxs)(j2,{variant:`destructive`,children:[(0,j.jsxs)(M2,{children:[d(e.effective),` can't be used for this task`]}),(0,j.jsxs)(N2,{children:[(0,j.jsx)(`p`,{children:e.unavailable}),(0,j.jsx)(`p`,{children:`Choose another model, or use the main model. Until then, this task fails rather than switching models.`})]})]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(v7,{state:t,disabled:o,label:i,value:e.effective,unavailable:null,onChoose:t=>void f(()=>cP(e.id,t))}),e.override&&(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:o,onClick:()=>void f(()=>lP(e.id)),children:`Use main model`})]}),c&&(0,j.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}),Xse=new Intl.NumberFormat(void 0,{notation:`compact`,maximumFractionDigits:1}),A9=e=>e===null?`Unknown`:k9.format(e),j9=e=>e===null?`Unknown`:Xse.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 Zse({open:e,onOpenChange:t}){return(0,j.jsx)(T7,{open:e,onOpenChange:t,children:(0,j.jsxs)(E7,{className:A(`w-full overflow-y-auto sm:max-w-2xl`,s5),onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-usage-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,j.jsxs)(D7,{className:c5,children:[(0,j.jsx)(O7,{className:l5,children:`Usage`}),(0,j.jsx)(k7,{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,j.jsx)(Qse,{})]})})}function Qse(){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 uP(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,j.jsxs)(`div`,{className:`flex flex-col gap-6 px-5 py-5`,children:[(0,j.jsx)(`div`,{role:`radiogroup`,"aria-label":`Date range`,className:u5,children:O9.map(n=>(0,j.jsx)(M,{type:`button`,size:`sm`,role:`radio`,"aria-checked":e===n.id,variant:`ghost`,className:d5(e===n.id),onClick:()=>t(n.id),children:n.label},n.id))}),i&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:i}),!n&&!i&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Loading…`]}),n&&(0,j.jsx)($se,{view:n,onChanged:c})]})}function $se({view:e,onChanged:t}){let{totals:n,api:r,subscription:i}=e,a=n.calls===0;return(0,j.jsxs)(j.Fragment,{children:[(0,j.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,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`section`,{"aria-label":`Totals`,className:`grid gap-x-6 gap-y-4 sm:grid-cols-3`,children:[(0,j.jsxs)(F9,{label:`Tokens`,value:j9(n.total),children:[(0,j.jsxs)(`span`,{children:[A9(n.input),` in · `,A9(n.output),` out`]}),n.cacheRead!==null&&(0,j.jsxs)(`span`,{children:[`of input, `,A9(n.cacheRead),` cached`]}),n.reasoning!==null&&(0,j.jsxs)(`span`,{children:[`of output, `,A9(n.reasoning),` reasoning`]}),n.unreported>0&&(0,j.jsxs)(`span`,{children:[N9(n.unreported,`call`),` didn't report tokens`]})]}),(0,j.jsxs)(F9,{label:`API spending`,value:r.calls===0?`None`:nce(r),children:[(0,j.jsx)(`span`,{children:N9(r.calls,`API call`)}),r.calls>0&&(0,j.jsx)(`span`,{children:P9(r)})]}),(0,j.jsxs)(F9,{label:`ChatGPT plan`,value:i.calls===0?`Not used`:j9(i.total),children:[i.calls>0&&(0,j.jsxs)(`span`,{children:[`tokens in `,N9(i.calls,`call`),`, billed to your plan`]}),(0,j.jsxs)(`span`,{children:[`Limits and plan usage: `,(0,j.jsx)(l7,{})]})]})]}),i.calls>0&&(0,j.jsx)(rce,{totals:i}),(n.incomplete>0||n.unreported>0)&&(0,j.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,j.jsx)(ice,{days:e.days}),(0,j.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,j.jsx)(I9,{title:`By provider`,rows:e.byProvider.map(e=>({key:e.key,name:e.label,totals:e,billing:e.billing}))}),(0,j.jsx)(I9,{title:`By activity`,rows:e.byKind.map(e=>({key:e.key,name:e.label,detail:ece[e.kind],totals:e}))}),(0,j.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:`${tce[e.kind]} · ${e.label} · ${new Date(e.startedAt).toLocaleString()}${e.status===`completed`?``:` · ${e.status}`}`,totals:e,billing:e.billing}))}),(0,j.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,j.jsx)(oce,{prices:e.prices,onChanged:t}),(0,j.jsx)(cce,{disabled:!e.since,onCleared:t})]})}var ece={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`},tce={chat:`Chat`,continuation:`Continuation`,lesson:`Lesson`,distillation:`Note reading`,review:`Code review`,test:`Test model`};function nce(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,j.jsxs)(`div`,{role:`group`,"aria-label":e,className:`flex min-w-0 flex-col gap-1`,children:[(0,j.jsx)(`span`,{className:o5,children:e}),(0,j.jsx)(`span`,{className:`font-heading text-[1.85rem] leading-tight font-normal tracking-[-0.02em] tabular-nums wrap-anywhere`,children:t}),(0,j.jsx)(`div`,{className:`text-muted-foreground flex flex-col text-[0.8125rem] leading-snug`,children:n})]})}function rce({totals:e}){let[t,n]=(0,v.useState)(!1);return(0,j.jsxs)(X8,{open:t,onOpenChange:n,className:`border-border-strong rounded-lg border`,children:[(0,j.jsx)(Z8,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`ghost`,className:`w-full justify-between`,children:[`Estimated API equivalent`,(0,j.jsx)(qh,{"aria-hidden":!0,className:A(`transition-transform`,t&&`rotate-180`)})]})}),(0,j.jsxs)(Q8,{className:`flex flex-col gap-1 px-3 pb-3 text-sm`,children:[(0,j.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,j.jsx)(`p`,{className:`text-muted-foreground`,children:`None of these models has a published API price to compare with.`}):(0,j.jsxs)(`p`,{children:[(0,j.jsxs)(`span`,{className:`font-medium tabular-nums`,children:[`≈`,M9(e.apiEquivalent)]}),e.uncompared>0&&(0,j.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,j.jsxs)(`section`,{"aria-labelledby":`usage-daily`,className:`flex flex-col gap-2`,children:[(0,j.jsx)(`h3`,{id:`usage-daily`,className:o5,children:`Tokens per day`}),(0,j.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,j.jsx)(`div`,{role:`listitem`,"aria-label":r,title:r,className:`group flex h-full min-w-1 flex-1 items-end`,children:(0,j.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,j.jsxs)(`div`,{className:`text-muted-foreground flex justify-between gap-2 font-mono text-[0.72rem] tabular-nums`,children:[(0,j.jsx)(`span`,{children:new Date(`${e[0].day}T00:00:00`).toLocaleDateString()}),(0,j.jsxs)(`span`,{children:[`Peak `,j9(n)]}),(0,j.jsx)(`span`,{children:new Date(`${e.at(-1).day}T00:00:00`).toLocaleDateString()})]})]})}function ace(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,j.jsxs)(`section`,{"aria-labelledby":r,className:`flex flex-col gap-2`,children:[(0,j.jsx)(`h3`,{id:r,className:`font-heading text-[1.05rem] font-medium`,children:e}),t&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:t}),(0,j.jsx)(`div`,{className:`overflow-x-auto`,children:(0,j.jsxs)(`table`,{className:`w-full text-sm`,"aria-labelledby":r,children:[(0,j.jsx)(`thead`,{className:`text-muted-foreground text-left font-mono text-[0.6875rem] tracking-[0.09em] uppercase`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{scope:`col`,className:`pb-2 pr-2 font-medium`,children:`Name`}),(0,j.jsx)(`th`,{scope:`col`,className:`pb-2 pr-2 text-right font-medium`,children:`Tokens`}),(0,j.jsx)(`th`,{scope:`col`,className:`pb-2 pr-2 text-right font-medium`,children:`Calls`}),(0,j.jsx)(`th`,{scope:`col`,className:`pb-2 text-right font-medium`,children:`Cost`})]})}),(0,j.jsx)(`tbody`,{children:n.map(e=>(0,j.jsxs)(`tr`,{className:`border-t align-top`,children:[(0,j.jsxs)(`th`,{scope:`row`,className:`py-2.5 pr-2 text-left font-semibold`,children:[(0,j.jsx)(`span`,{className:`block break-words`,children:e.name}),e.detail&&(0,j.jsx)(`span`,{className:`text-muted-foreground block text-xs font-normal`,children:e.detail})]}),(0,j.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,j.jsxs)(`span`,{className:`text-muted-foreground block text-xs`,children:[`+`,e.totals.unreported,` unknown`]})]}),(0,j.jsx)(`td`,{className:`py-2.5 pr-2 text-right font-mono text-[0.8125rem] tabular-nums`,children:e.totals.calls}),(0,j.jsx)(`td`,{className:`py-2.5 text-right text-xs`,children:ace(e)})]},e.key))})]})})]})}var L9=[{key:`input`,label:`Input`},{key:`output`,label:`Output`},{key:`cacheRead`,label:`Cached input`}];function oce({prices:e,onChanged:t}){let[n,r]=(0,v.useState)(!1);return(0,j.jsxs)(X8,{open:n,onOpenChange:r,className:`border-border-strong rounded-lg border`,children:[(0,j.jsx)(Z8,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`ghost`,className:`w-full justify-between`,children:[`Advanced: custom prices`,(0,j.jsx)(qh,{"aria-hidden":!0,className:A(`transition-transform`,n&&`rotate-180`)})]})}),(0,j.jsxs)(Q8,{className:`flex flex-col gap-3 px-3 pb-3`,children:[(0,j.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,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No models yet.`}),e.map(e=>(0,j.jsx)(sce,{price:e,onChanged:t},e.model))]})]})}function sce({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 fP(e.model,n);o(!1),r.ok?t():c(r.error)};return(0,j.jsxs)(`div`,{role:`group`,"aria-labelledby":l,className:`flex flex-col gap-2 border-t pt-3`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,j.jsx)(`span`,{id:l,className:`text-sm font-medium break-all`,children:e.label}),(0,j.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,j.jsx)(_8,{variant:`secondary`,children:e.providerLabel}),e.custom&&(0,j.jsx)(_8,{children:`Custom price`})]})]}),(0,j.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,j.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[L9.map(t=>(0,j.jsxs)(`label`,{className:`flex w-28 flex-col gap-1 text-xs`,children:[t.label,(0,j.jsx)(r5,{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,j.jsx)(M,{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,j.jsx)(M,{type:`button`,size:`sm`,variant:`outline`,disabled:a,onClick:()=>void d(null),children:`Remove`})]}),s&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:s})]})}function cce({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 dP();if(a(!1),!e.ok)return s(e.error);r(!1),t()};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(`div`,{children:(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:e,onClick:()=>r(!0),children:`Clear usage history`})}),(0,j.jsx)(G5,{open:n,onOpenChange:r,children:(0,j.jsxs)(K5,{children:[(0,j.jsxs)(q5,{children:[(0,j.jsx)(Y5,{children:`Clear usage history?`}),(0,j.jsx)(X5,{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,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:o}),(0,j.jsxs)(J5,{children:[(0,j.jsx)(M,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Cancel`}),(0,j.jsx)(M,{type:`button`,variant:`destructive`,disabled:i,onClick:()=>void c(),children:`Clear usage history`})]})]})})]})}var R9=768;function lce(){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 uce=`sidebar_state`,dce=604800,fce=`16rem`,pce=`18rem`,mce=`3rem`,hce=`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 gce({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=lce(),[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=`${uce}=${t}; path=/; max-age=${dce}`},[n,f]),m=v.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);v.useEffect(()=>{let e=e=>{e.key===hce&&(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,j.jsx)(z9.Provider,{value:g,children:(0,j.jsx)(R7,{delayDuration:0,children:(0,j.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":fce,"--sidebar-width-icon":mce,...i},className:A(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})})}function _ce({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,j.jsx)(`div`,{"data-slot":`sidebar`,className:A(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?(0,j.jsx)(T7,{open:c,onOpenChange:l,...a,children:(0,j.jsxs)(E7,{"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":pce},side:e,children:[(0,j.jsxs)(D7,{className:`sr-only`,children:[(0,j.jsx)(O7,{children:`Sidebar`}),(0,j.jsx)(k7,{children:`Displays the mobile sidebar.`})]}),(0,j.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,j.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,j.jsx)(`div`,{"data-slot":`sidebar-gap`,className:A(`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,j.jsx)(`div`,{"data-slot":`sidebar-container`,className:A(`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,j.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 vce({className:e,onClick:t,...n}){let{toggleSidebar:r}=B9();return(0,j.jsxs)(M,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:A(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,j.jsx)(O_,{}),(0,j.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function yce({className:e,...t}){let{toggleSidebar:n}=B9();return(0,j.jsx)(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:n,title:`Toggle Sidebar`,className:A(`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 bce({className:e,...t}){return(0,j.jsx)(`main`,{"data-slot":`sidebar-inset`,className:A(`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 xce({className:e,...t}){return(0,j.jsx)(r5,{"data-slot":`sidebar-input`,"data-sidebar":`input`,className:A(`h-8 w-full bg-background shadow-none`,e),...t})}function Sce({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:A(`flex flex-col gap-2 p-2`,e),...t})}function Cce({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:A(`flex flex-col gap-2 p-2`,e),...t})}function wce({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:A(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function Tce({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:A(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Ece({className:e,asChild:t=!1,...n}){let r=t?Gt:`div`;return(0,j.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:A(`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,j.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:A(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function H9({className:e,...t}){return(0,j.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:A(`group/menu-item relative`,e),...t})}var Dce=se(`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?Gt:`button`,{isMobile:c,state:l}=B9(),u=(0,j.jsx)(s,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:A(Dce({variant:n,size:r}),a),...o});if(!i)return u;typeof i==`string`&&(i={children:i});let d=l!==`collapsed`||c;return(0,j.jsxs)(z7,{open:!d&&void 0,children:[(0,j.jsx)(B7,{asChild:!0,children:u}),(0,j.jsx)(V7,{side:`right`,align:`center`,hidden:d,...i})]})}function Oce({className:e,asChild:t=!1,showOnHover:n=!1,...r}){let i=t?Gt:`button`;return(0,j.jsx)(i,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:A(`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 kce({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:A(`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:v_},{value:`light`,label:`Light`,Icon:av},{value:`dark`,label:`Dark`,Icon:b_}];function Ace({choice:e,onChange:t}){let{label:n,Icon:r}=W9.find(t=>t.value===e)??W9[0];return(0,j.jsx)(V9,{children:(0,j.jsx)(H9,{children:(0,j.jsxs)(n7,{children:[(0,j.jsx)(r7,{asChild:!0,children:(0,j.jsxs)(U9,{tooltip:`Theme`,"aria-label":`Theme: ${n}`,children:[(0,j.jsx)(r,{}),(0,j.jsx)(`span`,{children:n})]})}),(0,j.jsx)(i7,{side:`top`,align:`start`,children:(0,j.jsx)(o7,{value:e,onValueChange:e=>t(e),children:W9.map(({value:e,label:t,Icon:n})=>(0,j.jsxs)(s7,{value:e,children:[(0,j.jsx)(n,{}),t]},e))})})]})})})}var G9=`mivra-theme`,K9=()=>window.matchMedia(`(prefers-color-scheme: dark)`);function jce(){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 Mce(){let[e,t]=(0,v.useState)(jce);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 Nce(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 Pce=80,Fce=e=>{let t=e.replace(/\s+/g,` `).trim();return t.length>Pce?`${t.slice(0,79)}…`:t};function Ice(e){let t=[...e?.focus??[],...e?.unsure??[]].map(e=>Fce(e.concept)).filter(Boolean),n=[...new Set(t)].slice(0,6);return[`Write me a concise study guide for this course in Markdown.`,`Follow the syllabus in order: for each topic, the key ideas, short definitions, one small example where it helps, and a common mistake to avoid.`,`Ground it in the syllabus and the course's attached sources, and name the source a point comes from.`,n.length>0?`Give extra space to what I've found hard: ${n.join(`, `)}.`:`Give extra space to anything my answers so far show I find hard.`,`End with a short checklist of what to be able to do.`].join(` `)}var Lce=120;function Rce({onRename:e,onDelete:t}){let n=(0,v.useRef)(!1);return(0,j.jsxs)(n7,{children:[(0,j.jsx)(r7,{asChild:!0,children:(0,j.jsx)(Oce,{showOnHover:!0,"aria-label":`Session actions`,children:(0,j.jsx)(iee,{})})}),(0,j.jsxs)(i7,{side:`right`,align:`start`,onCloseAutoFocus:t=>{n.current&&(n.current=!1,t.preventDefault(),e())},children:[(0,j.jsxs)(a7,{onSelect:()=>n.current=!0,children:[(0,j.jsx)(I_,{}),`Rename`]}),(0,j.jsxs)(a7,{variant:`destructive`,onSelect:t,children:[(0,j.jsx)(dv,{}),`Delete`]})]})]})}function zce({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 DP(e.id,i);o(!1),s.ok?(u.current=!0,n(s.value),t()):(c(s.error),l.current?.focus())};return(0,j.jsxs)(`div`,{className:`px-0.5 py-0.5`,children:[(0,j.jsx)(xce,{ref:l,value:r,maxLength:Lce,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,j.jsx)(`p`,{id:`rename-error-${e.id}`,className:`text-destructive px-1 pt-1 text-xs`,role:`alert`,children:s})]})}function Bce({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 OP(e.id);if(i(!1),!t.ok)return o(t.error);n(e)};return(0,j.jsx)(t9,{open:!!e,onOpenChange:e=>{e||r||(o(void 0),t())},children:(0,j.jsxs)(n9,{children:[(0,j.jsxs)(r9,{children:[(0,j.jsxs)(a9,{className:`font-heading wrap-anywhere`,children:[`Delete “`,e?.title,`”?`]}),(0,j.jsx)(o9,{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,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:a}),(0,j.jsxs)(i9,{children:[(0,j.jsx)(c9,{disabled:r,children:`Cancel`}),(0,j.jsxs)(s9,{variant:`destructive`,disabled:r,onClick:e=>{e.preventDefault(),s()},children:[r&&(0,j.jsx)(yI,{}),`Delete`]})]})]})})}function Vce({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:A(`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 Hce=se(`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,j.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:A(Hce({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot="input-group-control"]`)?.focus()},...n})}function Uce({className:e,...t}){return(0,j.jsx)(r5,{"data-slot":`input-group-control`,className:A(`flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent`,e),...t})}function Wce(){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,m]=(0,v.useState)(0),h=()=>{eN&&hN().then(e=>{e.ok&&m(e.value.total)})},g=async()=>{h();try{let e=await nN.sessions.$get();if(!e.ok)return o(await rN(e));t(await e.json()),o(void 0)}catch{o(`Can't reach the Mivra server.`)}};(0,v.useEffect)(()=>{g()},[]);let _=()=>{r({kind:`draft`}),f(e=>e+1)},y=(e,n)=>{t(t=>[e,...t]),c({sessionId:e.id,...n}),r({kind:`session`,id:e.id})},b=({session:e,goal:t,documentIds:n})=>y(e,{message:t,documentIds:n}),x=(e,t)=>{u(``),y(e,t)},[S,C]=(0,v.useState)(),w=e=>{C(void 0),r(e)},T=e.find(e=>e.id===i),[E,D]=(0,v.useState)(),O=e=>{D(void 0),t(t=>t.filter(t=>t.id!==e.id)),s?.sessionId===e.id&&c(void 0),i===e.id&&r({kind:`start`})},[ee,te]=Mce(),[ne,re]=(0,v.useState)(!1),[ie,ae]=(0,v.useState)(!1),[oe,k]=(0,v.useState)(!1),[se,ce]=(0,v.useState)(!1),[le,ue]=(0,v.useState)(!1),[de,fe]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=()=>ue(!0),t=()=>{ue(!1),fe(!0)};return window.addEventListener(mP,e),window.addEventListener(pP,t),()=>{window.removeEventListener(mP,e),window.removeEventListener(pP,t)}},[]);let[pe,me]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{eN&&_P().then(e=>{e.ok&&!E9(e.value)&&(me(!0),ce(!0))})},[]),(0,j.jsxs)(gce,{children:[(0,j.jsx)(Gce,{sessions:e,activeId:S?void 0:i,theme:ee,onThemeChange:te,drafting:!S&&n.kind===`draft`,conceptGraphOpen:S===p9,onSelect:e=>w({kind:`session`,id:e}),onDelete:D,onRenamed:e=>t(t=>t.map(t=>t.id===e.id?{...t,title:e.title}:t)),onNew:()=>{C(void 0),_()},onNewCourse:()=>w({kind:`start`}),onOpenMemory:()=>re(!0),dueCount:p,onOpenConceptGraph:()=>C(p9),onOpenSources:()=>ae(!0),onOpenImports:()=>k(!0),onOpenProviders:()=>ce(!0),onOpenSettings:()=>ue(!0),onOpenUsage:()=>fe(!0)}),(0,j.jsx)(Koe,{open:ne,onOpenChange:e=>{re(e),e||h()},onOpenCourse:e=>w({kind:`session`,id:e}),onStartReview:(e,t)=>{C(void 0),y(e,{message:t})}}),(0,j.jsx)(roe,{open:ie,onOpenChange:ae,activeSessionId:i,onLibraryChanged:()=>U7(i)}),(0,j.jsx)(Toe,{open:oe,onOpenChange:k,onOpenGraph:C}),(0,j.jsx)(Bse,{open:se,onOpenChange:ce,firstRun:pe}),(0,j.jsx)(qse,{open:le,onOpenChange:ue}),(0,j.jsx)(Zse,{open:de,onOpenChange:fe}),(0,j.jsx)(Kae,{}),(0,j.jsx)(Bce,{session:E,onClose:()=>D(void 0),onDeleted:O}),(0,j.jsxs)(bce,{className:`h-svh min-w-0 overflow-hidden`,children:[(0,j.jsxs)(`header`,{className:`flex h-13 shrink-0 items-center gap-2 border-b px-3`,children:[(0,j.jsx)(vce,{}),(0,j.jsx)(sae,{orientation:`vertical`,className:`mr-1 data-[orientation=vertical]:h-4`}),(0,j.jsx)(`h1`,{className:`truncate text-base font-medium outline-none`,tabIndex:S?-1:void 0,"data-notes-graph-start":S?``:void 0,children:S===`__concepts`?`Concept graph`:S?`Notes graph`:T?.title??(n.kind===`draft`?`New session`:`Mivra`)})]}),eN?S?(0,j.jsx)(yse,{importId:S,onScopeChange:C}):a?(0,j.jsx)(Y9,{error:!0,children:a}):i?(0,j.jsx)(Kce,{sessionId:i,course:!!T?.courseId,start:s?.sessionId===i?s:void 0,onStartUsed:()=>c(void 0),onReply:g},i):n.kind===`draft`?(0,j.jsx)(Yce,{text:l,onTextChange:u,focus:d,onSaved:x}):(0,j.jsx)(ooe,{onStarted:b,onFreeChat:_}):(0,j.jsx)(Y9,{error:!0,children:`No API token found. Start the server, then reload this page.`})]})]})}function Y9({error:e,children:t}){return(0,j.jsx)(`p`,{className:A(`m-auto p-6 text-center`,e?`text-destructive`:`text-muted-foreground`),children:t})}function Gce({sessions:e,activeId:t,drafting:n,conceptGraphOpen:r,theme:i,onThemeChange:a,onSelect:o,onDelete:s,onRenamed:c,onNew:l,onNewCourse:u,onOpenMemory:d,dueCount:f,onOpenConceptGraph:p,onOpenSources:m,onOpenImports:h,onOpenProviders:g,onOpenSettings:_,onOpenUsage:y}){let{isMobile:b,setOpenMobile:x}=B9(),[S,C]=(0,v.useState)(),w=e=>{C(void 0),requestAnimationFrame(()=>document.querySelector(`[data-session-id="${CSS.escape(e)}"]`)?.focus())},T=()=>{b&&x(!1)};return(0,j.jsxs)(_ce,{collapsible:`icon`,children:[(0,j.jsxs)(Sce,{children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2 p-1`,children:[(0,j.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,j.jsx)(`span`,{className:`font-heading truncate text-base font-semibold group-data-[collapsible=icon]:hidden`,children:`Mivra`})]}),(0,j.jsxs)(V9,{children:[(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{variant:`outline`,tooltip:`New session`,isActive:n,onClick:()=>{l(),T()},children:[(0,j.jsx)(z_,{}),(0,j.jsx)(`span`,{children:`New session`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`New course`,onClick:()=>{u(),T()},children:[(0,j.jsx)(Yg,{}),(0,j.jsx)(`span`,{children:`New course`})]})})]})]}),(0,j.jsx)(wce,{children:Nce(e).map(e=>(0,j.jsxs)(Tce,{children:[(0,j.jsx)(Ece,{children:e.label}),(0,j.jsx)(V9,{children:e.sessions.map(e=>(0,j.jsx)(H9,{children:S===e.id?(0,j.jsx)(zce,{session:e,onRenamed:c,onDone:()=>w(e.id)}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(U9,{"data-session-id":e.id,isActive:e.id===t,tooltip:e.title,onClick:()=>{o(e.id),T()},children:[e.courseId?(0,j.jsx)(F7,{icon:e.icon,"aria-label":`Course`}):(0,j.jsx)(f_,{}),(0,j.jsx)(`span`,{children:e.title})]}),(0,j.jsx)(Rce,{onRename:()=>C(e.id),onDelete:()=>s(e)})]})},e.id))})]},e.label))}),(0,j.jsxs)(Cce,{className:`border-t border-sidebar-border`,children:[(0,j.jsxs)(V9,{children:[(0,j.jsxs)(H9,{children:[(0,j.jsxs)(U9,{tooltip:`Memory`,"data-memory-trigger":!0,onClick:()=>{d(),T()},children:[(0,j.jsx)(Nh,{}),(0,j.jsx)(`span`,{children:`Memory`})]}),f>0&&(0,j.jsxs)(kce,{className:`text-muted-foreground`,"data-testid":`due-count`,children:[f>99?`99+`:f,(0,j.jsx)(`span`,{className:`sr-only`,children:` due for review`})]})]}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Concept graph`,"data-concept-graph-trigger":!0,isActive:r,onClick:()=>{p(),T()},children:[(0,j.jsx)(hv,{}),(0,j.jsx)(`span`,{children:`Concept graph`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Source library`,"data-sources-trigger":!0,onClick:()=>{m(),T()},children:[(0,j.jsx)(jh,{}),(0,j.jsx)(`span`,{children:`Source library`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Imported notes`,"data-imports-trigger":!0,onClick:()=>{h(),T()},children:[(0,j.jsx)(o_,{}),(0,j.jsx)(`span`,{children:`Imported notes`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Model providers`,"data-providers-trigger":!0,onClick:()=>{g(),T()},children:[(0,j.jsx)($g,{}),(0,j.jsx)(`span`,{children:`Model providers`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Settings`,"data-settings-trigger":!0,onClick:()=>{_(),T()},children:[(0,j.jsx)(q_,{}),(0,j.jsx)(`span`,{children:`Settings`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Usage`,"data-usage-trigger":!0,onClick:()=>{y(),T()},children:[(0,j.jsx)(Vh,{}),(0,j.jsx)(`span`,{children:`Usage`})]})})]}),(0,j.jsx)(Ace,{choice:i,onChange:a})]}),(0,j.jsx)(yce,{})]})}function Kce({course:e,...t}){return e?(0,j.jsx)(qce,{...t}):(0,j.jsx)(X9,{...t})}function qce(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 YN(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 XN(e.value.id);n.ok&&a(n.value)},[t]);(0,v.useEffect)(()=>{w()},[w]);let T=async e=>{if(!n)return;let t=await QN(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),ee=(e,t)=>{_({text:e,send:t,nonce:++O.current}),p()},[te,ne]=(0,v.useState)(!1),re=async()=>{if(!n||te)return;ne(!0);let e=await bN(n.id);ne(!1);let t=Ice(e.ok?e.value:void 0);E?ee(t,!0):_({text:t,send:!0,nonce:++O.current})},ie=n?.syllabus&&(0,j.jsxs)(M,{size:`sm`,variant:`outline`,onClick:()=>void re(),disabled:te,"data-testid":`study-guide`,children:[(0,j.jsx)(w_,{"aria-hidden":!0}),` Study guide`]}),ae=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 nP(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)},oe=n?.syllabus?.version,k=y?.syllabusVersion;(0,v.useEffect)(()=>{k&&oe&&k!==oe&&w()},[k,oe,w]);let se=y?.status,ce=y&&i?.topics.find(e=>e.lesson?.id===y.id)?.lesson?.status;(0,v.useEffect)(()=>{se&&ce&&se!==ce&&w()},[se,ce,w]);let le=async()=>{if(!n?.syllabus)return;let e=await rP(n.id,n.syllabus.version);if(!e.ok)return e.error;await w()};if(m)return(0,j.jsx)(Y9,{error:!0,children:m});if(!n)return null;let ue=i?.topics.find(e=>e.topicId===i.nextTopicId);return E?(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,j.jsxs)(P7,{course:n,onUndo:le,children:[ie,(0,j.jsxs)(M,{size:`sm`,variant:`outline`,onClick:p,"data-tutor-trigger":!0,children:[(0,j.jsx)(m_,{"aria-hidden":!0}),` Tutor`]})]}),(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[i&&(0,j.jsx)(`aside`,{className:`hidden w-60 shrink-0 overflow-y-auto border-r p-3 md:block`,children:(0,j.jsx)(L7,{lessons:i,selectedId:E,onSelect:e=>{l(void 0),s(e)}})}),(0,j.jsxs)(`div`,{className:`min-w-0 flex-1 overflow-y-auto`,"data-testid":`lesson-scroll`,children:[i&&(0,j.jsxs)(`details`,{className:`border-b px-4 py-2 md:hidden`,children:[(0,j.jsx)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:`Lessons`}),(0,j.jsx)(`div`,{className:`pt-2`,children:(0,j.jsx)(L7,{lessons:i,selectedId:E,onSelect:e=>{l(void 0),s(e)}})})]}),D&&E!==D.lesson.id&&(0,j.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,j.jsx)(`span`,{children:`You're looking at an earlier lesson.`}),(0,j.jsxs)(M,{size:`xs`,variant:`outline`,onClick:()=>{l(void 0),s(D.lesson.id)},children:[`Back to lesson `,i.topics.indexOf(D)+1,`: `,D.title]})]}),(0,j.jsx)(foe,{courseComplete:n.status===`complete`,lessonId:E,nextTopic:ue&&{id:ue.topicId,title:ue.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},ee(`Explain "${e.title}"`,!0)},onChange:e=>{x.current=void 0,ee(`Change "${e.title}": `,!1)},onPracticeMilestone:e=>{x.current=void 0,ee(e,!0)}},E)]})]}),(0,j.jsx)(T7,{open:u,onOpenChange:d,children:(0,j.jsxs)(E7,{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,j.jsxs)(D7,{className:`border-b`,children:[(0,j.jsx)(O7,{className:`font-heading`,children:`Tutor`}),(0,j.jsxs)(k7,{children:[`Ask anything and the lesson stays as it is, or ask for a change. `,(0,j.jsx)(`kbd`,{className:`text-xs`,children:`Ctrl K`}),` opens and closes this.`]})]}),(0,j.jsx)(X9,{...e,onSettled:w,lessonId:E,prompt:g,onPromptUsed:()=>_(void 0),foldThroughMessageId:n.interviewMessageId,placeholder:`Ask the tutor…`,onAddToLesson:y?.status===`ready`?ae:void 0})]})})]}):(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,j.jsxs)(P7,{course:n,children:[ie,ue&&(0,j.jsx)(M,{size:`sm`,onClick:()=>void T(ue.topicId),children:`Start lesson 1`})]}),(0,j.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||uN(e).then(e=>e.ok?i(e.messages):o(e.error))},[e]),a?(0,j.jsxs)(Y9,{error:!0,children:[`Couldn't load this session: `,a]}):r?(0,j.jsx)(Jce,{sessionId:e,initialMessages:r,onReply:t,...n}):(0,j.jsxs)(`div`,{className:`text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Loading the session…`]})}function Jce({sessionId:e,initialMessages:t,start:n,onStartUsed:r,onReply:i,onSettled:a,lessonId:o,prompt:s,onPromptUsed:c,onAddToLesson:l,foldThroughMessageId:u,placeholder:d=`What do you want to learn?`}){let[f,p]=(0,v.useState)(!1),m=(0,v.useRef)(o);m.current=o;let[h,g]=(0,v.useState)(n?.input??``),_=moe(e),y=_7(),b=(0,v.useRef)(_);b.current=_;let[x,S]=(0,v.useState)({}),C=w({initial:`instant`,resize:`instant`}),T=(0,v.useRef)(!1),E=(0,v.useRef)(null),[D,O]=(0,v.useState)(),[ee,te]=(0,v.useState)(),ne=(0,v.useRef)(void 0),re=(0,v.useRef)(!1),ie=(0,v.useRef)(0),ae=(0,v.useRef)(!1),oe=(0,v.useRef)(!1),k=(0,v.useRef)(!1),se=(0,v.useRef)(0),ce=(0,v.useRef)(!0),{messages:le,sendMessage:ue,setMessages:de,status:fe,error:pe,resumeStream:me,stop:he}=$O({id:e,experimental_throttle:50,messages:t,transport:new VO({api:`/api/sessions/${e}/chat`,headers:tN,prepareReconnectToStreamRequest:()=>({api:`/api/sessions/${e}/continuation`}),prepareSendMessagesRequest:({messages:e,body:t})=>({body:{...t,message:e.at(-1),...m.current?{lessonId:m.current}:{}}}),fetch:async(e,t)=>{let n=se.current,r=await fetch(e,t);if(t?.method===`GET`){ne.current=r.headers.get(`x-mivra-continuation-stop-id`)??void 0,re.current=r.status===200,re.current&&(k.current=!1),r.status===204&&await Se(n),oe.current=!1;let e=r.headers.get(`x-mivra-continuation-error`);if(e&&(te(e),r.status===204))throw Error(e)}else r.ok&&await b.current.refresh();return r}}),onFinish:({message:t,isDisconnect:n})=>{ae.current||n||!ce.current||(re.current?(re.current=!1,ne.current=void 0,Se(se.current)):T.current&&uN(e).then(e=>{e.ok&&de(n=>n.at(-1)?.id===t.id?e.messages:n)}),i())}}),ge=(0,v.useRef)(0);(0,v.useEffect)(()=>{s&&s.nonce!==ge.current&&(ge.current=s.nonce,c?.(),s.send&&!xe.current.busy?ue({text:s.text},{body:{documentIds:[]}}):(g(s.text),requestAnimationFrame(()=>E.current?.focus())))},[s,ue,c]);let _e=(0,v.useRef)(!1),{upload:ve}=_;(0,v.useEffect)(()=>{!n||_e.current||t.length>0||(_e.current=!0,r(),n.file&&ve(n.file),n.message&&ue({text:n.message},{body:{documentIds:n.documentIds??[]}}))},[n,t.length,r,ue,ve]),(0,v.useEffect)(()=>{let e=C.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)&&C.stopScroll()},i=t=>{t.target===e&&([`ArrowUp`,`PageUp`,`Home`].includes(t.key)||t.key===` `&&t.shiftKey)&&C.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)}},[C.scrollRef,C.stopScroll]),(0,v.useEffect)(()=>{let e=requestAnimationFrame(()=>{let e=C.scrollRef.current;e&&e.scrollHeight-e.clientHeight-e.scrollTop<=1&&C.scrollToBottom(`instant`)});return()=>cancelAnimationFrame(e)},[x,C.scrollRef,C.scrollToBottom]);let ye=fe===`submitted`||fe===`streaming`,be=(0,v.useRef)(a);be.current=a,(0,v.useEffect)(()=>{ye||be.current?.()},[ye,le.length]);let xe=(0,v.useRef)({busy:ye,resumeStream:me,stop:he});xe.current={busy:ye,resumeStream:me,stop:he};async function Se(t){let n=await uN(e);n.ok&&ce.current&&se.current===t&&de(n.messages)}let Ce=async(e=!1)=>{if(oe.current){e&&(k.current=!0);return}if(xe.current.busy&&!ne.current)return;oe.current=!0;let t=++ie.current,n=se.current;try{if(ne.current&&(ae.current=!0,await xe.current.stop(),ae.current=!1),!ce.current||se.current!==n)return;oe.current=!0,T.current=!1,await xe.current.resumeStream()}finally{ie.current===t&&(oe.current=!1,k.current&&ce.current&&(k.current=!1,we.current())),ae.current=!1}},we=(0,v.useRef)(Ce);we.current=Ce;let Te=(0,v.useRef)(!!n?.message&&t.length===0);(0,v.useEffect)(()=>{ce.current=!0;let e=()=>{document.visibilityState===`visible`&&we.current()};return Te.current||e(),window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{ce.current=!1,window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[]);let Ee=async()=>{let t=await uN(e);t.ok&&S(e=>Y8(e,iae(t.messages))),Ce(!0)},De=async e=>{e.preventDefault();let t=h.trim();if(!t||ye)return;T.current=!1,O(void 0),te(void 0),se.current++,ie.current++,k.current=!1,ae.current=!0,await he(),oe.current=!1,ae.current=!1,re.current=!1,ne.current=void 0,C.scrollToBottom(`instant`);let n=_.documents.filter(e=>e.messageId===null).map(e=>e.id);ue({text:t},{body:{documentIds:n}}),g(``)},Oe=u?le.findIndex(e=>e.id===u):-1;return(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,j.jsxs)(bv,{"aria-busy":ye,instance:C,initial:`instant`,resize:`instant`,className:`min-h-0 min-w-0`,children:[(0,j.jsxs)(xv,{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]`)&&C.stopScroll()},onKeyDownCapture:e=>{e.key!==`Tab`&&e.target.closest(`button, input, [role=region]`)&&C.stopScroll()},children:[le.length===0&&!ye&&(0,j.jsx)(Z9,{}),Oe>=0&&!f&&(0,j.jsx)(M,{variant:`ghost`,size:`sm`,className:`text-muted-foreground self-center`,onClick:()=>p(!0),children:`Show the placement interview`}),le.map((e,t)=>!f&&t<=Oe?null:(0,j.jsxs)(`div`,{"data-message-id":e.id,"data-message-role":e.role,className:A(`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,j.jsx)(W7,{documents:_,messageId:e.id}),e.role===`assistant`&&e.parts.some(e=>e.type===`reasoning`&&e.text.length>0)&&(0,j.jsxs)(K7,{defaultOpen:!1,children:[(0,j.jsxs)(q7,{children:[`Thinking`,q8(fe,t,le.length)&&e.parts.some(e=>e.type===`reasoning`&&e.state===`streaming`)&&(0,j.jsx)(`span`,{className:`ml-2 text-xs`,children:`In progress…`})]}),(0,j.jsx)(Y7,{children:e.parts.map((e,n)=>e.type===`reasoning`&&(0,j.jsx)(J7,{label:(0,j.jsx)(`span`,{className:`whitespace-pre-wrap`,children:e.text}),status:q8(fe,t,le.length)&&e.state===`streaming`?`active`:`complete`},n))})]}),e.parts.map((n,r)=>n.type===`text`?e.role===`user`?(0,j.jsx)(`p`,{children:n.text},r):(0,j.jsx)(c2,{text:n.text,citations:!0},r):n.type===`data-artifact`?(0,j.jsx)(K8,{data:rae(n,x),replyInProgress:q8(fe,t,le.length),onUpdate:e=>{S(t=>Y8(t,{[e.id]:e})),Ce(!0)},onRefresh:Ee},n.id??r):null),e.role===`assistant`&&typeof e.metadata?.model==`string`&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,"data-reply-model":!0,children:g7(e.metadata.model,y.view?.models,y.view?.providers)}),l&&e.role===`assistant`&&t>Oe&&!q8(fe,t,le.length)&&e.parts.some(e=>e.type===`text`&&e.text.trim())&&(0,j.jsx)(Xce,{onAdd:()=>l(e.id)})]},e.id)),fe===`submitted`&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Thinking…`]}),D&&(0,j.jsx)(`p`,{className:`text-destructive`,children:D}),(pe||ee)&&((pe?$9(pe):ee)===`ChatGPT usage limit reached. Review your plan or this app's limit in ChatGPT settings.`?(0,j.jsx)(Gae,{}):(0,j.jsx)(`p`,{className:`text-destructive`,children:pe?$9(pe):ee}))]}),(0,j.jsx)(Sv,{"aria-label":`Scroll to bottom`,onClick:()=>void C.scrollToBottom(`instant`)})]}),(0,j.jsx)(Q9,{documents:_,input:h,onInputChange:g,onSubmit:De,inputRef:E,placeholder:d,modelPicker:y,action:ye?(0,j.jsx)(M,{type:`button`,variant:`secondary`,onClick:async t=>{let n=t.currentTarget,r=document.activeElement===n;try{if(T.current)return;T.current=!0;let t=ne.current??le.findLast(e=>e.role===`user`)?.id;if(!t)return;let i=await nN.sessions[`:id`].stop.$post({param:{id:e},json:{messageId:t}});i.ok&&r&&(document.activeElement===n||document.activeElement===document.body)&&E.current?.focus(),i.ok||(T.current=!1),i.ok||O(`Couldn’t stop the reply. Try again.`)}catch{T.current=!1,O(`Couldn’t stop the reply. Try again.`)}},children:`Stop`}):(0,j.jsx)(M,{type:`submit`,disabled:!h.trim(),children:`Send`})})]})}function Z9(){return(0,j.jsx)(y7,{className:`my-auto`,children:(0,j.jsxs)(b7,{children:[(0,j.jsx)(x7,{variant:`icon`,children:(0,j.jsx)(m_,{"aria-hidden":`true`})}),(0,j.jsx)(S7,{children:`Start a conversation`}),(0,j.jsx)(C7,{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,j.jsxs)(`form`,{onSubmit:r,className:`bg-background border-t`,children:[(0,j.jsx)(W7,{documents:e}),(0,j.jsx)(`div`,{className:`mx-auto w-full max-w-3xl p-3`,children:(0,j.jsxs)(Vce,{className:`bg-card dark:bg-card border-border-strong shadow-paper h-auto min-h-11 rounded-xl`,"aria-label":`Message composer`,children:[(0,j.jsxs)(J9,{align:`inline-start`,children:[(0,j.jsx)(hoe,{documents:e}),(0,j.jsx)(goe,{documents:e})]}),(0,j.jsx)(Uce,{ref:i,value:t,onChange:e=>n(e.target.value),placeholder:a,"aria-label":`Message`,readOnly:c,autoFocus:!0}),(0,j.jsx)(J9,{align:`inline-end`,children:s})]})}),(0,j.jsx)(`div`,{className:`mx-auto flex max-w-3xl px-3 pb-2`,children:(0,j.jsx)(v7,{state:o})})]})}function Yce({text:e,onTextChange:t,focus:n,onSaved:r}){let i=_7(),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 fN();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 fN();if(!n.ok)return n.error;let i=await MN(n.value.id,t);if(!i.ok)return await OP(n.value.id),i.error;r(n.value,{input:e})},pasteText:async t=>{let n=await fN();if(!n.ok)return n.error;let i=await jN(n.value.id,t);if(!i.ok)return await OP(n.value.id),i.error;r(n.value,{input:e})},remove:async()=>{},refresh:async()=>{}};return(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,j.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,j.jsx)(Z9,{}),o&&!o.file&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,j.jsx)(yI,{"aria-hidden":`true`}),` Thinking…`]})]}),(0,j.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,j.jsx)(M,{type:`submit`,disabled:!e.trim()||o!==void 0,children:`Send`})})]})}function Xce({onAdd:e}){let[t,n]=(0,v.useState)(`idle`),[r,i]=(0,v.useState)();return(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsxs)(M,{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,j.jsx)($_,{"aria-hidden":!0}),` `,t===`added`?`Added to lesson`:`Add to lesson`]}),r&&(0,j.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,re.createRoot)(document.getElementById(`root`)).render((0,j.jsx)(v.StrictMode,{children:(0,j.jsx)(Wce,{})}));