/*! For license information please see main.8f89236b.js.LICENSE.txt */ (()=>{var e={4:(e,t,n)=>{"use strict";var r=n(853),i=n(43),a=n(950);function s(e){var t="https://react.dev/errors/"+e;if(1)":-1--i||l[r]!==c[i]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}}while(1<=r&&0<=i);break}}}finally{O=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?N(n):""}function j(e){switch(e.tag){case 26:case 27:case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 15:return e=R(e.type,!1);case 11:return e=R(e.type.render,!1);case 1:return e=R(e.type,!0);default:return""}}function L(e){try{var t="";do{t+=j(e),e=e.return}while(e);return t}catch(n){return"\nError generating stack: "+n.message+"\n"+n.stack}}function D(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function I(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function B(e){if(D(e)!==e)throw Error(s(188))}function F(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=F(e)))return t;e=e.sibling}return null}var H=Array.isArray,q=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},U=[],V=-1;function W(e){return{current:e}}function Y(e){0>V||(e.current=U[V],U[V]=null,V--)}function G(e,t){V++,U[V]=e.current,e.current=t}var Q=W(null),X=W(null),K=W(null),J=W(null);function Z(e,t){switch(G(K,t),G(X,e),G(Q,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Xu(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Ku(e=Xu(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Y(Q),G(Q,t)}function ee(){Y(Q),Y(X),Y(K)}function te(e){null!==e.memoizedState&&G(J,e);var t=Q.current,n=Ku(t,e.type);t!==n&&(G(X,e),G(Q,n))}function ne(e){X.current===e&&(Y(Q),Y(X)),J.current===e&&(Y(J),Lh._currentValue=$)}var re=Object.prototype.hasOwnProperty,ie=r.unstable_scheduleCallback,ae=r.unstable_cancelCallback,se=r.unstable_shouldYield,oe=r.unstable_requestPaint,le=r.unstable_now,ce=r.unstable_getCurrentPriorityLevel,ue=r.unstable_ImmediatePriority,he=r.unstable_UserBlockingPriority,de=r.unstable_NormalPriority,pe=r.unstable_LowPriority,fe=r.unstable_IdlePriority,me=r.log,ge=r.unstable_setDisableYieldValue,be=null,ve=null;function ye(e){if("function"===typeof me&&ge(e),ve&&"function"===typeof ve.setStrictMode)try{ve.setStrictMode(be,e)}catch(t){}}var xe=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(we(e)/ke|0)|0},we=Math.log,ke=Math.LN2;var _e=128,Se=4194304;function Me(e){var t=42&e;if(0!==t)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: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 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ce(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=e.warmLanes;e=0!==e.finishedLanes;var o=134217727&n;return 0!==o?0!==(n=o&~i)?r=Me(n):0!==(a&=o)?r=Me(a):e||0!==(s=o&~s)&&(r=Me(s)):0!==(o=n&~i)?r=Me(o):0!==a?r=Me(a):e||0!==(s=n&~s)&&(r=Me(s)),0===r?0:0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(s=t&-t)||32===i&&0!==(4194176&s))?t:r}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ee(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ze(){var e=_e;return 0===(4194176&(_e<<=1))&&(_e=128),e}function Ae(){var e=Se;return 0===(62914560&(Se<<=1))&&(Se=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ne(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function Re(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),i=1<=kn),Mn=String.fromCharCode(32),Cn=!1;function Tn(e,t){switch(e){case"keyup":return-1!==xn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function En(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1;var An={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 Pn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!An[e.type]:"textarea"===t}function Nn(e,t,n,r){Nt?Ot?Ot.push(r):Ot=[r]:Nt=r,0<(t=Lu(t,"onChange")).length&&(n=new Jt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var On=null,Rn=null;function jn(e){Eu(e,0)}function Ln(e){if(dt(Qe(e)))return e}function Dn(e,t){if("change"===e)return t}var In=!1;if(nt){var Bn;if(nt){var Fn="oninput"in document;if(!Fn){var Hn=document.createElement("div");Hn.setAttribute("oninput","return;"),Fn="function"===typeof Hn.oninput}Bn=Fn}else Bn=!1;In=Bn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Xn(r)}}function Jn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Jn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Zn(e){for(var t=pt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=pt((e=t.contentWindow).document)}return t}function er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function tr(e,t){var n=Zn(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Jn(t.ownerDocument.documentElement,t)){if(null!==r&&er(t))if(e=r.start,void 0===(n=r.end)&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if((n=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){n=n.getSelection();var i=t.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!n.extend&&a>r&&(i=r,r=a,a=i),i=Kn(t,a);var s=Kn(t,r);i&&s&&(1!==n.rangeCount||n.anchorNode!==i.node||n.anchorOffset!==i.offset||n.focusNode!==s.node||n.focusOffset!==s.offset)&&((e=e.createRange()).setStart(i.node,i.offset),n.removeAllRanges(),a>r?(n.addRange(e),n.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),n.addRange(e)))}for(e=[],n=t;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for("function"===typeof t.focus&&t.focus(),t=0;t=document.documentMode,rr=null,ir=null,ar=null,sr=!1;function or(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;sr||null==rr||rr!==pt(r)||("selectionStart"in(r=rr)&&er(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ar&&Qn(ar,r)||(ar=r,0<(r=Lu(ir,"onSelect")).length&&(t=new Jt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=rr)))}function lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cr={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},ur={},hr={};function dr(e){if(ur[e])return ur[e];if(!cr[e])return e;var t,n=cr[e];for(t in n)if(n.hasOwnProperty(t)&&t in hr)return ur[e]=n[t];return e}nt&&(hr=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);var pr=dr("animationend"),fr=dr("animationiteration"),mr=dr("animationstart"),gr=dr("transitionrun"),br=dr("transitionstart"),vr=dr("transitioncancel"),yr=dr("transitionend"),xr=new Map,wr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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 scrollEnd toggle touchMove waiting wheel".split(" ");function kr(e,t){xr.set(e,t),et(t,[e])}var _r=[],Sr=0,Mr=0;function Cr(){for(var e=Sr,t=Mr=Sr=0;t>=s,i-=s,qr=1<<32-xe(t)+i|n<d?(p=h,h=null):p=h.sibling;var f=b(i,h,o[d],l);if(null===f){null===h&&(h=p);break}e&&h&&null===f.alternate&&t(i,h),s=a(f,s,d),null===u?c=f:u.sibling=f,u=f,h=p}if(d===o.length)return n(i,h),Xr&&Ur(i,d),c;if(null===h){for(;dp?(f=d,d=null):f=d.sibling;var y=b(i,d,g.value,c);if(null===y){null===d&&(d=f);break}e&&d&&null===y.alternate&&t(i,d),o=a(y,o,p),null===h?u=y:h.sibling=y,h=y,d=f}if(g.done)return n(i,d),Xr&&Ur(i,p),u;if(null===d){for(;!g.done;p++,g=l.next())null!==(g=m(i,g.value,c))&&(o=a(g,o,p),null===h?u=g:h.sibling=g,h=g);return Xr&&Ur(i,p),u}for(d=r(d);!g.done;p++,g=l.next())null!==(g=v(d,i,p,g.value,c))&&(e&&null!==g.alternate&&d.delete(null===g.key?p:g.key),o=a(g,o,p),null===h?u=g:h.sibling=g,h=g);return e&&d.forEach((function(e){return t(i,e)})),Xr&&Ur(i,p),u}(l,d,p=x.call(p),f)}if("function"===typeof p.then)return y(l,d,gi(p),f);if(p.$$typeof===g)return y(l,d,Co(l,p),f);vi(l,p)}return"string"===typeof p&&""!==p||"number"===typeof p||"bigint"===typeof p?(p=""+p,null!==d&&6===d.tag?(n(l,d.sibling),(f=i(d,p)).return=l,l=f):(n(l,d),(f=ql(p,l.mode,f)).return=l,l=f),o(l)):n(l,d)}return function(e,t,n,r){try{mi=0;var i=y(e,t,n,r);return fi=null,i}catch(s){if(s===si)throw s;var a=jl(29,s,null,e.mode);return a.lanes=r,a.return=e,a}}}var wi=xi(!0),ki=xi(!1),_i=W(null),Si=W(0);function Mi(e,t){G(Si,e=cc),G(_i,t),cc=e|t.baseLanes}function Ci(){G(Si,cc),G(_i,_i.current)}function Ti(){cc=Si.current,Y(_i),Y(Si)}var Ei=W(null),zi=null;function Ai(e){var t=e.alternate;G(Ri,1&Ri.current),G(Ei,e),null===zi&&(null===t||null!==_i.current||null!==t.memoizedState)&&(zi=e)}function Pi(e){if(22===e.tag){if(G(Ri,Ri.current),G(Ei,e),null===zi){var t=e.alternate;null!==t&&null!==t.memoizedState&&(zi=e)}}else Ni()}function Ni(){G(Ri,Ri.current),G(Ei,Ei.current)}function Oi(e){Y(Ei),zi===e&&(zi=null),Y(Ri)}var Ri=W(0);function ji(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Li="undefined"!==typeof AbortController?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()}))}},Di=r.unstable_scheduleCallback,Ii=r.unstable_NormalPriority,Bi={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fi(){return{controller:new Li,data:new Map,refCount:0}}function Hi(e){e.refCount--,0===e.refCount&&Di(Ii,(function(){e.controller.abort()}))}var qi=null,$i=0,Ui=0,Vi=null;function Wi(){if(0===--$i&&null!==qi){null!==Vi&&(Vi.status="fulfilled");var e=qi;qi=null,Ui=0,Vi=null;for(var t=0;ta?a:8;var s=A.T,o={};A.T=o,xs(e,!1,t,n);try{var l=i(),c=A.S;if(null!==c&&c(o,l),null!==l&&"object"===typeof l&&"function"===typeof l.then)ys(e,t,function(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 title"))),Wu(a,r,n),a[Ie]=e,Ke(a),r=a;break e;case"link":var o=Th("link","href",i).get(r+(n.href||""));if(o)for(var l=0;l<\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"===typeof r.is?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"===typeof r.is?i.createElement(n,{is:r.is}):i.createElement(n)}}e[Ie]=t,e[Be]=r;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(Wu(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ul(t)}}return Gl(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&Ul(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(s(166));if(e=K.current,ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=Gr))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ie]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||qu(e.nodeValue,n)))||ei(t)}else(e=Qu(e).createTextNode(r))[Ie]=t,t.stateNode=e}return Gl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=ri(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(s(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(s(317));i[Ie]=t}else ii(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gl(t),i=!1}else null!==Kr&&(Rc(Kr),Kr=null),i=!0;if(!i)return 256&t.flags?(Oi(t),t):(Oi(t),null)}if(Oi(t),0!==(128&t.flags))return t.lanes=n,t;if(n=null!==r,e=null!==e&&null!==e.memoizedState,n){i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool);var a=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Wl(t,t.updateQueue),Gl(t),null;case 4:return ee(),null===e&&Nu(t.stateNode.containerInfo),Gl(t),null;case 10:return yo(t.type),Gl(t),null;case 19:if(Y(Ri),null===(i=t.memoizedState))return Gl(t),null;if(r=0!==(128&t.flags),null===(a=i.rendering))if(r)Yl(i,!1);else{if(0!==uc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=ji(e))){for(t.flags|=128,Yl(i,!1),e=a.updateQueue,t.updateQueue=e,Wl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Il(n,e),n=n.sibling;return G(Ri,1&Ri.current|2),t.child}e=e.sibling}null!==i.tail&&le()>xc&&(t.flags|=128,r=!0,Yl(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ji(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Wl(t,e),Yl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!Xr)return Gl(t),null}else 2*le()-i.renderingStartTime>xc&&536870912!==n&&(t.flags|=128,r=!0,Yl(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=le(),t.sibling=null,e=Ri.current,G(Ri,r?1&e|2:1&e),t):(Gl(t),null);case 22:case 23:return Oi(t),Ti(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(Gl(t),6&t.subtreeFlags&&(t.flags|=8192)):Gl(t),null!==(n=t.updateQueue)&&Wl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&Y(Gi),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),yo(Bi),Gl(t),null;case 25:return null}throw Error(s(156,t.tag))}function Xl(e,t){switch(Yr(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return yo(Bi),ee(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return ne(t),null;case 13:if(Oi(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));ii()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Y(Ri),null;case 4:return ee(),null;case 10:return yo(t.type),null;case 22:case 23:return Oi(t),Ti(),null!==e&&Y(Gi),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return yo(Bi),null;default:return null}}function Kl(e,t){switch(Yr(t),t.tag){case 3:yo(Bi),ee();break;case 26:case 27:case 5:ne(t);break;case 4:ee();break;case 13:Oi(t);break;case 19:Y(Ri);break;case 10:yo(t.type);break;case 22:case 23:Oi(t),Ti(),null!==e&&Y(Gi);break;case 24:yo(Bi)}}var Jl={getCacheForType:function(e){var t=Mo(Bi),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},Zl="function"===typeof WeakMap?WeakMap:Map,ec=0,tc=null,nc=null,rc=0,ic=0,ac=null,sc=!1,oc=!1,lc=!1,cc=0,uc=0,hc=0,dc=0,pc=0,fc=0,mc=0,gc=null,bc=null,vc=!1,yc=0,xc=1/0,wc=null,kc=null,_c=!1,Sc=null,Mc=0,Cc=0,Tc=null,Ec=0,zc=null;function Ac(){if(0!==(2&ec)&&0!==rc)return rc&-rc;if(null!==A.T){return 0!==Ui?Ui:wu()}return Le()}function Pc(){0===fc&&(fc=0===(536870912&rc)||Xr?ze():536870912);var e=Ei.current;return null!==e&&(e.flags|=32),fc}function Nc(e,t,n){(e===tc&&2===ic||null!==e.cancelPendingCommit)&&(Fc(e,0),Dc(e,rc,fc,!1)),Ne(e,n),0!==(2&ec)&&e===tc||(e===tc&&(0===(2&ec)&&(dc|=n),4===uc&&Dc(e,rc,fc,!1)),mu(e))}function Oc(e,t,n){if(0!==(6&ec))throw Error(s(327));for(var r=!n&&0===(60&t)&&0===(t&e.expiredLanes)||Te(e,t),i=r?function(e,t){var n=ec;ec|=2;var r=qc(),i=$c();tc!==e||rc!==t?(wc=null,xc=le()+500,Fc(e,t)):oc=Te(e,t);e:for(;;)try{if(0!==ic&&null!==nc){t=nc;var a=ac;t:switch(ic){case 1:ic=0,ac=null,Xc(e,t,a,1);break;case 2:if(ci(a)){ic=0,ac=null,Qc(t);break}t=function(){2===ic&&tc===e&&(ic=7),mu(e)},a.then(t,t);break e;case 3:ic=7;break e;case 4:ic=5;break e;case 7:ci(a)?(ic=0,ac=null,Qc(t)):(ic=0,ac=null,Xc(e,t,a,7));break;case 5:var o=null;switch(nc.tag){case 26:o=nc.memoizedState;case 5:case 27:var l=nc;if(!o||zh(o)){ic=0,ac=null;var c=l.sibling;if(null!==c)nc=c;else{var u=l.return;null!==u?(nc=u,Kc(u)):nc=null}break t}}ic=0,ac=null,Xc(e,t,a,5);break;case 6:ic=0,ac=null,Xc(e,t,a,6);break;case 8:Bc(),uc=6;break e;default:throw Error(s(462))}}Yc();break}catch(h){Hc(e,h)}return bo=go=null,A.H=r,A.A=i,ec=n,null!==nc?0:(tc=null,rc=0,Cr(),uc)}(e,t):Vc(e,t,!0),a=r;;){if(0===i){oc&&!r&&Dc(e,t,0,!1);break}if(6===i)Dc(e,t,0,!sc);else{if(n=e.current.alternate,a&&!Lc(n)){i=Vc(e,t,!1),a=!1;continue}if(2===i){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=0!==(o=-536870913&e.pendingLanes)?o:536870912&o?536870912:0;if(0!==o){t=o;e:{var l=e;i=gc;var c=l.current.memoizedState.isDehydrated;if(c&&(Fc(l,o).flags|=256),2!==(o=Vc(l,o,!1))){if(lc&&!c){l.errorRecoveryDisabledLanes|=a,dc|=a,i=4;break e}a=bc,bc=i,null!==a&&Rc(a)}i=o}if(a=!1,2!==i)continue}}if(1===i){Fc(e,0),Dc(e,t,0,!0);break}e:{switch(r=e,i){case 0:case 1:throw Error(s(345));case 4:if((4194176&t)===t){Dc(r,t,fc,!sc);break e}break;case 2:bc=null;break;case 3:case 5:break;default:throw Error(s(329))}if(r.finishedWork=n,r.finishedLanes=t,(62914560&t)===t&&10<(a=yc+300-le())){if(Dc(r,t,fc,!sc),0!==Ce(r,0))break e;r.timeoutHandle=eh(jc.bind(null,r,n,bc,wc,vc,t,fc,dc,mc,sc,2,-0,0),a)}else jc(r,n,bc,wc,vc,t,fc,dc,mc,sc,0,-0,0)}}break}mu(e)}function Rc(e){null===bc?bc=e:bc.push.apply(bc,e)}function jc(e,t,n,r,i,a,o,l,c,u,h,d,p){var f=t.subtreeFlags;if((8192&f||16785408===(16785408&f))&&(Ah={stylesheets:null,count:0,unsuspend:Ph},El(t),null!==(t=function(){if(null===Ah)throw Error(s(475));var e=Ah;return e.stylesheets&&0===e.count&&Rh(e,e.stylesheets),0n?32:n,A.T=null,null===Sc)var a=!1;else{n=Tc,Tc=null;var o=Sc,l=Mc;if(Sc=null,Mc=0,0!==(6&ec))throw Error(s(331));var c=ec;if(ec|=4,Pl(o.current),_l(o,o.current,l,n),ec=c,gu(0,!1),ve&&"function"===typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(be,o)}catch(u){}a=!0}return a}finally{q.p=i,A.T=r,eu(e,t)}}return!1}function nu(e,t,n){t=Rr(n,t),null!==(e=No(e,t=Bs(e.stateNode,t,2),2))&&(Ne(e,2),mu(e))}function ru(e,t,n){if(3===e.tag)nu(e,e,n);else for(;null!==t;){if(3===t.tag){nu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===kc||!kc.has(r))){e=Rr(n,e),null!==(r=No(t,n=Fs(2),2))&&(Hs(n,r,t,e),Ne(r,2),mu(r));break}}t=t.return}}function iu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Zl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(lc=!0,i.add(n),e=au.bind(null,e,t,n),t.then(e,e))}function au(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,tc===e&&(rc&n)===n&&(4===uc||3===uc&&(62914560&rc)===rc&&300>le()-yc?0===(2&ec)&&Fc(e,0):pc|=n,mc===rc&&(mc=0)),mu(e)}function su(e,t){0===t&&(t=Ae()),null!==(e=zr(e,t))&&(Ne(e,t),mu(e))}function ou(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),su(e,n)}function lu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}null!==r&&r.delete(t),su(e,n)}var cu=null,uu=null,hu=!1,du=!1,pu=!1,fu=0;function mu(e){var t;e!==uu&&null===e.next&&(null===uu?cu=uu=e:uu=uu.next=e),du=!0,hu||(hu=!0,t=bu,rh((function(){0!==(6&ec)?ie(ue,t):t()})))}function gu(e,t){if(!pu&&du){pu=!0;do{for(var n=!1,r=cu;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var a=0;else{var s=r.suspendedLanes,o=r.pingedLanes;a=(1<<31-xe(42|e)+1)-1,a=201326677&(a&=i&~(s&~o))?201326677&a|1:a?2|a:0}0!==a&&(n=!0,xu(r,a))}else a=rc,0===(3&(a=Ce(r,r===tc?a:0)))||Te(r,a)||(n=!0,xu(r,a));r=r.next}}while(n);pu=!1}}function bu(){du=hu=!1;var e=0;0!==fu&&(function(){var e=window.event;if(e&&"popstate"===e.type)return e!==Zu&&(Zu=e,!0);return Zu=null,!1}()&&(e=fu),fu=0);for(var t=le(),n=null,r=cu;null!==r;){var i=r.next,a=vu(r,t);0===a?(r.next=null,null===n?cu=i:n.next=i,null===i&&(uu=n)):(n=r,(0!==e||0!==(3&a))&&(du=!0)),r=i}gu(e,!1)}function vu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=-62914561&e.pendingLanes;0 title"):null)}function zh(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var Ah=null;function Ph(){}function Nh(){if(this.count--,0===this.count)if(this.stylesheets)Rh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Oh=null;function Rh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Oh=new Map,t.forEach(jh,e),Oh=null,Nh.call(e))}function jh(e,t){if(!(4&t.state.loading)){var n=Oh.get(e);if(n)var r=n.get(null);else{n=new Map,Oh.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a{"use strict";e.exports=n(288)},173:(e,t,n)=>{e.exports=n(497)()},218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},288:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}function v(){}function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)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")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=b.prototype;var x=y.prototype=new v;x.constructor=y,m(x,b.prototype),x.isPureReactComponent=!0;var w=Array.isArray,k={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function S(e,t,r,i,a,s){return r=s.ref,{$$typeof:n,type:e,key:t,ref:void 0!==r?r:null,props:s}}function M(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var C=/\/+/g;function T(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function E(){}function z(e,t,i,a,s){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l,c,u=!1;if(null===e)u=!0;else switch(o){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0;break;case d:return z((u=e._init)(e._payload),t,i,a,s)}}if(u)return s=s(e),u=""===a?"."+T(e,0):a,w(s)?(i="",null!=u&&(i=u.replace(C,"$&/")+"/"),z(s,t,i,"",(function(e){return e}))):null!=s&&(M(s)&&(l=s,c=i+(null==s.key||e&&e.key===s.key?"":(""+s.key).replace(C,"$&/")+"/")+u,s=S(l.type,c,void 0,0,0,l.props)),t.push(s)),1;u=0;var h,f=""===a?".":a+":";if(w(e))for(var m=0;m{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4)},497:(e,t,n)=>{"use strict";var r=n(218);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,s){if(s!==r){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},576:function(e){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";function n(e){var t=e.getContext("2d"),n=e.width,r=e.height,i=t.getImageData(0,0,n,r).data,o=a(!0,n,r,i),l=a(!1,n,r,i),c=s(!0,n,r,i),u=s(!1,n,r,i)-c+1,h=l-o+1,d=t.getImageData(c,o,u,h);return e.width=u,e.height=h,t.clearRect(0,0,u,h),t.putImageData(d,0,0),e}function r(e,t,n,r){return{red:r[4*(n*t+e)],green:r[4*(n*t+e)+1],blue:r[4*(n*t+e)+2],alpha:r[4*(n*t+e)+3]}}function i(e,t,n,i){return r(e,t,n,i).alpha}function a(e,t,n,r){for(var a=e?1:-1,s=e?0:n-1;e?s-1;s+=a)for(var o=0;o-1;s+=a)for(var o=0;o{"use strict";e.exports=n(799)},672:(e,t,n)=>{"use strict";var r=n(43);function i(e){var t="https://react.dev/errors/"+e;if(1{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:i,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=i,t.jsxs=i},853:(e,t,n)=>{"use strict";e.exports=n(896)},896:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(!(0>>1;ra(l,n))ca(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[o]=n,r=o);else{if(!(ca(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],u=[],h=1,d=null,p=3,f=!1,m=!1,g=!1,b="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,y="undefined"!==typeof setImmediate?setImmediate:null;function x(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,x(e),!m)if(null!==r(c))m=!0,P();else{var t=r(u);null!==t&&N(w,t.startTime-e)}}var k,_=!1,S=-1,M=5,C=-1;function T(){return!(t.unstable_now()-Ce&&T());){var s=d.callback;if("function"===typeof s){d.callback=null,p=d.priorityLevel;var o=s(d.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof o){d.callback=o,x(e),n=!0;break t}d===r(c)&&i(c),x(e)}else i(c);d=r(c)}if(null!==d)n=!0;else{var l=r(u);null!==l&&N(w,l.startTime-e),n=!1}}break e}finally{d=null,p=a,f=!1}n=void 0}}finally{n?k():_=!1}}}if("function"===typeof y)k=function(){y(E)};else if("undefined"!==typeof MessageChannel){var z=new MessageChannel,A=z.port2;z.port1.onmessage=E,k=function(){A.postMessage(null)}}else k=function(){b(E,0)};function P(){_||(_=!0,k())}function N(e,n){S=b((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,P())},t.unstable_forceFrameRate=function(e){0>e||125s?(e.sortIndex=a,n(u,e),null===r(c)&&e===r(u)&&(g?(v(S),S=-1):g=!0,N(w,a-s))):(e.sortIndex=o,n(c,e),m||f||(m=!0,P())),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(672)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>st,hasStandardBrowserEnv:()=>lt,hasStandardBrowserWebWorkerEnv:()=>ct,navigator:()=>ot,origin:()=>ut});var t,r=n(43),i=n(391);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}const f=(0,r.createContext)(null);const m=(0,r.createContext)(null);const g=(0,r.createContext)({outlet:null,matches:[]});function b(e,t){if(!e)throw new Error(t)}function v(e,t,n){void 0===n&&(n="/");let r=P(("string"===typeof t?p(t):t).pathname||"/",n);if(null==r)return null;let i=y(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let s=0;null==a&&s{let a={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(a.relativePath.startsWith(r)||b(!1),a.relativePath=a.relativePath.slice(r.length));let s=N([r,a.relativePath]),o=n.concat(a);e.children&&e.children.length>0&&(!0===e.index&&b(!1),y(e.children,t,o,s)),(null!=e.path||e.index)&&t.push({path:s,score:T(s,e.index),routesMeta:o})})),t}const x=/^:\w+$/,w=3,k=2,_=1,S=10,M=-2,C=e=>"*"===e;function T(e,t){let n=e.split("/"),r=n.length;return n.some(C)&&(r+=M),t&&(r+=k),n.filter((e=>!C(e))).reduce(((e,t)=>e+(x.test(t)?w:""===t?_:S)),r)}function E(e,t){let{routesMeta:n}=e,r={},i="/",a=[];for(let s=0;s(r.push(t),"([^\\/]+)")));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):i+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)";let a=new RegExp(i,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),o=i.slice(1),l=r.reduce(((e,t,n)=>{if("*"===t){let e=o[n]||"";s=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e){try{return decodeURIComponent(e)}catch(t){return e}}(o[n]||""),e}),{});return{params:l,pathname:a,pathnameBase:s,pattern:e}}function A(e,t,n){let r,i="string"===typeof e?p(e):e,a=""===e||""===i.pathname?"/":i.pathname;if(null==a)r=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}r=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?p(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:R(r),hash:j(i)}}(i,r);return a&&"/"!==a&&a.endsWith("/")&&!s.pathname.endsWith("/")&&(s.pathname+="/"),s}function P(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}const N=e=>e.join("/").replace(/\/\/+/g,"/"),O=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",j=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function L(e){D()||b(!1);let{basename:t,navigator:n}=(0,r.useContext)(f),{hash:i,pathname:a,search:s}=F(e),o=a;if("/"!==t){let n=function(e){return""===e||""===e.pathname?"/":"string"===typeof e?p(e).pathname:e.pathname}(e),r=null!=n&&n.endsWith("/");o="/"===a?t+(r?"/":""):N([t,a])}return n.createHref({pathname:o,search:s,hash:i})}function D(){return null!=(0,r.useContext)(m)}function I(){return D()||b(!1),(0,r.useContext)(m).location}function B(){D()||b(!1);let{basename:e,navigator:t}=(0,r.useContext)(f),{matches:n}=(0,r.useContext)(g),{pathname:i}=I(),a=JSON.stringify(n.map((e=>e.pathnameBase))),s=(0,r.useRef)(!1);(0,r.useEffect)((()=>{s.current=!0}));let o=(0,r.useCallback)((function(n,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof n)return void t.go(n);let o=A(n,JSON.parse(a),i);"/"!==e&&(o.pathname=N([e,o.pathname])),(r.replace?t.replace:t.push)(o,r.state)}),[e,t,a,i]);return o}function F(e){let{matches:t}=(0,r.useContext)(g),{pathname:n}=I(),i=JSON.stringify(t.map((e=>e.pathnameBase)));return(0,r.useMemo)((()=>A(e,JSON.parse(i),n)),[e,i,n])}function H(e,t){return void 0===t&&(t=[]),null==e?null:e.reduceRight(((n,i,a)=>(0,r.createElement)(g.Provider,{children:void 0!==i.route.element?i.route.element:n,value:{outlet:n,matches:t.concat(e.slice(0,a+1))}})),null)}function q(e){let{to:t,replace:n,state:i}=e;D()||b(!1);let a=B();return(0,r.useEffect)((()=>{a(t,{replace:n,state:i})})),null}function $(e){b(!1)}function U(e){let{basename:n="/",children:i=null,location:a,navigationType:s=t.Pop,navigator:o,static:l=!1}=e;D()&&b(!1);let c=O(n),u=(0,r.useMemo)((()=>({basename:c,navigator:o,static:l})),[c,o,l]);"string"===typeof a&&(a=p(a));let{pathname:h="/",search:d="",hash:g="",state:v=null,key:y="default"}=a,x=(0,r.useMemo)((()=>{let e=P(h,c);return null==e?null:{pathname:e,search:d,hash:g,state:v,key:y}}),[c,h,d,g,v,y]);return null==x?null:(0,r.createElement)(f.Provider,{value:u},(0,r.createElement)(m.Provider,{children:i,value:{location:x,navigationType:s}}))}function V(e){let{children:t,location:n}=e;return function(e,t){D()||b(!1);let{matches:n}=(0,r.useContext)(g),i=n[n.length-1],a=i?i.params:{},s=(i&&i.pathname,i?i.pathnameBase:"/");i&&i.route;let o,l=I();if(t){var c;let e="string"===typeof t?p(t):t;"/"===s||(null==(c=e.pathname)?void 0:c.startsWith(s))||b(!1),o=e}else o=l;let u=o.pathname||"/",h=v(e,{pathname:"/"===s?u:u.slice(s.length)||"/"});return H(h&&h.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:N([s,e.pathname]),pathnameBase:"/"===e.pathnameBase?s:N([s,e.pathnameBase])}))),n)}(W(t),n)}function W(e){let t=[];return r.Children.forEach(e,(e=>{if(!(0,r.isValidElement)(e))return;if(e.type===r.Fragment)return void t.push.apply(t,W(e.props.children));e.type!==$&&b(!1);let n={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(n.children=W(e.props.children)),t.push(n)})),t}function Y(){return Y=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}const Q=["onClick","reloadDocument","replace","state","target","to"],X=["aria-current","caseSensitive","className","end","style","to","children"];function K(e){let{basename:n,children:i,window:f}=e,m=(0,r.useRef)();null==m.current&&(m.current=function(e){void 0===e&&(e={});var n=e.window,r=void 0===n?document.defaultView:n,i=r.history;function f(){var e=r.location,t=e.pathname,n=e.search,a=e.hash,o=i.state||{};return[o.idx,s({pathname:t,search:n,hash:a,state:o.usr||null,key:o.key||"default"})]}var m=null;r.addEventListener(l,(function(){if(m)w.call(m),m=null;else{var e=t.Pop,n=f(),r=n[0],i=n[1];if(w.length){if(null!=r){var a=v-r;a&&(m={action:e,location:i,retry:function(){T(-1*a)}},T(a))}}else C(e)}}));var g=t.Pop,b=f(),v=b[0],y=b[1],x=u(),w=u();function k(e){return"string"===typeof e?e:d(e)}function _(e,t){return void 0===t&&(t=null),s(a({pathname:y.pathname,hash:"",search:""},"string"===typeof e?p(e):e,{state:t,key:h()}))}function S(e,t){return[{usr:e.state,key:e.key,idx:t},k(e)]}function M(e,t,n){return!w.length||(w.call({action:e,location:t,retry:n}),!1)}function C(e){g=e;var t=f();v=t[0],y=t[1],x.call({action:g,location:y})}function T(e){i.go(e)}null==v&&(v=0,i.replaceState(a({},i.state,{idx:v}),""));var E={get action(){return g},get location(){return y},createHref:k,push:function e(n,a){var s=t.Push,o=_(n,a);if(M(s,o,(function(){e(n,a)}))){var l=S(o,v+1),c=l[0],u=l[1];try{i.pushState(c,"",u)}catch(h){r.location.assign(u)}C(s)}},replace:function e(n,r){var a=t.Replace,s=_(n,r);if(M(a,s,(function(){e(n,r)}))){var o=S(s,v),l=o[0],c=o[1];i.replaceState(l,"",c),C(a)}},go:T,back:function(){T(-1)},forward:function(){T(1)},listen:function(e){return x.push(e)},block:function(e){var t=w.push(e);return 1===w.length&&r.addEventListener(o,c),function(){t(),w.length||r.removeEventListener(o,c)}}};return E}({window:f}));let g=m.current,[b,v]=(0,r.useState)({action:g.action,location:g.location});return(0,r.useLayoutEffect)((()=>g.listen(v)),[g]),(0,r.createElement)(U,{basename:n,children:i,location:b.location,navigationType:b.action,navigator:g})}const J=(0,r.forwardRef)((function(e,t){let{onClick:n,reloadDocument:i,replace:a=!1,state:s,target:o,to:l}=e,c=G(e,Q),u=L(l),h=function(e,t){let{target:n,replace:i,state:a}=void 0===t?{}:t,s=B(),o=I(),l=F(e);return(0,r.useCallback)((t=>{if(0===t.button&&(!n||"_self"===n)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t)){t.preventDefault();let n=!!i||d(o)===d(l);s(e,{replace:n,state:a})}}),[o,s,l,i,a,n,e])}(l,{replace:a,state:s,target:o});return(0,r.createElement)("a",Y({},c,{href:u,onClick:function(e){n&&n(e),e.defaultPrevented||i||h(e)},ref:t,target:o}))}));const Z=(0,r.forwardRef)((function(e,t){let{"aria-current":n="page",caseSensitive:i=!1,className:a="",end:s=!1,style:o,to:l,children:c}=e,u=G(e,X),h=I(),d=F(l),p=h.pathname,f=d.pathname;i||(p=p.toLowerCase(),f=f.toLowerCase());let m,g=p===f||!s&&p.startsWith(f)&&"/"===p.charAt(f.length),b=g?n:void 0;m="function"===typeof a?a({isActive:g}):[a,g?"active":null].filter(Boolean).join(" ");let v="function"===typeof o?o({isActive:g}):o;return(0,r.createElement)(J,Y({},u,{"aria-current":b,className:m,ref:t,style:v,to:l}),"function"===typeof c?c({isActive:g}):c)}));function ee(e){let t=(0,r.useRef)(te(e)),n=I(),i=(0,r.useMemo)((()=>{let e=te(n.search);for(let n of t.current.keys())e.has(n)||t.current.getAll(n).forEach((t=>{e.append(n,t)}));return e}),[n.search]),a=B();return[i,(0,r.useCallback)(((e,t)=>{a("?"+te(e),t)}),[a])]}function te(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}function ne(e,t){return function(){return e.apply(t,arguments)}}const{toString:re}=Object.prototype,{getPrototypeOf:ie}=Object,{iterator:ae,toStringTag:se}=Symbol,oe=(le=Object.create(null),e=>{const t=re.call(e);return le[t]||(le[t]=t.slice(8,-1).toLowerCase())});var le;const ce=e=>(e=e.toLowerCase(),t=>oe(t)===e),ue=e=>t=>typeof t===e,{isArray:he}=Array,de=ue("undefined");const pe=ce("ArrayBuffer");const fe=ue("string"),me=ue("function"),ge=ue("number"),be=e=>null!==e&&"object"===typeof e,ve=e=>{if("object"!==oe(e))return!1;const t=ie(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(se in e)&&!(ae in e)},ye=ce("Date"),xe=ce("File"),we=ce("Blob"),ke=ce("FileList"),_e=ce("URLSearchParams"),[Se,Me,Ce,Te]=["ReadableStream","Request","Response","Headers"].map(ce);function Ee(e,t){let n,r,{allOwnKeys:i=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),he(e))for(n=0,r=e.length;n0;)if(r=n[i],t===r.toLowerCase())return r;return null}const Ae="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,Pe=e=>!de(e)&&e!==Ae;const Ne=(Oe="undefined"!==typeof Uint8Array&&ie(Uint8Array),e=>Oe&&e instanceof Oe);var Oe;const Re=ce("HTMLFormElement"),je=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),Le=ce("RegExp"),De=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ee(n,((n,i)=>{let a;!1!==(a=t(n,i,e))&&(r[i]=a||n)})),Object.defineProperties(e,r)};const Ie=ce("AsyncFunction"),Be=((e,t)=>{return e?setImmediate:t?(n=`axios@${Math.random()}`,r=[],Ae.addEventListener("message",(e=>{let{source:t,data:i}=e;t===Ae&&i===n&&r.length&&r.shift()()}),!1),e=>{r.push(e),Ae.postMessage(n,"*")}):e=>setTimeout(e);var n,r})("function"===typeof setImmediate,me(Ae.postMessage)),Fe="undefined"!==typeof queueMicrotask?queueMicrotask.bind(Ae):"undefined"!==typeof process&&process.nextTick||Be,He={isArray:he,isArrayBuffer:pe,isBuffer:function(e){return null!==e&&!de(e)&&null!==e.constructor&&!de(e.constructor)&&me(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||me(e.append)&&("formdata"===(t=oe(e))||"object"===t&&me(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&pe(e.buffer),t},isString:fe,isNumber:ge,isBoolean:e=>!0===e||!1===e,isObject:be,isPlainObject:ve,isReadableStream:Se,isRequest:Me,isResponse:Ce,isHeaders:Te,isUndefined:de,isDate:ye,isFile:xe,isBlob:we,isRegExp:Le,isFunction:me,isStream:e=>be(e)&&me(e.pipe),isURLSearchParams:_e,isTypedArray:Ne,isFileList:ke,forEach:Ee,merge:function e(){const{caseless:t}=Pe(this)&&this||{},n={},r=(r,i)=>{const a=t&&ze(n,i)||i;ve(n[a])&&ve(r)?n[a]=e(n[a],r):ve(r)?n[a]=e({},r):he(r)?n[a]=r.slice():n[a]=r};for(let i=0,a=arguments.length;i3&&void 0!==arguments[3]?arguments[3]:{};return Ee(t,((t,r)=>{n&&me(t)?e[r]=ne(t,n):e[r]=t}),{allOwnKeys:r}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,a,s;const o={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],r&&!r(s,e,t)||o[s]||(t[s]=e[s],o[s]=!0);e=!1!==n&&ie(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:oe,kindOfTest:ce,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(he(e))return e;let t=e.length;if(!ge(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[ae]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Re,hasOwnProperty:je,hasOwnProp:je,reduceDescriptors:De,freezeMethods:e=>{De(e,((t,n)=>{if(me(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];me(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return he(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ze,global:Ae,isContextDefined:Pe,isSpecCompliantForm:function(e){return!!(e&&me(e.append)&&"FormData"===e[se]&&e[ae])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(be(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=he(e)?[]:{};return Ee(e,((e,t)=>{const a=n(e,r+1);!de(a)&&(i[t]=a)})),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:Ie,isThenable:e=>e&&(be(e)||me(e))&&me(e.then)&&me(e.catch),setImmediate:Be,asap:Fe,isIterable:e=>null!=e&&me(e[ae])};function qe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}He.inherits(qe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:He.toJSONObject(this.config),code:this.code,status:this.status}}});const $e=qe.prototype,Ue={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Ue[e]={value:e}})),Object.defineProperties(qe,Ue),Object.defineProperty($e,"isAxiosError",{value:!0}),qe.from=(e,t,n,r,i,a)=>{const s=Object.create($e);return He.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),qe.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const Ve=qe;function We(e){return He.isPlainObject(e)||He.isArray(e)}function Ye(e){return He.endsWith(e,"[]")?e.slice(0,-2):e}function Ge(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ye(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Qe=He.toFlatObject(He,{},null,(function(e){return/^is[A-Z]/.test(e)}));const Xe=function(e,t,n){if(!He.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=He.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!He.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,a=n.dots,s=n.indexes,o=(n.Blob||"undefined"!==typeof Blob&&Blob)&&He.isSpecCompliantForm(t);if(!He.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(He.isDate(e))return e.toISOString();if(He.isBoolean(e))return e.toString();if(!o&&He.isBlob(e))throw new Ve("Blob is not supported. Use a Buffer instead.");return He.isArrayBuffer(e)||He.isTypedArray(e)?o&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){let o=e;if(e&&!i&&"object"===typeof e)if(He.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(He.isArray(e)&&function(e){return He.isArray(e)&&!e.some(We)}(e)||(He.isFileList(e)||He.endsWith(n,"[]"))&&(o=He.toArray(e)))return n=Ye(n),o.forEach((function(e,r){!He.isUndefined(e)&&null!==e&&t.append(!0===s?Ge([n],r,a):null===s?n:n+"[]",l(e))})),!1;return!!We(e)||(t.append(Ge(i,n,a),l(e)),!1)}const u=[],h=Object.assign(Qe,{defaultVisitor:c,convertValue:l,isVisitable:We});if(!He.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!He.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),He.forEach(n,(function(n,a){!0===(!(He.isUndefined(n)||null===n)&&i.call(t,n,He.isString(a)?a.trim():a,r,h))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t};function Ke(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Je(e,t){this._pairs=[],e&&Xe(e,this,t)}const Ze=Je.prototype;Ze.append=function(e,t){this._pairs.push([e,t])},Ze.toString=function(e){const t=e?function(t){return e.call(this,t,Ke)}:Ke;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const et=Je;function tt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,n){if(!t)return e;const r=n&&n.encode||tt;He.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(a=i?i(t,n):He.isURLSearchParams(t)?t.toString():new et(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const rt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){He.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},it={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},at={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:et,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},st="undefined"!==typeof window&&"undefined"!==typeof document,ot="object"===typeof navigator&&navigator||void 0,lt=st&&(!ot||["ReactNative","NativeScript","NS"].indexOf(ot.product)<0),ct="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,ut=st&&window.location.href||"http://localhost",ht={...e,...at};const dt=function(e){function t(e,n,r,i){let a=e[i++];if("__proto__"===a)return!0;const s=Number.isFinite(+a),o=i>=e.length;if(a=!a&&He.isArray(r)?r.length:a,o)return He.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!s;r[a]&&He.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],i)&&He.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r{t(function(e){return He.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const pt={transitional:it,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=He.isObject(e);i&&He.isHTMLForm(e)&&(e=new FormData(e));if(He.isFormData(e))return r?JSON.stringify(dt(e)):e;if(He.isArrayBuffer(e)||He.isBuffer(e)||He.isStream(e)||He.isFile(e)||He.isBlob(e)||He.isReadableStream(e))return e;if(He.isArrayBufferView(e))return e.buffer;if(He.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Xe(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ht.isNode&&He.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=He.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Xe(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(He.isString(e))try{return(t||JSON.parse)(e),He.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||pt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(He.isResponse(e)||He.isReadableStream(e))return e;if(e&&He.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(i){if(n){if("SyntaxError"===i.name)throw Ve.from(i,Ve.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};He.forEach(["delete","get","head","post","put","patch"],(e=>{pt.headers[e]={}}));const ft=pt,mt=He.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gt=Symbol("internals");function bt(e){return e&&String(e).trim().toLowerCase()}function vt(e){return!1===e||null==e?e:He.isArray(e)?e.map(vt):String(e)}function yt(e,t,n,r,i){return He.isFunction(r)?r.call(this,t,n):(i&&(t=n),He.isString(t)?He.isString(r)?-1!==t.indexOf(r):He.isRegExp(r)?r.test(t):void 0:void 0)}class xt{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=bt(t);if(!i)throw new Error("header name must be a non-empty string");const a=He.findKey(r,i);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=vt(e))}const a=(e,t)=>He.forEach(e,((e,n)=>i(e,n,t)));if(He.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(He.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&mt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(He.isObject(e)&&He.isIterable(e)){let n,r,i={};for(const t of e){if(!He.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(n=i[r])?He.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(i,t)}else null!=e&&i(t,e,n);return this}get(e,t){if(e=bt(e)){const n=He.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(He.isFunction(t))return t.call(this,e,n);if(He.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=bt(e)){const n=He.findKey(this,e);return!(!n||void 0===this[n]||t&&!yt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=bt(e)){const i=He.findKey(n,e);!i||t&&!yt(0,n[i],i,t)||(delete n[i],r=!0)}}return He.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!yt(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return He.forEach(this,((r,i)=>{const a=He.findKey(n,i);if(a)return t[a]=vt(r),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete t[i],t[s]=vt(r),n[s]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n{null!=n&&!1!==n&&(t[r]=e&&He.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,n]=e;return t+": "+n})).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;it.set(e))),t}static accessor(e){const t=(this[gt]=this[gt]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=bt(e);t[r]||(!function(e,t){const n=He.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return He.isArray(e)?e.forEach(r):r(e),this}}xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),He.reduceDescriptors(xt.prototype,((e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}})),He.freezeMethods(xt);const wt=xt;function kt(e,t){const n=this||ft,r=t||n,i=wt.from(r.headers);let a=r.data;return He.forEach(e,(function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)})),i.normalize(),a}function _t(e){return!(!e||!e.__CANCEL__)}function St(e,t,n){Ve.call(this,null==e?"canceled":e,Ve.ERR_CANCELED,t,n),this.name="CanceledError"}He.inherits(St,Ve,{__CANCEL__:!0});const Mt=St;function Ct(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Tt=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,a=0,s=0;return t=void 0!==t?t:1e3,function(o){const l=Date.now(),c=r[s];i||(i=l),n[a]=o,r[a]=l;let u=s,h=0;for(;u!==a;)h+=n[u++],u%=e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),l-i1&&void 0!==arguments[1]?arguments[1]:Date.now();i=a,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[function(){const e=Date.now(),t=e-i;for(var o=arguments.length,l=new Array(o),c=0;c=a?s(l,e):(n=l,r||(r=setTimeout((()=>{r=null,s(n)}),a-t)))},()=>n&&s(n)]},zt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const i=Tt(50,250);return Et((n=>{const a=n.loaded,s=n.lengthComputable?n.total:void 0,o=a-r,l=i(o);r=a;e({loaded:a,total:s,progress:s?a/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&a<=s?(s-a)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),n)},At=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pt=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;re(...n)))},Nt=ht.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ht.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ht.origin),ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent)):()=>!0,Ot=ht.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const s=[e+"="+encodeURIComponent(t)];He.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),He.isString(r)&&s.push("path="+r),He.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Rt(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const jt=e=>e instanceof wt?{...e}:e;function Lt(e,t){t=t||{};const n={};function r(e,t,n,r){return He.isPlainObject(e)&&He.isPlainObject(t)?He.merge.call({caseless:r},e,t):He.isPlainObject(t)?He.merge({},t):He.isArray(t)?t.slice():t}function i(e,t,n,i){return He.isUndefined(t)?He.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function a(e,t){if(!He.isUndefined(t))return r(void 0,t)}function s(e,t){return He.isUndefined(t)?He.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function o(n,i,a){return a in t?r(n,i):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(e,t,n)=>i(jt(e),jt(t),0,!0)};return He.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=l[r]||i,s=a(e[r],t[r],r);He.isUndefined(s)&&a!==o||(n[r]=s)})),n}const Dt=e=>{const t=Lt({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:s,headers:o,auth:l}=t;if(t.headers=o=wt.from(o),t.url=nt(Rt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),He.isFormData(r))if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(!1!==(n=o.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}if(ht.hasStandardBrowserEnv&&(i&&He.isFunction(i)&&(i=i(t)),i||!1!==i&&Nt(t.url))){const e=a&&s&&Ot.read(s);e&&o.set(a,e)}return t},It="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Dt(e);let i=r.data;const a=wt.from(r.headers).normalize();let s,o,l,c,u,{responseType:h,onUploadProgress:d,onDownloadProgress:p}=r;function f(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=wt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ct((function(e){t(e),f()}),(function(e){n(e),f()}),{data:h&&"text"!==h&&"json"!==h?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Ve("Request aborted",Ve.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Ve("Network Error",Ve.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||it;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ve(t,i.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,m)),m=null},void 0===i&&a.setContentType(null),"setRequestHeader"in m&&He.forEach(a.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),He.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),h&&"json"!==h&&(m.responseType=r.responseType),p&&([l,u]=zt(p,!0),m.addEventListener("progress",l)),d&&m.upload&&([o,c]=zt(d),m.upload.addEventListener("progress",o),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(s=t=>{m&&(n(!t||t.type?new Mt(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===ht.protocols.indexOf(b)?n(new Ve("Unsupported protocol "+b+":",Ve.ERR_BAD_REQUEST,e)):m.send(i||null)}))},Bt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ve?t:new Mt(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{a=null,i(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))}),t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:o}=r;return o.unsubscribe=()=>He.asap(s),o}},Ft=function*(e,t){let n=e.byteLength;if(!t||n{const i=async function*(e,t){for await(const n of Ht(e))yield*Ft(n,t)}(e,t);let a,s=0,o=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return o(),void e.close();let a=r.byteLength;if(n){let e=s+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw o(t),t}},cancel:e=>(o(e),i.return())},{highWaterMark:2})},$t="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,Ut=$t&&"function"===typeof ReadableStream,Vt=$t&&("function"===typeof TextEncoder?(Wt=new TextEncoder,e=>Wt.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Wt;const Yt=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{let e=!1;const t=new Request(ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Qt=Ut&&Yt((()=>He.isReadableStream(new Response("").body))),Xt={stream:Qt&&(e=>e.body)};var Kt;$t&&(Kt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Xt[e]&&(Xt[e]=He.isFunction(Kt[e])?t=>t[e]():(t,n)=>{throw new Ve(`Response type '${e}' is not supported`,Ve.ERR_NOT_SUPPORT,n)})})));const Jt=async(e,t)=>{const n=He.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(He.isBlob(e))return e.size;if(He.isSpecCompliantForm(e)){const t=new Request(ht.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return He.isArrayBufferView(e)||He.isArrayBuffer(e)?e.byteLength:(He.isURLSearchParams(e)&&(e+=""),He.isString(e)?(await Vt(e)).byteLength:void 0)})(t):n},Zt=$t&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:s,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:d}=Dt(e);c=c?(c+"").toLowerCase():"text";let p,f=Bt([i,a&&a.toAbortSignal()],s);const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let g;try{if(l&&Gt&&"get"!==n&&"head"!==n&&0!==(g=await Jt(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(He.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=At(g,zt(Pt(l)));r=qt(n.body,65536,e,t)}}He.isString(h)||(h=h?"include":"omit");const i="credentials"in Request.prototype;p=new Request(t,{...d,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:i?h:void 0});let a=await fetch(p,d);const s=Qt&&("stream"===c||"response"===c);if(Qt&&(o||s&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=a[t]}));const t=He.toFiniteNumber(a.headers.get("content-length")),[n,r]=o&&At(t,zt(Pt(o),!0))||[];a=new Response(qt(a.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let b=await Xt[He.findKey(Xt,c)||"text"](a,e);return!s&&m&&m(),await new Promise(((t,n)=>{Ct(t,n,{data:b,headers:wt.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:p})}))}catch(b){if(m&&m(),b&&"TypeError"===b.name&&/Load failed|fetch/i.test(b.message))throw Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,p),{cause:b.cause||b});throw Ve.from(b,b&&b.code,e,p)}}),en={http:null,xhr:It,fetch:Zt};He.forEach(en,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const tn=e=>`- ${e}`,nn=e=>He.isFunction(e)||null===e||!1===e,rn=e=>{e=He.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a{let[t,n]=e;return`adapter ${t} `+(!1===n?"is not supported by the environment":"is not available in the build")}));let n=t?e.length>1?"since :\n"+e.map(tn).join("\n"):" "+tn(e[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function an(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mt(null,e)}function sn(e){an(e),e.headers=wt.from(e.headers),e.data=kt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return rn(e.adapter||ft.adapter)(e).then((function(t){return an(e),t.data=kt.call(e,e.transformResponse,t),t.headers=wt.from(t.headers),t}),(function(t){return _t(t)||(an(e),t&&t.response&&(t.response.data=kt.call(e,e.transformResponse,t.response),t.response.headers=wt.from(t.response.headers))),Promise.reject(t)}))}const on="1.10.0",ln={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ln[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const cn={};ln.transitional=function(e,t,n){function r(e,t){return"[Axios v"+on+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,a)=>{if(!1===e)throw new Ve(r(i," has been removed"+(t?" in "+t:"")),Ve.ERR_DEPRECATED);return t&&!cn[i]&&(cn[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}},ln.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const un={assertOptions:function(e,t,n){if("object"!==typeof e)throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],s=t[a];if(s){const t=e[a],n=void 0===t||s(t,a,e);if(!0!==n)throw new Ve("option "+a+" must be "+n,Ve.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ve("Unknown option "+a,Ve.ERR_BAD_OPTION)}},validators:ln},hn=un.validators;class dn{constructor(e){this.defaults=e||{},this.interceptors={request:new rt,response:new rt}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=Lt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&un.assertOptions(n,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean)},!1),null!=r&&(He.isFunction(r)?t.paramsSerializer={serialize:r}:un.assertOptions(r,{encode:hn.function,serialize:hn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),un.assertOptions(t,{baseUrl:hn.spelling("baseURL"),withXsrfToken:hn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&He.merge(i.common,i[t.method]);i&&He.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=wt.concat(a,i);const s=[];let o=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,h=0;if(!o){const e=[sn.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);h{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new Mt(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new fn((function(t){e=t})),cancel:e}}}const mn=fn;const gn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gn).forEach((e=>{let[t,n]=e;gn[n]=t}));const bn=gn;const vn=function e(t){const n=new pn(t),r=ne(pn.prototype.request,n);return He.extend(r,pn.prototype,n,{allOwnKeys:!0}),He.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Lt(t,n))},r}(ft);vn.Axios=pn,vn.CanceledError=Mt,vn.CancelToken=mn,vn.isCancel=_t,vn.VERSION=on,vn.toFormData=Xe,vn.AxiosError=Ve,vn.Cancel=vn.CanceledError,vn.all=function(e){return Promise.all(e)},vn.spread=function(e){return function(t){return e.apply(null,t)}},vn.isAxiosError=function(e){return He.isObject(e)&&!0===e.isAxiosError},vn.mergeConfig=Lt,vn.AxiosHeaders=wt,vn.formToJSON=e=>dt(He.isHTMLForm(e)?new FormData(e):e),vn.getAdapter=rn,vn.HttpStatusCode=bn,vn.default=vn;const yn=vn;var xn=n(579);const wn="https://api.racine-ai.com",kn=(0,r.createContext)(),_n=()=>(0,r.useContext)(kn);function Sn(e){let{children:t}=e;const[n,i]=(0,r.useState)(null),[a,s]=(0,r.useState)(!0),o=(0,r.useCallback)((async()=>{try{const{data:e}=await yn.get(`${wn}/auth/me`,{withCredentials:!0});i(e)}catch{i(null)}finally{s(!1)}}),[]);(0,r.useEffect)((()=>{o()}),[o]);const l={user:n,loading:a,signUp:async(e,t)=>{await yn.post(`${wn}/auth/signup`,{email:e,password:t},{withCredentials:!0}),await o()},login:async(e,t)=>{await yn.post(`${wn}/auth/login`,{email:e,password:t},{withCredentials:!0}),await o()},logout:async()=>{await yn.post(`${wn}/auth/logout`,{},{withCredentials:!0}),i(null)},googleLogin:()=>{window.location.href=`${wn}/auth/google/login`}};return(0,xn.jsx)(kn.Provider,{value:l,children:t})}function Mn(e){let{children:t}=e;const{user:n,loading:r}=_n();return r?null:n?t:(0,xn.jsx)(q,{to:"/signin",replace:!0})}var Cn={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Tn=r.createContext&&r.createContext(Cn),En=["attr","size","title"];function zn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function An(){return An=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement(e.tag,Nn({key:t},e.attr),Rn(e.child))))}function jn(e){return t=>r.createElement(Ln,An({attr:Nn({},e.attr)},t),Rn(e.child))}function Ln(e){var t=t=>{var n,{attr:i,size:a,title:s}=e,o=zn(e,En),l=a||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),r.createElement("svg",An({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,o,{className:n,style:Nn(Nn({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&r.createElement("title",null,s),e.children)};return void 0!==Tn?r.createElement(Tn.Consumer,null,(e=>t(e))):t(Cn)}function Dn(e){return jn({tag:"svg",attr:{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r\n\tc0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r\n\tc0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"},child:[]},{tag:"path",attr:{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r\n\tC34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"},child:[]},{tag:"path",attr:{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r\n\tc-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"},child:[]},{tag:"path",attr:{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r\n\tc0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"},child:[]}]})(e)}const In="Auth_wrapper__OMtgK",Bn="Auth_form__9UsPq",Fn="Auth_switch__5+YP2",Hn="Auth_primary__+oMhU",qn="Auth_google__oIa61",$n="Auth_err__Jy-xX";function Un(){const[e,t]=(0,r.useState)(""),[n,i]=(0,r.useState)(""),[a,s]=(0,r.useState)(""),o=B(),{login:l,googleLogin:c}=_n();return(0,xn.jsxs)("div",{className:In,children:[(0,xn.jsx)("h2",{children:"Sign\xa0in"}),(0,xn.jsxs)("form",{onSubmit:async t=>{t.preventDefault();try{await l(e,n),o("/")}catch{s("Invalid credentials")}},className:Bn,children:[(0,xn.jsx)("input",{type:"email",placeholder:"Email",value:e,onChange:e=>t(e.target.value),required:!0}),(0,xn.jsx)("input",{type:"password",placeholder:"Password",value:n,onChange:e=>i(e.target.value),required:!0}),a&&(0,xn.jsx)("div",{className:$n,children:a}),(0,xn.jsx)("button",{className:Hn,children:"Sign\xa0in"})]}),(0,xn.jsxs)("button",{type:"button",className:qn,onClick:c,children:[(0,xn.jsx)(Dn,{size:20})," Continue with Google"]}),(0,xn.jsxs)("p",{className:Fn,children:["No account? ",(0,xn.jsx)(J,{to:"/signup",children:"Sign\xa0up"})]})]})}function Vn(){const[e,t]=(0,r.useState)(""),[n,i]=(0,r.useState)(""),[a,s]=(0,r.useState)(""),o=B(),{signUp:l}=_n();return(0,xn.jsxs)("div",{className:In,children:[(0,xn.jsx)("h2",{children:"Create account"}),(0,xn.jsxs)("form",{onSubmit:async t=>{t.preventDefault();try{await l(e,n),o("/")}catch{s("Email already exists")}},className:Bn,children:[(0,xn.jsx)("input",{type:"email",placeholder:"Email",value:e,onChange:e=>t(e.target.value),required:!0}),(0,xn.jsx)("input",{type:"password",placeholder:"Password",value:n,onChange:e=>i(e.target.value),required:!0}),a&&(0,xn.jsx)("div",{className:$n,children:a}),(0,xn.jsx)("button",{className:Hn,children:"Sign\xa0up"})]}),(0,xn.jsxs)("p",{className:Fn,children:["Already have an account? ",(0,xn.jsx)(J,{to:"/signin",children:"Sign\xa0in"})]})]})}const Wn="StatCard_statCard__iQtRe",Yn="StatCard_statIcon__Ac6Zy",Gn="StatCard_textBlock__xmAkU",Qn="StatCard_value__cyg0A",Xn="StatCard_label__hEHjj";const Kn=function(e){let{icon:t,label:n,value:r}=e;return(0,xn.jsxs)("div",{className:Wn,children:[(0,xn.jsx)("span",{className:Yn,children:t}),(0,xn.jsxs)("div",{className:Gn,children:[(0,xn.jsx)("span",{className:Qn,children:r}),(0,xn.jsx)("span",{className:Xn,children:n})]})]})},Jn="ResumeCard_resumeCard__ay1Ga",Zn="ResumeCard_mainRow__CenXZ",er="ResumeCard_mainIcon__M0fzM",tr="ResumeCard_textColumn__e4RIg",nr="ResumeCard_title__xs-Ji",rr="ResumeCard_subtitle__Lbgw0",ir="ResumeCard_statsRow__QIWxh",ar="ResumeCard_statItem__iR4qM",sr="ResumeCard_statIcon__GXiKA",or="ResumeCard_spacer__+DJ2S",lr="ResumeCard_progressBar__fH60D",cr="ResumeCard_progressFill__obUHo",ur="ResumeCard_startSessionBtn__ziP5q";const hr=function(e){let{icon:t,title:n,subtitle:r,stats:i=[],progress:a,buttonLabel:s,onButtonClick:o,link:l="#"}=e;const c=()=>{window.location.href=l};return(0,xn.jsxs)("div",{className:Jn,onClick:c,role:"link",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||c()},children:[(0,xn.jsxs)("div",{className:Zn,children:[(0,xn.jsx)("span",{alt:n,className:er,children:t}),(0,xn.jsxs)("div",{className:tr,children:[(0,xn.jsx)("h4",{className:nr,children:n}),(0,xn.jsx)("h5",{className:rr,children:r}),(0,xn.jsx)("div",{className:ir,children:i.map(((e,t)=>{const n=e.text.match(/^([\d.,%+]*)(.*)$/);if(n){const r=n[1],i=n[2].trim();return(0,xn.jsxs)("div",{className:ar,children:[(0,xn.jsx)("span",{alt:"stat-icon",className:sr,children:e.icon}),(0,xn.jsxs)("span",{children:[(0,xn.jsx)("b",{children:r}),i&&(0,xn.jsxs)(xn.Fragment,{children:[(0,xn.jsx)("br",{}),(0,xn.jsx)("i",{children:i})]})]})]},t)}return(0,xn.jsxs)("div",{className:ar,children:[(0,xn.jsx)("span",{alt:"stat-icon",className:sr,children:e.icon}),(0,xn.jsx)("span",{children:e.text})]},t)}))})]})]}),(0,xn.jsx)("div",{className:or}),"number"===typeof a&&(0,xn.jsx)("div",{className:lr,children:(0,xn.jsx)("div",{className:cr,style:{width:`${a}%`}})}),s&&(0,xn.jsx)("button",{onClick:o,className:ur,children:s})]})},dr="ModuleCard_moduleCard__qX64Y",pr="ModuleCard_mainIcon__2LMt-",fr="ModuleCard_title__6z8ad",mr="ModuleCard_topicRow__cbjGR",gr="ModuleCard_topicItem__AlHX1",br="ModuleCard_topicIcon__2cClX";const vr=function(e){let{icon:t,title:n,topics:r=[],link:i="#"}=e;const a=()=>{window.location.href=i};return(0,xn.jsxs)("div",{className:dr,onClick:a,role:"link",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||a()},children:[(0,xn.jsx)("span",{className:pr,children:t}),(0,xn.jsx)("h5",{className:fr,children:n}),(0,xn.jsx)("div",{className:mr,children:r.length>0?r.map(((e,t)=>(0,xn.jsxs)("div",{className:gr,children:[(0,xn.jsx)("span",{className:br,children:e.icon}),(0,xn.jsx)("span",{children:e.name})]},t))):null})]})},yr="Dashboard_dashboardWrapper__tQIWU",xr="Dashboard_mainContent__nt8o0",wr="Dashboard_header__ry6WN",kr="Dashboard_subheader__h7nvI",_r="Dashboard_statsSection__fMCpy",Sr="Dashboard_sectionTitle__mfWTU",Mr="Dashboard_resumeSection__iKOfw",Cr="Dashboard_divider__j8Orw",Tr="Dashboard_modulesSection__hWy1E",Er="Dashboard_moduleRow__VhgOZ";function zr(){return(0,xn.jsxs)("svg",{version:"1.1",id:"IconStreak",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st8 { fill: #EC6F59; }\n .st9 { fill: #FAD15C; }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("path",{class:"st8",d:"M18.61,54.89C15.7,28.8,30.94,10.45,59.52,0C42.02,22.71,74.44,47.31,76.23,70.89 c4.19-7.15,6.57-16.69,7.04-29.45c21.43,33.62,3.66,88.57-43.5,80.67c-4.33-0.72-8.5-2.09-12.3-4.13C10.27,108.8,0,88.79,0,69.68 C0,57.5,5.21,46.63,11.95,37.99C12.85,46.45,14.77,52.76,18.61,54.89L18.61,54.89z"}),(0,xn.jsx)("path",{class:"st9",d:"M33.87,92.58c-4.86-12.55-4.19-32.82,9.42-39.93c0.1,23.3,23.05,26.27,18.8,51.14 c3.92-4.44,5.9-11.54,6.25-17.15c6.22,14.24,1.34,25.63-7.53,31.43c-26.97,17.64-50.19-18.12-34.75-37.72 C26.53,84.73,31.89,91.49,33.87,92.58L33.87,92.58z"})]})]})}function Ar(){return(0,xn.jsxs)("svg",{viewBox:"0 0 130.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st2 { fill: var(--colorPurple); }\n .st3 { fill: var(--colorMint); }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("path",{class:"st0",d:"M69.43,4.04c0-2.22,2.19-4.04,4.92-4.04s4.92,1.8,4.92,4.04V21.7c0,2.22-2.19,4.04-4.92,4.04 s-4.92-1.8-4.92-4.04V4.04L69.43,4.04L69.43,4.04z M13.41,57.17c-0.28,0-0.53-1.23-0.53-2.73s0.22-2.72,0.53-2.72h13.44 c0.28,0,0.53,1.23,0.53,2.72c0,1.5-0.22,2.73-0.53,2.73H13.41L13.41,57.17L13.41,57.17z M34.82,57.17c-0.28,0-0.53-1.23-0.53-2.73 s0.22-2.72,0.53-2.72h13.44c0.28,0,0.53,1.23,0.53,2.72c0,1.5-0.22,2.73-0.53,2.73H34.82L34.82,57.17L34.82,57.17z M56.24,57.17 c-0.28,0-0.53-1.23-0.53-2.73s0.22-2.72,0.53-2.72h13.44c0.28,0,0.53,1.22,0.53,2.71c-1.35,0.84-2.64,1.75-3.88,2.74H56.24 L56.24,57.17L56.24,57.17z M13.44,72.8c-0.28,0-0.53-1.23-0.53-2.73c0-1.5,0.22-2.73,0.53-2.73h13.44c0.28,0,0.53,1.23,0.53,2.73 c0,1.51-0.22,2.73-0.53,2.73H13.44L13.44,72.8L13.44,72.8z M34.85,72.8c-0.28,0-0.53-1.23-0.53-2.73c0-1.5,0.22-2.73,0.53-2.73 h13.44c0.28,0,0.53,1.23,0.53,2.73c0,1.51-0.22,2.73-0.53,2.73H34.85L34.85,72.8L34.85,72.8z M13.46,88.43 c-0.28,0-0.53-1.23-0.53-2.73c0-1.51,0.22-2.73,0.53-2.73H26.9c0.28,0,0.53,1.23,0.53,2.73c0,1.5-0.22,2.73-0.53,2.73H13.46 L13.46,88.43L13.46,88.43z M34.88,88.43c-0.28,0-0.53-1.23-0.53-2.73c0-1.51,0.22-2.73,0.53-2.73h13.44c0.28,0,0.53,1.23,0.53,2.73 c0,1.5-0.22,2.73-0.53,2.73H34.88L34.88,88.43L34.88,88.43z M25.21,4.04C25.21,1.81,27.4,0,30.13,0c2.73,0,4.92,1.8,4.92,4.04V21.7 c0,2.22-2.2,4.04-4.92,4.04c-2.73,0-4.92-1.8-4.92-4.04V4.04L25.21,4.04L25.21,4.04z M5.42,38.61h93.77V18.28 c0-0.7-0.28-1.31-0.73-1.75c-0.45-0.45-1.09-0.73-1.75-0.73h-8.99c-1.51,0-2.73-1.23-2.73-2.73c0-1.5,1.22-2.73,2.73-2.73h8.99 c2.2,0,4.18,0.89,5.62,2.33c1.45,1.45,2.33,3.42,2.33,5.62v32.28c-1.79-0.62-3.64-1.12-5.53-1.49v-5.04h0.06H5.42V96.7 c0,0.7,0.28,1.31,0.73,1.75c0.45,0.45,1.09,0.73,1.75,0.73h44.56c0.51,1.89,1.15,3.74,1.91,5.51H7.95c-2.19,0-4.18-0.89-5.62-2.33 C0.89,100.92,0,98.95,0,96.75V18.3c0-2.19,0.89-4.18,2.33-5.62c1.45-1.45,3.42-2.33,5.62-2.33h9.6c1.5,0,2.73,1.23,2.73,2.73 s-1.23,2.73-2.73,2.73h-9.6c-0.7,0-1.31,0.28-1.75,0.73c-0.45,0.45-0.73,1.09-0.73,1.75v20.33L5.42,38.61L5.42,38.61L5.42,38.61z M42.93,15.8c-1.5,0-2.73-1.23-2.73-2.73c0-1.5,1.23-2.73,2.73-2.73h18.3c1.51,0,2.73,1.23,2.73,2.73c0,1.51-1.23,2.73-2.73,2.73 H42.93L42.93,15.8L42.93,15.8z"}),(0,xn.jsx)("path",{class:"st1",d:"M91.09,56.53c8.78,0,16.73,3.56,22.48,9.31c5.74,5.76,9.3,13.71,9.3,22.48s-3.56,16.73-9.3,22.48 c-5.76,5.75-13.71,9.31-22.48,9.31s-16.73-3.56-22.48-9.31c-5.75-5.76-9.31-13.71-9.31-22.48c0-8.77,3.56-16.73,9.31-22.48 C74.36,60.09,82.31,56.53,91.09,56.53L91.09,56.53z M77.09,91.7c-0.15-0.16-0.28-0.33-0.39-0.51c-0.12-0.18-0.21-0.37-0.3-0.57 c-0.28-0.66-0.35-1.36-0.23-2.04c0.12-0.67,0.42-1.31,0.9-1.83l0.18-0.18c1.19-1.13,2.99-1.34,4.4-0.49 c0.2,0.12,0.39,0.26,0.57,0.43l0.02,0.02c1,0.96,2.69,2.53,3.8,3.51l0.95,0.85l11.66-12.23c0.16-0.17,0.34-0.32,0.54-0.45 c0.2-0.14,0.4-0.25,0.61-0.34c0.21-0.09,0.44-0.17,0.67-0.22c0.23-0.05,0.47-0.08,0.7-0.08h0.01c0.23,0,0.46,0.01,0.69,0.05 c0.23,0.04,0.45,0.1,0.69,0.19c0.22,0.08,0.43,0.19,0.63,0.31c0.19,0.12,0.37,0.26,0.55,0.43l0.08,0.08 c0.16,0.16,0.31,0.34,0.44,0.53c0.13,0.19,0.25,0.4,0.34,0.61c0.1,0.21,0.17,0.44,0.22,0.67c0.05,0.23,0.08,0.46,0.09,0.7v0.12 c0,0.21-0.02,0.42-0.06,0.62c-0.04,0.22-0.1,0.45-0.18,0.66c-0.08,0.22-0.19,0.43-0.31,0.63c-0.12,0.2-0.27,0.38-0.43,0.55 L89.83,98.49c-0.17,0.18-0.34,0.33-0.53,0.46c-0.19,0.14-0.4,0.25-0.61,0.35s-0.44,0.17-0.67,0.23s-0.46,0.09-0.7,0.1l-0.06,0 c-0.22,0-0.44-0.01-0.64-0.04l-0.05-0.01c-0.21-0.04-0.42-0.09-0.62-0.16c-0.22-0.08-0.43-0.18-0.63-0.3l-0.03-0.02 c-0.19-0.12-0.37-0.25-0.54-0.39l-0.03-0.03c-0.82-0.76-1.71-1.53-2.6-2.31C80.55,95.02,78.39,93.07,77.09,91.7L77.09,91.7 L77.09,91.7L77.09,91.7z"})]})]})}function Pr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st2 { fill: var(--colorPurple); }\n .st15 { fill: var(--colorSidebar); }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("rect",{className:"st2",x:"5",y:"5",width:"82",height:"100",rx:"8",ry:"8"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"15",width:"62",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"20",y:"40",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"40",y:"40",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"60",y:"40",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"20",y:"60",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"40",y:"60",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"60",y:"60",width:"15",height:"15",rx:"3",ry:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"20",y:"80",width:"55",height:"15",rx:"3",ry:"3"})]})]})}function Nr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 122.88 121.71",xmlns:"http://www.w3.org/2000/svg",children:[(0,xn.jsx)("style",{children:"\n .st0 { fill: var(--colorPurple); }\n "}),(0,xn.jsx)("g",{children:(0,xn.jsx)("path",{className:"st0",fillRule:"evenodd",clipRule:"evenodd",d:"M74.63,71.74l0.13-24.69l5.21-7.65l-0.12-8.21c0-0.23-0.19-0.42-0.42-0.42H63.31v-9.44\r l22-8.91l-22-8.83V1.74c0-2.32-3.52-2.32-3.52,0v29.04H44.61c-0.23,0-0.42,0.19-0.42,0.42l-0.12,8.21l5.53,7.49v24.85h-6.49v-7.4\r H30.64l0.04-8.39l5.21-7.65l-0.12-8.21c0-0.23-0.19-0.42-0.42-0.42H0.54c-0.23,0-0.42,0.19-0.42,0.42L0,48.3l5.53,7.49v65.92h24.69\r h0.12h20.12V96.5c0-6.28,5.14-11.43,11.43-11.43h0c6.28,0,11.43,5.14,11.43,11.43v25.22h19.2h0.12h24.69l0.35-65.76l5.21-7.65\r l-0.12-8.21c0-0.23-0.19-0.42-0.42-0.42H87.52c-0.23,0-0.42,0.19-0.42,0.42l-0.12,8.21l5.53,7.49v8.55H80.21v7.4H74.63\r L74.63,71.74z M62.02,38.75c2.59,0,4.69,2.1,4.69,4.69c0,2.59-2.1,4.69-4.69,4.69c-2.59,0-4.69-2.1-4.69-4.69\r C57.32,40.86,59.42,38.75,62.02,38.75L62.02,38.75z M104.93,46.08c2.59,0,4.69,2.1,4.69,4.69c0,2.59-2.1,4.69-4.69,4.69\r c-2.59,0-4.69-2.1-4.69-4.69C100.24,48.18,102.34,46.08,104.93,46.08L104.93,46.08z M56.67,61.65h10.69c0.15,0,0.27,0.12,0.27,0.27\r v9.55c0,0.15-0.12,0.27-0.27,0.27H56.67c-0.15,0-0.27-0.12-0.27-0.27v-9.55C56.4,61.78,56.52,61.65,56.67,61.65L56.67,61.65z\r M17.95,46.08c2.59,0,4.69,2.1,4.69,4.69c0,2.59-2.1,4.69-4.69,4.69c-2.59,0-4.69-2.1-4.69-4.69C13.25,48.18,15.36,46.08,17.95,46.08\r L17.95,46.08z"})})]})}function Or(){return(0,xn.jsxs)("svg",{viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st1 { fill: var(--colorMint); } /* for the entire shapes if you like */\n .st2 { fill: var(--colorPurple); } /* for the entire shapes if you like */\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("circle",{className:"st2",cx:"35",cy:"40",r:"12"}),(0,xn.jsx)("path",{className:"st2",d:"M20,75c0-8.28,6.72-15,15-15h2c8.28,0,15,6.72,15,15v8H50V90z"}),(0,xn.jsx)("circle",{className:"st1",cx:"65",cy:"35",r:"10"}),(0,xn.jsx)("path",{className:"st1",d:"M50,75c0-8.28,6.72-15,15-15h2c8.28,0,15,6.72,15,15v8H50V75z"})]})]})}function Rr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st2 { fill: var(--colorPurple); } /* bars */\n .st3 { fill: var(--colorMint); } /* axes */\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("rect",{className:"st2",x:"15",y:"70",width:"10",height:"30"}),(0,xn.jsx)("rect",{className:"st2",x:"35",y:"50",width:"10",height:"50"}),(0,xn.jsx)("rect",{className:"st2",x:"55",y:"40",width:"10",height:"60"}),(0,xn.jsx)("rect",{className:"st2",x:"75",y:"60",width:"10",height:"40"}),(0,xn.jsx)("rect",{className:"st3",x:"10",y:"100",width:"80",height:"5"}),(0,xn.jsx)("rect",{className:"st3",x:"10",y:"20",width:"5",height:"80"})]})]})}function jr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st4 { fill: var(--colorPurple); }\n .st5 { fill: var(--colorMint); }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("path",{className:"st4",d:"M46.13,15l-46,20l46,20l46-20L46.13,15z\r M20,35v15c0,8,12,15,26,15s26-7,26-15V35L46.13,45L20,35z"}),(0,xn.jsx)("path",{className:"st5",d:"M60.13,25v10c5,2,8,6,8,13h6c-1-10-5-16-14-21z"})]})]})}function Lr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 92.27 122.88",children:[(0,xn.jsx)("style",{children:"\n .st2 { fill: var(--colorPurple); }\n .st3 { fill: var(--colorMint); }\n .st15 { fill: var(--colorSidebar); }\n "}),(0,xn.jsxs)("g",{children:[(0,xn.jsx)("rect",{className:"st2",x:"5",y:"5",width:"82",height:"100",rx:"5",ry:"5"}),(0,xn.jsx)("rect",{className:"st3",x:"5",y:"5",width:"82",height:"12"}),(0,xn.jsx)("circle",{className:"st15",cx:"15",cy:"5",r:"3"}),(0,xn.jsx)("circle",{className:"st15",cx:"30",cy:"5",r:"3"}),(0,xn.jsx)("circle",{className:"st15",cx:"45",cy:"5",r:"3"}),(0,xn.jsx)("circle",{className:"st15",cx:"60",cy:"5",r:"3"}),(0,xn.jsx)("circle",{className:"st15",cx:"75",cy:"5",r:"3"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"30",width:"60",height:"5"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"45",width:"60",height:"5"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"60",width:"60",height:"5"}),(0,xn.jsx)("rect",{className:"st15",x:"15",y:"75",width:"60",height:"5"})]})]})}function Dr(){return(0,xn.jsxs)("svg",{viewBox:"0 0 113.39 122.88",xmlns:"http://www.w3.org/2000/svg",children:[(0,xn.jsx)("style",{children:"\n .st0 { fill: var(--colorPurple); }\n "}),(0,xn.jsx)("g",{children:(0,xn.jsx)("path",{className:"st0",d:"M39.01,79.72c-1.38,0-2.49-1.33-2.49-2.97c0-1.64,1.12-2.97,2.49-2.97h13.63\r c1.38,0,2.49,1.33,2.49,2.97c0,1.64-1.12,2.97-2.49,2.97H39.01z M85.66,67.41c7.66,0,14.59,3.1,19.61,8.12\r c5.02,5.02,8.12,11.95,8.12,19.61s-3.1,14.59-8.12,19.61c-5.02,5.02-11.95,8.12-19.61,8.12s-14.59-3.1-19.61-8.12\r c-5.02-5.02-8.12-11.95-8.12-19.61s3.1-14.59,8.12-19.61C71.07,70.51,78,67.41,85.66,67.41z M83.54,82.17\r c0-1.37,1.11-2.48,2.48-2.48c1.37,0,2.48,1.11,2.48,2.48v12.92l9.66,5.72c1.18,0.69,1.57,2.21,0.87,3.39\r c-0.69,1.18-2.21,1.57-3.39,0.87l-10.36-6.31c-0.8-0.41-1.35-1.24-1.35-2.21V82.17z M101.77,79.04\r c-4.12-4.12-9.82-6.67-16.11-6.67c-6.29,0-11.99,2.55-16.11,6.67c-4.12,4.12-6.67,9.82-6.67,16.11c0,6.29,2.55,11.99,6.67,16.11\r c4.12,4.12,9.82,6.67,16.11,6.67c6.29,0,11.99-2.55,16.11-6.67c4.12-4.12,6.67-9.82,6.67-16.11S105.89,83.16,101.77,79.04z\r M44.1,109.94c1.64,0,2.97,1.33,2.97,2.97c0,1.64-1.33,2.97-2.97,2.97H6.92c-1.9,0-3.63-0.78-4.89-2.03\r C0.78,112.6,0,110.87,0,108.97V6.92c0-1.91,0.78-3.63,2.03-4.89C3.28,0.78,5.01,0,6.92,0h84.9c1.9,0,3.63,0.78,4.89,2.03\r c1.25,1.25,2.03,2.98,2.03,4.89V54.2c0,1.64-1.33,2.97-2.97,2.97c-1.64,0-2.97-1.33-2.97-2.97V6.92c0-0.26-0.11-0.5-0.29-0.68\r c-0.18-0.18-0.42-0.29-0.68-0.29H6.92c-0.26,0-0.51,0.11-0.68,0.29C6.05,6.41,5.94,6.65,5.94,6.92v102.05\r c0,0.26,0.11,0.51,0.29,0.68c0.18,0.18,0.42,0.29,0.68,0.29H44.1z M19.12,72.49h7.45c0.54,0,0.98,0.44,0.98,0.98v7.45\r c0,0.54-0.44,0.98-0.98,0.98h-7.45c-0.54,0-0.98-0.44-0.98-0.98v-7.45C18.15,72.92,18.59,72.49,19.12,72.49z M19.12,21.49h7.45\r c0.54,0,0.98,0.44,0.98,0.98v7.45c0,0.54-0.44,0.98-0.98,0.98h-7.45c-0.54,0-0.98-0.44-0.98-0.98v-7.45\r C18.15,21.93,18.59,21.49,19.12,21.49z M39.01,28.72c-1.38,0-2.49-1.33-2.49-2.97s1.12-2.97,2.49-2.97h35.46\r c1.38,0,2.49,1.33,2.49,2.97s-1.12,2.97-2.49,2.97H39.01z M22.17,56.14c-0.64,0.51-1.56,0.38-2.21-0.25\r c-0.07-0.05-0.14-0.11-0.21-0.18l-3.12-3.22c-0.65-0.68-0.5-1.81,0.34-2.53c0.84-0.72,2.05-0.76,2.71-0.08l1.7,1.75l5.47-4.4\r c0.73-0.59,1.85-0.33,2.49,0.57c0.64,0.9,0.56,2.11-0.17,2.7L22.17,56.14z M37.37,53.65c-1.38,0-2.49-1.33-2.49-2.97\r c0-1.64,1.12-2.97,2.49-2.97h35.46c1.38,0,2.49,1.33,2.49,2.97c0,1.64-1.12,2.97-2.49,2.97H37.37z"})})]})}function Ir(){return(0,xn.jsx)("svg",{viewBox:"0 0 442 512.12",xmlns:"http://www.w3.org/2000/svg",children:(0,xn.jsxs)("g",{id:"Layer_x0020_1",children:[(0,xn.jsx)("metadata",{id:"CorelCorpID_0Corel-Layer"}),(0,xn.jsx)("path",{fill:"#FF7B24",d:"M56.642 62.995c190.964,-132.008 206.819,128.832 394.358,-34.293l0 266.205c-178.869,160.839 -219.046,-98.605 -394.358,33.463l0 -265.375z"}),(0,xn.jsx)("path",{fill:"#6E350F",d:"M57.161 62.944l0 386.537c8.162,6.463 13.394,16.446 13.394,27.664 0,19.486 -15.794,35.281 -35.28,35.281 -19.485,0 -35.275,-15.795 -35.275,-35.281 0,-11.888 5.88,-22.404 14.89,-28.793l0 -384.279c-9.01,-6.389 -14.89,-16.905 -14.89,-28.793 0,-19.485 15.79,-35.28 35.275,-35.28 19.486,0 35.28,15.795 35.28,35.28 0,11.218 -5.232,21.202 -13.394,27.664z"})]})})}function Br(){return(0,xn.jsxs)("svg",{viewBox:"0 0 122.88 122.88",preserveAspectRatio:"xMidYMid meet",children:[(0,xn.jsx)("style",{children:"\n .st10 { fill: rgb(87, 169, 0); }\n \n "}),(0,xn.jsx)("g",{children:(0,xn.jsx)("path",{class:"st10",d:"M122.88,61.44c0,33.93-27.51,61.44-61.44,61.44C27.51,122.88,0,95.37,0,61.44C0,27.51,27.51,0,61.44,0 C95.37,0,122.88,27.51,122.88,61.44L122.88,61.44z M88.07,77.9V59.54L61.44,40.21L34.81,59.54V77.9l26.63-19.33L88.07,77.9 L88.07,77.9L88.07,77.9z"})})]})}const Fr=function(){const e=[{icon:(0,xn.jsx)(zr,{}),label:"Day Streak",value:"15 days"},{icon:(0,xn.jsx)(Ir,{}),label:"Questions to Answer",value:2},{icon:(0,xn.jsx)(Br,{}),label:"more practice than your peers",value:"+25%"}],t=[{icon:(0,xn.jsx)(Ar,{}),title:"Study Plan",buttonLabel:"Start My Session",onButtonClick:()=>console.log("Start session clicked")},{icon:(0,xn.jsx)(Pr,{}),title:"Prerequisites for Calculus",subtitle:"Calculus",stats:[{icon:(0,xn.jsx)(zr,{}),text:"2 Day Streak"},{icon:(0,xn.jsx)(Br,{}),text:"15% Lesson Coverage"}],progress:15,link:"/courses/session"},{icon:(0,xn.jsx)(Nr,{}),title:"Declaration of Independence",subtitle:"US History",stats:[{icon:(0,xn.jsx)(Br,{}),text:"15% Improvement on Exercises"}],progress:80,link:"/courses/session"}],n=[{icon:(0,xn.jsx)(jr,{}),title:"Courses",topics:[{icon:(0,xn.jsx)(Pr,{}),name:"Calculus"},{icon:(0,xn.jsx)(Nr,{}),name:"US History"}],link:"/courses"},{icon:(0,xn.jsx)(Lr,{}),title:"Practice",topics:[{icon:(0,xn.jsx)(Pr,{}),name:"Calculus"},{icon:(0,xn.jsx)(Nr,{}),name:"US History"}],link:"/practice/settings"},{icon:(0,xn.jsx)(Dr,{}),title:"Mock Test",link:"#mock"}],r=[{icon:(0,xn.jsx)(Rr,{}),title:"My Profile",link:"#profile"},{icon:(0,xn.jsx)(Or,{}),title:"Friends",link:"#friends"}];return(0,xn.jsx)("div",{className:yr,children:(0,xn.jsxs)("main",{className:xr,children:[(0,xn.jsxs)("header",{className:wr,children:[(0,xn.jsx)("h2",{children:"Welcome back, Michael!"}),(0,xn.jsx)("p",{className:kr,children:"Ready to continue your learning journey?"})]}),(0,xn.jsx)("section",{className:_r,children:e.map(((e,t)=>(0,xn.jsx)(Kn,{icon:e.icon,label:e.label,value:e.value},t)))}),(0,xn.jsxs)("section",{children:[(0,xn.jsx)("h3",{className:Sr,children:"Continue Learning"}),(0,xn.jsx)("div",{className:Mr,children:t.map(((e,t)=>(0,xn.jsx)(hr,{icon:e.icon,title:e.title,subtitle:e.subtitle,stats:e.stats||[],progress:e.progress,link:e.link,buttonLabel:e.buttonLabel,onButtonClick:e.onButtonClick},t)))})]}),(0,xn.jsx)("hr",{className:Cr}),(0,xn.jsxs)("section",{className:Tr,children:[(0,xn.jsx)("div",{className:Er,children:n.map(((e,t)=>(0,xn.jsx)(vr,{icon:e.icon,title:e.title,topics:e.topics,link:e.link},t)))}),(0,xn.jsx)("div",{className:Er,children:r.map(((e,t)=>(0,xn.jsx)(vr,{icon:e.icon,title:e.title,link:e.link},t)))})]})]})})},Hr="AddCourseCard_addCard__56ucZ",qr="AddCourseCard_plusSign__Fdlpq";const $r=function(e){let{onClick:t}=e;return(0,xn.jsx)("div",{className:Hr,onClick:t,role:"button",tabIndex:0,children:(0,xn.jsx)("span",{className:qr,children:"+"})})},Ur="Courses_coursesWrapper__wqyQe",Vr="Courses_headerSection__m+Geu",Wr="Courses_heading__wxqxu",Yr="Courses_coursesSection__SVf8-";const Gr=function(){const e=[{icon:(0,xn.jsx)(Pr,{}),title:"Prerequisites for Calculus",stats:[{icon:(0,xn.jsx)(zr,{}),text:"2 Day streak"},{icon:(0,xn.jsx)(Br,{}),text:"+15% Lesson coverage"}],link:"/course/learn",progress:60},{icon:(0,xn.jsx)(Nr,{}),title:"Declaration of Independence",stats:[{icon:(0,xn.jsx)(zr,{}),text:"10 Day streak"},{icon:(0,xn.jsx)(Br,{}),text:"+15% Improvement on Exercises"}],link:"/courses/session",progress:80},{icon:(0,xn.jsx)(Pr,{}),title:"Differential Equations and Matrices",stats:[{icon:(0,xn.jsx)(zr,{}),text:"1 Day streak"},{icon:(0,xn.jsx)(Br,{}),text:"+1% Some coverage"}],link:"/courses/session",progress:40}];return(0,xn.jsxs)("div",{className:Ur,children:[(0,xn.jsx)("section",{className:Vr,children:(0,xn.jsx)("h2",{className:Wr,children:"Courses"})}),(0,xn.jsxs)("section",{className:Yr,children:[e.map(((e,t)=>(0,xn.jsx)(hr,{icon:e.icon,title:e.title,stats:e.stats,progress:e.progress,link:e.link},t))),(0,xn.jsx)($r,{onClick:()=>{window.location.href="/course/add"}})]})]})},Qr="AddCourseItem_addCourseItem__eA4oL",Xr="AddCourseItem_icon__9mtyh",Kr="AddCourseItem_label__uyPbM";const Jr=function(e){let{icon:t,label:n,onClick:r}=e;return(0,xn.jsxs)("div",{className:Qr,onClick:r,role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||!r||r()},children:[(0,xn.jsx)("img",{src:t,alt:n,className:Xr}),(0,xn.jsx)("h3",{className:Kr,children:n})]})},Zr="AddCourse_addCourseWrapper__k2N0O",ei="AddCourse_headerSection__ELQuE",ti="AddCourse_backArrow__2V84A",ni="AddCourse_heading__aAkcv",ri="AddCourse_coursesSection__IVs5g";const ii=function(){const e=B(),t=[{icon:"/assets/calculator.png",label:"Mathematics",onClick:()=>alert("You clicked Mathematics!")},{icon:"/assets/book.png",label:"History",onClick:()=>alert("You clicked History!")}];return(0,xn.jsxs)("div",{className:Zr,children:[(0,xn.jsxs)("section",{className:ei,children:[(0,xn.jsx)("div",{className:ti,onClick:()=>e(-1),role:"button",tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||e(-1)},children:(0,xn.jsx)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,xn.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,xn.jsx)("h2",{className:ni,children:"Add Course"})]}),(0,xn.jsx)("section",{className:ri,children:t.map(((e,t)=>(0,xn.jsx)(Jr,{icon:e.icon,label:e.label,onClick:e.onClick},t)))})]})},ai="CoursePage_wrapper__-uslF",si="CoursePage_headerSection__6JA0g",oi="CoursePage_backArrow__np4Ah",li="CoursePage_heading__GHVk8",ci="CoursePage_contentSection__aoASb",ui="CoursePage_card__o-UY6",hi="CoursePage_cardIcon__5iehu",di="CoursePage_cardIconSvg__09Thi",pi="CoursePage_cardTitle__SHQp7",fi="CoursePage_progressBar__B3YcF",mi="CoursePage_progressFill__z1kD8",gi="CoursePage_statLine__v9KtP",bi="CoursePage_statIcon__PSys9",vi="CoursePage_statText__CQnhc";const yi=function(){const e=B(),t="Placeholder Course Name",n=60,r="+15% Lesson coverage";return(0,xn.jsxs)("div",{className:ai,children:[(0,xn.jsxs)("section",{className:si,children:[(0,xn.jsx)("div",{className:oi,onClick:()=>{window.history.length>2?e(-1):e("/courses")},role:"button",tabIndex:0,onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&window.history.length>2?e(-1):"Enter"!==t.key&&" "!==t.key||e("/courses")},children:(0,xn.jsx)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,xn.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,xn.jsx)("h2",{className:li,children:t})]}),(0,xn.jsxs)("section",{className:ci,children:[(0,xn.jsxs)("div",{className:ui,onClick:()=>{window.location.href="/course/learn"},children:[(0,xn.jsx)("div",{className:hi,children:(0,xn.jsx)(jr,{className:di})}),(0,xn.jsx)("h3",{className:pi,children:"Learn"}),(0,xn.jsx)("div",{className:fi,children:(0,xn.jsx)("div",{className:mi,style:{width:`${n}%`}})})]}),(0,xn.jsxs)("div",{className:ui,onClick:()=>{window.location.href="/practice/settings"},children:[(0,xn.jsx)("div",{className:hi,children:(0,xn.jsx)(Lr,{className:di})}),(0,xn.jsx)("h3",{className:pi,children:"Practice"}),(0,xn.jsxs)("div",{className:gi,children:[(0,xn.jsx)("img",{src:"/assets/increase.png",alt:r,className:bi}),(0,xn.jsx)("span",{className:vi,children:r})]})]})]})]})};function xi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let wi={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function ki(e){wi=e}const _i={exec:()=>null};function Si(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="string"===typeof e?e:e.source;const r={replace:(e,t)=>{let i="string"===typeof t?t:t.source;return i=i.replace(Mi.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}const Mi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Ci=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ti=/(?:[*+-]|\d{1,9}[.)])/,Ei=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zi=Si(Ei).replace(/bull/g,Ti).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ai=Si(Ei).replace(/bull/g,Ti).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Pi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ni=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Oi=Si(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ni).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ri=Si(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ti).getRegex(),ji="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Li=/|$))/,Di=Si("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Li).replace("tag",ji).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ii=Si(Pi).replace("hr",Ci).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ji).getRegex(),Bi={blockquote:Si(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ii).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Oi,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Ci,html:Di,lheading:zi,list:Ri,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Ii,table:_i,text:/^[^\n]+/},Fi=Si("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ci).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ji).getRegex(),Hi={...Bi,lheading:Ai,table:Fi,paragraph:Si(Pi).replace("hr",Ci).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Fi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ji).getRegex()},qi={...Bi,html:Si("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Li).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Si(Pi).replace("hr",Ci).replace("heading"," *#{1,6} *[^\n]").replace("lheading",zi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$i=/^( {2,}|\\)\n(?!\s*$)/,Ui=/[\p{P}\p{S}]/u,Vi=/[\s\p{P}\p{S}]/u,Wi=/[^\s\p{P}\p{S}]/u,Yi=Si(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Vi).getRegex(),Gi=/(?!~)[\p{P}\p{S}]/u,Qi=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Xi=Si(Qi,"u").replace(/punct/g,Ui).getRegex(),Ki=Si(Qi,"u").replace(/punct/g,Gi).getRegex(),Ji="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zi=Si(Ji,"gu").replace(/notPunctSpace/g,Wi).replace(/punctSpace/g,Vi).replace(/punct/g,Ui).getRegex(),ea=Si(Ji,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Gi).getRegex(),ta=Si("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Wi).replace(/punctSpace/g,Vi).replace(/punct/g,Ui).getRegex(),na=Si(/\\(punct)/,"gu").replace(/punct/g,Ui).getRegex(),ra=Si(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ia=Si(Li).replace("(?:--\x3e|$)","--\x3e").getRegex(),aa=Si("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ia).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,oa=Si(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",sa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),la=Si(/^!?\[(label)\]\[(ref)\]/).replace("label",sa).replace("ref",Ni).getRegex(),ca=Si(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ni).getRegex(),ua={_backpedal:_i,anyPunctuation:na,autolink:ra,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:$i,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:_i,emStrongLDelim:Xi,emStrongRDelimAst:Zi,emStrongRDelimUnd:ta,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:oa,nolink:ca,punctuation:Yi,reflink:la,reflinkSearch:Si("reflink|nolink(?!\\()","g").replace("reflink",la).replace("nolink",ca).getRegex(),tag:aa,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},ba=e=>ga[e];function va(e,t){if(t){if(Mi.escapeTest.test(e))return e.replace(Mi.escapeReplace,ba)}else if(Mi.escapeTestNoEncode.test(e))return e.replace(Mi.escapeReplaceNoEncode,ba);return e}function ya(e){try{e=encodeURI(e).replace(Mi.percentDecode,"%")}catch{return null}return e}function xa(e,t){const n=e.replace(Mi.findPipe,((e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(Mi.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:wa(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(null===r)return t;const i=r[1];return t.split("\n").map((e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[r]=t;return r.length>=i.length?e.slice(i.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=wa(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:wa(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=wa(t[0],"\n").split("\n"),n="",r="";const i=[];for(;e.length>0;){let t=!1;const a=[];let s;for(s=0;s1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const a=this.rules.other.listItemRegex(n);let s=!1;for(;e;){let n=!1,r="",o="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!l.trim(),h=0;if(this.options.pedantic?(h=2,o=l.trimStart()):u?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,o=l.slice(h),h+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),i=this.rules.other.fencesBeginRegex(h),a=this.rules.other.headingBeginRegex(h),s=this.rules.other.htmlBeginRegex(h);for(;e;){const d=e.split("\n",1)[0];let p;if(c=d,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),p=c):p=c.replace(this.rules.other.tabCharGlobal," "),i.test(c))break;if(a.test(c))break;if(s.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(this.rules.other.nonSpaceChar)>=h||!c.trim())o+="\n"+p.slice(h);else{if(u)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(i.test(l))break;if(a.test(l))break;if(n.test(l))break;o+="\n"+c}u||c.trim()||(u=!0),r+=d+"\n",e=e.substring(d.length+1),l=p.slice(h)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(o),p&&(d="[ ] "!==p[0],o=o.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!p,checked:d,loose:!1,text:o,tokens:[]}),i.raw+=r}const o=i.items.at(-1);if(!o)return;o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));i.loose=n}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=wa(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),ka(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return ka(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let i,a,s=n,o=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){s+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){o+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+o);const t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class Sa{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||wi,this.options.tokenizer=this.options.tokenizer||new _a,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:Mi,block:fa.normal,inline:ma.normal};this.options.pedantic?(t.block=fa.pedantic,t.inline=ma.pedantic):this.options.gfm&&(t.block=fa.gfm,this.options.breaks?t.inline=ma.breaks:t.inline=ma.gfm),this.tokenizer.rules=t}static get rules(){return{block:fa,inline:ma}}static lex(e,t){return new Sa(t).lex(e)}static lexInline(e,t){return new Sa(t).inlineTokens(e)}lex(e){e=e.replace(Mi.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(Mi.tabCharGlobal," ").replace(Mi.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);const n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){const a=t.at(-1);n&&"paragraph"===a?.type?(a.raw+="\n"+r.raw,a.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);const n=t.at(-1);"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e,r=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i=!1,a="";for(;e;){let r;if(i||(a=""),i=!1,this.options.extensions?.inline?.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);const n=t.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,a)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(s)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),i=!0;const n=t.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):t.push(r)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}}class Ma{options;parser;constructor(e){this.options=e||wi}space(e){return""}code(e){let{text:t,lang:n,escaped:r}=e;const i=(n||"").match(Mi.notSpaceStart)?.[0],a=t.replace(Mi.endingNewline,"")+"\n";return i?'
'+(r?a:va(a,!0))+"
\n":"
"+(r?a:va(a,!0))+"
\n"}blockquote(e){let{tokens:t}=e;return`
\n${this.parser.parse(t)}
\n`}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return`${this.parser.parseInline(t)}\n`}hr(e){return"
\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+va(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return`

    ${this.parser.parseInline(t)}

    \n`}table(e){let t="",n="";for(let i=0;i${r}`),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return`\n${t}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}em(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}codespan(e){let{text:t}=e;return`${va(t,!0)}`}br(e){return"
    "}del(e){let{tokens:t}=e;return`${this.parser.parseInline(t)}`}link(e){let{href:t,title:n,tokens:r}=e;const i=this.parser.parseInline(r),a=ya(t);if(null===a)return i;t=a;let s='
    ",s}image(e){let{href:t,title:n,text:r}=e;const i=ya(t);if(null===i)return va(r);t=i;let a=`${r}1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:this.renderer,n="";for(let r=0;rnew Set(["preprocess","postprocess","processAllTokens"]))();preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Sa.lex:Sa.lexInline}provideParser(){return this.block?Ta.parse:Ta.parseInline}}const za=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=(()=>Ta)();Renderer=(()=>Ma)();TextRenderer=(()=>Ca)();Lexer=(()=>Sa)();Tokenizer=(()=>_a)();Hooks=(()=>Ea)();constructor(){this.use(...arguments)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),i=0;i{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>a.call(e,t)));const n=i.call(e,t);return a.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const s=i.hooks?i.hooks.provideLexer():e?Sa.lex:Sa.lexInline,o=i.hooks?i.hooks.provideParser():e?Ta.parse:Ta.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then((e=>s(e,i))).then((e=>i.hooks?i.hooks.processAllTokens(e):e)).then((e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then((()=>e)):e)).then((e=>o(e,i))).then((e=>i.hooks?i.hooks.postprocess(e):e)).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=s(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=o(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(l){return a(l)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+va(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Aa(e,t){return za.parse(e,t)}Aa.options=Aa.setOptions=function(e){return za.setOptions(e),Aa.defaults=za.defaults,ki(Aa.defaults),Aa},Aa.getDefaults=xi,Aa.defaults=wi,Aa.use=function(){return za.use(...arguments),Aa.defaults=za.defaults,ki(Aa.defaults),Aa},Aa.walkTokens=function(e,t){return za.walkTokens(e,t)},Aa.parseInline=za.parseInline,Aa.Parser=Ta,Aa.parser=Ta.parse,Aa.Renderer=Ma,Aa.TextRenderer=Ca,Aa.Lexer=Sa,Aa.lexer=Sa.lex,Aa.Tokenizer=_a,Aa.Hooks=Ea,Aa.parse=Aa;Aa.options,Aa.setOptions,Aa.use,Aa.walkTokens,Aa.parseInline,Ta.parse,Sa.lex;var Pa,Na,Oa=function(){return(Oa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n\s*<\/p>/g,"")}const Va={objective:"Objective",problem:"Problem",gotit:"Got It?",essential_understanding:"Essential Understanding",take_note:"Take Note"};function Wa(e){return Va[e]||e||""}function Ya(e){return"gotit"!==e.sectionTitle}const Ga={loader:{load:["[tex]/ams"]},tex:{packages:{"[+]":["ams"]},inlineMath:[["\\(","\\)"],["$","$"]],displayMath:[["\\[","\\]"],["$$","$$"]],linebreaks:{automatic:!0}},svg:{linebreaks:{automatic:!0}}};function Qa(e){return Array.isArray(e)?e.map(Qa).join("\n"):e&&"object"===typeof e?"string"===typeof e.text?Qa(e.text):JSON.stringify(e,null,2):null==e?"":String(e)}function Xa(){const[e,t]=(0,r.useState)(0),[n,i]=(0,r.useState)(null),[a,s]=(0,r.useState)({}),[o,l]=(0,r.useState)({}),[c,u]=(0,r.useState)(!0),[h,d]=(0,r.useState)("down"),[p,f]=(0,r.useState)({courseTitle:"Loading Course...",bigSections:[]}),[m,g]=(0,r.useState)({}),b=(0,r.useRef)(null),v=(0,r.useRef)({}),y=(0,r.useRef)(null),x="https://api.racine-ai.com";(0,r.useEffect)((()=>{fetch(`${x}/course`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({courseId:"0000000001"}),credentials:"include"}).then((e=>e.json())).then((e=>f(e))).catch((()=>{f({courseTitle:"Error loading course",bigSections:[]})}))}),[x]);const w=p.bigSections||[],k=w[e]||{bigSectionTitle:"",sections:[]},_=[{id:`titleBlock-${e}`,type:"title-block",sectionTitle:k.bigSectionTitle||"",content:""},...k.sections];function S(e){const t=v.current[e];t&&t.scrollIntoView({behavior:"smooth"})}(0,r.useEffect)((()=>{const e=b.current;if(!e)return;const t=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&i(e.target.getAttribute("id"))}))}),{root:e,rootMargin:"0px 0px -40% 0px",threshold:0});return _.forEach((e=>{v.current[e.id]&&t.observe(v.current[e.id])})),()=>t.disconnect()}),[_]),(0,r.useEffect)((()=>{let e=0;const t=b.current;if(!t)return;const n=()=>{const n=t.scrollTop;d(nt.removeEventListener("scroll",n)}),[]),(0,r.useEffect)((()=>{b.current&&(b.current.scrollTop=0)}),[e]),(0,r.useEffect)((()=>{if(!y.current)return;const t=y.current.querySelector(`[data-bigsection-idx="${e}"]`);t&&t.scrollIntoView({block:"start",behavior:"smooth"})}),[e]),(0,r.useEffect)((()=>{if(!y.current)return;const e=y.current.querySelector(`[data-section-id="${n}"]`);e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}),[n]);const M=e>0&&"up"===h;function C(e,t){const n=function(e){const t=document.createElement("div");t.innerHTML=e;const n=[];return t.childNodes.forEach((e=>{e.nodeType===Node.ELEMENT_NODE?n.push(e.outerHTML):e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&n.push(e.textContent.trim())})),n}(e);return n.map(((e,r)=>{const i=`${t}-para-${r}`,a=m[i]||{open:!1,currentQuestion:"",entries:[]},s=e.trim(),o=s.startsWith("$$")&&s.endsWith("$$"),l=n.slice(0,r+1).join("\n\n");return(0,xn.jsxs)("div",{className:qa.paragraphContainer,children:[(0,xn.jsxs)("div",{className:qa.paragraphContent,children:[(0,xn.jsx)("p",{className:qa.paragraphText,dangerouslySetInnerHTML:{__html:e}}),!o&&(0,xn.jsx)("button",{className:qa.askIcon,onClick:()=>(e=>{g((t=>{const n=t[e]||{open:!1,currentQuestion:"",entries:[]};return{...t,[e]:{...n,open:!n.open}}}))})(i),title:"Ask a question about this line",children:(0,xn.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,xn.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,xn.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"}),(0,xn.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17"})]})})]}),a.open&&(0,xn.jsxs)("div",{className:qa.qaPanel,children:[(0,xn.jsxs)("div",{className:qa.qaInputRow,children:[(0,xn.jsx)("textarea",{className:qa.qaInput,placeholder:"Type your question...",value:a.currentQuestion,onChange:e=>((e,t)=>{g((n=>{const r=n[e]||{open:!0,currentQuestion:"",entries:[]};return{...n,[e]:{...r,currentQuestion:t}}}))})(i,e.target.value)}),(0,xn.jsx)("button",{className:qa.qaSubmitBtn,onClick:()=>(async(e,t)=>{var n;const r=(null===(n=m[e])||void 0===n?void 0:n.currentQuestion)||"";g((t=>{const n=t[e]||{open:!0,currentQuestion:"",entries:[]};return{...t,[e]:{...n,entries:[...n.entries,{question:r,answer:"",loading:!0}],currentQuestion:""}}}));const i={chapter_title:p.courseTitle,section_title:k.bigSectionTitle,section_content:t,question:r};try{const t=await fetch(`${x}/course_question`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i),credentials:"include"}),n=await t.json();g((t=>{const r=t[e]||{entries:[]},i=[...r.entries];return i.length&&(i[i.length-1]={...i[i.length-1],loading:!1,answer:n.answer||"No answer received."}),{...t,[e]:{...r,entries:i}}}))}catch(a){g((t=>{const n=t[e]||{entries:[]},r=[...n.entries];return r.length&&(r[r.length-1]={...r[r.length-1],loading:!1,answer:"Error fetching answer."}),{...t,[e]:{...n,entries:r}}}))}})(i,l),children:"Submit"})]}),a.entries.map(((e,t)=>(0,xn.jsxs)("div",{className:qa.qaEntry,children:[(0,xn.jsxs)("div",{className:qa.qaQuestion,children:[(0,xn.jsx)("strong",{children:"You asked:"})," ",e.question]}),e.loading?(0,xn.jsx)("div",{className:qa.qaLoading,children:"Loading answer\u2026"}):(0,xn.jsx)("div",{className:qa.qaAnswer,children:(0,xn.jsx)("p",{className:qa.paragraphText,dangerouslySetInnerHTML:{__html:Ua($a(e.answer))}})})]},`${i}-entry-${t}`)))]})]},i)}))}return(0,xn.jsx)(Da,{config:Ga,children:(0,xn.jsxs)("div",{className:qa.learnPage,children:[(0,xn.jsxs)("header",{className:qa.header,children:[(0,xn.jsx)("h2",{className:qa.courseTitle,children:p.courseTitle}),(0,xn.jsx)("button",{className:qa.toggleSummaryBtn,onClick:()=>u(!c),children:c?"\u25b2 Hide Summary":"\u25bc Show Summary"})]}),(0,xn.jsxs)("div",{className:qa.bodyWrapper,children:[(0,xn.jsxs)("div",{className:qa.mainColumn,children:[M&&(0,xn.jsx)("button",{className:qa.topButton,onClick:function(){e>0&&t((e=>e-1))},children:"\u2191 Previous Section"}),(0,xn.jsxs)("div",{className:qa.scrollContainer,ref:b,children:[_.map((e=>{if("title-block"===e.type)return(0,xn.jsx)("section",{id:e.id,ref:t=>v.current[e.id]=t,className:qa.sectionBlock,children:(0,xn.jsx)("h3",{className:qa.bigSectionTitle,children:e.sectionTitle})},e.id);const t=Wa(e.sectionTitle);let n=Qa(e.content);n=$a(n);let r=Ua(n);return(0,xn.jsxs)("section",{id:e.id,ref:t=>v.current[e.id]=t,className:qa.sectionBlock,children:[t&&(0,xn.jsx)("h4",{className:qa.sectionTitle,children:t}),"text"===e.type&&(0,xn.jsx)(Ha,{dynamic:!0,children:(0,xn.jsx)("div",{className:qa.sectionContent,children:C(r,e.id)})}),"mcq"===e.type&&(0,xn.jsxs)("div",{className:qa.mcqSection,children:[(0,xn.jsx)(Ha,{dynamic:!0,children:(0,xn.jsx)("div",{className:qa.sectionContent,dangerouslySetInnerHTML:{__html:r}})}),(0,xn.jsx)("ul",{className:qa.mcOptions,children:e.mcOptions&&e.mcOptions.map((t=>(0,xn.jsxs)("div",{className:[qa.mcOption,o[e.id]?e.solution.correct.includes(t.id)?qa.correctOption:a[e.id]&&(Array.isArray(a[e.id])?a[e.id].includes(t.id):a[e.id]===t.id)?qa.incorrectOption:"":(Array.isArray(a[e.id])?a[e.id].includes(t.id):a[e.id]===t.id)?qa.selectedOption:""].join(" "),onClick:()=>function(e,t){var n;const r=_.find((t=>t.id===e)),i=(null===r||void 0===r||null===(n=r.solution)||void 0===n?void 0:n.correct)||[],a=i.length>1;s((n=>{var s;const o=null!==(s=n[e])&&void 0!==s?s:a?[]:null;if(!a){const a=t===i[0]?"correct":"incorrect";return l((t=>{var n;return{...t,[e]:{status:a,explanation:null===(n=r.solution)||void 0===n?void 0:n.explanation}}})),{...n,[e]:t}}let c=o.includes(t)?o.filter((e=>e!==t)):[...o,t],u="pending";return c.some((e=>!i.includes(e)))?u="incorrect":c.length===i.length&&(u="correct"),l("pending"!==u?t=>{var n;return{...t,[e]:{status:u,explanation:null===(n=r.solution)||void 0===n?void 0:n.explanation}}}:t=>({...t,[e]:void 0})),{...n,[e]:c}}))}(e.id,t.id),children:[(0,xn.jsx)(Ha,{dynamic:!0,inline:!0,children:$a(t.text)})," "]},t.id)))}),o[e.id]&&(0,xn.jsxs)("div",{className:qa.mcqFeedbackBox,children:[(0,xn.jsx)("span",{className:"correct"===o[e.id].status?qa.mcqCorrect:qa.mcqIncorrect,children:"correct"===o[e.id].status?"\u2714 Correct!":"\u2716 Not quite."}),(0,xn.jsx)("div",{children:(0,xn.jsx)(Ha,{dynamic:!0,children:o[e.id].explanation.split("\n").map(((e,t)=>(0,xn.jsx)("p",{children:e},t)))})})]})]})]},e.id)})),(0,xn.jsx)("div",{className:qa.bottomHolder,children:ee+1))},children:"Next Section \u2193"}):(0,xn.jsx)("button",{className:qa.bottomButton,onClick:()=>window.location.href="/course/cheatsheet",children:"Submit"})})]})]}),c&&(0,xn.jsxs)("aside",{className:qa.summaryAside,ref:y,children:[(0,xn.jsx)("h4",{children:"Sections"}),w.map(((r,i)=>{const a=i===e;return(0,xn.jsxs)("div",{className:qa.summaryChapter,"data-bigsection-idx":i,children:[(0,xn.jsx)("div",{className:qa.summaryBigSection+(a?" "+qa.activeSummary:""),onClick:()=>{t(i),setTimeout((()=>{S(`titleBlock-${i}`)}),50)},children:r.bigSectionTitle}),a&&r.sections.filter(Ya).map((e=>{const t=Wa(e.sectionTitle);return t?(0,xn.jsx)("div",{"data-section-id":e.id,className:qa.summaryItem+(e.id===n?" "+qa.activeSubsection:" "+qa.inactiveSubsection),onClick:()=>{setTimeout((()=>{S(e.id)}),50)},children:t},e.id):null}))]},r.bigSectionTitle)}))]})]})]})})}const Ka="CheatSheet_cheatsheetWrapper__J2N83",Ja="CheatSheet_headerBar__2ikMT",Za="CheatSheet_backArrow__Yt1+0",es="CheatSheet_cheatsheetTitle__xmVfX",ts="CheatSheet_scrollArea__RM0c2",ns="CheatSheet_mainTitle__SWxE7",rs="CheatSheet_subTitle__KTwKt",is="CheatSheet_highlightedScore__Ph4F0",as="CheatSheet_bigSection__k0DIf",ss="CheatSheet_bigSectionTitle__xjGK-",os="CheatSheet_itemRow__EcFq-",ls="CheatSheet_itemText__78yl0",cs="CheatSheet_itemDescription__9qd5F",us="CheatSheet_itemStatus__CjOqE",hs="CheatSheet_statusIcon__-0qyV";class ds{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(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new ds(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class ps{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(e,t){return new ps(t,ds.range(this,e))}}class fs{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,r,i="KaTeX parse error: "+e,a=t&&t.loc;if(a&&a.start<=a.end){var s=a.lexer.input;n=a.start,r=a.end,n===s.length?i+=" at end of input: ":i+=" at position "+(n+1)+": ";var o=s.slice(n,r).replace(/[^]/g,"$&\u0332");i+=(n>15?"\u2026"+s.slice(n-15,n):s.slice(0,n))+o+(r+15":">","<":"<",'"':""","'":"'"},bs=/[&><"']/g;var vs=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},ys={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(bs,(e=>gs[e]))},hyphenate:function(e){return e.replace(ms,"-$1").toLowerCase()},getBaseElem:vs,isCharacterBox:function(e){var t=vs(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},xs={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 "},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 ",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 ",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 ",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 ",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 ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function ws(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!==typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class ks{constructor(e){for(var t in 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=e||{},xs)if(xs.hasOwnProperty(t)){var n=xs[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:ws(n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"===typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new fs("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===r?"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"===typeof r)try{r=r(e,t,n)}catch(i){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=ys.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var n="function"===typeof this.trust?this.trust(e):this.trust;return Boolean(n)}}class _s{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 Ss[Ms[this.id]]}sub(){return Ss[Cs[this.id]]}fracNum(){return Ss[Ts[this.id]]}fracDen(){return Ss[Es[this.id]]}cramp(){return Ss[zs[this.id]]}text(){return Ss[As[this.id]]}isTight(){return this.size>=2}}var Ss=[new _s(0,0,!1),new _s(1,0,!0),new _s(2,1,!1),new _s(3,1,!0),new _s(4,2,!1),new _s(5,2,!0),new _s(6,3,!1),new _s(7,3,!0)],Ms=[4,5,4,5,6,7,6,7],Cs=[5,5,5,5,7,7,7,7],Ts=[2,3,4,5,6,7,6,7],Es=[3,3,5,5,7,7,7,7],zs=[1,1,3,3,5,5,7,7],As=[0,1,2,3,2,3,2,3],Ps={DISPLAY:Ss[0],TEXT:Ss[2],SCRIPT:Ss[4],SCRIPTSCRIPT:Ss[6]},Ns=[{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]]}];var Os=[];function Rs(e){for(var t=0;t=Os[t]&&e<=Os[t+1])return!0;return!1}Ns.forEach((e=>e.blocks.forEach((e=>Os.push(...e)))));var js=80,Ls={doubleleftarrow:"M262 157\nl10-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\n 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\n 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\nc2 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\n 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\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-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\n 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\n-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\n-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\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-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\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 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\n-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\nc-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\n 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\n 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\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 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\n 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\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 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\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-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\n-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\n-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\n 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\n-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\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 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\n-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\n 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\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-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\n-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\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.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\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-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\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 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\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.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\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 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\n-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\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.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\n60.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\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 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\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.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\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 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\n-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\n 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\n 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\n-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\n-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\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-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\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.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\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-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\n 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\n 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\n-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\n-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\n 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\n-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\n 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\nm0 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\n 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\n-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\n-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\n 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\n 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\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-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\n 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\n-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\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-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\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 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\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 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\nc-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\n 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\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 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\n-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\n 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\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-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\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 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\n 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\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -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\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-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\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-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\n-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\n-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\n-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,\n-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,\n-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,\n-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,\n-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\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-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\ns-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\n121.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\ns2.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\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-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\n13.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\n-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\n-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\n-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\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,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\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-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\nc-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\nM0 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\nc1.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,\n1c0,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,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 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\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-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\nc-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\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class Ds{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 ys.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText())).join("")}}var Is={"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]}},Bs={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]},Fs={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function Hs(e,t,n){if(!Is[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=Is[t][r];if(!i&&e[0]in Fs&&(r=Fs[e[0]].charCodeAt(0),i=Is[t][r]),i||"text"!==n||Rs(r)&&(i=Is[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var qs={};var $s=[[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]],Us=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Vs=function(e,t){return t.size<2?e:$s[e-1][t.size-1]};class Ws{constructor(e){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=e.style,this.color=e.color,this.size=e.size||Ws.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Us[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={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};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new Ws(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Vs(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:Us[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Vs(Ws.BASESIZE,e);return this.size===t&&this.textSize===Ws.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}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!==Ws.BASESIZE?["sizing","reset-size"+this.size,"size"+Ws.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!qs[t=e>=5?0:e>=3?1:2]){var n=qs[t]={cssEmPerMu:Bs.quad[t]/18};for(var r in Bs)Bs.hasOwnProperty(r)&&(n[r]=Bs[r][t])}return qs[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Ws.BASESIZE=6;var Ys={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Gs={ex:!0,em:!0,mu:!0},Qs=function(e){return"string"!==typeof e&&(e=e.unit),e in Ys||e in Gs||"ex"===e},Xs=function(e,t){var n;if(e.unit in Ys)n=Ys[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new fs("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},Ks=function(e){return+e.toFixed(4)+"em"},Js=function(e){return e.filter((e=>e)).join(" ")},Zs=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)}},eo=function(e){var t=document.createElement(e);for(var n in t.className=Js(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var i=0;i/=\x00-\x1f]/,no=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+ys.escape(Js(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=ys.hyphenate(r)+":"+this.style[r]+";");for(var i in n&&(t+=' style="'+ys.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(i)){if(to.test(i))throw new fs("Invalid attribute name '"+i+"'");t+=" "+i+'="'+ys.escape(this.attributes[i])+'"'}t+=">";for(var a=0;a"};class ro{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,Zs.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return ys.contains(this.classes,e)}toNode(){return eo.call(this,"span")}toMarkup(){return no.call(this,"span")}}class io{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,Zs.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return ys.contains(this.classes,e)}toNode(){return eo.call(this,"a")}toMarkup(){return no.call(this,"a")}}class ao{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.style=n}hasClass(e){return ys.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+ys.escape(this.alt)+'=i[0]&&e<=i[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=so[this.text])}hasClass(e){return ys.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=Ks(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=Js(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=ys.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+ys.escape(n)+'"');var i=ys.escape(this.text);return e?(t+=">",t+=i,t+=""):i}}class lo{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 in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n':''}}class uo{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="","\\gt",!0),go(bo,yo,zo,"\u2208","\\in",!0),go(bo,yo,zo,"\ue020","\\@not"),go(bo,yo,zo,"\u2282","\\subset",!0),go(bo,yo,zo,"\u2283","\\supset",!0),go(bo,yo,zo,"\u2286","\\subseteq",!0),go(bo,yo,zo,"\u2287","\\supseteq",!0),go(bo,xo,zo,"\u2288","\\nsubseteq",!0),go(bo,xo,zo,"\u2289","\\nsupseteq",!0),go(bo,yo,zo,"\u22a8","\\models"),go(bo,yo,zo,"\u2190","\\leftarrow",!0),go(bo,yo,zo,"\u2264","\\le"),go(bo,yo,zo,"\u2264","\\leq",!0),go(bo,yo,zo,"<","\\lt",!0),go(bo,yo,zo,"\u2192","\\rightarrow",!0),go(bo,yo,zo,"\u2192","\\to"),go(bo,xo,zo,"\u2271","\\ngeq",!0),go(bo,xo,zo,"\u2270","\\nleq",!0),go(bo,yo,Ao,"\xa0","\\ "),go(bo,yo,Ao,"\xa0","\\space"),go(bo,yo,Ao,"\xa0","\\nobreakspace"),go(vo,yo,Ao,"\xa0","\\ "),go(vo,yo,Ao,"\xa0"," "),go(vo,yo,Ao,"\xa0","\\space"),go(vo,yo,Ao,"\xa0","\\nobreakspace"),go(bo,yo,Ao,null,"\\nobreak"),go(bo,yo,Ao,null,"\\allowbreak"),go(bo,yo,Eo,",",","),go(bo,yo,Eo,";",";"),go(bo,xo,ko,"\u22bc","\\barwedge",!0),go(bo,xo,ko,"\u22bb","\\veebar",!0),go(bo,yo,ko,"\u2299","\\odot",!0),go(bo,yo,ko,"\u2295","\\oplus",!0),go(bo,yo,ko,"\u2297","\\otimes",!0),go(bo,yo,Po,"\u2202","\\partial",!0),go(bo,yo,ko,"\u2298","\\oslash",!0),go(bo,xo,ko,"\u229a","\\circledcirc",!0),go(bo,xo,ko,"\u22a1","\\boxdot",!0),go(bo,yo,ko,"\u25b3","\\bigtriangleup"),go(bo,yo,ko,"\u25bd","\\bigtriangledown"),go(bo,yo,ko,"\u2020","\\dagger"),go(bo,yo,ko,"\u22c4","\\diamond"),go(bo,yo,ko,"\u22c6","\\star"),go(bo,yo,ko,"\u25c3","\\triangleleft"),go(bo,yo,ko,"\u25b9","\\triangleright"),go(bo,yo,To,"{","\\{"),go(vo,yo,Po,"{","\\{"),go(vo,yo,Po,"{","\\textbraceleft"),go(bo,yo,_o,"}","\\}"),go(vo,yo,Po,"}","\\}"),go(vo,yo,Po,"}","\\textbraceright"),go(bo,yo,To,"{","\\lbrace"),go(bo,yo,_o,"}","\\rbrace"),go(bo,yo,To,"[","\\lbrack",!0),go(vo,yo,Po,"[","\\lbrack",!0),go(bo,yo,_o,"]","\\rbrack",!0),go(vo,yo,Po,"]","\\rbrack",!0),go(bo,yo,To,"(","\\lparen",!0),go(bo,yo,_o,")","\\rparen",!0),go(vo,yo,Po,"<","\\textless",!0),go(vo,yo,Po,">","\\textgreater",!0),go(bo,yo,To,"\u230a","\\lfloor",!0),go(bo,yo,_o,"\u230b","\\rfloor",!0),go(bo,yo,To,"\u2308","\\lceil",!0),go(bo,yo,_o,"\u2309","\\rceil",!0),go(bo,yo,Po,"\\","\\backslash"),go(bo,yo,Po,"\u2223","|"),go(bo,yo,Po,"\u2223","\\vert"),go(vo,yo,Po,"|","\\textbar",!0),go(bo,yo,Po,"\u2225","\\|"),go(bo,yo,Po,"\u2225","\\Vert"),go(vo,yo,Po,"\u2225","\\textbardbl"),go(vo,yo,Po,"~","\\textasciitilde"),go(vo,yo,Po,"\\","\\textbackslash"),go(vo,yo,Po,"^","\\textasciicircum"),go(bo,yo,zo,"\u2191","\\uparrow",!0),go(bo,yo,zo,"\u21d1","\\Uparrow",!0),go(bo,yo,zo,"\u2193","\\downarrow",!0),go(bo,yo,zo,"\u21d3","\\Downarrow",!0),go(bo,yo,zo,"\u2195","\\updownarrow",!0),go(bo,yo,zo,"\u21d5","\\Updownarrow",!0),go(bo,yo,Co,"\u2210","\\coprod"),go(bo,yo,Co,"\u22c1","\\bigvee"),go(bo,yo,Co,"\u22c0","\\bigwedge"),go(bo,yo,Co,"\u2a04","\\biguplus"),go(bo,yo,Co,"\u22c2","\\bigcap"),go(bo,yo,Co,"\u22c3","\\bigcup"),go(bo,yo,Co,"\u222b","\\int"),go(bo,yo,Co,"\u222b","\\intop"),go(bo,yo,Co,"\u222c","\\iint"),go(bo,yo,Co,"\u222d","\\iiint"),go(bo,yo,Co,"\u220f","\\prod"),go(bo,yo,Co,"\u2211","\\sum"),go(bo,yo,Co,"\u2a02","\\bigotimes"),go(bo,yo,Co,"\u2a01","\\bigoplus"),go(bo,yo,Co,"\u2a00","\\bigodot"),go(bo,yo,Co,"\u222e","\\oint"),go(bo,yo,Co,"\u222f","\\oiint"),go(bo,yo,Co,"\u2230","\\oiiint"),go(bo,yo,Co,"\u2a06","\\bigsqcup"),go(bo,yo,Co,"\u222b","\\smallint"),go(vo,yo,So,"\u2026","\\textellipsis"),go(bo,yo,So,"\u2026","\\mathellipsis"),go(vo,yo,So,"\u2026","\\ldots",!0),go(bo,yo,So,"\u2026","\\ldots",!0),go(bo,yo,So,"\u22ef","\\@cdots",!0),go(bo,yo,So,"\u22f1","\\ddots",!0),go(bo,yo,Po,"\u22ee","\\varvdots"),go(vo,yo,Po,"\u22ee","\\varvdots"),go(bo,yo,wo,"\u02ca","\\acute"),go(bo,yo,wo,"\u02cb","\\grave"),go(bo,yo,wo,"\xa8","\\ddot"),go(bo,yo,wo,"~","\\tilde"),go(bo,yo,wo,"\u02c9","\\bar"),go(bo,yo,wo,"\u02d8","\\breve"),go(bo,yo,wo,"\u02c7","\\check"),go(bo,yo,wo,"^","\\hat"),go(bo,yo,wo,"\u20d7","\\vec"),go(bo,yo,wo,"\u02d9","\\dot"),go(bo,yo,wo,"\u02da","\\mathring"),go(bo,yo,Mo,"\ue131","\\@imath"),go(bo,yo,Mo,"\ue237","\\@jmath"),go(bo,yo,Po,"\u0131","\u0131"),go(bo,yo,Po,"\u0237","\u0237"),go(vo,yo,Po,"\u0131","\\i",!0),go(vo,yo,Po,"\u0237","\\j",!0),go(vo,yo,Po,"\xdf","\\ss",!0),go(vo,yo,Po,"\xe6","\\ae",!0),go(vo,yo,Po,"\u0153","\\oe",!0),go(vo,yo,Po,"\xf8","\\o",!0),go(vo,yo,Po,"\xc6","\\AE",!0),go(vo,yo,Po,"\u0152","\\OE",!0),go(vo,yo,Po,"\xd8","\\O",!0),go(vo,yo,wo,"\u02ca","\\'"),go(vo,yo,wo,"\u02cb","\\`"),go(vo,yo,wo,"\u02c6","\\^"),go(vo,yo,wo,"\u02dc","\\~"),go(vo,yo,wo,"\u02c9","\\="),go(vo,yo,wo,"\u02d8","\\u"),go(vo,yo,wo,"\u02d9","\\."),go(vo,yo,wo,"\xb8","\\c"),go(vo,yo,wo,"\u02da","\\r"),go(vo,yo,wo,"\u02c7","\\v"),go(vo,yo,wo,"\xa8",'\\"'),go(vo,yo,wo,"\u02dd","\\H"),go(vo,yo,wo,"\u25ef","\\textcircled");var No={"--":!0,"---":!0,"``":!0,"''":!0};go(vo,yo,Po,"\u2013","--",!0),go(vo,yo,Po,"\u2013","\\textendash"),go(vo,yo,Po,"\u2014","---",!0),go(vo,yo,Po,"\u2014","\\textemdash"),go(vo,yo,Po,"\u2018","`",!0),go(vo,yo,Po,"\u2018","\\textquoteleft"),go(vo,yo,Po,"\u2019","'",!0),go(vo,yo,Po,"\u2019","\\textquoteright"),go(vo,yo,Po,"\u201c","``",!0),go(vo,yo,Po,"\u201c","\\textquotedblleft"),go(vo,yo,Po,"\u201d","''",!0),go(vo,yo,Po,"\u201d","\\textquotedblright"),go(bo,yo,Po,"\xb0","\\degree",!0),go(vo,yo,Po,"\xb0","\\degree"),go(vo,yo,Po,"\xb0","\\textdegree",!0),go(bo,yo,Po,"\xa3","\\pounds"),go(bo,yo,Po,"\xa3","\\mathsterling",!0),go(vo,yo,Po,"\xa3","\\pounds"),go(vo,yo,Po,"\xa3","\\textsterling",!0),go(bo,xo,Po,"\u2720","\\maltese"),go(vo,xo,Po,"\u2720","\\maltese");for(var Oo='0123456789/@."',Ro=0;Ro<14;Ro++){var jo=Oo.charAt(Ro);go(bo,yo,Po,jo,jo)}for(var Lo='0123456789!@*()-=+";:?/.,',Do=0;Do<25;Do++){var Io=Lo.charAt(Do);go(vo,yo,Po,Io,Io)}for(var Bo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Fo=0;Fo<52;Fo++){var Ho=Bo.charAt(Fo);go(bo,yo,Mo,Ho,Ho),go(vo,yo,Po,Ho,Ho)}go(bo,xo,Po,"C","\u2102"),go(vo,xo,Po,"C","\u2102"),go(bo,xo,Po,"H","\u210d"),go(vo,xo,Po,"H","\u210d"),go(bo,xo,Po,"N","\u2115"),go(vo,xo,Po,"N","\u2115"),go(bo,xo,Po,"P","\u2119"),go(vo,xo,Po,"P","\u2119"),go(bo,xo,Po,"Q","\u211a"),go(vo,xo,Po,"Q","\u211a"),go(bo,xo,Po,"R","\u211d"),go(vo,xo,Po,"R","\u211d"),go(bo,xo,Po,"Z","\u2124"),go(vo,xo,Po,"Z","\u2124"),go(bo,yo,Mo,"h","\u210e"),go(vo,yo,Mo,"h","\u210e");for(var qo="",$o=0;$o<52;$o++){var Uo=Bo.charAt($o);go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56320+$o)),go(vo,yo,Po,Uo,qo),go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56372+$o)),go(vo,yo,Po,Uo,qo),go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56424+$o)),go(vo,yo,Po,Uo,qo),go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56580+$o)),go(vo,yo,Po,Uo,qo),go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56684+$o)),go(vo,yo,Po,Uo,qo),go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56736+$o)),go(vo,yo,Po,Uo,qo),go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56788+$o)),go(vo,yo,Po,Uo,qo),go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56840+$o)),go(vo,yo,Po,Uo,qo),go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56944+$o)),go(vo,yo,Po,Uo,qo),$o<26&&(go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56632+$o)),go(vo,yo,Po,Uo,qo),go(bo,yo,Mo,Uo,qo=String.fromCharCode(55349,56476+$o)),go(vo,yo,Po,Uo,qo))}go(bo,yo,Mo,"k",qo=String.fromCharCode(55349,56668)),go(vo,yo,Po,"k",qo);for(var Vo=0;Vo<10;Vo++){var Wo=Vo.toString();go(bo,yo,Mo,Wo,qo=String.fromCharCode(55349,57294+Vo)),go(vo,yo,Po,Wo,qo),go(bo,yo,Mo,Wo,qo=String.fromCharCode(55349,57314+Vo)),go(vo,yo,Po,Wo,qo),go(bo,yo,Mo,Wo,qo=String.fromCharCode(55349,57324+Vo)),go(vo,yo,Po,Wo,qo),go(bo,yo,Mo,Wo,qo=String.fromCharCode(55349,57334+Vo)),go(vo,yo,Po,Wo,qo)}for(var Yo="\xd0\xde\xfe",Go=0;Go<3;Go++){var Qo=Yo.charAt(Go);go(bo,yo,Mo,Qo,Qo),go(vo,yo,Po,Qo,Qo)}var Xo=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Ko=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Jo=function(e,t,n){return mo[n][e]&&mo[n][e].replace&&(e=mo[n][e].replace),{value:e,metrics:Hs(e,t,n)}},Zo=function(e,t,n,r,i){var a,s=Jo(e,t,n),o=s.metrics;if(e=s.value,o){var l=o.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),a=new oo(e,o.height,o.depth,l,o.skew,o.width,i)}else"undefined"!==typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),a=new oo(e,0,0,0,0,0,i);if(r){a.maxFontSize=r.sizeMultiplier,r.style.isTight()&&a.classes.push("mtight");var c=r.getColor();c&&(a.style.color=c)}return a},el=(e,t)=>{if(Js(e.classes)!==Js(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},tl=function(e){for(var t=0,n=0,r=0,i=0;it&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},nl=function(e,t,n,r){var i=new ro(e,t,n,r);return tl(i),i},rl=(e,t,n,r)=>new ro(e,t,n,r),il=function(e){var t=new Ds(e);return tl(t),t},al=function(e,t,n){var r="";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 r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},sl={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"}},ol={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ll={fontMap:sl,makeSymbol:Zo,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&Jo(e,"Main-Bold",t).metrics?Zo(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===mo[t][e].font?Zo(e,"Main-Regular",t,n,r):Zo(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:nl,makeSvgSpan:rl,makeLineSpan:function(e,t,n){var r=nl([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=Ks(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var i=new io(e,t,n,r);return tl(i),i},makeFragment:il,wrapFragment:function(e,t){return e instanceof Ds?nl([],[e],t):e},makeVList:function(e,t){for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a0)return Zo(i,l,r,t,a.concat(c));if(o){var u,h;if("boldsymbol"===o){var d=function(e,t,n,r,i){return"textord"!==i&&Jo(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,r,0,0,n);u=d.fontName,h=[d.fontClass]}else s?(u=sl[o].fontName,h=[o]):(u=al(o,t.fontWeight,t.fontShape),h=[o,t.fontWeight,t.fontShape]);if(Jo(i,u,r).metrics)return Zo(i,u,r,t,a.concat(h));if(No.hasOwnProperty(i)&&"Typewriter"===u.slice(0,10)){for(var p=[],f=0;f{var n=nl(["mspace"],[],t),r=Xs(e,t);return n.style.marginRight=Ks(r),n},staticSvg:function(e,t){var[n,r,i]=ol[e],a=new co(n),s=new lo([a],{width:Ks(r),height:Ks(i),style:"width:"+Ks(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),o=rl(["overlay"],[s],t);return o.height=i,o.style.height=Ks(i),o.style.width=Ks(r),o},svgData:ol,tryCombineChars:e=>{for(var t=0;t{var n=t.classes[0],r=e.classes[0];"mbin"===n&&ys.contains(_l,r)?t.classes[0]="mord":"mbin"===r&&ys.contains(kl,n)&&(e.classes[0]="mord")}),{node:u},h,d),Tl(i,((e,t)=>{var n=Al(t),r=Al(e),i=n&&r?e.hasClass("mtight")?pl[n][r]:dl[n][r]:null;if(i)return ll.makeGlue(i,l)}),{node:u},h,d),i},Tl=function e(t,n,r,i,a){i&&t.push(i);for(var s=0;sn=>{t.splice(e+1,0,n),s++})(s)}}i&&t.pop()},El=function(e){return e instanceof Ds||e instanceof io||e instanceof ro&&e.hasClass("enclosing")?e:null},zl=function e(t,n){var r=El(t);if(r){var i=r.children;if(i.length){if("right"===n)return e(i[i.length-1],"right");if("left"===n)return e(i[0],"left")}}return t},Al=function(e,t){return e?(t&&(e=zl(e,t)),Ml[e.classes[0]]||null):null},Pl=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return wl(t.concat(n))},Nl=function(e,t,n){if(!e)return wl();if(ml[e.type]){var r=ml[e.type](e,t);if(n&&t.size!==n.size){r=wl(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new fs("Got group of unknown type: '"+e.type+"'")};function Ol(e,t){var n=wl(["base"],e,t),r=wl(["strut"]);return r.style.height=Ks(n.height+n.depth),n.depth&&(r.style.verticalAlign=Ks(-n.depth)),n.children.unshift(r),n}function Rl(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,i=Cl(e,t,"root");2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var a,s=[],o=[],l=0;l0&&(s.push(Ol(o,t)),o=[]),s.push(i[l]));o.length>0&&s.push(Ol(o,t)),n?((a=Ol(Cl(n,t,!0))).classes=["tag"],s.push(a)):r&&s.push(r);var u=wl(["katex-html"],s);if(u.setAttribute("aria-hidden","true"),a){var h=a.children[0];h.style.height=Ks(u.height+u.depth),u.depth&&(h.style.verticalAlign=Ks(-u.depth))}return u}function jl(e){return new Ds(e)}class Ll{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=Js(this.classes));for(var n=0;n0&&(e+=' class ="'+ys.escape(Js(this.classes))+'"'),e+=">";for(var n=0;n"}toText(){return this.children.map((e=>e.toText())).join("")}}class Dl{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ys.escape(this.toText())}toText(){return this.text}}var Il={MathNode:Ll,TextNode:Dl,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":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",Ks(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},newDocumentFragment:jl},Bl=function(e,t,n){return!mo[t][e]||!mo[t][e].replace||55349===e.charCodeAt(0)||No.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=mo[t][e].replace),new Il.TextNode(e)},Fl=function(e){return 1===e.length?e[0]:new Il.MathNode("mrow",e)},Hl=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathsfit"===n)return"sans-serif-italic";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=e.text;return ys.contains(["\\imath","\\jmath"],i)?null:(mo[r][i]&&mo[r][i].replace&&(i=mo[r][i].replace),Hs(i,ll.fontMap[n].fontName,r)?ll.fontMap[n].variant:null)};function ql(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Dl&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var n=e.children[0];return n instanceof Dl&&","===n.text}return!1}var $l=function(e,t,n){if(1===e.length){var r=Vl(e[0],t);return n&&r instanceof Ll&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,a=[],s=0;s=1&&("mn"===i.type||ql(i))){var l=o.children[0];l instanceof Ll&&"mn"===l.type&&(l.children=[...i.children,...l.children],a.pop())}else if("mi"===i.type&&1===i.children.length){var c=i.children[0];if(c instanceof Dl&&"\u0338"===c.text&&("mo"===o.type||"mi"===o.type||"mn"===o.type)){var u=o.children[0];u instanceof Dl&&u.text.length>0&&(u.text=u.text.slice(0,1)+"\u0338"+u.text.slice(1),a.pop())}}}a.push(o),i=o}return a},Ul=function(e,t,n){return Fl($l(e,t,n))},Vl=function(e,t){if(!e)return new Il.MathNode("mrow");if(gl[e.type])return gl[e.type](e,t);throw new fs("Got group of unknown type: '"+e.type+"'")};function Wl(e,t,n,r,i){var a,s=$l(e,n);a=1===s.length&&s[0]instanceof Ll&&ys.contains(["mrow","mtable"],s[0].type)?s[0]:new Il.MathNode("mrow",s);var o=new Il.MathNode("annotation",[new Il.TextNode(t)]);o.setAttribute("encoding","application/x-tex");var l=new Il.MathNode("semantics",[a,o]),c=new Il.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return ll.makeSpan([u],[c])}var Yl=function(e){return new Ws({style:e.displayMode?Ps.DISPLAY:Ps.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Gl=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=ll.makeSpan(n,[e])}return e},Ql={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Xl={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],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]},Kl=function(e,t,n,r,i){var a,s=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=ll.makeSpan(["stretchy",t],[],i),"fbox"===t){var o=i.color&&i.getColor();o&&(a.style.borderColor=o)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new uo({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new uo({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new lo(l,{width:"100%",height:Ks(s)});a=ll.makeSvgSpan([],[c],i)}return a.height=s,a.style.height=Ks(s),a},Jl=function(e){var t=new Il.MathNode("mo",[new Il.TextNode(Ql[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Zl=function(e,t){var{span:n,minWidth:r,height:i}=function(){var n=4e5,r=e.label.slice(1);if(ys.contains(["widehat","widecheck","widetilde","utilde"],r)){var i,a,s,o="ordgroup"===(p=e.base).type?p.body.length:1;if(o>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,s=.42,a=r+"4"):(i=312,n=2340,s=.34,a="tilde4");else{var l=[1,1,2,2,3,3][o];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][l],i=[0,239,300,360,420][l],s=[0,.24,.3,.3,.36,.42][l],a=r+l):(n=[0,600,1033,2339,2340][l],i=[0,260,286,306,312][l],s=[0,.26,.286,.3,.306,.34][l],a="tilde"+l)}var c=new co(a),u=new lo([c],{width:"100%",height:Ks(s),viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:ll.makeSvgSpan([],[u],t),minWidth:0,height:s}}var h,d,p,f=[],m=Xl[r],[g,b,v]=m,y=v/1e3,x=g.length;if(1===x)h=["hide-tail"],d=[m[3]];else if(2===x)h=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");h=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w0&&(n.style.minWidth=Ks(r)),n};function ec(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function tc(e){var t=nc(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function nc(e){return e&&("atom"===e.type||fo.hasOwnProperty(e.type))?e:null}var rc=(e,t)=>{var n,r,i;e&&"supsub"===e.type?(n=(r=ec(e.base,"accent")).base,e.base=n,i=function(e){if(e instanceof ro)return e;throw new Error("Expected span but got "+String(e)+".")}(Nl(e,t)),e.base=r):n=(r=ec(e,"accent")).base;var a=Nl(n,t.havingCrampedStyle()),s=0;if(r.isShifty&&ys.isCharacterBox(n)){var o=ys.getBaseElem(n);s=ho(Nl(o,t.havingCrampedStyle())).skew}var l,c="\\c"===r.label,u=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight);if(r.isStretchy)l=Zl(r,t),l=ll.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+Ks(2*s)+")",marginLeft:Ks(2*s)}:void 0}]},t);else{var h,d;"\\vec"===r.label?(h=ll.staticSvg("vec",t),d=ll.svgData.vec[1]):((h=ho(h=ll.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,d=h.width,c&&(u+=h.depth)),l=ll.makeSpan(["accent-body"],[h]);var p="\\textcircled"===r.label;p&&(l.classes.push("accent-full"),u=a.height);var f=s;p||(f-=d/2),l.style.left=Ks(f),"\\textcircled"===r.label&&(l.style.top=".2em"),l=ll.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-u},{type:"elem",elem:l}]},t)}var m=ll.makeSpan(["mord","accent"],[l],t);return i?(i.children[0]=m,i.height=Math.max(m.height,i.height),i.classes[0]="mord",i):m},ic=(e,t)=>{var n=e.isStretchy?Jl(e.label):new Il.MathNode("mo",[Bl(e.label,e.mode)]),r=new Il.MathNode("mover",[Vl(e.base,t),n]);return r.setAttribute("accent","true"),r},ac=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));bl({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=yl(t[0]),r=!ac.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:rc,mathmlBuilder:ic}),bl({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"math"===r&&(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:rc,mathmlBuilder:ic}),bl({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=Nl(e.base,t),r=Zl(e,t),i="\\utilde"===e.label?.12:0,a=ll.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return ll.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var n=Jl(e.label),r=new Il.MathNode("munder",[Vl(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var sc=e=>{var t=new Il.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};bl({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,r=t.style,i=t.havingStyle(r.sup()),a=ll.wrapFragment(Nl(e.body,i,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";a.classes.push(s+"-arrow-pad"),e.below&&(i=t.havingStyle(r.sub()),(n=ll.wrapFragment(Nl(e.below,i,t),t)).classes.push(s+"-arrow-pad"));var o,l=Zl(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;if((a.depth>.25||"\\xleftequilibrium"===e.label)&&(u-=a.depth),n){var h=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;o=ll.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:h}]},t)}else o=ll.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:c}]},t);return o.children[0].children[0].children[1].classes.push("svg-align"),ll.makeSpan(["mrel","x-arrow"],[o],t)},mathmlBuilder(e,t){var n,r=Jl(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var i=sc(Vl(e.body,t));if(e.below){var a=sc(Vl(e.below,t));n=new Il.MathNode("munderover",[r,a,i])}else n=new Il.MathNode("mover",[r,i])}else if(e.below){var s=sc(Vl(e.below,t));n=new Il.MathNode("munder",[r,s])}else n=sc(),n=new Il.MathNode("mover",[r,n]);return n}});var oc=ll.makeSpan;function lc(e,t){var n=Cl(e.body,t,!0);return oc([e.mclass],n,t)}function cc(e,t){var n,r=$l(e.body,t);return"minner"===e.mclass?n=new Il.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new Il.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new Il.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}bl({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:xl(i),isCharacterBox:ys.isCharacterBox(i)}},htmlBuilder:lc,mathmlBuilder:cc});var uc=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};bl({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:uc(t[0]),body:xl(t[1]),isCharacterBox:ys.isCharacterBox(t[1])}}}),bl({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:i}=e,a=t[1],s=t[0];n="\\stackrel"!==i?uc(a):"mrel";var o={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:xl(a)},l={type:"supsub",mode:s.mode,base:o,sup:"\\underset"===i?null:s,sub:"\\underset"===i?s:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:ys.isCharacterBox(l)}},htmlBuilder:lc,mathmlBuilder:cc}),bl({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:uc(t[0]),body:xl(t[0])}},htmlBuilder(e,t){var n=Cl(e.body,t,!0),r=ll.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=$l(e.body,t),r=new Il.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var hc={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},dc=e=>"textord"===e.type&&"@"===e.text;function pc(e,t,n){var r=hc[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:r,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[i],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[a],[]);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"}}}bl({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=ll.wrapFragment(Nl(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ks(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Il.MathNode("mrow",[Vl(e.label,t)]);return(n=new Il.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new Il.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),bl({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=ll.wrapFragment(Nl(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new Il.MathNode("mrow",[Vl(e.fragment,t)])}),bl({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=ec(t[0],"ordgroup").body,i="",a=0;a=1114111)throw new fs("\\@char with invalid code point "+i);return o<=65535?s=String.fromCharCode(o):(o-=65536,s=String.fromCharCode(55296+(o>>10),56320+(1023&o))),{type:"textord",mode:n.mode,text:s}}});var fc=(e,t)=>{var n=Cl(e.body,t.withColor(e.color),!1);return ll.makeFragment(n)},mc=(e,t)=>{var n=$l(e.body,t.withColor(e.color)),r=new Il.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};bl({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=ec(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:xl(i)}},htmlBuilder:fc,mathmlBuilder:mc}),bl({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=ec(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:fc,mathmlBuilder:mc}),bl({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&&ec(i,"size").value}},htmlBuilder(e,t){var n=ll.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=Ks(Xs(e.size,t)))),n},mathmlBuilder(e,t){var n=new Il.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",Ks(Xs(e.size,t)))),n}});var gc={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},bc=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new fs("Expected a control sequence",e);return t},vc=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);null==i&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};bl({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(gc[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=gc[r.text]),ec(t.parseFunction(),"internal");throw new fs("Invalid token after macro prefix",r)}}),bl({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 fs("Expected a control sequence",r);for(var a,s=0,o=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){a=t.gullet.future(),o[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new fs('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new fs('Argument number "'+r.text+'" out of order');s++,o.push([])}else{if("EOF"===r.text)throw new fs("Expected a macro definition");o[s].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return a&&l.unshift(a),"\\edef"!==n&&"\\xdef"!==n||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:o},n===gc[n]),{type:"internal",mode:t.mode}}}),bl({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=bc(t.gullet.popToken());t.gullet.consumeSpaces();var i=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return vc(t,r,i,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),bl({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=bc(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return vc(t,r,a,"\\\\globalfuture"===n),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var yc=function(e,t,n){var r=Hs(mo.math[e]&&mo.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},xc=function(e,t,n,r){var i=n.havingBaseStyle(t),a=ll.makeSpan(r.concat(i.sizingClasses(n)),[e],n),s=i.sizeMultiplier/n.sizeMultiplier;return a.height*=s,a.depth*=s,a.maxFontSize=i.sizeMultiplier,a},wc=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=Ks(i),e.height-=i,e.depth+=i},kc=function(e,t,n,r,i,a){var s=function(e,t,n,r){return ll.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,i,r),o=xc(ll.makeSpan(["delimsizing","size"+t],[s],r),Ps.TEXT,r,a);return n&&wc(o,r,Ps.TEXT),o},_c=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:ll.makeSpan(["delimsizinginner",r],[ll.makeSpan([],[ll.makeSymbol(e,t,n)])])}},Sc=function(e,t,n){var r=Is["Size4-Regular"][e.charCodeAt(0)]?Is["Size4-Regular"][e.charCodeAt(0)][4]:Is["Size1-Regular"][e.charCodeAt(0)][4],i=new co("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),a=new lo([i],{width:Ks(r),height:Ks(t),style:"width:"+Ks(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),s=ll.makeSvgSpan([],[a],n);return s.height=t,s.style.height=Ks(t),s.style.width=Ks(r),{type:"elem",elem:s}},Mc={type:"kern",size:-.008},Cc=["|","\\lvert","\\rvert","\\vert"],Tc=["\\|","\\lVert","\\rVert","\\Vert"],Ec=function(e,t,n,r,i,a){var s,o,l,c,u="",h=0;s=l=c=e,o=null;var d="Size1-Regular";"\\uparrow"===e?l=c="\u23d0":"\\Uparrow"===e?l=c="\u2016":"\\downarrow"===e?s=l="\u23d0":"\\Downarrow"===e?s=l="\u2016":"\\updownarrow"===e?(s="\\uparrow",l="\u23d0",c="\\downarrow"):"\\Updownarrow"===e?(s="\\Uparrow",l="\u2016",c="\\Downarrow"):ys.contains(Cc,e)?(l="\u2223",u="vert",h=333):ys.contains(Tc,e)?(l="\u2225",u="doublevert",h=556):"["===e||"\\lbrack"===e?(s="\u23a1",l="\u23a2",c="\u23a3",d="Size4-Regular",u="lbrack",h=667):"]"===e||"\\rbrack"===e?(s="\u23a4",l="\u23a5",c="\u23a6",d="Size4-Regular",u="rbrack",h=667):"\\lfloor"===e||"\u230a"===e?(l=s="\u23a2",c="\u23a3",d="Size4-Regular",u="lfloor",h=667):"\\lceil"===e||"\u2308"===e?(s="\u23a1",l=c="\u23a2",d="Size4-Regular",u="lceil",h=667):"\\rfloor"===e||"\u230b"===e?(l=s="\u23a5",c="\u23a6",d="Size4-Regular",u="rfloor",h=667):"\\rceil"===e||"\u2309"===e?(s="\u23a4",l=c="\u23a5",d="Size4-Regular",u="rceil",h=667):"("===e||"\\lparen"===e?(s="\u239b",l="\u239c",c="\u239d",d="Size4-Regular",u="lparen",h=875):")"===e||"\\rparen"===e?(s="\u239e",l="\u239f",c="\u23a0",d="Size4-Regular",u="rparen",h=875):"\\{"===e||"\\lbrace"===e?(s="\u23a7",o="\u23a8",c="\u23a9",l="\u23aa",d="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(s="\u23ab",o="\u23ac",c="\u23ad",l="\u23aa",d="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(s="\u23a7",c="\u23a9",l="\u23aa",d="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(s="\u23ab",c="\u23ad",l="\u23aa",d="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(s="\u23a7",c="\u23ad",l="\u23aa",d="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(s="\u23ab",c="\u23a9",l="\u23aa",d="Size4-Regular");var p=yc(s,d,i),f=p.height+p.depth,m=yc(l,d,i),g=m.height+m.depth,b=yc(c,d,i),v=b.height+b.depth,y=0,x=1;if(null!==o){var w=yc(o,d,i);y=w.height+w.depth,x=2}var k=f+v+y,_=k+Math.max(0,Math.ceil((t-k)/(x*g)))*x*g,S=r.fontMetrics().axisHeight;n&&(S*=r.sizeMultiplier);var M=_/2-S,C=[];if(u.length>0){var T=_-f-v,E=Math.round(1e3*_),z=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 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\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-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\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-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\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 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\nc-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,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.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\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-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,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-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\nc-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\nc0,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\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(u,Math.round(1e3*T)),A=new co(u,z),P=(h/1e3).toFixed(3)+"em",N=(E/1e3).toFixed(3)+"em",O=new lo([A],{width:P,height:N,viewBox:"0 0 "+h+" "+E}),R=ll.makeSvgSpan([],[O],r);R.height=E/1e3,R.style.width=P,R.style.height=N,C.push({type:"elem",elem:R})}else{if(C.push(_c(c,d,i)),C.push(Mc),null===o){var j=_-f-v+.016;C.push(Sc(l,j,r))}else{var L=(_-f-v-y)/2+.016;C.push(Sc(l,L,r)),C.push(Mc),C.push(_c(o,d,i)),C.push(Mc),C.push(Sc(l,L,r))}C.push(Mc),C.push(_c(s,d,i))}var D=r.havingBaseStyle(Ps.TEXT),I=ll.makeVList({positionType:"bottom",positionData:M,children:C},D);return xc(ll.makeSpan(["delimsizing","mult"],[I],D),Ps.TEXT,r,a)},zc=.08,Ac=function(e,t,n,r,i){var a=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.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\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,js);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,js);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,js);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-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\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,js);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-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\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,js);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"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\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,js,n)}return r}(e,r,n),s=new co(e,a),o=new lo([s],{width:"400em",height:Ks(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return ll.makeSvgSpan(["hide-tail"],[o],i)},Pc=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Nc=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],Oc=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Rc=[0,1.2,1.8,2.4,3],jc=[{type:"small",style:Ps.SCRIPTSCRIPT},{type:"small",style:Ps.SCRIPT},{type:"small",style:Ps.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Lc=[{type:"small",style:Ps.SCRIPTSCRIPT},{type:"small",style:Ps.SCRIPT},{type:"small",style:Ps.TEXT},{type:"stack"}],Dc=[{type:"small",style:Ps.SCRIPTSCRIPT},{type:"small",style:Ps.SCRIPT},{type:"small",style:Ps.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ic=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Bc=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return n[i]}return n[n.length-1]},Fc=function(e,t,n,r,i,a){var s;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),s=ys.contains(Oc,e)?jc:ys.contains(Pc,e)?Dc:Lc;var o=Bc(e,t,s,r);return"small"===o.type?function(e,t,n,r,i,a){var s=ll.makeSymbol(e,"Main-Regular",i,r),o=xc(s,t,r,a);return n&&wc(o,r,t),o}(e,o.style,n,r,i,a):"large"===o.type?kc(e,o.size,n,r,i,a):Ec(e,t,n,r,i,a)},Hc={sqrtImage:function(e,t){var n,r,i=t.havingBaseSizing(),a=Bc("\\surd",e*i.sizeMultiplier,Dc,i),s=i.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,u=0;return"small"===a.type?(e<1?s=1:e<1.4&&(s=.7),c=(1+o)/s,(n=Ac("sqrtMain",l=(1+o+zc)/s,u=1e3+1e3*o+80,o,t)).style.minWidth="0.853em",r=.833/s):"large"===a.type?(u=1080*Rc[a.size],c=(Rc[a.size]+o)/s,l=(Rc[a.size]+o+zc)/s,(n=Ac("sqrtSize"+a.size,l,u,o,t)).style.minWidth="1.02em",r=1/s):(l=e+o+zc,c=e+o,u=Math.floor(1e3*e+o)+80,(n=Ac("sqrtTall",l,u,o,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=Ks(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*s}},sizedDelim:function(e,t,n,r,i){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),ys.contains(Pc,e)||ys.contains(Oc,e))return kc(e,t,!1,n,r,i);if(ys.contains(Nc,e))return Ec(e,Rc[t],!1,n,r,i);throw new fs("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:Rc,customSizedDelim:Fc,leftRightDelim:function(e,t,n,r,i,a){var s=r.fontMetrics().axisHeight*r.sizeMultiplier,o=5/r.fontMetrics().ptPerEm,l=Math.max(t-s,n+s),c=Math.max(l/500*901,2*l-o);return Fc(e,c,!0,r,i,a)}},qc={"\\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}},$c=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Uc(e,t){var n=nc(e);if(n&&ys.contains($c,n.text))return n;throw new fs(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Vc(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}bl({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=Uc(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:qc[e.funcName].size,mclass:qc[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?ll.makeSpan([e.mclass]):Hc.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Bl(e.delim,e.mode));var n=new Il.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=Ks(Hc.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),bl({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!==typeof n)throw new fs("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Uc(t[0],e).text,color:n}}}),bl({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Uc(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=ec(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Vc(e);for(var n,r,i=Cl(e.body,t,!0,["mopen","mclose"]),a=0,s=0,o=!1,l=0;l{Vc(e);var n=$l(e.body,t);if("."!==e.left){var r=new Il.MathNode("mo",[Bl(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var i=new Il.MathNode("mo",[Bl(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return Fl(n)}}),bl({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Uc(t[0],e);if(!e.parser.leftrightDepth)throw new fs("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=Pl(t,[]);else{n=Hc.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?Bl("|","text"):Bl(e.delim,e.mode),r=new Il.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Wc=(e,t)=>{var n,r,i,a=ll.wrapFragment(Nl(e.body,t),t),s=e.label.slice(1),o=t.sizeMultiplier,l=0,c=ys.isCharacterBox(e.body);if("sout"===s)(n=ll.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/o,l=-.5*t.fontMetrics().xHeight;else if("phase"===s){var u=Xs({number:.6,unit:"pt"},t),h=Xs({number:.35,unit:"ex"},t);o/=t.havingBaseSizing().sizeMultiplier;var d=a.height+a.depth+u+h;a.style.paddingLeft=Ks(d/2+u);var p=Math.floor(1e3*d*o),f="M400000 "+(r=p)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",m=new lo([new co("phase",f)],{width:"400em",height:Ks(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(n=ll.makeSvgSpan(["hide-tail"],[m],t)).style.height=Ks(d),l=a.depth+u+h}else{/cancel/.test(s)?c||a.classes.push("cancel-pad"):"angl"===s?a.classes.push("anglpad"):a.classes.push("boxpad");var g=0,b=0,v=0;/box/.test(s)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=g=t.fontMetrics().fboxsep+("colorbox"===s?0:v)):"angl"===s?(g=4*(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-a.depth)):b=g=c?.2:0,n=Kl(a,s,g,b,t),/fbox|boxed|fcolorbox/.test(s)?(n.style.borderStyle="solid",n.style.borderWidth=Ks(v)):"angl"===s&&.049!==v&&(n.style.borderTopWidth=Ks(v),n.style.borderRightWidth=Ks(v)),l=a.depth+b,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)i=ll.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:l},{type:"elem",elem:a,shift:0}]},t);else{var y=/cancel|phase/.test(s)?["svg-align"]:[];i=ll.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:n,shift:l,wrapperClasses:y}]},t)}return/cancel/.test(s)&&(i.height=a.height,i.depth=a.depth),/cancel/.test(s)&&!c?ll.makeSpan(["mord","cancel-lap"],[i],t):ll.makeSpan(["mord"],[i],t)},Yc=(e,t)=>{var n=0,r=new Il.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Vl(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"),"\\fcolorbox"===e.label){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};bl({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=ec(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:Wc,mathmlBuilder:Yc}),bl({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,a=ec(t[0],"color-token").color,s=ec(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:Wc,mathmlBuilder:Yc}),bl({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]}}}),bl({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\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:Wc,mathmlBuilder:Yc}),bl({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 Gc={};function Qc(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{if(!e.parser.settings.displayMode)throw new fs("{"+e.envName+"} can be used only in display mode.")};function eu(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function tu(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:s,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:h,leqno:d}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)s=1;else if(!(s=parseFloat(p))||s<0)throw new fs("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var f=[],m=[f],g=[],b=[],v=null!=l?[]:void 0;function y(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function x(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new ps("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),b.push(Jc(e));;){var w=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),w={type:"ordgroup",mode:e.mode,body:w},n&&(w={type:"styling",mode:e.mode,style:n,body:[w]}),f.push(w);var k=e.fetch().text;if("&"===k){if(h&&f.length===h){if(c||o)throw new fs("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===k){x(),1===f.length&&"styling"===w.type&&0===w.body[0].body.length&&(m.length>1||!u)&&m.pop(),b.length0&&(b+=.25),l.push({pos:b,isDashed:e[t]})}for(v(a[0]),n=0;n0&&(w<(M+=g)&&(w=M),M=0),e.addJot&&(w+=p),k.height=x,k.depth=w,b+=x,k.pos=b,b+=w+M,o[n]=k,v(a[n+1])}var C,T,E=b/2+t.fontMetrics().axisHeight,z=e.cols||[],A=[],P=[];if(e.tags&&e.tags.some((e=>e)))for(n=0;n=s)){var H=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(H=ys.deflt(L.pregap,h))&&((C=ll.makeSpan(["arraycolsep"],[])).style.width=Ks(H),A.push(C));var q=[];for(n=0;n0){for(var W=ll.makeLineSpan("hline",t,c),Y=ll.makeLineSpan("hdashline",t,c),G=[{type:"elem",elem:o,shift:0}];l.length>0;){var Q=l.pop(),X=Q.pos-E;Q.isDashed?G.push({type:"elem",elem:Y,shift:X}):G.push({type:"elem",elem:W,shift:X})}o=ll.makeVList({positionType:"individualShift",children:G},t)}if(0===P.length)return ll.makeSpan(["mord"],[o],t);var K=ll.makeVList({positionType:"individualShift",children:P},t);return K=ll.makeSpan(["tag"],[K],t),ll.makeFragment([o,K])},iu={c:"center ",l:"left ",r:"right "},au=function(e,t){for(var n=[],r=new Il.MathNode("mtd",[],["mtr-glue"]),i=new Il.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var p=e.cols,f="",m=!1,g=0,b=p.length;"separator"===p[0].type&&(h+="top ",g=1),"separator"===p[p.length-1].type&&(h+="bottom ",b-=1);for(var v=g;v0?"left ":"",h+=_[_.length-1].length>0?"right ":"";for(var S=1;S<_.length-1;S++)k+=0===_[S].length?"none ":_[S][0]?"dashed ":"solid ";return/[sd]/.test(k)&&c.setAttribute("rowlines",k.trim()),""!==h&&(c=new Il.MathNode("menclose",[c])).setAttribute("notation",h.trim()),e.arraystretch&&e.arraystretch<1&&(c=new Il.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},su=function(e,t){-1===e.envName.indexOf("ed")&&Zc(e);var n,r=[],i=e.envName.indexOf("at")>-1?"alignat":"align",a="split"===e.envName,s=tu(e.parser,{cols:r,addJot:!0,autoTag:a?void 0:eu(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",u=0;u0&&h&&(f=1),r[d]={type:"align",align:p,pregap:f,postgap:0}}return s.colSeparationType=h?"align":"alignat",s};Qc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(nc(t[0])?[t[0]]:ec(t[0],"ordgroup").body).map((function(e){var t=tc(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new fs("Unknown column alignment: "+t,e)})),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return tu(e.parser,r,nu(e.envName))},htmlBuilder:ru,mathmlBuilder:au}),Qc({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,-1==="lcr".indexOf(n))throw new fs("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var a=tu(e.parser,r,nu(e.envName)),s=Math.max(0,...a.body.map((e=>e.length)));return a.cols=new Array(s).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:ru,mathmlBuilder:au}),Qc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=tu(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:ru,mathmlBuilder:au}),Qc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(nc(t[0])?[t[0]]:ec(t[0],"ordgroup").body).map((function(e){var t=tc(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new fs("Unknown column alignment: "+t,e)}));if(n.length>1)throw new fs("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=tu(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new fs("{subarray} can contain only one column");return r},htmlBuilder:ru,mathmlBuilder:au}),Qc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=tu(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},nu(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:ru,mathmlBuilder:au}),Qc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:su,htmlBuilder:ru,mathmlBuilder:au}),Qc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){ys.contains(["gather","gather*"],e.envName)&&Zc(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:eu(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return tu(e.parser,t,"display")},htmlBuilder:ru,mathmlBuilder:au}),Qc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:su,htmlBuilder:ru,mathmlBuilder:au}),Qc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Zc(e);var t={autoTag:eu(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return tu(e.parser,t,"display")},htmlBuilder:ru,mathmlBuilder:au}),Qc({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Zc(e),function(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){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new fs("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r,i,a=[],s=[a],o=0;o-1);else{if(!("<>AV".indexOf(h)>-1))throw new fs('Expected one of "<>AV=|." after @',l[u]);for(var p=0;p<2;p++){for(var f=!0,m=u+1;m{var n=e.font,r=t.withFont(n);return Nl(e.body,r)},cu=(e,t)=>{var n=e.font,r=t.withFont(n);return Vl(e.body,r)},uu={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};bl({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=yl(t[0]),a=r;return a in uu&&(a=uu[a]),{type:"font",mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:lu,mathmlBuilder:cu}),bl({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=ys.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:uc(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}}),bl({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,s=n.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:s}}},htmlBuilder:lu,mathmlBuilder:cu});var hu=(e,t)=>{var n=t;return"display"===e?n=n.id>=Ps.SCRIPT.id?n.text():Ps.DISPLAY:"text"===e&&n.size===Ps.DISPLAY.size?n=Ps.TEXT:"script"===e?n=Ps.SCRIPT:"scriptscript"===e&&(n=Ps.SCRIPTSCRIPT),n},du=(e,t)=>{var n,r=hu(e.size,t.style),i=r.fracNum(),a=r.fracDen();n=t.havingStyle(i);var s=Nl(e.numer,n,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height0?3*h:7*h,f=t.fontMetrics().denom1):(u>0?(d=t.fontMetrics().num2,p=h):(d=t.fontMetrics().num3,p=3*h),f=t.fontMetrics().denom2),c){var x=t.fontMetrics().axisHeight;d-s.depth-(x+.5*u){var n=new Il.MathNode("mfrac",[Vl(e.numer,t),Vl(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=Xs(e.barSize,t);n.setAttribute("linethickness",Ks(r))}}else n.setAttribute("linethickness","0px");var i=hu(e.size,t.style);if(i.size!==t.style.size){n=new Il.MathNode("mstyle",[n]);var a=i.size===Ps.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",a),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var s=[];if(null!=e.leftDelim){var o=new Il.MathNode("mo",[new Il.TextNode(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(n),null!=e.rightDelim){var l=new Il.MathNode("mo",[new Il.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return Fl(s)}return n};bl({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:i}=e,a=t[0],s=t[1],o=null,l=null,c="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,o="(",l=")";break;case"\\\\bracefrac":n=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:a,denom:s,hasBarLine:n,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:du,mathmlBuilder:pu}),bl({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),bl({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:i}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:i}}});var fu=["display","text","script","scriptscript"],mu=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};bl({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,i=t[4],a=t[5],s=yl(t[0]),o="atom"===s.type&&"open"===s.family?mu(s.text):null,l=yl(t[1]),c="atom"===l.type&&"close"===l.family?mu(l.text):null,u=ec(t[2],"size"),h=null;n=!!u.isBlank||(h=u.value).number>0;var d="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var f=ec(p.body[0],"textord");d=fu[Number(f.text)]}}else p=ec(p,"textord"),d=fu[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:i,denom:a,continued:!1,hasBarLine:n,barSize:h,leftDelim:o,rightDelim:c,size:d}},htmlBuilder:du,mathmlBuilder:pu}),bl({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:ec(t[0],"size").value,token:i}}}),bl({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(ec(t[1],"infix").size),s=t[2],o=a.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:du,mathmlBuilder:pu});var gu=(e,t)=>{var n,r,i=t.style;"supsub"===e.type?(n=e.sup?Nl(e.sup,t.havingStyle(i.sup()),t):Nl(e.sub,t.havingStyle(i.sub()),t),r=ec(e.base,"horizBrace")):r=ec(e,"horizBrace");var a,s=Nl(r.base,t.havingBaseStyle(Ps.DISPLAY)),o=Zl(r,t);if(r.isOver?(a=ll.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(a=ll.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=ll.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t);a=r.isOver?ll.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):ll.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return ll.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t)};bl({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:gu,mathmlBuilder:(e,t)=>{var n=Jl(e.label);return new Il.MathNode(e.isOver?"mover":"munder",[Vl(e.base,t),n])}}),bl({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=ec(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:xl(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Cl(e.body,t,!1);return ll.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Ul(e.body,t);return n instanceof Ll||(n=new Ll("mrow",[n])),n.setAttribute("href",e.href),n}}),bl({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=ec(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],a=0;anew Il.MathNode("mrow",$l(e.body,t))}),bl({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:r,funcName:i,token:a}=e,s=ec(t[0],"raw").string,o=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(i){case"\\htmlClass":l.class=s,n={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,n={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,n={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var c=s.split(","),u=0;u{var n=Cl(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=ll.makeSpan(r,n,t);for(var a in e.attributes)"class"!==a&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>Ul(e.body,t)}),bl({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:xl(t[0]),mathml:xl(t[1])}},htmlBuilder:(e,t)=>{var n=Cl(e.html,t,!1);return ll.makeFragment(n)},mathmlBuilder:(e,t)=>Ul(e.mathml,t)});var bu=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 fs("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!Qs(n))throw new fs("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};bl({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"},s={number:0,unit:"em"},o="";if(n[0])for(var l=ec(n[0],"raw").string.split(","),c=0;c{var n=Xs(e.height,t),r=0;e.totalheight.number>0&&(r=Xs(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Xs(e.width,t));var a={height:Ks(n+r)};i>0&&(a.width=Ks(i)),r>0&&(a.verticalAlign=Ks(-r));var s=new ao(e.src,e.alt,a);return s.height=n,s.depth=r,s},mathmlBuilder:(e,t)=>{var n=new Il.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=Xs(e.height,t),i=0;if(e.totalheight.number>0&&(i=Xs(e.totalheight,t)-r,n.setAttribute("valign",Ks(-i))),n.setAttribute("height",Ks(r+i)),e.width.number>0){var a=Xs(e.width,t);n.setAttribute("width",Ks(a))}return n.setAttribute("src",e.src),n}}),bl({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=ec(t[0],"size");if(n.settings.strict){var a="m"===r[1],s="mu"===i.value.unit;a?(s||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):s&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:(e,t)=>ll.makeGlue(e.dimension,t),mathmlBuilder(e,t){var n=Xs(e.dimension,t);return new Il.SpaceNode(n)}}),bl({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;"clap"===e.alignment?(n=ll.makeSpan([],[Nl(e.body,t)]),n=ll.makeSpan(["inner"],[n],t)):n=ll.makeSpan(["inner"],[Nl(e.body,t)]);var r=ll.makeSpan(["fix"],[]),i=ll.makeSpan([e.alignment],[n,r],t),a=ll.makeSpan(["strut"]);return a.style.height=Ks(i.height+i.depth),i.depth&&(a.style.verticalAlign=Ks(-i.depth)),i.children.unshift(a),i=ll.makeSpan(["thinbox"],[i],t),ll.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new Il.MathNode("mpadded",[Vl(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),bl({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?"\\)":"$",s=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:s}}}),bl({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new fs("Mismatched "+e.funcName)}});var vu=(e,t)=>{switch(t.style.size){case Ps.DISPLAY.size:return e.display;case Ps.TEXT.size:return e.text;case Ps.SCRIPT.size:return e.script;case Ps.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};bl({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:xl(t[0]),text:xl(t[1]),script:xl(t[2]),scriptscript:xl(t[3])}},htmlBuilder:(e,t)=>{var n=vu(e,t),r=Cl(n,t,!1);return ll.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=vu(e,t);return Ul(n,t)}});var yu=(e,t,n,r,i,a,s)=>{e=ll.makeSpan([],[e]);var o,l,c,u=n&&ys.isCharacterBox(n);if(t){var h=Nl(t,r.havingStyle(i.sup()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(n){var d=Nl(n,r.havingStyle(i.sub()),r);o={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(l&&o){var p=r.fontMetrics().bigOpSpacing5+o.elem.height+o.elem.depth+o.kern+e.depth+s;c=ll.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:Ks(-a)},{type:"kern",size:o.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Ks(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(o){var f=e.height-s;c=ll.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:Ks(-a)},{type:"kern",size:o.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var m=e.depth+s;c=ll.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Ks(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var g=[c];if(o&&0!==a&&!u){var b=ll.makeSpan(["mspace"],[],r);b.style.marginRight=Ks(a),g.unshift(b)}return ll.makeSpan(["mop","op-limits"],g,r)},xu=["\\smallint"],wu=(e,t)=>{var n,r,i,a=!1;"supsub"===e.type?(n=e.sup,r=e.sub,i=ec(e.base,"op"),a=!0):i=ec(e,"op");var s,o=t.style,l=!1;if(o.size===Ps.DISPLAY.size&&i.symbol&&!ys.contains(xu,i.name)&&(l=!0),i.symbol){var c=l?"Size2-Regular":"Size1-Regular",u="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(u=i.name.slice(1),i.name="oiint"===u?"\\iint":"\\iiint"),s=ll.makeSymbol(i.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),u.length>0){var h=s.italic,d=ll.staticSvg(u+"Size"+(l?"2":"1"),t);s=ll.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:d,shift:l?.08:0}]},t),i.name="\\"+u,s.classes.unshift("mop"),s.italic=h}}else if(i.body){var p=Cl(i.body,t,!0);1===p.length&&p[0]instanceof oo?(s=p[0]).classes[0]="mop":s=ll.makeSpan(["mop"],p,t)}else{for(var f=[],m=1;m{var n;if(e.symbol)n=new Ll("mo",[Bl(e.name,e.mode)]),ys.contains(xu,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Ll("mo",$l(e.body,t));else{n=new Ll("mi",[new Dl(e.name.slice(1))]);var r=new Ll("mo",[Bl("\u2061","text")]);n=e.parentIsSupSub?new Ll("mrow",[n,r]):jl([n,r])}return n},_u={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};bl({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return 1===i.length&&(i=_u[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:wu,mathmlBuilder:ku}),bl({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:xl(r)}},htmlBuilder:wu,mathmlBuilder:ku});var Su={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};bl({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"],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:wu,mathmlBuilder:ku}),bl({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:wu,mathmlBuilder:ku}),bl({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=Su[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:wu,mathmlBuilder:ku});var Mu=(e,t)=>{var n,r,i,a,s=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,i=ec(e.base,"operatorname"),s=!0):i=ec(e,"operatorname"),i.body.length>0){for(var o=i.body.map((e=>{var t=e.text;return"string"===typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=Cl(o,t.withFont("mathrm"),!0),c=0;c{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:xl(i),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Mu,mathmlBuilder:(e,t)=>{for(var n=$l(e.body,t.withFont("mathrm")),r=!0,i=0;ie.toText())).join("");n=[new Il.TextNode(o)]}var l=new Il.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new Il.MathNode("mo",[Bl("\u2061","text")]);return e.parentIsSupSub?new Il.MathNode("mrow",[l,c]):Il.newDocumentFragment([l,c])}}),Kc("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),vl({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?ll.makeFragment(Cl(e.body,t,!1)):ll.makeSpan(["mord"],Cl(e.body,t,!0),t),mathmlBuilder:(e,t)=>Ul(e.body,t,!0)}),bl({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=Nl(e.body,t.havingCrampedStyle()),r=ll.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=ll.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return ll.makeSpan(["mord","overline"],[a],t)},mathmlBuilder(e,t){var n=new Il.MathNode("mo",[new Il.TextNode("\u203e")]);n.setAttribute("stretchy","true");var r=new Il.MathNode("mover",[Vl(e.body,t),n]);return r.setAttribute("accent","true"),r}}),bl({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:xl(r)}},htmlBuilder:(e,t)=>{var n=Cl(e.body,t.withPhantom(),!1);return ll.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=$l(e.body,t);return new Il.MathNode("mphantom",n)}}),bl({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=ll.makeSpan([],[Nl(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=$l(xl(e.body),t),r=new Il.MathNode("mphantom",n),i=new Il.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}}),bl({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)=>{var n=ll.makeSpan(["inner"],[Nl(e.body,t.withPhantom())]),r=ll.makeSpan(["fix"],[]);return ll.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=$l(xl(e.body),t),r=new Il.MathNode("mphantom",n),i=new Il.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}}),bl({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=ec(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Nl(e.body,t),r=Xs(e.dy,t);return ll.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new Il.MathNode("mpadded",[Vl(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),bl({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),bl({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=ec(t[0],"size"),s=ec(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&ec(i,"size").value,width:a.value,height:s.value}},htmlBuilder(e,t){var n=ll.makeSpan(["mord","rule"],[],t),r=Xs(e.width,t),i=Xs(e.height,t),a=e.shift?Xs(e.shift,t):0;return n.style.borderRightWidth=Ks(r),n.style.borderTopWidth=Ks(i),n.style.bottom=Ks(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=1.125*i*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Xs(e.width,t),r=Xs(e.height,t),i=e.shift?Xs(e.shift,t):0,a=t.color&&t.getColor()||"black",s=new Il.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",Ks(n)),s.setAttribute("height",Ks(r));var o=new Il.MathNode("mpadded",[s]);return i>=0?o.setAttribute("height",Ks(i)):(o.setAttribute("height",Ks(i)),o.setAttribute("depth",Ks(-i))),o.setAttribute("voffset",Ks(i)),o}});var Tu=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];bl({type:"sizing",names:Tu,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:Tu.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Cu(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=$l(e.body,n),i=new Il.MathNode("mstyle",r);return i.setAttribute("mathsize",Ks(n.sizeMultiplier)),i}}),bl({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,s=n[0]&&ec(n[0],"ordgroup");if(s)for(var o="",l=0;l{var n=ll.makeSpan([],[Nl(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new Il.MathNode("mpadded",[Vl(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),bl({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=Nl(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=ll.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.idn.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var h=o.height-n.height-a-l;n.style.paddingLeft=Ks(c);var d=ll.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+h)},{type:"elem",elem:o},{type:"kern",size:l}]},t);if(e.index){var p=t.havingStyle(Ps.SCRIPTSCRIPT),f=Nl(e.index,p,t),m=.6*(d.height-d.depth),g=ll.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:f}]},t),b=ll.makeSpan(["root"],[g]);return ll.makeSpan(["mord","sqrt"],[b,d],t)}return ll.makeSpan(["mord","sqrt"],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new Il.MathNode("mroot",[Vl(n,t),Vl(r,t)]):new Il.MathNode("msqrt",[Vl(n,t)])}});var Eu={display:Ps.DISPLAY,text:Ps.TEXT,script:Ps.SCRIPT,scriptscript:Ps.SCRIPTSCRIPT};bl({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),s=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(e,t){var n=Eu[e.style],r=t.havingStyle(n).withFont("");return Cu(e.body,r,t)},mathmlBuilder(e,t){var n=Eu[e.style],r=t.havingStyle(n),i=$l(e.body,r),a=new Il.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});vl({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===Ps.DISPLAY.size||n.alwaysHandleSupSub)?wu:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===Ps.DISPLAY.size||n.limits)?Mu:null:"accent"===n.type?ys.isCharacterBox(n.base)?rc:null:"horizBrace"===n.type&&!e.sub===n.isOver?gu:null:null}(e,t);if(n)return n(e,t);var r,i,a,{base:s,sup:o,sub:l}=e,c=Nl(s,t),u=t.fontMetrics(),h=0,d=0,p=s&&ys.isCharacterBox(s);if(o){var f=t.havingStyle(t.style.sup());r=Nl(o,f,t),p||(h=c.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(l){var m=t.havingStyle(t.style.sub());i=Nl(l,m,t),p||(d=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}a=t.style===Ps.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2;var g,b=t.sizeMultiplier,v=Ks(.5/u.ptPerEm/b),y=null;if(i){var x=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof oo||x)&&(y=Ks(-c.italic))}if(r&&i){h=Math.max(h,a,r.depth+.25*u.xHeight),d=Math.max(d,u.sub2);var w=4*u.defaultRuleThickness;if(h-r.depth-(i.height-d)0&&(h+=k,d-=k)}var _=[{type:"elem",elem:i,shift:d,marginRight:v,marginLeft:y},{type:"elem",elem:r,shift:-h,marginRight:v}];g=ll.makeVList({positionType:"individualShift",children:_},t)}else if(i){d=Math.max(d,u.sub1,i.height-.8*u.xHeight);var S=[{type:"elem",elem:i,marginLeft:y,marginRight:v}];g=ll.makeVList({positionType:"shift",positionData:d,children:S},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");h=Math.max(h,a,r.depth+.25*u.xHeight),g=ll.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:r,marginRight:v}]},t)}var M=Al(c,"right")||"mord";return ll.makeSpan([M],[c,ll.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var i,a=[Vl(e.base,t)];if(e.sub&&a.push(Vl(e.sub,t)),e.sup&&a.push(Vl(e.sup,t)),r)i=n?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;i=s&&"op"===s.type&&s.limits&&t.style===Ps.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===Ps.DISPLAY||s.limits)?"munderover":"msubsup"}else{var o=e.base;i=o&&"op"===o.type&&o.limits&&(t.style===Ps.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||t.style===Ps.DISPLAY)?"munder":"msub"}else{var l=e.base;i=l&&"op"===l.type&&l.limits&&(t.style===Ps.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===Ps.DISPLAY)?"mover":"msup"}return new Il.MathNode(i,a)}}),vl({type:"atom",htmlBuilder:(e,t)=>ll.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new Il.MathNode("mo",[Bl(e.text,e.mode)]);if("bin"===e.family){var r=Hl(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var zu={mi:"italic",mn:"normal",mtext:"normal"};vl({type:"mathord",htmlBuilder:(e,t)=>ll.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var n=new Il.MathNode("mi",[Bl(e.text,e.mode,t)]),r=Hl(e,t)||"italic";return r!==zu[n.type]&&n.setAttribute("mathvariant",r),n}}),vl({type:"textord",htmlBuilder:(e,t)=>ll.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var n,r=Bl(e.text,e.mode,t),i=Hl(e,t)||"normal";return n="text"===e.mode?new Il.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new Il.MathNode("mn",[r]):"\\prime"===e.text?new Il.MathNode("mo",[r]):new Il.MathNode("mi",[r]),i!==zu[n.type]&&n.setAttribute("mathvariant",i),n}});var Au={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Pu={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};vl({type:"spacing",htmlBuilder(e,t){if(Pu.hasOwnProperty(e.text)){var n=Pu[e.text].className||"";if("text"===e.mode){var r=ll.makeOrd(e,t,"textord");return r.classes.push(n),r}return ll.makeSpan(["mspace",n],[ll.mathsym(e.text,e.mode,t)],t)}if(Au.hasOwnProperty(e.text))return ll.makeSpan(["mspace",Au[e.text]],[],t);throw new fs('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Pu.hasOwnProperty(e.text)){if(Au.hasOwnProperty(e.text))return new Il.MathNode("mspace");throw new fs('Unknown type of space "'+e.text+'"')}return new Il.MathNode("mtext",[new Il.TextNode("\xa0")])}});var Nu=()=>{var e=new Il.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};vl({type:"tag",mathmlBuilder(e,t){var n=new Il.MathNode("mtable",[new Il.MathNode("mtr",[Nu(),new Il.MathNode("mtd",[Ul(e.body,t)]),Nu(),new Il.MathNode("mtd",[Ul(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var Ou={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ru={"\\textbf":"textbf","\\textmd":"textmd"},ju={"\\textit":"textit","\\textup":"textup"},Lu=(e,t)=>{var n=e.font;return n?Ou[n]?t.withTextFontFamily(Ou[n]):Ru[n]?t.withTextFontWeight(Ru[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(ju[n]):t};bl({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:xl(i),font:r}},htmlBuilder(e,t){var n=Lu(e,t),r=Cl(e.body,n,!0);return ll.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=Lu(e,t);return Ul(e.body,n)}}),bl({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=Nl(e.body,t),r=ll.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=ll.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return ll.makeSpan(["mord","underline"],[a],t)},mathmlBuilder(e,t){var n=new Il.MathNode("mo",[new Il.TextNode("\u203e")]);n.setAttribute("stretchy","true");var r=new Il.MathNode("munder",[Vl(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),bl({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=Nl(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return ll.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new Il.MathNode("mpadded",[Vl(e.body,t)],["vcenter"])}),bl({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new fs("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=Du(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"\u2423":"\xa0"),Iu=fl,Bu="[ \r\n\t]",Fu="(\\\\[a-zA-Z@]+)"+Bu+"*",Hu="[\u0300-\u036f]",qu=new RegExp(Hu+"+$"),$u="("+Bu+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+Hu+"*|[\ud800-\udbff][\udc00-\udfff]"+Hu+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Fu+"|\\\\[^\ud800-\udfff])";class Uu{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($u,"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 ps("EOF",new ds(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new fs("Unexpected character: '"+e[t]+"'",new ps(e[t],new ds(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(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 ps(r,new ds(this,t,this.tokenRegex.lastIndex))}}class Vu{constructor(e,t){void 0===e&&(e={}),void 0===t&&(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(0===this.undefStack.length)throw new fs("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)&&(null==e[t]?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(void 0===n&&(n=!1),n){for(var r=0;r0&&(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])}null==t?delete this.current[e]:this.current[e]=t}}var Wu=Xc;Kc("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Kc("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Kc("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Kc("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Kc("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Kc("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Kc("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Yu={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};Kc("\\char",(function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new fs("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=Yu[n.text])||r>=t)throw new fs("Invalid base-"+t+" digit "+n.text);for(var i;null!=(i=Yu[e.future().text])&&i{var i=e.consumeArg().tokens;if(1!==i.length)throw new fs("\\newcommand's first argument must be a macro name");var a=i[0].text,s=e.isDefined(a);if(s&&!t)throw new fs("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!s&&!n)throw new fs("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(1===(i=e.consumeArg().tokens).length&&"["===i[0].text){for(var l="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new fs("Invalid number of arguments: "+l);o=parseInt(l),i=e.consumeArg().tokens}return s&&r||e.macros.set(a,{tokens:i,numArgs:o}),""};Kc("\\newcommand",(e=>Gu(e,!1,!0,!1))),Kc("\\renewcommand",(e=>Gu(e,!0,!1,!1))),Kc("\\providecommand",(e=>Gu(e,!0,!0,!0))),Kc("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Kc("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Kc("\\show",(e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Iu[n],mo.math[n],mo.text[n]),""})),Kc("\\bgroup","{"),Kc("\\egroup","}"),Kc("~","\\nobreakspace"),Kc("\\lq","`"),Kc("\\rq","'"),Kc("\\aa","\\r a"),Kc("\\AA","\\r A"),Kc("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),Kc("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Kc("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),Kc("\u212c","\\mathscr{B}"),Kc("\u2130","\\mathscr{E}"),Kc("\u2131","\\mathscr{F}"),Kc("\u210b","\\mathscr{H}"),Kc("\u2110","\\mathscr{I}"),Kc("\u2112","\\mathscr{L}"),Kc("\u2133","\\mathscr{M}"),Kc("\u211b","\\mathscr{R}"),Kc("\u212d","\\mathfrak{C}"),Kc("\u210c","\\mathfrak{H}"),Kc("\u2128","\\mathfrak{Z}"),Kc("\\Bbbk","\\Bbb{k}"),Kc("\xb7","\\cdotp"),Kc("\\llap","\\mathllap{\\textrm{#1}}"),Kc("\\rlap","\\mathrlap{\\textrm{#1}}"),Kc("\\clap","\\mathclap{\\textrm{#1}}"),Kc("\\mathstrut","\\vphantom{(}"),Kc("\\underbar","\\underline{\\text{#1}}"),Kc("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Kc("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Kc("\\ne","\\neq"),Kc("\u2260","\\neq"),Kc("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Kc("\u2209","\\notin"),Kc("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Kc("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Kc("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),Kc("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),Kc("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),Kc("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),Kc("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),Kc("\u27c2","\\perp"),Kc("\u203c","\\mathclose{!\\mkern-0.8mu!}"),Kc("\u220c","\\notni"),Kc("\u231c","\\ulcorner"),Kc("\u231d","\\urcorner"),Kc("\u231e","\\llcorner"),Kc("\u231f","\\lrcorner"),Kc("\xa9","\\copyright"),Kc("\xae","\\textregistered"),Kc("\ufe0f","\\textregistered"),Kc("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Kc("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Kc("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Kc("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Kc("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Kc("\u22ee","\\vdots"),Kc("\\varGamma","\\mathit{\\Gamma}"),Kc("\\varDelta","\\mathit{\\Delta}"),Kc("\\varTheta","\\mathit{\\Theta}"),Kc("\\varLambda","\\mathit{\\Lambda}"),Kc("\\varXi","\\mathit{\\Xi}"),Kc("\\varPi","\\mathit{\\Pi}"),Kc("\\varSigma","\\mathit{\\Sigma}"),Kc("\\varUpsilon","\\mathit{\\Upsilon}"),Kc("\\varPhi","\\mathit{\\Phi}"),Kc("\\varPsi","\\mathit{\\Psi}"),Kc("\\varOmega","\\mathit{\\Omega}"),Kc("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Kc("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Kc("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Kc("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Kc("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Kc("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Kc("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Kc("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Qu={",":"\\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"};Kc("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in Qu?t=Qu[n]:("\\not"===n.slice(0,4)||n in mo.math&&ys.contains(["bin","rel"],mo.math[n].group))&&(t="\\dotsb"),t}));var Xu={")":!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};Kc("\\dotso",(function(e){return e.future().text in Xu?"\\ldots\\,":"\\ldots"})),Kc("\\dotsc",(function(e){var t=e.future().text;return t in Xu&&","!==t?"\\ldots\\,":"\\ldots"})),Kc("\\cdots",(function(e){return e.future().text in Xu?"\\@cdots\\,":"\\@cdots"})),Kc("\\dotsb","\\cdots"),Kc("\\dotsm","\\cdots"),Kc("\\dotsi","\\!\\cdots"),Kc("\\dotsx","\\ldots\\,"),Kc("\\DOTSI","\\relax"),Kc("\\DOTSB","\\relax"),Kc("\\DOTSX","\\relax"),Kc("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Kc("\\,","\\tmspace+{3mu}{.1667em}"),Kc("\\thinspace","\\,"),Kc("\\>","\\mskip{4mu}"),Kc("\\:","\\tmspace+{4mu}{.2222em}"),Kc("\\medspace","\\:"),Kc("\\;","\\tmspace+{5mu}{.2777em}"),Kc("\\thickspace","\\;"),Kc("\\!","\\tmspace-{3mu}{.1667em}"),Kc("\\negthinspace","\\!"),Kc("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Kc("\\negthickspace","\\tmspace-{5mu}{.277em}"),Kc("\\enspace","\\kern.5em "),Kc("\\enskip","\\hskip.5em\\relax"),Kc("\\quad","\\hskip1em\\relax"),Kc("\\qquad","\\hskip2em\\relax"),Kc("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Kc("\\tag@paren","\\tag@literal{({#1})}"),Kc("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new fs("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Kc("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Kc("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Kc("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Kc("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Kc("\\newline","\\\\\\relax"),Kc("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Ku=Ks(Is["Main-Regular"]["T".charCodeAt(0)][1]-.7*Is["Main-Regular"]["A".charCodeAt(0)][1]);Kc("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Ku+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Kc("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Ku+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Kc("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Kc("\\@hspace","\\hskip #1\\relax"),Kc("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Kc("\\ordinarycolon",":"),Kc("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Kc("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Kc("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Kc("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Kc("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Kc("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Kc("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Kc("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Kc("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Kc("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Kc("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Kc("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Kc("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Kc("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Kc("\u2237","\\dblcolon"),Kc("\u2239","\\eqcolon"),Kc("\u2254","\\coloneqq"),Kc("\u2255","\\eqqcolon"),Kc("\u2a74","\\Coloneqq"),Kc("\\ratio","\\vcentcolon"),Kc("\\coloncolon","\\dblcolon"),Kc("\\colonequals","\\coloneqq"),Kc("\\coloncolonequals","\\Coloneqq"),Kc("\\equalscolon","\\eqqcolon"),Kc("\\equalscoloncolon","\\Eqqcolon"),Kc("\\colonminus","\\coloneq"),Kc("\\coloncolonminus","\\Coloneq"),Kc("\\minuscolon","\\eqcolon"),Kc("\\minuscoloncolon","\\Eqcolon"),Kc("\\coloncolonapprox","\\Colonapprox"),Kc("\\coloncolonsim","\\Colonsim"),Kc("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Kc("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Kc("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Kc("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Kc("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Kc("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Kc("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Kc("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Kc("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Kc("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Kc("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Kc("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Kc("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Kc("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Kc("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Kc("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Kc("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Kc("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Kc("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Kc("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Kc("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Kc("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Kc("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Kc("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Kc("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Kc("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Kc("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Kc("\\imath","\\html@mathml{\\@imath}{\u0131}"),Kc("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Kc("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Kc("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Kc("\u27e6","\\llbracket"),Kc("\u27e7","\\rrbracket"),Kc("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Kc("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Kc("\u2983","\\lBrace"),Kc("\u2984","\\rBrace"),Kc("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Kc("\u29b5","\\minuso"),Kc("\\darr","\\downarrow"),Kc("\\dArr","\\Downarrow"),Kc("\\Darr","\\Downarrow"),Kc("\\lang","\\langle"),Kc("\\rang","\\rangle"),Kc("\\uarr","\\uparrow"),Kc("\\uArr","\\Uparrow"),Kc("\\Uarr","\\Uparrow"),Kc("\\N","\\mathbb{N}"),Kc("\\R","\\mathbb{R}"),Kc("\\Z","\\mathbb{Z}"),Kc("\\alef","\\aleph"),Kc("\\alefsym","\\aleph"),Kc("\\Alpha","\\mathrm{A}"),Kc("\\Beta","\\mathrm{B}"),Kc("\\bull","\\bullet"),Kc("\\Chi","\\mathrm{X}"),Kc("\\clubs","\\clubsuit"),Kc("\\cnums","\\mathbb{C}"),Kc("\\Complex","\\mathbb{C}"),Kc("\\Dagger","\\ddagger"),Kc("\\diamonds","\\diamondsuit"),Kc("\\empty","\\emptyset"),Kc("\\Epsilon","\\mathrm{E}"),Kc("\\Eta","\\mathrm{H}"),Kc("\\exist","\\exists"),Kc("\\harr","\\leftrightarrow"),Kc("\\hArr","\\Leftrightarrow"),Kc("\\Harr","\\Leftrightarrow"),Kc("\\hearts","\\heartsuit"),Kc("\\image","\\Im"),Kc("\\infin","\\infty"),Kc("\\Iota","\\mathrm{I}"),Kc("\\isin","\\in"),Kc("\\Kappa","\\mathrm{K}"),Kc("\\larr","\\leftarrow"),Kc("\\lArr","\\Leftarrow"),Kc("\\Larr","\\Leftarrow"),Kc("\\lrarr","\\leftrightarrow"),Kc("\\lrArr","\\Leftrightarrow"),Kc("\\Lrarr","\\Leftrightarrow"),Kc("\\Mu","\\mathrm{M}"),Kc("\\natnums","\\mathbb{N}"),Kc("\\Nu","\\mathrm{N}"),Kc("\\Omicron","\\mathrm{O}"),Kc("\\plusmn","\\pm"),Kc("\\rarr","\\rightarrow"),Kc("\\rArr","\\Rightarrow"),Kc("\\Rarr","\\Rightarrow"),Kc("\\real","\\Re"),Kc("\\reals","\\mathbb{R}"),Kc("\\Reals","\\mathbb{R}"),Kc("\\Rho","\\mathrm{P}"),Kc("\\sdot","\\cdot"),Kc("\\sect","\\S"),Kc("\\spades","\\spadesuit"),Kc("\\sub","\\subset"),Kc("\\sube","\\subseteq"),Kc("\\supe","\\supseteq"),Kc("\\Tau","\\mathrm{T}"),Kc("\\thetasym","\\vartheta"),Kc("\\weierp","\\wp"),Kc("\\Zeta","\\mathrm{Z}"),Kc("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Kc("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Kc("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Kc("\\bra","\\mathinner{\\langle{#1}|}"),Kc("\\ket","\\mathinner{|{#1}\\rangle}"),Kc("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Kc("\\Bra","\\left\\langle#1\\right|"),Kc("\\Ket","\\left|#1\\right\\rangle");var Ju=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",s),i.length&&n.macros.set("\\|",o));var a=t;!t&&i.length&&("|"===n.future().text&&(n.popToken(),a=!0));return{tokens:a?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...a,...c,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};Kc("\\bra@ket",Ju(!1)),Kc("\\bra@set",Ju(!0)),Kc("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Kc("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Kc("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Kc("\\angln","{\\angl n}"),Kc("\\blue","\\textcolor{##6495ed}{#1}"),Kc("\\orange","\\textcolor{##ffa500}{#1}"),Kc("\\pink","\\textcolor{##ff00af}{#1}"),Kc("\\red","\\textcolor{##df0030}{#1}"),Kc("\\green","\\textcolor{##28ae7b}{#1}"),Kc("\\gray","\\textcolor{gray}{#1}"),Kc("\\purple","\\textcolor{##9d38bd}{#1}"),Kc("\\blueA","\\textcolor{##ccfaff}{#1}"),Kc("\\blueB","\\textcolor{##80f6ff}{#1}"),Kc("\\blueC","\\textcolor{##63d9ea}{#1}"),Kc("\\blueD","\\textcolor{##11accd}{#1}"),Kc("\\blueE","\\textcolor{##0c7f99}{#1}"),Kc("\\tealA","\\textcolor{##94fff5}{#1}"),Kc("\\tealB","\\textcolor{##26edd5}{#1}"),Kc("\\tealC","\\textcolor{##01d1c1}{#1}"),Kc("\\tealD","\\textcolor{##01a995}{#1}"),Kc("\\tealE","\\textcolor{##208170}{#1}"),Kc("\\greenA","\\textcolor{##b6ffb0}{#1}"),Kc("\\greenB","\\textcolor{##8af281}{#1}"),Kc("\\greenC","\\textcolor{##74cf70}{#1}"),Kc("\\greenD","\\textcolor{##1fab54}{#1}"),Kc("\\greenE","\\textcolor{##0d923f}{#1}"),Kc("\\goldA","\\textcolor{##ffd0a9}{#1}"),Kc("\\goldB","\\textcolor{##ffbb71}{#1}"),Kc("\\goldC","\\textcolor{##ff9c39}{#1}"),Kc("\\goldD","\\textcolor{##e07d10}{#1}"),Kc("\\goldE","\\textcolor{##a75a05}{#1}"),Kc("\\redA","\\textcolor{##fca9a9}{#1}"),Kc("\\redB","\\textcolor{##ff8482}{#1}"),Kc("\\redC","\\textcolor{##f9685d}{#1}"),Kc("\\redD","\\textcolor{##e84d39}{#1}"),Kc("\\redE","\\textcolor{##bc2612}{#1}"),Kc("\\maroonA","\\textcolor{##ffbde0}{#1}"),Kc("\\maroonB","\\textcolor{##ff92c6}{#1}"),Kc("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Kc("\\maroonD","\\textcolor{##ca337c}{#1}"),Kc("\\maroonE","\\textcolor{##9e034e}{#1}"),Kc("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Kc("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Kc("\\purpleC","\\textcolor{##aa87ff}{#1}"),Kc("\\purpleD","\\textcolor{##7854ab}{#1}"),Kc("\\purpleE","\\textcolor{##543b78}{#1}"),Kc("\\mintA","\\textcolor{##f5f9e8}{#1}"),Kc("\\mintB","\\textcolor{##edf2df}{#1}"),Kc("\\mintC","\\textcolor{##e0e5cc}{#1}"),Kc("\\grayA","\\textcolor{##f6f7f7}{#1}"),Kc("\\grayB","\\textcolor{##f0f1f2}{#1}"),Kc("\\grayC","\\textcolor{##e3e5e6}{#1}"),Kc("\\grayD","\\textcolor{##d6d8da}{#1}"),Kc("\\grayE","\\textcolor{##babec2}{#1}"),Kc("\\grayF","\\textcolor{##888d93}{#1}"),Kc("\\grayG","\\textcolor{##626569}{#1}"),Kc("\\grayH","\\textcolor{##3b3e40}{#1}"),Kc("\\grayI","\\textcolor{##21242c}{#1}"),Kc("\\kaBlue","\\textcolor{##314453}{#1}"),Kc("\\kaGreen","\\textcolor{##71B307}{#1}");var Zu={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class eh{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 Vu(Wu,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Uu(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&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 ps("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r,i=this.future(),a=0,s=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++a;else if("}"===r.text){if(-1===--a)throw new fs("Extra }",r)}else if("EOF"===r.text)throw new fs("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",r);if(e&&n)if((0===a||1===a&&"{"===e[s])&&r.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==a||n);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new fs("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;rthis.settings.maxExpand)throw new fs("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(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new fs("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)for(var s=(i=i.slice()).length-1;s>=0;--s){var o=i[s];if("#"===o.text){if(0===s)throw new fs("Incomplete placeholder at end of macro body",o);if("#"===(o=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new fs("Not a valid argument number",o);i.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ps(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!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(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"===typeof t?t(this):t;if("string"===typeof r){var i=0;if(-1!==r.indexOf("#"))for(var a=r.replace(/##/g,"");-1!==a.indexOf("#"+(i+1));)++i;for(var s=new Uu(r,this.settings),o=[],l=s.lex();"EOF"!==l.text;)o.push(l),l=s.lex();return o.reverse(),{tokens:o,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Iu.hasOwnProperty(e)||mo.math.hasOwnProperty(e)||mo.text.hasOwnProperty(e)||Zu.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"===typeof t||"function"===typeof t||!t.unexpandable:Iu.hasOwnProperty(e)&&!Iu[e].primitive}}var th=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,nh=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),rh={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},ih={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class ah{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 eh(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new fs("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(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 ps("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==ah.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&Iu[r.text]&&Iu[r.text].infix)break;var i=this.parseAtom(t);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t,n=-1,r=0;r=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,o=mo[this.mode][t].group,l=ds.range(e);if(po.hasOwnProperty(o)){var c=o;s={type:"atom",mode:this.mode,family:c,loc:l,text:t}}else s={type:o,mode:this.mode,loc:l,text:t};i=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(Rs(t.charCodeAt(0))?"math"===this.mode&&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)),i={type:"textord",mode:"text",loc:ds.range(e),text:t}}if(this.consume(),a)for(var u=0;u{try{return ch(t,{displayMode:!0,throwOnError:!1})}catch(n){return console.error(n),e}}))).replace(/\$([^$\n]+?)\$/g,((e,t)=>{try{return ch(t,{displayMode:!1,throwOnError:!1})}catch(n){return console.error(n),e}}))).replace(new RegExp(t,"g"),"$")}uh.code=(e,t)=>{if("math"===t||"katex"===t)try{return ch(e,{displayMode:!0,throwOnError:!1})}catch(n){console.error(n)}return`
    ${e}
    `},Aa.use({renderer:uh,breaks:!0});const dh=function(){const e=B(),[t,n]=(0,r.useState)({mainTitle:"Loading...",quizScore:0,subTitle:"Loading cheatsheet data...",sections:[]});(0,r.useEffect)((()=>{fetch("https://api.racine-ai.com/cheatsheet",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:"bob",courseId:"course123"}),credentials:"include"}).then((e=>e.json())).then((e=>{n(e)})).catch((e=>{console.error("Error fetching cheatsheet:",e),n({mainTitle:"Error loading cheatsheet",quizScore:0,subTitle:"Unable to load data from API",sections:[]})}))}),[]);const i=()=>{window.history.length>2?e(-1):e("/")},a=()=>{window.location.href="#"};return(0,xn.jsxs)("div",{className:Ka,children:[(0,xn.jsxs)("section",{className:Ja,children:[(0,xn.jsx)("div",{className:Za,onClick:i,role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||i()},children:(0,xn.jsx)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,xn.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,xn.jsx)("h2",{className:es,children:"Cheatsheet"})]}),(0,xn.jsxs)("div",{className:ts,children:[(0,xn.jsx)("h3",{className:ns,children:t.mainTitle}),(0,xn.jsxs)("p",{className:rs,children:["Congrats, you got"," ",(0,xn.jsxs)("strong",{className:is,children:[t.quizScore,"%"]})," ","of the quiz correct, it\u2019s now time to practice!"]}),(t.sections||[]).map(((e,t)=>(0,xn.jsxs)("div",{className:as,children:[(0,xn.jsx)("h4",{className:ss,children:e.bigSectionTitle}),(e.items||[]).map(((e,t)=>{return(0,xn.jsxs)("div",{className:os,onClick:a,children:[(0,xn.jsxs)("div",{className:ls,children:[(0,xn.jsx)("strong",{children:e.title}),(0,xn.jsx)("span",{className:cs,children:(0,xn.jsx)("div",{dangerouslySetInnerHTML:{__html:hh(Aa((r=e.description,r.replace(/```math([\s\S\n]+?)```/g,((e,t)=>{try{return ch(t.trim(),{displayMode:!0,throwOnError:!1})}catch(n){return console.error(n),`${t}`}})))))}})})]}),(0,xn.jsx)("div",{className:us,children:(n=e.status,"check"===n?(0,xn.jsx)("span",{className:hs,role:"img","aria-label":"check",children:"\u2705"}):"warning"===n?(0,xn.jsx)("span",{className:hs,role:"img","aria-label":"warning",children:"\u26a0\ufe0f"}):"error"===n?(0,xn.jsx)("span",{className:hs,role:"img","aria-label":"error",children:"\u274c"}):(0,xn.jsx)("span",{className:hs,children:"\u2022"}))})]},t);var n,r}))]},t)))]})]})};var ph,fh=Object.defineProperty,mh=Object.getOwnPropertySymbols,gh=Object.prototype.hasOwnProperty,bh=Object.prototype.propertyIsEnumerable,vh=(e,t,n)=>t in e?fh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yh=(e,t)=>{for(var n in t||(t={}))gh.call(t,n)&&vh(e,n,t[n]);if(mh)for(var n of mh(t))bh.call(t,n)&&vh(e,n,t[n]);return e},xh=(e,t)=>{var n={};for(var r in e)gh.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&mh)for(var r of mh(e))t.indexOf(r)<0&&bh.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class t{constructor(e,n,r,a){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:1,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:40,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,h=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(!(t.MIN_VERSION<=l&&l<=c&&c<=t.MAX_VERSION)||u<-1||u>7)throw new RangeError("Invalid value");for(a=l;;a++){const n=8*t.getNumDataCodewords(a,r),i=s.getTotalBits(e,a);if(i<=n){o=i;break}if(a>=c)throw new RangeError("Data too long")}for(const n of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])h&&o<=8*t.getNumDataCodewords(a,n)&&(r=n);let d=[];for(const t of e){n(t.mode.modeBits,4,d),n(t.numChars,t.mode.numCharCountBits(a),d);for(const e of t.getData())d.push(e)}i(d.length==o);const p=8*t.getNumDataCodewords(a,r);i(d.length<=p),n(0,Math.min(4,p-d.length),d),n(0,(8-d.length%8)%8,d),i(d.length%8==0);for(let t=236;d.lengthf[t>>>3]|=e<<7-(7&t))),new t(a,r,f,u)}getModule(e,t){return 0<=e&&e>>9);const a=21522^(t<<10|n);i(a>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,r(a,i));this.setFunctionModule(8,7,r(a,6)),this.setFunctionModule(8,8,r(a,7)),this.setFunctionModule(7,8,r(a,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,r(a,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,r(a,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,r(a,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;i(t>>>18==0);for(let n=0;n<18;n++){const e=r(t,n),i=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(i,a,e),this.setFunctionModule(a,i,e)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,s=t+n;0<=a&&a{(t!=c-s||n>=l)&&d.push(e[t])}));return i(d.length==o),d}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let i=0;i>>3],7-(7&n)),n++)}}i(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t5&&e++):(this.finderPenaltyAddHistory(r,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[i][s],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,a)*t.PENALTY_N3}for(let i=0;i5&&e++):(this.finderPenaltyAddHistory(r,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[s][i],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,a)*t.PENALTY_N3}for(let i=0;ie+(t?1:0)),n);const r=this.size*this.size,a=Math.ceil(Math.abs(20*n-10*r)/r)-1;return i(0<=a&&a<=9),e+=a*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.lengtht.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t0));for(const i of e){const e=i^r.shift();r.push(0),n.forEach(((n,i)=>r[i]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];i(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];function n(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function r(e,t){return 0!=(e>>>t&1)}function i(e){if(!e)throw new Error("Assertion error")}e.QrCode=t;const a=class e{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(t){let r=[];for(const e of t)n(e,8,r);return new e(e.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!e.isNumeric(t))throw new RangeError("String contains non-numeric characters");let r=[];for(let e=0;e=1<{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2);e.Ecc=t})(t=e.QrCode||(e.QrCode={}))})(ph||(ph={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]);e.Mode=t})(t=e.QrSegment||(e.QrSegment={}))})(ph||(ph={}));var wh=ph,kh={L:wh.QrCode.Ecc.LOW,M:wh.QrCode.Ecc.MEDIUM,Q:wh.QrCode.Ecc.QUARTILE,H:wh.QrCode.Ecc.HIGH},_h=128,Sh="L",Mh="#FFFFFF",Ch="#000000",Th=!1,Eh=1;function zh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(a,s){if(!a&&null!==i)return n.push(`M${i+t} ${r+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)a&&null===i&&(i=s);else{if(!a)return;null===i?n.push(`M${s+t},${r+t} h1v1H${s+t}z`):n.push(`M${i+t},${r+t} h${s+1-i}v1H${i+t}z`)}}))})),n.join("")}function Ah(e,t){return e.slice().map(((e,n)=>n=t.y+t.h?e:e.map(((e,n)=>(n=t.x+t.w)&&e))))}function Ph(e){let{value:t,level:n,minVersion:i,includeMargin:a,marginSize:s,imageSettings:o,size:l,boostLevel:c}=e,u=r.useMemo((()=>{const e=(Array.isArray(t)?t:[t]).reduce(((e,t)=>(e.push(...wh.QrSegment.makeSegments(t)),e)),[]);return wh.QrCode.encodeSegments(e,kh[n],i,void 0,void 0,c)}),[t,n,i,c]);const{cells:h,margin:d,numCells:p,calculatedImageSettings:f}=r.useMemo((()=>{let e=u.getModules();const t=function(e,t){return null!=t?Math.max(Math.floor(t),0):e?4:0}(a,s),n=e.length+2*t,r=function(e,t,n,r){if(null==r)return null;const i=e.length+2*n,a=Math.floor(.1*t),s=i/t,o=(r.width||a)*s,l=(r.height||a)*s,c=null==r.x?e.length/2-o/2:r.x*s,u=null==r.y?e.length/2-l/2:r.y*s,h=null==r.opacity?1:r.opacity;let d=null;if(r.excavate){let e=Math.floor(c),t=Math.floor(u);d={x:e,y:t,w:Math.ceil(o+c-e),h:Math.ceil(l+u-t)}}return{x:c,y:u,h:l,w:o,excavation:d,opacity:h,crossOrigin:r.crossOrigin}}(e,l,t,o);return{cells:e,margin:t,numCells:n,calculatedImageSettings:r}}),[u,l,o,a,s]);return{qrcode:u,margin:d,cells:h,numCells:p,calculatedImageSettings:f}}var Nh=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),Oh=r.forwardRef((function(e,t){const n=e,{value:i,size:a=_h,level:s=Sh,bgColor:o=Mh,fgColor:l=Ch,includeMargin:c=Th,minVersion:u=Eh,boostLevel:h,marginSize:d,imageSettings:p}=n,f=xh(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:m}=f,g=xh(f,["style"]),b=null==p?void 0:p.src,v=r.useRef(null),y=r.useRef(null),x=r.useCallback((e=>{v.current=e,"function"===typeof t?t(e):t&&(t.current=e)}),[t]),[w,k]=r.useState(!1),{margin:_,cells:S,numCells:M,calculatedImageSettings:C}=Ph({value:i,level:s,minVersion:u,boostLevel:h,includeMargin:c,marginSize:d,imageSettings:p,size:a});r.useEffect((()=>{if(null!=v.current){const e=v.current,t=e.getContext("2d");if(!t)return;let n=S;const r=y.current,i=null!=C&&null!==r&&r.complete&&0!==r.naturalHeight&&0!==r.naturalWidth;i&&null!=C.excavation&&(n=Ah(S,C.excavation));const s=window.devicePixelRatio||1;e.height=e.width=a*s;const c=a/M*s;t.scale(c,c),t.fillStyle=o,t.fillRect(0,0,M,M),t.fillStyle=l,Nh?t.fill(new Path2D(zh(n,_))):S.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+_,n+_,1,1)}))})),C&&(t.globalAlpha=C.opacity),i&&t.drawImage(r,C.x+_,C.y+_,C.w,C.h)}})),r.useEffect((()=>{k(!1)}),[b]);const T=yh({height:a,width:a},m);let E=null;return null!=b&&(E=r.createElement("img",{src:b,key:b,style:{display:"none"},onLoad:()=>{k(!0)},ref:y,crossOrigin:null==C?void 0:C.crossOrigin})),r.createElement(r.Fragment,null,r.createElement("canvas",yh({style:T,height:a,width:a,ref:x,role:"img"},g)),E)}));function Rh(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"},child:[]}]})(e)}function jh(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"},child:[]}]})(e)}function Lh(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"},child:[]}]})(e)}function Dh(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"},child:[]}]})(e)}function Ih(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function Bh(e){return jn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm176-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h328c6.6 0 12 5.4 12 12v312z"},child:[]}]})(e)}function Fh(e){return jn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"},child:[]}]})(e)}function Hh(e){return jn({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"},child:[]}]})(e)}Oh.displayName="QRCodeCanvas",r.forwardRef((function(e,t){const n=e,{value:i,size:a=_h,level:s=Sh,bgColor:o=Mh,fgColor:l=Ch,includeMargin:c=Th,minVersion:u=Eh,boostLevel:h,title:d,marginSize:p,imageSettings:f}=n,m=xh(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:g,cells:b,numCells:v,calculatedImageSettings:y}=Ph({value:i,level:s,minVersion:u,boostLevel:h,includeMargin:c,marginSize:p,imageSettings:f,size:a});let x=b,w=null;null!=f&&null!=y&&(null!=y.excavation&&(x=Ah(b,y.excavation)),w=r.createElement("image",{href:f.src,height:y.h,width:y.w,x:y.x+g,y:y.y+g,preserveAspectRatio:"none",opacity:y.opacity,crossOrigin:y.crossOrigin}));const k=zh(x,g);return r.createElement("svg",yh({height:a,width:a,viewBox:`0 0 ${v} ${v}`,ref:t,role:"img"},m),!!d&&r.createElement("title",null,d),r.createElement("path",{fill:o,d:`M0,0 h${v}v${v}H0z`,shapeRendering:"crispEdges"}),r.createElement("path",{fill:l,d:k,shapeRendering:"crispEdges"}),w)})).displayName="QRCodeSVG";const qh={practiceWrapper:"PracticePage_practiceWrapper__-FD9Y",headerBar:"PracticePage_headerBar__FAwmq",backArrow:"PracticePage_backArrow__9nNTC",pageTitle:"PracticePage_pageTitle__uuyz7",timer:"PracticePage_timer__gD-yH",contentArea:"PracticePage_contentArea__Tga3E",fireCount:"PracticePage_fireCount__papwe",emojiIcon:"PracticePage_emojiIcon__fD8vv",fireNumber:"PracticePage_fireNumber__rTU6M",practiceBox:"PracticePage_practiceBox__Nl92O",mainHeading:"PracticePage_mainHeading__DE339",subHeading:"PracticePage_subHeading__MLUqL",paragraph:"PracticePage_paragraph__XFUob",iconRow:"PracticePage_iconRow__oLV5v",imageIcon:"PracticePage_imageIcon__horun",footerBar:"PracticePage_footerBar__SYYcU",continueBtn:"PracticePage_continueBtn__hHi4F",textEditorWrapper:"PracticePage_textEditorWrapper__NpwGK",textEditor:"PracticePage_textEditor__ypiLG",keyboardIcon:"PracticePage_keyboardIcon__LuTKs",modalOverlay:"PracticePage_modalOverlay__WFD9u",modalContent:"PracticePage_modalContent__Bz4Q0",modalCloseBtn:"PracticePage_modalCloseBtn__wKFDg",uploadedImageContainer:"PracticePage_uploadedImageContainer__MbQWs",uploadedImage:"PracticePage_uploadedImage__xkjt5",uploadedSliderContainer:"PracticePage_uploadedSliderContainer__mDdCw",slider:"PracticePage_slider__uAO-2",sliderBtn:"PracticePage_sliderBtn__QM4Zj",deleteBtn:"PracticePage_deleteBtn__9+LKA",ipadIcon:"PracticePage_ipadIcon__xKaCM",loadingBtn:"PracticePage_loadingBtn__I5iRR",hintBtn:"PracticePage_hintBtn__EOomz",hintBox:"PracticePage_hintBox__jm2q0",feedbackBox:"PracticePage_feedbackBox__VMLYC"};function $h(e){let t=e;return t=t.replace(/\\{2,}\[/g,"\\[").replace(/\\{2,}\]/g,"\\]"),t=t.replace(/\\{2,}\(/g,"\\(").replace(/\\{2,}\)/g,"\\)"),t=t.replace(/\\\[/g,"$$$$").replace(/\\\]/g,"$$$$"),t=t.replace(/\\/g,"\\\\"),console.log(t),t.trim()}function Uh(e){return Aa(e,{breaks:!1,gfm:!0}).replace(/

    \s*<\/p>/g,"")}const Vh={loader:{load:["[tex]/ams"]},tex:{packages:{"[+]":["ams"]},inlineMath:[["\\(","\\)"],["$","$"]],displayMath:[["\\[","\\]"],["$$","$$"]],linebreaks:{automatic:!0,width:"100%"}},svg:{linebreaks:{automatic:!0}},options:{output:"chtml"}};function Wh(){const e=B(),t=()=>{window.history.length>2?e(-1):e("/")},[n,i]=(0,r.useState)(900),[a,s]=(0,r.useState)(200),[o,l]=(0,r.useState)(0),c=(0,r.useRef)([]),u=(0,r.useRef)({}),[h,d]=(0,r.useState)(Date.now()),[p,f]=(0,r.useState)({exerciseNumber:a,exerciseQuestion:"Loading exercise...",exerciseSolutionVerified:""}),[m,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(!1),[y,x]=(0,r.useState)(""),[w,k]=(0,r.useState)(!1),[_,S]=(0,r.useState)(!1),[M,C]=(0,r.useState)([]),[T,E]=(0,r.useState)(0),[z,A]=(0,r.useState)(!1),[P,N]=(0,r.useState)(""),[O,R]=(0,r.useState)(!1),j="session123",L="user123",D="https://api.racine-ai.com",I="https://racine-ai.com",F=`${I}/upload-image?session=${j}&username=${L}&problem=${a}`,H=`${I}/upload-webhandwriting?session=${j}&username=${L}&problem=${a}`;(0,r.useEffect)((()=>{const e=setInterval((()=>{i((e=>e>0?e-1:0))}),1e3);return()=>clearInterval(e)}),[]);const[q,$]=(0,r.useState)("");(0,r.useEffect)((()=>{g(!1),v(!1),x(""),N(""),C([]),fetch(`${D}/search`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({exercise_number:a}),credentials:"include"}).then((e=>e.json())).then((e=>{f(e)})).catch((e=>{console.error("Error fetching exercise:",e),f({exerciseNumber:a,exerciseQuestion:"Error loading exercise",exerciseSolutionVerified:""})}))}),[D,a]),(0,r.useEffect)((()=>{const e=setInterval((async()=>{try{const e=await fetch(`${D}/upload_status_all?username=${L}&session=${j}&problem=${a}`,{credentials:"include"}),t=await e.json();if(t.uploaded&&t.files.length>0){const e=t.files;if(function(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;nclearInterval(e)}),[D,L,j,a,T]),(0,r.useEffect)((()=>{M.length>0&&d(Date.now())}),[M,T]);const U=Uh($h(p.exerciseQuestion||""));Uh($h(p.exerciseSolutionVerified||""));return(0,xn.jsx)(Da,{config:Vh,children:(0,xn.jsxs)("div",{className:qh.practiceWrapper,children:[(0,xn.jsxs)("section",{className:qh.headerBar,children:[(0,xn.jsx)("div",{className:qh.backArrow,onClick:t,role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||t()},children:(0,xn.jsx)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,xn.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,xn.jsx)("h2",{className:qh.pageTitle,children:"Practice"}),(0,xn.jsx)("div",{className:qh.timer,children:(0,xn.jsx)("span",{children:(e=>{const t=Math.floor(e/60),n=e%60;return`${t<10?`0${t}`:t}:${n<10?`0${n}`:n}`})(n)})})]}),(0,xn.jsxs)("div",{className:qh.contentArea,children:[(0,xn.jsxs)("div",{className:qh.fireCount,children:[(0,xn.jsx)("div",{role:"img","aria-label":"fire",className:qh.emojiIcon,children:(0,xn.jsx)(zr,{className:qh.emojiIcon})}),(0,xn.jsx)("span",{className:qh.fireNumber,children:o})]}),(0,xn.jsxs)("div",{className:qh.practiceBox,children:[(0,xn.jsxs)("h3",{className:qh.mainHeading,children:["Exercise ",p.exerciseNumber]}),(0,xn.jsx)(Ha,{dynamic:!0,children:(0,xn.jsx)("div",{className:qh.questionContent,style:{fontSize:"18px"},dangerouslySetInnerHTML:{__html:U}})}),M.length>0&&(0,xn.jsxs)("div",{className:qh.uploadedSliderContainer,children:[(0,xn.jsx)("h4",{children:"Uploaded Work"}),(0,xn.jsxs)("div",{className:qh.slider,children:[(0,xn.jsx)("button",{className:qh.sliderBtn,onClick:()=>E((e=>0===e?M.length-1:e-1)),disabled:0===T,children:"\u25c0"}),(0,xn.jsx)("img",{src:`${D}${M[T]}?t=${h}`,alt:"Uploaded",className:qh.uploadedImage}),(0,xn.jsx)("button",{className:qh.sliderBtn,onClick:()=>E((e=>e===M.length-1?0:e+1)),disabled:T===M.length-1,children:"\u25b6"})]}),(0,xn.jsx)("button",{className:qh.deleteBtn,onClick:()=>{if(0===M.length)return;const e=M[T].split("/").pop();fetch(`${D}/upload_delete?username=${L}&session=${j}&problem=${a}&filename=${e}`,{method:"DELETE",credentials:"include"}).then((e=>e.json())).then((()=>fetch(`${D}/upload_status_all?username=${L}&session=${j}&problem=${a}`,{credentials:"include"}))).then((e=>e.json())).then((e=>{e.uploaded&&e.files.length>0?(C(e.files),E((t=>Math.min(t,e.files.length-1)))):C([])})).catch((e=>console.error("Delete error:",e)))},children:"Delete This Image"})]}),(0,xn.jsxs)("div",{className:qh.iconRow,children:[(0,xn.jsx)("span",{className:qh.imageIcon,role:"img","aria-label":"camera",onClick:()=>k(!0),children:"\ud83d\udcf7"}),(0,xn.jsx)("span",{className:qh.ipadIcon,role:"button","aria-label":"iPad",onClick:()=>S(!0),children:(0,xn.jsx)(Bh,{size:32})}),(0,xn.jsx)("span",{className:qh.keyboardIcon,onClick:()=>{v((e=>!e))},children:(0,xn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 -31 36 36",fill:"#d2d2d2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,xn.jsx)("path",{d:"m33 24h-30c-1.657 0-3-1.343-3-3v-18c0-1.657 1.343-3 3-3h30c1.657 0 3 1.343 3 3v18c0 1.657-1.343 3-3 3zm-25-16.75v-2.501c-.001-.413-.336-.748-.749-.75h-2.501c-.413.001-.748.336-.75.749v2.501c.001.413.336.748.749.75h2.501c.413-.001.748-.336.75-.749zm6 0v-2.501c-.001-.413-.336-.748-.749-.75h-2.501c-.413.001-.748.336-.75.749v2.501c.001.413.336.748.749.75h2.5c.413-.001.748-.336.75-.749zm6 0v-2.501c-.001-.413-.336-.748-.749-.75h-2.501c-.413.001-.748.336-.75.749v2.501c.001.413.336.748.749.75h2.5c.414-.001.749-.336.75-.749zm6 0v-2.501c-.001-.413-.336-.748-.749-.75h-2.501c-.413.001-.748.336-.75.749v2.501c.001.413.336.748.749.75h2.5c.413-.001.748-.336.75-.749zm6 0v-2.501c-.001-.413-.336-.748-.749-.75h-2.503c-.413.002-.747.336-.749.749v2.501c.001.414.337.749.75.75h2.503c.412-.003.745-.337.746-.749zm-24 6v-2.501c-.001-.413-.336-.748-.749-.75h-2.501c-.413.001-.748.336-.75.749v2.5c.001.413.336.748.749.75h2.501c.413-.001.748-.336.75-.749zm6 0v-2.501c-.001-.413-.336-.748-.749-.75h-2.501c-.413.001-.748.336-.75.749v2.5c.001.413.336.748.749.75h2.5c.413-.001.748-.336.75-.749zm6 0v-2.501c-.001-.413-.336-.748-.749-.75h-2.501c-.413.001-.748.336-.75.749v2.5c.001.413.336.748.749.75h2.5c.414-.001.749-.335.75-.749zm6 0v-2.501c-.001-.413-.336-.748-.749-.75h-2.501c-.413.001-.748.336-.75.749v2.5c.001.413.336.748.749.75h2.5c.414-.001.749-.335.75-.749zm6 0v-2.501c-.001-.413-.335-.747-.748-.75h-2.503c-.414.001-.749.336-.75.749v2.5c.001.414.337.749.75.75h2.503c.412-.002.746-.336.748-.749zm-24 6v-2.501c-.001-.413-.336-.748-.749-.75h-2.501c-.413.001-.748.336-.75.749v2.5c.001.414.336.749.749.75h2.501c.413-.001.748-.336.75-.749zm18 0v-2.501c-.001-.413-.336-.748-.749-.75h-14.501c-.413.001-.748.336-.75.749v2.5c.001.413.336.748.749.75h14.501c.413-.001.748-.336.75-.749zm6 0v-2.501c-.001-.413-.336-.748-.749-.75h-2.503c-.414.001-.749.336-.75.749v2.5c.001.414.337.749.75.75h2.503c.412-.002.746-.336.748-.749z"})})})]}),w&&(0,xn.jsx)("div",{className:qh.modalOverlay,onClick:()=>k(!1),children:(0,xn.jsxs)("div",{className:qh.modalContent,onClick:e=>e.stopPropagation(),children:[(0,xn.jsx)("h3",{children:"Scan QR Code to Upload Image"}),(0,xn.jsx)(Oh,{value:F,size:200}),(0,xn.jsx)("p",{children:"Scan with your smartphone to capture an image"}),(0,xn.jsx)("button",{className:qh.modalCloseBtn,onClick:()=>k(!1),children:"Close"})]})}),_&&(0,xn.jsx)("div",{className:qh.modalOverlay,onClick:()=>S(!1),children:(0,xn.jsxs)("div",{className:qh.modalContent,onClick:e=>e.stopPropagation(),children:[(0,xn.jsx)("h3",{children:"Scan QR Code to Open on iPad"}),(0,xn.jsx)(Oh,{value:H,size:200}),(0,xn.jsx)("p",{children:"Scan with your iPad to open the handwriting upload page"}),(0,xn.jsx)("button",{className:qh.modalCloseBtn,onClick:()=>S(!1),children:"Close"})]})}),b&&(0,xn.jsx)("div",{className:qh.textEditorWrapper,children:(0,xn.jsx)("textarea",{className:qh.textEditor,placeholder:"Type your answer here...",value:y,onChange:e=>x(e.target.value)})}),P&&!m&&(0,xn.jsx)("div",{className:qh.hintBox,children:(0,xn.jsx)(Ha,{dynamic:!0,children:(0,xn.jsx)("div",{dangerouslySetInnerHTML:{__html:Uh($h(P))}})})}),m&&q&&(0,xn.jsxs)("div",{className:qh.feedbackBox,children:[(0,xn.jsx)("h4",{className:qh.subHeading,children:"Feedback"}),(0,xn.jsx)(Ha,{dynamic:!0,children:(0,xn.jsx)("div",{className:qh.solutionContent,style:{fontSize:"18px"},dangerouslySetInnerHTML:{__html:Uh($h(q))}})})]})]})]}),(0,xn.jsx)("div",{className:qh.footerBar,children:m?(0,xn.jsx)("button",{className:qh.continueBtn,onClick:()=>{s((e=>e+1)),l((e=>e+1))},children:"Continue"}):(0,xn.jsxs)(xn.Fragment,{children:[z?(0,xn.jsx)("button",{className:qh.loadingBtn,disabled:!0,children:"Loading\u2026"}):(0,xn.jsx)("button",{className:qh.continueBtn,onClick:()=>{A(!0),N("");const e=Uh($h(p.exerciseQuestion||"")),t=Uh($h(p.exerciseSolutionVerified||"")),n={question:e,student_answer:y,proposed_solution:t,images:M};fetch(`${D}/grade`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),credentials:"include"}).then((e=>e.json())).then((e=>{$(e.grade_feedback),g(!0)})).catch((e=>{console.error("Error grading answer:",e)})).finally((()=>A(!1)))},children:"Submit"}),O?(0,xn.jsx)("button",{className:qh.loadingBtn,disabled:!0,style:{marginLeft:8},children:"Hint\u2026"}):(0,xn.jsx)("button",{className:qh.hintBtn,onClick:()=>{R(!0);const e=Uh($h(p.exerciseQuestion||"")),t=Uh($h(p.exerciseSolutionVerified||"")),n={question:e,student_answer:y,proposed_solution:t,images:M};fetch(`${D}/hint`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),credentials:"include"}).then((e=>e.json())).then((e=>N(e.hint))).catch((e=>console.error("Hint error:",e))).finally((()=>R(!1)))},style:{marginLeft:8},children:"Hint"})]})})]})})}const Yh="PracticeSettings_practiceWrapper__zS6we",Gh="PracticeSettings_practiceSettingsWrapper__3o-vg",Qh="PracticeSettings_headerSection__SCUGj",Xh="PracticeSettings_title__EN6Te",Kh="PracticeSettings_settingsBox__FIOZU",Jh="PracticeSettings_settingRow__E9ZUS",Zh="PracticeSettings_slider__fjfgd",ed="PracticeSettings_toggleSwitch__Swroy",td="PracticeSettings_toggleOn__3gnUH",nd="PracticeSettings_toggleOff__vqnm9",rd="PracticeSettings_toggleThumb__M4nUI",id="PracticeSettings_intentButtons__wG0xd",ad="PracticeSettings_intentButton__Vh-IE",sd="PracticeSettings_selectedIntent__PTPvf",od="PracticeSettings_courseSelection__hG9ja",ld="PracticeSettings_courseCard__5Xvs3",cd="PracticeSettings_selectedCourse__2Z0Vc",ud="PracticeSettings_courseIcon__PQFav",hd="PracticeSettings_progressBar__7bv-9",dd="PracticeSettings_progressFill__mSeq0",pd="PracticeSettings_addCourse__mT1kK",fd="PracticeSettings_startButton__+h2Xt",md=()=>{const[e,t]=(0,r.useState)(15),[n,i]=(0,r.useState)(!0),[a,s]=(0,r.useState)("Consolidate"),[o,l]=(0,r.useState)(null),c=[{id:1,title:"Prerequisites for Calculus",streak:"2 Day streak",improvement:"+15% Lesson coverage",icon:(0,xn.jsx)(Pr,{})},{id:2,title:"Declaration of Independence",streak:"10 Day streak",improvement:"+15% Improvement on Exercises",icon:(0,xn.jsx)(Nr,{})},{id:3,title:"Differential Equations and Matrices",streak:"0 Day streak",improvement:"+1% Lesson coverage",icon:(0,xn.jsx)(Pr,{})}];return(0,xn.jsxs)("div",{className:Yh,children:[(0,xn.jsx)("div",{className:Gh,children:(0,xn.jsx)("div",{className:Qh,children:(0,xn.jsx)("h2",{className:Xh,children:"Practice"})})}),(0,xn.jsxs)("div",{className:Kh,children:[(0,xn.jsx)("h3",{children:"Select your practice settings"}),(0,xn.jsxs)("div",{className:Jh,children:[(0,xn.jsx)("label",{children:"Length of session"}),(0,xn.jsx)("input",{type:"range",min:"5",max:"60",step:"5",value:e,onChange:e=>t(e.target.value),className:Zh}),(0,xn.jsxs)("span",{children:[e," min"]})]}),(0,xn.jsxs)("div",{className:Jh,children:[(0,xn.jsx)("label",{children:"Allow Chat Hints"}),(0,xn.jsx)("div",{className:`${ed} ${n?td:nd}`,onClick:()=>i(!n),children:(0,xn.jsx)("div",{className:rd})})]}),(0,xn.jsx)("div",{className:id,children:["Check my knowledge","Consolidate","Go deeper"].map((e=>(0,xn.jsx)("button",{className:`${ad} ${a===e?sd:""}`,onClick:()=>s(e),children:e},e)))})]}),(0,xn.jsxs)("div",{className:od,children:[c.map((e=>(0,xn.jsxs)("div",{className:`${ld} ${o===e.id?cd:""}`,onClick:()=>l(e.id),children:[(0,xn.jsx)("span",{alt:e.title,className:ud,children:e.icon}),(0,xn.jsx)("h4",{children:e.title}),(0,xn.jsx)("p",{children:e.streak}),(0,xn.jsx)("p",{children:e.improvement}),(0,xn.jsx)("div",{className:hd,children:(0,xn.jsx)("div",{className:dd})})]},e.id))),(0,xn.jsx)("div",{className:pd,children:"+"})]}),(0,xn.jsx)("button",{className:fd,onClick:()=>{window.location.href="/practice"},children:"Start Practice"})]})},gd="UploadImagePage_uploadWrapper__p1cSm",bd="UploadImagePage_placeholder__PTmga",vd="UploadImagePage_previewImage__dFFro",yd="UploadImagePage_takePhotoBtn__I7Y37",xd="UploadImagePage_uploadButton__FtlUo",wd="UploadImagePage_statusMessage__l--ea";function kd(){const e="https://api.racine-ai.com",[t]=ee(),n=t.get("session")||"defaultSession",i=t.get("username")||"anonymous",a=t.get("problem")||"problem1",[s,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(""),[u,h]=(0,r.useState)(""),[d,p]=(0,r.useState)(""),f=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const t=setInterval((()=>{fetch(`${e}/upload_status?username=${i}&session=${n}&problem=${a}`).then((e=>e.json())).then((e=>{e.uploaded&&p(e.file)})).catch((e=>{console.error("Polling error:",e)}))}),3e3);return()=>clearInterval(t)}),[e,i,n,a]),(0,xn.jsxs)("div",{className:gd,children:[(0,xn.jsx)("h2",{children:"Upload Image"}),u?(0,xn.jsx)("img",{src:u,alt:"Preview",className:vd}):(0,xn.jsx)("div",{className:bd,children:(0,xn.jsx)("p",{children:"No photo selected"})}),(0,xn.jsx)("input",{type:"file",accept:"image/*",capture:"environment",onChange:e=>{const t=e.target.files[0];if(o(t),t){const e=URL.createObjectURL(t);h(e)}},ref:f,style:{display:"none"}}),(0,xn.jsx)("button",{className:yd,onClick:()=>{f.current&&f.current.click()},children:"Take a Photo"}),(0,xn.jsx)("button",{className:xd,onClick:()=>{if(!s)return void c("No photo selected");const t=new FormData;t.append("file",s),fetch(`${e}/upload?username=${i}&session=${n}&problem=${a}`,{method:"POST",body:t}).then((e=>{if(!e.ok)throw new Error("Upload failed");return e.json()})).then((e=>{c("Upload successful"),h("")})).catch((e=>{console.error("Upload error:",e),c("Upload failed")}))},children:"Upload Image"}),l&&(0,xn.jsx)("p",{className:wd,children:l})]})}function _d(e){return _d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_d(e)}function Sd(e){var t=function(e,t){if("object"!=_d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_d(t)?t:t+""}function Md(e,t){for(var n=0;nt?(s&&(clearTimeout(s),s=null),o=c,a=e.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(l,u)),a}}(Od.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=Od.prototype._strokeUpdate,this.dotSize=r.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=r.penColor||"black",this.backgroundColor=r.backgroundColor||"rgba(0,0,0,0)",this.onBegin=r.onBegin,this.onEnd=r.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(e){1===e.which&&(n._mouseButtonDown=!0,n._strokeBegin(e))},this._handleMouseMove=function(e){n._mouseButtonDown&&n._strokeMoveUpdate(e)},this._handleMouseUp=function(e){1===e.which&&n._mouseButtonDown&&(n._mouseButtonDown=!1,n._strokeEnd(e))},this._handleTouchStart=function(e){if(1===e.targetTouches.length){var t=e.changedTouches[0];n._strokeBegin(t)}},this._handleTouchMove=function(e){e.preventDefault();var t=e.targetTouches[0];n._strokeMoveUpdate(t)},this._handleTouchEnd=function(e){e.target===n._canvas&&(e.preventDefault(),n._strokeEnd(e))},this.on()}Pd.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1},Pd.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Pd.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time},Nd.prototype.length=function(){for(var e=0,t=void 0,n=void 0,r=0;r<=10;r+=1){var i=r/10,a=this._point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(r>0){var o=a-t,l=s-n;e+=Math.sqrt(o*o+l*l)}t=a,n=s}return e},Nd.prototype._point=function(e,t,n,r,i){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*r*(1-e)*e*e+i*e*e*e},Od.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0},Od.prototype.fromDataURL=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new Image,i=n.ratio||window.devicePixelRatio||1,a=n.width||this._canvas.width/i,s=n.height||this._canvas.height/i;this._reset(),r.src=e,r.onload=function(){t._ctx.drawImage(r,0,0,a,s)},this._isEmpty=!1},Od.prototype.toDataURL=function(e){var t;if("image/svg+xml"===e)return this._toSVG();for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i2,n=this.points[0];if(!t&&n&&this._drawDot(n),n){var r=this._data[this._data.length-1],i=r[r.length-1];n.equals(i)||r.push({x:n.x,y:n.y,time:n.time,color:this.penColor})}"function"===typeof this.onEnd&&this.onEnd(e)},Od.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},Od.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},Od.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},Od.prototype._createPoint=function(e,t,n){var r=this._canvas.getBoundingClientRect();return new Pd(e-r.left,t-r.top,n||(new Date).getTime())},Od.prototype._addPoint=function(e){var t=this.points;if(t.push(e),t.length>2){3===t.length&&t.unshift(t[0]);var n=this._calculateCurveControlPoints(t[0],t[1],t[2]).c2,r=this._calculateCurveControlPoints(t[1],t[2],t[3]).c1,i=new Nd(t[1],n,r,t[2]),a=this._calculateCurveWidths(i);return t.shift(),{curve:i,widths:a}}return{}},Od.prototype._calculateCurveControlPoints=function(e,t,n){var r=e.x-t.x,i=e.y-t.y,a=t.x-n.x,s=t.y-n.y,o=(e.x+t.x)/2,l=(e.y+t.y)/2,c=(t.x+n.x)/2,u=(t.y+n.y)/2,h=Math.sqrt(r*r+i*i),d=Math.sqrt(a*a+s*s),p=d/(h+d),f=c+(o-c)*p,m=u+(l-u)*p,g=t.x-f,b=t.y-m;return{c1:new Pd(o+g,l+b),c2:new Pd(c+g,u+b)}},Od.prototype._calculateCurveWidths=function(e){var t=e.startPoint,n=e.endPoint,r={start:null,end:null},i=this.velocityFilterWeight*n.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,a=this._strokeWidth(i);return r.start=this._lastWidth,r.end=a,this._lastVelocity=i,this._lastWidth=a,r},Od.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)},Od.prototype._drawPoint=function(e,t,n){var r=this._ctx;r.moveTo(e,t),r.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1},Od.prototype._drawCurve=function(e,t,n){var r=this._ctx,i=n-t,a=Math.floor(e.length());r.beginPath();for(var s=0;s1)for(var a=0;a',l=s.innerHTML;if(void 0===l){var c=document.createElement("dummy"),u=s.childNodes;c.innerHTML="";for(var h=0;h")},Od.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,(function(e,n){return t._drawCurve(e,n.start,n.end)}),(function(e){return t._drawDot(e)})),this._data=e},Od.prototype.toData=function(){return this._data};const Rd=Od;var jd=n(576),Ld=["canvasProps","clearOnResize"],Dd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cd(e,t)}(o,e);var t,n,i,s=function(e){var t=Ed();return function(){var n,r=Td(e);if(t){var i=Td(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zd(this,n)}}(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,n=new Array(t),i=0;i{var t;const n=null===(t=e.current)||void 0===t?void 0:t.getCanvas();n&&x([n.toDataURL()])}),[]);(0,r.useEffect)((()=>{var t;const n=null===(t=e.current)||void 0===t?void 0:t.getCanvas();if(!n)return;const r=n.getContext("2d");r.globalCompositeOperation="eraser"===o?"destination-out":"source-over",r.strokeStyle="pen"===o?c:"#000",r.lineWidth=h}),[o,c,h]),(0,r.useEffect)((()=>{const n=setInterval((()=>{const n=e.current;if(n&&!n.isEmpty()){const e=n.getCanvas(),r=document.createElement("canvas");r.width=e.width,r.height=e.height;const o=r.getContext("2d");o.fillStyle="#fff",o.fillRect(0,0,r.width,r.height),o.drawImage(e,0,0);const l=r.toDataURL("image/jpeg",.8),[c,u]=l.split(","),h=c.match(/:(.*?);/)[1],d=atob(u),p=Uint8Array.from(d,(e=>e.charCodeAt(0))),f=new Blob([p],{type:h}),m=new FormData;m.append("file",f,"handwriting.jpg"),fetch(`${t}/upload?username=${a}&session=${i}&problem=${s}&filename=handwriting.jpg`,{method:"POST",body:m}).catch(console.error)}}),500);return()=>clearInterval(n)}),[t,a,i,s]);return(0,xn.jsxs)("div",{className:Id,children:[(0,xn.jsxs)("div",{className:Bd,children:[(0,xn.jsx)("button",{onClick:()=>{const t=e.current;if(!(null===t||void 0===t?void 0:t.getCanvas())||y.length<2)return;const n=[...y],r=n.pop(),i=n[n.length-1];x(n),k((e=>[...e,r])),t.clear(),t.fromDataURL(i)},disabled:y.length<2,className:Fd,children:(0,xn.jsx)(Fh,{})}),(0,xn.jsx)("button",{onClick:()=>{const t=e.current;if(!(null===t||void 0===t?void 0:t.getCanvas())||0===w.length)return;const n=[...w],r=n.pop();k(n),x((e=>[...e,r])),t.clear(),t.fromDataURL(r)},disabled:0===w.length,className:Fd,children:(0,xn.jsx)(Dh,{})}),(0,xn.jsxs)("div",{className:qd,children:[(0,xn.jsx)("button",{className:`${Fd} ${"pen"===o?Hd:""}`,onClick:()=>{l("pen"),g((e=>!e)),v(!1),f(!1)},children:(0,xn.jsx)(Lh,{})}),m&&(0,xn.jsx)("div",{className:$d,children:[2,5,8].map((e=>(0,xn.jsx)("div",{className:Ud,style:{width:2*e,height:2*e,background:c},onClick:()=>{d(e),g(!1)}},e)))})]}),(0,xn.jsxs)("div",{className:qd,children:[(0,xn.jsx)("button",{className:`${Fd} ${"eraser"===o?Hd:""}`,onClick:()=>{l("eraser"),v((e=>!e)),g(!1),f(!1)},children:(0,xn.jsx)(Rh,{})}),b&&(0,xn.jsx)("div",{className:$d,children:[10,20,30].map((e=>(0,xn.jsx)("div",{className:Ud,style:{width:e,height:e,background:"#ddd"},onClick:()=>{d(e),v(!1)}},e)))})]}),(0,xn.jsxs)("div",{className:qd,children:[(0,xn.jsx)("button",{className:Fd,onClick:()=>{f((e=>!e)),g(!1),v(!1)},children:(0,xn.jsx)(jh,{})}),p&&(0,xn.jsx)("div",{className:Vd,children:["#000000","#FF3B30","#FF9500","#FFCC00","#4CD964","#5AC8FA","#0579FF","#5856D6"].map((e=>(0,xn.jsx)("span",{className:Wd,style:{background:e},onClick:()=>{u(e),f(!1)}},e)))})]}),(0,xn.jsx)("button",{className:Yd,onClick:()=>{const t=e.current,n=null===t||void 0===t?void 0:t.getCanvas();if(!t)return;t.clear();const r=n.toDataURL();x([r]),k([])},children:"Clear"})]}),(0,xn.jsx)("div",{className:Gd,children:(0,xn.jsx)(Dd,{ref:e,penColor:"pen"===o?c:"#000",minWidth:h,maxWidth:h,onEnd:()=>{var t;const n=null===(t=e.current)||void 0===t?void 0:t.getCanvas();if(!n)return;const r=n.toDataURL();x((e=>[...e,r])),k([])},canvasProps:{className:Qd,style:{touchAction:"none",background:"#f9f9fc",backgroundImage:"linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px),linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px)",backgroundSize:"25px 25px"}}})})]})}const Kd="TeacherDashboard_wrapper__YN8lW",Jd="TeacherDashboard_headerStats__7iOob",Zd="TeacherDashboard_statCard__rYfMN",ep="TeacherDashboard_emoji__WMHKO",tp="TeacherDashboard_value__m79DS",np="TeacherDashboard_label__1u1gG",rp="TeacherDashboard_classList__J6gI2",ip="TeacherDashboard_classBlock__xLKez",ap="TeacherDashboard_classBtn__jx8FZ",sp="TeacherDashboard_arrow__rQF3f",op="TeacherDashboard_contentArea__foUHC",lp="TeacherDashboard_chartBox__kxJSb",cp="TeacherDashboard_tableSection__nF326",up="TeacherDashboard_tableWrapper__XB65j",hp="TeacherDashboard_dataTable__0JVkZ",dp="TeacherDashboard_goodCell__Anfrk",pp="TeacherDashboard_badProgCell__ss-AC",fp="TeacherDashboard_badErrCell__EbFvW",mp="TeacherDashboard_toggleBtn__Kh3sr",gp="TeacherDashboard_practiceCard__TQnBo",bp="TeacherDashboard_practiceHeader__mg1Rw",vp="TeacherDashboard_practiceBody__BkAk+",yp="TeacherDashboard_field__OBo6D",xp="TeacherDashboard_createBtn__eXgLL";function wp(e){return e+.5|0}const kp=(e,t,n)=>Math.max(Math.min(e,n),t);function _p(e){return kp(wp(2.55*e),0,255)}function Sp(e){return kp(wp(255*e),0,255)}function Mp(e){return kp(wp(e/2.55)/100,0,1)}function Cp(e){return kp(wp(100*e),0,100)}const Tp={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ep=[..."0123456789ABCDEF"],zp=e=>Ep[15&e],Ap=e=>Ep[(240&e)>>4]+Ep[15&e],Pp=e=>(240&e)>>4===(15&e);function Np(e){var t=(e=>Pp(e.r)&&Pp(e.g)&&Pp(e.b)&&Pp(e.a))(e)?zp:Ap;return e?"#"+t(e.r)+t(e.g)+t(e.b)+((e,t)=>e<255?t(e):"")(e.a,t):void 0}const Op=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Rp(e,t,n){const r=t*Math.min(n,1-n),i=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+e/30)%12;return n-r*Math.max(Math.min(i-3,9-i,1),-1)};return[i(0),i(8),i(4)]}function jp(e,t,n){const r=function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+e/60)%6;return n-n*t*Math.max(Math.min(i,4-i,1),0)};return[r(5),r(3),r(1)]}function Lp(e,t,n){const r=Rp(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function Dp(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),a=Math.min(t,n,r),s=(i+a)/2;let o,l,c;return i!==a&&(c=i-a,l=s>.5?c/(2-i-a):c/(i+a),o=function(e,t,n,r,i){return e===i?(t-n)/r+(t>16&255,a>>8&255,255&a]}return e}(),Up.transparent=[0,0,0,0]);const t=Up[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}const Wp=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Yp=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,Gp=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Qp(e,t,n){if(e){let r=Dp(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=Bp(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Xp(e,t){return e?Object.assign(t||{},e):e}function Kp(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Sp(e[3]))):(t=Xp(e,{r:0,g:0,b:0,a:1})).a=Sp(t.a),t}function Jp(e){return"r"===e.charAt(0)?function(e){const t=Wp.exec(e);let n,r,i,a=255;if(t){if(t[7]!==n){const e=+t[7];a=t[8]?_p(e):kp(255*e,0,255)}return n=+t[1],r=+t[3],i=+t[5],n=255&(t[2]?_p(n):kp(n,0,255)),r=255&(t[4]?_p(r):kp(r,0,255)),i=255&(t[6]?_p(i):kp(i,0,255)),{r:n,g:r,b:i,a:a}}}(e):Hp(e)}class Zp{constructor(e){if(e instanceof Zp)return e;const t=typeof e;let n;"object"===t?n=Kp(e):"string"===t&&(n=function(e){var t,n=e.length;return"#"===e[0]&&(4===n||5===n?t={r:255&17*Tp[e[1]],g:255&17*Tp[e[2]],b:255&17*Tp[e[3]],a:5===n?17*Tp[e[4]]:255}:7!==n&&9!==n||(t={r:Tp[e[1]]<<4|Tp[e[2]],g:Tp[e[3]]<<4|Tp[e[4]],b:Tp[e[5]]<<4|Tp[e[6]],a:9===n?Tp[e[7]]<<4|Tp[e[8]]:255})),t}(e)||Vp(e)||Jp(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=Xp(this._rgb);return e&&(e.a=Mp(e.a)),e}set rgb(e){this._rgb=Kp(e)}rgbString(){return this._valid?(e=this._rgb)&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Mp(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`):void 0;var e}hexString(){return this._valid?Np(this._rgb):void 0}hslString(){return this._valid?function(e){if(!e)return;const t=Dp(e),n=t[0],r=Cp(t[1]),i=Cp(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Mp(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,r=e.rgb;let i;const a=t===i?.5:t,s=2*a-1,o=n.a-r.a,l=((s*o===-1?s:(s+o)/(1+s*o))+1)/2;i=1-l,n.r=255&l*n.r+i*r.r+.5,n.g=255&l*n.g+i*r.g+.5,n.b=255&l*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,n){const r=Gp(Mp(e.r)),i=Gp(Mp(e.g)),a=Gp(Mp(e.b));return{r:Sp(Yp(r+n*(Gp(Mp(t.r))-r))),g:Sp(Yp(i+n*(Gp(Mp(t.g))-i))),b:Sp(Yp(a+n*(Gp(Mp(t.b))-a))),a:e.a+n*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new Zp(this.rgb)}alpha(e){return this._rgb.a=Sp(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=wp(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Qp(this._rgb,2,e),this}darken(e){return Qp(this._rgb,2,-e),this}saturate(e){return Qp(this._rgb,1,e),this}desaturate(e){return Qp(this._rgb,1,-e),this}rotate(e){return function(e,t){var n=Dp(e);n[0]=Fp(n[0]+t),n=Bp(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}function ef(){}const tf=(()=>{let e=0;return()=>e++})();function nf(e){return null===e||void 0===e}function rf(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function af(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function sf(e){return("number"===typeof e||e instanceof Number)&&isFinite(+e)}function of(e,t){return sf(e)?e:t}function lf(e,t){return"undefined"===typeof e?t:e}const cf=(e,t)=>"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function uf(e,t,n){if(e&&"function"===typeof e.call)return e.apply(n,t)}function hf(e,t,n,r){let i,a,s;if(rf(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function xf(e,t){const n=yf[t]||(yf[t]=function(e){const t=function(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(e);return e=>{for(const n of t){if(""===n)break;e=e&&e[n]}return e}}(t));return n(e)}function wf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const kf=e=>"undefined"!==typeof e,_f=e=>"function"===typeof e,Sf=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};const Mf=Math.PI,Cf=2*Mf,Tf=Cf+Mf,Ef=Number.POSITIVE_INFINITY,zf=Mf/180,Af=Mf/2,Pf=Mf/4,Nf=2*Mf/3,Of=Math.log10,Rf=Math.sign;function jf(e,t,n){return Math.abs(e-t)l&&c3&&void 0!==arguments[3]?arguments[3]:1e-6;return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Qf(e,t,n){n=n||(n=>e[n]1;)r=a+i>>1,n(r)?a=r:i=r;return{lo:a,hi:i}}const Xf=(e,t,n,r)=>Qf(e,n,r?r=>{const i=e[r][t];return ie[r][t]Qf(e,n,(r=>e[r][t]>=n));const Jf=["push","pop","shift","splice","unshift"];function Zf(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);-1!==i&&r.splice(i,1),r.length>0||(Jf.forEach((t=>{delete e[t]})),delete e._chartjs)}function em(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const tm="undefined"===typeof window?function(e){return e()}:window.requestAnimationFrame;function nm(e,t){let n=[],r=!1;return function(){for(var i=arguments.length,a=new Array(i),s=0;s{r=!1,e.apply(t,n)})))}}const rm=e=>"start"===e?"left":"end"===e?"right":"center",im=(e,t,n)=>"start"===e?t:"end"===e?n:(t+n)/2;function am(e,t,n){const r=t.length;let i=0,a=r;if(e._sorted){const{iScale:s,vScale:o,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=s.axis,{min:h,max:d,minDefined:p,maxDefined:f}=s.getUserBounds();if(p){if(i=Math.min(Xf(l,u,h).lo,n?r:Xf(t,u,s.getPixelForValue(h)).lo),c){const e=l.slice(0,i+1).reverse().findIndex((e=>!nf(e[o.axis])));i-=Math.max(0,e)}i=Yf(i,0,r-1)}if(f){let e=Math.max(Xf(l,s.axis,d,!0).hi+1,n?0:Xf(t,u,s.getPixelForValue(d),!0).hi+1);if(c){const t=l.slice(e-1).findIndex((e=>!nf(e[o.axis])));e+=Math.max(0,t)}a=Yf(e,i,r)-i}else a=r-i}return{start:i,count:a}}function sm(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}const om=e=>0===e||1===e,lm=(e,t,n)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*Cf/n),cm=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Cf/n)+1,um={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*Af),easeOutSine:e=>Math.sin(e*Af),easeInOutSine:e=>-.5*(Math.cos(Mf*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>om(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>om(e)?e:lm(e,.075,.3),easeOutElastic:e=>om(e)?e:cm(e,.075,.3),easeInOutElastic(e){const t=.1125;return om(e)?e:e<.5?.5*lm(2*e,t,.45):.5+.5*cm(2*e-1,t,.45)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-um.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?.5*um.easeInBounce(2*e):.5*um.easeOutBounce(2*e-1)+.5};function hm(e){if(e&&"object"===typeof e){const t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function dm(e){return hm(e)?e:new Zp(e)}function pm(e){return hm(e)?e:new Zp(e).saturate(.5).darken(.1).hexString()}const fm=["x","y","borderWidth","radius","tension"],mm=["color","borderColor","backgroundColor"];const gm=new Map;function bm(e,t,n){return function(e,t){t=t||{};const n=e+JSON.stringify(t);let r=gm.get(n);return r||(r=new Intl.NumberFormat(e,t),gm.set(n,r)),r}(t,n).format(e)}const vm={values:e=>rf(e)?e:""+e,numeric(e,t,n){if(0===e)return"0";const r=this.chart.options.locale;let i,a=e;if(n.length>1){const t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>1e15)&&(i="scientific"),a=function(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e));return n}(e,n)}const s=Of(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),bm(e,r,l)},logarithmic(e,t,n){if(0===e)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Of(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?vm.numeric.call(this,e,t,n):""}};var ym={formatters:vm};const xm=Object.create(null),wm=Object.create(null);function km(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;re.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>pm(t.backgroundColor),this.hoverBorderColor=(e,t)=>pm(t.borderColor),this.hoverColor=(e,t)=>pm(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return _m(this,e,t)}get(e){return km(this,e)}describe(e,t){return _m(wm,e,t)}override(e,t){return _m(xm,e,t)}route(e,t,n,r){const i=km(this,e),a=km(this,n),s="_"+t;Object.defineProperties(i,{[s]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[s],t=a[r];return af(e)?Object.assign({},t,e):lf(e,t)},set(e){this[s]=e}}})}apply(e){e.forEach((e=>e(this)))}}var Mm=new Sm({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),e.set("animations",{colors:{type:"color",properties:mm},numbers:{type:"number",properties:fm}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}})},function(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ym.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e})}]);function Cm(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function Tm(e,t,n){const r=e.currentDevicePixelRatio,i=0!==n?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function Em(e,t){(t||e)&&((t=t||e.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function zm(e,t,n,r){Am(e,t,n,r,null)}function Am(e,t,n,r,i){let a,s,o,l,c,u,h,d;const p=t.pointStyle,f=t.rotation,m=t.radius;let g=(f||0)*zf;if(p&&"object"===typeof p&&(a=p.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void e.restore();if(!(isNaN(m)||m<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,m,0,0,Cf):e.arc(n,r,m,0,Cf),e.closePath();break;case"triangle":u=i?i/2:m,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=Nf,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),g+=Nf,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*m),e.closePath();break;case"rectRounded":c=.516*m,l=m-c,s=Math.cos(g+Pf)*l,h=Math.cos(g+Pf)*(i?i/2-c:l),o=Math.sin(g+Pf)*l,d=Math.sin(g+Pf)*(i?i/2-c:l),e.arc(n-h,r-o,c,g-Mf,g-Af),e.arc(n+d,r-s,c,g-Af,g),e.arc(n+h,r+o,c,g,g+Af),e.arc(n-d,r+s,c,g+Af,g+Mf),e.closePath();break;case"rect":if(!f){l=Math.SQRT1_2*m,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}g+=Pf;case"rectRot":h=Math.cos(g)*(i?i/2:m),s=Math.cos(g)*m,o=Math.sin(g)*m,d=Math.sin(g)*(i?i/2:m),e.moveTo(n-h,r-o),e.lineTo(n+d,r-s),e.lineTo(n+h,r+o),e.lineTo(n-d,r+s),e.closePath();break;case"crossRot":g+=Pf;case"cross":h=Math.cos(g)*(i?i/2:m),s=Math.cos(g)*m,o=Math.sin(g)*m,d=Math.sin(g)*(i?i/2:m),e.moveTo(n-h,r-o),e.lineTo(n+h,r+o),e.moveTo(n+d,r-s),e.lineTo(n-d,r+s);break;case"star":h=Math.cos(g)*(i?i/2:m),s=Math.cos(g)*m,o=Math.sin(g)*m,d=Math.sin(g)*(i?i/2:m),e.moveTo(n-h,r-o),e.lineTo(n+h,r+o),e.moveTo(n+d,r-s),e.lineTo(n-d,r+s),g+=Pf,h=Math.cos(g)*(i?i/2:m),s=Math.cos(g)*m,o=Math.sin(g)*m,d=Math.sin(g)*(i?i/2:m),e.moveTo(n-h,r-o),e.lineTo(n+h,r+o),e.moveTo(n+d,r-s),e.lineTo(n-d,r+s);break;case"line":s=i?i/2:Math.cos(g)*m,o=Math.sin(g)*m,e.moveTo(n-s,r-o),e.lineTo(n+s,r+o);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:m),r+Math.sin(g)*m);break;case!1:e.closePath()}e.fill(),t.borderWidth>0&&e.stroke()}}function Pm(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y5&&void 0!==arguments[5]?arguments[5]:{};const s=rf(t)?t:[t],o=a.strokeWidth>0&&""!==a.strokeColor;let l,c;for(e.save(),e.font=i.string,function(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),nf(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}(e,a),l=0;llf(e[n],e[t[n]]):t=>e[t]:()=>e;for(const s of i)n[s]=+a(s)||0;return n}function Um(e){return $m(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Vm(e){return $m(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Wm(e){const t=Um(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ym(e,t){e=e||{},t=t||Mm.font;let n=lf(e.size,t.size);"string"===typeof n&&(n=parseInt(n,10));let r=lf(e.style,t.style);r&&!(""+r).match(Hm)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:lf(e.family,t.family),lineHeight:qm(lf(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:lf(e.weight,t.weight),string:""};return i.string=function(e){return!e||nf(e.size)||nf(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(i),i}function Gm(e,t,n,r){let i,a,s,o=!0;for(i=0,a=e.length;i1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>e[0];const i=(arguments.length>2?arguments[2]:void 0)||e;"undefined"===typeof n&&(n=og("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Xm([r,...e],t,i,n)};return new Proxy(a,{deleteProperty:(t,n)=>(delete t[n],delete t._keys,delete e[0][n],!0),get:(n,r)=>tg(n,r,(()=>function(e,t,n,r){let i;for(const a of t)if(i=og(Zm(a,e),n),"undefined"!==typeof i)return eg(e,i)?ag(n,r,e,i):i}(r,t,e,n))),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>lg(e).includes(t),ownKeys:e=>lg(e),set(e,t,n){const i=e._storage||(e._storage=r());return e[t]=i[t]=n,delete e._keys,!0}})}function Km(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Jm(e,r),setContext:t=>Km(e,t,n,r),override:i=>Km(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty:(t,n)=>(delete t[n],delete e[n],!0),get:(e,t,n)=>tg(e,t,(()=>function(e,t,n){const{_proxy:r,_context:i,_subProxy:a,_descriptors:s}=e;let o=r[t];_f(o)&&s.isScriptable(t)&&(o=function(e,t,n,r){const{_proxy:i,_context:a,_subProxy:s,_stack:o}=n;if(o.has(e))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+e);o.add(e);let l=t(a,s||r);o.delete(e),eg(e,l)&&(l=ag(i._scopes,i,e,l));return l}(t,o,e,n));rf(o)&&o.length&&(o=function(e,t,n,r){const{_proxy:i,_context:a,_subProxy:s,_descriptors:o}=n;if("undefined"!==typeof a.index&&r(e))return t[a.index%t.length];if(af(t[0])){const n=t,r=i._scopes.filter((e=>e!==n));t=[];for(const l of n){const n=ag(r,i,e,l);t.push(Km(n,a,s&&s[e],o))}}return t}(t,o,e,s.isIndexable));eg(t,o)&&(o=Km(o,i,a&&a[t],s));return o}(e,t,n))),getOwnPropertyDescriptor:(t,n)=>t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,n)=>Reflect.has(e,n),ownKeys:()=>Reflect.ownKeys(e),set:(t,n,r)=>(e[n]=r,delete t[n],!0)})}function Jm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:_f(n)?n:()=>n,isIndexable:_f(r)?r:()=>r}}const Zm=(e,t)=>e?e+wf(t):t,eg=(e,t)=>af(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function tg(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||"constructor"===t)return e[t];const r=n();return e[t]=r,r}function ng(e,t,n){return _f(e)?e(t,n):e}const rg=(e,t)=>!0===e?t:"string"===typeof e?xf(t,e):void 0;function ig(e,t,n,r,i){for(const a of t){const t=rg(n,a);if(t){e.add(t);const a=ng(t._fallback,n,i);if("undefined"!==typeof a&&a!==n&&a!==r)return a}else if(!1===t&&"undefined"!==typeof r&&n!==r)return null}return!1}function ag(e,t,n,r){const i=t._rootScopes,a=ng(t._fallback,n,r),s=[...e,...i],o=new Set;o.add(r);let l=sg(o,s,n,a||n,r);return null!==l&&(("undefined"===typeof a||a===n||(l=sg(o,s,a,l,r),null!==l))&&Xm(Array.from(o),[""],i,a,(()=>function(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];if(rf(i)&&af(n))return n;return i||{}}(t,n,r))))}function sg(e,t,n,r,i){for(;n;)n=ig(e,t,n,r,i);return n}function og(e,t){for(const n of t){if(!n)continue;const t=n[e];if("undefined"!==typeof t)return t}}function lg(e){let t=e._keys;return t||(t=e._keys=function(e){const t=new Set;for(const n of e)for(const e of Object.keys(n).filter((e=>!e.startsWith("_"))))t.add(e);return Array.from(t)}(e._scopes)),t}const cg=Number.EPSILON||1e-14,ug=(e,t)=>t"x"===e?"y":"x";function dg(e,t,n,r){const i=e.skip?t:e,a=t,s=n.skip?t:n,o=$f(a,i),l=$f(s,a);let c=o/(o+l),u=l/(o+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=r*c,d=r*u;return{previous:{x:a.x-h*(s.x-i.x),y:a.y-h*(s.y-i.y)},next:{x:a.x+d*(s.x-i.x),y:a.y+d*(s.y-i.y)}}}function pg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const n=hg(t),r=e.length,i=Array(r).fill(0),a=Array(r);let s,o,l,c=ug(e,0);for(s=0;s2&&void 0!==arguments[2]?arguments[2]:"x";const r=hg(n),i=e.length;let a,s,o,l=ug(e,0);for(let c=0;c!e.skip))),"monotone"===t.cubicInterpolationMode)pg(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,s=e.length;ae.ownerDocument.defaultView.getComputedStyle(e,null);const xg=["top","right","bottom","left"];function wg(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=xg[i];r[a]=parseFloat(e[t+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function kg(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=yg(n),a="border-box"===i.boxSizing,s=wg(i,"padding"),o=wg(i,"border","width"),{x:l,y:c,box:u}=function(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r;let s,o,l=!1;if(((e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot))(i,a,e.target))s=i,o=a;else{const e=t.getBoundingClientRect();s=r.clientX-e.left,o=r.clientY-e.top,l=!0}return{x:s,y:o,box:l}}(e,n),h=s.left+(u&&o.left),d=s.top+(u&&o.top);let{width:p,height:f}=t;return a&&(p-=s.width+o.width,f-=s.height+o.height),{x:Math.round((l-h)/p*n.width/r),y:Math.round((c-d)/f*n.height/r)}}const _g=e=>Math.round(10*e)/10;function Sg(e,t,n,r){const i=yg(e),a=wg(i,"margin"),s=vg(i.maxWidth,e,"clientWidth")||Ef,o=vg(i.maxHeight,e,"clientHeight")||Ef,l=function(e,t,n){let r,i;if(void 0===t||void 0===n){const a=e&&bg(e);if(a){const e=a.getBoundingClientRect(),s=yg(a),o=wg(s,"border","width"),l=wg(s,"padding");t=e.width-l.width-o.width,n=e.height-l.height-o.height,r=vg(s.maxWidth,a,"clientWidth"),i=vg(s.maxHeight,a,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||Ef,maxHeight:i||Ef}}(e,t,n);let{width:c,height:u}=l;if("content-box"===i.boxSizing){const e=wg(i,"border","width"),t=wg(i,"padding");c-=t.width+e.width,u-=t.height+e.height}c=Math.max(0,c-a.width),u=Math.max(0,r?c/r:u-a.height),c=_g(Math.min(c,s,l.maxWidth)),u=_g(Math.min(u,o,l.maxHeight)),c&&!u&&(u=_g(c/2));return(void 0!==t||void 0!==n)&&r&&l.height&&u>l.height&&(u=l.height,c=_g(Math.floor(u*r))),{width:c,height:u}}function Mg(e,t,n){const r=t||1,i=Math.floor(e.height*r),a=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==r||s.height!==i||s.width!==a)&&(e.currentDevicePixelRatio=r,s.height=i,s.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0)}const Cg=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};gg()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function Tg(e,t){const n=function(e,t){return yg(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Eg(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function zg(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function Ag(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},s=Eg(e,i,n),o=Eg(i,a,n),l=Eg(a,t,n),c=Eg(s,o,n),u=Eg(o,l,n);return Eg(c,u,n)}function Pg(e,t,n){return e?function(e,t){return{x:n=>e+e+t-n,setWidth(e){t=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}}(t,n):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function Ng(e,t){let n,r;"ltr"!==t&&"rtl"!==t||(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function Og(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Rg(e){return"angle"===e?{between:Wf,compare:Uf,normalize:Vf}:{between:Gf,compare:(e,t)=>e-t,normalize:e=>e}}function jg(e){let{start:t,end:n,count:r,loop:i,style:a}=e;return{start:t%r,end:n%r,loop:i&&(n-t+1)%r===0,style:a}}function Lg(e,t,n){if(!n)return[e];const{property:r,start:i,end:a}=n,s=t.length,{compare:o,between:l,normalize:c}=Rg(r),{start:u,end:h,loop:d,style:p}=function(e,t,n){const{property:r,start:i,end:a}=n,{between:s,normalize:o}=Rg(r),l=t.length;let c,u,{start:h,end:d,loop:p}=e;if(p){for(h+=l,d+=l,c=0,u=l;cv||l(i,b,m)&&0!==o(i,b),w=()=>!v||0===o(a,m)||l(a,b,m);for(let k=u,_=u;k<=h;++k)g=t[k%s],g.skip||(m=c(g[r]),m!==b&&(v=l(m,i,a),null===y&&x()&&(y=0===o(m,i)?k:_),null!==y&&w()&&(f.push(jg({start:y,end:k,loop:d,count:s,style:p})),y=null),_=k,b=m));return null!==y&&f.push(jg({start:y,end:h,loop:d,count:s,style:p})),f}function Dg(e,t){const n=[],r=e.segments;for(let i=0;ir({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)})))}_refresh(){this._request||(this._running=!0,this._request=tm.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=0;this._charts.forEach(((n,r)=>{if(!n.running||!n.items.length)return;const i=n.items;let a,s=i.length-1,o=!1;for(;s>=0;--s)a=i[s],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(e),o=!0):(i[s]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,n,e,"progress")),i.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=i.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Ug=new $g;const Vg="transparent",Wg={boolean:(e,t,n)=>n>.5?t:e,color(e,t,n){const r=dm(e||Vg),i=r.valid&&dm(t||Vg);return i&&i.valid?i.mix(r,n).hexString():t},number:(e,t,n)=>e+(t-e)*n};class Yg{constructor(e,t,n,r){const i=t[n];r=Gm([e.to,r,i,e.from]);const a=Gm([e.from,i,r]);this._active=!0,this._fn=e.fn||Wg[e.type||typeof a],this._easing=um[e.easing]||um.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=Gm([e.to,t,r,e.from]),this._from=Gm([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,s=this._to;let o;if(this._active=i!==s&&(a||t1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[r]=this._fn(i,s,o))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,n)=>{e.push({res:t,rej:n})}))}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let r=0;r{const i=e[r];if(!af(i))return;const a={};for(const e of t)a[e]=i[e];(rf(i.properties)&&i.properties||[r]).forEach((e=>{e!==r&&n.has(e)||n.set(e,a)}))}))}_animateOptions(e,t){const n=t.options,r=function(e,t){if(!t)return;let n=e.options;if(!n)return void(e.options=t);n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(e,n);if(!r)return[];const i=this._createAnimations(r,n);return n.$shared&&function(e,t){const n=[],r=Object.keys(t);for(let i=0;i{e.options=n}),(()=>{})),i}_createAnimations(e,t){const n=this._properties,r=[],i=e.$animations||(e.$animations={}),a=Object.keys(t),s=Date.now();let o;for(o=a.length-1;o>=0;--o){const l=a[o];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(e,t));continue}const c=t[l];let u=i[l];const h=n.get(l);if(u){if(h&&u.active()){u.update(h,c,s);continue}u.cancel()}h&&h.duration?(i[l]=u=new Yg(h,e,l,c),r.push(u)):e[l]=c}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(Ug.add(this._chart,n),!0):void 0}}function Qg(e,t){const n=e&&e.options||{},r=n.reverse,i=void 0===n.min?t:0,a=void 0===n.max?t:0;return{start:r?a:i,end:r?i:a}}function Xg(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i3&&void 0!==arguments[3]?arguments[3]:{};const i=e.keys,a="single"===r.mode;let s,o,l,c;if(null===t)return;let u=!1;for(s=0,o=i.length;s0||!n&&t<0)return i.index}return null}function tb(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:o}=r,l=a.axis,c=s.axis,u=function(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}(a,s,r),h=t.length;let d;for(let p=0;pn[e].axis===t)).shift()}function rb(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][n])return;delete t[r][n],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[n]&&delete t[r]._visualValues[n]}}}const ib=e=>"reset"===e||"none"===e,ab=(e,t)=>t?e:Object.assign({},e);class sb{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Jg(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&rb(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>"x"===e?t:"r"===e?r:n,i=t.xAxisID=lf(n.xAxisID,nb(e,"x")),a=t.yAxisID=lf(n.yAxisID,nb(e,"y")),s=t.rAxisID=lf(n.rAxisID,nb(e,"r")),o=t.indexAxis,l=t.iAxisID=r(o,i,a,s),c=t.vAxisID=r(o,a,i,s);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Zf(this._data,this),e._stacked&&rb(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(af(t)){const e=this._cachedMeta;this._data=function(e,t){const{iScale:n,vScale:r}=t,i="x"===n.axis?"x":"y",a="x"===r.axis?"x":"y",s=Object.keys(e),o=new Array(s.length);let l,c,u;for(l=0,c=s.length;l{const t="_onData"+wf(e),n=r[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value(){for(var e=arguments.length,i=new Array(e),a=0;a{"function"===typeof e[t]&&e[t](...i)})),s}})})))),this._syncList=[],this._data=t}var r,i}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const i=t._stacked;t._stacked=Jg(t.vScale,t),t.stack!==n.stack&&(r=!0,rb(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&(tb(this,t._parsed),t._stacked=Jg(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:a}=n,s=i.axis;let o,l,c,u=0===e&&t===r.length||n._sorted,h=e>0&&n._parsed[e-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,c=r;else{c=rf(r[e])?this.parseArrayData(n,r,e,t):af(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);const i=()=>null===l[s]||h&&l[s]e&&!t.hidden&&t._stacked&&{keys:Xg(n,!0),values:null})(t,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}(s);let h,d;function p(){d=r[h];const t=d[s.axis];return!sf(d[e.axis])||c>t||u=0;--h)if(!p()){this.updateRangeFromParsed(l,e,d,o);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let r,i,a;for(r=0,i=t.length;r=0&&e1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;const r="active"===t,i=this._cachedDataOpts,a=e+"-"+t,s=i[a],o=this.enableOptionSharing&&kf(n);if(s)return ab(s,o);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),u=r?[`${e}Hover`,"hover",e,""]:[e,""],h=l.getOptionScopes(this.getDataset(),c),d=Object.keys(Mm.elements[e]),p=l.resolveNamedOptions(h,d,(()=>this.getContext(n,r,t)),u);return p.$shared&&(p.$shared=o,i[a]=Object.freeze(ab(p,o))),p}_resolveAnimations(e,t,n){const r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,s=i[a];if(s)return s;let o;if(!1!==r.options.animation){const r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);o=r.createResolver(a,this.getContext(e,n,t))}const l=new Gg(r,o&&o.animations);return o&&o._cacheable&&(i[a]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||ib(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){ib(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!ib(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;const i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,n=this._cachedMeta.data;for(const[s,o,l]of this._syncList)this[s](o,l);this._syncList=[];const r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i2&&void 0!==arguments[2])||arguments[2];const r=this._cachedMeta,i=r.data,a=e+t;let s;const o=e=>{for(e.length+=t,s=e.length-1;s>=a;s--)e[s]=e[s-t]};for(o(i),s=e;s"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,i)=>{const a=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let i,a,s=e=>+n[e];if(af(n[e])){const{key:e="value"}=this._parsing;s=t=>+xf(n[t],e)}for(i=e,a=e+t;iWf(e,o,l,!0)?1:Math.max(t,t*n,r,r*n),f=(e,t,r)=>Wf(e,o,l,!0)?-1:Math.min(t,t*n,r,r*n),m=p(0,c,h),g=p(Af,u,d),b=f(Mf,c,h),v=f(Mf+Af,u,d);r=(m-b)/2,i=(g-v)/2,a=-(m+b)/2,s=-(g+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:s}}(d,h,o),b=(n.width-a)/p,v=(n.height-a)/f,y=Math.max(Math.min(b,v)/2,0),x=cf(this.options.radius,y),w=(x-Math.max(x*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*x,this.offsetY=g*x,r.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*u,0),this.updateElements(i,0,i.length,e)}_circumference(e,t){const n=this.options,r=this._cachedMeta,i=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*i/Cf)}updateElements(e,t,n,r){const i="reset"===r,a=this.chart,s=a.chartArea,o=a.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,u=i&&o.animateScale,h=u?0:this.innerRadius,d=u?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(t,r);let m,g=this._getRotation();for(m=0;m0&&!isNaN(e)?Cf*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=bm(t._parsed[e],n.options.locale);return{label:r[e]||"",value:i}}getMaxBorderWidth(e){let t=0;const n=this.chart;let r,i,a,s,o;if(!e)for(r=0,i=n.data.datasets.length;r0&&this.getParsed(t-1);for(let x=0;x=b){p.skip=!0;continue}const v=this.getParsed(x),w=nf(v[d]),k=p[h]=a.getPixelForValue(v[h],x),_=p[d]=i||w?s.getBasePixel():s.getPixelForValue(o?this.applyStack(s,v,o):v[d],x);p.skip=isNaN(k)||isNaN(_)||w,p.stop=x>0&&Math.abs(v[h]-y[h])>m,f&&(p.parsed=v,p.raw=l.data[x]),u&&(p.options=c||this.resolveDataElementOptions(x,n.active?"active":r)),g||this.updateElement(n,x,p,r),y=v}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;const i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class cb extends ob{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function ub(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class hb{static override(e){Object.assign(hb.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return ub()}parse(){return ub()}format(){return ub()}add(){return ub()}diff(){return ub()}startOf(){return ub()}endOf(){return ub()}}var db=hb;function pb(e,t,n,r){const{controller:i,data:a,_sorted:s}=e,o=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(o&&t===o.axis&&"r"!==t&&s&&a.length){const s=o._reversePixels?Kf:Xf;if(!r){const r=s(a,t,n);if(l){const{vScale:t}=i._cachedMeta,{_parsed:n}=e,a=n.slice(0,r.lo+1).reverse().findIndex((e=>!nf(e[t.axis])));r.lo-=Math.max(0,a);const s=n.slice(r.hi).findIndex((e=>!nf(e[t.axis])));r.hi+=Math.max(0,s)}return r}if(i._sharedOptions){const e=a[0],r="function"===typeof e.getRange&&e.getRange(t);if(r){const e=s(a,t,n-r),i=s(a,t,n+r);return{lo:e.lo,hi:i.hi}}}}return{lo:0,hi:a.length-1}}function fb(e,t,n,r,i){const a=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,l=a.length;o{e[s]&&e[s](t[n],i)&&(a.push({element:e,datasetIndex:r,index:l}),o=o||e.inRange(t.x,t.y,i))})),r&&!o?[]:a}var yb={evaluateInteractionItems:fb,modes:{index(e,t,n,r){const i=kg(t,e),a=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?mb(e,i,a,r,s):bb(e,i,a,!1,r,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=o[0].index,n=e.data[t];n&&!n.skip&&l.push({element:n,datasetIndex:e.index,index:t})})),l):[]},dataset(e,t,n,r){const i=kg(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?mb(e,i,a,r,s):bb(e,i,a,!1,r,s);if(o.length>0){const t=o[0].datasetIndex,n=e.getDatasetMeta(t).data;o=[];for(let e=0;emb(e,kg(t,e),n.axis||"xy",r,n.includeInvisible||!1),nearest(e,t,n,r){const i=kg(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return bb(e,i,a,n.intersect,r,s)},x:(e,t,n,r)=>vb(e,kg(t,e),"x",n.intersect,r),y:(e,t,n,r)=>vb(e,kg(t,e),"y",n.intersect,r)}};const xb=["left","top","right","bottom"];function wb(e,t){return e.filter((e=>e.pos===t))}function kb(e,t){return e.filter((e=>-1===xb.indexOf(e.pos)&&e.box.axis===t))}function _b(e,t){return e.sort(((e,n)=>{const r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight}))}function Sb(e,t){const n=function(e){const t={};for(const n of e){const{stack:e,pos:r,stackWeight:i}=n;if(!e||!xb.includes(r))continue;const a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=i}return t}(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,s,o;for(a=0,s=e.length;a{r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function zb(e,t,n,r){const i=[];let a,s,o,l,c,u;for(a=0,s=e.length,c=0;ae.box.fullSize)),!0),r=_b(wb(t,"left"),!0),i=_b(wb(t,"right")),a=_b(wb(t,"top"),!0),s=_b(wb(t,"bottom")),o=kb(t,"x"),l=kb(t,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(s).concat(o),chartArea:wb(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(s).concat(o)}}(e.boxes),l=o.vertical,c=o.horizontal;hf(e.boxes,(e=>{"function"===typeof e.beforeLayout&&e.beforeLayout()}));const u=l.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),d=Object.assign({},i);Cb(d,Wm(r));const p=Object.assign({maxPadding:d,w:a,h:s,x:i.left,y:i.top},i),f=Sb(l.concat(c),h);zb(o.fullSize,p,h,f),zb(l,p,h,f),zb(c,p,h,f)&&zb(l,p,h,f),function(e){const t=e.maxPadding;function n(n){const r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(p),Pb(o.leftAndTop,p,h,f),p.x+=p.w,p.y+=p.h,Pb(o.rightAndBottom,p,h,f),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},hf(o.chartArea,(t=>{const n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class Ob{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}}class Rb extends Ob{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const jb="$chartjs",Lb={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Db=e=>null===e||""===e;const Ib=!!Cg&&{passive:!0};function Bb(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Ib)}function Fb(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Hb(e,t,n){const r=e.canvas,i=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||Fb(n.addedNodes,r),t=t&&!Fb(n.removedNodes,r);t&&n()}));return i.observe(document,{childList:!0,subtree:!0}),i}function qb(e,t,n){const r=e.canvas,i=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||Fb(n.removedNodes,r),t=t&&!Fb(n.addedNodes,r);t&&n()}));return i.observe(document,{childList:!0,subtree:!0}),i}const $b=new Map;let Ub=0;function Vb(){const e=window.devicePixelRatio;e!==Ub&&(Ub=e,$b.forEach(((t,n)=>{n.currentDevicePixelRatio!==e&&t()})))}function Wb(e,t,n){const r=e.canvas,i=r&&bg(r);if(!i)return;const a=nm(((e,t)=>{const r=i.clientWidth;n(e,t),r{const t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||a(n,r)}));return s.observe(i),function(e,t){$b.size||window.addEventListener("resize",Vb),$b.set(e,t)}(e,a),s}function Yb(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){$b.delete(e),$b.size||window.removeEventListener("resize",Vb)}(e)}function Gb(e,t,n){const r=e.canvas,i=nm((t=>{null!==e.ctx&&n(function(e,t){const n=Lb[e.type]||e.type,{x:r,y:i}=kg(e,t);return{type:n,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==i?i:null}}(t,e))}),e);return function(e,t,n){e&&e.addEventListener(t,n,Ib)}(r,t,i),i}class Qb extends Ob{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[jb]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Db(i)){const t=Tg(e,"width");void 0!==t&&(e.width=t)}if(Db(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=Tg(e,"height");void 0!==t&&(e.height=t)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t[jb])return!1;const n=t[jb].initial;["height","width"].forEach((e=>{const r=n[e];nf(r)?t.removeAttribute(e):t.setAttribute(e,r)}));const r=n.style||{};return Object.keys(r).forEach((e=>{t.style[e]=r[e]})),t.width=t.width,delete t[jb],!0}addEventListener(e,t,n){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),i={attach:Hb,detach:qb,resize:Wb}[t]||Gb;r[t]=i(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:Yb,detach:Yb,resize:Yb}[t]||Bb)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return Sg(e,t,n,r)}isAttached(e){const t=e&&bg(e);return!(!t||!t.isConnected)}}class Xb{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return Df(this.x)&&Df(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach((e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]})),r}}function Kb(e,t){const n=e.options.ticks,r=function(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?function(e){const t=[];let n,r;for(n=0,r=e.length;ni)return function(e,t,n,r){let i,a=0,s=n[0];for(r=Math.ceil(r),i=0;ie-t)).pop(),t}(r);for(let s=0,o=a.length-1;si)return e}return Math.max(i,1)}(a,t,i);if(s>0){let e,n;const r=s>1?Math.round((l-o)/(s-1)):null;for(Jb(t,c,u,nf(r)?0:o-r,o),e=0,n=s-1;e"top"===t||"left"===t?e[t]+n:e[t]-n,ev=(e,t)=>Math.min(t||e,e);function tv(e,t){const n=[],r=e.length/t,i=e.length;let a=0;for(;as+o)))return c}function rv(e){return e.drawTicks?e.tickLength:0}function iv(e,t){if(!e.display)return 0;const n=Ym(e.font,t),r=Wm(e.padding);return(rf(e.text)?e.text.length:1)*n.lineHeight+r.height}function av(e,t,n){let r=rm(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=(e=>"left"===e?"right":"right"===e?"left":e)(r)),r}class sv extends Xb{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=of(e,Number.POSITIVE_INFINITY),t=of(t,Number.NEGATIVE_INFINITY),n=of(n,Number.POSITIVE_INFINITY),r=of(r,Number.NEGATIVE_INFINITY),{min:of(e,n),max:of(t,r),minDefined:sf(e),maxDefined:sf(t)}}getMinMax(e){let t,{min:n,max:r,minDefined:i,maxDefined:a}=this.getUserBounds();if(i&&a)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let o=0,l=s.length;or?r:n,r=i&&n>r?n:r,{min:of(n,of(r,n)),max:of(r,of(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){uf(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:r,grace:i,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){const{min:r,max:i}=e,a=cf(t,(i-r)/2),s=(e,t)=>n&&0===e?0:e+t;return{min:s(r,-Math.abs(a)),max:s(i,a)}}(this,i,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=s=i||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const c=this._getLabelSizes(),u=c.widest.width,h=c.highest.height,d=Yf(this.chart.width-u,0,this.maxWidth);a=e.offset?this.maxWidth/n:d/(n-1),u+6>a&&(a=d/(n-(e.offset?.5:1)),s=this.maxHeight-rv(e.grid)-t.padding-iv(e.title,this.chart.options.font),o=Math.sqrt(u*u+h*h),l=Ff(Math.min(Math.asin(Yf((c.highest.height+6)/a,-1,1)),Math.asin(Yf(s/o,-1,1))-Math.asin(Yf(h/o,-1,1)))),l=Math.max(r,Math.min(i,l))),this.labelRotation=l}afterCalculateLabelRotation(){uf(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){uf(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:i}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const a=iv(r,t.options.font);if(s?(e.width=this.maxWidth,e.height=rv(i)+a):(e.height=this.maxHeight,e.width=rv(i)+a),n.display&&this.ticks.length){const{first:t,last:r,widest:i,highest:a}=this._getLabelSizes(),o=2*n.padding,l=Bf(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(s){const t=n.mirror?0:u*i.width+c*a.height;e.height=Math.min(this.maxHeight,e.height+t+o)}else{const t=n.mirror?0:c*i.width+u*a.height;e.width=Math.min(this.maxWidth,e.width+t+o)}this._calculatePadding(t,r,u,c)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){const{ticks:{align:i,padding:a},position:s}=this.options,o=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,h=0;o?l?(u=r*e.width,h=n*t.height):(u=n*e.height,h=r*t.width):"start"===i?h=t.width:"end"===i?u=e.width:"inner"!==i&&(u=e.width/2,h=t.width/2),this.paddingLeft=Math.max((u-s+a)*this.width/(this.width-s),0),this.paddingRight=Math.max((h-c+a)*this.width/(this.width-c),0)}else{let n=t.height/2,r=e.height/2;"start"===i?(n=0,r=e.height):"end"===i&&(n=t.height,r=0),this.paddingTop=n+a,this.paddingBottom=r+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){uf(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t{const n=e.gc,r=n.length/2;let i;if(r>t){for(i=0;i({width:a[e]||0,height:s[e]||0});return{first:_(0),last:_(t-1),widest:_(w),highest:_(k),widths:a,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Yf(this._alignToPixels?Tm(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&es*r?s/n:o/r:o*r0}_computeGridLineItems(e){const t=this.axis,n=this.chart,r=this.options,{grid:i,position:a,border:s}=r,o=i.offset,l=this.isHorizontal(),c=this.ticks.length+(o?1:0),u=rv(i),h=[],d=s.setContext(this.getContext()),p=d.display?d.width:0,f=p/2,m=function(e){return Tm(n,e,p)};let g,b,v,y,x,w,k,_,S,M,C,T;if("top"===a)g=m(this.bottom),w=this.bottom-u,_=g-f,M=m(e.top)+f,T=e.bottom;else if("bottom"===a)g=m(this.top),M=e.top,T=m(e.bottom)-f,w=g+f,_=this.top+u;else if("left"===a)g=m(this.right),x=this.right-u,k=g-f,S=m(e.left)+f,C=e.right;else if("right"===a)g=m(this.left),S=e.left,C=m(e.right)-f,x=g+f,k=this.left+u;else if("x"===t){if("center"===a)g=m((e.top+e.bottom)/2+.5);else if(af(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}M=e.top,T=e.bottom,w=g+f,_=w+u}else if("y"===t){if("center"===a)g=m((e.left+e.right)/2);else if(af(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}x=g-f,k=x-u,S=e.left,C=e.right}const E=lf(r.ticks.maxTicksLimit,c),z=Math.max(1,Math.ceil(c/E));for(b=0;b0&&(a-=r/2)}h={left:a,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}m.push({label:y,font:S,textOffset:T,options:{rotation:f,color:n,strokeColor:o,strokeWidth:c,textAlign:d,textBaseline:E,translation:[x,w],backdrop:h}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-Bf(this.labelRotation))return"top"===e?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align?n="right":"inner"===t.align&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,a=e+i,s=this._getLabelSizes().widest.width;let o,l;return"left"===t?r?(l=this.right+i,"near"===n?o="left":"center"===n?(o="center",l+=s/2):(o="right",l+=s)):(l=this.right-a,"near"===n?o="right":"center"===n?(o="center",l-=s/2):(o="left",l=this.left)):"right"===t?r?(l=this.left+i,"near"===n?o="right":"center"===n?(o="center",l-=s/2):(o="left",l-=s)):(l=this.left+a,"near"===n?o="left":"center"===n?(o="center",l+=s/2):(o="right",l=this.right)):o="right",{textAlign:o,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,a),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const n=this.ticks.findIndex((t=>t.value===e));if(n>=0){return t.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,a;const s=(e,t,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,a=r.length;i{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let i,a;for(i=0,a=t.length;i{const r=n.split("."),i=r.pop(),a=[e].concat(r).join("."),s=t[n].split("."),o=s.pop(),l=s.join(".");Mm.route(a,i,l,o)}))}(t,e.defaultRoutes);e.descriptors&&Mm.describe(t,e.descriptors)}(e,a,n),this.override&&Mm.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in Mm[r]&&(delete Mm[r][n],this.override&&delete xm[n])}}class lv{constructor(){this.controllers=new ov(sb,"datasets",!0),this.elements=new ov(Xb,"elements"),this.plugins=new ov(Object,"plugins"),this.scales=new ov(sv,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var e=arguments.length,t=new Array(e),n=0;n{const r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):hf(t,(t=>{const r=n||this._getRegistryForType(t);this._exec(e,r,t)}))}))}_exec(e,t,n){const r=wf(e);uf(n["before"+r],[],n),t[e](n),uf(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;te.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}}function hv(e,t){return t||!1!==e?!0===e?{}:e:null}function dv(e,t,n,r){let{plugin:i,local:a}=t;const s=e.pluginScopeKeys(i),o=e.getOptionScopes(n,s);return a&&i.defaults&&o.push(i.defaults),e.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function pv(e,t){const n=Mm.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function fv(e){if("x"===e||"y"===e||"r"===e)return e}function mv(e){if(fv(e))return e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&fv(e[0].toLowerCase());if(t)return t}var i;throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function gv(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function bv(e,t){const n=xm[e.type]||{scales:{}},r=t.scales||{},i=pv(e.type,t),a=Object.create(null);return Object.keys(r).forEach((t=>{const s=r[t];if(!af(s))return console.error(`Invalid scale configuration for scale: ${t}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const o=mv(t,s,function(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter((t=>t.xAxisID===e||t.yAxisID===e));if(n.length)return gv(e,"x",n[0])||gv(e,"y",n[0])}return{}}(t,e),Mm.scales[s.type]),l=function(e,t){return e===t?"_index_":"_value_"}(o,i),c=n.scales||{};a[t]=bf(Object.create(null),[{axis:o},s,c[o],c[l]])})),e.data.datasets.forEach((n=>{const i=n.type||e.type,s=n.indexAxis||pv(i,t),o=(xm[i]||{}).scales||{};Object.keys(o).forEach((e=>{const t=function(e,t){let n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,s),i=n[t+"AxisID"]||t;a[i]=a[i]||Object.create(null),bf(a[i],[{axis:t},r[i],o[e]])}))})),Object.keys(a).forEach((e=>{const t=a[e];bf(t,[Mm.scales[t.type],Mm.scale])})),a}function vv(e){const t=e.options||(e.options={});t.plugins=lf(t.plugins,{}),t.scales=bv(e,t)}function yv(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const xv=new Map,wv=new Set;function kv(e,t){let n=xv.get(e);return n||(n=t(),xv.set(e,n),wv.add(n)),n}const _v=(e,t,n)=>{const r=xf(t,n);void 0!==r&&e.add(r)};class Sv{constructor(e){this._config=function(e){return(e=e||{}).data=yv(e.data),vv(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=yv(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),vv(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return kv(e,(()=>[[`datasets.${e}`,""]]))}datasetAnimationScopeKeys(e,t){return kv(`${e}.transition.${t}`,(()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]]))}datasetElementScopeKeys(e,t){return kv(`${e}-${t}`,(()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]]))}pluginScopeKeys(e){const t=e.id;return kv(`${this.type}-plugin-${t}`,(()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const n=this._scopeCache;let r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){const{options:r,type:i}=this,a=this._cachedScopes(e,n),s=a.get(t);if(s)return s;const o=new Set;t.forEach((t=>{e&&(o.add(e),t.forEach((t=>_v(o,e,t)))),t.forEach((e=>_v(o,r,e))),t.forEach((e=>_v(o,xm[i]||{},e))),t.forEach((e=>_v(o,Mm,e))),t.forEach((e=>_v(o,wm,e)))}));const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),wv.has(t)&&a.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,xm[t]||{},Mm.datasets[t]||{},{type:t},Mm,wm]}resolveNamedOptions(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""];const i={$shared:!0},{resolver:a,subPrefixes:s}=Mv(this._resolverCache,e,r);let o=a;if(function(e,t){const{isScriptable:n,isIndexable:r}=Jm(e);for(const i of t){const t=n(i),a=r(i),s=(a||t)&&e[i];if(t&&(_f(s)||Cv(s))||a&&rf(s))return!0}return!1}(a,t)){i.$shared=!1;o=Km(a,n=_f(n)?n():n,this.createResolver(e,n,s))}for(const l of t)i[l]=o[l];return i}createResolver(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],r=arguments.length>3?arguments[3]:void 0;const{resolver:i}=Mv(this._resolverCache,e,n);return af(t)?Km(i,t,void 0,r):i}}function Mv(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let a=r.get(i);if(!a){a={resolver:Xm(t,n),subPrefixes:n.filter((e=>!e.toLowerCase().includes("hover")))},r.set(i,a)}return a}const Cv=e=>af(e)&&Object.getOwnPropertyNames(e).some((t=>_f(e[t])));const Tv=["top","bottom","left","right","chartArea"];function Ev(e,t){return"top"===e||"bottom"===e||-1===Tv.indexOf(e)&&"x"===t}function zv(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Av(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),uf(n&&n.onComplete,[e],t)}function Pv(e){const t=e.chart,n=t.options.animation;uf(n&&n.onProgress,[e],t)}function Nv(e){return gg()&&"string"===typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Ov={},Rv=e=>{const t=Nv(e);return Object.values(Ov).filter((e=>e.canvas===t)).pop()};function jv(e,t,n){const r=Object.keys(e);for(const i of r){const r=+i;if(r>=t){const a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}class Lv{static defaults=(()=>Mm)();static instances=(()=>Ov)();static overrides=(()=>xm)();static registry=(()=>cv)();static version="4.5.0";static getChart=(()=>Rv)();static register(){cv.add(...arguments),Dv()}static unregister(){cv.remove(...arguments),Dv()}constructor(e,t){const n=this.config=new Sv(t),r=Nv(e),i=Rv(r);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(e){return!gg()||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?Rb:Qb}(r)),this.platform.updateConfig(n);const s=this.platform.acquireContext(r,a.aspectRatio),o=s&&s.canvas,l=o&&o.height,c=o&&o.width;this.id=tf(),this.ctx=s,this.canvas=o,this.width=c,this.height=l,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new uv,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let n;return function(){for(var r=arguments.length,i=new Array(r),a=0;athis.update(e)),a.resizeDelay||0),this._dataChanges=[],Ov[this.id]=this,s&&o?(Ug.listen(this,"complete",Av),Ug.listen(this,"progress",Pv),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return nf(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return cv}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Mg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Em(this.canvas,this.ctx),this}stop(){return Ug.stop(this),this}resize(e,t){Ug.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,i),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Mg(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),uf(n.onResize,[this,a],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){hf(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce(((e,t)=>(e[t]=!1,e)),{});let i=[];t&&(i=i.concat(Object.keys(t).map((e=>{const n=t[e],r=mv(e,n),i="r"===r,a="x"===r;return{options:n,dposition:i?"chartArea":a?"bottom":"left",dtype:i?"radialLinear":a?"category":"linear"}})))),hf(i,(t=>{const i=t.options,a=i.id,s=mv(a,i),o=lf(i.type,t.dtype);void 0!==i.position&&Ev(i.position,s)===Ev(t.dposition)||(i.position=t.dposition),r[a]=!0;let l=null;if(a in n&&n[a].type===o)l=n[a];else{l=new(cv.getScale(o))({id:a,type:o,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(i,e)})),hf(r,((e,t)=>{e||delete n[t]})),hf(n,(e=>{Nb.configure(this,e,e.options),Nb.addBox(this,e)}))}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort(((e,t)=>e.index-t.index)),n>t){for(let e=t;et.length&&delete this._stacks,e.forEach(((e,n)=>{0===t.filter((t=>t===e._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n{this.getDatasetMeta(t).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let l=0,c=this.data.datasets.length;l{e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(zv("z","_idx"));const{_active:s,_lastEvent:o}=this;o?this._eventHandler(o,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){hf(this.scales,(e=>{Nb.removeBox(this,e)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);Sf(t,n)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:i}of t){jv(e,r,"_removeElements"===n?-i:i)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=t=>new Set(e.filter((e=>e[0]===t)).map(((e,t)=>t+","+e.splice(1).join(",")))),r=n(0);for(let i=1;ie.split(","))).map((e=>({method:e[1],start:+e[2],count:+e[3]})))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Nb.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],hf(this.boxes,(e=>{n&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))}),this),this._layers.forEach(((e,t)=>{e._idx=t})),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=qg(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(r&&Nm(t,r),e.controller.draw(),r&&Om(t),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(e){return Pm(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const i=yb.modes[t];return"function"===typeof i?i(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter((e=>e&&e._dataset===t)).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Qm(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return"boolean"===typeof n.hidden?!n.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);kf(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(i,{visible:n}),this.update((t=>t.datasetIndex===e?r:void 0)))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Ug.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};hf(this.options.events,(e=>n(e,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)};let a;const s=()=>{r("attach",s),this.attached=!0,this.resize(),n("resize",i),n("detach",a)};a=()=>{this.attached=!1,r("resize",i),this._stop(),this._resize(0,0),n("attach",s)},t.isAttached(this.canvas)?s():a()}unbindEvents(){hf(this._listeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._listeners={},hf(this._responsiveListeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let i,a,s,o;for("dataset"===t&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+r+"DatasetHoverStyle"]()),s=0,o=e.length;s{let{datasetIndex:t,index:n}=e;const r=this.getDatasetMeta(t);if(!r)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:r.data[n],index:n}}));!df(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return 1===this._plugins._cache.filter((t=>t.plugin.id===e)).length}_updateHoverStyles(e,t,n){const r=this.options.hover,i=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),a=i(t,e),s=n?e:i(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),s.length&&r.mode&&this.updateHoverStyle(s,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:i}=this,a=t,s=this._getActiveElements(e,r,n,a),o=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),l=function(e,t,n,r){return n&&"mouseout"!==e.type?r?t:e:null}(e,this._lastEvent,n,o);n&&(this._lastEvent=null,uf(i.onHover,[e,s,this],this),o&&uf(i.onClick,[e,s,this],this));const c=!df(s,r);return(c||t)&&(this._active=s,this._updateHoverStyles(s,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,n,r){if("mouseout"===e.type)return[];if(!n)return t;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}}function Dv(){return hf(Lv.instances,(e=>e._plugins.invalidate()))}function Iv(e,t,n,r){const i=$m(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const a=(n-t)/2,s=Math.min(a,r*t/2),o=e=>{const t=(n-Math.min(a,e))*r/2;return Yf(e,0,Math.min(a,t))};return{outerStart:o(i.outerStart),outerEnd:o(i.outerEnd),innerStart:Yf(i.innerStart,0,s),innerEnd:Yf(i.innerEnd,0,s)}}function Bv(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Fv(e,t,n,r,i,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,h=Math.max(t.outerRadius+r+n-c,0),d=u>0?u+r+n+c:0;let p=0;const f=i-l;if(r){const e=((u>0?u-r:0)+(h>0?h-r:0))/2;p=(f-(0!==e?f*e/(e+r):f))/2}const m=(f-Math.max(.001,f*h-n/Mf)/h)/2,g=l+m+p,b=i-m-p,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:w}=Iv(t,d,h,b-g),k=h-v,_=h-y,S=g+v/k,M=b-y/_,C=d+x,T=d+w,E=g+x/C,z=b-w/T;if(e.beginPath(),a){const t=(S+M)/2;if(e.arc(s,o,h,S,t),e.arc(s,o,h,t,M),y>0){const t=Bv(_,M,s,o);e.arc(t.x,t.y,y,M,b+Af)}const n=Bv(T,b,s,o);if(e.lineTo(n.x,n.y),w>0){const t=Bv(T,z,s,o);e.arc(t.x,t.y,w,b+Af,z+Math.PI)}const r=(b-w/d+(g+x/d))/2;if(e.arc(s,o,d,b-w/d,r,!0),e.arc(s,o,d,r,g+x/d,!0),x>0){const t=Bv(C,E,s,o);e.arc(t.x,t.y,x,E+Math.PI,g-Af)}const i=Bv(k,g,s,o);if(e.lineTo(i.x,i.y),v>0){const t=Bv(k,S,s,o);e.arc(t.x,t.y,v,g-Af,S)}}else{e.moveTo(s,o);const t=Math.cos(S)*h+s,n=Math.sin(S)*h+o;e.lineTo(t,n);const r=Math.cos(M)*h+s,i=Math.sin(M)*h+o;e.lineTo(r,i)}e.closePath()}function Hv(e,t,n,r,i){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:h,borderDashOffset:d,borderRadius:p}=l,f="inner"===l.borderAlign;if(!c)return;e.setLineDash(h||[]),e.lineDashOffset=d,f?(e.lineWidth=2*c,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let m=t.endAngle;if(a){Fv(e,t,n,r,m,i);for(let t=0;ti?(c=i/l,e.arc(a,s,l,n+c,r-c,!0)):e.arc(a,s,i,n+Af,r-Af),e.closePath(),e.clip()}(e,t,m),l.selfJoin&&m-s>=Mf&&0===p&&"miter"!==u&&function(e,t,n){const{startAngle:r,x:i,y:a,outerRadius:s,innerRadius:o,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,h=Math.min(c/s,Vf(r-n));if(e.beginPath(),e.arc(i,a,s-c/2,r+h/2,n-h/2),o>0){const t=Math.min(c/o,Vf(r-n));e.arc(i,a,o+c/2,n-t/2,r+t/2,!0)}else{const t=Math.min(c/2,s*Vf(r-n));if("round"===u)e.arc(i,a,t,n-Mf/2,r+Mf/2,!0);else if("bevel"===u){const s=2*t*t,o=-s*Math.cos(n+Mf/2)+i,l=-s*Math.sin(n+Mf/2)+a,c=s*Math.cos(r+Mf/2)+i,u=s*Math.sin(r+Mf/2)+a;e.lineTo(o,l),e.lineTo(c,u)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}(e,t,m),a||(Fv(e,t,n,r,m,i),e.stroke())}class qv extends Xb{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.getProps(["x","y"],n),{angle:i,distance:a}=qf(r,{x:e,y:t}),{startAngle:s,endAngle:o,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),h=(this.options.spacing+this.options.borderWidth)/2,d=lf(u,o-s),p=Wf(i,s,o)&&s!==o,f=d>=Cf||p,m=Gf(a,l+h,c+h);return f&&m}getCenterPoint(e){const{x:t,y:n,startAngle:r,endAngle:i,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:o,spacing:l}=this.options,c=(r+i)/2,u=(a+s+l+o)/2;return{x:t+Math.cos(c)*u,y:n+Math.sin(c)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:n}=this,r=(t.offset||0)/4,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>Cf?Math.floor(n/Cf):0,0===n||this.innerRadius<0||this.outerRadius<0)return;e.save();const s=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(s)*r,Math.sin(s)*r);const o=r*(1-Math.sin(Math.min(Mf,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,n,r,i){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Fv(e,t,n,r,l,i);for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:t;e.lineCap=lf(n.borderCapStyle,t.borderCapStyle),e.setLineDash(lf(n.borderDash,t.borderDash)),e.lineDashOffset=lf(n.borderDashOffset,t.borderDashOffset),e.lineJoin=lf(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=lf(n.borderWidth,t.borderWidth),e.strokeStyle=lf(n.borderColor,t.borderColor)}function Uv(e,t,n){e.lineTo(n.x,n.y)}function Vv(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=e.length,{start:i=0,end:a=r-1}=n,{start:s,end:o}=t,l=Math.max(i,s),c=Math.min(a,o),u=io&&a>o;return{count:r,start:l,loop:t.loop,ilen:c(s+(c?o-e:e))%a,y=()=>{p!==f&&(e.lineTo(g,f),e.lineTo(g,p),e.lineTo(g,m))};for(l&&(h=i[v(0)],e.moveTo(h.x,h.y)),u=0;u<=o;++u){if(h=i[v(u)],h.skip)continue;const t=h.x,n=h.y,r=0|t;r===d?(nf&&(f=n),g=(b*g+t)/++b):(y(),e.lineTo(t,n),d=r,b=0,p=f=n),m=n}y()}function Gv(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&"monotone"!==t.cubicInterpolationMode&&!t.stepped&&!n?Yv:Wv}const Qv="function"===typeof Path2D;function Xv(e,t,n,r){Qv&&!t.options.segment?function(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),$v(e,t.options),e.stroke(i)}(e,t,n,r):function(e,t,n,r){const{segments:i,options:a}=t,s=Gv(t);for(const o of i)$v(e,a,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}(e,t,n,r)}class Kv extends Xb{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;mg(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const a=!!e._loop,{start:s,end:o}=function(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;ii&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}(n,i,a,r);return Ig(e,!0===r?[{start:s,end:o,loop:a}]:function(e,t,n,r){const i=e.length,a=[];let s,o=t,l=e[t];for(s=t+1;s<=n;++s){const n=e[s%i];n.skip||n.stop?l.skip||(r=!1,a.push({start:t%i,end:(s-1)%i,loop:r}),t=o=n.stop?s:null):(o=s,l.skip&&(t=s)),l=n}return null!==o&&a.push({start:t%i,end:o%i,loop:r}),a}(n,s,o{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}};class ty extends Xb{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=uf(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter((t=>e.filter(t,this.chart.data)))),e.sort&&(t=t.sort(((t,n)=>e.sort(t,n,this.chart.data)))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const n=e.labels,r=Ym(n.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:o}=ey(n,i);let l,c;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,i,s,o)+10):(c=this.maxHeight,l=this._fitCols(a,r,s,o)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){const{ctx:i,maxWidth:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+s;let u=e;i.textAlign="left",i.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach(((e,p)=>{const f=n+t/2+i.measureText(e.text).width;(0===p||l[l.length-1]+f+2*s>a)&&(u+=c,l[l.length-(p>0?0:1)]=0,d+=c,h++),o[p]={left:0,top:d,row:h,width:f,height:r},l[l.length-1]+=f+s})),u}_fitCols(e,t,n,r){const{ctx:i,maxHeight:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-e;let u=s,h=0,d=0,p=0,f=0;return this.legendItems.forEach(((e,a)=>{const{itemWidth:m,itemHeight:g}=function(e,t,n,r,i){const a=function(e,t,n,r){let i=e.text;i&&"string"!==typeof i&&(i=i.reduce(((e,t)=>e.length>t.length?e:t)));return t+n.size/2+r.measureText(i).width}(r,e,t,n),s=function(e,t,n){let r=e;"string"!==typeof t.text&&(r=ny(t,n));return r}(i,r,t.lineHeight);return{itemWidth:a,itemHeight:s}}(n,t,i,e,r);a>0&&d+g+2*s>c&&(u+=h+s,l.push({width:h,height:d}),p+=h+s,f++,h=d=0),o[a]={left:p,top:d,col:f,width:m,height:g},h=Math.max(h,m),d+=g+s})),u+=h,l.push({width:h,height:d}),u}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:i}}=this,a=Pg(i,this.left,this.width);if(this.isHorizontal()){let i=0,s=im(n,this.left+r,this.right-this.lineWidths[i]);for(const o of t)i!==o.row&&(i=o.row,s=im(n,this.left+r,this.right-this.lineWidths[i])),o.top+=this.top+e+r,o.left=a.leftForLtr(a.x(s),o.width),s+=o.width+r}else{let i=0,s=im(n,this.top+e+r,this.bottom-this.columnSizes[i].height);for(const o of t)o.col!==i&&(i=o.col,s=im(n,this.top+e+r,this.bottom-this.columnSizes[i].height)),o.top=s,o.left+=this.left+r,o.left=a.leftForLtr(a.x(o.left),o.width),s+=o.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;Nm(e,this),this._draw(),Om(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:i,labels:a}=e,s=Mm.color,o=Pg(e.rtl,this.left,this.width),l=Ym(a.font),{padding:c}=a,u=l.size,h=u/2;let d;this.drawTitle(),r.textAlign=o.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:p,boxHeight:f,itemHeight:m}=ey(a,u),g=this.isHorizontal(),b=this._computeTitleHeight();d=g?{x:im(i,this.left+c,this.right-n[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:im(i,this.top+b+c,this.bottom-t[0].height),line:0},Ng(this.ctx,e.textDirection);const v=m+c;this.legendItems.forEach(((y,x)=>{r.strokeStyle=y.fontColor,r.fillStyle=y.fontColor;const w=r.measureText(y.text).width,k=o.textAlign(y.textAlign||(y.textAlign=a.textAlign)),_=p+h+w;let S=d.x,M=d.y;o.setWidth(this.width),g?x>0&&S+_+c>this.right&&(M=d.y+=v,d.line++,S=d.x=im(i,this.left+c,this.right-n[d.line])):x>0&&M+v>this.bottom&&(S=d.x=S+t[d.line].width+c,d.line++,M=d.y=im(i,this.top+b+c,this.bottom-t[d.line].height));if(function(e,t,n){if(isNaN(p)||p<=0||isNaN(f)||f<0)return;r.save();const i=lf(n.lineWidth,1);if(r.fillStyle=lf(n.fillStyle,s),r.lineCap=lf(n.lineCap,"butt"),r.lineDashOffset=lf(n.lineDashOffset,0),r.lineJoin=lf(n.lineJoin,"miter"),r.lineWidth=i,r.strokeStyle=lf(n.strokeStyle,s),r.setLineDash(lf(n.lineDash,[])),a.usePointStyle){const s={radius:f*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:i},l=o.xPlus(e,p/2);Am(r,s,l,t+h,a.pointStyleWidth&&p)}else{const a=t+Math.max((u-f)/2,0),s=o.leftForLtr(e,p),l=Vm(n.borderRadius);r.beginPath(),Object.values(l).some((e=>0!==e))?Bm(r,{x:s,y:a,w:p,h:f,radius:l}):r.rect(s,a,p,f),r.fill(),0!==i&&r.stroke()}r.restore()}(o.x(S),M,y),S=((e,t,n,r)=>e===(r?"left":"right")?n:"center"===e?(t+n)/2:t)(k,S+p+h,g?S+_:this.right,e.rtl),function(e,t,n){Im(r,n.text,e,t+m/2,l,{strikethrough:n.hidden,textAlign:o.textAlign(n.textAlign)})}(o.x(S),M,y),g)d.x+=_+c;else if("string"!==typeof y.text){const e=l.lineHeight;d.y+=ny(y,e)+c}else d.y+=v})),Og(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,n=Ym(t.font),r=Wm(t.padding);if(!t.display)return;const i=Pg(e.rtl,this.left,this.width),a=this.ctx,s=t.position,o=n.size/2,l=r.top+o;let c,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,u=im(e.align,u,this.right-h);else{const t=this.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);c=l+im(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const d=im(s,u,u+h);a.textAlign=i.textAlign(rm(s)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,Im(a,t.text,d,c,n)}_computeTitleHeight(){const e=this.options.title,t=Ym(e.font),n=Wm(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,i;if(Gf(e,this.left,this.right)&&Gf(t,this.top,this.bottom))for(i=this.legendHitBoxes,n=0;ne.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const l=e.controller.getStyle(n?0:void 0),c=Wm(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:i||l.textAlign,borderRadius:s&&(o||l.borderRadius),datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};new WeakMap;const iy={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;te+t))/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n,r,i,a=t.x,s=t.y,o=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n-1?e.split("\n"):e}function oy(e,t){const{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(i);return{chart:e,label:s,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:o,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function ly(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=Ym(t.bodyFont),c=Ym(t.titleFont),u=Ym(t.footerFont),h=a.length,d=i.length,p=r.length,f=Wm(t.padding);let m=f.height,g=0,b=r.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);if(b+=e.beforeBody.length+e.afterBody.length,h&&(m+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),b){m+=p*(t.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}d&&(m+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let v=0;const y=function(e){g=Math.max(g,n.measureText(e).width+v)};return n.save(),n.font=c.string,hf(e.title,y),n.font=l.string,hf(e.beforeBody.concat(e.afterBody),y),v=t.displayColors?s+2+t.boxPadding:0,hf(r,(e=>{hf(e.before,y),hf(e.lines,y),hf(e.after,y)})),v=0,n.font=u.string,hf(e.footer,y),n.restore(),g+=f.width,{width:g,height:m}}function cy(e,t,n,r){const{x:i,width:a}=n,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return"center"===r?c=i<=(o+l)/2?"left":"right":i<=a/2?c="left":i>=s-a/2&&(c="right"),function(e,t,n,r){const{x:i,width:a}=r,s=n.caretSize+n.caretPadding;return"left"===e&&i+a+s>t.width||"right"===e&&i-a-s<0||void 0}(c,e,t,n)&&(c="center"),c}function uy(e,t,n){const r=n.yAlign||t.yAlign||function(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}(e,n);return{xAlign:n.xAlign||t.xAlign||cy(e,t,n,r),yAlign:r}}function hy(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,c=i+a,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:p}=Vm(s);let f=function(e,t){let{x:n,width:r}=e;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,o);const m=function(e,t,n){let{y:r,height:i}=e;return"top"===t?r+=n:r-="bottom"===t?i+n:i/2,r}(t,l,c);return"center"===l?"left"===o?f+=c:"right"===o&&(f-=c):"left"===o?f-=Math.max(u,d)+i:"right"===o&&(f+=Math.max(h,p)+i),{x:Yf(f,0,r.width-t.width),y:Yf(m,0,r.height-t.height)}}function dy(e,t,n){const r=Wm(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function py(e){return ay([],sy(e))}function fy(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const my={beforeTitle:ef,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndexiy)();constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,i=new Gg(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=(e=this.chart.getContext(),t=this,n=this._tooltipItems,Qm(e,{tooltip:t,tooltipItems:n,type:"tooltip"})));var e,t,n}getTitle(e,t){const{callbacks:n}=t,r=gy(n,"beforeTitle",this,e),i=gy(n,"title",this,e),a=gy(n,"afterTitle",this,e);let s=[];return s=ay(s,sy(r)),s=ay(s,sy(i)),s=ay(s,sy(a)),s}getBeforeBody(e,t){return py(gy(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:n}=t,r=[];return hf(e,(e=>{const t={before:[],lines:[],after:[]},i=fy(n,e);ay(t.before,sy(gy(i,"beforeLabel",this,e))),ay(t.lines,gy(i,"label",this,e)),ay(t.after,sy(gy(i,"afterLabel",this,e))),r.push(t)})),r}getAfterBody(e,t){return py(gy(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:n}=t,r=gy(n,"beforeFooter",this,e),i=gy(n,"footer",this,e),a=gy(n,"afterFooter",this,e);let s=[];return s=ay(s,sy(r)),s=ay(s,sy(i)),s=ay(s,sy(a)),s}_createItems(e){const t=this._active,n=this.chart.data,r=[],i=[],a=[];let s,o,l=[];for(s=0,o=t.length;se.filter(t,r,i,n)))),e.itemSort&&(l=l.sort(((t,r)=>e.itemSort(t,r,n)))),hf(l,(t=>{const n=fy(e.callbacks,t);r.push(gy(n,"labelColor",this,t)),i.push(gy(n,"labelPointStyle",this,t)),a.push(gy(n,"labelTextColor",this,t))})),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=l,l}update(e,t){const n=this.options.setContext(this.getContext()),r=this._active;let i,a=[];if(r.length){const e=iy[n.position].call(this,r,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const t=this._size=ly(this,n),s=Object.assign({},e,t),o=uy(this.chart,n,s),l=hy(n,s,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,i={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){const i=this.getCaretPosition(e,n,r);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,n){const{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:s}=n,{topLeft:o,topRight:l,bottomLeft:c,bottomRight:u}=Vm(s),{x:h,y:d}=e,{width:p,height:f}=t;let m,g,b,v,y,x;return"center"===i?(y=d+f/2,"left"===r?(m=h,g=m-a,v=y+a,x=y-a):(m=h+p,g=m+a,v=y-a,x=y+a),b=m):(g="left"===r?h+Math.max(o,c)+a:"right"===r?h+p-Math.max(l,u)-a:this.caretX,"top"===i?(v=d,y=v-a,m=g-a,b=g+a):(v=d+f,y=v+a,m=g+a,b=g-a),x=v),{x1:m,x2:g,x3:b,y1:v,y2:y,y3:x}}drawTitle(e,t,n){const r=this.title,i=r.length;let a,s,o;if(i){const l=Pg(n.rtl,this.x,this.width);for(e.x=dy(this,n.titleAlign,n),t.textAlign=l.textAlign(n.titleAlign),t.textBaseline="middle",a=Ym(n.titleFont),s=n.titleSpacing,t.fillStyle=n.titleColor,t.font=a.string,o=0;o0!==e))?(e.beginPath(),e.fillStyle=i.multiKeyBackground,Bm(e,{x:t,y:p,w:l,h:o,radius:s}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),Bm(e,{x:n,y:p+1,w:l-2,h:o-2,radius:s}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,p,l,o),e.strokeRect(t,p,l,o),e.fillStyle=a.backgroundColor,e.fillRect(n,p+1,l-2,o-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){const{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:s,boxHeight:o,boxWidth:l,boxPadding:c}=n,u=Ym(n.bodyFont);let h=u.lineHeight,d=0;const p=Pg(n.rtl,this.x,this.width),f=function(n){t.fillText(n,p.x(e.x+d),e.y+h/2),e.y+=h+i},m=p.textAlign(a);let g,b,v,y,x,w,k;for(t.textAlign=a,t.textBaseline="middle",t.font=u.string,e.x=dy(this,m,n),t.fillStyle=n.bodyColor,hf(this.beforeBody,f),d=s&&"right"!==m?"center"===a?l/2+c:l+2+c:0,y=0,w=r.length;y0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){const n=iy[e.position].call(this,this._active,this._eventPosition);if(!n)return;const a=this._size=ly(this,e),s=Object.assign({},n,this._size),o=uy(t,e,s),l=hy(e,s,o,t);r._to===l.x&&i._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=Wm(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,r,t),Ng(e,t.textDirection),i.y+=a.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),Og(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const n=this._active,r=e.map((e=>{let{datasetIndex:t,index:n}=e;const r=this.chart.getDatasetMeta(t);if(!r)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:r.data[n],index:n}})),i=!df(n,r),a=this._positionChanged(r,t);(i||a)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,i=this._active||[],a=this._getActiveElements(e,i,t,n),s=this._positionChanged(a,e),o=t||!df(a,i)||s;return o&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),o}_getActiveElements(e,t,n,r){const i=this.options;if("mouseout"===e.type)return[];if(!r)return t.filter((e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)));const a=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&a.reverse(),a}_positionChanged(e,t){const{caretX:n,caretY:r,options:i}=this,a=iy[i.position].call(this,e,t);return!1!==a&&(n!==a.x||r!==a.y)}}var vy={id:"tooltip",_element:by,positioners:iy,afterInit(e,t,n){n&&(e.tooltip=new by({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:my},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function yy(e,t,n,r){const i=e.indexOf(t);if(-1===i)return((e,t,n,r)=>("string"===typeof t?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n))(e,t,n,r);return i!==e.lastIndexOf(t)?n:i}function xy(e){const t=this.getLabels();return e>=0&&e({ticks:{callback:xy}}))();constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(nf(e))return null;const n=this.getLabels();return((e,t)=>null===e?null:Yf(Math.round(e),0,t))(t=isFinite(t)&&n[t]===e?t:yy(n,e,lf(t,e),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const e=this.min,t=this.max,n=this.options.offset,r=[];let i=this.getLabels();i=0===e&&t===i.length-1?i:i.slice(e,t+1),this._valueRange=Math.max(i.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let a=e;a<=t;a++)r.push({value:a});return r}getLabelForValue(e){return xy.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!==typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function ky(e,t){const n=[],{bounds:r,step:i,min:a,max:s,precision:o,count:l,maxTicks:c,maxDigits:u,includeBounds:h}=e,d=i||1,p=c-1,{min:f,max:m}=t,g=!nf(a),b=!nf(s),v=!nf(l),y=(m-f)/(u+1);let x,w,k,_,S=Lf((m-f)/p/d)*d;if(S<1e-14&&!g&&!b)return[{value:f},{value:m}];_=Math.ceil(m/S)-Math.floor(f/S),_>p&&(S=Lf(_*S/p/d)*d),nf(o)||(x=Math.pow(10,o),S=Math.ceil(S*x)/x),"ticks"===r?(w=Math.floor(f/S)*S,k=Math.ceil(m/S)*S):(w=f,k=m),g&&b&&i&&function(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}((s-a)/i,S/1e3)?(_=Math.round(Math.min((s-a)/S,c)),S=(s-a)/_,w=a,k=s):v?(w=g?a:w,k=b?s:k,_=l-1,S=(k-w)/_):(_=(k-w)/S,_=jf(_,Math.round(_),S/1e3)?Math.round(_):Math.ceil(_));const M=Math.max(Hf(S),Hf(w));x=Math.pow(10,nf(o)?M:o),w=Math.round(w*x)/x,k=Math.round(k*x)/x;let C=0;for(g&&(h&&w!==a?(n.push({value:a}),ws)break;n.push({value:e})}return b&&h&&k!==s?n.length&&jf(n[n.length-1].value,s,_y(s,y,e))?n[n.length-1].value=s:n.push({value:s}):b&&k!==s||n.push({value:k}),n}function _y(e,t,n){let{horizontal:r,minRotation:i}=n;const a=Bf(i),s=(r?Math.sin(a):Math.cos(a))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Sy extends sv{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return nf(e)||("number"===typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this;const a=e=>r=t?r:e,s=e=>i=n?i:e;if(e){const e=Rf(r),t=Rf(i);e<0&&t<0?s(0):e>0&&t>0&&a(0)}if(r===i){let t=0===i?1:Math.abs(.05*i);s(i+t),e||a(r-t)}this.min=r,this.max=i}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:n,stepSize:r}=e;return r?(t=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=ky({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&If(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return bm(e,this.chart.options.locale,this.options.ticks.format)}}class My extends Sy{static id="linear";static defaults=(()=>({ticks:{callback:ym.formatters.numeric}}))();determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=sf(e)?e:0,this.max=sf(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,n=Bf(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ym.formatters.logarithmic;ym.formatters.numeric;const Cy={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ty=Object.keys(Cy);function Ey(e,t){return e-t}function zy(e,t){if(nf(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let s=t;return"function"===typeof r&&r(s),sf(s)||("string"===typeof r?n.parse(s,r):n.parse(s)),null===s?null:(i&&("week"!==i||!Df(a)&&!0!==a?n.startOf(s,i):n.startOf(s,"isoWeek",a)),+s)}function Ay(e,t,n,r){const i=Ty.length;for(let a=Ty.indexOf(e);a=t?n[r]:n[i]]=!0}}else e[t]=!0}function Ny(e,t,n){const r=[],i={},a=t.length;let s,o;for(0;s=0&&(t[l].major=!0);return t}(e,r,i,n):r}class Oy extends sv{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.time||(e.time={}),r=this._adapter=new db(e.adapters.date);r.init(t),bf(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:zy(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,n=e.time.unit||"day";let{min:r,max:i,minDefined:a,maxDefined:s}=this.getUserBounds();function o(e){a||isNaN(e.min)||Math.min(r,e.min),s||isNaN(e.max)||Math.max(i,e.max)}a&&s||(o(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||o(this.getMinMax(!1))),sf(r)&&!isNaN(r)?r:+t.startOf(Date.now(),n),sf(i)&&!isNaN(i)?i:+t.endOf(Date.now(),n)+1,this.min=Math.min(r,i-1),this.max=Math.max(r+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(e[0],e[e.length-1]),{min:t,max:n}}buildTicks(){const e=this.options,t=e.time,n=e.ticks,r="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const i=this.min,a=function(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)0;return r>0||i=Ty.indexOf(n);a--){const n=Ty[a];if(Cy[n].common&&e._adapter.diff(i,r,n)>=t-1)return n}return Ty[n?Ty.indexOf(n):0]}(this,a.length,t.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(e){for(let t=Ty.indexOf(e)+1,n=Ty.length;t+e.value)))}initOffsets(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=0,i=0;this.options.offset&&n.length&&(this.getDecimalForValue(n[0]),1===n.length?1-e:(this.getDecimalForValue(n[1])-e)/2,this.getDecimalForValue(n[n.length-1]),1===n.length?t:(t-this.getDecimalForValue(n[n.length-2]))/2);const a=n.length<3?.5:.25;Yf(r,0,a),Yf(i,0,a),this._offsets={start:r,end:i,factor:1/(r+1+i)}}_generate(){const e=this._adapter,t=this.min,n=this.max,r=this.options,i=r.time,a=i.unit||Ay(i.minUnit,t,n,this._getLabelCapacity(t)),s=lf(r.ticks.stepSize,1),o="week"===a&&i.isoWeekday,l=Df(o)||!0===o,c={};let u,h,d=t;if(l&&+e.startOf(d,"isoWeek",o),+e.startOf(d,l?"day":a),e.diff(n,t,a)>1e5*s)throw new Error(t+" and "+n+" are too far apart with stepSize of "+s+" "+a);const p="data"===r.ticks.source&&this.getDataTimestamps();for(0;u+e))}getLabelForValue(e){const t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){const n=this.options.time.displayFormats,r=this._unit,i=t||n[r];return this._adapter.format(e,i)}_tickFormatFunction(e,t,n,r){const i=this.options,a=i.ticks.callback;if(a)return uf(a,[e,t,n],this);const s=i.time.displayFormats,o=this._unit,l=this._majorUnit,c=o&&s[o],u=l&&s[l],h=n[t],d=l&&u&&h&&h.major;return this._adapter.format(e,r||(d?u:c))}generateTickLabels(e){let t,n,r;for(e.length;t0?s:1}getDataTimestamps(){let e,t,n=this._cache.data||[];if(n.length)return n;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(r.length;e2&&void 0!==arguments[2]?arguments[2]:Ry;const r=[];e.datasets=t.map((t=>{const i=e.datasets.find((e=>e[n]===t[n]));return i&&t.data&&!r.includes(i)?(r.push(i),Object.assign(i,t),i):{...t}}))}function Iy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ry;const n={labels:[],datasets:[]};return Ly(n,e.labels),Dy(n,e.datasets,t),n}function By(e,t){const{height:n=150,width:i=300,redraw:a=!1,datasetIdKey:s,type:o,data:l,options:c,plugins:u=[],fallbackContent:h,updateMode:d,...p}=e,f=(0,r.useRef)(null),m=(0,r.useRef)(null),g=()=>{f.current&&(m.current=new Lv(f.current,{type:o,data:Iy(l,s),options:c&&{...c},plugins:u}),jy(t,m.current))},b=()=>{jy(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,r.useEffect)((()=>{!a&&m.current&&c&&function(e,t){const n=e.options;n&&t&&Object.assign(n,t)}(m.current,c)}),[a,c]),(0,r.useEffect)((()=>{!a&&m.current&&Ly(m.current.config.data,l.labels)}),[a,l.labels]),(0,r.useEffect)((()=>{!a&&m.current&&l.datasets&&Dy(m.current.config.data,l.datasets,s)}),[a,l.datasets]),(0,r.useEffect)((()=>{m.current&&(a?(b(),setTimeout(g)):m.current.update(d))}),[a,c,l.labels,l.datasets,d]),(0,r.useEffect)((()=>{m.current&&(b(),setTimeout(g))}),[o]),(0,r.useEffect)((()=>(g(),()=>b())),[]),r.createElement("canvas",{ref:f,role:"img",height:n,width:i,...p},h)}const Fy=(0,r.forwardRef)(By);function Hy(e,t){return Lv.register(t),(0,r.forwardRef)(((t,n)=>r.createElement(Fy,{...t,ref:n,type:e})))}const qy=Hy("line",lb),$y=Hy("pie",cb);Lv.register(qv,vy,ry,wy,My,Zv,Kv);const Uy=["Conceptual Error","Calculation Error","Inattention","Algebra Slip","Sign Error","Other"],Vy={Precalculus:["Functions","Limits","Trigonometry"],Calculus:["Derivatives","Integrals","Series"],Geometry:["Triangles","Circles","3-D Shapes"]};function Wy(e,t){return+(Math.random()*(t-e)+e).toFixed(1)}function Yy(e){const t={labels:Uy,datasets:[{data:Uy.map((()=>Wy(8,22))),backgroundColor:["#FF6384","#36A2EB","#FFCE56","#4BC0C0","#9966FF","#FF9F40"]}]},n={labels:["Jan","Feb","Mar"],datasets:Uy.map(((e,n)=>({label:Uy[n],data:Array(3).fill(0).map((()=>Wy(5,18))),fill:!1,borderColor:t.datasets[0].backgroundColor[n],tension:.3})))},r=Array.from({length:15},((e,t)=>{const n=Wy(50,100),r=Wy(5,25),i=Uy.map((()=>Wy(0,15)));return{student:`Student ${t+1}`,progression:n,globalError:r,conceptual:i[0],calculation:i[1],inattention:i[2],algebraSlip:i[3],signError:i[4],other:i[5]}}));return{title:e,pie:t,line:n,table:r}}const Gy={Precalculus:Yy("Precalculus"),Calculus:Yy("Calculus"),Geometry:Yy("Geometry")};function Qy(){const e=Object.entries(Gy),[t,n]=(0,r.useState)(null),[i,a]=(0,r.useState)({}),[s,o]=(0,r.useState)({}),[l,c]=(0,r.useState)({}),u=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e>=75?dp:pp:e>=15?fp:dp},h=(e,t,n)=>{c((r=>({...r,[e]:{...r[e],[t]:n}})))};return(0,xn.jsxs)("div",{className:Kd,children:[(0,xn.jsxs)("header",{className:Jd,children:[(0,xn.jsxs)("div",{className:Zd,children:[(0,xn.jsx)("span",{className:ep,children:"\ud83d\udcc6"}),(0,xn.jsx)("span",{className:tp,children:"3"}),(0,xn.jsx)("span",{className:np,children:"Lesson Plans"})]}),(0,xn.jsxs)("div",{className:Zd,children:[(0,xn.jsx)("span",{className:ep,children:"\ud83c\udf93"}),(0,xn.jsx)("span",{className:tp,children:e.length}),(0,xn.jsx)("span",{className:np,children:"Nb of classes"})]}),(0,xn.jsxs)("div",{className:Zd,children:[(0,xn.jsx)("span",{className:ep,children:"\ud83d\udcc8"}),(0,xn.jsx)("span",{className:tp,children:"+12%"}),(0,xn.jsx)("span",{className:np,children:"Progress last week"})]}),(0,xn.jsxs)("div",{className:Zd,children:[(0,xn.jsx)("span",{className:ep,children:"\u2705"}),(0,xn.jsx)("span",{className:tp,children:"8%"}),(0,xn.jsx)("span",{className:np,children:"Mistakes reduced"})]}),(0,xn.jsxs)("div",{className:Zd,children:[(0,xn.jsx)("span",{className:ep,children:"\ud83d\udcdd"}),(0,xn.jsx)("span",{className:tp,children:"42"}),(0,xn.jsx)("span",{className:np,children:"Practice sessions"})]})]}),(0,xn.jsx)("div",{className:rp,children:e.map((e=>{let[r,c]=e;const d=t===r,p=i[r],f=s[r],m=l[r]||{};return(0,xn.jsxs)("div",{className:ip,children:[(0,xn.jsxs)("button",{className:ap,onClick:()=>n(d?null:r),children:[c.title,(0,xn.jsx)("span",{className:sp,children:d?"\u25b2":"\u25bc"})]}),d&&(0,xn.jsxs)("div",{className:op,children:[(0,xn.jsxs)("div",{className:lp,children:[(0,xn.jsx)("h4",{children:"Error Distribution"}),(0,xn.jsx)($y,{data:c.pie})]}),(0,xn.jsxs)("div",{className:lp,children:[(0,xn.jsx)("h4",{children:"Error Trends"}),(0,xn.jsx)(qy,{data:c.line})]}),(0,xn.jsxs)("div",{className:cp,children:[(0,xn.jsx)("h4",{children:"Class Details"}),(0,xn.jsx)("div",{className:up,children:(0,xn.jsxs)("table",{className:hp,children:[(0,xn.jsx)("thead",{children:(0,xn.jsxs)("tr",{children:[(0,xn.jsx)("th",{children:"Student"}),(0,xn.jsx)("th",{children:"Progress"}),(0,xn.jsx)("th",{children:"Global Err"}),Uy.map((e=>(0,xn.jsx)("th",{children:e},e)))]})}),(0,xn.jsx)("tbody",{children:c.table.slice(0,p?c.table.length:5).map(((e,t)=>(0,xn.jsxs)("tr",{children:[(0,xn.jsx)("td",{children:e.student}),(0,xn.jsxs)("td",{className:u(e.progression,!0),children:[e.progression,"%"]}),(0,xn.jsxs)("td",{className:u(e.globalError),children:[e.globalError,"%"]}),Uy.map(((t,n)=>{const r=Object.values(e)[n+3];return(0,xn.jsxs)("td",{className:u(r),children:[r,"%"]},n)}))]},t)))})]})}),(0,xn.jsx)("button",{className:mp,onClick:()=>a((e=>({...e,[r]:!e[r]}))),children:p?"Show less \u25b2":"Show more \u25bc"}),(0,xn.jsxs)("div",{className:gp,children:[(0,xn.jsxs)("div",{className:bp,onClick:()=>o((e=>({...e,[r]:!e[r]}))),children:[(0,xn.jsx)("span",{children:"Generate Exam"}),(0,xn.jsx)("span",{className:sp,children:f?"\u25b2":"\u25bc"})]}),f&&(0,xn.jsxs)("div",{className:vp,children:[(0,xn.jsxs)("div",{className:yp,children:[(0,xn.jsx)("label",{htmlFor:`topic-${r}`,children:"Topic"}),(0,xn.jsxs)("select",{id:`topic-${r}`,value:m.topic||"",onChange:e=>h(r,"topic",e.target.value),children:[(0,xn.jsx)("option",{value:"",disabled:!0,children:"Select a topic"}),Vy[r].map((e=>(0,xn.jsx)("option",{value:e,children:e},e)))]})]}),(0,xn.jsxs)("div",{className:yp,children:[(0,xn.jsx)("label",{htmlFor:`obj-${r}`,children:"Objective"}),(0,xn.jsxs)("select",{id:`obj-${r}`,value:m.obj||"",onChange:e=>h(r,"obj",e.target.value),children:[(0,xn.jsx)("option",{value:"",disabled:!0,children:"Select objective"}),(0,xn.jsx)("option",{children:"Homework"}),(0,xn.jsx)("option",{children:"Test Prep"}),(0,xn.jsx)("option",{children:"Exam"})]})]}),(0,xn.jsxs)("div",{className:yp,children:[(0,xn.jsx)("label",{htmlFor:`count-${r}`,children:"# Questions"}),(0,xn.jsx)("input",{id:`count-${r}`,type:"number",min:1,value:m.count||10,onChange:e=>h(r,"count",e.target.value)})]}),(0,xn.jsxs)("div",{className:yp,children:[(0,xn.jsx)("label",{htmlFor:`count-${r}`,children:"# Mean duration"}),(0,xn.jsx)("input",{id:`count-${r}`,type:"number",min:1,value:m.count||60,onChange:e=>h(r,"count",e.target.value)})]}),(0,xn.jsx)("button",{className:xp,children:"Generate"})]})]})]})]})]},r)}))})]})}const Xy="Sidebar_sidebar__Pr5sH",Ky="Sidebar_nav__-0TQY",Jy="Sidebar_navItem__MWYat",Zy="Sidebar_activeNavItem__RwKGz",ex="Sidebar_rightItems__RBxIn",tx="Sidebar_switch__O7v0-",nx="Sidebar_slider__6qorU",rx="Sidebar_profileWrapper__ce3L4",ix="Sidebar_profileIcon__cwxkF",ax="Sidebar_profileMenu__gYQ9-",sx="Sidebar_profileEmail__YAaAb",ox="Sidebar_logoutButton__0dNYU",lx="Sidebar_logoutIcon__QrE1H";function cx(e){let{navItems:t,isDark:n,setIsDark:r}=e;const{user:i,logout:a}=_n();return(0,xn.jsxs)("aside",{className:Xy,children:[(0,xn.jsx)("nav",{className:Ky,children:t.map((e=>(0,xn.jsx)(Z,{to:e.route,className:e=>{let{isActive:t}=e;return t?`${Jy} ${Zy}`:Jy},children:e.label},e.label)))}),(0,xn.jsxs)("div",{className:ex,children:[(0,xn.jsxs)("label",{className:tx,children:[(0,xn.jsx)("input",{type:"checkbox",checked:n,onChange:()=>r(!n)}),(0,xn.jsx)("span",{className:nx})]}),i&&(0,xn.jsxs)("div",{className:rx,tabIndex:0,children:[(0,xn.jsx)(Hh,{size:26,className:ix}),(0,xn.jsxs)("div",{className:ax,children:[(0,xn.jsx)("span",{className:sx,children:i.email}),(0,xn.jsxs)("button",{className:ox,onClick:a,children:[(0,xn.jsx)(Ih,{className:lx}),"Logout"]})]})]})]})]})}const ux="App_appWrapper__rwrNw",hx="App_sidebarContainer__g3Ute",dx="App_mainRouter__21yZl";const px=function(){const[e,t]=(0,r.useState)((()=>"dark"===localStorage.getItem("theme")));return(0,r.useEffect)((()=>{document.body.classList.toggle("dark-theme",e),localStorage.setItem("theme",e?"dark":"light")}),[e]),(0,xn.jsx)(Sn,{children:(0,xn.jsx)(K,{children:(0,xn.jsx)("div",{className:ux,children:(0,xn.jsxs)(V,{children:[(0,xn.jsx)($,{path:"/signin",element:(0,xn.jsx)(Un,{})}),(0,xn.jsx)($,{path:"/signup",element:(0,xn.jsx)(Vn,{})}),(0,xn.jsx)($,{path:"/*",element:(0,xn.jsxs)(Mn,{children:[(0,xn.jsx)("div",{className:hx,children:(0,xn.jsx)(cx,{navItems:[{label:"Home",route:"/"},{label:"My Courses",route:"/courses"},{label:"Cheatsheets",route:"/course/cheatsheet"},{label:"Practice",route:"/practice/settings"},{label:"Profile",route:"/profile"}],isDark:e,setIsDark:t})}),(0,xn.jsx)("div",{className:dx,children:(0,xn.jsxs)(V,{children:[(0,xn.jsx)($,{index:!0,element:(0,xn.jsx)(Fr,{})}),(0,xn.jsx)($,{path:"courses",element:(0,xn.jsx)(Gr,{})}),(0,xn.jsx)($,{path:"course/add",element:(0,xn.jsx)(ii,{})}),(0,xn.jsx)($,{path:"courses/session",element:(0,xn.jsx)(yi,{})}),(0,xn.jsx)($,{path:"course/learn",element:(0,xn.jsx)(Xa,{})}),(0,xn.jsx)($,{path:"course/cheatsheet",element:(0,xn.jsx)(dh,{})}),(0,xn.jsx)($,{path:"practice",element:(0,xn.jsx)(Wh,{})}),(0,xn.jsx)($,{path:"practice/settings",element:(0,xn.jsx)(md,{})}),(0,xn.jsx)($,{path:"upload-image",element:(0,xn.jsx)(kd,{})}),(0,xn.jsx)($,{path:"upload-webhandwriting",element:(0,xn.jsx)(Xd,{})}),(0,xn.jsx)($,{path:"teacher/dashboard",element:(0,xn.jsx)(Qy,{})})]})})]})})]})})})})};i.createRoot(document.getElementById("root")).render((0,xn.jsx)(r.StrictMode,{children:(0,xn.jsx)(px,{})}))})()})(); //# sourceMappingURL=main.8f89236b.js.map