defuddle 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -2
- package/dist/index.full.d.ts +3 -0
- package/dist/index.full.js +1 -0
- package/dist/index.js +1 -1
- package/dist/math.base.d.ts +9 -0
- package/dist/math.core.d.ts +7 -0
- package/dist/math.d.ts +2 -14
- package/dist/math.full.d.ts +8 -0
- package/package.json +21 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Defuddle=t():e.Defuddle=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={315:function(e,t,r){"use strict";var n,a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),i=0;i<r.length;i++)"default"!==r[i]&&a(t,e,r[i]);return o(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.mathStandardizationRules=t.createCleanMathEl=t.isBlockDisplay=t.getLatexFromElement=t.getMathMLFromElement=void 0;const s=r(354),l=i(r(914));t.getMathMLFromElement=e=>{if("math"===e.tagName.toLowerCase()){const t="block"===e.getAttribute("display");return{mathml:e.outerHTML,latex:e.getAttribute("alttext")||null,isBlock:t}}const t=e.getAttribute("data-mathml");if(t){const e=document.createElement("div");e.innerHTML=t;const r=e.querySelector("math");if(r){const e="block"===r.getAttribute("display");return{mathml:r.outerHTML,latex:r.getAttribute("alttext")||null,isBlock:e}}}const r=e.querySelector(".MJX_Assistive_MathML, mjx-assistive-mml");if(r){const e=r.querySelector("math");if(e){const t=e.getAttribute("display"),n=r.getAttribute("display"),a="block"===t||"block"===n;return{mathml:e.outerHTML,latex:e.getAttribute("alttext")||null,isBlock:a}}}const n=e.querySelector(".katex-mathml math");return n?{mathml:n.outerHTML,latex:null,isBlock:!1}:null},t.getLatexFromElement=e=>{var r,n,a;const o=e.getAttribute("data-latex");if(o)return o;if(e instanceof HTMLImageElement&&e.classList.contains("latex")){const t=e.getAttribute("alt");if(t)return t;const r=e.getAttribute("src");if(r){const e=r.match(/latex\.php\?latex=([^&]+)/);if(e)return decodeURIComponent(e[1]).replace(/\+/g," ").replace(/%5C/g,"\\")}}const i=e.querySelector('annotation[encoding="application/x-tex"]');if(null==i?void 0:i.textContent)return i.textContent.trim();if(e.matches(".katex")){const t=e.querySelector('.katex-mathml annotation[encoding="application/x-tex"]');if(null==t?void 0:t.textContent)return t.textContent.trim()}if(e.matches('script[type="math/tex"]')||e.matches('script[type="math/tex; mode=display"]'))return(null===(r=e.textContent)||void 0===r?void 0:r.trim())||null;if(e.parentElement){const t=e.parentElement.querySelector('script[type="math/tex"], script[type="math/tex; mode=display"]');if(t)return(null===(n=t.textContent)||void 0===n?void 0:n.trim())||null}const l=(0,t.getMathMLFromElement)(e);if(null==l?void 0:l.mathml)try{return s.MathMLToLaTeX.convert(l.mathml)}catch(e){return console.error("Error converting MathML to LaTeX:",e),null}return e.getAttribute("alt")||(null===(a=e.textContent)||void 0===a?void 0:a.trim())||null},t.isBlockDisplay=e=>{if("block"===e.getAttribute("display"))return!0;const t=e.className.toLowerCase();if(t.includes("display")||t.includes("block"))return!0;if(e.closest('.katex-display, .MathJax_Display, [data-display="block"]'))return!0;const r=e.previousElementSibling;if("p"===(null==r?void 0:r.tagName.toLowerCase()))return!0;if(e.matches(".mwe-math-fallback-image-display"))return!0;if(e.matches(".katex"))return null!==e.closest(".katex-display");if(e.hasAttribute("display"))return"true"===e.getAttribute("display");if(e.matches('script[type="math/tex; mode=display"]'))return!0;if(e.hasAttribute("display"))return"true"===e.getAttribute("display");const n=e.closest("[display]");return!!n&&"true"===n.getAttribute("display")},t.createCleanMathEl=(e,t,r)=>{const n=document.createElement("math");if(n.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n.setAttribute("display",r?"block":"inline"),n.setAttribute("data-latex",t||""),null==e?void 0:e.mathml){const t=document.createElement("div");t.innerHTML=e.mathml;const r=t.querySelector("math");r&&(n.innerHTML=r.innerHTML)}else if(t)try{const e=l.renderToString(t,{displayMode:r,throwOnError:!1});if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e;const r=t.querySelector("math");r?(Array.from(r.attributes).forEach((e=>{"display"!==e.name&&n.setAttribute(e.name,e.value)})),n.innerHTML=r.innerHTML):n.innerHTML=e}else n.textContent=t}catch(e){console.error("Error converting LaTeX to MathML:",e),n.textContent=t}return n},t.mathStandardizationRules=[{selector:['img.latex[src*="latex.php"]',"span.MathJax","mjx-container",'script[type="math/tex"]','script[type="math/tex; mode=display"]','.MathJax_Preview + script[type="math/tex"]',".MathJax_Display",".MathJax_SVG",".MathJax_MathML",".mwe-math-element",".mwe-math-fallback-image-inline",".mwe-math-fallback-image-display",".mwe-math-mathml-inline",".mwe-math-mathml-display",".katex",".katex-display",".katex-mathml",".katex-html","[data-katex]",'script[type="math/katex"]',"math","[data-math]","[data-latex]","[data-tex]",'script[type^="math/"]','annotation[encoding="application/x-tex"]'].join(","),element:"math",transform:e=>{if(!(e instanceof HTMLElement))return e;const r=(0,t.getMathMLFromElement)(e),n=(0,t.getLatexFromElement)(e),a=(0,t.isBlockDisplay)(e),o=(0,t.createCleanMathEl)(r,n,a);return e.parentElement&&e.parentElement.querySelectorAll('\n\t\t\t\t\t/* MathJax scripts and previews */\n\t\t\t\t\tscript[type^="math/"],\n\t\t\t\t\t.MathJax_Preview,\n\n\t\t\t\t\t/* External math library scripts */\n\t\t\t\t\tscript[type="text/javascript"][src*="mathjax"],\n\t\t\t\t\tscript[type="text/javascript"][src*="katex"]\n\t\t\t\t').forEach((e=>e.remove())),o}}]},354:function(e){var t;t=()=>(()=>{var e={4582:(e,t)=>{"use strict";function r(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var n=r({HTML:"text/html",isHTML:function(e){return e===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.find=function(e,t,r){if(void 0===r&&(r=Array.prototype),e&&"function"==typeof r.find)return r.find.call(e,t);for(var n=0;n<e.length;n++)if(Object.prototype.hasOwnProperty.call(e,n)){var a=e[n];if(t.call(void 0,a,n,e))return a}},t.freeze=r,t.MIME_TYPE=n,t.NAMESPACE=a},5752:(e,t,r)=>{var n=r(4582),a=r(4722),o=r(6559),i=r(4466),s=a.DOMImplementation,l=n.NAMESPACE,c=i.ParseError,u=i.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function p(e){this.options=e||{locator:{}}}function m(){this.cdata=!1}function h(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function f(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function x(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}p.prototype.parseFromString=function(e,t){var r=this.options,n=new u,a=r.domBuilder||new m,i=r.errorHandler,s=r.locator,c=r.xmlns||{},p=/\/x?html?$/.test(t),h=p?o.HTML_ENTITIES:o.XML_ENTITIES;s&&a.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof m)return t;e=t}var n={},a=e instanceof Function;function o(t){var o=e[t];!o&&a&&(o=2==e.length?function(r){e(t,r)}:e),n[t]=o&&function(e){o("[xmldom "+t+"]\t"+e+f(r))}||function(){}}return r=r||{},o("warning"),o("error"),o("fatalError"),n}(i,a,s),n.domBuilder=r.domBuilder||a,p&&(c[""]=l.HTML),c.xml=c.xml||l.XML;var g=r.normalizeLineEndings||d;return e&&"string"==typeof e?n.parse(g(e),c,h):n.errorHandler.error("invalid doc source"),a.doc},m.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var a=this.doc,o=a.createElementNS(e,r||t),i=n.length;x(this,o),this.currentElement=o,this.locator&&h(this.locator,o);for(var s=0;s<i;s++){e=n.getURI(s);var l=n.getValue(s),c=(r=n.getQName(s),a.createAttributeNS(e,r));this.locator&&h(n.getLocator(s),c),c.value=c.nodeValue=l,o.setAttributeNode(c)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&h(this.locator,r),x(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=g.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&h(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=g.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&h(this.locator,n),x(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var a=n.createDocumentType(e,t,r);this.locator&&h(this.locator,a),x(this,a),this.doc.doctype=a}},warning:function(e){console.warn("[xmldom warning]\t"+e,f(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,f(this.locator))},fatalError:function(e){throw new c(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){m.prototype[e]=function(){return null}})),t.DOMParser=p},4722:(e,t,r)=>{var n=r(4582),a=n.find,o=n.NAMESPACE;function i(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function l(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(i):[]}(e);return Object.keys(t.reduce(s,{}))}function c(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function u(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,c(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),r.constructor=e)}var d={},p=d.ELEMENT_NODE=1,m=d.ATTRIBUTE_NODE=2,h=d.TEXT_NODE=3,f=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,x=d.ENTITY_NODE=6,b=d.PROCESSING_INSTRUCTION_NODE=7,w=d.COMMENT_NODE=8,y=d.DOCUMENT_NODE=9,v=d.DOCUMENT_TYPE_NODE=10,A=d.DOCUMENT_FRAGMENT_NODE=11,E=d.NOTATION_NODE=12,_={},C={},q=(_.INDEX_SIZE_ERR=(C[1]="Index size error",1),_.DOMSTRING_SIZE_ERR=(C[2]="DOMString size error",2),_.HIERARCHY_REQUEST_ERR=(C[3]="Hierarchy request error",3)),T=(_.WRONG_DOCUMENT_ERR=(C[4]="Wrong document",4),_.INVALID_CHARACTER_ERR=(C[5]="Invalid character",5),_.NO_DATA_ALLOWED_ERR=(C[6]="No data allowed",6),_.NO_MODIFICATION_ALLOWED_ERR=(C[7]="No modification allowed",7),_.NOT_FOUND_ERR=(C[8]="Not found",8)),k=(_.NOT_SUPPORTED_ERR=(C[9]="Not supported",9),_.INUSE_ATTRIBUTE_ERR=(C[10]="Attribute in use",10));function S(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,C[e]),this.message=C[e],Error.captureStackTrace&&Error.captureStackTrace(this,S);return r.code=e,t&&(this.message=this.message+": "+t),r}function N(){}function L(e,t){this._node=e,this._refresh=t,O(this)}function O(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var r=e._refresh(e._node);if(be(e,"length",r.length),!e.$$length||r.length<e.$$length)for(var n=r.length;n in e;n++)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n];c(r,e),e._inc=t}}function M(){}function D(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function B(e,t,r,n){if(n?t[D(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var a=e.ownerDocument;a&&(n&&z(a,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===o.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(a,e,r))}}function F(e,t,r){var n=D(t,r);if(!(n>=0))throw new S(T,new Error(e.tagName+"@"+r));for(var a=t.length-1;n<a;)t[n]=t[++n];if(t.length=a,e){var o=e.ownerDocument;o&&(z(o,e,r),r.ownerElement=null)}}function $(){}function I(){}function P(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function R(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(R(e,t))return!0}while(e=e.nextSibling)}function j(){this.ownerDocument=this}function z(e,t,r,n){e&&e._inc++,r.namespaceURI===o.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function U(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var a=t.firstChild,o=0;a;)n[o++]=a,a=a.nextSibling;n.length=o,delete n[n.length]}}}function G(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,U(e.ownerDocument,e),t}function H(e){return e&&e.nodeType===I.DOCUMENT_TYPE_NODE}function V(e){return e&&e.nodeType===I.ELEMENT_NODE}function W(e){return e&&e.nodeType===I.TEXT_NODE}function X(e,t){var r=e.childNodes||[];if(a(r,V)||H(t))return!1;var n=a(r,H);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function Z(e,t){var r=e.childNodes||[];if(a(r,(function(e){return V(e)&&e!==t})))return!1;var n=a(r,H);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function Y(e,t,r){var n=e.childNodes||[],o=t.childNodes||[];if(t.nodeType===I.DOCUMENT_FRAGMENT_NODE){var i=o.filter(V);if(i.length>1||a(o,W))throw new S(q,"More than one element or text in fragment");if(1===i.length&&!X(e,r))throw new S(q,"Element in fragment can not be inserted before doctype")}if(V(t)&&!X(e,r))throw new S(q,"Only one element can be added and only after doctype");if(H(t)){if(a(n,H))throw new S(q,"Only one doctype is allowed");var s=a(n,V);if(r&&n.indexOf(s)<n.indexOf(r))throw new S(q,"Doctype can only be inserted before an element");if(!r&&s)throw new S(q,"Doctype can not be appended since element is present")}}function J(e,t,r){var n=e.childNodes||[],o=t.childNodes||[];if(t.nodeType===I.DOCUMENT_FRAGMENT_NODE){var i=o.filter(V);if(i.length>1||a(o,W))throw new S(q,"More than one element or text in fragment");if(1===i.length&&!Z(e,r))throw new S(q,"Element in fragment can not be inserted before doctype")}if(V(t)&&!Z(e,r))throw new S(q,"Only one element can be added and only after doctype");if(H(t)){if(a(n,(function(e){return H(e)&&e!==r})))throw new S(q,"Only one doctype is allowed");var s=a(n,V);if(r&&n.indexOf(s)<n.indexOf(r))throw new S(q,"Doctype can only be inserted before an element")}}function K(e,t,r,n){(function(e,t,r){if(!function(e){return e&&(e.nodeType===I.DOCUMENT_NODE||e.nodeType===I.DOCUMENT_FRAGMENT_NODE||e.nodeType===I.ELEMENT_NODE)}(e))throw new S(q,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new S(T,"child not in parent");if(!function(e){return e&&(V(e)||W(e)||H(e)||e.nodeType===I.DOCUMENT_FRAGMENT_NODE||e.nodeType===I.COMMENT_NODE||e.nodeType===I.PROCESSING_INSTRUCTION_NODE)}(t)||H(t)&&e.nodeType!==I.DOCUMENT_NODE)throw new S(q,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)})(e,t,r),e.nodeType===I.DOCUMENT_NODE&&(n||Y)(e,t,r);var a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===A){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=i:r.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return U(e.ownerDocument||e,e),t.nodeType==A&&(t.firstChild=t.lastChild=null),t}function Q(){this._nsMap={}}function ee(){}function te(){}function re(){}function ne(){}function ae(){}function oe(){}function ie(){}function se(){}function le(){}function ce(){}function ue(){}function de(){}function pe(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,a=n.prefix,o=n.namespaceURI;if(o&&null==a&&null==(a=n.lookupPrefix(o)))var i=[{namespace:o,prefix:null}];return fe(this,r,e,t,i),r.join("")}function me(e,t,r){var n=e.prefix||"",a=e.namespaceURI;if(!a)return!1;if("xml"===n&&a===o.XML||a===o.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==a}return!0}function he(e,t,r){e.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,P),'"')}function fe(e,t,r,n,a){if(a||(a=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var i=e.attributes,s=i.length,l=e.firstChild,c=e.tagName,u=c;if(!(r=o.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var d,x=0;x<i.length;x++)if("xmlns"===i.item(x).name){d=i.item(x).value;break}if(!d)for(var E=a.length-1;E>=0;E--)if(""===(_=a[E]).prefix&&_.namespace===e.namespaceURI){d=_.namespace;break}if(d!==e.namespaceURI)for(E=a.length-1;E>=0;E--){var _;if((_=a[E]).namespace===e.namespaceURI){_.prefix&&(u=_.prefix+":"+c);break}}}t.push("<",u);for(var C=0;C<s;C++)"xmlns"==(q=i.item(C)).prefix?a.push({prefix:q.localName,namespace:q.value}):"xmlns"==q.nodeName&&a.push({prefix:"",namespace:q.value});for(C=0;C<s;C++){var q,T,k;me(q=i.item(C),0,a)&&(he(t,(T=q.prefix||"")?"xmlns:"+T:"xmlns",k=q.namespaceURI),a.push({prefix:T,namespace:k})),fe(q,t,r,n,a)}if(c===u&&me(e,0,a)&&(he(t,(T=e.prefix||"")?"xmlns:"+T:"xmlns",k=e.namespaceURI),a.push({prefix:T,namespace:k})),l||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),r&&/^script$/i.test(c))for(;l;)l.data?t.push(l.data):fe(l,t,r,n,a.slice()),l=l.nextSibling;else for(;l;)fe(l,t,r,n,a.slice()),l=l.nextSibling;t.push("</",u,">")}else t.push("/>");return;case y:case A:for(l=e.firstChild;l;)fe(l,t,r,n,a.slice()),l=l.nextSibling;return;case m:return he(t,e.name,e.value);case h:return t.push(e.data.replace(/[<&>]/g,P));case f:return t.push("<![CDATA[",e.data,"]]>");case w:return t.push("\x3c!--",e.data,"--\x3e");case v:var S=e.publicId,N=e.systemId;if(t.push("<!DOCTYPE ",e.name),S)t.push(" PUBLIC ",S),N&&"."!=N&&t.push(" ",N),t.push(">");else if(N&&"."!=N)t.push(" SYSTEM ",N,">");else{var L=e.internalSubset;L&&t.push(" [",L,"]"),t.push(">")}return;case b:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ge(e,t,r){var n;switch(t.nodeType){case p:(n=t.cloneNode(!1)).ownerDocument=e;case A:break;case m:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var a=t.firstChild;a;)n.appendChild(ge(e,a,r)),a=a.nextSibling;return n}function xe(e,t,r){var n=new t.constructor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var o=t[a];"object"!=typeof o&&o!=n[a]&&(n[a]=o)}switch(t.childNodes&&(n.childNodes=new N),n.ownerDocument=e,n.nodeType){case p:var i=t.attributes,s=n.attributes=new M,l=i.length;s._ownerElement=n;for(var c=0;c<l;c++)n.setAttributeNode(xe(e,i.item(c),!0));break;case m:r=!0}if(r)for(var u=t.firstChild;u;)n.appendChild(xe(e,u,r)),u=u.nextSibling;return n}function be(e,t,r){e[t]=r}_.INVALID_STATE_ERR=(C[11]="Invalid state",11),_.SYNTAX_ERR=(C[12]="Syntax error",12),_.INVALID_MODIFICATION_ERR=(C[13]="Invalid modification",13),_.NAMESPACE_ERR=(C[14]="Invalid namespace",14),_.INVALID_ACCESS_ERR=(C[15]="Invalid access",15),S.prototype=Error.prototype,c(_,S),N.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)fe(this[n],r,e,t);return r.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},L.prototype.item=function(e){return O(this),this[e]||null},u(L,N),M.prototype={length:0,item:N.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new S(k);var r=this.getNamedItem(e.nodeName);return B(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new S(k);return t=this.getNamedItemNS(e.namespaceURI,e.localName),B(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return F(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return F(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},$.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var n=new j;if(n.implementation=this,n.childNodes=new N,n.doctype=r||null,r&&n.appendChild(r),t){var a=n.createElementNS(e,t);n.appendChild(a)}return n},createDocumentType:function(e,t,r){var n=new oe;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},I.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return K(this,e,t)},replaceChild:function(e,t){K(this,e,t,J),t&&this.removeChild(t)},removeChild:function(e){return G(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return xe(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==h&&e.nodeType==h?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&r[n]===e)return n;t=t.nodeType==m?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];t=t.nodeType==m?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},c(d,I),c(d,I.prototype),j.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==A){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return K(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===p&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),G(this,e)},replaceChild:function(e,t){K(this,e,t,J),e.ownerDocument=this,t&&this.removeChild(t),V(e)&&(this.documentElement=e)},importNode:function(e,t){return ge(this,e,t)},getElementById:function(e){var t=null;return R(this.documentElement,(function(r){if(r.nodeType==p&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=l(e);return new L(this,(function(r){var n=[];return t.length>0&&R(r.documentElement,(function(a){if(a!==r&&a.nodeType===p){var o=a.getAttribute("class");if(o){var i=e===o;if(!i){var s=l(o);i=t.every((c=s,function(e){return c&&-1!==c.indexOf(e)}))}i&&n.push(a)}}var c})),n}))},createElement:function(e){var t=new Q;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new N,(t.attributes=new M)._ownerElement=t,t},createDocumentFragment:function(){var e=new ce;return e.ownerDocument=this,e.childNodes=new N,e},createTextNode:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new ue;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new ee;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new Q,n=t.split(":"),a=r.attributes=new M;return r.childNodes=new N,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,a._ownerElement=r,r},createAttributeNS:function(e,t){var r=new ee,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},u(j,I),Q.prototype={nodeType:p,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===A?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,U(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new L(this,(function(t){var r=[];return R(t,(function(n){n===t||n.nodeType!=p||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new L(this,(function(r){var n=[];return R(r,(function(a){a===r||a.nodeType!==p||"*"!==e&&a.namespaceURI!==e||"*"!==t&&a.localName!=t||n.push(a)})),n}))}},j.prototype.getElementsByTagName=Q.prototype.getElementsByTagName,j.prototype.getElementsByTagNameNS=Q.prototype.getElementsByTagNameNS,u(Q,I),ee.prototype.nodeType=m,u(ee,I),te.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(C[q])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},u(te,I),re.prototype={nodeName:"#text",nodeType:h,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},u(re,te),ne.prototype={nodeName:"#comment",nodeType:w},u(ne,te),ae.prototype={nodeName:"#cdata-section",nodeType:f},u(ae,te),oe.prototype.nodeType=v,u(oe,I),ie.prototype.nodeType=E,u(ie,I),se.prototype.nodeType=x,u(se,I),le.prototype.nodeType=g,u(le,I),ce.prototype.nodeName="#document-fragment",ce.prototype.nodeType=A,u(ce,I),ue.prototype.nodeType=b,u(ue,I),de.prototype.serializeToString=function(e,t,r){return pe.call(e,t,r)},I.prototype.toString=pe;try{if(Object.defineProperty){function we(e){switch(e.nodeType){case p:case A:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(we(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(L.prototype,"length",{get:function(){return O(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){return we(this)},set:function(e){switch(this.nodeType){case p:case A:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),be=function(e,t,r){e["$$"+t]=r}}}catch(ye){}t.DocumentType=oe,t.DOMException=S,t.DOMImplementation=$,t.Element=Q,t.Node=I,t.NodeList=N,t.XMLSerializer=de},6559:(e,t,r)=>{"use strict";var n=r(4582).freeze;t.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=n({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),t.entityMap=t.HTML_ENTITIES},8978:(e,t,r)=>{var n=r(4722);t.DOMImplementation=n.DOMImplementation,t.XMLSerializer=n.XMLSerializer,t.DOMParser=r(5752).DOMParser},4466:(e,t,r)=>{var n=r(4582).NAMESPACE,a=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,o=new RegExp("[\\-\\.0-9"+a.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+a.source+o.source+"*(?::"+a.source+o.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function l(){}function c(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function u(e,t,r,a,o,i){function s(e,t,n){r.attributeNames.hasOwnProperty(e)&&i.fatalError("Attribute "+e+" redefined"),r.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,o),n)}for(var l,c=++t,u=0;;){var d=e.charAt(c);switch(d){case"=":if(1===u)l=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(i.warning('attribute value must after "="'),l=e.slice(t,c)),t=c+1,!((c=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");s(l,p=e.slice(t,c),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(l,p=e.slice(t,c),t),i.warning('attribute "'+l+'" missed start quot('+d+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:break;case 2:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,c)).slice(-1)&&(r.closed=!0,p=p.slice(0,-1));case 2:2===u&&(p=l),4==u?(i.warning('attribute "'+p+'" missed quot(")!'),s(l,p,t)):(n.isHTML(a[""])&&p.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"":d=" ";default:if(d<=" ")switch(u){case 0:r.setTagName(e.slice(t,c)),u=6;break;case 1:l=e.slice(t,c),u=2;break;case 4:var p=e.slice(t,c);i.warning('attribute "'+p+'" missed quot(")!!'),s(l,p,t);case 5:u=6}else switch(u){case 2:r.tagName,n.isHTML(a[""])&&l.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),s(l,l,t),t=c,u=1;break;case 5:i.warning('attribute space is required"'+l+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function d(e,t,r){for(var a=e.tagName,o=null,i=e.length;i--;){var s=e[i],l=s.qName,c=s.value;if((m=l.indexOf(":"))>0)var u=s.prefix=l.slice(0,m),d=l.slice(m+1),p="xmlns"===u&&d;else d=l,u=null,p="xmlns"===l&&"";s.localName=d,!1!==p&&(null==o&&(o={},h(r,r={})),r[p]=o[p]=c,s.uri=n.XMLNS,t.startPrefixMapping(p,c))}for(i=e.length;i--;)(u=(s=e[i]).prefix)&&("xml"===u&&(s.uri=n.XML),"xmlns"!==u&&(s.uri=r[u||""]));var m;(m=a.indexOf(":"))>0?(u=e.prefix=a.slice(0,m),d=e.localName=a.slice(m+1)):(u=null,d=e.localName=a);var f=e.uri=r[u||""];if(t.startElement(f,d,a,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(f,d,a),o)for(u in o)Object.prototype.hasOwnProperty.call(o,u)&&t.endPrefixMapping(u)}function p(e,t,r,n,a){if(/^(?:script|textarea)$/i.test(r)){var o=e.indexOf("</"+r+">",t),i=e.substring(t+1,o);if(/[&<]/.test(i))return/^script$/i.test(r)?(a.characters(i,0,i.length),o):(i=i.replace(/&#?\w+;/g,n),a.characters(i,0,i.length),o)}return t+1}function m(e,t,r,n){var a=n[r];return null==a&&((a=e.lastIndexOf("</"+r+">"))<t&&(a=e.lastIndexOf("</"+r)),n[r]=a),a<t}function h(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function f(e,t,r,n){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(a=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,a-t-4),a+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,a-t-9),r.endCDATA(),a+3}var o=function(e,t){var r,n=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=t,a.exec(e);r=a.exec(e);)if(n.push(r),r[1])return n}(e,t),i=o.length;if(i>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],l=!1,c=!1;i>3&&(/^public$/i.test(o[2][0])?(l=o[3][0],c=i>4&&o[4][0]):/^system$/i.test(o[2][0])&&(c=o[3][0]));var u=o[i-1];return r.startDTD(s,l,c),r.endDTD(),u.index+u[0].length}return-1}function g(e,t,r){var n=e.indexOf("?>",t);if(n){var a=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return a?(a[0].length,r.processingInstruction(a[1],a[2]),n+2):-1}return-1}function x(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,l.prototype={parse:function(e,t,r){var a=this.domBuilder;a.startDocument(),h(t,t={}),function(e,t,r,a,o){function i(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(r,t)?r[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function l(t){if(t>_){var r=e.substring(_,t).replace(/&#?\w+;/g,i);v&&h(_),a.characters(r,0,t-_),_=t}}function h(t,r){for(;t>=w&&(r=y.exec(e));)b=r.index,w=b+r[0].length,v.lineNumber++;v.columnNumber=t-b+1}for(var b=0,w=0,y=/.*(?:\r\n?|\n)|.*$/g,v=a.locator,A=[{currentNSMap:t}],E={},_=0;;){try{var C=e.indexOf("<",_);if(C<0){if(!e.substr(_).match(/^\s*$/)){var q=a.doc,T=q.createTextNode(e.substr(_));q.appendChild(T),a.currentElement=T}return}switch(C>_&&l(C),e.charAt(C+1)){case"/":var k=e.indexOf(">",C+3),S=e.substring(C+2,k).replace(/[ \t\n\r]+$/g,""),N=A.pop();k<0?(S=e.substring(C+2).replace(/[\s<].*/,""),o.error("end tag name: "+S+" is not complete:"+N.tagName),k=C+1+S.length):S.match(/\s</)&&(S=S.replace(/[\s<].*/,""),o.error("end tag name: "+S+" maybe not complete"),k=C+1+S.length);var L=N.localNSMap,O=N.tagName==S;if(O||N.tagName&&N.tagName.toLowerCase()==S.toLowerCase()){if(a.endElement(N.uri,N.localName,S),L)for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&a.endPrefixMapping(M);O||o.fatalError("end tag name: "+S+" is not match the current start tagName:"+N.tagName)}else A.push(N);k++;break;case"?":v&&h(C),k=g(e,C,a);break;case"!":v&&h(C),k=f(e,C,a,o);break;default:v&&h(C);var D=new x,B=A[A.length-1].currentNSMap,F=(k=u(e,C,D,B,i,o),D.length);if(!D.closed&&m(e,k,D.tagName,E)&&(D.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),v&&F){for(var $=c(v,{}),I=0;I<F;I++){var P=D[I];h(P.offset),P.locator=c(v,{})}a.locator=$,d(D,a,B)&&A.push(D),a.locator=v}else d(D,a,B)&&A.push(D);n.isHTML(D.uri)&&!D.closed?k=p(e,k,D.tagName,i,a):k++}}catch(e){if(e instanceof s)throw e;o.error("element parse error: "+e),k=-1}k>_?_=k:l(Math.max(C,_)+1)}}(e,t,r,a,this.errorHandler),a.endDocument()}},x.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!i.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=s},8917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidNumberOfChildrenError=void 0;var n=r(6200);Object.defineProperty(t,"InvalidNumberOfChildrenError",{enumerable:!0,get:function(){return n.InvalidNumberOfChildrenError}})},6200:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidNumberOfChildrenError=void 0;class r extends Error{constructor(e,t,r,n="exactly"){super(`${e} tag must have ${n} ${t} children. It's actually ${r}`),this.name="InvalidNumberOfChildrenError"}}t.InvalidNumberOfChildrenError=r},4279:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(828),t),a(r(5975),t),a(r(799),t),a(r(2424),t)},5975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinWithManySeparators=void 0;class r{constructor(e){this._separators=e}static join(e,t){return new r(t)._join(e)}_join(e){return e.reduce(((e,t,r,n)=>e+t+(r===n.length-1?"":this._get(r))),"")}_get(e){return this._separators[e]?this._separators[e]:this._separators.length>0?this._separators[this._separators.length-1]:","}}t.JoinWithManySeparators=r},799:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mathMLElementToLaTeXConverter=void 0;const n=r(5443);t.mathMLElementToLaTeXConverter=e=>new n.MathMLElementToLatexConverterAdapter(e).toLatexConverter()},2424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeWhiteSpaces=void 0,t.normalizeWhiteSpaces=e=>e.replace(/\s+/g," ")},7192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BracketWrapper=void 0;const n=r(1855);t.BracketWrapper=class{constructor(){this._open="{",this._close="}"}wrap(e){return new n.Wrapper(this._open,this._close).wrap(e)}}},5025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericWrapper=void 0;const n=r(1855);t.GenericWrapper=class{constructor(e,t){this._open="\\left"+e,this._close="\\right"+t}wrap(e){return new n.Wrapper(this._open,this._close).wrap(e)}}},828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericWrapper=t.ParenthesisWrapper=t.BracketWrapper=void 0;var n=r(7192);Object.defineProperty(t,"BracketWrapper",{enumerable:!0,get:function(){return n.BracketWrapper}});var a=r(1168);Object.defineProperty(t,"ParenthesisWrapper",{enumerable:!0,get:function(){return a.ParenthesisWrapper}});var o=r(5025);Object.defineProperty(t,"GenericWrapper",{enumerable:!0,get:function(){return o.GenericWrapper}})},1168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParenthesisWrapper=void 0;const n=r(1855);t.ParenthesisWrapper=class{constructor(){this._open="\\left(",this._close="\\right)"}wrap(e){return new n.Wrapper(this._open,this._close).wrap(e)}wrapIfMoreThanOneChar(e){return e.length<=1?e:this.wrap(e)}}},1855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wrapper=void 0,t.Wrapper=class{constructor(e,t){this._open=e,this._close=t}wrap(e){return this._open+e+this._close}}},2697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VoidMathMLElement=void 0,t.VoidMathMLElement=class{constructor(){this.name="void",this.value="",this.children=[],this.attributes={}}}},4760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericSpacingWrapper=void 0;const n=r(4279);t.GenericSpacingWrapper=class{constructor(e){this._mathmlElement=e}convert(){return this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" ")}}},9376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericUnderOver=void 0;const n=r(799),a=r(8917),o=r(472);t.GenericUnderOver=class{constructor(e){this._mathmlElement=e}convert(){const{name:e,children:t}=this._mathmlElement,r=t.length;if(2!==r)throw new a.InvalidNumberOfChildrenError(e,2,r);const o=(0,n.mathMLElementToLaTeXConverter)(t[0]).convert(),i=(0,n.mathMLElementToLaTeXConverter)(t[1]).convert();return this._applyCommand(o,i)}_applyCommand(e,t){const r=this._mathmlElement.name.match(/under/)?s.Under:s.Over;return new i(r).apply(e,t)}};class i{constructor(e){this._type=e}apply(e,t){return o.latexAccents.includes(t)?`${t}{${e}}`:`${this._defaultCommand}{${t}}{${e}}`}get _defaultCommand(){return this._type===s.Under?"\\underset":"\\overset"}}var s;!function(e){e[e.Under=0]="Under",e[e.Over=1]="Over"}(s||(s={}))},6959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Void=t.GenericUnderOver=t.GenericSpacingWrapper=t.MTr=t.MTable=t.MUnderover=t.MText=t.MMultiscripts=t.MSubsup=t.MSub=t.MSup=t.MPhantom=t.MError=t.MEnclose=t.MAction=t.MRoot=t.MFrac=t.MFenced=t.MSqrt=t.MN=t.MO=t.MI=t.Math=void 0;var n=r(393);Object.defineProperty(t,"Math",{enumerable:!0,get:function(){return n.Math}});var a=r(7037);Object.defineProperty(t,"MI",{enumerable:!0,get:function(){return a.MI}});var o=r(3487);Object.defineProperty(t,"MO",{enumerable:!0,get:function(){return o.MO}});var i=r(4464);Object.defineProperty(t,"MN",{enumerable:!0,get:function(){return i.MN}});var s=r(8686);Object.defineProperty(t,"MSqrt",{enumerable:!0,get:function(){return s.MSqrt}});var l=r(9511);Object.defineProperty(t,"MFenced",{enumerable:!0,get:function(){return l.MFenced}});var c=r(6440);Object.defineProperty(t,"MFrac",{enumerable:!0,get:function(){return c.MFrac}});var u=r(6052);Object.defineProperty(t,"MRoot",{enumerable:!0,get:function(){return u.MRoot}});var d=r(1678);Object.defineProperty(t,"MAction",{enumerable:!0,get:function(){return d.MAction}});var p=r(2631);Object.defineProperty(t,"MEnclose",{enumerable:!0,get:function(){return p.MEnclose}});var m=r(1840);Object.defineProperty(t,"MError",{enumerable:!0,get:function(){return m.MError}});var h=r(7443);Object.defineProperty(t,"MPhantom",{enumerable:!0,get:function(){return h.MPhantom}});var f=r(6926);Object.defineProperty(t,"MSup",{enumerable:!0,get:function(){return f.MSup}});var g=r(2564);Object.defineProperty(t,"MSub",{enumerable:!0,get:function(){return g.MSub}});var x=r(1358);Object.defineProperty(t,"MSubsup",{enumerable:!0,get:function(){return x.MSubsup}});var b=r(8303);Object.defineProperty(t,"MMultiscripts",{enumerable:!0,get:function(){return b.MMultiscripts}});var w=r(3951);Object.defineProperty(t,"MText",{enumerable:!0,get:function(){return w.MText}});var y=r(1222);Object.defineProperty(t,"MUnderover",{enumerable:!0,get:function(){return y.MUnderover}});var v=r(2350);Object.defineProperty(t,"MTable",{enumerable:!0,get:function(){return v.MTable}});var A=r(1586);Object.defineProperty(t,"MTr",{enumerable:!0,get:function(){return A.MTr}});var E=r(4760);Object.defineProperty(t,"GenericSpacingWrapper",{enumerable:!0,get:function(){return E.GenericSpacingWrapper}});var _=r(9376);Object.defineProperty(t,"GenericUnderOver",{enumerable:!0,get:function(){return _.GenericUnderOver}});var C=r(9165);Object.defineProperty(t,"Void",{enumerable:!0,get:function(){return C.Void}})},1678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAction=void 0;const n=r(799);t.MAction=class{constructor(e){this._mathmlElement=e}convert(){const{children:e}=this._mathmlElement;return this._isToggle()?e.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" \\Longrightarrow "):(0,n.mathMLElementToLaTeXConverter)(e[0]).convert()}_isToggle(){const{actiontype:e}=this._mathmlElement.attributes;return"toggle"===e||!e}}},393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Math=void 0;const n=r(799),a=r(2424);t.Math=class{constructor(e){this._mathmlElement=e}convert(){const e=this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" ");return(0,a.normalizeWhiteSpaces)(e)}}},2631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MEnclose=void 0;const n=r(799);t.MEnclose=class{constructor(e){this._mathmlElement=e}convert(){const e=this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" ");return"actuarial"===this._notation?`\\overline{\\left.${e}\\right|}`:"radical"===this._notation?`\\sqrt{${e}}`:["box","roundedbox","circle"].includes(this._notation)?`\\boxed{${e}}`:"left"===this._notation?`\\left|${e}`:"right"===this._notation?`${e}\\right|`:"top"===this._notation?`\\overline{${e}}`:"bottom"===this._notation?`\\underline{${e}}`:"updiagonalstrike"===this._notation?`\\cancel{${e}}`:"downdiagonalstrike"===this._notation?`\\bcancel{${e}}`:"updiagonalarrow"===this._notation?`\\cancelto{}{${e}}`:["verticalstrike","horizontalstrike"].includes(this._notation)?`\\hcancel{${e}}`:"madruwb"===this._notation?`\\underline{${e}\\right|}`:"phasorangle"===this._notation?`{\\angle \\underline{${e}}}`:`\\overline{\\left.\\right)${e}}`}get _notation(){return this._mathmlElement.attributes.notation||"longdiv"}}},1840:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MError=void 0;const n=r(799);t.MError=class{constructor(e){this._mathmlElement=e}convert(){return`\\color{red}{${this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" ")}}`}}},9511:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MFenced=void 0;const n=r(799),a=r(4279);t.MFenced=class{constructor(e){this._mathmlElement=e,this._open=this._mathmlElement.attributes.open||"",this._close=this._mathmlElement.attributes.close||"",this._separators=Array.from(this._mathmlElement.attributes.separators||"")}convert(){const e=this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert()));return this._isThereRelativeOfName(this._mathmlElement.children,"mtable")?new i(this._open,this._close).apply(e):new o(this._open,this._close,this._separators).apply(e)}_isThereRelativeOfName(e,t){return e.some((e=>e.name===t||this._isThereRelativeOfName(e.children,t)))}};class o{constructor(e,t,r){this._open=e||"(",this._close=t||")",this._separators=r}apply(e){const t=a.JoinWithManySeparators.join(e,this._separators);return new a.GenericWrapper(this._open,this._close).wrap(t)}}class i{constructor(e,t){this._genericCommand="matrix",this._separators=new s(e,t)}apply(e){const t=this._command,r=`\\begin{${t}}\n${e.join("")}\n\\end{${t}}`;return t===this._genericCommand?this._separators.wrap(r):r}get _command(){return this._separators.areParentheses()?"pmatrix":this._separators.areSquareBrackets()?"bmatrix":this._separators.areBrackets()?"Bmatrix":this._separators.areDivides()?"vmatrix":this._separators.areParallels()?"Vmatrix":this._separators.areNotEqual()?this._genericCommand:"bmatrix"}}class s{constructor(e,t){this._open=e,this._close=t}wrap(e){return new a.GenericWrapper(this._open,this._close).wrap(e)}areParentheses(){return this._compare("(",")")}areSquareBrackets(){return this._compare("[","]")}areBrackets(){return this._compare("{","}")}areDivides(){return this._compare("|","|")}areParallels(){return this._compare("||","||")}areNotEqual(){return this._open!==this._close}_compare(e,t){return this._open===e&&this._close===t}}},6440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MFrac=void 0;const n=r(8917),a=r(4279);t.MFrac=class{constructor(e){this._mathmlElement=e}convert(){const{children:e,name:t}=this._mathmlElement,r=e.length;if(2!==r)throw new n.InvalidNumberOfChildrenError(t,2,r);const o=(0,a.mathMLElementToLaTeXConverter)(e[0]).convert(),i=(0,a.mathMLElementToLaTeXConverter)(e[1]).convert();return this._isBevelled()?`${this._wrapIfMoreThanOneChar(o)}/${this._wrapIfMoreThanOneChar(i)}`:`\\frac{${o}}{${i}}`}_wrapIfMoreThanOneChar(e){return(new a.ParenthesisWrapper).wrapIfMoreThanOneChar(e)}_isBevelled(){return!!this._mathmlElement.attributes.bevelled}}},7037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MI=void 0;const n=r(4279),a=r(5406),o=r(6122);t.MI=class{constructor(e){this.utf8Converter=new o.HashUTF8ToLtXConverter,this._mathmlElement=e}convert(){const e=(0,n.normalizeWhiteSpaces)(this._mathmlElement.value);if(" "===e)return i.apply(e);const t=e.trim(),r=i.apply(t),a=this.utf8Converter.convert(r);return a!==r?a:this.wrapInMathVariant(r,this.getMathVariant(this._mathmlElement.attributes))}getMathVariant(e){if(e&&e.mathvariant)return e.mathvariant}wrapInMathVariant(e,t){switch(t){case"bold":return`\\mathbf{${e}}`;case"italic":return`\\mathit{${e}}`;case"bold-italic":return`\\mathbf{\\mathit{${e}}}`;case"double-struck":return`\\mathbb{${e}}`;case"bold-fraktur":return`\\mathbf{\\mathfrak{${e}}}`;case"script":return`\\mathcal{${e}}`;case"bold-script":return`\\mathbf{\\mathcal{${e}}}`;case"fraktur":return`\\mathfrak{${e}}`;case"sans-serif":return`\\mathsf{${e}}`;case"bold-sans-serif":return`\\mathbf{\\mathsf{${e}}}`;case"sans-serif-italic":return`\\mathsf{\\mathit{${e}}}`;case"sans-serif-bold-italic":return`\\mathbf{\\mathsf{\\mathit{${e}}}}`;case"monospace":return`\\mathtt{${e}}`;default:return e}}};class i{constructor(e){this._value=e}static apply(e){return new i(e)._apply()}_apply(){return this._findByCharacter()||this._findByGlyph()||this._findByNumber()||(new o.HashUTF8ToLtXConverter).convert(this._value)}_findByCharacter(){return a.allMathSymbolsByChar[this._value]}_findByGlyph(){return a.allMathSymbolsByGlyph[this._value]}_findByNumber(){return a.mathNumberByGlyph[this._value]}}},8303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MMultiscripts=void 0;const n=r(4279),a=r(8917);t.MMultiscripts=class{constructor(e){this._mathmlElement=e}convert(){const{name:e,children:t}=this._mathmlElement,r=t.length;if(r<3)throw new a.InvalidNumberOfChildrenError(e,3,r,"at least");const o=(0,n.mathMLElementToLaTeXConverter)(t[0]).convert();return this._prescriptLatex()+this._wrapInParenthesisIfThereIsSpace(o)+this._postscriptLatex()}_prescriptLatex(){const{children:e}=this._mathmlElement;let t,r;if(this._isPrescripts(e[1]))t=e[2],r=e[3];else{if(!this._isPrescripts(e[3]))return"";t=e[4],r=e[5]}return`\\_{${(0,n.mathMLElementToLaTeXConverter)(t).convert()}}^{${(0,n.mathMLElementToLaTeXConverter)(r).convert()}}`}_postscriptLatex(){const{children:e}=this._mathmlElement;if(this._isPrescripts(e[1]))return"";const t=e[1],r=e[2];return`_{${(0,n.mathMLElementToLaTeXConverter)(t).convert()}}^{${(0,n.mathMLElementToLaTeXConverter)(r).convert()}}`}_wrapInParenthesisIfThereIsSpace(e){return e.match(/\s+/g)?(new n.ParenthesisWrapper).wrap(e):e}_isPrescripts(e){return"mprescripts"===(null==e?void 0:e.name)}}},4464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MN=void 0;const n=r(4279),a=r(5406);t.MN=class{constructor(e){this._mathmlElement=e}convert(){const e=(0,n.normalizeWhiteSpaces)(this._mathmlElement.value).trim();return a.mathNumberByGlyph[e]||e}}},3487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MO=void 0;const n=r(4279),a=r(5406);t.MO=class{constructor(e){this._mathmlElement=e}convert(){const e=(0,n.normalizeWhiteSpaces)(this._mathmlElement.value).trim();return o.operate(e)}};class o{constructor(e){this._value=e}static operate(e){return new o(e)._operate()}_operate(){return this._findByCharacter()||this._findByGlyph()||this._findByNumber()||(new a.HashUTF8ToLtXConverter).convert(this._value)}_findByCharacter(){return a.allMathOperatorsByChar[this._value]}_findByGlyph(){return a.allMathOperatorsByGlyph[this._value]}_findByNumber(){return a.mathNumberByGlyph[this._value]}}},7443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MPhantom=void 0,t.MPhantom=class{constructor(e){this._mathmlElement=e}convert(){return""}}},6052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MRoot=void 0;const n=r(4279),a=r(8917);t.MRoot=class{constructor(e){this._mathmlElement=e}convert(){const{name:e,children:t}=this._mathmlElement,r=t.length;if(2!==r)throw new a.InvalidNumberOfChildrenError(e,2,r);const o=(0,n.mathMLElementToLaTeXConverter)(t[0]).convert();return`\\sqrt[${(0,n.mathMLElementToLaTeXConverter)(t[1]).convert()}]{${o}}`}}},8686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSqrt=void 0;const n=r(4279);t.MSqrt=class{constructor(e){this._mathmlElement=e}convert(){return`\\sqrt{${this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" ")}}`}}},2564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSub=void 0;const n=r(4279),a=r(8917);t.MSub=class{constructor(e){this._mathmlElement=e}convert(){const{name:e,children:t}=this._mathmlElement,r=t.length;if(2!==r)throw new a.InvalidNumberOfChildrenError(e,2,r);const n=t[0],o=t[1];return`${this._handleBaseChild(n)}_${this._handleSubscriptChild(o)}`}_handleBaseChild(e){const t=e.children,r=(0,n.mathMLElementToLaTeXConverter)(e).convert();return t.length<=1?r:(new n.ParenthesisWrapper).wrapIfMoreThanOneChar(r)}_handleSubscriptChild(e){const t=(0,n.mathMLElementToLaTeXConverter)(e).convert();return(new n.BracketWrapper).wrap(t)}}},1358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSubsup=void 0;const n=r(4279),a=r(8917);t.MSubsup=class{constructor(e){this._mathmlElement=e}convert(){const{name:e,children:t}=this._mathmlElement,r=t.length;if(3!==r)throw new a.InvalidNumberOfChildrenError(e,3,r);const n=t[0],o=t[1],i=t[2];return`${this._handleBaseChild(n)}_${this._handleSubscriptChild(o)}^${this._handleSuperscriptChild(i)}`}_handleBaseChild(e){const t=e.children,r=(0,n.mathMLElementToLaTeXConverter)(e).convert();return t.length<=1?r:(new n.ParenthesisWrapper).wrapIfMoreThanOneChar(r)}_handleSubscriptChild(e){const t=(0,n.mathMLElementToLaTeXConverter)(e).convert();return(new n.BracketWrapper).wrap(t)}_handleSuperscriptChild(e){const t=(0,n.mathMLElementToLaTeXConverter)(e).convert();return(new n.BracketWrapper).wrap(t)}}},6926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSup=void 0;const n=r(4279),a=r(8917);t.MSup=class{constructor(e){this._mathmlElement=e}convert(){const{name:e,children:t}=this._mathmlElement,r=t.length;if(2!==r)throw new a.InvalidNumberOfChildrenError(e,2,r);const n=t[0],o=t[1];return`${this._handleBaseChild(n)}^${this._handleExponentChild(o)}`}_handleBaseChild(e){const t=e.children,r=(0,n.mathMLElementToLaTeXConverter)(e).convert();return t.length<=1?r:(new n.ParenthesisWrapper).wrapIfMoreThanOneChar(r)}_handleExponentChild(e){const t=(0,n.mathMLElementToLaTeXConverter)(e).convert();return(new n.BracketWrapper).wrap(t)}}},2350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MTable=void 0;const n=r(4279);t.MTable=class{constructor(e){this._mathmlElement=e,this._addFlagRecursiveIfName(this._mathmlElement.children,"mtable","innerTable")}convert(){const e=this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" \\\\\n");return this._hasFlag("innerTable")?this._wrap(e):e}_wrap(e){return`\\begin{matrix}${e}\\end{matrix}`}_addFlagRecursiveIfName(e,t,r){e.forEach((e=>{e.name===t&&(e.attributes[r]=r),this._addFlagRecursiveIfName(e.children,t,r)}))}_hasFlag(e){return!!this._mathmlElement.attributes[e]}}},3951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MText=void 0;const n=r(7037);t.MText=class{constructor(e){this._mathmlElement=e}convert(){const{attributes:e,value:t}=this._mathmlElement;return[...t].map((e=>/^[a-zA-Z0-9]$/.test(e)||" "===e?{value:e,isAlphanumeric:!0}:{value:e,isAlphanumeric:!1})).reduce(((e,t)=>{if(t.isAlphanumeric){const r=e[e.length-1];if(r&&r.isAlphanumeric)return r.value+=t.value,e}return[...e,t]}),[]).map((t=>t.isAlphanumeric?new a(e.mathvariant).apply(t.value):new n.MI({name:"mi",attributes:{},children:[],value:t.value}).convert())).join("")}};class a{constructor(e){this._mathvariant=e||"normal"}apply(e){return this._commands.reduce(((t,r,n)=>0===n?`${r}{${e}}`:`${r}{${t}}`),"")}get _commands(){switch(this._mathvariant){case"bold":return["\\textbf"];case"italic":return["\\textit"];case"bold-italic":return["\\textit","\\textbf"];case"double-struck":return["\\mathbb"];case"monospace":return["\\mathtt"];case"bold-fraktur":case"fraktur":return["\\mathfrak"];default:return["\\text"]}}}},1586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MTr=void 0;const n=r(4279);t.MTr=class{constructor(e){this._mathmlElement=e}convert(){return this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" & ")}}},1222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MUnderover=void 0;const n=r(4279),a=r(8917);t.MUnderover=class{constructor(e){this._mathmlElement=e}convert(){const{name:e,children:t}=this._mathmlElement,r=t.length;if(3!==r)throw new a.InvalidNumberOfChildrenError(e,3,r);return`${(0,n.mathMLElementToLaTeXConverter)(t[0]).convert()}_{${(0,n.mathMLElementToLaTeXConverter)(t[1]).convert()}}^{${(0,n.mathMLElementToLaTeXConverter)(t[2]).convert()}}`}}},9165:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Void=void 0,t.Void=class{constructor(e){this._mathmlElement=e}convert(){return""}}},5443:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MathMLElementToLatexConverterAdapter=void 0;const i=o(r(6959)),s=r(2697);t.MathMLElementToLatexConverterAdapter=class{constructor(e){this._mathMLElement=null!=e?e:new s.VoidMathMLElement}toLatexConverter(){const{name:e}=this._mathMLElement;return new(l[e]||i.GenericSpacingWrapper)(this._mathMLElement)}};const l={math:i.Math,mi:i.MI,mo:i.MO,mn:i.MN,msqrt:i.MSqrt,mfenced:i.MFenced,mfrac:i.MFrac,mroot:i.MRoot,maction:i.MAction,menclose:i.MEnclose,merror:i.MError,mphantom:i.MPhantom,msup:i.MSup,msub:i.MSub,msubsup:i.MSubsup,mmultiscripts:i.MMultiscripts,mtext:i.MText,munderover:i.MUnderover,mtable:i.MTable,mtr:i.MTr,mover:i.GenericUnderOver,munder:i.GenericUnderOver,mrow:i.GenericSpacingWrapper,mpadded:i.GenericSpacingWrapper,void:i.Void}},5243:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorHandler=void 0,t.ErrorHandler=class{constructor(){this._errors=[],this.errorLocator={}}fixError(e,t){return this._isMissingAttributeValueError(t)?(this._errors.push(t),this._fixMissingAttribute(t,e)):e}isThereAnyErrors(){return this._errors.length>0}cleanErrors(){this._errors=[]}_fixMissingAttribute(e,t){const r=e.split('"')[1];if(r)return t.replace(this._matchMissingValueForAttribute(r),"");for(;this._mathGenericMissingValue().exec(t);)t=t.replace(this._mathGenericMissingValue(),"$1$3");return t}_matchMissingValueForAttribute(e){return new RegExp(`(${e}=(?!("|')))|(${e}(?!("|')))`,"gm")}_mathGenericMissingValue(){return/(\<.* )(\w+=(?!\"|\'))(.*\>)/gm}_isMissingAttributeValueError(e){return!!e.includes("attribute")&&!!e.includes("missed")||e.includes("attribute value missed")}}},9208:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(9548),t),a(r(5243),t),a(r(1101),t)},1101:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElementsToMathMLAdapter=void 0,t.ElementsToMathMLAdapter=class{convert(e){return e.filter((e=>void 0!==e.tagName)).map((e=>this._convertElement(e)))}_convertElement(e){return{name:e.tagName,attributes:this._convertElementAttributes(e.attributes),value:this._hasElementChild(e)?"":e.textContent||"",children:this._hasElementChild(e)?this.convert(Array.from(e.childNodes)):[]}}_convertElementAttributes(e){return Array.from(e).reduce(((e,t)=>Object.assign({[t.nodeName]:t.nodeValue===t.nodeName?"":t.nodeValue},e)),{})}_hasElementChild(e){const t=e.childNodes;return!!t&&0!==t.length&&this._isThereAnyNoTextNode(t)}_isThereAnyNoTextNode(e){return Array.from(e).some((e=>"#text"!==e.nodeName))}}},9548:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.XmlToMathMLAdapter=void 0;const a=n(r(8978));t.XmlToMathMLAdapter=class{constructor(e,t){this._xml="",this._elementsConvertor=e,this._errorHandler=t,this._xmlDOM=new a.default.DOMParser({locator:this._errorHandler.errorLocator,errorHandler:this._fixError.bind(this)})}convert(e){return this._xml=this._removeLineBreaks(e),this._xml=this._removeMsWordPrefixes(this._xml),this._elementsConvertor.convert(this._mathMLElements)}_fixError(e){this._xml=this._errorHandler.fixError(this._xml,e)}_removeLineBreaks(e){return e.replace(/\n|\r\n|\r/g,"")}_removeMsWordPrefixes(e){return e.replace(/mml:/g,"")}get _mathMLElements(){let e=this._xmlDOM.parseFromString(this._xml).getElementsByTagName("math");return this._errorHandler.isThereAnyErrors()&&(this._errorHandler.cleanErrors(),e=this._xmlDOM.parseFromString(this._xml).getElementsByTagName("math")),Array.from(e)}}},7941:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(8585),t)},8585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeToMathElementsConverter=void 0;const n=r(9208);t.makeToMathElementsConverter=()=>{const e=new n.ElementsToMathMLAdapter,t=new n.ErrorHandler;return new n.XmlToMathMLAdapter(e,t)}},8672:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(3798),t)},3798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MathMLToLaTeX=void 0;const n=r(5443),a=r(7941);t.MathMLToLaTeX=class{static convert(e){return(0,a.makeToMathElementsConverter)().convert(e).map((e=>new n.MathMLElementToLatexConverterAdapter(e).toLatexConverter())).map((e=>e.convert())).join("").trim()}}},2965:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allMathOperatorsByChar=void 0,t.allMathOperatorsByChar={_:"\\underline","⏡":"\\underbrace","⏠":"\\overbrace","⏟":"\\underbrace","⏞":"\\overbrace","⏝":"\\underbrace","⏜":"\\overbrace","⎵":"\\underbrace","⎴":"\\overbrace","⃜":"\\square","⃛":"\\square","⁤":"","⁗":"''''","‾":"\\bar","‷":"```","‶":"``","‵":"`","‴":"'''","″":"''","‟":"``","„":",,","‛":"`","‚":",","̂":"\\hat","˷":"\\sim","˝":"\\sim","˜":"\\sim","˚":"\\circ","˙":"\\cdot","˘":"","ˍ":"\\_","ˋ":"ˋ","ˊ":"ˊ","ˉ":"ˉ","ˇ":"","ˆ":"\\hat","º":"o","¹":"1","¸":"¸","´":"´","³":"3","²":"2","°":"\\circ","¯":"\\bar","ª":"a","¨":"\\cdot\\cdot","~":"\\sim","`":"`","^":"\\hat","--":"--","++":"++","&":"\\&","⁡":"","∜":"\\sqrt[4]{}","∛":"\\sqrt[3]{}","√":"\\sqrt{}","ⅆ":"d","ⅅ":"\\mathbb{D}","?":"?","@":"@","//":"//","!!":"!!","!":"!","♯":"\\#","♮":"","♭":"","′":"'","<>":"<>","**":"\\star\\star","∇":"\\nabla","∂":"\\partial","⊙":"\\bigodot","¬":"\\neg","∢":"\\measuredangle","∡":"\\measuredangle","∠":"\\angle","÷":"\\div","/":"/","∖":"\\backslash","\\":"\\backslash","%":"\\%","⊗":"\\bigotimes","·":"\\cdot","⨿":"\\coprod","⨯":"\\times","⋅":"\\cdot","⊡":"\\boxdot","⊠":"\\boxtimes","⁢":"","⁃":"-","•":"\\cdot","×":"\\times",".":".","*":"\\star","∪":"\\cup","∩":"\\cap","∐":"\\coprod","∏":"\\prod","≀":"","⫿":"","⫼":"\\mid\\mid\\mid","⨉":"\\times","⨈":"","⨇":"","⨆":"\\sqcup","⨅":"\\sqcap","⨂":"\\otimes","⨀":"\\odot","⋂":"\\cap","⋁":"\\vee","⋀":"\\wedge","⨄":"\\uplus","⨃":"\\cup","⋃":"\\cup","⨜":"\\underline{\\int}","⨛":"\\overline{\\int}","⨚":"\\int","⨙":"\\int","⨘":"\\int","⨗":"\\int","⨖":"\\oint","⨕":"\\oint","⨔":"\\int","⨓":"\\int","⨒":"\\int","⨑":"\\int","⨐":"\\int","⨏":"\\bcancel{\\int}","⨎":"","⨍":"\\hcancel{\\int}","⨌":"\\iiiint","∳":"\\oint","∲":"\\oint","∱":"\\int","∰":"\\oiint","∯":"\\oiint","∮":"\\oint","∫":"\\int","⨁":"\\oplus","⊘":"\\oslash","⊖":"\\ominus","⊕":"\\oplus","∭":"\\iiint","∬":"\\iint","⨋":"","⨊":"","∑":"\\sum","⊟":"\\boxminus","⊞":"\\boxplus","∔":"\\dot{+}","∓":"+-","−":"-","±":"\\pm","-":"-","+":"+","⭆":"\\Rrightarrow","⭅":"\\Lleftarrow","⧴":":\\rightarrow","⧯":"","⧟":"\\bullet-\\bullet","⦟":"\\angle","⦞":"\\measuredangle","⦝":"\\measuredangle","⦜":"\\perp","⦛":"\\measuredangle","⦚":"","⦙":"\\vdots","⥿":"","⥾":"","⥽":"\\prec","⥼":"\\succ","⥻":"\\underset{\\rightarrow}{\\supset}","⥺":"","⥹":"\\underset{\\rightarrow}{\\subset}","⥸":"\\underset{\\rightarrow}{>}","⥷":"","⥶":"\\underset{\\leftarrow}{<}","⥵":"\\underset{\\approx}{\\rightarrow}","⥴":"\\underset{\\sim}{\\rightarrow}","⥳":"\\underset{\\sim}{\\leftarrow}","⥲":"\\overset{\\sim}{\\rightarrow}","⥱":"\\overset{=}{\\rightarrow}","⥰":"","⥯":"","⥮":"","⥭":"\\overline{\\rightharpoondown}","⥬":"\\underline{\\rightharpoonup}","⥫":"\\overline{\\leftharpoondown}","⥪":"\\underline{\\leftharpoonup}","⥩":"\\rightleftharpoons","⥨":"\\rightleftharpoons","⥧":"\\rightleftharpoons","⥦":"\\rightleftharpoons","⥥":"\\Downarrow","⥤":"\\Rightarrow","⥣":"\\Uparrow","⥢":"\\Leftarrow","⥡":"\\downarrow","⥠":"\\uparrow","⥟":"\\rightarrow","⥞":"\\leftarrow","⥝":"\\downarrow","⥜":"\\uparrow","⥛":"\\rightarrow","⥚":"\\leftarrow","⥙":"\\downarrow","⥘":"\\uparrow","⥗":"\\rightarrow","⥖":"\\leftarrow","⥕":"\\downarrow","⥔":"\\uparrow","⥓":"\\rightarrow","⥒":"\\leftarrow","⥑":"\\updownarrow","⥐":"\\leftrightarrow","⥏":"\\updownarrow","⥎":"\\leftrightarrow","⥍":"\\updownarrow","⥌":"\\updownarrow","⥋":"\\leftrightarrow","⥊":"\\leftrightarrow","⥉":"","⥈":"\\leftrightarrow","⥇":"\\nrightarrow","⥆":"","⥅":"","⥄":"\\rightleftarrows","⥃":"\\leftrightarrows","⥂":"\\rightleftarrows","⥁":"\\circlearrowright","⥀":"\\circlearrowleft","⤿":"\\rightarrow","⤾":"\\leftarrow","⤽":"","⤼":"","⤻":"","⤺":"","⤹":"","⤸":"","⤷":"\\Rsh","⤶":"\\Lsh","⤵":"\\downarrow","⤴":"\\uparrow","⤳":"\\leadsto","⤲":"","⤱":"","⤰":"","⤯":"","⤮":"","⤭":"","⤬":"\\times","⤫":"\\times","⤪":"","⤩":"","⤨":"","⤧":"","⤦":"","⤥":"","⤤":"","⤣":"","⤢":"","⤡":"","⤠":"\\mapsto\\cdot","⤟":"\\cdot\\leftarrow","⤞":"\\rightarrow\\cdot","⤝":"\\leftarrow","⤜":"\\rightarrow","⤛":"\\leftarrow","⤚":"\\rightarrow","⤙":"\\leftarrow","⤘":"\\rightarrow","⤗":"\\rightarrow","⤖":"\\rightarrow","⤕":"\\rightarrow","⤔":"\\rightarrow","⤓":"\\downarrow","⤒":"\\uparrow","⤑":"\\rightarrow","⤐":"\\rightarrow","⤏":"\\rightarrow","⤎":"\\leftarrow","⤍":"\\rightarrow","⤌":"\\leftarrow","⤋":"\\Downarrow","⤊":"\\Uparrow","⤉":"\\uparrow","⤈":"\\downarrow","⤇":"\\Rightarrow","⤆":"\\Leftarrow","⤅":"\\mapsto","⤄":"\\nLeftrightarrow","⤃":"\\nRightarrow","⤂":"\\nLeftarrow","⤁":"\\rightsquigarrow","⤀":"\\rightsquigarrow","⟿":"\\rightsquigarrow","⟾":"\\Rightarrow","⟽":"\\Leftarrow","⟼":"\\mapsto","⟻":"\\leftarrow","⟺":"\\Longleftrightarrow","⟹":"\\Longrightarrow","⟸":"\\Longleftarrow","⟷":"\\leftrightarrow","⟶":"\\rightarrow","⟵":"\\leftarrow","⟱":"\\Downarrow","⟰":"\\Uparrow","⊸":"\\rightarrow","⇿":"\\leftrightarrow","⇾":"\\rightarrow","⇽":"\\leftarrow","⇼":"\\nleftrightarrow","⇻":"\\nrightarrow","⇺":"\\nleftarrow","⇹":"\\nleftrightarrow","⇸":"\\nrightarrow","⇷":"\\nleftarrow","⇶":"\\Rrightarrow","⇵":"","⇴":"\\rightarrow","⇳":"\\Updownarrow","⇲":"\\searrow","⇱":"\\nwarrow","⇰":"\\Leftarrow","⇯":"\\Uparrow","⇮":"\\Uparrow","⇭":"\\Uparrow","⇬":"\\Uparrow","⇫":"\\Uparrow","⇪":"\\Uparrow","⇩":"\\Downarrow","⇨":"\\Rightarrow","⇧":"\\Uparrow","⇦":"\\Leftarrow","⇥":"\\rightarrow","⇤":"\\leftarrow","⇣":"\\downarrow","⇢":"\\rightarrow","⇡":"\\uparrow","⇠":"\\leftarrow","⇟":"\\downarrow","⇞":"\\uparrow","⇝":"\\rightsquigarrow","⇜":"\\leftarrow","⇛":"\\Rrightarrow","⇚":"\\Lleftarrow","⇙":"\\swarrow","⇘":"\\searrow","⇗":"\\nearrow","⇖":"\\nwarrow","⇕":"\\Updownarrow","⇔":"\\Leftrightarrow","⇓":"\\Downarrow","⇒":"\\Rightarrow","⇑":"\\Uparrow","⇐":"\\Leftarrow","⇏":"\\nRightarrow","⇎":"\\nLeftrightarrow","⇍":"\\nLeftarrow","⇌":"\\rightleftharpoons","⇋":"\\leftrightharpoons","⇊":"\\downdownarrows","⇉":"\\rightrightarrows","⇈":"\\upuparrows","⇇":"\\leftleftarrows","⇆":"\\leftrightarrows","⇅":"","⇄":"\\rightleftarrows","⇃":"\\downharpoonleft","⇂":"\\downharpoonright","⇁":"\\rightharpoondown","⇀":"\\rightharpoonup","↿":"\\upharpoonleft","↾":"\\upharpoonright","↽":"\\leftharpoondown","↼":"\\leftharpoonup","↻":"\\circlearrowright","↺":"\\circlearrowleft","↹":"\\leftrightarrows","↸":"\\overline{\\nwarrow}","↷":"\\curvearrowright","↶":"\\curvearrowleft","↵":"\\swarrow","↴":"\\searrow","↳":"\\Rsh","↲":"\\Lsh","↱":"\\Rsh","↰":"\\Lsh","↯":"\\swarrow","↮":"","↭":"\\leftrightsquigarrow","↬":"\\looparrowright","↫":"\\looparrowleft","↪":"\\hookrightarrow","↩":"\\hookleftarrow","↨":"\\underline{\\updownarrow}","↧":"\\downarrow","↦":"\\rightarrowtail","↥":"\\uparrow","↤":"\\leftarrowtail","↣":"\\rightarrowtail","↢":"\\leftarrowtail","↡":"\\downarrow","↠":"\\twoheadrightarrow","↟":"\\uparrow","↞":"\\twoheadleftarrow","↝":"\\nearrow","↜":"\\nwarrow","↛":"","↚":"","↙":"\\swarrow","↘":"\\searrow","↗":"\\nearrow","↖":"\\nwarrow","↕":"\\updownarrow","↔":"\\leftrightarrow","↓":"\\downarrow","→":"\\rightarrow","↑":"\\uparrow","←":"\\leftarrow","|||":"\\left|||\\right.","||":"\\left||\\right.","|":"\\left|\\right.","⫾":"","⫽":"//","⫻":"///","⫺":"","⫹":"","⫸":"","⫷":"","⫶":"\\vdots","⫵":"","⫴":"","⫳":"","⫲":"\\nparallel","⫱":"","⫰":"","⫯":"","⫮":"\\bcancel{\\mid}","⫭":"","⫬":"","⫫":"","⫪":"","⫩":"","⫨":"\\underline{\\perp}","⫧":"\\overline{\\top}","⫦":"","⫥":"","⫤":"","⫣":"","⫢":"","⫡":"","⫠":"\\perp","⫟":"\\top","⫞":"\\dashv","⫝̸":"","⫝":"","⫛":"\\pitchfork","⫚":"","⫙":"","⫘":"","⫗":"","⫖":"","⫕":"","⫔":"","⫓":"","⫒":"","⫑":"","⫐":"","⫏":"","⫎":"","⫍":"","⫌":"\\underset{\\neq}{\\supset}","⫋":"\\underset{\\neq}{\\subset}","⫊":"\\underset{\\approx}{\\supset}","⫉":"\\underset{\\approx}{\\subset}","⫈":"\\underset{\\sim}{\\supset}","⫇":"\\underset{\\sim}{\\subset}","⫆":"\\supseteqq","⫅":"\\subseteqq","⫄":"\\dot{\\supseteq}","⫃":"\\dot{\\subseteq}","⫂":"\\underset{\\times}{\\supset}","⫁":"\\underset{\\times}{\\subset}","⫀":"\\underset{+}{\\supset}","⪿":"\\underset{+}{\\subset}","⪾":"","⪽":"","⪼":"\\gg ","⪻":"\\ll","⪺":"\\underset{\\cancel{\\approx}}{\\succ}","⪹":"\\underset{\\cancel{\\approx}}{\\prec}","⪸":"\\underset{\\approx}{\\succ}","⪷":"\\underset{\\approx}{\\prec}","⪶":"\\underset{\\cancel{=}}{\\succ}","⪵":"\\underset{\\cancel{=}}{\\prec}","⪴":"\\underset{=}{\\succ}","⪳":"\\underset{=}{\\prec}","⪲":"","⪱":"","⪮":"","⪭":"\\underline{\\hcancel{>}}","⪬":"\\underline{\\hcancel{>}}","⪫":"\\hcancel{>}","⪪":"\\hcancel{<}","⪩":"","⪨":"","⪧":"\\vartriangleright","⪦":"\\vartriangleleft","⪥":"><","⪤":"><","⪣":"\\underline{\\ll}","⪢̸":"\\cancel{\\gg}","⪢":"\\gg","⪡̸":"\\cancel{\\ll}","⪡":"\\ll","⪠":"\\overset{\\sim}{\\geqq}","⪟":"\\overset{\\sim}{\\leqq}","⪞":"\\overset{\\sim}{>}","⪝":"\\overset{\\sim}{<}","⪜":"","⪛":"","⪚":"\\overset{=}{>}","⪙":"\\overset{=}{<}","⪘":"","⪗":"","⪖":"","⪕":"","⪔":"","⪓":"","⪒":"\\underset{=}{\\gtrless}","⪑":"\\underset{=}{\\lessgtr}","⪐":"\\underset{<}{\\gtrsim}","⪏":"\\underset{>}{\\lesssim}","⪎":"\\underset{\\simeq}{>}","⪍":"\\underset{\\simeq}{<}","⪌":"\\gtreqqless","⪋":"\\lesseqqgtr","⪊":"\\underset{\\cancel{\\approx}}{>}","⪉":"\\underset{\\approx}{<}","⪆":"\\underset{\\approx}{>}","⪅":"\\underset{\\approx}{<}","⪄":"","⪃":"","⪂":"","⪁":"","⪀":"","⩿":"","⩾̸":"\\bcancel{\\geq}","⩾":"\\geq","⩽̸":"\\bcancel{\\leq}","⩽":"\\leq","⩼":"","⩻":"","⩺":"","⩹":"","⩸":"\\overset{\\dots}{\\equiv}","⩷":"","⩶":"===","⩵":"==","⩴":"::=","⩳":"","⩲":"\\underset{=}{+}","⩱":"\\overset{=}{+}","⩰":"\\overset{\\approx}{=}","⩯":"\\overset{\\wedge}{=}","⩮":"\\overset{*}{=}","⩭":"\\dot{\\approx}","⩬":"","⩫":"","⩪":"\\dot{\\sim}","⩩":"","⩨":"","⩧":"\\dot{\\equiv}","⩦":"\\underset{\\cdot}{=}","⩥":"","⩤":"","⩣":"\\underset{=}{\\vee}","⩢":"\\overset{=}{\\vee}","⩡":"ul(vv)","⩠":"\\underset{=}{\\wedge}","⩟":"\\underline{\\wedge}","⩞":"\\overset{=}{\\wedge}","⩝":"\\hcancel{\\vee}","⩜":"\\hcancel{\\wedge}","⩛":"","⩚":"","⩙":"","⩘":"\\vee","⩗":"\\wedge","⩖":"","⩕":"","⩔":"","⩓":"","⩒":"\\dot{\\vee}","⩑":"\\dot{\\wedge}","⩐":"","⩏":"","⩎":"","⩍":"\\overline{\\cap}","⩌":"\\overline{\\cup}","⩋":"","⩊":"","⩉":"","⩈":"","⩇":"","⩆":"","⩅":"","⩄":"","⩃":"\\overline{\\cap}","⩂":"\\overline{\\cup}","⩁":"","⩀":"","⨾":"","⨽":"\\llcorner","⨼":"\\lrcorner","⨻":"","⨺":"","⨹":"","⨸":"","⨷":"","⨶":"\\hat{\\otimes}","⨵":"","⨴":"","⨳":"","⨲":"\\underline{\\times}","⨱":"\\underline{\\times}","⨰":"\\dot{\\times}","⨮":"","⨭":"","⨬":"","⨫":"","⨪":"","⨩":"","⨨":"","⨧":"","⨦":"\\underset{\\sim}{+}","⨥":"\\underset{\\circ}{+}","⨤":"\\overset{\\sim}{+}","⨣":"\\hat{+}","⨢":"\\dot{+}","⨡":"\\upharpoonright","⨠":">>","⨟":"","⨞":"\\triangleleft","⨝":"\\bowtie","⧿":"","⧾":"+","⧻":"\\hcancel{|||}","⧺":"\\hcancel{||}","⧹":"\\backslash","⧸":"/","⧷":"hcancel{\backslash}","⧶":"","⧵":"\\backslash","⧲":"\\Phi","⧱":"","⧰":"","⧮":"","⧭":"","⧬":"","⧫":"\\lozenge","⧪":"","⧩":"","⧨":"","⧧":"\\ddagger","⧢":"\\sqcup\\sqcup","⧡":"","⧠":"\\square","⧞":"","⧝":"","⧜":"","⧛":"\\{\\{","⧙":"\\{","⧘":"\\}","⧗":"","⧖":"","⧕":"\\bowtie","⧔":"\\bowtie","⧓":"\\bowtie","⧒":"\\bowtie","⧑":"\\bowtie","⧐̸":"| \\not\\triangleright","⧐":"| \\triangleright","⧏̸":"\\not\\triangleleft |","⧏":"\\triangleleft |","⧎":"","⧍":"\\triangle","⧌":"","⧋":"\\underline{\\triangle}","⧊":"\\dot{\\triangle}","⧉":"","⧈":"\\boxed{\\circ}","⧇":"\\boxed{\\circ}","⧆":"\\boxed{\\rightarrow}","⧅":"\\bcancel{\\square}","⧄":"\\cancel{\\square}","⧃":"\\odot","⧂":"\\odot","⦿":"\\odot","⦾":"\\odot","⦽":"\\varnothing","⦼":"\\oplus","⦻":"\\otimes","⦺":"","⦹":"\\varnothing","⦸":"\\varnothing","⦷":"\\ominus","⦶":"\\ominus","⦵":"\\ominus","⦴":"\\vec{\\varnothing}","⦳":"\\vec{\\varnothing}","⦲":"\\dot{\\varnothing}","⦱":"\\overline{\\varnothing}","⦰":"\\varnothing","⦯":"","⦮":"","⦭":"","⦬":"","⦫":"","⦪":"","⦩":"","⦨":"","⦧":"","⦦":"","⦥":"","⦤":"","⦣":"","⦢":"","⦡":"\\not\\lor","⦠":"\\bcancel{>}","⦂":":","⦁":"\\circ","❘":"|","▲":"\\bigtriangleup","⋿":"\\Epsilon","⋾":"\\overline{\\ni}","⋽":"\\overline{\\ni}","⋼":"\\in","⋻":"\\in","⋺":"\\in","⋹":"\\underline{\\in}","⋸":"\\underline{\\in}","⋷":"\\overline{\\in}","⋶":"\\overline{\\in}","⋵":"\\dot{\\in}","⋴":"\\in","⋳":"\\in","⋲":"\\in","⋰":"\\ddots","⋩":"\\underset{\\sim}{\\succ}","⋨":"\\underset{\\sim}{\\prec}","⋧":"\\underset{\\not\\sim}{>}","⋦":"\\underset{\\not\\sim}{<}","⋥":"\\not\\sqsupseteq","⋤":"\\not\\sqsubseteq","⋣":"\\not\\sqsupseteq","⋢":"\\not\\sqsubseteq","⋡":"\\nsucc","⋠":"\\nprec","⋟":"\\succ","⋞":"\\prec","⋝":"\\overline{>}","⋜":"\\overline{<}","⋛":"\\underset{>}{\\leq}","⋚":"\\underset{<}{\\geq}","⋕":"\\#","⋓":"\\cup","⋒":"\\cap","⋑":"\\supset","⋐":"\\subset","⋏":"\\wedge","⋎":"\\vee","⋍":"\\simeq","⋈":"\\bowtie","⋇":"\\ast","⋆":"\\star","⋄":"\\diamond","⊿":"\\triangle","⊾":"\\measuredangle","⊽":"\\overline{\\lor}","⊼":"\\overline{\\land}","⊻":"\\underline{\\lor}","⊺":"\\top","⊹":"","⊷":"\\circ\\multimap","⊶":"\\circ\\multimap","⊳":"\\triangleright","⊲":"\\triangleleft","⊱":"\\succ","⊰":"\\prec","⊫":"|\\models","⊪":"|\\models","⊧":"\\models","⊦":"\\vdash","⊝":"\\ominus","⊜":"\\ominus","⊛":"\\odot","⊚":"\\odot","⊔":"\\sqcup","⊓":"\\sqcap","⊒":"\\sqsupseteq","⊑":"\\sqsubseteq","⊐̸":"\\not\\sqsupset","⊐":"\\sqsupset","⊏̸":"\\not\\sqsubset","⊏":"\\sqsubset","⊎":"\\cup","⊍":"\\cup","⊌":"\\cup","≿̸":"\\not\\succsim","≿":"\\succsim","≾":"\\precsim","≹":"\\not\\overset{>}{<}","≸":"\\not\\overset{>}{<}","≷":"\\overset{>}{<}","≶":"\\overset{<}{>}","≵":"\\not\\geg","≴":"\\not\\leq","≳":"\\geg","≲":"\\leq","≬":"","≧":"\\geg","≦̸":"\\not\\leq","≦":"\\leq","≣":"\\overset{=}{=} ","≞":"\\overset{m}{=} ","≝":"\\overset{def}{=}","≘":"=","≖":"=","≕":"=:","≓":"\\doteq","≒":"\\doteq","≑":"\\doteq","≐":"\\doteq","≏̸":"","≏":"","≎̸":"","≎":"","≌":"\\approx","≋":"\\approx","≊":"\\approx","≂̸":"\\neq","≂":"=","∿":"\\sim","∾":"\\infty","∽̱":"\\sim","∽":"\\sim","∻":"\\sim","∺":":-:","∹":"-:","∸":"\\bot","∷":"::","∶":":","∣":"|","∟":"\\llcorner","∙":"\\cdot","∘":"\\circ","∗":"*","∕":"/","∎":"\\square","∍":"\\ni","∊":"\\in","∆":"\\Delta","⁄":"/","⪰̸":"\\nsucceq","⪰":"\\succeq","⪯̸":"\\npreceq","⪯":"\\preceq","⪈":"\\ngeqslant","⪇":"\\nleqslant","⧳":"\\Phi","⧦":"\\models","⧥":"\\not\\equiv","⧤":"\\approx\\neq","⧣":"\\neq","⧁":"\\circle","⧀":"\\circle","◦":"\\circle","◗":"\\circle","◖":"\\circle","●":"\\circle","◎":"\\circledcirc","◍":"\\circledcirc","◌":"\\circledcirc","◉":"\\circledcirc","◈":"\\diamond","◇":"\\diamond","◆":"\\diamond","◅":"\\triangleleft","◄":"\\triangleleft","◃":"\\triangleleft","◂":"\\triangleleft","◁":"\\triangleleft","◀":"\\triangleleft","▿":"\\triangledown","▾":"\\triangledown","▽":"\\triangledown","▼":"\\triangledown","▹":"\\triangleright","▸":"\\triangleright","▷":"\\triangleright","▶":"\\triangleright","▵":"\\triangle","▴":"\\triangle","△":"\\triangle","▱":"\\square","▰":"\\square","▯":"\\square","▮":"\\square","▭":"\\square","▫":"\\square","▪":"\\square","□":"\\square","■":"\\square","⋭":"\\not\\triangleright","⋬":"\\not\\triangleleft","⋫":"\\not\\triangleright","⋪":"\\not\\triangleleft","⋙":"\\ggg","⋘":"\\lll","⋗":"*>","⋖":"<*","⋔":"\\pitchfork","⋌":"","⋋":"","⋊":"\\rtimes","⋉":"\\ltimes","⊵":"\\triangleright","⊴":"","⊥":"\\bot","⊁":"\\nsucc","⊀":"\\preceq","≽":"\\succeq","≼":"\\preceq","≻":"\\succ","≺":"\\prec","≱":"\\geq/","≰":"\\leq/","≭":"\\neq","≫̸":"\\not\\gg","≫":"\\gg","≪̸":"\\not\\ll","≪":"\\ll","≩":"\\ngeqslant","≨":"\\nleqslant","≡":"\\equiv","≟":"\\doteq","≜":"\\triangleq","≛":"\\doteq","≚":"\\triangleq","≙":"\\triangleq","≗":"\\doteq","≔":":=","≍":"\\asymp","≇":"\\ncong","≆":"\\ncong","≅":"\\cong","≄":"\\not\\simeq","≃":"\\simeq","≁":"\\not\\sim","∦":"\\not\\parallel","∥":"\\parallel","∤":"\\not|","∝":"\\propto","==":"==","=":"=",":=":":=","/=":"=","-=":"-=","+=":"+=","*=":"*=","!=":"!=","≠":"\\neq","≢":"\\equiv /","≉":"\\approx /","∼":"sim","≈":"\\approx","≮":"</","<":"<","≯":">/",">=":">=",">":">","≥":"\\geq","≤":"\\leq","<=":"<=","⊋":"\\supsetneq","⊊":"\\subsetneq","⊉":"\\nsupseteq","⊈":"\\nsubseteq","⊇":"\\supseteq","⊆":"\\subseteq","⊅":"\\not\\supset","⊄":"\\not\\subset","⊃⃒":"\\supset |","⊃":"\\supset","⊂⃒":"\\subset |","⊂":"\\subset","∌":"\\not\\in","∉":"\\notin","∈":"\\in","∁":"C","∄":"\\nexists","∃":"\\exists","∀":"\\forall","∧":"\\land","&&":"\\&\\&","∨":"\\lor","⊯":"\\cancel{\\vDash}","⊮":"\\cancel{\\Vdash}","⊭":"\\nvDash","⊬":"\\nvDash","⊩":"\\Vdash","⊨":"\\vDash","⊤":"\\top","⊣":"\\dashv","⊢":"\\vdash","∋":"\\ni","⋱":"\\ddots","⋯":"\\hdots","⋮":"\\vdots","…":"\\hdots","϶":"\\ni",":":":","...":"\\cdots","..":"..","->":"->","∵":"\\because","∴":"\\therefore ","⁣":"",",":",",";":";","⧽":"\\}","⧼":"\\{","⦘":"\\]","⦗":"\\[","⦖":"\\ll","⦕":"\\gg","⦔":"\\gg","⦓":"\\ll","⦒":"\\gg","⦑":"\\ll","⦐":"\\]","⦏":"\\]","⦎":"\\]","⦍":"\\[","⦌":"\\[","⦋":"\\]","⦊":"\\triangleright","⦉":"\\triangleleft","⦈":"|\\)","⦇":"\\(|","⦆":"|\\)","⦅":"\\(\\(","⦄":"|\\}","⦃":"\\{|","⦀":"\\||","⟯":"\\left. \\right]","⟮":"\\left[ \\right.","⟭":"\\left. \\right]]","⟬":"\\left[[ \\right.","⟫":"\\gg","⟪":"\\ll","⟩":"\\rangle","⟨":"\\langle","⟧":"\\left. \\right]]","⟦":"\\left[[ \\right.","❳":"\\left.\\right)","❲":"\\left(\\right.","〉":"\\rangle","〈":"\\langle","⌋":"\\rfloor","⌊":"\\lfloor","⌉":"\\rceil","⌈":"\\lceil","‖":"\\parallel","}":"\\left.\\right}","{":"\\left{\\right.","]":"\\left]\\right.","[":"\\left[\\right.",")":"\\left.\\right)","(":"\\left(\\right.","”":'"',"“":"``","’":"'","‘":"`","%CE%B1":"\\alpha","%CE%B2":"\\beta","%CE%B3":"\\gamma","%CE%93":"\\Gamma","%CE%B4":"\\delta","%CE%94":"\\Delta","%CF%B5":"\\epsilon","%CE%B6":"\\zeta","%CE%B7":"\\eta","%CE%B8":"\\theta","%CE%98":"\\Theta","%CE%B9":"\\iota","%CE%BA":"\\kappa","%CE%BB":"\\lambda","%CE%BC":"\\mu","%CE%BD":"\\nu","%CE%BF":"\\omicron","%CF%80":"\\pi","%CE%A0":"\\Pi","%CF%81":"\\pho","%CF%83":"\\sigma","%CE%A3":"\\Sigma","%CF%84":"\\tau","%CF%85":"\\upsilon","%CE%A5":"\\Upsilon","%CF%95":"\\phi","%CE%A6":"\\Phi","%CF%87":"\\chi","%CF%88":"\\psi","%CE%A8":"\\Psi","%CF%89":"\\omega","%CE%A9":"\\Omega"}},9039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allMathOperatorsByGlyph=void 0,t.allMathOperatorsByGlyph={_:"\\underline","⏡":"\\underbrace","⏠":"\\overbrace","⏟":"\\underbrace","⏞":"\\overbrace","⏝":"\\underbrace","⏜":"\\overbrace","⎵":"\\underbrace","⎴":"\\overbrace","⃜":"\\square","⃛":"\\square","":"","⁗":"''''","‾":"\\overline","‷":"```","‶":"``","‵":"`","‴":"'''","″":"''","‟":"``","„":",,","‛":"`","‚":",","^":"\\hat","˷":"\\sim","˝":"\\sim","˜":"\\sim","˚":"\\circ","˙":"\\cdot","˘":" ",ˍ:"\\_",ˋ:"ˋ",ˊ:"ˊ",ˉ:"ˉ",ˇ:"",ˆ:"\\hat",º:"o","¹":"1","¸":",","´":"´","³":"3","²":"2","°":"\\circ","¯":"\\bar",ª:"a","↛":"\\nrightarrow","¨":"\\cdot\\cdot","~":"\\sim","`":"`","--":"--","++":"++","&":"\\&","∜":"\\sqrt[4]{}","∛":"\\sqrt[3]{}","√":"\\sqrt{}",ⅆ:"d",ⅅ:"\\mathbb{D}","?":"?","@":"@","//":"//","!!":"!!","!":"!","♯":"\\#","♮":"","♭":"","′":"'","<>":"<>","**":"\\star\\star","∇":"\\nabla","∂":"\\partial","⊙":"\\bigodot","¬":"\\neg","∢":"\\measuredangle","∡":"\\measuredangle","∠":"\\angle","÷":"\\div","/":"/","∖":"\\backslash","\\":"\\backslash","%":"\\%","⊗":"\\bigotimes","·":"\\cdot","⨿":"\\coprod","⨯":"\\times","⋅":"\\cdot","⊡":"\\boxdot","⊠":"\\boxtimes","":"","⁃":"-","•":"\\cdot",".":".","*":"\\star","∪":"\\cup","∩":"\\cap","∐":"\\coprod","∏":"\\prod","≀":"","⫿":"","⫼":"\\mid\\mid\\mid","⨉":"\\times","⨈":"","⨇":"","⨆":"\\sqcup","⨅":"\\sqcap","⨂":"\\otimes","⨀":"\\odot","⋂":"\\cap","⋁":"\\vee","⋀":"\\wedge","⨄":"\\uplus","⨃":"\\cup","⋃":"\\cup","⨜":"\\underline{\\int}","⨛":"\\overline{\\int}","⨚":"\\int","⨙":"\\int","⨘":"\\int","⨗":"\\int","⨖":"\\oint","⨕":"\\oint","⨔":"\\int","⨓":"\\int","⨒":"\\int","⨑":"\\int","⨐":"\\int","⨏":"\\bcancel{\\int}","⨎":"","⨍":"\\hcancel{\\int}","⨌":"\\iiiint","∳":"\\oint","∲":"\\oint","∱":"\\int","∰":"\\oiint","∯":"\\oiint","∮":"\\oint","∫":"\\int","⨁":"\\oplus","⊘":"\\oslash","⊖":"\\ominus","⊕":"\\oplus","∭":"\\iiint","∬":"\\iint","⨋":"","⨊":"","∑":"\\sum","⊟":"\\boxminus","⊞":"\\boxplus","∔":"\\dot{+}","∓":"+-","−":"-","±":"\\pm","-":"-","+":"+","⭆":"\\Rrightarrow","⭅":"\\Lleftarrow","⧴":":\\rightarrow","⧯":"","⧟":"\\bullet-\\bullet","⦟":"\\angle","⦞":"\\measuredangle","⦝":"\\measuredangle","⦜":"\\perp","⦛":"\\measuredangle","⦚":"","⦙":"\\vdots","⥿":"","⥾":"","⥽":"\\prec","⥼":"\\succ","⥻":"\\underset{\\rightarrow}{\\supset}","⥺":"","⥹":"\\underset{\\rightarrow}{\\subset}","⥸":"\\underset{\\rightarrow}{>}","⥷":"","⥶":"\\underset{\\leftarrow}{<}","⥵":"\\underset{\\approx}{\\rightarrow}","⥴":"\\underset{\\sim}{\\rightarrow}","⥳":"\\underset{\\sim}{\\leftarrow}","⥲":"\\overset{\\sim}{\\rightarrow}","⥱":"\\overset{=}{\\rightarrow}","⥰":"","⥯":"","⥮":"","⥭":"\\overline{\\rightharpoondown}","⥬":"\\underline{\\rightharpoonup}","⥫":"\\overline{\\leftharpoondown}","⥪":"\\underline{\\leftharpoonup}","⥩":"\\rightleftharpoons","⥨":"\\rightleftharpoons","⥧":"\\rightleftharpoons","⥦":"\\rightleftharpoons","⥥":"\\Downarrow","⥤":"\\Rightarrow","⥣":"\\Uparrow","⥢":"\\Leftarrow","⥡":"\\downarrow","⥠":"\\uparrow","⥟":"\\rightarrow","⥞":"\\leftarrow","⥝":"\\downarrow","⥜":"\\uparrow","⥛":"\\rightarrow","⥚":"\\leftarrow","⥙":"\\downarrow","⥘":"\\uparrow","⥗":"\\rightarrow","⥖":"\\leftarrow","⥕":"\\downarrow","⥔":"\\uparrow","⥓":"\\rightarrow","⥒":"\\leftarrow","⥑":"\\updownarrow","⥐":"\\leftrightarrow","⥏":"\\updownarrow","⥎":"\\leftrightarrow","⥍":"\\updownarrow","⥌":"\\updownarrow","⥋":"\\leftrightarrow","⥊":"\\leftrightarrow","⥉":"","⥈":"\\leftrightarrow","⥇":"\\nrightarrow","⥆":"","⥅":"","⥄":"\\rightleftarrows","⥃":"\\leftrightarrows","⥂":"\\rightleftarrows","⥁":"\\circlearrowright","⥀":"\\circlearrowleft","⤿":"\\rightarrow","⤾":"\\leftarrow","⤽":"\\leftarrow","⤼":"\\rightarrow","⤻":"\\rightarrow","⤺":"\\leftarrow","⤹":"\\downarrow","⤸":"\\downarrow","⤷":"\\Rsh","⤶":"\\Lsh","⤵":"\\downarrow","⤴":"\\uparrow","⤳":"\\rightarrow","⤲":"\\leftarrow","⤱":" ","⤰":" ","⤯":" ","⤮":" ","⤭":" ","⤬":"\\times","⤫":"\\times","⤪":" ","⤩":" ","⤨":" ","⤧":" ","⤦":" ","⤥":" ","⤤":" ","⤣":" ","⤢":" ","⤡":" ","⤠":"\\mapsto\\cdot","⤟":"\\cdot\\leftarrow","⤞":"\\rightarrow\\cdot","⤝":"\\leftarrow","⤜":"\\rightarrow","⤛":"\\leftarrow","⤚":"\\rightarrow","⤙":"\\leftarrow","⤘":"\\rightarrow","⤗":"\\rightarrow","⤖":"\\rightarrow","⤕":"\\rightarrow","⤔":"\\rightarrow","⤓":"\\downarrow","⤒":"\\uparrow","⤑":"\\rightarrow","⤐":"\\rightarrow","⤏":"\\rightarrow","⤎":"\\leftarrow","⤍":"\\rightarrow","⤌":"\\leftarrow","⤋":"\\Downarrow","⤊":"\\Uparrow","⤉":"\\uparrow","⤈":"\\downarrow","⤇":"\\Rightarrow","⤆":"\\Leftarrow","⤅":"\\mapsto","⤄":"\\nLeftrightarrow","⤃":"\\nRightarrow","⤂":"\\nLeftarrow","⤁":"\\rightsquigarrow","⤀":"\\rightsquigarrow","⟿":"\\rightsquigarrow","⟾":"\\Rightarrow","⟽":"\\Leftarrow","⟼":"\\mapsto","⟻":"\\leftarrow","⟺":"\\Longleftrightarrow","⟹":"\\Longrightarrow","⟸":"\\Longleftarrow","⟷":"\\leftrightarrow","⟶":"\\rightarrow","⟵":"\\leftarrow","⟱":"\\Downarrow","⟰":"\\Uparrow","⊸":"\\rightarrow","⇿":"\\leftrightarrow","⇾":"\\rightarrow","⇽":"\\leftarrow","⇼":"\\nleftrightarrow","⇻":"\\nrightarrow","⇺":"\\nleftarrow","⇹":"\\nleftrightarrow","⇸":"\\nrightarrow","⇷":"\\nleftarrow","⇶":"\\Rrightarrow","⇵":"","⇴":"\\rightarrow","⇳":"\\Updownarrow","⇲":"\\searrow","⇱":"\\nwarrow","⇰":"\\Leftarrow","⇯":"\\Uparrow","⇮":"\\Uparrow","⇭":"\\Uparrow","⇬":"\\Uparrow","⇫":"\\Uparrow","⇪":"\\Uparrow","⇩":"\\Downarrow","⇨":"\\Rightarrow","⇧":"\\Uparrow","⇦":"\\Leftarrow","⇥":"\\rightarrow","⇤":"\\leftarrow","⇣":"\\downarrow","⇢":"\\rightarrow","⇡":"\\uparrow","⇠":"\\leftarrow","⇟":"\\downarrow","⇞":"\\uparrow","⇝":"\\rightsquigarrow","⇜":"\\leftarrow","⇛":"\\Rrightarrow","⇚":"\\Lleftarrow","⇙":"\\swarrow","⇘":"\\searrow","⇗":"\\nearrow","⇖":"\\nwarrow","⇕":"\\Updownarrow","⇔":"\\Leftrightarrow","⇓":"\\Downarrow","⇒":"\\Rightarrow","⇑":"\\Uparrow","⇐":"\\Leftarrow","⇏":"\\nRightarrow","⇎":"\\nLeftrightarrow","⇍":"\\nLeftarrow","⇌":"\\rightleftharpoons","⇋":"\\leftrightharpoons","⇊":"\\downdownarrows","⇉":"\\rightrightarrows","⇈":"\\upuparrows","⇇":"\\leftleftarrows","⇆":"\\leftrightarrows","⇅":"","⇄":"\\rightleftarrows","⇃":"\\downharpoonleft","⇂":"\\downharpoonright","⇁":"\\rightharpoondown","⇀":"\\rightharpoonup","↿":"\\upharpoonleft","↾":"\\upharpoonright","↽":"\\leftharpoondown","↼":"\\leftharpoonup","↻":"\\circlearrowright","↺":"\\circlearrowleft","↹":"\\leftrightarrows","↸":"\\overline{\\nwarrow}","↷":"\\curvearrowright","↶":"\\curvearrowleft","↵":"\\swarrow","↴":"\\searrow","↳":"\\Rsh","↲":"\\Lsh","↱":"\\Rsh","↰":"\\Lsh","↯":"\\swarrow","↮":"","↭":"\\leftrightsquigarrow","↬":"\\looparrowright","↫":"\\looparrowleft","↪":"\\hookrightarrow","↩":"\\hookleftarrow","↨":"\\underline{\\updownarrow}","↧":"\\downarrow","↦":"\\rightarrowtail","↥":"\\uparrow","↤":"\\leftarrowtail","↣":"\\rightarrowtail","↢":"\\leftarrowtail","↡":"\\downarrow","↠":"\\twoheadrightarrow","↟":"\\uparrow","↞":"\\twoheadleftarrow","↝":"\\nearrow","↜":"\\nwarrow","↚":"","↙":"\\swarrow","↘":"\\searrow","↗":"\\nearrow","↖":"\\nwarrow","↕":"\\updownarrow","↔":"\\leftrightarrow","↓":"\\downarrow","→":"\\rightarrow","↑":"\\uparrow","←":"\\leftarrow","|||":"\\left|||\\right.","||":"\\left||\\right.","|":"\\mid","⫾":"","⫽":"//","⫻":"///","⫺":"","⫹":"","⫸":"","⫷":"","⫶":"\\vdots","⫵":"","⫴":"","⫳":"","⫲":"\\nparallel","⫱":"","⫰":"","⫯":"","⫮":"\\bcancel{\\mid}","⫭":"","⫬":"","⫫":"","⫪":"","⫩":"","⫨":"\\underline{\\perp}","⫧":"\\overline{\\top}","⫦":"","⫥":"","⫤":"","⫣":"","⫢":"","⫡":"","⫠":"\\perp","⫟":"\\top","⫞":"\\dashv","⫝̸":"","⫝":"","⫛":"\\pitchfork","⫚":"","⫙":"","⫘":"","⫗":"","⫖":"","⫕":"","⫔":"","⫓":"","⫒":"","⫑":"","⫐":"","⫏":"","⫎":"","⫍":"","⫌":"\\underset{\\neq}{\\supset}","⫋":"\\underset{\\neq}{\\subset}","⫊":"\\underset{\\approx}{\\supset}","⫉":"\\underset{\\approx}{\\subset}","⫈":"\\underset{\\sim}{\\supset}","⫇":"\\underset{\\sim}{\\subset}","⫆":"\\supseteqq","⫅":"\\subseteqq","⫄":"\\dot{\\supseteq}","⫃":"\\dot{\\subseteq}","⫂":"\\underset{\\times}{\\supset}","⫁":"\\underset{\\times}{\\subset}","⫀":"\\underset{+}{\\supset}","⪿":"\\underset{+}{\\subset}","⪾":"","⪽":"","⪼":"\\gg ","⪻":"\\ll","⪺":"\\underset{\\cancel{\\approx}}{\\succ}","⪹":"\\underset{\\cancel{\\approx}}{\\prec}","⪸":"\\underset{\\approx}{\\succ}","⪷":"\\underset{\\approx}{\\prec}","⪶":"\\underset{\\cancel{=}}{\\succ}","⪵":"\\underset{\\cancel{=}}{\\prec}","⪴":"\\underset{=}{\\succ}","⪳":"\\underset{=}{\\prec}","⪲":"","⪱":"","⪮":"","⪭":"\\underline{\\hcancel{>}}","⪬":"\\underline{\\hcancel{>}}","⪫":"\\hcancel{>}","⪪":"\\hcancel{<}","⪩":"","⪨":"","⪧":"\\vartriangleright","⪦":"\\vartriangleleft","⪥":"><","⪤":"><","⪣":"\\underline{\\ll}","⪢̸":"\\cancel{\\gg}","⪢":"\\gg","⪡̸":"\\cancel{\\ll}","⪡":"\\ll","⪠":"\\overset{\\sim}{\\geqq}","⪟":"\\overset{\\sim}{\\leqq}","⪞":"\\overset{\\sim}{>}","⪝":"\\overset{\\sim}{<}","⪜":"","⪛":"","⪚":"\\overset{=}{>}","⪙":"\\overset{=}{<}","⪘":"","⪗":"","⪖":"","⪕":"","⪔":"","⪓":"","⪒":"\\underset{=}{\\gtrless}","⪑":"\\underset{=}{\\lessgtr}","⪐":"\\underset{<}{\\gtrsim}","⪏":"\\underset{>}{\\lesssim}","⪎":"\\underset{\\simeq}{>}","⪍":"\\underset{\\simeq}{<}","⪌":"\\gtreqqless","⪋":"\\lesseqqgtr","⪊":"\\underset{\\cancel{\\approx}}{>}","⪉":"\\underset{\\approx}{<}","⪆":"\\underset{\\approx}{>}","⪅":"\\underset{\\approx}{<}","⪄":"","⪃":"","⪂":"","⪁":"","⪀":"","⩿":"","⩾̸":"\\bcancel{\\geq}","⩾":"\\geq","⩽̸":"\\bcancel{\\leq}","⩽":"\\leq","⩼":"","⩻":"","⩺":"","⩹":"","⩸":"\\overset{\\dots}{\\equiv}","⩷":"","⩶":"===","⩵":"==","⩴":"::=","⩳":"","⩲":"\\underset{=}{+}","⩱":"\\overset{=}{+}","⩰":"\\overset{\\approx}{=}","⩯":"\\overset{\\wedge}{=}","⩮":"\\overset{*}{=}","⩭":"\\dot{\\approx}","⩬":"","⩫":"","⩪":"\\dot{\\sim}","⩩":"","⩨":"","⩧":"\\dot{\\equiv}","⩦":"\\underset{\\cdot}{=}","⩥":"","⩤":"","⩣":"\\underset{=}{\\vee}","⩢":"\\overset{=}{\\vee}","⩡":"ul(vv)","⩠":"\\underset{=}{\\wedge}","⩟":"\\underline{\\wedge}","⩞":"\\overset{=}{\\wedge}","⩝":"\\hcancel{\\vee}","⩜":"\\hcancel{\\wedge}","⩛":"","⩚":"","⩙":"","⩘":"\\vee","⩗":"\\wedge","⩖":"","⩕":"","⩔":"","⩓":"","⩒":"\\dot{\\vee}","⩑":"\\dot{\\wedge}","⩐":"","⩏":"","⩎":"","⩍":"\\overline{\\cap}","⩌":"\\overline{\\cup}","⩋":"","⩊":"","⩉":"","⩈":"","⩇":"","⩆":"","⩅":"","⩄":"","⩃":"\\overline{\\cap}","⩂":"\\overline{\\cup}","⩁":"","⩀":"","⨾":"","⨽":"\\llcorner","⨼":"\\lrcorner","⨻":"","⨺":"","⨹":"","⨸":"","⨷":"","⨶":"\\hat{\\otimes}","⨵":"","⨴":"","⨳":"","⨲":"\\underline{\\times}","⨱":"\\underline{\\times}","⨰":"\\dot{\\times}","⨮":"\\bigodot","⨭":"\\bigodot","⨬":"","⨫":"","⨪":"","⨩":"","⨨":"","⨧":"","◻":"\\Box","⨦":"\\underset{\\sim}{+}","⨥":"\\underset{\\circ}{+}","⨤":"\\overset{\\sim}{+}","⨣":"\\hat{+}","⨢":"\\dot{+}","⨡":"\\upharpoonright","⨠":">>","⨟":"","⨞":"\\triangleleft","⨝":"\\bowtie","⧿":"","⧾":"+","⧻":"\\hcancel{|||}","⧺":"\\hcancel{||}","⧹":"\\backslash","⧸":"/","⧷":"hcancel{\backslash}","⧶":"","⧵":"\\backslash","⧲":"\\Phi","⧱":"","⧰":"","⧮":"","⧭":"","⧬":"","⧫":"\\lozenge","⧪":"","⧩":"","⧨":"","⧧":"\\ddagger","⧢":"\\sqcup\\sqcup","⧡":"","⧠":"\\square","⧞":"","⧝":"","⧜":"","⧛":"\\{\\{","⧙":"\\{","⧘":"\\}","⧗":"","⧖":"","⧕":"\\bowtie","⧔":"\\bowtie","⧓":"\\bowtie","⧒":"\\bowtie","⧑":"\\bowtie","⧐̸":"| \\not\\triangleright","⧐":"| \\triangleright","⧏̸":"\\not\\triangleleft |","⧏":"\\triangleleft |","⧎":"","⧍":"\\triangle","⧌":"","⧋":"\\underline{\\triangle}","⧊":"\\dot{\\triangle}","⧉":"","⧈":"\\boxed{\\circ}","⧇":"\\boxed{\\circ}","⧆":"\\boxed{\\rightarrow}","⧅":"\\bcancel{\\square}","⧄":"\\cancel{\\square}","⧃":"\\odot","⧂":"\\odot","⦿":"\\odot","⦾":"\\odot","⦽":"\\varnothing","⦼":"\\oplus","⦻":"\\otimes","⦺":"","⦹":"\\varnothing","⦸":"\\varnothing","⦷":"\\ominus","⦶":"\\ominus","⦵":"\\ominus","⦴":"\\vec{\\varnothing}","⦳":"\\vec{\\varnothing}","⦲":"\\dot{\\varnothing}","⦱":"\\overline{\\varnothing}","⦰":"\\varnothing","⦯":"\\measuredangle","⦮":"\\measuredangle","⦭":"\\measuredangle","⦬":"\\measuredangle","⦫":"\\measuredangle","⦪":"\\measuredangle","⦩":"\\measuredangle","⦨":"\\measuredangle","⦧":"","⦦":"","⦥":"","⦤":"","⦣":"\\ulcorner","⦢":"\\measuredangle","⦡":"\\not\\lor","⦠":"\\bcancel{>}","⦂":":","⦁":"\\cdot","❘":"\\mid","▲":"\\bigtriangleup","⋿":"\\Epsilon","⋾":"\\overline{\\ni}","⋽":"\\overline{\\ni}","⋼":"\\in","⋻":"\\in","⋺":"\\in","⋹":"\\underline{\\in}","⋸":"\\underline{\\in}","⋷":"\\overline{\\in}","⋶":"\\overline{\\in}","⋵":"\\dot{\\in}","⋴":"\\in","⋳":"\\in","⋲":"\\in","⋰":"\\ddots","։":":","⋩":"\\underset{\\sim}{\\succ}","⋨":"\\underset{\\sim}{\\prec}","⋧":"\\underset{\\not\\sim}{>}","⋦":"\\underset{\\not\\sim}{<}","⋥":"\\not\\sqsupseteq","⋤":"\\not\\sqsubseteq","⋣":"\\not\\sqsupseteq","⋢":"\\not\\sqsubseteq","⋡":"\\nsucc","⋠":"\\nprec","⋟":"\\succ","⋞":"\\prec","⋝":"\\overline{>}","⋜":"\\overline{<}","⋛":"\\underset{>}{\\leq}","⋚":"\\underset{<}{\\geq}","⋕":"\\#","⋓":"\\cup","⋒":"\\cap","⋑":"\\supset","⋐":"\\subset","⋏":"\\wedge","⋎":"\\vee","⋍":"\\simeq","⋈":"\\Join","⋇":"\\ast","⋆":"\\star","⋄":"\\diamond","⊿":"\\triangle","⊾":"\\measuredangle","⊽":"\\overline{\\lor}","⊼":"\\overline{\\land}","⊻":"\\underline{\\lor}","⊺":"\\top",土:"\\pm",十:"+","⊹":"","⊷":"\\circ\\multimap","⊶":"\\circ\\multimap","⊳":"\\triangleright","⊲":"\\triangleleft","⊱":"\\succ","⊰":"\\prec","⊫":"|\\models","⊪":"|\\models","⊧":"\\models","⊦":"\\vdash","⊝":"\\ominus","⊜":"\\ominus","⊛":"\\odot","⊚":"\\odot","⊔":"\\sqcup","⊓":"\\sqcap","⊒":"\\sqsupseteq","⊑":"\\sqsubseteq","⊐̸":"\\not\\sqsupset","⊐":"\\sqsupset","⊏̸":"\\not\\sqsubset","⊏":"\\sqsubset","⊎":"\\cup","⊍":"\\cup","⊌":"\\cup","≿̸":"\\not\\succsim","≿":"\\succsim","≾":"\\precsim","≹":"\\not\\overset{>}{<}","≸":"\\not\\overset{>}{<}","≷":"\\overset{>}{<}","≶":"\\overset{<}{>}","≵":"\\not\\geg","≴":"\\not\\leq","≳":"\\geg","≲":"\\leq","≬":"","≧":"\\geg","≦̸":"\\not\\leq","≦":"\\leq","≣":"\\overset{=}{=} ","≞":"\\overset{m}{=} ","≝":"\\overset{def}{=}","≘":"=","≖":"=","≕":"=:","≓":"\\doteq","≒":"\\doteq","≑":"\\doteq","≐":"\\doteq","≏̸":"","≏":"","≎̸":"","≎":"","≌":"\\approx","≋":"\\approx","≊":"\\approx","≂̸":"\\neq","≂":"=","∿":"\\sim","∾":"\\infty","∽̱":"\\sim","∽":"\\sim","∻":"\\sim","∺":":-:","∹":"-:","∸":"\\bot","∷":"::","∶":":","∣":"\\mid","∟":"\\llcorner","∘":"\\circ","∗":"*","∕":"/","∎":"\\square","∍":"\\ni","∊":"\\in","∆":"\\Delta","⁄":"/","⪰̸":"\\nsucceq","⪰":"\\succeq","⪯̸":"\\npreceq","⪯":"\\preceq","⪈":"\\ngeqslant","⪇":"\\nleqslant","⧳":"\\Phi","⧦":"\\models","⧥":"\\not\\equiv","⧤":"\\approx\\neq","⧣":"\\neq","⧁":"\\circle","⧀":"\\circle","◦":"\\circle","◗":"\\circle","◖":"\\circle","●":"\\circle","◎":"\\circledcirc","◍":"\\circledcirc","◌":"\\circledcirc","◉":"\\circledcirc","◈":"\\diamond","◇":"\\diamond","◆":"\\diamond","◅":"\\triangleleft","◄":"\\triangleleft","◃":"\\triangleleft","◂":"\\triangleleft","◁":"\\triangleleft","◀":"\\triangleleft","▿":"\\triangledown","▾":"\\triangledown","▽":"\\triangledown","▼":"\\triangledown","▹":"\\triangleright","▸":"\\triangleright","▷":"\\triangleright","▶":"\\triangleright","▵":"\\triangle","▴":"\\triangle","△":"\\triangle","▱":"\\square","▰":"\\blacksquare","▯":"\\square","▮":"\\blacksquare","▭":"\\square","▫":"\\square","▪":"\\square","□":"\\square","■":"\\blacksquare","⋭":"\\not\\triangleright","⋬":"\\not\\triangleleft","⋫":"\\not\\triangleright","⋪":"\\not\\triangleleft","⋙":"\\ggg","⋘":"\\lll","⋗":"*>","⋖":"<*","⋔":"\\pitchfork","⋌":"","⋋":"\\bowtie","⋊":"\\ltimes","⋉":"\\rtimes","⊵":"\\triangleright","\\triangleleft":"","⊥":"\\bot","⊁":"\\nsucc","⊀":"\\preceq","≽":"\\succeq","≼":"\\preceq","≻":"\\succ","≺":"\\prec","≱":"\\geq/","≰":"\\leq/","≭":"\\neq","≫̸":"\\not\\gg","≫":"\\gg","≪̸":"\\not\\ll","≪":"\\ll","≩":"\\ngeqslant","≨":"\\nleqslant","≡":"\\equiv","≟":"\\doteq","≜":"\\triangleq","≛":"\\doteq","≚":"\\triangleq","≙":"\\triangleq","≗":"\\doteq","≔":":=","≍":"\\asymp","≇":"\\ncong","≆":"\\ncong","≅":"\\cong","≄":"\\not\\simeq","≃":"\\simeq","≁":"\\not\\sim","∦":"\\not\\parallel","∥":"\\parallel","∤":"\\not|","∝":"\\propto","==":"==","=":"=",":=":":=","/=":"=","-=":"-=","+=":"+=","*=":"*=","!=":"!=","≠":"\\neq","≢":"\\equiv /","≉":"\\approx /","∼":"sim","≈":"\\approx","≮":"</","<":"<","≯":">/",">=":">=",">":">","≥":"\\geq","≤":"\\leq","<=":"<=","⊋":"\\supsetneq","⊊":"\\subsetneq","⊉":"\\nsupseteq","⊈":"\\nsubseteq","⊇":"\\supseteq","⊆":"\\subseteq","⊅":"\\not\\supset","⊄":"\\not\\subset","⊃⃒":"\\supset |","⊃":"\\supset","⊂⃒":"\\subset |","⊂":"\\subset","∌":"\\not\\in","∉":"\\notin","∈":"\\in","∁":"C","∄":"\\nexists","∃":"\\exists","∀":"\\forall","∧":"\\land","&&":"\\&\\&","∨":"\\lor","⊯":"\\cancel{\\vDash}","⊮":"\\cancel{\\Vdash}","⊭":"\\nvDash","⊬":"\\nvDash","⊩":"\\Vdash","⊨":"\\vDash","⊤":"\\top","⊣":"\\dashv","⊢":"\\vdash","∋":"\\ni","⋱":"\\ddots","⋯":"\\hdots","⋮":"\\vdots","϶":"\\ni",":":":","...":"\\cdots","..":"..","->":"->","∵":"\\because","∴":"\\therefore ","":"\\llbracket",",":",",";":";","⧽":"\\}","⧼":"\\{","⦘":"\\]","⦗":"\\[","⦖":"\\ll","⦕":"\\gg","⦔":"\\gg","⦓":"\\ll","⦒":"\\gg","⦑":"\\ll","⦐":"\\]","⦏":"\\]","⦎":"\\]","⦍":"\\[","⦌":"\\[","⦋":"\\]","⦊":"\\triangleright","⦉":"\\triangleleft","⦈":"|\\)","⦇":"\\(|","⦆":"|\\)","⦅":"\\(\\(","⦄":"|\\}","⦃":"\\{|","⦀":"\\||","⟯":"\\left. \\right]","⟮":"\\left[ \\right.","⟭":"\\left. \\right]]","⟬":"\\left[[ \\right.","⟫":"\\gg","⟪":"\\ll","⟧":"\\)|","⟦":"\\(|","❳":"\\left.\\right)","❲":"\\left(\\right.","〉":"\\rangle","〈":"\\langle","⌋":"\\rfloor","⌊":"\\lfloor","⌉":"\\rceil","⌈":"\\lceil","‖":"\\parallel","}":"\\left.\\right}","{":"\\left{\\right.","]":"\\left]\\right.","[":"\\left[\\right.",")":"\\left.\\right)","(":"\\left(\\right.","”":'\\"',"“":"\\text{``}","’":"'","‘":"`",α:"\\alpha",β:"\\beta",γ:"\\gamma",Γ:"\\Gamma",δ:"\\delta",Δ:"\\Delta",ϵ:"\\epsilon",ζ:"\\zeta",η:"\\eta",θ:"\\theta",Θ:"\\Theta",ι:"\\iota",κ:"\\kappa",λ:"\\lambda",ν:"\\nu",ο:"\\omicron",π:"\\pi",Π:"\\Pi",ρ:"\\rho",σ:"\\sigma",Σ:"\\Sigma",τ:"\\tau",υ:"\\upsilon",Υ:"\\Upsilon",ϕ:"\\phi",Φ:"\\Phi",χ:"\\chi",ψ:"\\psi",Ψ:"\\Psi",ω:"\\omega",Ω:"\\Omega",Ω:"\\Omega","∅":"\\emptyset","⟲":"\\circlearrowleft","⟳":"\\circlearrowright","×":"\\times","½":"\\dfrac{1}{2}",μ:"\\mu",Ө:"\\theta","✓":"\\checkmark","⟩":"\\rangle","⟨":"\\langle","¼":"\\dfrac{1}{4}","…":"\\ldots",ℏ:"\\hbar",ℜ:"\\mathfrak{R}",Ѳ:"\\theta",Ø:"\\emptyset",ϱ:"\\varrho",ф:"\\phi",ℇ:"\\varepsilon",T:"T","∙":"\\cdot",Ρ:"P","∞":"\\infty",ᐁ:"\\nabla",ƞ:"\\eta","⁺":"^{+}","⁻":"^{-}","⁼":"^{=}","⁽":"^{(}","⁾":"^{)}","〗":"\\)|","〖":"\\langle",";":";","൦":"\\circ","┴":"\\perp","✕":"\\times","⎻":"-","»":"\\gg","⬆":"\\uparrow","⬇":"\\downarrow","⬅":"\\leftarrow","➡":"\\rightarrow","⎼":"-","⎜":"\\mid","⎥":"\\mid",ħ:"\\hbar","⮕":"\\rightarrow","・":"\\cdot","¦":"\\mid","£":"\\pounds","¥":"\\yen","✗":"\\times","✔":"\\checkmark",ⁿ:"^{n}","«":"\\ll",เ:"\\prime","†":"\\dagger","│":"\\mid",$:"\\$","#":"\\#","℃":"\\text{\\textdegree C}","℉":"\\text{\\textdegree F}","█":"\\blacksquare","℧":"\\mho",ⅇ:"\\text{e}",ɼ:"r","‡":"\\ddagger",ἱ:"i",ϒ:"\\Upsilon",𝛿:"\\delta","˳":"\\cdot",ѳ:"\\theta",𝜙:"\\phi",П:"\\prod",о:"o",ђ:"\\hbar",Ʌ:"\\Lambda","।":"\\mid","€":"\\euro",ῡ:"\\bar{u}",φ:"\\varphi",ȼ:"c",𝞮:"\\epsilon",Χ:"\\mathsf{X}",ₙ:"_{n}"}},8249:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allMathSymbolsByChar=void 0,t.allMathSymbolsByChar={" ":"\\textrm{ }","∃":"\\exists","∀":"\\forall","⇔":"\\iff","⇒":"=>","¬":"\\neg","ℤ":"\\mathbb{Z}","ℝ":"\\mathbb{R}","ℚ":"\\mathbb{Q}","ℕ":"\\mathbb{N}","ℂ":"CC","□":"\\square","⋄":"\\diamond","△":"\\triangle","⌢":"\\frown","∠":"\\angle","⋱":"\\ddots","⋮":"\\vdots","∵":"\\because","∴":"\\therefore","ℵ":"\\aleph","∅":"\\oslash","±":"\\pm","∇":"\\nabla","∂":"\\partial","∮":"\\oint","∫":"\\int","⋃":"\\cup","∪":"\\cup","⋂":"\\cap","∩":"\\cap","⋁":"\\vee","∨":"\\vee","⋀":"\\wedge","∧":"\\wedge","∏":"\\prod","∑":"\\sum","⊙":"\\bigodot","⊗":"\\bigoplus","⊕":"o+","∘":"@","⋈":"\\bowtie","⋊":"\\rtimes","⋉":"\\ltimes","÷":"\\div","×":"\\times","\\":"\\backslash","⋆":"\\star","∗":"\\star","⋅":"\\cdot","Ω":"\\Omega","ω":"\\omega","Ψ":"\\Psi","ψ":"\\psi","χ":"\\chi","φ":"\\varphi","Φ":"\\Phi","ϕ":"\\phi","υ":"\\upsilon","τ":"\\tau","Σ":"\\Sigma","σ":"\\sigma","ρ":"\\rho","Π":"\\Pi","π":"\\pi","Ξ":"\\Xi","ξ":"\\xi","ν":"\\nu","μ":"\\mu","Λ":"\\Lambda","λ":"\\lambda","κ":"\\kappa","ι":"\\iota","ϑ":"\\vartheta","Θ":"\\Theta","θ":"\\theta","η":"\\eta","ζ":"\\zeta","ɛ":"\\varepsilon","ε":"\\epsilon","Δ":"\\Delta","δ":"\\delta","Γ":"\\Gamma","γ":"\\gamma","β":"\\beta","α":"\\alpha","∞":"\\infty","":"\\text{\\textdir TRT}","":"\\text{\\textdir LTR}"}},8171:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allMathSymbolsByGlyph=void 0,t.allMathSymbolsByGlyph={" ":"\\textrm{ }","∃":"\\exists","∀":"\\forall","⇔":"\\iff","⇒":"\\Rightarrow","¬":"\\neg","□":"\\square","⋄":"\\diamond","△":"\\triangle","⌢":"\\frown","∠":"\\angle","⋱":"\\ddots","⋮":"\\vdots","∵":"\\because","∴":"\\therefore",ℵ:"\\aleph","∅":"\\emptyset","±":"\\pm","∇":"\\nabla","∂":"\\partial","∮":"\\oint","∫":"\\int","⋃":"\\cup","∪":"\\cup","⋂":"\\cap","∩":"\\cap","⋁":"\\vee","∨":"\\vee","⋀":"\\wedge","∧":"\\wedge","∏":"\\prod","∑":"\\sum","⊙":"\\bigodot","⊗":"\\bigoplus","⊕":"o+","∘":"@","⋈":"\\bowtie","⋊":"\\rtimes","⋉":"\\ltimes","÷":"\\div","×":"\\times","\\":"\\backslash","⋆":"\\star","∗":"\\star","⋅":"\\cdot",Ω:"\\Omega",ω:"\\omega",Ψ:"\\Psi",ψ:"\\psi",χ:"\\chi",φ:"\\varphi",Φ:"\\Phi",ϕ:"\\phi",υ:"\\upsilon",τ:"\\tau",Σ:"\\Sigma",σ:"\\sigma",ρ:"\\rho",Π:"\\Pi",π:"\\pi",Ξ:"\\Xi",ξ:"\\xi",ν:"\\nu",μ:"\\mu",Λ:"\\Lambda",λ:"\\lambda",κ:"\\kappa",ι:"\\iota",ϑ:"\\vartheta",Θ:"\\Theta",θ:"\\theta",η:"\\eta",ζ:"\\zeta",ɛ:"\\varepsilon",ε:"\\epsilon",Δ:"\\Delta",δ:"\\delta",Γ:"\\Gamma",γ:"\\gamma",β:"\\beta",α:"\\alpha","∞":"\\infty",ϵ:"\\epsilon",µ:"\\mu","²":"^{2}",ı:"\\imath","∎":"\\blacksquare",ม:"\\mathbf{m}",Ω:"\\Omega","⟲":"\\circlearrowleft","⟳":"\\circlearrowright",त:" ","¥":"\\yen","⁽":"^{(}","⁾":"^{)}",ß:"\\ss",Ћ:"\\hbar","⦵":"\\ominus","⊿":"\\bigtriangleup","↛'":"\\nrightarrow","†":"\\dagger",เ:"\\prime",白:" ","⿱":" ",ℸ:"\\wp",퓰:" ",ⁿ:"^{n}","✔":"\\checkmark","✗":"\\times","½":"\\dfrac{1}{2}",Ө:"\\theta","✓":"\\checkmark","⟩":"\\rangle","⟨":"\\langle","〈":"\\langle","¼":"\\dfrac{1}{4}","…":"\\ldots",ℏ:"\\hbar",ℜ:"\\mathfrak{R}",Ѳ:"\\theta",Ø:"\\emptyset",ϱ:"\\varrho",ф:"\\phi",T:"T","∙":"\\cdot",Ρ:"P",ᐁ:"\\nabla",ƞ:"\\eta",ɣ:"\\gamma",ћ:"\\hbar",Ɛ:"\\varepsilon",ⅅ:"\\_{D}",𝜆:"\\lambda","〗":"\\rangle","〖":"\\langle",";":";",𝑥:"x",𝑦:"y",𝑧:"z",𝑖:"i",𝑗:"j",𝑘:"k",𝑚:"m",𝑒:"e",𝑟:"r",ɳ:"\\eta",𝛽:"\\beta","⍵":"\\omega",℘:"\\wp",𝜋:"\\pi",Є:"\\epsilon",є:"\\epsilon",𝜀:"\\epsilon",п:"\\pi",Ν:"\\nu",ɵ:"\\theta",𝜓:"\\psi",ϴ:"\\theta",ɸ:"\\phi",Ӷ:"\\Gamma",ɭ:"\\ell",ʋ:"\\upsilon",𝛟:"\\varphi","⍬":"\\theta",Ф:"\\Phi",𝜑:"\\varphi",ⅈ:"i",ο:"o",ơ:"o",ƒ:"f","⍴":"\\rho","🇽":"x",𝑝:"p",𝑞:"q",𝑠:"s",𝑡:"t",𝑢:"u",𝑣:"v",𝑤:"w",𝑎:"a",𝑏:"b",𝑐:"c",𝑑:"d",𝑓:"f",𝑔:"g",𝑙:"l",𝑛:"n",𝑜:"o",𝔀:"w",𝚟:"v",ṁ:"m","൦":"\\circ","┴":"\\perp","✕":"\\times","∣":"\\mid",Փ:"\\Phi","⎜":"\\mid",ħ:"\\hbar",ፈ:" ","⦨":"\\llbracket",ế:"\\hat{e}","¢":"\\cent","⤹":"\\downarrow","⤸":"\\downarrow","⤷":"\\Rsh","⤶":"\\Lsh","⤵":"\\downarrow","⤴":"\\uparrow","⤳":"\\rightarrow","|":"\\mid","⎥":"\\mid","♥":"\\heartsuit",О:"0",Υ:"Y",х:"x",𝓏:"z",𝓎:"y",𝓍:"x",р:"p",а:"a","£":"\\pounds",m:"m",𝚵:"\\Xi","⓪":"\\textcircled{0}","①":"\\textcircled{1}","②":"\\textcircled{2}","③":"\\textcircled{3}","④":"\\textcircled{4}","⑤":"\\textcircled{5}","⑥":"\\textcircled{6}","⑦":"\\textcircled{7}","⑧":"\\textcircled{8}","⑨":"\\textcircled{9}","⑩":"\\textcircled{10}","⑪":"\\textcircled{11}","⑫":"\\textcircled{12}","⑬":"\\textcircled{13}","⑭":"\\textcircled{14}","⑮":"\\textcircled{15}","⑯":"\\textcircled{16}","⑰":"\\textcircled{17}","⑱":"\\textcircled{18}","⑲":"\\textcircled{19}","⑳":"\\textcircled{20}","㉑":"\\textcircled{21}","㉒":"\\textcircled{22}","㉓":"\\textcircled{23}","㉔":"\\textcircled{24}","㉕":"\\textcircled{25}","㉖":"\\textcircled{26}","㉗":"\\textcircled{27}","㉘":"\\textcircled{28}","㉙":"\\textcircled{29}","㉚":"\\textcircled{30}","㉛":"\\textcircled{31}","㉜":"\\textcircled{32}","㉝":"\\textcircled{33}","㉞":"\\textcircled{34}","㉟":"\\textcircled{35}","㊱":"\\textcircled{36}","㊲":"\\textcircled{37}","㊳":"\\textcircled{38}","㊴":"\\textcircled{39}","㊵":"\\textcircled{40}","㊶":"\\textcircled{41}","㊷":"\\textcircled{42}","㊸":"\\textcircled{43}","㊹":"\\textcircled{44}","㊺":"\\textcircled{45}","㊻":"\\textcircled{46}","㊼":"\\textcircled{47}","㊽":"\\textcircled{48}","㊾":"\\textcircled{49}","㊿":"\\textcircled{50}","&":"\\&","‖":"\\parallel","%":"\\%","“":"\\text{``}",$:"\\$","#":"\\#","℃":"\\text{\\textdegree C}","℉":"\\text{\\textdegree F}","█":"\\blacksquare","℧":"\\mho","⌋":"\\rfloor","⌊":"\\lfloor","⌉":"\\rceil","⌈":"\\lceil",ℇ:"\\varepsilon",ⅇ:"\\text{e}",ɼ:"r","↛":"\\nrightarrow",ˆ:"\\hat{}","‾":"\\overline","→":"\\rightarrow","‡":"\\ddagger","・":"\\cdot","▱":"\\square","∆":"\\Delta",ἱ:"i","∡":"\\angle",ϒ:"\\Upsilon","↓":"\\downarrow","↑":"\\uparrow","»":"\\gg","⊤":"\\top","⧸":"/",𝛿:"\\delta","˳":"\\cdot","։":":","⦪":"\\measuredangle","⦩":"\\measuredangle","⦫":"\\measuredangle","⦁":"\\cdot",ѳ:"\\theta","⦢":"\\measuredangle","¸":",","⎻":"\\overline","⟦":"\\llbracket",𝜙:"\\phi",П:"\\prod",о:"o","≈":"\\approx","≤":"\\leq",ђ:"\\hbar",Ʌ:"\\Lambda",土:"\\pm","⎼":"-",十:"+","≠":"\\neq","←":"\\leftarrow","।":"\\mid","€":"\\euro","˘":" ",ῡ:"\\bar{u}","∥":"\\parallel","↔":"\\leftrightarrow","√":"\\sqrt{}",ȼ:"c",𝞮:"\\epsilon","·":"\\cdot","⦬":"\\measuredangle","⦮":"\\measuredangle","⦭":"\\measuredangle","«":"\\ll",Χ:"\\mathsf{X}","│":"\\mid","〉":"\\rangle",ₙ:"_{n}","▫":"\\square","●":"\\circle","”":'\\"'}},5406:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(2965),t),a(r(9039),t),a(r(8249),t),a(r(8171),t),a(r(472),t),a(r(4320),t),a(r(6122),t)},472:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.latexAccents=void 0,t.latexAccents=["\\hat","\\bar","\\underbrace","\\overbrace"]},4320:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mathNumberByGlyph=void 0,t.mathNumberByGlyph={"₀":"_{0}","₁":"_{1}","₂":"_{2}","₃":"_{3}","₄":"_{4}","₅":"_{5}","₆":"_{6}","₇":"_{7}","₈":"_{8}","₉":"_{9}","⁰":"^{0}","¹":"^{1}","²":"^{2}","³":"^{3}","⁴":"^{4}","⁵":"^{5}","⁶":"^{6}","⁷":"^{7}","⁸":"^{8}","⁹":"^{9}",ⁿ:"^{n}",ₙ:"_{n}","⓪":"\\textcircled{0}","①":"\\textcircled{1}","②":"\\textcircled{2}","③":"\\textcircled{3}","④":"\\textcircled{4}","⑤":"\\textcircled{5}","⑥":"\\textcircled{6}","⑦":"\\textcircled{7}","⑧":"\\textcircled{8}","⑨":"\\textcircled{9}","⑩":"\\textcircled{10}","⑪":"\\textcircled{11}","⑫":"\\textcircled{12}","⑬":"\\textcircled{13}","⑭":"\\textcircled{14}","⑮":"\\textcircled{15}","⑯":"\\textcircled{16}","⑰":"\\textcircled{17}","⑱":"\\textcircled{18}","⑲":"\\textcircled{19}","⑳":"\\textcircled{20}","㉑":"\\textcircled{21}","㉒":"\\textcircled{22}","㉓":"\\textcircled{23}","㉔":"\\textcircled{24}","㉕":"\\textcircled{25}","㉖":"\\textcircled{26}","㉗":"\\textcircled{27}","㉘":"\\textcircled{28}","㉙":"\\textcircled{29}","㉚":"\\textcircled{30}","㉛":"\\textcircled{31}","㉜":"\\textcircled{32}","㉝":"\\textcircled{33}","㉞":"\\textcircled{34}","㉟":"\\textcircled{35}","㊱":"\\textcircled{36}","㊲":"\\textcircled{37}","㊳":"\\textcircled{38}","㊴":"\\textcircled{39}","㊵":"\\textcircled{40}","㊶":"\\textcircled{41}","㊷":"\\textcircled{42}","㊸":"\\textcircled{43}","㊹":"\\textcircled{44}","㊺":"\\textcircled{45}","㊻":"\\textcircled{46}","㊼":"\\textcircled{47}","㊽":"\\textcircled{48}","㊾":"\\textcircled{49}","㊿":"\\textcircled{50}","½":"\\dfrac{1}{2}","⅓":"\\dfrac{1}{3}","⅔":"\\dfrac{2}{3}","¼":"\\dfrac{1}{4}","¾":"\\dfrac{3}{4}","⅕":"\\dfrac{1}{5}","⅖":"\\dfrac{2}{5}","⅗":"\\dfrac{3}{5}","⅘":"\\dfrac{4}{5}","⅙":"\\dfrac{1}{6}","⅚":"\\dfrac{5}{6}","⅐":"\\dfrac{1}{7}","⅛":"\\dfrac{1}{8}","⅜":"\\dfrac{3}{8}","⅝":"\\dfrac{5}{8}","⅞":"\\dfrac{7}{8}","⅑":"\\dfrac{1}{9}","⅒":"\\dfrac{1}{10}"}},6122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashUTF8ToLtXConverter=void 0,t.HashUTF8ToLtXConverter=class{convert(e){if(e.match(/[a-z0-9]/i))return e;const t=r[e];return t?this.convertAccentCharToLtX(t)||e:this.convertSpecialCharToLtX(e)||e}convertAccentCharToLtX(e){const{char:t,accent:r}=e,a=n[r];return a?`\\${a}{${t}}`:null}convertSpecialCharToLtX(e){const t=a[e];if(!t)return null;const{letter:r,fontCmd:n}=t;return`\\${n}{${r}}`}};const r={á:{char:"a",accent:"´"},à:{char:"a",accent:"`"},â:{char:"a",accent:"^"},ã:{char:"a",accent:"~"},ä:{char:"a",accent:"¨"},å:{char:"a",accent:"˚"},ą:{char:"a",accent:"˙"},ă:{char:"a",accent:"˘"},ǎ:{char:"a",accent:"ˇ"},ǟ:{char:"a",accent:"ˆ"},ǻ:{char:"a",accent:"˙"},ǡ:{char:"a",accent:"-"},ā:{char:"a",accent:"-"},é:{char:"e",accent:"´"},è:{char:"e",accent:"`"},ê:{char:"e",accent:"^"},ë:{char:"e",accent:"¨"},ę:{char:"e",accent:"˙"},ě:{char:"e",accent:"ˇ"},ȇ:{char:"i",accent:"^"},ё:{char:"e",accent:"¨"},ē:{char:"e",accent:"-"},í:{char:"i",accent:"´"},ì:{char:"i",accent:"`"},î:{char:"i",accent:"^"},ï:{char:"i",accent:"¨"},į:{char:"i",accent:"˙"},ǐ:{char:"i",accent:"ˇ"},ȉ:{char:"i",accent:"`"},ȋ:{char:"i",accent:"¨"},ī:{char:"i",accent:"-"},ó:{char:"o",accent:"´"},ò:{char:"o",accent:"`"},ô:{char:"o",accent:"^"},õ:{char:"o",accent:"~"},ö:{char:"o",accent:"¨"},ő:{char:"o",accent:"˝"},ǒ:{char:"o",accent:"ˇ"},ȍ:{char:"o",accent:"`"},ȏ:{char:"o",accent:"¨"},ȫ:{char:"o",accent:"˘"},ȭ:{char:"o",accent:"˝"},ȯ:{char:"o",accent:"˙"},ō:{char:"o",accent:"-"},ú:{char:"u",accent:"´"},ù:{char:"u",accent:"`"},û:{char:"u",accent:"^"},ü:{char:"u",accent:"¨"},ű:{char:"u",accent:"˝"},ǔ:{char:"u",accent:"ˇ"},ǖ:{char:"u",accent:"¨"},ǘ:{char:"u",accent:"¨"},ǚ:{char:"u",accent:"¨"},ǜ:{char:"u",accent:"¨"},ȕ:{char:"u",accent:"`"},ȗ:{char:"u",accent:"¨"},ū:{char:"u",accent:"-"},ý:{char:"y",accent:"´"},ỳ:{char:"y",accent:"`"},ŷ:{char:"y",accent:"^"},ÿ:{char:"y",accent:"¨"},ȳ:{char:"y",accent:"-"},Á:{char:"A",accent:"´"},À:{char:"A",accent:"`"},Â:{char:"A",accent:"^"},Ã:{char:"A",accent:"~"},Ä:{char:"A",accent:"¨"},Å:{char:"A",accent:"˚"},Å:{char:"A",accent:"˚"},Ȧ:{char:"A",accent:"˙"},Ă:{char:"A",accent:"˘"},Ǎ:{char:"A",accent:"ˇ"},Ǟ:{char:"A",accent:"˝"},Ǻ:{char:"A",accent:"˚"},Ǡ:{char:"A",accent:"-"},Ā:{char:"A",accent:"-"},É:{char:"E",accent:"´"},È:{char:"E",accent:"`"},Ė:{char:"E",accent:"˙"},Ê:{char:"E",accent:"^"},Ë:{char:"E",accent:"¨"},Ě:{char:"E",accent:"ˇ"},Ȅ:{char:"E",accent:"`"},Ȇ:{char:"E",accent:"¨"},Ē:{char:"E",accent:"-"},Í:{char:"I",accent:"´"},Ì:{char:"I",accent:"`"},Î:{char:"I",accent:"^"},Ï:{char:"I",accent:"¨"},Ĭ:{char:"I",accent:"˘"},Ǐ:{char:"I",accent:"ˇ"},Ȉ:{char:"I",accent:"`"},Ȋ:{char:"I",accent:"¨"},Ī:{char:"I",accent:"-"},Ó:{char:"O",accent:"´"},Ò:{char:"O",accent:"`"},Ô:{char:"O",accent:"^"},Õ:{char:"O",accent:"~"},Ö:{char:"O",accent:"¨"},Ő:{char:"O",accent:"˝"},Ǒ:{char:"O",accent:"ˇ"},Ȍ:{char:"O",accent:"`"},Ȏ:{char:"O",accent:"¨"},Ȫ:{char:"O",accent:"˘"},Ȭ:{char:"O",accent:"˝"},Ȯ:{char:"O",accent:"˙"},Ō:{char:"O",accent:"-"},Ú:{char:"U",accent:"´"},Ù:{char:"U",accent:"`"},Û:{char:"U",accent:"^"},Ü:{char:"U",accent:"¨"},Ű:{char:"U",accent:"˝"},Ǔ:{char:"U",accent:"ˇ"},Ǖ:{char:"U",accent:"¨"},Ȕ:{char:"U",accent:"`"},Ȗ:{char:"U",accent:"¨"},Ū:{char:"U",accent:"-"},Ý:{char:"Y",accent:"´"},Ỳ:{char:"Y",accent:"`"},Ŷ:{char:"Y",accent:"^"},Ÿ:{char:"Y",accent:"¨"},Ȳ:{char:"Y",accent:"-"},ñ:{char:"n",accent:"~"},Ñ:{char:"N",accent:"~"},ç:{char:"c",accent:"˙"},Ç:{char:"C",accent:"˙"},ṽ:{char:"v",accent:"~"},Ṽ:{char:"V",accent:"~"},ĵ:{char:"j",accent:"^"},Ĵ:{char:"J",accent:"^"},ź:{char:"z",accent:"´"},Ź:{char:"Z",accent:"´"},Ż:{char:"Z",accent:"^"},ż:{char:"z",accent:"^"},Ž:{char:"Z",accent:"ˇ"},ž:{char:"z",accent:"ˇ"},ẑ:{char:"z",accent:"ˆ"}},n={"´":"grave","`":"acute","^":"hat","~":"tilde","¨":"ddot","˚":"mathring","˘":"breve",ˇ:"check","˝":"ddot","˙":"dot","-":"bar",ˆ:"hat","˜":"tilde"},a={𝐀:{letter:"A",fontCmd:"mathbf"},𝐁:{letter:"B",fontCmd:"mathbf"},𝐂:{letter:"C",fontCmd:"mathbf"},𝐃:{letter:"D",fontCmd:"mathbf"},𝐄:{letter:"E",fontCmd:"mathbf"},Ε:{letter:"E",fontCmd:"mathbf"},𝐅:{letter:"F",fontCmd:"mathbf"},𝐆:{letter:"G",fontCmd:"mathbf"},𝐇:{letter:"H",fontCmd:"mathbf"},𝐈:{letter:"I",fontCmd:"mathbf"},𝐉:{letter:"J",fontCmd:"mathbf"},𝐊:{letter:"K",fontCmd:"mathbf"},𝐋:{letter:"L",fontCmd:"mathbf"},𝐌:{letter:"M",fontCmd:"mathbf"},𝐍:{letter:"N",fontCmd:"mathbf"},𝐎:{letter:"O",fontCmd:"mathbf"},𝐏:{letter:"P",fontCmd:"mathbf"},𝐐:{letter:"Q",fontCmd:"mathbf"},𝐑:{letter:"R",fontCmd:"mathbf"},𝐒:{letter:"S",fontCmd:"mathbf"},𝐓:{letter:"T",fontCmd:"mathbf"},𝐔:{letter:"U",fontCmd:"mathbf"},𝐕:{letter:"V",fontCmd:"mathbf"},𝐖:{letter:"W",fontCmd:"mathbf"},𝐗:{letter:"X",fontCmd:"mathbf"},𝞆:{letter:"X",fontCmd:"mathbf"},𝐘:{letter:"Y",fontCmd:"mathbf"},𝐙:{letter:"Z",fontCmd:"mathbf"},"𝟎":{letter:"0",fontCmd:"mathbf"},"𝟏":{letter:"1",fontCmd:"mathbf"},"𝟐":{letter:"2",fontCmd:"mathbf"},"𝟑":{letter:"3",fontCmd:"mathbf"},"𝟒":{letter:"4",fontCmd:"mathbf"},"𝟓":{letter:"5",fontCmd:"mathbf"},"𝟔":{letter:"6",fontCmd:"mathbf"},"𝟕":{letter:"7",fontCmd:"mathbf"},"𝟖":{letter:"8",fontCmd:"mathbf"},"𝟗":{letter:"9",fontCmd:"mathbf"},𝐴:{letter:"A",fontCmd:"mathit"},𝐵:{letter:"B",fontCmd:"mathit"},𝐶:{letter:"C",fontCmd:"mathit"},𝐷:{letter:"D",fontCmd:"mathit"},𝐸:{letter:"E",fontCmd:"mathit"},𝐹:{letter:"F",fontCmd:"mathit"},𝐺:{letter:"G",fontCmd:"mathit"},𝐻:{letter:"H",fontCmd:"mathit"},𝐼:{letter:"I",fontCmd:"mathit"},Ι:{letter:"I",fontCmd:"mathit"},𝐽:{letter:"J",fontCmd:"mathit"},𝐾:{letter:"K",fontCmd:"mathit"},𝐿:{letter:"L",fontCmd:"mathit"},𝑀:{letter:"M",fontCmd:"mathit"},𝑁:{letter:"N",fontCmd:"mathit"},𝑂:{letter:"O",fontCmd:"mathit"},𝑃:{letter:"P",fontCmd:"mathit"},𝑄:{letter:"Q",fontCmd:"mathit"},𝑅:{letter:"R",fontCmd:"mathit"},𝑆:{letter:"S",fontCmd:"mathit"},𝑇:{letter:"T",fontCmd:"mathit"},𝑈:{letter:"U",fontCmd:"mathit"},𝑉:{letter:"V",fontCmd:"mathit"},𝑊:{letter:"W",fontCmd:"mathit"},𝑋:{letter:"X",fontCmd:"mathit"},𝑌:{letter:"Y",fontCmd:"mathit"},𝑍:{letter:"Z",fontCmd:"mathit"},𝔸:{letter:"A",fontCmd:"mathbb"},𝔹:{letter:"B",fontCmd:"mathbb"},ℂ:{letter:"C",fontCmd:"mathbb"},𝔻:{letter:"D",fontCmd:"mathbb"},𝔼:{letter:"E",fontCmd:"mathbb"},𝔽:{letter:"F",fontCmd:"mathbb"},𝔾:{letter:"G",fontCmd:"mathbb"},ℍ:{letter:"H",fontCmd:"mathbb"},𝕀:{letter:"I",fontCmd:"mathbb"},𝕁:{letter:"J",fontCmd:"mathbb"},𝕂:{letter:"K",fontCmd:"mathbb"},𝕃:{letter:"L",fontCmd:"mathbb"},𝕄:{letter:"M",fontCmd:"mathbb"},ℕ:{letter:"N",fontCmd:"mathbb"},𝕆:{letter:"O",fontCmd:"mathbb"},ℙ:{letter:"P",fontCmd:"mathbb"},ℚ:{letter:"Q",fontCmd:"mathbb"},ℝ:{letter:"R",fontCmd:"mathbb"},𝕊:{letter:"S",fontCmd:"mathbb"},𝕋:{letter:"T",fontCmd:"mathbb"},𝕌:{letter:"U",fontCmd:"mathbb"},𝕍:{letter:"V",fontCmd:"mathbb"},𝕎:{letter:"W",fontCmd:"mathbb"},𝕏:{letter:"X",fontCmd:"mathbb"},𝕐:{letter:"Y",fontCmd:"mathbb"},ℤ:{letter:"Z",fontCmd:"mathbb"},"𝟘":{letter:"0",fontCmd:"mathbb"},"𝟙":{letter:"1",fontCmd:"mathbb"},"𝟚":{letter:"2",fontCmd:"mathbb"},"𝟛":{letter:"3",fontCmd:"mathbb"},"𝟜":{letter:"4",fontCmd:"mathbb"},"𝟝":{letter:"5",fontCmd:"mathbb"},"𝟞":{letter:"6",fontCmd:"mathbb"},"𝟟":{letter:"7",fontCmd:"mathbb"},"𝟠":{letter:"8",fontCmd:"mathbb"},"𝟡":{letter:"9",fontCmd:"mathbb"},𝒜:{letter:"A",fontCmd:"mathcal"},𝓐:{letter:"A",fontCmd:"mathcal"},ℬ:{letter:"B",fontCmd:"mathcal"},𝒞:{letter:"C",fontCmd:"mathcal"},𝒟:{letter:"D",fontCmd:"mathcal"},𝓓:{letter:"D",fontCmd:"mathcal"},ℰ:{letter:"E",fontCmd:"mathcal"},ℱ:{letter:"F",fontCmd:"mathcal"},𝓕:{letter:"F",fontCmd:"mathcal"},𝒢:{letter:"G",fontCmd:"mathcal"},ℋ:{letter:"H",fontCmd:"mathcal"},ℐ:{letter:"I",fontCmd:"mathcal"},𝒥:{letter:"J",fontCmd:"mathcal"},𝒦:{letter:"K",fontCmd:"mathcal"},ℒ:{letter:"L",fontCmd:"mathcal"},𝓛:{letter:"L",fontCmd:"mathcal"},ℳ:{letter:"M",fontCmd:"mathcal"},𝒩:{letter:"N",fontCmd:"mathcal"},𝒪:{letter:"O",fontCmd:"mathcal"},𝓞:{letter:"O",fontCmd:"mathcal"},𝒫:{letter:"P",fontCmd:"mathcal"},𝒬:{letter:"Q",fontCmd:"mathcal"},ℛ:{letter:"R",fontCmd:"mathcal"},𝕽:{letter:"R",fontCmd:"mathcal"},"℟":{letter:"R",fontCmd:"mathcal"},𝒮:{letter:"S",fontCmd:"mathcal"},𝒯:{letter:"T",fontCmd:"mathcal"},𝒰:{letter:"U",fontCmd:"mathcal"},𝒱:{letter:"V",fontCmd:"mathcal"},𝒲:{letter:"W",fontCmd:"mathcal"},𝒳:{letter:"X",fontCmd:"mathcal"},𝒴:{letter:"Y",fontCmd:"mathcal"},𝒵:{letter:"Z",fontCmd:"mathcal"},𝔄:{letter:"A",fontCmd:"mathfrak"},𝔅:{letter:"B",fontCmd:"mathfrak"},ℭ:{letter:"C",fontCmd:"mathfrak"},𝔇:{letter:"D",fontCmd:"mathfrak"},𝔈:{letter:"E",fontCmd:"mathfrak"},𝔉:{letter:"F",fontCmd:"mathfrak"},𝔊:{letter:"G",fontCmd:"mathfrak"},ℌ:{letter:"H",fontCmd:"mathfrak"},ℑ:{letter:"I",fontCmd:"mathfrak"},𝔍:{letter:"J",fontCmd:"mathfrak"},𝔎:{letter:"K",fontCmd:"mathfrak"},𝔏:{letter:"L",fontCmd:"mathfrak"},𝔐:{letter:"M",fontCmd:"mathfrak"},𝔑:{letter:"N",fontCmd:"mathfrak"},𝔒:{letter:"O",fontCmd:"mathfrak"},𝔓:{letter:"P",fontCmd:"mathfrak"},𝔔:{letter:"Q",fontCmd:"mathfrak"},ℜ:{letter:"R",fontCmd:"mathfrak"},𝔖:{letter:"S",fontCmd:"mathfrak"},𝔗:{letter:"T",fontCmd:"mathfrak"},𝔘:{letter:"U",fontCmd:"mathfrak"},𝔙:{letter:"V",fontCmd:"mathfrak"},𝔚:{letter:"W",fontCmd:"mathfrak"},𝔛:{letter:"X",fontCmd:"mathfrak"},𝔜:{letter:"Y",fontCmd:"mathfrak"},ℨ:{letter:"Z",fontCmd:"mathfrak"},𝖠:{letter:"A",fontCmd:"mathsf"},Α:{letter:"A",fontCmd:"mathsf"},𝖡:{letter:"B",fontCmd:"mathsf"},Β:{letter:"B",fontCmd:"mathsf"},𝖢:{letter:"C",fontCmd:"mathsf"},𝖣:{letter:"D",fontCmd:"mathsf"},𝖤:{letter:"E",fontCmd:"mathsf"},𝖥:{letter:"F",fontCmd:"mathsf"},𝖦:{letter:"G",fontCmd:"mathsf"},𝖧:{letter:"H",fontCmd:"mathsf"},𝖨:{letter:"I",fontCmd:"mathsf"},𝖩:{letter:"J",fontCmd:"mathsf"},ȷ:{letter:"J",fontCmd:"mathsf"},𝖪:{letter:"K",fontCmd:"mathsf"},Κ:{letter:"K",fontCmd:"mathsf"},𝖫:{letter:"L",fontCmd:"mathsf"},𝖬:{letter:"M",fontCmd:"mathsf"},𝖭:{letter:"N",fontCmd:"mathsf"},𝖮:{letter:"O",fontCmd:"mathsf"},𝖯:{letter:"P",fontCmd:"mathsf"},𝖰:{letter:"Q",fontCmd:"mathsf"},𝖱:{letter:"R",fontCmd:"mathsf"},𝖲:{letter:"S",fontCmd:"mathsf"},𝖳:{letter:"T",fontCmd:"mathsf"},𝖴:{letter:"U",fontCmd:"mathsf"},𝖵:{letter:"V",fontCmd:"mathsf"},𝖶:{letter:"W",fontCmd:"mathsf"},𝖷:{letter:"X",fontCmd:"mathsf"},Χ:{letter:"X",fontCmd:"mathsf"},𝖸:{letter:"Y",fontCmd:"mathsf"},𝖹:{letter:"Z",fontCmd:"mathsf"},𝚨:{letter:"A",fontCmd:"mathtt"},𝚩:{letter:"B",fontCmd:"mathtt"},𝚪:{letter:"\\Gamma",fontCmd:"mathtt"},𝚫:{letter:"\\Delta",fontCmd:"mathtt"},𝚬:{letter:"E",fontCmd:"mathtt"},𝚭:{letter:"F",fontCmd:"mathtt"},𝚮:{letter:"G",fontCmd:"mathtt"},𝚯:{letter:"\\Theta",fontCmd:"mathtt"},𝚰:{letter:"I",fontCmd:"mathtt"},𝚱:{letter:"J",fontCmd:"mathtt"},𝚲:{letter:"\\Lambda",fontCmd:"mathtt"},𝚳:{letter:"L",fontCmd:"mathtt"},𝚴:{letter:"M",fontCmd:"mathtt"},𝚵:{letter:"\\Pi",fontCmd:"mathtt"},𝚶:{letter:"O",fontCmd:"mathtt"},𝚷:{letter:"\\Pi",fontCmd:"mathtt"},𝚸:{letter:"Q",fontCmd:"mathtt"},𝚹:{letter:"R",fontCmd:"mathtt"},𝚺:{letter:"S",fontCmd:"mathtt"},𝚻:{letter:"T",fontCmd:"mathtt"},𝚼:{letter:"U",fontCmd:"mathtt"},𝚽:{letter:"\\Phi",fontCmd:"mathtt"},𝚾:{letter:"W",fontCmd:"mathtt"},𝚿:{letter:"\\Psi",fontCmd:"mathtt"},𝛀:{letter:"\\Omega",fontCmd:"mathtt"}}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}var n={};return(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.MathMLToLaTeX=void 0;var t=r(8672);Object.defineProperty(e,"MathMLToLaTeX",{enumerable:!0,get:function(){return t.MathMLToLaTeX}})})(),n})(),e.exports=t()},608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataExtractor=void 0,t.MetadataExtractor=class{static extract(e,t){var r,n;let a="",o="";try{o=(null===(r=e.location)||void 0===r?void 0:r.href)||"",o||(o=this.getMetaContent(e,"property","og:url")||this.getMetaContent(e,"property","twitter:url")||this.getSchemaProperty(e,t,"url")||this.getSchemaProperty(e,t,"mainEntityOfPage.url")||this.getSchemaProperty(e,t,"mainEntity.url")||this.getSchemaProperty(e,t,"WebSite.url")||(null===(n=e.querySelector('link[rel="canonical"]'))||void 0===n?void 0:n.getAttribute("href"))||""),o&&(a=new URL(o).hostname.replace(/^www\./,""))}catch(t){const r=e.querySelector("base[href]");if(r)try{o=r.getAttribute("href")||"",a=new URL(o).hostname.replace(/^www\./,"")}catch(e){console.warn("Failed to parse base URL:",e)}}return{title:this.getTitle(e,t),description:this.getDescription(e,t),domain:a,favicon:this.getFavicon(e,o),image:this.getImage(e,t),published:this.getPublished(e,t),author:this.getAuthor(e,t),site:this.getSite(e,t),schemaOrgData:t,wordCount:0,parseTime:0}}static getAuthor(e,t){return this.getMetaContent(e,"name","sailthru.author")||this.getSchemaProperty(e,t,"author.name")||this.getMetaContent(e,"property","author")||this.getMetaContent(e,"name","byl")||this.getMetaContent(e,"name","author")||this.getMetaContent(e,"name","authorList")||this.getMetaContent(e,"name","copyright")||this.getSchemaProperty(e,t,"copyrightHolder.name")||this.getMetaContent(e,"property","og:site_name")||this.getSchemaProperty(e,t,"publisher.name")||this.getSchemaProperty(e,t,"sourceOrganization.name")||this.getSchemaProperty(e,t,"isPartOf.name")||this.getMetaContent(e,"name","twitter:creator")||this.getMetaContent(e,"name","application-name")||""}static getSite(e,t){return this.getSchemaProperty(e,t,"publisher.name")||this.getMetaContent(e,"property","og:site_name")||this.getSchemaProperty(e,t,"WebSite.name")||this.getSchemaProperty(e,t,"sourceOrganization.name")||this.getMetaContent(e,"name","copyright")||this.getSchemaProperty(e,t,"copyrightHolder.name")||this.getSchemaProperty(e,t,"isPartOf.name")||this.getMetaContent(e,"name","application-name")||this.getAuthor(e,t)||""}static getTitle(e,t){var r,n;const a=this.getMetaContent(e,"property","og:title")||this.getMetaContent(e,"name","twitter:title")||this.getSchemaProperty(e,t,"headline")||this.getMetaContent(e,"name","title")||this.getMetaContent(e,"name","sailthru.title")||(null===(n=null===(r=e.querySelector("title"))||void 0===r?void 0:r.textContent)||void 0===n?void 0:n.trim())||"";return this.cleanTitle(a,this.getSite(e,t))}static cleanTitle(e,t){if(!e||!t)return e;const r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=[`\\s*[\\|\\-–—]\\s*${r}\\s*$`,`^\\s*${r}\\s*[\\|\\-–—]\\s*`];for(const t of n){const r=new RegExp(t,"i");if(r.test(e)){e=e.replace(r,"");break}}return e.trim()}static getDescription(e,t){return this.getMetaContent(e,"name","description")||this.getMetaContent(e,"property","description")||this.getMetaContent(e,"property","og:description")||this.getSchemaProperty(e,t,"description")||this.getMetaContent(e,"name","twitter:description")||this.getMetaContent(e,"name","sailthru.description")||""}static getImage(e,t){return this.getMetaContent(e,"property","og:image")||this.getMetaContent(e,"name","twitter:image")||this.getSchemaProperty(e,t,"image.url")||this.getMetaContent(e,"name","sailthru.image.full")||""}static getFavicon(e,t){var r,n;const a=this.getMetaContent(e,"property","og:image:favicon");if(a)return a;const o=null===(r=e.querySelector("link[rel='icon']"))||void 0===r?void 0:r.getAttribute("href");if(o)return o;const i=null===(n=e.querySelector("link[rel='shortcut icon']"))||void 0===n?void 0:n.getAttribute("href");if(i)return i;if(t)try{return new URL("/favicon.ico",t).href}catch(e){console.warn("Failed to construct favicon URL:",e)}return""}static getPublished(e,t){return this.getSchemaProperty(e,t,"datePublished")||this.getMetaContent(e,"name","publishDate")||this.getMetaContent(e,"property","article:published_time")||this.getTimeElement(e)||this.getMetaContent(e,"name","sailthru.date")||""}static getMetaContent(e,t,r){var n,a;const o=`meta[${t}]`,i=Array.from(e.querySelectorAll(o)).find((e=>{var n;return(null===(n=e.getAttribute(t))||void 0===n?void 0:n.toLowerCase())===r.toLowerCase()})),s=i&&null!==(a=null===(n=i.getAttribute("content"))||void 0===n?void 0:n.trim())&&void 0!==a?a:"";return this.decodeHTMLEntities(s,e)}static getTimeElement(e){var t,r,n,a;const o=Array.from(e.querySelectorAll("time"))[0],i=o&&null!==(a=null!==(r=null===(t=o.getAttribute("datetime"))||void 0===t?void 0:t.trim())&&void 0!==r?r:null===(n=o.textContent)||void 0===n?void 0:n.trim())&&void 0!==a?a:"";return this.decodeHTMLEntities(i,e)}static decodeHTMLEntities(e,t){const r=t.createElement("textarea");return r.innerHTML=e,r.value}static getSchemaProperty(e,t,r,n=""){if(!t)return n;const a=(e,t,r,n=!0)=>{if("string"==typeof e)return 0===t.length?[e]:[];if(!e||"object"!=typeof e)return[];if(Array.isArray(e)){const o=t[0];if(/^\[\d+\]$/.test(o)){const i=parseInt(o.slice(1,-1));return e[i]?a(e[i],t.slice(1),r,n):[]}return 0===t.length&&e.every((e=>"string"==typeof e||"number"==typeof e))?e.map(String):e.flatMap((e=>a(e,t,r,n)))}const[o,...i]=t;if(!o)return"string"==typeof e?[e]:"object"==typeof e&&e.name?[e.name]:[];if(e.hasOwnProperty(o))return a(e[o],i,r?`${r}.${o}`:o,!0);if(!n){const n=[];for(const o in e)if("object"==typeof e[o]){const i=a(e[o],t,r?`${r}.${o}`:o,!1);n.push(...i)}if(n.length>0)return n}return[]};try{let o=a(t,r.split("."),"",!0);0===o.length&&(o=a(t,r.split("."),"",!1));const i=o.length>0?o.filter(Boolean).join(", "):n;return this.decodeHTMLEntities(i,e)}catch(e){return console.error(`Error in getSchemaProperty for ${r}:`,e),n}}static extractSchemaOrgData(e){const t=e.querySelectorAll('script[type="application/ld+json"]'),r=[];return t.forEach((e=>{let t=e.textContent||"";try{t=t.replace(/\/\*[\s\S]*?\*\/|^\s*\/\/.*$/gm,"").replace(/^\s*<!\[CDATA\[([\s\S]*?)\]\]>\s*$/,"$1").replace(/^\s*(\*\/|\/\*)\s*|\s*(\*\/|\/\*)\s*$/g,"").trim();const e=JSON.parse(t);e["@graph"]&&Array.isArray(e["@graph"])?r.push(...e["@graph"]):r.push(e)}catch(e){console.error("Error parsing schema.org data:",e),console.error("Problematic JSON content:",t)}})),r}}},628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Defuddle=void 0;const n=r(608),a=r(640),o=[...r(315).mathStandardizationRules,{selector:"pre",element:"pre",transform:e=>{if(!(e instanceof HTMLElement))return e;const t=e=>{const t=e.getAttribute("data-lang");if(t)return t.toLowerCase();const r=[/^language-(\w+)$/,/^lang-(\w+)$/,/^(\w+)-code$/,/^code-(\w+)$/,/^syntax-(\w+)$/,/^code-snippet__(\w+)$/,/^highlight-(\w+)$/,/^(\w+)-snippet$/];if(e.className&&"string"==typeof e.className){for(const t of r){const r=e.className.toLowerCase().match(t);if(r)return r[1].toLowerCase()}if(a.SUPPORTED_LANGUAGES.has(e.className.toLowerCase()))return e.className.toLowerCase()}const n=Array.from(e.classList);for(const e of n)for(const t of r){const r=e.match(t);if(r)return r[1].toLowerCase()}for(const e of n)if(a.SUPPORTED_LANGUAGES.has(e.toLowerCase()))return e.toLowerCase();return""};let r="",n=e;for(;n&&!r;)r=t(n),!r&&n.querySelector("code")&&(r=t(n.querySelector("code"))),n=n.parentElement;const o=e=>{if(e.nodeType===Node.TEXT_NODE)return e.textContent||"";let t="";if(e instanceof HTMLElement){if("BR"===e.tagName)return"\n";e.childNodes.forEach((e=>{t+=o(e)})),"CODE"===e.tagName&&(t+="\n")}return t};let i=o(e);i=i.replace(/^\n+/,"").replace(/\n+$/,"").replace(/\n{3,}/g,"\n\n");const s=document.createElement("pre");Array.from(e.attributes).forEach((e=>{a.ALLOWED_ATTRIBUTES.has(e.name)&&s.setAttribute(e.name,e.value)}));const l=document.createElement("code");return r&&(l.setAttribute("data-lang",r),l.setAttribute("class",`language-${r}`)),l.textContent=i,s.appendChild(l),s}},{selector:"h1, h2, h3, h4, h5, h6",element:"keep",transform:e=>{var t;const r=document.createElement(e.tagName);Array.from(e.attributes).forEach((e=>{a.ALLOWED_ATTRIBUTES.has(e.name)&&r.setAttribute(e.name,e.value)}));const n=e.cloneNode(!0);Array.from(n.querySelectorAll("*")).filter((e=>{if(e instanceof HTMLAnchorElement){const t=e.getAttribute("href");return(null==t?void 0:t.includes("#"))||(null==t?void 0:t.startsWith("#"))}return!!e.classList.contains("anchor")||e instanceof HTMLButtonElement||!(!(e instanceof HTMLSpanElement||e instanceof HTMLDivElement)||!e.querySelector('a[href^="#"]'))})).forEach((e=>e.remove()));const o=(null===(t=n.textContent)||void 0===t?void 0:t.trim())||"";return r.textContent=o,r}},{selector:'div[data-testid^="paragraph"], div[role="paragraph"]',element:"p",transform:e=>{const t=document.createElement("p");return t.innerHTML=e.innerHTML,Array.from(e.attributes).forEach((e=>{a.ALLOWED_ATTRIBUTES.has(e.name)&&t.setAttribute(e.name,e.value)})),t}},{selector:'div[role="list"]',element:"ul",transform:e=>{var t;const r=e.querySelector('div[role="listitem"] .label'),n=((null===(t=null==r?void 0:r.textContent)||void 0===t?void 0:t.trim())||"").match(/^\d+\)/),a=document.createElement(n?"ol":"ul");return e.querySelectorAll('div[role="listitem"]').forEach((e=>{const t=document.createElement("li"),r=e.querySelector(".content");r&&(r.querySelectorAll('div[role="paragraph"]').forEach((e=>{const t=document.createElement("p");t.innerHTML=e.innerHTML,e.replaceWith(t)})),r.querySelectorAll('div[role="list"]').forEach((e=>{var t;const r=e.querySelector('div[role="listitem"] .label'),n=((null===(t=null==r?void 0:r.textContent)||void 0===t?void 0:t.trim())||"").match(/^\d+\)/),a=document.createElement(n?"ol":"ul");e.querySelectorAll('div[role="listitem"]').forEach((e=>{const t=document.createElement("li"),r=e.querySelector(".content");r&&(r.querySelectorAll('div[role="paragraph"]').forEach((e=>{const t=document.createElement("p");t.innerHTML=e.innerHTML,e.replaceWith(t)})),t.innerHTML=r.innerHTML),a.appendChild(t)})),e.replaceWith(a)})),t.innerHTML=r.innerHTML),a.appendChild(t)})),a}},{selector:'div[role="listitem"]',element:"li",transform:e=>{const t=e.querySelector(".content");return t?(t.querySelectorAll('div[role="paragraph"]').forEach((e=>{const t=document.createElement("p");t.innerHTML=e.innerHTML,e.replaceWith(t)})),t):e}},{selector:'.wp-block-syntaxhighlighter-code, .syntaxhighlighter, .highlight, .highlight-source, .wp-block-code, pre[class*="language-"], pre[class*="brush:"]',element:"pre",transform:e=>{if(!(e instanceof HTMLElement))return e;const t=document.createElement("pre");let r="";const n=e.querySelector(".syntaxhighlighter");if(n){const e=Array.from(n.classList).find((e=>!["syntaxhighlighter","nogutter"].includes(e)));e&&a.SUPPORTED_LANGUAGES.has(e.toLowerCase())&&(r=e.toLowerCase())}if(!r){const t=Array.from(e.classList),n=[/(?:^|\s)(?:language|lang|brush|syntax)-(\w+)(?:\s|$)/i,/(?:^|\s)(\w+)(?:\s|$)/i];for(const e of t){for(const t of n){const n=e.match(t);if(n&&n[1]&&a.SUPPORTED_LANGUAGES.has(n[1].toLowerCase())){r=n[1].toLowerCase();break}}if(r)break}}let o="";const i=e.querySelector(".syntaxhighlighter table .code .container");if(i)o=Array.from(i.children).map((e=>{const t=Array.from(e.querySelectorAll("code")).map((e=>{let t=e.textContent||"";return e.classList.contains("spaces")&&(t=" ".repeat(t.length)),t})).join("");return t||e.textContent||""})).join("\n");else{const t=e.querySelectorAll(".code .line");o=t.length>0?Array.from(t).map((e=>{const t=Array.from(e.querySelectorAll("code")).map((e=>e.textContent||"")).join("");return t||e.textContent||""})).join("\n"):e.textContent||""}o=o.replace(/^\s+|\s+$/g,"").replace(/\t/g," ").replace(/\n{3,}/g,"\n\n").replace(/\u00a0/g," ");const s=document.createElement("code");return r&&(s.setAttribute("data-lang",r),s.setAttribute("class",`language-${r}`)),s.textContent=o,t.appendChild(s),t}}];t.Defuddle=class{constructor(e,t={}){this.doc=e,this.options=t,this.debug=t.debug||!1}parse(){const e=performance.now(),t=n.MetadataExtractor.extractSchemaOrgData(this.doc),r=n.MetadataExtractor.extract(this.doc,t);try{const t=this._evaluateMediaQueries(this.doc),n=this.findSmallImages(this.doc),a=this.doc.cloneNode(!0);this.applyMobileStyles(a,t);const o=this.findMainContent(a);if(!o){const t=performance.now();return Object.assign(Object.assign({content:this.doc.body.innerHTML},r),{wordCount:this.countWords(this.doc.body.innerHTML),parseTime:Math.round(t-e)})}this.removeSmallImages(a,n),this.removeHiddenElements(a),this.removeClutter(a),this.cleanContent(o,r);const i=o?o.outerHTML:this.doc.body.innerHTML,s=performance.now();return Object.assign(Object.assign({content:i},r),{wordCount:this.countWords(i),parseTime:Math.round(s-e)})}catch(t){console.error("Defuddle","Error processing document:",t);const n=performance.now();return Object.assign(Object.assign({content:this.doc.body.innerHTML},r),{wordCount:this.countWords(this.doc.body.innerHTML),parseTime:Math.round(n-e)})}}countWords(e){const t=document.createElement("div");return t.innerHTML=e,(t.textContent||"").trim().replace(/\s+/g," ").split(" ").filter((e=>e.length>0)).length}_log(...e){this.debug&&console.log("Defuddle:",...e)}_evaluateMediaQueries(e){const t=[],r=/max-width[^:]*:\s*(\d+)/;try{Array.from(e.styleSheets).filter((e=>{try{return e.cssRules,!0}catch(e){if(e instanceof DOMException&&"SecurityError"===e.name)return!1;throw e}})).flatMap((e=>{try{return Array.from(e.cssRules).filter((e=>e instanceof CSSMediaRule&&e.conditionText.includes("max-width")))}catch(e){return this.debug&&console.warn("Defuddle: Failed to process stylesheet:",e),[]}})).forEach((e=>{const n=e.conditionText.match(r);if(n){const r=parseInt(n[1]);a.MOBILE_WIDTH<=r&&Array.from(e.cssRules).filter((e=>e instanceof CSSStyleRule)).forEach((e=>{try{t.push({selector:e.selectorText,styles:e.style.cssText})}catch(e){this.debug&&console.warn("Defuddle: Failed to process CSS rule:",e)}}))}}))}catch(e){console.error("Defuddle: Error evaluating media queries:",e)}return t}applyMobileStyles(e,t){t.forEach((({selector:t,styles:r})=>{try{e.querySelectorAll(t).forEach((e=>{e.setAttribute("style",(e.getAttribute("style")||"")+r)}))}catch(e){console.error("Defuddle","Error applying styles for selector:",t,e)}}))}removeHiddenElements(e){let t=0;const r=new Set,n=e.querySelectorAll(a.HIDDEN_ELEMENT_SELECTORS);n.forEach((e=>r.add(e))),t+=n.length;const o=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>r.has(e)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),i=[];let s;for(;s=o.nextNode();)i.push(s);for(let e=0;e<i.length;e+=100){const n=i.slice(e,e+100),a=n.map((e=>window.getComputedStyle(e)));n.forEach(((e,n)=>{const o=a[n];"none"!==o.display&&"hidden"!==o.visibility&&"0"!==o.opacity||(r.add(e),t++)}))}r.forEach((e=>e.remove())),this._log("Removed hidden elements:",t)}removeClutter(e){const t=performance.now();let r=0,n=0;const o=new Set;e.querySelectorAll(a.EXACT_SELECTORS.join(",")).forEach((e=>{(null==e?void 0:e.parentNode)&&(o.add(e),r++)}));const i=a.PARTIAL_SELECTORS.join("|"),s=new RegExp(i,"i");e.querySelectorAll("[class],[id],[data-testid],[data-test-id],[data-qa],[data-cy]").forEach((e=>{if(o.has(e))return;const t=[e.className&&"string"==typeof e.className?e.className:"",e.id||"",e.getAttribute("data-testid")||"",e.getAttribute("data-test-id")||"",e.getAttribute("data-qa")||"",e.getAttribute("data-cy")||""].join(" ").toLowerCase();t.trim()&&s.test(t)&&(o.add(e),n++)})),o.forEach((e=>e.remove()));const l=performance.now();this._log("Removed clutter elements:",{exactSelectors:r,partialSelectors:n,total:o.size,processingTime:`${(l-t).toFixed(2)}ms`})}flattenDivs(e){let t=0;const r=performance.now();let n=!0;const o=e=>{const t=e.tagName.toLowerCase();if(a.PRESERVE_ELEMENTS.has(t))return!0;const r=e.getAttribute("role");return!(!r||!["article","main","navigation","banner","contentinfo"].includes(r))||(!!e.className.toLowerCase().match(/(?:article|main|content|footnote|reference|bibliography)/)||!("div"!==t||!Array.from(e.children).some((e=>a.PRESERVE_ELEMENTS.has(e.tagName.toLowerCase())||"article"===e.getAttribute("role")||e.className.toLowerCase().includes("article")))))},i=e=>{var t;if(!(null===(t=e.textContent)||void 0===t?void 0:t.trim()))return!0;const r=Array.from(e.children);if(0===r.length)return!0;if(r.every((e=>{const t=e.tagName.toLowerCase();return"div"===t||"p"===t||"h1"===t||"h2"===t||"h3"===t||"h4"===t||"h5"===t||"h6"===t||"ul"===t||"ol"===t||"pre"===t||"blockquote"===t||"figure"===t})))return!0;const n=e.className.toLowerCase();if(/(?:wrapper|container|layout|row|col|grid|flex|outer|inner|content-area)/i.test(n))return!0;const o=Array.from(e.childNodes).filter((e=>{var t;return e.nodeType===Node.TEXT_NODE&&(null===(t=e.textContent)||void 0===t?void 0:t.trim())}));return 0===o.length||!(!(r.length>0)||r.some((e=>{const t=e.tagName.toLowerCase();return a.INLINE_ELEMENTS.has(t)})))},s=r=>{var n,s;if(!r.isConnected||o(r))return!1;if(!r.hasChildNodes()||!(null===(n=r.textContent)||void 0===n?void 0:n.trim()))return r.remove(),t++,!0;if(r.parentElement===e){const e=Array.from(r.children);if(e.length>0&&!e.some((e=>{const t=e.tagName.toLowerCase();return a.INLINE_ELEMENTS.has(t)}))){const e=document.createDocumentFragment();for(;r.firstChild;)e.appendChild(r.firstChild);return r.replaceWith(e),t++,!0}}if(i(r)){if(!Array.from(r.children).some((e=>{const t=e.tagName.toLowerCase();return a.INLINE_ELEMENTS.has(t)}))){const e=document.createDocumentFragment();for(;r.firstChild;)e.appendChild(r.firstChild);return r.replaceWith(e),t++,!0}const e=document.createDocumentFragment();for(;r.firstChild;)e.appendChild(r.firstChild);return r.replaceWith(e),t++,!0}if(!r.children.length&&(null===(s=r.textContent)||void 0===s?void 0:s.trim())){const e=document.createElement("p");return e.textContent=r.textContent,r.replaceWith(e),t++,!0}if(1===r.children.length){const e=r.firstElementChild,n=e.tagName.toLowerCase();if(!a.INLINE_ELEMENTS.has(n)&&!o(e))return r.replaceWith(e),t++,!0}let l=0,c=r.parentElement;for(;c;)"div"===c.tagName.toLowerCase()&&l++,c=c.parentElement;if(l>0){const e=document.createDocumentFragment();for(;r.firstChild;)e.appendChild(r.firstChild);return r.replaceWith(e),t++,!0}return!1},l=()=>{const t=Array.from(e.children).filter((e=>"div"===e.tagName.toLowerCase()));let r=!1;return t.forEach((e=>{s(e)&&(r=!0)})),r},c=()=>{const t=Array.from(e.getElementsByTagName("div")).sort(((e,t)=>{const r=e=>{let t=0,r=e.parentElement;for(;r;)"div"===r.tagName.toLowerCase()&&t++,r=r.parentElement;return t};return r(t)-r(e)}));let r=!1;return t.forEach((e=>{s(e)&&(r=!0)})),r},u=()=>{const r=Array.from(e.getElementsByTagName("div"));let n=!1;return r.forEach((e=>{if(Array.from(e.children).every((e=>"p"===e.tagName.toLowerCase()))||!o(e)&&i(e)){const r=document.createDocumentFragment();for(;e.firstChild;)r.appendChild(e.firstChild);e.replaceWith(r),t++,n=!0}})),n};do{n=!1,l()&&(n=!0),c()&&(n=!0),u()&&(n=!0)}while(n);const d=performance.now();this._log("Flattened divs:",{count:t,processingTime:`${(d-r).toFixed(2)}ms`})}cleanContent(e,t){this.removeHtmlComments(e),this.handleHeadings(e,t.title),this.standardizeFootnotes(e),this.handleLazyImages(e),this.standardizeElements(e),this.debug?(this.stripUnwantedAttributes(e),this.removeEmptyElements(e),this.removeTrailingHeadings(e),this._log("Debug mode: Skipping div flattening to preserve structure")):(this.flattenDivs(e),this.stripUnwantedAttributes(e),this.removeEmptyElements(e),this.removeTrailingHeadings(e),this.flattenDivs(e),this.removeEmptyLines(e))}removeTrailingHeadings(e){let t=0;const r=t=>{let n="",a=t.nextSibling;for(;a;)(a.nodeType===Node.TEXT_NODE||a.nodeType===Node.ELEMENT_NODE)&&(n+=a.textContent||""),a=a.nextSibling;if(n.trim())return!0;const o=t.parentElement;return!(!o||o===e)&&r(o)};Array.from(e.querySelectorAll("h1, h2, h3, h4, h5, h6")).reverse().forEach((e=>{r(e)||(e.remove(),t++)})),t>0&&this._log("Removed trailing headings:",t)}handleHeadings(e,t){const r=e=>e.replace(/\u00A0/g," ").replace(/\s+/g," ").trim().toLowerCase(),n=e.getElementsByTagName("h1");Array.from(n).forEach((e=>{var t;const r=document.createElement("h2");r.innerHTML=e.innerHTML,Array.from(e.attributes).forEach((e=>{a.ALLOWED_ATTRIBUTES.has(e.name)&&r.setAttribute(e.name,e.value)})),null===(t=e.parentNode)||void 0===t||t.replaceChild(r,e)}));const o=e.getElementsByTagName("h2");if(o.length>0){const e=o[0],n=r(e.textContent||""),a=r(t);a&&a===n&&e.remove()}}removeHtmlComments(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT,null);let n;for(;n=r.nextNode();)t.push(n);t.forEach((e=>{e.remove()})),this._log("Removed HTML comments:",t.length)}stripUnwantedAttributes(e){let t=0;const r=e=>{e instanceof SVGElement||Array.from(e.attributes).forEach((r=>{const n=r.name.toLowerCase();this.debug?a.ALLOWED_ATTRIBUTES.has(n)||a.ALLOWED_ATTRIBUTES_DEBUG.has(n)||n.startsWith("data-")||(e.removeAttribute(r.name),t++):a.ALLOWED_ATTRIBUTES.has(n)||(e.removeAttribute(r.name),t++)}))};r(e),e.querySelectorAll("*").forEach(r),this._log("Stripped attributes:",t)}removeEmptyElements(e){let t=0,r=0,n=!0;for(;n;){r++,n=!1;const o=Array.from(e.getElementsByTagName("*")).filter((e=>{if(a.ALLOWED_EMPTY_ELEMENTS.has(e.tagName.toLowerCase()))return!1;const t=e.textContent||"",r=0===t.trim().length,n=t.includes(" "),o=!e.hasChildNodes()||Array.from(e.childNodes).every((e=>{if(e.nodeType===Node.TEXT_NODE){const t=e.textContent||"";return 0===t.trim().length&&!t.includes(" ")}return!1}));if("div"===e.tagName.toLowerCase()){const t=Array.from(e.children);if(t.length>0&&t.every((e=>{var t;if("span"!==e.tagName.toLowerCase())return!1;const r=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"";return","===r||""===r||" "===r})))return!0}return r&&!n&&o}));o.length>0&&(o.forEach((e=>{e.remove(),t++})),n=!0)}this._log("Removed empty elements:",{count:t,iterations:r})}removeEmptyLines(e){let t=0;const r=performance.now(),n=e=>{var r;if(e instanceof Element){const t=e.tagName.toLowerCase();if("pre"===t||"code"===t)return}if(Array.from(e.childNodes).forEach(n),e.nodeType===Node.TEXT_NODE){const n=e.textContent||"";if(!n||n.match(/^[\u200C\u200B\u200D\u200E\u200F\uFEFF\xA0\s]*$/))null===(r=e.parentNode)||void 0===r||r.removeChild(e),t++;else{const r=n.replace(/\n{3,}/g,"\n\n").replace(/^[\n\r\t]+/,"").replace(/[\n\r\t]+$/,"").replace(/[ \t]*\n[ \t]*/g,"\n").replace(/[ \t]{3,}/g," ").replace(/^[ ]+$/," ").replace(/\s+([,.!?:;])/g,"$1").replace(/[\u200C\u200B\u200D\u200E\u200F\uFEFF]+/g,"").replace(/(?:\xA0){2,}/g," ");r!==n&&(e.textContent=r,t+=n.length-r.length)}}},a=e=>{if(!(e instanceof Element))return;const r=e.tagName.toLowerCase();if("pre"===r||"code"===r)return;Array.from(e.children).forEach(a),e.normalize();const n="block"===getComputedStyle(e).display,o=n?/^[\n\r\t \u200C\u200B\u200D\u200E\u200F\uFEFF\xA0]*$/:/^[\n\r\t\u200C\u200B\u200D\u200E\u200F\uFEFF]*$/,i=n?/^[\n\r\t \u200C\u200B\u200D\u200E\u200F\uFEFF\xA0]*$/:/^[\n\r\t\u200C\u200B\u200D\u200E\u200F\uFEFF]*$/;for(;e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(e.firstChild.textContent||"").match(o);)e.removeChild(e.firstChild),t++;for(;e.lastChild&&e.lastChild.nodeType===Node.TEXT_NODE&&(e.lastChild.textContent||"").match(i);)e.removeChild(e.lastChild),t++;if(!n){const t=e.previousSibling,r=e.nextSibling;if(t&&t.nodeType===Node.TEXT_NODE){const r=t.textContent||"",n=e.textContent||"";r.endsWith(" ")||r.endsWith("\n")||r.endsWith(" ")||n.match(/^[,.!?:;]/)||(t.textContent=r+" ")}if(r&&r.nodeType===Node.TEXT_NODE){const e=r.textContent||"";e.startsWith(" ")||e.startsWith("\n")||e.startsWith(" ")||e.match(/^[,.!?:;]/)||(r.textContent=" "+e)}}};n(e),a(e);const o=performance.now();this._log("Removed empty lines:",{charactersRemoved:t,processingTime:`${(o-r).toFixed(2)}ms`})}createFootnoteItem(e,t,r){const n=document.createElement("li");if(n.className="footnote",n.id=`fn:${e}`,"string"==typeof t){const e=document.createElement("p");e.innerHTML=t,n.appendChild(e)}else{const e=Array.from(t.querySelectorAll("p"));if(0===e.length){const e=document.createElement("p");e.innerHTML=t.innerHTML,n.appendChild(e)}else e.forEach((e=>{const t=document.createElement("p");t.innerHTML=e.innerHTML,n.appendChild(t)}))}const a=n.querySelector("p:last-of-type")||n;return r.forEach(((e,t)=>{const n=document.createElement("a");n.href=`#${e}`,n.title="return to article",n.className="footnote-backref",n.innerHTML="↩",t<r.length-1&&(n.innerHTML+=" "),a.appendChild(n)})),n}collectFootnotes(e){const t={};let r=1;const n=new Set;return e.querySelectorAll(a.FOOTNOTE_LIST_SELECTORS).forEach((e=>{if(e.matches('div.footnote[data-component-name="FootnoteToDOM"]')){const a=e.querySelector("a.footnote-number"),o=e.querySelector(".footnote-content");if(a&&o){const e=a.id.replace("footnote-","").toLowerCase();e&&!n.has(e)&&(t[r]={content:o,originalId:e,refs:[]},n.add(e),r++)}}else e.querySelectorAll('li, div[role="listitem"]').forEach((e=>{var a,o,i,s;let l="",c=null;const u=e.querySelector(".citations");if(null===(a=null==u?void 0:u.id)||void 0===a?void 0:a.toLowerCase().startsWith("r")){l=u.id.toLowerCase();const e=u.querySelector(".citation-content");e&&(c=e)}else{if(e.id.toLowerCase().startsWith("bib.bib"))l=e.id.replace("bib.bib","").toLowerCase();else if(e.id.toLowerCase().startsWith("fn:"))l=e.id.replace("fn:","").toLowerCase();else if(e.id.toLowerCase().startsWith("fn"))l=e.id.replace("fn","").toLowerCase();else if(e.hasAttribute("data-counter"))l=(null===(i=null===(o=e.getAttribute("data-counter"))||void 0===o?void 0:o.replace(/\.$/,""))||void 0===i?void 0:i.toLowerCase())||"";else{const t=null===(s=e.id.split("/").pop())||void 0===s?void 0:s.match(/cite_note-(.+)/);l=t?t[1].toLowerCase():e.id.toLowerCase()}c=e}l&&!n.has(l)&&(t[r]={content:c||e,originalId:l,refs:[]},n.add(l),r++)}))})),t}findOuterFootnoteContainer(e){let t=e,r=e.parentElement;for(;r&&("span"===r.tagName.toLowerCase()||"sup"===r.tagName.toLowerCase());)t=r,r=r.parentElement;return t}createFootnoteReference(e,t){const r=document.createElement("sup");r.id=t;const n=document.createElement("a");return n.href=`#fn:${e}`,n.textContent=e,r.appendChild(n),r}standardizeFootnotes(e){const t=this.collectFootnotes(e),r=e.querySelectorAll(a.FOOTNOTE_INLINE_REFERENCES),n=new Map;r.forEach((e=>{var r,a,o,i;if(!(e instanceof HTMLElement))return;let s="",l="";if(e.matches('a[id^="ref-link"]'))s=(null===(r=e.textContent)||void 0===r?void 0:r.trim())||"";else if(e.matches('a[role="doc-biblioref"]')){const t=e.getAttribute("data-xml-rid");if(t)s=t;else{const t=e.getAttribute("href");(null==t?void 0:t.startsWith("#core-R"))&&(s=t.replace("#core-",""))}}else if(e.matches("a.footnote-anchor, span.footnote-hovercard-target a")){const t=(null===(a=e.id)||void 0===a?void 0:a.replace("footnote-anchor-",""))||"";t&&(s=t.toLowerCase())}else if(e.matches("cite.ltx_cite")){const t=e.querySelector("a");if(t){const e=t.getAttribute("href");if(e){const t=null===(o=e.split("/").pop())||void 0===o?void 0:o.match(/bib\.bib(\d+)/);t&&(s=t[1].toLowerCase())}}}else if(e.matches("sup.reference")){const t=e.querySelectorAll("a");Array.from(t).forEach((e=>{var t;const r=e.getAttribute("href");if(r){const e=null===(t=r.split("/").pop())||void 0===t?void 0:t.match(/(?:cite_note|cite_ref)-(.+)/);e&&(s=e[1].toLowerCase())}}))}else if(e.matches('sup[id^="fnref:"]'))s=e.id.replace("fnref:","").toLowerCase();else if(e.matches('sup[id^="fnr"]'))s=e.id.replace("fnr","").toLowerCase();else if(e.matches("span.footnote-reference"))s=e.getAttribute("data-footnote-id")||"";else if(e.matches("span.footnote-link"))s=e.getAttribute("data-footnote-id")||"",l=e.getAttribute("data-footnote-content")||"";else if(e.matches("a.citation"))s=(null===(i=e.textContent)||void 0===i?void 0:i.trim())||"",l=e.getAttribute("href")||"";else if(e.matches('a[id^="fnref"]'))s=e.id.replace("fnref","").toLowerCase();else{const t=e.getAttribute("href");if(t){const e=t.replace(/^[#]/,"");s=e.toLowerCase()}}if(s){const r=Object.entries(t).find((([e,t])=>t.originalId===s.toLowerCase()));if(r){const[t,a]=r,o=a.refs.length>0?`fnref:${t}-${a.refs.length+1}`:`fnref:${t}`;a.refs.push(o);const i=this.findOuterFootnoteContainer(e);"sup"===i.tagName.toLowerCase()?(n.has(i)||n.set(i,[]),n.get(i).push(this.createFootnoteReference(t,o))):i.replaceWith(this.createFootnoteReference(t,o))}}})),n.forEach(((e,t)=>{if(e.length>0){const r=document.createDocumentFragment();e.forEach(((e,t)=>{const n=e.querySelector("a");if(n){const t=document.createElement("sup");t.id=e.id,t.appendChild(n.cloneNode(!0)),r.appendChild(t)}})),t.replaceWith(r)}}));const o=document.createElement("footnotes");o.className="footnotes";const i=document.createElement("ol");Object.entries(t).forEach((([e,t])=>{const r=this.createFootnoteItem(parseInt(e),t.content,t.refs);i.appendChild(r)})),e.querySelectorAll(a.FOOTNOTE_LIST_SELECTORS).forEach((e=>e.remove())),i.children.length>0&&(o.appendChild(i),e.appendChild(o))}handleLazyImages(e){let t=0;e.querySelectorAll("img[data-src], img[data-srcset]").forEach((e=>{if(!(e instanceof HTMLImageElement))return;const r=e.getAttribute("data-src");r&&!e.src&&(e.src=r,t++);const n=e.getAttribute("data-srcset");n&&!e.srcset&&(e.srcset=n,t++),e.classList.remove("lazy","lazyload"),e.removeAttribute("data-ll-status"),e.removeAttribute("data-src"),e.removeAttribute("data-srcset")})),this._log("Processed lazy images:",t)}standardizeElements(e){let t=0;o.forEach((r=>{e.querySelectorAll(r.selector).forEach((e=>{if(r.transform){const n=r.transform(e);e.replaceWith(n),t++}}))})),e.querySelectorAll("lite-youtube").forEach((e=>{const r=e.getAttribute("videoid");if(!r)return;const n=document.createElement("iframe");n.width="560",n.height="315",n.src=`https://www.youtube.com/embed/${r}`,n.title=e.getAttribute("videotitle")||"YouTube video player",n.frameBorder="0",n.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",n.setAttribute("allowfullscreen",""),e.replaceWith(n),t++})),this._log("Converted embedded elements:",t)}findSmallImages(e){const t=new Set,r=/scale\(([\d.]+)\)/,n=performance.now();let a=0;const o=[...Array.from(e.getElementsByTagName("img")),...Array.from(e.getElementsByTagName("svg"))].filter((e=>!(e instanceof HTMLImageElement)||!(e.classList.contains("lazy")||e.classList.contains("lazyload")||e.classList.contains("latex")||e.hasAttribute("decoding")||e.hasAttribute("data-src")||e.hasAttribute("data-srcset"))));if(0===o.length)return t;const i=o.map((e=>({element:e,naturalWidth:e instanceof HTMLImageElement?e.naturalWidth:0,naturalHeight:e instanceof HTMLImageElement?e.naturalHeight:0,attrWidth:parseInt(e.getAttribute("width")||"0"),attrHeight:parseInt(e.getAttribute("height")||"0")})));for(let e=0;e<i.length;e+=50){const n=i.slice(e,e+50);try{const e=n.map((({element:e})=>window.getComputedStyle(e))),o=n.map((({element:e})=>e.getBoundingClientRect()));n.forEach(((n,i)=>{var s;try{const l=e[i],c=o[i],u=l.transform,d=u?parseFloat((null===(s=u.match(r))||void 0===s?void 0:s[1])||"1"):1,p=[n.naturalWidth,n.attrWidth,parseInt(l.width)||0,c.width*d].filter((e=>"number"==typeof e&&e>0)),m=[n.naturalHeight,n.attrHeight,parseInt(l.height)||0,c.height*d].filter((e=>"number"==typeof e&&e>0));if(p.length>0&&m.length>0){const e=Math.min(...p),r=Math.min(...m);if(e<33||r<33){const e=this.getElementIdentifier(n.element);e&&(t.add(e),a++)}}}catch(e){this.debug&&console.warn("Defuddle: Failed to process element dimensions:",e)}}))}catch(e){this.debug&&console.warn("Defuddle: Failed to process batch:",e)}}const s=performance.now();return this._log("Found small elements:",{count:a,totalElements:o.length,processingTime:`${(s-n).toFixed(2)}ms`}),t}removeSmallImages(e,t){let r=0;["img","svg"].forEach((n=>{const a=e.getElementsByTagName(n);Array.from(a).forEach((e=>{const n=this.getElementIdentifier(e);n&&t.has(n)&&(e.remove(),r++)}))})),this._log("Removed small elements:",r)}getElementIdentifier(e){if(e instanceof HTMLImageElement){const t=e.getAttribute("data-src");if(t)return`src:${t}`;const r=e.src||"",n=e.srcset||"",a=e.getAttribute("data-srcset");if(r)return`src:${r}`;if(n)return`srcset:${n}`;if(a)return`srcset:${a}`}const t=e.id||"",r=e.className||"",n=e instanceof SVGElement&&e.getAttribute("viewBox")||"";return t?`id:${t}`:n?`viewBox:${n}`:r?`class:${r}`:null}findMainContent(e){const t=[];return a.ENTRY_POINT_ELEMENTS.forEach(((r,n)=>{e.querySelectorAll(r).forEach((e=>{let r=10*(a.ENTRY_POINT_ELEMENTS.length-n);r+=this.scoreElement(e),t.push({element:e,score:r})}))})),0===t.length?this.findContentByScoring(e):(t.sort(((e,t)=>t.score-e.score)),this.debug&&this._log("Content candidates:",t.map((e=>({element:e.element.tagName,selector:this.getElementSelector(e.element),score:e.score})))),t[0].element)}findContentByScoring(e){const t=this.scoreElements(e);return t.length>0?t[0].element:null}getElementSelector(e){const t=[];let r=e;for(;r&&r!==this.doc.documentElement;){let e=r.tagName.toLowerCase();r.id?e+="#"+r.id:r.className&&"string"==typeof r.className&&(e+="."+r.className.trim().split(/\s+/).join(".")),t.unshift(e),r=r.parentElement}return t.join(" > ")}scoreElements(e){const t=[];return a.BLOCK_ELEMENTS.forEach((r=>{Array.from(e.getElementsByTagName(r)).forEach((e=>{const r=this.scoreElement(e);r>0&&t.push({score:r,element:e})}))})),t.sort(((e,t)=>t.score-e.score))}scoreElement(e){let t=0;e.className&&"string"==typeof e.className&&e.className.toLowerCase(),e.id&&e.id.toLowerCase();const r=e.textContent||"",n=r.split(/\s+/).length;t+=Math.min(Math.floor(n/100),3);const a=e.getElementsByTagName("a"),o=Array.from(a).reduce(((e,t)=>{var r;return e+((null===(r=t.textContent)||void 0===r?void 0:r.length)||0)}),0);(r.length?o/r.length:0)>.5&&(t-=10),t+=e.getElementsByTagName("p").length;const i=e.getElementsByTagName("img").length;return t+=Math.min(3*i,9),t}}},640:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_LANGUAGES=t.ALLOWED_ATTRIBUTES_DEBUG=t.ALLOWED_ATTRIBUTES=t.ALLOWED_EMPTY_ELEMENTS=t.FOOTNOTE_LIST_SELECTORS=t.FOOTNOTE_INLINE_REFERENCES=t.PARTIAL_SELECTORS=t.EXACT_SELECTORS=t.HIDDEN_ELEMENT_SELECTORS=t.INLINE_ELEMENTS=t.PRESERVE_ELEMENTS=t.BLOCK_ELEMENTS=t.MOBILE_WIDTH=t.ENTRY_POINT_ELEMENTS=void 0,t.ENTRY_POINT_ELEMENTS=["article",'[role="article"]',".post-content",".article-content","#article-content",".content-article","main",'[role="main"]',"body"],t.MOBILE_WIDTH=600,t.BLOCK_ELEMENTS=["div","section","article","main"],t.PRESERVE_ELEMENTS=new Set(["pre","code","table","thead","tbody","tr","td","th","ul","ol","li","dl","dt","dd","figure","figcaption","picture","details","summary","blockquote","form","fieldset"]),t.INLINE_ELEMENTS=new Set(["a","span","strong","em","i","b","u","code","br","small","sub","sup","mark","del","ins","q","abbr","cite","time"]),t.HIDDEN_ELEMENT_SELECTORS=["[hidden]",'[style*="visibility: hidden"]','[style*="visibility:hidden"]',".hidden",".invisible"].join(","),t.EXACT_SELECTORS=["noscript",'script:not([type^="math/"])',"style","meta","link",'.ad:not([class*="gradient"])','[class^="ad-" i]','[class$="-ad" i]','[id^="ad-" i]','[id$="-ad" i]','[role="banner" i]',".promo",".Promo","#barrier-page",'[id="comments" i]',"header",".header","#header","nav",".navigation","#navigation",'[role="navigation" i]','[role="dialog" i]','[role*="complementary" i]','[class*="pagination" i]',".menu","#menu","#siteSub",".author",".Author",".contributor",".date",".meta",".tags",".toc",".Toc","#toc","#title","#Title","#articleTag",'[href*="/category"]','[href*="/categories"]','[href*="/tag/"]','[href*="/tags/"]','[href*="/topics"]','[href*="author"]','[href="#top"]','[href="#Top"]','[href="#site-content"]','[src*="author"]',"footer","aside","button","canvas","dialog","fieldset","form",'input:not([type="checkbox"])',"label","option","select","textarea","time","instaread-player",'iframe:not([src*="youtube"]):not([src*="youtu.be"]):not([src*="vimeo"]):not([src*="twitter"])','[class="logo" i]',"#logo","#Logo","#newsletter","#Newsletter",".noprint",'[data-link-name*="skip" i]','[data-print-layout="hide" i]','[data-block="donotprint" i]','[class*="clickable-icon" i]','li span[class*="ltx_tag" i][class*="ltx_tag_item" i]','a[href^="#"][class*="anchor" i]','a[href^="#"][class*="ref" i]','[data-container*="most-viewed" i]',".sidebar",".Sidebar","#sidebar","#Sidebar","#sitesub",".gutter","#primaryaudio","#NYT_ABOVE_MAIN_CONTENT_REGION",'[data-testid="photoviewer-children-figure"] > span',"table.infobox",".pencraft:not(.pc-display-contents)",'[data-optimizely="related-articles-section" i]'],t.PARTIAL_SELECTORS=["access-wall","activitypub","actioncall","appendix","avatar","advert","ad-placement","_ad_","allterms","alert-box","around-the-web","article-bottom-section","article-bottom","article-citation","article__copy","article_date","article-end ","article_header","article-header","article__header","article__info","article-info","article-meta","article_meta","article__meta","article-subject","article_subject","article-snippet","article-separator","article--share","article--topics","articletags","article-tags","article_tags","article-title","article_title","articletopics","article-topics","article-type","article--lede","articlewell","associated-people","audio-card","authored-by","author-box","author-info","author-name","author-bio","author-mini-bio","back-to-top","backlinks-section","banner","bio-block","blog-pager","bookmark-","-bookmark","bottom-of-article","brand-bar","breadcrumb","button-wrapper","btn-","-btn","byline","captcha","card-text","card-media","cat_header","catlinks","chapter-list","collections","comments","commentbox","comment-count","comment-content","comment-form","comment-number","comment-respond","comment-thread","complementary","consent","content-card","content-topics","contentpromo","context-bar","context-widget","core-collateral","creative-commons_","_cta","-cta","cta-","cta_","current-issue","custom-list-number","dateline","dateheader","date-header","date_header-","disclaimer","disclosure","discussion","discuss_","disqus","donate","dropdown","eletters","emailsignup","engagement-widget","entry-author-info","entry-categories","entry-date","entry-meta","entry-title","entry-utility","eyebrow","expand-reduce","externallinkembedwrapper","extra-services","extra-title","facebook","favorite","feedback","feed-links","field-site-sections","fixed","floating-vid","follow","footer","footnote-back","footnoteback","for-you","frontmatter","further-reading","gist-meta","google","goog-","graph-view","header-logo","header-pattern","hero-list","hide-for-print","hide-print","hide-when-no-script","hidden-sidenote","hidden-accessibility","interlude","interaction","jumplink","jump-to-","kicker","labstab","-labels","language-name","latest-content","-ledes-","-license","link-box","links-grid","links-title","listing-dynamic-terms","list-tags","listinks","loading","loa-info","logo_container","ltx_role_refnum","ltx_tag_bibitem","ltx_error","marketing","media-inquiry","menu-","metadata","might-like","more-about","_modal","-modal","more-","morenews","morestories","move-helper","mw-editsection","mw-cite-backlink","mw-indicators","mw-jump-link","nav-","nav_","navbar","next-","newsgallery","news-story-title","newsletter_","newsletter-form","newsletter-signup","newslettersignup","newsletterwidget","newsletterwrapper","not-found","nomobile","noprint","originally-published","outline-view","overlay","page-title","paywall_message","-partners","plea","popular","pop-up","popover","post-bottom","post__category","postcomment","postdate","post-author","post-date","post_date","post-feeds","postinfo","post-info","post_info","post-inline-date","post-links","post-meta","postmeta","postsnippet","post_snippet","post-snippet","posttitle","post-title","post_title","post__title","posttax","post-tax","post_tax","posttag","post_tag","post-tag","prevnext","previousnext","press-inquiries","print-none","print-header","profile","promo_article","promo-box","pubdate","pub_date","pub-date","publication-date","publicationName","qr-code","qr_code","_rail","readmore","read-next","read_next","read_time","read-time","reading_time","reading-time","reading-list","recent-","recent-articles","recentpost","recent_post","recent-post","recommend","redirectedfrom","recirc","register","related","relevant","reversefootnote","screen-reader-text","share-box","sharedaddy","share-icons","sharelinks","share-section","sidebartitle","sidebar_","sidebar-content","similar-","similar_","similars-","sideitems","sidebar-author","sidebar-item","side-box","site-index","site-header","site-logo","site-name","skip-content","c-skip-link","_skip-link","slug-wrap","social","speechify-ignore","sponsor","springercitation","_stats","sticky","storyreadtime","storypublishdate","subject-label","subscribe","_tags","tags__item","tag_list","taxonomy","table-content","table-of-contents","tabs-","terminaltout","time-rubric","timestamp","tip_off","tiptout","-tout-","-toc","toggle-caption","topic-list","toolbar","tooltip","top-wrapper","tree-item","trending","trust-feat","trust-badge","twitter","u-hide","visually-hidden","welcomebox"],t.FOOTNOTE_INLINE_REFERENCES=["sup.reference","cite.ltx_cite",'sup[id^="fnr"]','sup[id^="fnref:"]',"span.footnote-link","a.citation",'a[id^="ref-link"]','a[href^="#fn"]','a[href^="#cite"]','a[href^="#reference"]','a[href^="#footnote"]','a[href^="#r"]','a[href^="#b"]','a[href*="cite_note"]','a[href*="cite_ref"]',"a.footnote-anchor","span.footnote-hovercard-target a",'a[role="doc-biblioref"]','a[id^="fnref"]','a[id^="ref-link"]'].join(","),t.FOOTNOTE_LIST_SELECTORS=["div.footnote ol","div.footnotes ol",'div[role="doc-endnotes"]','div[role="doc-footnotes"]',"ol.footnotes-list","ol.footnotes","ol.references",'ol[class*="article-references"]',"section.footnotes ol",'section[role="doc-endnotes"]','section[role="doc-footnotes"]','section[role="doc-bibliography"]',"ul.footnotes-list","ul.ltx_biblist",'div.footnote[data-component-name="FootnoteToDOM"]'].join(","),t.ALLOWED_EMPTY_ELEMENTS=new Set(["area","audio","base","br","circle","col","defs","ellipse","embed","figure","g","hr","iframe","img","input","line","link","mask","meta","object","param","path","pattern","picture","polygon","polyline","rect","source","stop","svg","td","th","track","use","video","wbr"]),t.ALLOWED_ATTRIBUTES=new Set(["alt","allow","allowfullscreen","aria-label","checked","colspan","controls","data-latex","data-src","data-srcset","data-lang","dir","display","frameborder","headers","height","href","lang","role","rowspan","src","srcset","title","type","width","accent","accentunder","align","columnalign","columnlines","columnspacing","columnspan","data-mjx-texclass","depth","displaystyle","fence","frame","framespacing","linethickness","lspace","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","rowalign","rowlines","rowspacing","rowspan","rspace","scriptlevel","separator","stretchy","symmetric","voffset","xmlns"]),t.ALLOWED_ATTRIBUTES_DEBUG=new Set(["class","id"]),t.SUPPORTED_LANGUAGES=new Set(["markup","html","xml","svg","mathml","ssml","atom","rss","javascript","js","jsx","typescript","ts","tsx","webassembly","wasm","python","java","csharp","cs","dotnet","aspnet","cpp","c++","c","objc","ruby","rb","php","golang","rust","swift","kotlin","scala","dart","bash","shell","sh","powershell","batch","json","jsonp","yaml","yml","toml","dockerfile","gitignore","sql","mysql","postgresql","graphql","mongodb","sparql","markdown","md","latex","tex","asciidoc","adoc","jsdoc","haskell","hs","elm","elixir","erlang","ocaml","fsharp","scheme","lisp","elisp","clojure","matlab","fortran","cobol","pascal","perl","lua","julia","groovy","crystal","nim","zig","regex","gradle","cmake","makefile","nix","terraform","solidity","glsl","hlsl","nasm","masm","armasm","gdscript","unrealscript","abap","actionscript","ada","agda","antlr4","applescript","arduino","coffeescript","django","erlang","fortran","haxe","idris","kotlin","livescript","matlab","nginx","pascal","prolog","puppet","scala","scheme","tcl","verilog","vhdl"])},914:e=>{"use strict";class t{constructor(e,r){let n,a=" "+e;const o=r&&r.loc;if(o&&o.start<=o.end){const e=o.lexer.input;n=o.start;const t=o.end;n===e.length?a+=" at end of input: ":a+=" at position "+(n+1)+": \n";const r=e.slice(n,t).replace(/[^]/g,"$&̲");let i,s;i=n>15?"…"+e.slice(n-15,n):e.slice(0,n),s=t+15<e.length?e.slice(t,t+15)+"…":e.slice(t),a+=i+r+s}const i=new Error(a);return i.name="ParseError",i.__proto__=t.prototype,i.position=n,i}}t.prototype.__proto__=Error.prototype;const r=/([A-Z])/g,n={"&":"&",">":">","<":"<",'"':""","'":"'"},a=/[&><"']/g,o=function(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?o(e.body[0]):e:"font"===e.type?o(e.body):e};var i=function(e,t){return void 0===e?t:e},s=function(e){return String(e).replace(a,(e=>n[e]))},l=function(e){return e.replace(r,"-$1").toLowerCase()},c=function(e){const t=o(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},u=function(e){const 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"},d=function(e){return+e.toFixed(4)};class p{constructor(e){e=e||{},this.displayMode=i(e.displayMode,!1),this.annotate=i(e.annotate,!1),this.leqno=i(e.leqno,!1),this.throwOnError=i(e.throwOnError,!1),this.errorColor=i(e.errorColor,"#b22222"),this.macros=e.macros||{},this.wrap=i(e.wrap,"tex"),this.xml=i(e.xml,!1),this.colorIsTextColor=i(e.colorIsTextColor,!1),this.strict=i(e.strict,!1),this.trust=i(e.trust,!1),this.maxSize=void 0===e.maxSize?[1/0,1/0]:Array.isArray(e.maxSize)?e.maxSize:[1/0,1/0],this.maxExpand=Math.max(0,i(e.maxExpand,1e3))}isTrusted(e){if(e.url&&!e.protocol){const t=u(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}const m={},h={};function f({type:e,names:t,props:r,handler:n,mathmlBuilder:a}){const o={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n};for(let e=0;e<t.length;++e)m[t[e]]=o;e&&a&&(h[e]=a)}function g({type:e,mathmlBuilder:t}){f({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},mathmlBuilder:t})}const x=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},b=function(e){return"ordgroup"===e.type?e.body:[e]};class w{constructor(e){this.children=e,this.classes=[],this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){const e=document.createDocumentFragment();for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e="";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}const y=function(e){return e.filter((e=>e)).join(" ")},v=function(e,t){this.classes=e||[],this.attributes={},this.style=t||{}},A=function(e){const t=document.createElement(e);t.className=y(this.classes);for(const e in this.style)Object.prototype.hasOwnProperty.call(this.style,e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t},E=function(e){let t=`<${e}`;this.classes.length&&(t+=` class="${s(y(this.classes))}"`);let r="";for(const e in this.style)Object.prototype.hasOwnProperty.call(this.style,e)&&(r+=`${l(e)}:${this.style[e]};`);r&&(t+=` style="${r}"`);for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=` ${e}="${s(this.attributes[e])}"`);t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+=`</${e}>`,t};class _{constructor(e,t,r){v.call(this,e,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}toNode(){return A.call(this,"span")}toMarkup(){return E.call(this,"span")}}let C=class{constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return s(this.text)}};class q{constructor(e,t,r){this.href=e,this.classes=t,this.children=r||[]}toNode(){const e=document.createElement("a");e.setAttribute("href",this.href),this.classes.length>0&&(e.className=y(this.classes));for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e=`<a href='${s(this.href)}'`;this.classes.length>0&&(e+=` class="${s(y(this.classes))}"`),e+=">";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+="</a>",e}}class T{constructor(e,t,r){this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){const e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)Object.prototype.hasOwnProperty.call(this.style,t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e=`<img src='${this.src}' alt='${this.alt}'`,t="";for(const e in this.style)Object.prototype.hasOwnProperty.call(this.style,e)&&(t+=`${l(e)}:${this.style[e]};`);return t&&(e+=` style="${s(t)}"`),e+=">",e}}class k{constructor(e,t,r,n){this.type=e,this.attributes={},this.children=t||[],this.classes=r||[],this.style=n||{},this.label=""}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}setLabel(e){this.label=e}toNode(){const e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=y(this.classes));for(const t in this.style)Object.prototype.hasOwnProperty.call(this.style,t)&&(e.style[t]=this.style[t]);for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e="<"+this.type;for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=s(this.attributes[t]),e+='"');this.classes.length>0&&(e+=` class="${s(y(this.classes))}"`);let t="";for(const e in this.style)Object.prototype.hasOwnProperty.call(this.style,e)&&(t+=`${l(e)}:${this.style[e]};`);t&&(e+=` style="${t}"`),e+=">";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map((e=>e.toText())).join("")}}class S{constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return s(this.toText())}toText(){return this.text}}const N=e=>{let t;return 1===e.length&&"mrow"===e[0].type?(t=e.pop(),t.type="mstyle"):t=new k("mstyle",e),t};var L=k,O=S,M=function(e){return new w(e)};const D=e=>{let t=0;if(e.body)for(const r of e.body)t+=D(r);else if("supsub"===e.type)t+=D(e.base),e.sub&&(t+=.7*D(e.sub)),e.sup&&(t+=.7*D(e.sup));else if("mathord"===e.type||"textord"===e.type)for(const r of e.text.split("")){const e=r.codePointAt(0);t+=96<e&&e<123||944<e&&e<970?.56:47<e&&e<58?.5:.92}else t+=1;return t},B={widehat:"^",widecheck:"ˇ",widetilde:"~",wideparen:"⏜",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",overparen:"⏜",undergroup:"⏡",underparen:"⏝",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xrightleftarrows:"⇄",yields:"→",yieldsLeft:"←",mesomerism:"↔",longrightharpoonup:"⇀",longleftharpoondown:"↽",eqrightharpoonup:"⇀",eqleftharpoondown:"↽","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},F=function(e){const t=new O(B[e.slice(1)]),r=new L("mo",[t]);return r.setAttribute("stretchy","true"),r},$=["\\widetilde","\\widehat","\\widecheck","\\utilde"];var I=F,P=e=>{const t=F(e.label);if($.includes(e.label)){const r=D(e.base);1<r&&r<1.6?t.classes.push("tml-crooked-2"):1.6<=r&&r<2.5?t.classes.push("tml-crooked-3"):2.5<=r&&t.classes.push("tml-crooked-4")}return t};const R={bin:1,close:1,inner:1,open:1,punct:1,rel:1},j={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},z={math:{},text:{}};function U(e,t,r,n,a){z[e][n]={group:t,replace:r},a&&r&&(z[e][r]=z[e][n])}const G="math",H="text",V="accent-token",W="bin",X="close",Z="inner",Y="mathord",J="op-token",K="open",Q="punct",ee="rel",te="spacing",re="textord";U(G,ee,"≡","\\equiv",!0),U(G,ee,"≺","\\prec",!0),U(G,ee,"≻","\\succ",!0),U(G,ee,"∼","\\sim",!0),U(G,ee,"⟂","\\perp",!0),U(G,ee,"⪯","\\preceq",!0),U(G,ee,"⪰","\\succeq",!0),U(G,ee,"≃","\\simeq",!0),U(G,ee,"≌","\\backcong",!0),U(G,ee,"|","\\mid",!0),U(G,ee,"≪","\\ll",!0),U(G,ee,"≫","\\gg",!0),U(G,ee,"≍","\\asymp",!0),U(G,ee,"∥","\\parallel"),U(G,ee,"⌣","\\smile",!0),U(G,ee,"⊑","\\sqsubseteq",!0),U(G,ee,"⊒","\\sqsupseteq",!0),U(G,ee,"≐","\\doteq",!0),U(G,ee,"⌢","\\frown",!0),U(G,ee,"∋","\\ni",!0),U(G,ee,"∌","\\notni",!0),U(G,ee,"∝","\\propto",!0),U(G,ee,"⊢","\\vdash",!0),U(G,ee,"⊣","\\dashv",!0),U(G,ee,"∋","\\owns"),U(G,ee,"≘","\\arceq",!0),U(G,ee,"≙","\\wedgeq",!0),U(G,ee,"≚","\\veeeq",!0),U(G,ee,"≛","\\stareq",!0),U(G,ee,"≝","\\eqdef",!0),U(G,ee,"≞","\\measeq",!0),U(G,ee,"≟","\\questeq",!0),U(G,ee,"≠","\\ne",!0),U(G,ee,"≠","\\neq"),U(G,ee,"⩵","\\eqeq",!0),U(G,ee,"⩶","\\eqeqeq",!0),U(G,ee,"∷","\\dblcolon",!0),U(G,ee,"≔","\\coloneqq",!0),U(G,ee,"≕","\\eqqcolon",!0),U(G,ee,"∹","\\eqcolon",!0),U(G,ee,"⩴","\\Coloneqq",!0),U(G,Q,".","\\ldotp"),U(G,Q,"·","\\cdotp"),U(G,re,"#","\\#"),U(H,re,"#","\\#"),U(G,re,"&","\\&"),U(H,re,"&","\\&"),U(G,re,"ℵ","\\aleph",!0),U(G,re,"∀","\\forall",!0),U(G,re,"ℏ","\\hbar",!0),U(G,re,"∃","\\exists",!0),U(G,W,"∇","\\nabla",!0),U(G,re,"♭","\\flat",!0),U(G,re,"ℓ","\\ell",!0),U(G,re,"♮","\\natural",!0),U(G,re,"Å","\\Angstrom",!0),U(H,re,"Å","\\Angstrom",!0),U(G,re,"♣","\\clubsuit",!0),U(G,re,"♧","\\varclubsuit",!0),U(G,re,"℘","\\wp",!0),U(G,re,"♯","\\sharp",!0),U(G,re,"♢","\\diamondsuit",!0),U(G,re,"♦","\\vardiamondsuit",!0),U(G,re,"ℜ","\\Re",!0),U(G,re,"♡","\\heartsuit",!0),U(G,re,"♥","\\varheartsuit",!0),U(G,re,"ℑ","\\Im",!0),U(G,re,"♠","\\spadesuit",!0),U(G,re,"♤","\\varspadesuit",!0),U(G,re,"♀","\\female",!0),U(G,re,"♂","\\male",!0),U(G,re,"§","\\S",!0),U(H,re,"§","\\S"),U(G,re,"¶","\\P",!0),U(H,re,"¶","\\P"),U(H,re,"☺","\\smiley",!0),U(G,re,"☺","\\smiley",!0),U(G,re,"†","\\dag"),U(H,re,"†","\\dag"),U(H,re,"†","\\textdagger"),U(G,re,"‡","\\ddag"),U(H,re,"‡","\\ddag"),U(H,re,"‡","\\textdaggerdbl"),U(G,X,"⎱","\\rmoustache",!0),U(G,K,"⎰","\\lmoustache",!0),U(G,X,"⟯","\\rgroup",!0),U(G,K,"⟮","\\lgroup",!0),U(G,W,"∓","\\mp",!0),U(G,W,"⊖","\\ominus",!0),U(G,W,"⊎","\\uplus",!0),U(G,W,"⊓","\\sqcap",!0),U(G,W,"∗","\\ast"),U(G,W,"⊔","\\sqcup",!0),U(G,W,"◯","\\bigcirc",!0),U(G,W,"∙","\\bullet",!0),U(G,W,"‡","\\ddagger"),U(G,W,"≀","\\wr",!0),U(G,W,"⨿","\\amalg"),U(G,W,"&","\\And"),U(G,W,"⫽","\\sslash",!0),U(G,ee,"⟵","\\longleftarrow",!0),U(G,ee,"⇐","\\Leftarrow",!0),U(G,ee,"⟸","\\Longleftarrow",!0),U(G,ee,"⟶","\\longrightarrow",!0),U(G,ee,"⇒","\\Rightarrow",!0),U(G,ee,"⟹","\\Longrightarrow",!0),U(G,ee,"↔","\\leftrightarrow",!0),U(G,ee,"⟷","\\longleftrightarrow",!0),U(G,ee,"⇔","\\Leftrightarrow",!0),U(G,ee,"⟺","\\Longleftrightarrow",!0),U(G,ee,"↤","\\mapsfrom",!0),U(G,ee,"↦","\\mapsto",!0),U(G,ee,"⟼","\\longmapsto",!0),U(G,ee,"↗","\\nearrow",!0),U(G,ee,"↩","\\hookleftarrow",!0),U(G,ee,"↪","\\hookrightarrow",!0),U(G,ee,"↘","\\searrow",!0),U(G,ee,"↼","\\leftharpoonup",!0),U(G,ee,"⇀","\\rightharpoonup",!0),U(G,ee,"↙","\\swarrow",!0),U(G,ee,"↽","\\leftharpoondown",!0),U(G,ee,"⇁","\\rightharpoondown",!0),U(G,ee,"↖","\\nwarrow",!0),U(G,ee,"⇌","\\rightleftharpoons",!0),U(G,Y,"↯","\\lightning",!0),U(G,Y,"∎","\\QED",!0),U(G,Y,"‰","\\permil",!0),U(H,re,"‰","\\permil"),U(G,Y,"☉","\\astrosun",!0),U(G,Y,"☼","\\sun",!0),U(G,Y,"☾","\\leftmoon",!0),U(G,Y,"☽","\\rightmoon",!0),U(G,Y,"⊕","\\Earth"),U(G,ee,"≮","\\nless",!0),U(G,ee,"⪇","\\lneq",!0),U(G,ee,"≨","\\lneqq",!0),U(G,ee,"≨︀","\\lvertneqq"),U(G,ee,"⋦","\\lnsim",!0),U(G,ee,"⪉","\\lnapprox",!0),U(G,ee,"⊀","\\nprec",!0),U(G,ee,"⋠","\\npreceq",!0),U(G,ee,"⋨","\\precnsim",!0),U(G,ee,"⪹","\\precnapprox",!0),U(G,ee,"≁","\\nsim",!0),U(G,ee,"∤","\\nmid",!0),U(G,ee,"∤","\\nshortmid"),U(G,ee,"⊬","\\nvdash",!0),U(G,ee,"⊭","\\nvDash",!0),U(G,ee,"⋪","\\ntriangleleft"),U(G,ee,"⋬","\\ntrianglelefteq",!0),U(G,ee,"⊄","\\nsubset",!0),U(G,ee,"⊅","\\nsupset",!0),U(G,ee,"⊊","\\subsetneq",!0),U(G,ee,"⊊︀","\\varsubsetneq"),U(G,ee,"⫋","\\subsetneqq",!0),U(G,ee,"⫋︀","\\varsubsetneqq"),U(G,ee,"≯","\\ngtr",!0),U(G,ee,"⪈","\\gneq",!0),U(G,ee,"≩","\\gneqq",!0),U(G,ee,"≩︀","\\gvertneqq"),U(G,ee,"⋧","\\gnsim",!0),U(G,ee,"⪊","\\gnapprox",!0),U(G,ee,"⊁","\\nsucc",!0),U(G,ee,"⋡","\\nsucceq",!0),U(G,ee,"⋩","\\succnsim",!0),U(G,ee,"⪺","\\succnapprox",!0),U(G,ee,"≆","\\ncong",!0),U(G,ee,"∦","\\nparallel",!0),U(G,ee,"∦","\\nshortparallel"),U(G,ee,"⊯","\\nVDash",!0),U(G,ee,"⋫","\\ntriangleright"),U(G,ee,"⋭","\\ntrianglerighteq",!0),U(G,ee,"⊋","\\supsetneq",!0),U(G,ee,"⊋","\\varsupsetneq"),U(G,ee,"⫌","\\supsetneqq",!0),U(G,ee,"⫌︀","\\varsupsetneqq"),U(G,ee,"⊮","\\nVdash",!0),U(G,ee,"⪵","\\precneqq",!0),U(G,ee,"⪶","\\succneqq",!0),U(G,W,"⊴","\\unlhd"),U(G,W,"⊵","\\unrhd"),U(G,ee,"↚","\\nleftarrow",!0),U(G,ee,"↛","\\nrightarrow",!0),U(G,ee,"⇍","\\nLeftarrow",!0),U(G,ee,"⇏","\\nRightarrow",!0),U(G,ee,"↮","\\nleftrightarrow",!0),U(G,ee,"⇎","\\nLeftrightarrow",!0),U(G,ee,"△","\\vartriangle"),U(G,re,"ℏ","\\hslash"),U(G,re,"▽","\\triangledown"),U(G,re,"◊","\\lozenge"),U(G,re,"Ⓢ","\\circledS"),U(G,re,"®","\\circledR",!0),U(H,re,"®","\\circledR"),U(H,re,"®","\\textregistered"),U(G,re,"∡","\\measuredangle",!0),U(G,re,"∄","\\nexists"),U(G,re,"℧","\\mho"),U(G,re,"Ⅎ","\\Finv",!0),U(G,re,"⅁","\\Game",!0),U(G,re,"‵","\\backprime"),U(G,re,"‶","\\backdprime"),U(G,re,"‷","\\backtrprime"),U(G,re,"▲","\\blacktriangle"),U(G,re,"▼","\\blacktriangledown"),U(G,re,"■","\\blacksquare"),U(G,re,"⧫","\\blacklozenge"),U(G,re,"★","\\bigstar"),U(G,re,"∢","\\sphericalangle",!0),U(G,re,"∁","\\complement",!0),U(G,re,"ð","\\eth",!0),U(H,re,"ð","ð"),U(G,re,"╱","\\diagup"),U(G,re,"╲","\\diagdown"),U(G,re,"□","\\square"),U(G,re,"□","\\Box"),U(G,re,"◊","\\Diamond"),U(G,re,"¥","\\yen",!0),U(H,re,"¥","\\yen",!0),U(G,re,"✓","\\checkmark",!0),U(H,re,"✓","\\checkmark"),U(G,re,"✗","\\ballotx",!0),U(H,re,"✗","\\ballotx"),U(H,re,"•","\\textbullet"),U(G,re,"ℶ","\\beth",!0),U(G,re,"ℸ","\\daleth",!0),U(G,re,"ℷ","\\gimel",!0),U(G,re,"ϝ","\\digamma",!0),U(G,re,"ϰ","\\varkappa"),U(G,K,"⌜","\\ulcorner",!0),U(G,X,"⌝","\\urcorner",!0),U(G,K,"⌞","\\llcorner",!0),U(G,X,"⌟","\\lrcorner",!0),U(G,ee,"≦","\\leqq",!0),U(G,ee,"⩽","\\leqslant",!0),U(G,ee,"⪕","\\eqslantless",!0),U(G,ee,"≲","\\lesssim",!0),U(G,ee,"⪅","\\lessapprox",!0),U(G,ee,"≊","\\approxeq",!0),U(G,W,"⋖","\\lessdot"),U(G,ee,"⋘","\\lll",!0),U(G,ee,"≶","\\lessgtr",!0),U(G,ee,"⋚","\\lesseqgtr",!0),U(G,ee,"⪋","\\lesseqqgtr",!0),U(G,ee,"≑","\\doteqdot"),U(G,ee,"≓","\\risingdotseq",!0),U(G,ee,"≒","\\fallingdotseq",!0),U(G,ee,"∽","\\backsim",!0),U(G,ee,"⋍","\\backsimeq",!0),U(G,ee,"⫅","\\subseteqq",!0),U(G,ee,"⋐","\\Subset",!0),U(G,ee,"⊏","\\sqsubset",!0),U(G,ee,"≼","\\preccurlyeq",!0),U(G,ee,"⋞","\\curlyeqprec",!0),U(G,ee,"≾","\\precsim",!0),U(G,ee,"⪷","\\precapprox",!0),U(G,ee,"⊲","\\vartriangleleft"),U(G,ee,"⊴","\\trianglelefteq"),U(G,ee,"⊨","\\vDash",!0),U(G,ee,"⊫","\\VDash",!0),U(G,ee,"⊪","\\Vvdash",!0),U(G,ee,"⌣","\\smallsmile"),U(G,ee,"⌢","\\smallfrown"),U(G,ee,"≏","\\bumpeq",!0),U(G,ee,"≎","\\Bumpeq",!0),U(G,ee,"≧","\\geqq",!0),U(G,ee,"⩾","\\geqslant",!0),U(G,ee,"⪖","\\eqslantgtr",!0),U(G,ee,"≳","\\gtrsim",!0),U(G,ee,"⪆","\\gtrapprox",!0),U(G,W,"⋗","\\gtrdot"),U(G,ee,"⋙","\\ggg",!0),U(G,ee,"≷","\\gtrless",!0),U(G,ee,"⋛","\\gtreqless",!0),U(G,ee,"⪌","\\gtreqqless",!0),U(G,ee,"≖","\\eqcirc",!0),U(G,ee,"≗","\\circeq",!0),U(G,ee,"≜","\\triangleq",!0),U(G,ee,"∼","\\thicksim"),U(G,ee,"≈","\\thickapprox"),U(G,ee,"⫆","\\supseteqq",!0),U(G,ee,"⋑","\\Supset",!0),U(G,ee,"⊐","\\sqsupset",!0),U(G,ee,"≽","\\succcurlyeq",!0),U(G,ee,"⋟","\\curlyeqsucc",!0),U(G,ee,"≿","\\succsim",!0),U(G,ee,"⪸","\\succapprox",!0),U(G,ee,"⊳","\\vartriangleright"),U(G,ee,"⊵","\\trianglerighteq"),U(G,ee,"⊩","\\Vdash",!0),U(G,ee,"∣","\\shortmid"),U(G,ee,"∥","\\shortparallel"),U(G,ee,"≬","\\between",!0),U(G,ee,"⋔","\\pitchfork",!0),U(G,ee,"∝","\\varpropto"),U(G,ee,"◀","\\blacktriangleleft"),U(G,ee,"∴","\\therefore",!0),U(G,ee,"∍","\\backepsilon"),U(G,ee,"▶","\\blacktriangleright"),U(G,ee,"∵","\\because",!0),U(G,ee,"⋘","\\llless"),U(G,ee,"⋙","\\gggtr"),U(G,W,"⊲","\\lhd"),U(G,W,"⊳","\\rhd"),U(G,ee,"≂","\\eqsim",!0),U(G,ee,"≑","\\Doteq",!0),U(G,ee,"⥽","\\strictif",!0),U(G,ee,"⥼","\\strictfi",!0),U(G,W,"∔","\\dotplus",!0),U(G,W,"∖","\\smallsetminus"),U(G,W,"⋒","\\Cap",!0),U(G,W,"⋓","\\Cup",!0),U(G,W,"⩞","\\doublebarwedge",!0),U(G,W,"⊟","\\boxminus",!0),U(G,W,"⊞","\\boxplus",!0),U(G,W,"⧄","\\boxslash",!0),U(G,W,"⋇","\\divideontimes",!0),U(G,W,"⋉","\\ltimes",!0),U(G,W,"⋊","\\rtimes",!0),U(G,W,"⋋","\\leftthreetimes",!0),U(G,W,"⋌","\\rightthreetimes",!0),U(G,W,"⋏","\\curlywedge",!0),U(G,W,"⋎","\\curlyvee",!0),U(G,W,"⊝","\\circleddash",!0),U(G,W,"⊛","\\circledast",!0),U(G,W,"⊺","\\intercal",!0),U(G,W,"⋒","\\doublecap"),U(G,W,"⋓","\\doublecup"),U(G,W,"⊠","\\boxtimes",!0),U(G,W,"⋈","\\bowtie",!0),U(G,W,"⋈","\\Join"),U(G,W,"⟕","\\leftouterjoin",!0),U(G,W,"⟖","\\rightouterjoin",!0),U(G,W,"⟗","\\fullouterjoin",!0),U(G,W,"∸","\\dotminus",!0),U(G,W,"⟑","\\wedgedot",!0),U(G,W,"⟇","\\veedot",!0),U(G,W,"⩢","\\doublebarvee",!0),U(G,W,"⩣","\\veedoublebar",!0),U(G,W,"⩟","\\wedgebar",!0),U(G,W,"⩠","\\wedgedoublebar",!0),U(G,W,"⩔","\\Vee",!0),U(G,W,"⩓","\\Wedge",!0),U(G,W,"⩃","\\barcap",!0),U(G,W,"⩂","\\barcup",!0),U(G,W,"⩈","\\capbarcup",!0),U(G,W,"⩀","\\capdot",!0),U(G,W,"⩇","\\capovercup",!0),U(G,W,"⩆","\\cupovercap",!0),U(G,W,"⩍","\\closedvarcap",!0),U(G,W,"⩌","\\closedvarcup",!0),U(G,W,"⨪","\\minusdot",!0),U(G,W,"⨫","\\minusfdots",!0),U(G,W,"⨬","\\minusrdots",!0),U(G,W,"⊻","\\Xor",!0),U(G,W,"⊼","\\Nand",!0),U(G,W,"⊽","\\Nor",!0),U(G,W,"⊽","\\barvee"),U(G,W,"⫴","\\interleave",!0),U(G,W,"⧢","\\shuffle",!0),U(G,W,"⫶","\\threedotcolon",!0),U(G,W,"⦂","\\typecolon",!0),U(G,W,"∾","\\invlazys",!0),U(G,W,"⩋","\\twocaps",!0),U(G,W,"⩊","\\twocups",!0),U(G,W,"⩎","\\Sqcap",!0),U(G,W,"⩏","\\Sqcup",!0),U(G,W,"⩖","\\veeonvee",!0),U(G,W,"⩕","\\wedgeonwedge",!0),U(G,W,"⧗","\\blackhourglass",!0),U(G,W,"⧆","\\boxast",!0),U(G,W,"⧈","\\boxbox",!0),U(G,W,"⧇","\\boxcircle",!0),U(G,W,"⊜","\\circledequal",!0),U(G,W,"⦷","\\circledparallel",!0),U(G,W,"⦶","\\circledvert",!0),U(G,W,"⦵","\\circlehbar",!0),U(G,W,"⟡","\\concavediamond",!0),U(G,W,"⟢","\\concavediamondtickleft",!0),U(G,W,"⟣","\\concavediamondtickright",!0),U(G,W,"⋄","\\diamond",!0),U(G,W,"⧖","\\hourglass",!0),U(G,W,"⟠","\\lozengeminus",!0),U(G,W,"⌽","\\obar",!0),U(G,W,"⦸","\\obslash",!0),U(G,W,"⨸","\\odiv",!0),U(G,W,"⧁","\\ogreaterthan",!0),U(G,W,"⧀","\\olessthan",!0),U(G,W,"⦹","\\operp",!0),U(G,W,"⨷","\\Otimes",!0),U(G,W,"⨶","\\otimeshat",!0),U(G,W,"⋆","\\star",!0),U(G,W,"△","\\triangle",!0),U(G,W,"⨺","\\triangleminus",!0),U(G,W,"⨹","\\triangleplus",!0),U(G,W,"⨻","\\triangletimes",!0),U(G,W,"⟤","\\whitesquaretickleft",!0),U(G,W,"⟥","\\whitesquaretickright",!0),U(G,W,"⨳","\\smashtimes",!0),U(G,ee,"⇢","\\dashrightarrow",!0),U(G,ee,"⇠","\\dashleftarrow",!0),U(G,ee,"⇇","\\leftleftarrows",!0),U(G,ee,"⇆","\\leftrightarrows",!0),U(G,ee,"⇚","\\Lleftarrow",!0),U(G,ee,"↞","\\twoheadleftarrow",!0),U(G,ee,"↢","\\leftarrowtail",!0),U(G,ee,"↫","\\looparrowleft",!0),U(G,ee,"⇋","\\leftrightharpoons",!0),U(G,ee,"↶","\\curvearrowleft",!0),U(G,ee,"↺","\\circlearrowleft",!0),U(G,ee,"↰","\\Lsh",!0),U(G,ee,"⇈","\\upuparrows",!0),U(G,ee,"↿","\\upharpoonleft",!0),U(G,ee,"⇃","\\downharpoonleft",!0),U(G,ee,"⊶","\\origof",!0),U(G,ee,"⊷","\\imageof",!0),U(G,ee,"⊸","\\multimap",!0),U(G,ee,"↭","\\leftrightsquigarrow",!0),U(G,ee,"⇉","\\rightrightarrows",!0),U(G,ee,"⇄","\\rightleftarrows",!0),U(G,ee,"↠","\\twoheadrightarrow",!0),U(G,ee,"↣","\\rightarrowtail",!0),U(G,ee,"↬","\\looparrowright",!0),U(G,ee,"↷","\\curvearrowright",!0),U(G,ee,"↻","\\circlearrowright",!0),U(G,ee,"↱","\\Rsh",!0),U(G,ee,"⇊","\\downdownarrows",!0),U(G,ee,"↾","\\upharpoonright",!0),U(G,ee,"⇂","\\downharpoonright",!0),U(G,ee,"⇝","\\rightsquigarrow",!0),U(G,ee,"⇝","\\leadsto"),U(G,ee,"⇛","\\Rrightarrow",!0),U(G,ee,"↾","\\restriction"),U(G,re,"‘","`"),U(G,re,"$","\\$"),U(H,re,"$","\\$"),U(H,re,"$","\\textdollar"),U(G,re,"¢","\\cent"),U(H,re,"¢","\\cent"),U(G,re,"%","\\%"),U(H,re,"%","\\%"),U(G,re,"_","\\_"),U(H,re,"_","\\_"),U(H,re,"_","\\textunderscore"),U(H,re,"␣","\\textvisiblespace",!0),U(G,re,"∠","\\angle",!0),U(G,re,"∞","\\infty",!0),U(G,re,"′","\\prime"),U(G,re,"″","\\dprime"),U(G,re,"‴","\\trprime"),U(G,re,"⁗","\\qprime"),U(G,re,"△","\\triangle"),U(H,re,"Α","\\Alpha",!0),U(H,re,"Β","\\Beta",!0),U(H,re,"Γ","\\Gamma",!0),U(H,re,"Δ","\\Delta",!0),U(H,re,"Ε","\\Epsilon",!0),U(H,re,"Ζ","\\Zeta",!0),U(H,re,"Η","\\Eta",!0),U(H,re,"Θ","\\Theta",!0),U(H,re,"Ι","\\Iota",!0),U(H,re,"Κ","\\Kappa",!0),U(H,re,"Λ","\\Lambda",!0),U(H,re,"Μ","\\Mu",!0),U(H,re,"Ν","\\Nu",!0),U(H,re,"Ξ","\\Xi",!0),U(H,re,"Ο","\\Omicron",!0),U(H,re,"Π","\\Pi",!0),U(H,re,"Ρ","\\Rho",!0),U(H,re,"Σ","\\Sigma",!0),U(H,re,"Τ","\\Tau",!0),U(H,re,"Υ","\\Upsilon",!0),U(H,re,"Φ","\\Phi",!0),U(H,re,"Χ","\\Chi",!0),U(H,re,"Ψ","\\Psi",!0),U(H,re,"Ω","\\Omega",!0),U(G,Y,"Α","\\Alpha",!0),U(G,Y,"Β","\\Beta",!0),U(G,Y,"Γ","\\Gamma",!0),U(G,Y,"Δ","\\Delta",!0),U(G,Y,"Ε","\\Epsilon",!0),U(G,Y,"Ζ","\\Zeta",!0),U(G,Y,"Η","\\Eta",!0),U(G,Y,"Θ","\\Theta",!0),U(G,Y,"Ι","\\Iota",!0),U(G,Y,"Κ","\\Kappa",!0),U(G,Y,"Λ","\\Lambda",!0),U(G,Y,"Μ","\\Mu",!0),U(G,Y,"Ν","\\Nu",!0),U(G,Y,"Ξ","\\Xi",!0),U(G,Y,"Ο","\\Omicron",!0),U(G,Y,"Π","\\Pi",!0),U(G,Y,"Ρ","\\Rho",!0),U(G,Y,"Σ","\\Sigma",!0),U(G,Y,"Τ","\\Tau",!0),U(G,Y,"Υ","\\Upsilon",!0),U(G,Y,"Φ","\\Phi",!0),U(G,Y,"Χ","\\Chi",!0),U(G,Y,"Ψ","\\Psi",!0),U(G,Y,"Ω","\\Omega",!0),U(G,K,"¬","\\neg",!0),U(G,K,"¬","\\lnot"),U(G,re,"⊤","\\top"),U(G,re,"⊥","\\bot"),U(G,re,"∅","\\emptyset"),U(G,re,"⌀","\\varnothing"),U(G,Y,"α","\\alpha",!0),U(G,Y,"β","\\beta",!0),U(G,Y,"γ","\\gamma",!0),U(G,Y,"δ","\\delta",!0),U(G,Y,"ϵ","\\epsilon",!0),U(G,Y,"ζ","\\zeta",!0),U(G,Y,"η","\\eta",!0),U(G,Y,"θ","\\theta",!0),U(G,Y,"ι","\\iota",!0),U(G,Y,"κ","\\kappa",!0),U(G,Y,"λ","\\lambda",!0),U(G,Y,"μ","\\mu",!0),U(G,Y,"ν","\\nu",!0),U(G,Y,"ξ","\\xi",!0),U(G,Y,"ο","\\omicron",!0),U(G,Y,"π","\\pi",!0),U(G,Y,"ρ","\\rho",!0),U(G,Y,"σ","\\sigma",!0),U(G,Y,"τ","\\tau",!0),U(G,Y,"υ","\\upsilon",!0),U(G,Y,"ϕ","\\phi",!0),U(G,Y,"χ","\\chi",!0),U(G,Y,"ψ","\\psi",!0),U(G,Y,"ω","\\omega",!0),U(G,Y,"ε","\\varepsilon",!0),U(G,Y,"ϑ","\\vartheta",!0),U(G,Y,"ϖ","\\varpi",!0),U(G,Y,"ϱ","\\varrho",!0),U(G,Y,"ς","\\varsigma",!0),U(G,Y,"φ","\\varphi",!0),U(G,Y,"Ϙ","\\Coppa",!0),U(G,Y,"ϙ","\\coppa",!0),U(G,Y,"ϙ","\\varcoppa",!0),U(G,Y,"Ϟ","\\Koppa",!0),U(G,Y,"ϟ","\\koppa",!0),U(G,Y,"Ϡ","\\Sampi",!0),U(G,Y,"ϡ","\\sampi",!0),U(G,Y,"Ϛ","\\Stigma",!0),U(G,Y,"ϛ","\\stigma",!0),U(G,Y,"⫫","\\Bot"),U(G,W,"∗","∗",!0),U(G,W,"+","+"),U(G,W,"∗","*"),U(G,W,"⁄","/",!0),U(G,W,"⁄","⁄"),U(G,W,"−","-",!0),U(G,W,"⋅","\\cdot",!0),U(G,W,"∘","\\circ",!0),U(G,W,"÷","\\div",!0),U(G,W,"±","\\pm",!0),U(G,W,"×","\\times",!0),U(G,W,"∩","\\cap",!0),U(G,W,"∪","\\cup",!0),U(G,W,"∖","\\setminus",!0),U(G,W,"∧","\\land"),U(G,W,"∨","\\lor"),U(G,W,"∧","\\wedge",!0),U(G,W,"∨","\\vee",!0),U(G,K,"⟦","\\llbracket",!0),U(G,X,"⟧","\\rrbracket",!0),U(G,K,"⟨","\\langle",!0),U(G,K,"⟪","\\lAngle",!0),U(G,K,"⦉","\\llangle",!0),U(G,K,"|","\\lvert"),U(G,K,"‖","\\lVert",!0),U(G,re,"!","\\oc"),U(G,re,"?","\\wn"),U(G,re,"↓","\\shpos"),U(G,re,"↕","\\shift"),U(G,re,"↑","\\shneg"),U(G,X,"?","?"),U(G,X,"!","!"),U(G,X,"‼","‼"),U(G,X,"⟩","\\rangle",!0),U(G,X,"⟫","\\rAngle",!0),U(G,X,"⦊","\\rrangle",!0),U(G,X,"|","\\rvert"),U(G,X,"‖","\\rVert"),U(G,K,"⦃","\\lBrace",!0),U(G,X,"⦄","\\rBrace",!0),U(G,ee,"=","\\equal",!0),U(G,ee,":",":"),U(G,ee,"≈","\\approx",!0),U(G,ee,"≅","\\cong",!0),U(G,ee,"≥","\\ge"),U(G,ee,"≥","\\geq",!0),U(G,ee,"←","\\gets"),U(G,ee,">","\\gt",!0),U(G,ee,"∈","\\in",!0),U(G,ee,"∉","\\notin",!0),U(G,ee,"","\\@not"),U(G,ee,"⊂","\\subset",!0),U(G,ee,"⊃","\\supset",!0),U(G,ee,"⊆","\\subseteq",!0),U(G,ee,"⊇","\\supseteq",!0),U(G,ee,"⊈","\\nsubseteq",!0),U(G,ee,"⊈","\\nsubseteqq"),U(G,ee,"⊉","\\nsupseteq",!0),U(G,ee,"⊉","\\nsupseteqq"),U(G,ee,"⊨","\\models"),U(G,ee,"←","\\leftarrow",!0),U(G,ee,"≤","\\le"),U(G,ee,"≤","\\leq",!0),U(G,ee,"<","\\lt",!0),U(G,ee,"→","\\rightarrow",!0),U(G,ee,"→","\\to"),U(G,ee,"≱","\\ngeq",!0),U(G,ee,"≱","\\ngeqq"),U(G,ee,"≱","\\ngeqslant"),U(G,ee,"≰","\\nleq",!0),U(G,ee,"≰","\\nleqq"),U(G,ee,"≰","\\nleqslant"),U(G,ee,"⫫","\\Perp",!0),U(G,te," ","\\ "),U(G,te," ","\\space"),U(G,te," ","\\nobreakspace"),U(H,te," ","\\ "),U(H,te," "," "),U(H,te," ","\\space"),U(H,te," ","\\nobreakspace"),U(G,te,null,"\\nobreak"),U(G,te,null,"\\allowbreak"),U(G,Q,",",","),U(H,Q,":",":"),U(G,Q,";",";"),U(G,W,"⊼","\\barwedge"),U(G,W,"⊻","\\veebar"),U(G,W,"⊙","\\odot",!0),U(G,W,"⊕︎","\\oplus"),U(G,W,"⊗","\\otimes",!0),U(G,re,"∂","\\partial",!0),U(G,W,"⊘","\\oslash",!0),U(G,W,"⊚","\\circledcirc",!0),U(G,W,"⊡","\\boxdot",!0),U(G,W,"△","\\bigtriangleup"),U(G,W,"▽","\\bigtriangledown"),U(G,W,"†","\\dagger"),U(G,W,"⋄","\\diamond"),U(G,W,"◃","\\triangleleft"),U(G,W,"▹","\\triangleright"),U(G,K,"{","\\{"),U(H,re,"{","\\{"),U(H,re,"{","\\textbraceleft"),U(G,X,"}","\\}"),U(H,re,"}","\\}"),U(H,re,"}","\\textbraceright"),U(G,K,"{","\\lbrace"),U(G,X,"}","\\rbrace"),U(G,K,"[","\\lbrack",!0),U(H,re,"[","\\lbrack",!0),U(G,X,"]","\\rbrack",!0),U(H,re,"]","\\rbrack",!0),U(G,K,"(","\\lparen",!0),U(G,X,")","\\rparen",!0),U(G,K,"⦇","\\llparenthesis",!0),U(G,X,"⦈","\\rrparenthesis",!0),U(H,re,"<","\\textless",!0),U(H,re,">","\\textgreater",!0),U(G,K,"⌊","\\lfloor",!0),U(G,X,"⌋","\\rfloor",!0),U(G,K,"⌈","\\lceil",!0),U(G,X,"⌉","\\rceil",!0),U(G,re,"\\","\\backslash"),U(G,re,"|","|"),U(G,re,"|","\\vert"),U(H,re,"|","\\textbar",!0),U(G,re,"‖","\\|"),U(G,re,"‖","\\Vert"),U(H,re,"‖","\\textbardbl"),U(H,re,"~","\\textasciitilde"),U(H,re,"\\","\\textbackslash"),U(H,re,"^","\\textasciicircum"),U(G,ee,"↑","\\uparrow",!0),U(G,ee,"⇑","\\Uparrow",!0),U(G,ee,"↓","\\downarrow",!0),U(G,ee,"⇓","\\Downarrow",!0),U(G,ee,"↕","\\updownarrow",!0),U(G,ee,"⇕","\\Updownarrow",!0),U(G,J,"∐","\\coprod"),U(G,J,"⋁","\\bigvee"),U(G,J,"⋀","\\bigwedge"),U(G,J,"⨄","\\biguplus"),U(G,J,"⨄","\\bigcupplus"),U(G,J,"⨃","\\bigcupdot"),U(G,J,"⨇","\\bigdoublevee"),U(G,J,"⨈","\\bigdoublewedge"),U(G,J,"⋂","\\bigcap"),U(G,J,"⋃","\\bigcup"),U(G,J,"∫","\\int"),U(G,J,"∫","\\intop"),U(G,J,"∬","\\iint"),U(G,J,"∭","\\iiint"),U(G,J,"∏","\\prod"),U(G,J,"∑","\\sum"),U(G,J,"⨂","\\bigotimes"),U(G,J,"⨁","\\bigoplus"),U(G,J,"⨀","\\bigodot"),U(G,J,"⨉","\\bigtimes"),U(G,J,"∮","\\oint"),U(G,J,"∯","\\oiint"),U(G,J,"∰","\\oiiint"),U(G,J,"∱","\\intclockwise"),U(G,J,"∲","\\varointclockwise"),U(G,J,"⨌","\\iiiint"),U(G,J,"⨍","\\intbar"),U(G,J,"⨎","\\intBar"),U(G,J,"⨏","\\fint"),U(G,J,"⨒","\\rppolint"),U(G,J,"⨓","\\scpolint"),U(G,J,"⨕","\\pointint"),U(G,J,"⨖","\\sqint"),U(G,J,"⨗","\\intlarhk"),U(G,J,"⨘","\\intx"),U(G,J,"⨙","\\intcap"),U(G,J,"⨚","\\intcup"),U(G,J,"⨅","\\bigsqcap"),U(G,J,"⨆","\\bigsqcup"),U(G,J,"∫","\\smallint"),U(H,Z,"…","\\textellipsis"),U(G,Z,"…","\\mathellipsis"),U(H,Z,"…","\\ldots",!0),U(G,Z,"…","\\ldots",!0),U(G,Z,"⋰","\\iddots",!0),U(G,Z,"⋯","\\@cdots",!0),U(G,Z,"⋱","\\ddots",!0),U(G,re,"⋮","\\varvdots"),U(H,re,"⋮","\\varvdots"),U(G,V,"ˊ","\\acute"),U(G,V,"`","\\grave"),U(G,V,"¨","\\ddot"),U(G,V,"…","\\dddot"),U(G,V,"….","\\ddddot"),U(G,V,"~","\\tilde"),U(G,V,"‾","\\bar"),U(G,V,"˘","\\breve"),U(G,V,"ˇ","\\check"),U(G,V,"^","\\hat"),U(G,V,"→","\\vec"),U(G,V,"˙","\\dot"),U(G,V,"˚","\\mathring"),U(G,Y,"ı","\\imath",!0),U(G,Y,"ȷ","\\jmath",!0),U(G,re,"ı","ı"),U(G,re,"ȷ","ȷ"),U(H,re,"ı","\\i",!0),U(H,re,"ȷ","\\j",!0),U(H,re,"ß","\\ss",!0),U(H,re,"æ","\\ae",!0),U(H,re,"œ","\\oe",!0),U(H,re,"ø","\\o",!0),U(G,Y,"ø","\\o",!0),U(H,re,"Æ","\\AE",!0),U(H,re,"Œ","\\OE",!0),U(H,re,"Ø","\\O",!0),U(G,Y,"Ø","\\O",!0),U(H,V,"ˊ","\\'"),U(H,V,"ˋ","\\`"),U(H,V,"ˆ","\\^"),U(H,V,"˜","\\~"),U(H,V,"ˉ","\\="),U(H,V,"˘","\\u"),U(H,V,"˙","\\."),U(H,V,"¸","\\c"),U(H,V,"˚","\\r"),U(H,V,"ˇ","\\v"),U(H,V,"¨",'\\"'),U(H,V,"˝","\\H"),U(G,V,"ˊ","\\'"),U(G,V,"ˋ","\\`"),U(G,V,"ˆ","\\^"),U(G,V,"˜","\\~"),U(G,V,"ˉ","\\="),U(G,V,"˘","\\u"),U(G,V,"˙","\\."),U(G,V,"¸","\\c"),U(G,V,"˚","\\r"),U(G,V,"ˇ","\\v"),U(G,V,"¨",'\\"'),U(G,V,"˝","\\H");const ne={"--":!0,"---":!0,"``":!0,"''":!0};U(H,re,"–","--",!0),U(H,re,"–","\\textendash"),U(H,re,"—","---",!0),U(H,re,"—","\\textemdash"),U(H,re,"‘","`",!0),U(H,re,"‘","\\textquoteleft"),U(H,re,"’","'",!0),U(H,re,"’","\\textquoteright"),U(H,re,"“","``",!0),U(H,re,"“","\\textquotedblleft"),U(H,re,"”","''",!0),U(H,re,"”","\\textquotedblright"),U(G,re,"°","\\degree",!0),U(H,re,"°","\\degree"),U(H,re,"°","\\textdegree",!0),U(G,re,"£","\\pounds"),U(G,re,"£","\\mathsterling",!0),U(H,re,"£","\\pounds"),U(H,re,"£","\\textsterling",!0),U(G,re,"✠","\\maltese"),U(H,re,"✠","\\maltese"),U(G,re,"€","\\euro",!0),U(H,re,"€","\\euro",!0),U(H,re,"€","\\texteuro"),U(G,re,"©","\\copyright",!0),U(H,re,"©","\\textcopyright"),U(G,re,"⌀","\\diameter",!0),U(H,re,"⌀","\\diameter"),U(G,re,"𝛤","\\varGamma"),U(G,re,"𝛥","\\varDelta"),U(G,re,"𝛩","\\varTheta"),U(G,re,"𝛬","\\varLambda"),U(G,re,"𝛯","\\varXi"),U(G,re,"𝛱","\\varPi"),U(G,re,"𝛴","\\varSigma"),U(G,re,"𝛶","\\varUpsilon"),U(G,re,"𝛷","\\varPhi"),U(G,re,"𝛹","\\varPsi"),U(G,re,"𝛺","\\varOmega"),U(H,re,"𝛤","\\varGamma"),U(H,re,"𝛥","\\varDelta"),U(H,re,"𝛩","\\varTheta"),U(H,re,"𝛬","\\varLambda"),U(H,re,"𝛯","\\varXi"),U(H,re,"𝛱","\\varPi"),U(H,re,"𝛴","\\varSigma"),U(H,re,"𝛶","\\varUpsilon"),U(H,re,"𝛷","\\varPhi"),U(H,re,"𝛹","\\varPsi"),U(H,re,"𝛺","\\varOmega");for(let e=0;e<14;e++){const t='0123456789/@."'.charAt(e);U(G,re,t,t)}for(let e=0;e<25;e++){const t='0123456789!@*()-=+";:?/.,'.charAt(e);U(H,re,t,t)}const ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<52;e++){const t=ae.charAt(e);U(G,Y,t,t),U(H,re,t,t)}for(let e=0;e<30;e++){const t="ÇÐÞçþℂℍℕℙℚℝℤℎℏℊℋℌℐℑℒℓ℘ℛℜℬℰℱℳℭℨ".charAt(e);U(G,Y,t,t),U(H,re,t,t)}let oe="";for(let e=0;e<52;e++){oe=String.fromCharCode(55349,56320+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,56372+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,56424+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,56580+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,56736+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,56788+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,56840+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,56944+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,56632+e),U(G,Y,oe,oe),U(H,re,oe,oe);const t=ae.charAt(e);oe=String.fromCharCode(55349,56476+e),U(G,Y,t,oe),U(H,re,t,oe)}for(let e=0;e<10;e++)oe=String.fromCharCode(55349,57294+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,57314+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,57324+e),U(G,Y,oe,oe),U(H,re,oe,oe),oe=String.fromCharCode(55349,57334+e),U(G,Y,oe,oe),U(H,re,oe,oe);const ie=function(e,t,r){return!z[t][e]||!z[t][e].replace||55349===e.charCodeAt(0)||Object.prototype.hasOwnProperty.call(ne,e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=z[t][e].replace),new O(e)},se=(e,t)=>{if(0===e.children.length||"mtext"!==e.children[e.children.length-1].type){const r=new L("mtext",[new O(t.children[0].text)]);e.children.push(r)}else e.children[e.children.length-1].children[0].text+=t.children[0].text},le=e=>{if("mrow"!==e.type&&"mstyle"!==e.type)return e;if(0===e.children.length)return e;const t=new L("mrow");for(let r=0;r<e.children.length;r++){const n=e.children[r];if("mtext"===n.type&&0===Object.keys(n.attributes).length)se(t,n);else if("mrow"===n.type){let e=!0;for(let t=0;t<n.children.length;t++)if("mtext"!==n.children[t].type||0!==Object.keys(n.attributes).length){e=!1;break}if(e)for(let e=0;e<n.children.length;e++){const r=n.children[e];se(t,r)}else t.children.push(n)}else t.children.push(n)}for(let r=0;r<t.children.length;r++)if("mtext"===t.children[r].type){const n=t.children[r];" "===n.children[0].text.charAt(0)&&(n.children[0].text=" "+n.children[0].text.slice(1));const a=n.children[0].text.length;a>0&&" "===n.children[0].text.charAt(a-1)&&(n.children[0].text=n.children[0].text.slice(0,-1)+" ");for(const[t,r]of Object.entries(e.attributes))n.attributes[t]=r}return 1===t.children.length&&"mtext"===t.children[0].type?t.children[0]:t},ce=function(e,t=!1){if(!(1!==e.length||e[0]instanceof w))return e[0];if(!t){e[0]instanceof k&&"mo"===e[0].type&&!e[0].attributes.fence&&(e[0].attributes.lspace="0em",e[0].attributes.rspace="0em");const t=e.length-1;e[t]instanceof k&&"mo"===e[t].type&&!e[t].attributes.fence&&(e[t].attributes.lspace="0em",e[t].attributes.rspace="0em")}return new L("mrow",e)};function ue(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){const t=e.children[0];return t instanceof S&&"."===t.text}if("mtext"===e.type&&1===e.children.length){const t=e.children[0];return t instanceof S&&" "===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){const t=e.children[0];return t instanceof S&&","===t.text}return!1}const de=(e,t)=>{const r=e[t],n=e[t+1];return"atom"===r.type&&","===r.text&&r.loc&&n.loc&&r.loc.end===n.loc.start},pe=e=>"atom"===e.type&&"rel"===e.family||"mclass"===e.type&&"mrel"===e.mclass,me=function(e,t,r=!1){if(!r&&1===e.length){const r=fe(e[0],t);return r instanceof k&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}const n=[],a=[];let o;for(let r=0;r<e.length;r++)a.push(fe(e[r],t));for(let t=0;t<a.length;t++){const r=a[t];if(t<e.length-1&&pe(e[t])&&pe(e[t+1])&&r.setAttribute("rspace","0em"),t>0&&pe(e[t])&&pe(e[t-1])&&r.setAttribute("lspace","0em"),"mn"===r.type&&o&&"mn"===o.type)o.children.push(...r.children);else if(ue(r)&&o&&"mn"===o.type)o.children.push(...r.children);else if(o&&"mn"===o.type&&t<a.length-1&&"mn"===a[t+1].type&&de(e,t))o.children.push(...r.children);else{if("mn"===r.type&&ue(o))r.children=[...o.children,...r.children],n.pop();else if(("msup"===r.type||"msub"===r.type)&&r.children.length>=1&&o&&("mn"===o.type||ue(o))){const e=r.children[0];e instanceof k&&"mn"===e.type&&o&&(e.children=[...o.children,...e.children],n.pop())}n.push(r),o=r}}return n},he=function(e,t,r=!1){return ce(me(e,t,r),r)},fe=function(e,r){if(!e)return new L("mrow");if(h[e.type])return h[e.type](e,r);throw new t("Got group of unknown type: '"+e.type+"'")},ge=e=>new L("mtd",[],[],{padding:"0",width:"50%"}),xe=["mrow","mtd","mtable","mtr"],be=e=>{for(const t of e.children)if(t.type&&xe.includes(t.type)){if(t.classes&&"tml-label"===t.classes[0])return t.label;{const e=be(t);if(e)return e}}else if(!t.type){const e=be(t);if(e)return e}};const we="acegıȷmnopqrsuvwxyzαγεηικμνοπρςστυχωϕ𝐚𝐜𝐞𝐠𝐦𝐧𝐨𝐩𝐪𝐫𝐬𝐮𝐯𝐰𝐱𝐲𝐳",ye=new Set(["\\alpha","\\gamma","\\delta","\\epsilon","\\eta","\\iota","\\kappa","\\mu","\\nu","\\pi","\\rho","\\sigma","\\tau","\\upsilon","\\chi","\\psi","\\omega","\\imath","\\jmath"]),ve=new Set(["\\Gamma","\\Delta","\\Sigma","\\Omega","\\beta","\\delta","\\lambda","\\theta","\\psi"]),Ae=(e,t)=>{const r=e.isStretchy?P(e):new L("mo",[ie(e.label,e.mode)]);if("\\vec"===e.label)r.style.transform="scale(0.75) translate(10%, 30%)";else if(r.style.mathStyle="normal",r.style.mathDepth="0",_e.has(e.label)&&c(e.base)){let t="";const n=e.base.text;(we.indexOf(n)>-1||ye.has(n))&&(t="tml-xshift"),("ABCDEFGHIJKLMNOPQRSTUVWXYZbdfhkltΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩβδλζφθψ𝐀𝐁𝐂𝐃𝐄𝐅𝐆𝐇𝐈𝐉𝐊𝐋𝐌𝐍𝐎𝐏𝐐𝐑𝐒𝐓𝐔𝐕𝐖𝐗𝐘𝐙𝐛𝐝𝐟𝐡𝐤𝐥𝐭".indexOf(n)>-1||ve.has(n))&&(t="tml-capshift"),t&&r.classes.push(t)}return e.isStretchy||r.setAttribute("stretchy","false"),new L("\\c"===e.label?"munder":"mover",[fe(e.base,t),r])},Ee=new Set(["\\acute","\\grave","\\ddot","\\dddot","\\ddddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"]),_e=new Set(["\\acute","\\bar","\\breve","\\check","\\dot","\\ddot","\\grave","\\hat","\\mathring","\\'","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v"]),Ce={"\\`":"̀","\\'":"́","\\^":"̂","\\~":"̃","\\=":"̄","\\u":"̆","\\.":"̇",'\\"':"̈","\\r":"̊","\\H":"̋","\\v":"̌"};f({type:"accent",names:["\\acute","\\grave","\\ddot","\\dddot","\\ddddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\overparen","\\widecheck","\\widehat","\\wideparen","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{const r=x(t[0]),n=!Ee.has(e.funcName);return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,base:r}},mathmlBuilder:Ae}),f({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\c","\\u","\\.",'\\"',"\\r","\\H","\\v"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{const r=x(t[0]),n=e.parser.mode;return"math"===n&&e.parser.settings.strict&&console.log(`Temml parse error: Command ${e.funcName} is invalid in math mode.`),"text"===n&&r.text&&1===r.text.length&&e.funcName in Ce&&we.indexOf(r.text)>-1?{type:"textord",mode:"text",text:r.text+Ce[e.funcName]}:{type:"accent",mode:n,label:e.funcName,isStretchy:!1,base:r}},mathmlBuilder:Ae}),f({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underparen","\\utilde"],props:{numArgs:1},handler:({parser:e,funcName:t},r)=>{const n=r[0];return{type:"accentUnder",mode:e.mode,label:t,base:n}},mathmlBuilder:(e,t)=>{const r=P(e);return r.style["math-depth"]=0,new L("munder",[fe(e.base,t),r])}});const qe={pt:800/803,pc:9600/803,dd:1238/1157*800/803,cc:12.792133216944668,nd:685/642*800/803,nc:1370/107*800/803,sp:1/65536*800/803,mm:25.4/72,cm:2.54/72,in:1/72,px:96/72},Te=["em","ex","mu","pt","mm","cm","in","px","bp","pc","dd","cc","nd","nc","sp"],ke=function(e){return"string"!=typeof e&&(e=e.unit),Te.indexOf(e)>-1},Se=e=>[1,.7,.5][Math.max(e-1,0)],Ne=function(e,r){let n=e.number;if(r.maxSize[0]<0&&n>0)return{number:0,unit:"em"};const a=e.unit;switch(a){case"mm":case"cm":case"in":case"px":return n*qe[a]>r.maxSize[1]?{number:r.maxSize[1],unit:"pt"}:{number:n,unit:a};case"em":case"ex":return"ex"===a&&(n*=.431),n=Math.min(n/Se(r.level),r.maxSize[0]),{number:d(n),unit:"em"};case"bp":return n>r.maxSize[1]&&(n=r.maxSize[1]),{number:n,unit:"pt"};case"pt":case"pc":case"dd":case"cc":case"nd":case"nc":case"sp":return n=Math.min(n*qe[a],r.maxSize[1]),{number:d(n),unit:"pt"};case"mu":return n=Math.min(n/18,r.maxSize[0]),{number:d(n),unit:"em"};default:throw new t("Invalid unit: '"+a+"'")}},Le=e=>{const t=new L("mspace");return t.setAttribute("width",e+"em"),t},Oe=(e,t=.3,r=0,n=!1)=>{if(null==e&&0===r)return Le(t);const a=e?[e]:[];if(0!==t&&a.unshift(Le(t)),r>0&&a.push(Le(r)),n){const e=new L("mpadded",a);return e.setAttribute("height","0"),e}return new L("mrow",a)},Me=(e,t)=>Number(e)/Se(t),De=(e,t,r,n)=>{const a=I(e),o="eq"===e.slice(1,3),i="x"===e.charAt(1)?"1.75":"cd"===e.slice(2,4)?"3.0":o?"1.0":"2.0";a.setAttribute("lspace","0"),a.setAttribute("rspace",o?"0.5em":"0");const s=n.withLevel(n.level<2?2:3),l=Me(i,s.level),c=Me(i,3),u=Oe(null,l.toFixed(4),0),d=Oe(null,c.toFixed(4),0),p=Me(o?0:.3,s.level).toFixed(4);let m,h;const f=t&&t.body&&(t.body.body||t.body.length>0);if(f){let r=fe(t,s);r=Oe(r,p,p,"\\\\cdrightarrow"===e||"\\\\cdleftarrow"===e),m=new L("mover",[r,d])}const g=r&&r.body&&(r.body.body||r.body.length>0);if(g){let e=fe(r,s);e=Oe(e,p,p),h=new L("munder",[e,d])}let x;return x=f||g?f&&g?new L("munderover",[a,h,m]):f?new L("mover",[a,m]):new L("munder",[a,h]):new L("mover",[a,u]),"3.0"===i&&(x.style.height="1em"),x.setAttribute("accent","false"),x};f({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\yields","\\yieldsLeft","\\mesomerism","\\longrightharpoonup","\\longleftharpoondown","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:({parser:e,funcName:t},r,n)=>({type:"xArrow",mode:e.mode,name:t,body:r[0],below:n[0]}),mathmlBuilder(e,t){const r=[De(e.name,e.body,e.below,t)];return r.unshift(Le(.2778)),r.push(Le(.2778)),new L("mrow",r)}});const Be={"\\xtofrom":["\\xrightarrow","\\xleftarrow"],"\\xleftrightharpoons":["\\xleftharpoonup","\\xrightharpoondown"],"\\xrightleftharpoons":["\\xrightharpoonup","\\xleftharpoondown"],"\\yieldsLeftRight":["\\yields","\\yieldsLeft"],"\\equilibrium":["\\longrightharpoonup","\\longleftharpoondown"],"\\equilibriumRight":["\\longrightharpoonup","\\eqleftharpoondown"],"\\equilibriumLeft":["\\eqrightharpoonup","\\longleftharpoondown"]};f({type:"stackedArrow",names:["\\xtofrom","\\xleftrightharpoons","\\xrightleftharpoons","\\yieldsLeftRight","\\equilibrium","\\equilibriumRight","\\equilibriumLeft"],props:{numArgs:1,numOptionalArgs:1},handler({parser:e,funcName:t},r,n){const a=r[0]?{type:"hphantom",mode:e.mode,body:r[0]}:null,o=n[0]?{type:"hphantom",mode:e.mode,body:n[0]}:null;return{type:"stackedArrow",mode:e.mode,name:t,body:r[0],upperArrowBelow:o,lowerArrowBody:a,below:n[0]}},mathmlBuilder(e,t){const r=Be[e.name][0],n=Be[e.name][1],a=De(r,e.body,e.upperArrowBelow,t),o=De(n,e.lowerArrowBody,e.below,t);let i;const s=new L("mpadded",[a]);if(s.setAttribute("voffset","0.3em"),s.setAttribute("height","+0.3em"),s.setAttribute("depth","-0.3em"),"\\equilibriumLeft"===e.name){const e=new L("mpadded",[o]);e.setAttribute("width","0.5em"),i=new L("mpadded",[Le(.2778),e,s,Le(.2778)])}else s.setAttribute("width","\\equilibriumRight"===e.name?"0.5em":"0"),i=new L("mpadded",[Le(.2778),s,o,Le(.2778)]);return i.setAttribute("voffset","-0.18em"),i.setAttribute("height","-0.18em"),i.setAttribute("depth","+0.18em"),i}});const Fe={};function $e({type:e,names:t,props:r,handler:n,mathmlBuilder:a}){const o={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n};for(let e=0;e<t.length;++e)Fe[t[e]]=o;a&&(h[e]=a)}function Ie(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 Pe(e){const t=Re(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 Re(e){return e&&("atom"===e.type||Object.prototype.hasOwnProperty.call(j,e.type))?e:null}const je={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ze=e=>"textord"===e.type&&"@"===e.text;function Ue(e,t,r){const n=je[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{const e={type:"atom",text:n,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[e],[]),r.callFunction("\\\\cdright",[t[1]],[])],semisimple:!0};return r.callFunction("\\\\cdparent",[a],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const e={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[e],[])}default:return{type:"textord",text:" ",mode:"math"}}}f({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:({parser:e,funcName:t},r)=>({type:"cdlabel",mode:e.mode,side:t.slice(4),label:r[0]}),mathmlBuilder(e,t){if(0===e.label.body.length)return new L("mrow",t);const r=new L("mtd",[fe(e.label,t)]);r.style.padding="0";const n=new L("mtr",[r]),a=new L("mtable",[n]),o=new L("mpadded",[a]);return o.setAttribute("width","0"),o.setAttribute("displaystyle","false"),o.setAttribute("scriptlevel","1"),"left"===e.side&&(o.style.display="flex",o.style.justifyContent="flex-end"),o}}),f({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:({parser:e},t)=>({type:"cdlabelparent",mode:e.mode,fragment:t[0]}),mathmlBuilder:(e,t)=>new L("mrow",[fe(e.fragment,t)])});const Ge=e=>({type:"ordgroup",mode:"math",body:e,semisimple:!0}),He=(e,t)=>({type:t,mode:"math",body:Ge(e)});class Ve{constructor(e,t,r){this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Ve(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class We{constructor(e,t){this.text=e,this.loc=t}range(e,t){return new We(t,Ve.range(this,e))}}const Xe={};function Ze(e,t){Xe[e]=t}const Ye=Xe;Ze("\\noexpand",(function(e){const t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Ze("\\expandafter",(function(e){const t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Ze("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Ze("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Ze("\\@ifnextchar",(function(e){const t=e.consumeArgs(3);e.consumeSpaces();const r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Ze("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Ze("\\TextOrMath",(function(e){const t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));const Je=e=>{let t="";for(let r=e.length-1;r>-1;r--)t+=e[r].text;return t},Ke={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},Qe=e=>{const t=e.future().text;return"EOF"===t?[null,""]:[Ke[t.charAt(0)],t]},et=(e,t,r)=>{for(let n=1;n<t.length;n++)e*=r,e+=Ke[t.charAt(n)];return e};function tt(e){const t=e.consumeArgs(1)[0];let r="",n=t[t.length-1].loc.start;for(let e=t.length-1;e>=0;e--){const a=t[e].loc.start;a>n&&(r+=" ",n=a),r+=t[e].text,n+=t[e].text.length}return r}Ze("\\char",(function(e){let r,n=e.popToken(),a="";if("'"===n.text)r=8,n=e.popToken();else if('"'===n.text)r=16,n=e.popToken();else if("`"===n.text)if(n=e.popToken(),"\\"===n.text[0])a=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new t("\\char` missing argument");a=n.text.charCodeAt(0)}else r=10;if(r){let o,i=n.text;if(a=Ke[i.charAt(0)],null==a||a>=r)throw new t(`Invalid base-${r} digit ${n.text}`);for(a=et(a,i,r),[o,i]=Qe(e);null!=o&&o<r;)a*=r,a+=o,a=et(a,i,r),e.popToken(),[o,i]=Qe(e)}return`\\@char{${a}}`})),Ze("\\surd","\\sqrt{\\vphantom{|}}"),Ze("⊕","\\oplus"),Ze("\\long",""),Ze("\\bgroup","{"),Ze("\\egroup","}"),Ze("~","\\nobreakspace"),Ze("\\lq","`"),Ze("\\rq","'"),Ze("\\aa","\\r a"),Ze("\\Bbbk","\\Bbb{k}"),Ze("\\mathstrut","\\vphantom{(}"),Ze("\\underbar","\\underline{\\text{#1}}"),Ze("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Ze("⋮","\\vdots"),Ze("\\arraystretch","1"),Ze("\\arraycolsep","6pt"),Ze("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Ze("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Ze("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Ze("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");const rt={",":"\\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","\\bigsqcap":"\\dotsb","\\bigsqcup":"\\dotsb","\\bigtimes":"\\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"};Ze("\\dots",(function(e){let t="\\dotso";const r=e.expandAfterFuture().text;return r in rt?t=rt[r]:("\\not"===r.slice(0,4)||r in z.math&&["bin","rel"].includes(z.math[r].group))&&(t="\\dotsb"),t}));const nt={")":!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};Ze("\\dotso",(function(e){return e.future().text in nt?"\\ldots\\,":"\\ldots"})),Ze("\\dotsc",(function(e){const t=e.future().text;return t in nt&&","!==t?"\\ldots\\,":"\\ldots"})),Ze("\\cdots",(function(e){return e.future().text in nt?"\\@cdots\\,":"\\@cdots"})),Ze("\\dotsb","\\cdots"),Ze("\\dotsm","\\cdots"),Ze("\\dotsi","\\!\\cdots"),Ze("\\idotsint","\\dotsi"),Ze("\\dotsx","\\ldots\\,"),Ze("\\DOTSI","\\relax"),Ze("\\DOTSB","\\relax"),Ze("\\DOTSX","\\relax"),Ze("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Ze("\\,","{\\tmspace+{3mu}{.1667em}}"),Ze("\\thinspace","\\,"),Ze("\\>","\\mskip{4mu}"),Ze("\\:","{\\tmspace+{4mu}{.2222em}}"),Ze("\\medspace","\\:"),Ze("\\;","{\\tmspace+{5mu}{.2777em}}"),Ze("\\thickspace","\\;"),Ze("\\!","{\\tmspace-{3mu}{.1667em}}"),Ze("\\negthinspace","\\!"),Ze("\\negmedspace","{\\tmspace-{4mu}{.2222em}}"),Ze("\\negthickspace","{\\tmspace-{5mu}{.277em}}"),Ze("\\enspace","\\kern.5em "),Ze("\\enskip","\\hskip.5em\\relax"),Ze("\\quad","\\hskip1em\\relax"),Ze("\\qquad","\\hskip2em\\relax"),Ze("\\AA","\\TextOrMath{\\Angstrom}{\\mathring{A}}\\relax"),Ze("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Ze("\\tag@paren","\\tag@literal{({#1})}"),Ze("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new t("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Ze("\\notag","\\nonumber"),Ze("\\nonumber","\\gdef\\@eqnsw{0}"),Ze("\\bmod","\\mathbin{\\text{mod}}"),Ze("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Ze("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Ze("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Ze("\\newline","\\\\\\relax"),Ze("\\TeX","\\textrm{T}\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125em\\textrm{X}"),Ze("\\LaTeX","\\textrm{L}\\kern-.35em\\raisebox{0.2em}{\\scriptstyle A}\\kern-.15em\\TeX"),Ze("\\Temml","\\textrm{T}\\kern-0.2em\\lower{0.2em}{\\textrm{E}}\\kern-0.08em{\\textrm{M}\\kern-0.08em\\raise{0.2em}\\textrm{M}\\kern-0.08em\\textrm{L}}"),Ze("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Ze("\\@hspace","\\hskip #1\\relax"),Ze("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Ze("\\colon",'\\mathpunct{\\char"3a}'),Ze("\\prescript","\\pres@cript{_{#1}^{#2}}{}{#3}"),Ze("\\ordinarycolon",'\\char"3a'),Ze("\\vcentcolon","\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}}"),Ze("\\coloneq",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"2212}'),Ze("\\Coloneq",'\\mathrel{\\char"2237\\char"2212}'),Ze("\\Eqqcolon",'\\mathrel{\\char"3d\\char"2237}'),Ze("\\Eqcolon",'\\mathrel{\\char"2212\\char"2237}'),Ze("\\colonapprox",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"2248}'),Ze("\\Colonapprox",'\\mathrel{\\char"2237\\char"2248}'),Ze("\\colonsim",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"223c}'),Ze("\\Colonsim",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"223c}'),Ze("\\ratio","\\vcentcolon"),Ze("\\coloncolon","\\dblcolon"),Ze("\\colonequals","\\coloneqq"),Ze("\\coloncolonequals","\\Coloneqq"),Ze("\\equalscolon","\\eqqcolon"),Ze("\\equalscoloncolon","\\Eqqcolon"),Ze("\\colonminus","\\coloneq"),Ze("\\coloncolonminus","\\Coloneq"),Ze("\\minuscolon","\\eqcolon"),Ze("\\minuscoloncolon","\\Eqcolon"),Ze("\\coloncolonapprox","\\Colonapprox"),Ze("\\coloncolonsim","\\Colonsim"),Ze("\\notni","\\mathrel{\\char`∌}"),Ze("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Ze("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Ze("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Ze("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Ze("\\varlimsup","\\DOTSB\\operatorname*{\\overline{\\text{lim}}}"),Ze("\\varliminf","\\DOTSB\\operatorname*{\\underline{\\text{lim}}}"),Ze("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{\\text{lim}}}"),Ze("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{\\text{lim}}}"),Ze("\\centerdot","{\\medspace\\rule{0.167em}{0.189em}\\medspace}"),Ze("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Ze("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Ze("\\plim","\\DOTSB\\operatorname*{plim}"),Ze("\\leftmodels","\\mathop{\\reflectbox{$\\models$}}"),Ze("\\bra","\\mathinner{\\langle{#1}|}"),Ze("\\ket","\\mathinner{|{#1}\\rangle}"),Ze("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Ze("\\Bra","\\left\\langle#1\\right|"),Ze("\\Ket","\\left|#1\\right\\rangle");const at=(e,t)=>{const r=`}\\,\\middle${"|"===t[0]?"\\vert":"\\Vert"}\\,{`;return e.slice(0,t.index)+r+e.slice(t.index+t[0].length)};Ze("\\Braket",(function(e){let t=tt(e);const r=/\|\||\||\\\|/g;let n;for(;null!==(n=r.exec(t));)t=at(t,n);return"\\left\\langle{"+t+"}\\right\\rangle"})),Ze("\\Set",(function(e){let t=tt(e);const r=/\|\||\||\\\|/.exec(t);return r&&(t=at(t,r)),"\\left\\{\\:{"+t+"}\\:\\right\\}"})),Ze("\\set",(function(e){return"\\{{"+tt(e).replace(/\|/,"}\\mid{")+"}\\}"})),Ze("\\angln","{\\angl n}"),Ze("\\odv","\\@ifstar\\odv@next\\odv@numerator"),Ze("\\odv@numerator","\\frac{\\mathrm{d}#1}{\\mathrm{d}#2}"),Ze("\\odv@next","\\frac{\\mathrm{d}}{\\mathrm{d}#2}#1"),Ze("\\pdv","\\@ifstar\\pdv@next\\pdv@numerator");const ot=e=>{const t=e[0][0].text,r=Je(e[1]).split(","),n=String(r.length),a="1"===n?"\\partial":`\\partial^${n}`;let o="";return r.map((e=>{o+="\\partial "+e.trim()+"\\,"})),[t,a,o.replace(/\\,$/,"")]};Ze("\\pdv@numerator",(function(e){const[t,r,n]=ot(e.consumeArgs(2));return`\\frac{${r} ${t}}{${n}}`})),Ze("\\pdv@next",(function(e){const[t,r,n]=ot(e.consumeArgs(2));return`\\frac{${r}}{${n}} ${t}`})),Ze("\\upalpha","\\up@greek{\\alpha}"),Ze("\\upbeta","\\up@greek{\\beta}"),Ze("\\upgamma","\\up@greek{\\gamma}"),Ze("\\updelta","\\up@greek{\\delta}"),Ze("\\upepsilon","\\up@greek{\\epsilon}"),Ze("\\upzeta","\\up@greek{\\zeta}"),Ze("\\upeta","\\up@greek{\\eta}"),Ze("\\uptheta","\\up@greek{\\theta}"),Ze("\\upiota","\\up@greek{\\iota}"),Ze("\\upkappa","\\up@greek{\\kappa}"),Ze("\\uplambda","\\up@greek{\\lambda}"),Ze("\\upmu","\\up@greek{\\mu}"),Ze("\\upnu","\\up@greek{\\nu}"),Ze("\\upxi","\\up@greek{\\xi}"),Ze("\\upomicron","\\up@greek{\\omicron}"),Ze("\\uppi","\\up@greek{\\pi}"),Ze("\\upalpha","\\up@greek{\\alpha}"),Ze("\\uprho","\\up@greek{\\rho}"),Ze("\\upsigma","\\up@greek{\\sigma}"),Ze("\\uptau","\\up@greek{\\tau}"),Ze("\\upupsilon","\\up@greek{\\upsilon}"),Ze("\\upphi","\\up@greek{\\phi}"),Ze("\\upchi","\\up@greek{\\chi}"),Ze("\\uppsi","\\up@greek{\\psi}"),Ze("\\upomega","\\up@greek{\\omega}"),Ze("\\invamp",'\\mathbin{\\char"214b}'),Ze("\\parr",'\\mathbin{\\char"214b}'),Ze("\\with",'\\mathbin{\\char"26}'),Ze("\\multimapinv",'\\mathrel{\\char"27dc}'),Ze("\\multimapboth",'\\mathrel{\\char"29df}'),Ze("\\scoh",'{\\mkern5mu\\char"2322\\mkern5mu}'),Ze("\\sincoh",'{\\mkern5mu\\char"2323\\mkern5mu}'),Ze("\\coh",'{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char"2322}}}\n{\\smash{\\lower4mu{\\char"2323}}}\\mkern5mu}'),Ze("\\incoh",'{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char"2323}}}\n{\\smash{\\lower4mu{\\char"2322}}}\\mkern5mu}'),Ze("\\standardstate","\\text{\\tiny\\char`⦵}"),Ze("\\ce",(function(e){return it(e.consumeArgs(1)[0],"ce")})),Ze("\\pu",(function(e){return it(e.consumeArgs(1)[0],"pu")})),Ze("\\uniDash","{\\rule{0.672em}{0.06em}}"),Ze("\\triDash","{\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}}"),Ze("\\tripleDash","\\kern0.075em\\raise0.25em{\\triDash}\\kern0.075em"),Ze("\\tripleDashOverLine","\\kern0.075em\\mathrlap{\\raise0.125em{\\uniDash}}\\raise0.34em{\\triDash}\\kern0.075em"),Ze("\\tripleDashOverDoubleLine","\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\triDash}}\\raise0.27em{\\uniDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em"),Ze("\\tripleDashBetweenDoubleLine","\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\uniDash}}\\raise0.27em{\\triDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em");var it=function(e,t){for(var r="",n=e.length&&e[e.length-1].loc.start,a=e.length-1;a>=0;a--)e[a].loc.start>n&&(r+=" ",n=e[a].loc.start),r+=e[a].text,n+=e[a].text.length;return lt.go(st.go(r,t))},st={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var r,n="0",a={parenthesisLevel:0};e=(e=(e=e.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var o=10,i=[];;){r!==e?(o=10,r=e):o--;var s=st.stateMachines[t],l=s.transitions[n]||s.transitions["*"];e:for(var c=0;c<l.length;c++){var u=st.patterns.match_(l[c].pattern,e);if(u){for(var d=l[c].task,p=0;p<d.action_.length;p++){var m;if(s.actions[d.action_[p].type_])m=s.actions[d.action_[p].type_](a,u.match_,d.action_[p].option);else{if(!st.actions[d.action_[p].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[p].type_+")"];m=st.actions[d.action_[p].type_](a,u.match_,d.action_[p].option)}st.concatArray(i,m)}if(n=d.nextState||n,!(e.length>0))return i;if(d.revisit||(e=u.remainder),!d.toContinue)break e}}if(o<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.splice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=st.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var r=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return r?{match_:r[0],remainder:e.substr(r[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return st.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return st.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return st.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return st.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return st.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return st.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return st.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return st.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return st.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return st.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return st.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return st.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return st.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return st.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return st.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return st.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return st.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return st.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return st.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return st.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return st.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return st.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return st.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return st.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return st.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:t[0],remainder:e.substr(t[0].length)};var r=st.patterns.findObserveGroups(e,"","$","$","");return r&&(t=r.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,r,n,a,o,i,s,l,c){var u=function(e,t){if("string"==typeof t)return 0!==e.indexOf(t)?null:t;var r=e.match(t);return r?r[0]:null},d=u(e,t);if(null===d)return null;if(e=e.substr(d.length),null===(d=u(e,r)))return null;var p=function(e,t,r){for(var n=0;t<e.length;){var a=e.charAt(t),o=u(e.substr(t),r);if(null!==o&&0===n)return{endMatchBegin:t,endMatchEnd:t+o.length};if("{"===a)n++;else if("}"===a){if(0===n)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];n--}t++}return null}(e,d.length,n||a);if(null===p)return null;var m=e.substring(0,n?p.endMatchEnd:p.endMatchBegin);if(o||i){var h=this.findObserveGroups(e.substr(p.endMatchEnd),o,i,s,l);if(null===h)return null;var f=[m,h.match_];return{match_:c?f.join(""):f,remainder:h.remainder}}return{match_:m,remainder:e.substr(p.endMatchEnd)}},match_:function(e,t){var r=st.patterns.patterns[e];if(void 0===r)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if("function"==typeof r)return st.patterns.patterns[e](t);var n=t.match(r);return n?{match_:n[2]?[n[1],n[2]]:n[1]?n[1]:n[0],remainder:t.substr(n[0].length)}:null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,r){return{type_:r}},"insert+p1":function(e,t,r){return{type_:r,p1:t}},"insert+p1+p2":function(e,t,r){return{type_:r,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return st.go(t,"text")},"{text}":function(e,t){var r=["{"];return st.concatArray(r,st.go(t,"text")),r.push("}"),r},"tex-math":function(e,t){return st.go(t,"tex-math")},"tex-math tight":function(e,t){return st.go(t,"tex-math tight")},bond:function(e,t,r){return{type_:"bond",kind_:r||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return st.go(t)},"1/2":function(e,t){var r=[];t.match(/^[+\-]/)&&(r.push(t.substr(0,1)),t=t.substr(1));var n=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return n[1]=n[1].replace(/\$/g,""),r.push({type_:"frac",p1:n[1],p2:n[2]}),n[3]&&(n[3]=n[3].replace(/\$/g,""),r.push({type_:"tex-math",p1:n[3]})),r},"9,9":function(e,t){return st.go(t,"9,9")}},createTransitions:function(e){var t,r,n,a,o={};for(t in e)for(r in e[t])for(n=r.split("|"),e[t][r].stateArray=n,a=0;a<n.length;a++)o[n[a]]=[];for(t in e)for(r in e[t])for(n=e[t][r].stateArray||[],a=0;a<n.length;a++){var i=e[t][r];if(i.action_){i.action_=[].concat(i.action_);for(var s=0;s<i.action_.length;s++)"string"==typeof i.action_[s]&&(i.action_[s]={type_:i.action_[s]})}else i.action_=[];for(var l=t.split("|"),c=0;c<l.length;c++)if("*"===n[a])for(var u in o)o[u].push({pattern:l[c],task:i});else o[n[a]].push({pattern:l[c],task:i})}return o},stateMachines:{}};st.stateMachines={ce:{transitions:st.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var r;if((e.d||"").match(/^[0-9]+$/)){var n=e.d;e.d=void 0,r=this.output(e),e.b=n}else r=this.output(e);return st.actions["o="](e,t),r},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var r=[];return st.concatArray(r,this.output(e)),st.concatArray(r,st.actions.bond(e,t,"-")),r}e.d=t},"- after o/d":function(e,t,r){var n=st.patterns.match_("orbital",e.o||""),a=st.patterns.match_("one lowercase greek letter $",e.o||""),o=st.patterns.match_("one lowercase latin letter $",e.o||""),i=st.patterns.match_("$one lowercase latin letter$ $",e.o||""),s="-"===t&&(n&&""===n.remainder||a||o||i);!s||e.a||e.b||e.p||e.d||e.q||n||!o||(e.o="$"+e.o+"$");var l=[];return s?(st.concatArray(l,this.output(e)),l.push({type_:"hyphen"})):(n=st.patterns.match_("digits",e.d||""),r&&n&&""===n.remainder?(st.concatArray(l,st.actions["d="](e,t)),st.concatArray(l,this.output(e))):(st.concatArray(l,this.output(e)),st.concatArray(l,st.actions.bond(e,t,"-")))),l},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:st.go(t,"o")}},comma:function(e,t){var r=t.replace(/\s*$/,"");return r!==t&&0===e.parenthesisLevel?{type_:"comma enumeration L",p1:r}:{type_:"comma enumeration M",p1:r}},output:function(e,t,r){var n,a,o;for(var i in e.r?(a="M"===e.rdt?st.go(e.rd,"tex-math"):"T"===e.rdt?[{type_:"text",p1:e.rd||""}]:st.go(e.rd),o="M"===e.rqt?st.go(e.rq,"tex-math"):"T"===e.rqt?[{type_:"text",p1:e.rq||""}]:st.go(e.rq),n={type_:"arrow",r:e.r,rd:a,rq:o}):(n=[],(e.a||e.b||e.p||e.o||e.q||e.d||r)&&(e.sb&&n.push({type_:"entitySkip"}),e.o||e.q||e.d||e.b||e.p||2===r?e.o||e.q||e.d||!e.b&&!e.p?e.o&&"kv"===e.dType&&st.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&"kv"===e.dType&&!e.q&&(e.dType=void 0):(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):(e.o=e.a,e.a=void 0),n.push({type_:"chemfive",a:st.go(e.a,"a"),b:st.go(e.b,"bd"),p:st.go(e.p,"pq"),o:st.go(e.o,"o"),q:st.go(e.q,"pq"),d:st.go(e.d,"oxidation"===e.dType?"oxidation":"bd"),dType:e.dType}))),e)"parenthesisLevel"!==i&&"beginsWithBond"!==i&&delete e[i];return n},"oxidation-output":function(e,t){var r=["{"];return st.concatArray(r,st.go(t,"oxidation")),r.push("}"),r},"frac-output":function(e,t){return{type_:"frac-ce",p1:st.go(t[0]),p2:st.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:st.go(t[0]),p2:st.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:st.go(t[0]),p2:st.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:st.go(t[0]),p2:st.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:st.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,r){return{type_:"operator",kind_:r||t}}}},a:{transitions:st.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:st.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:st.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var r in e)delete e[r];return t}}}},pq:{transitions:st.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:st.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:st.go(t[1],"pq")}}}},bd:{transitions:st.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:st.go(t[1],"bd")}}}},oxidation:{transitions:st.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:st.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"tex-math tight":{transitions:st.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var r in e)delete e[r];return t}}}},"9,9":{transitions:st.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:st.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var r=[];return"+-"===t[0]||"+/-"===t[0]?r.push("\\pm "):t[0]&&r.push(t[0]),t[1]&&(st.concatArray(r,st.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?st.concatArray(r,st.go(t[2],"pu-9,9")):r.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),"e"===t[3]||"*"===t[3].substr(0,1)?r.push({type_:"cdot"}):r.push({type_:"times"}))),t[3]&&r.push("10^{"+t[5]+"}"),r},"number^":function(e,t){var r=[];return"+-"===t[0]||"+/-"===t[0]?r.push("\\pm "):t[0]&&r.push(t[0]),st.concatArray(r,st.go(t[1],"pu-9,9")),r.push("^{"+t[2]+"}"),r},operator:function(e,t,r){return{type_:"operator",kind_:r||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,r=st.patterns.match_("{(...)}",e.d||"");r&&""===r.remainder&&(e.d=r.match_);var n=st.patterns.match_("{(...)}",e.q||"");if(n&&""===n.remainder&&(e.q=n.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:st.go(e.d,"pu"),q:st.go(e.q,"pu")};"//"===e.o?t={type_:"pu-frac",p1:a.d,p2:a.q}:(t=a.d,a.d.length>1||a.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),st.concatArray(t,a.q))}else t=st.go(e.d,"pu-2");for(var o in e)delete e[o];return t}}},"pu-2":{transitions:st.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var r=st.patterns.match_("{(...)}",e.rm||"");t=r&&""===r.remainder?st.go(r.match_,"pu"):{type_:"rm",p1:e.rm}}for(var n in e)delete e[n];return t}}},"pu-9,9":{transitions:st.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var r=e.text_.length%3;0===r&&(r=3);for(var n=e.text_.length-3;n>0;n-=3)t.push(e.text_.substr(n,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,r)),t.reverse()}else t.push(e.text_);for(var a in e)delete e[a];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var r=e.text_.length-3,n=0;n<r;n+=3)t.push(e.text_.substr(n,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(n))}else t.push(e.text_);for(var a in e)delete e[a];return t}}}};var lt={go:function(e,t){if(!e)return"";for(var r="",n=!1,a=0;a<e.length;a++){var o=e[a];"string"==typeof o?r+=o:(r+=lt._go2(o),"1st-level escape"===o.type_&&(n=!0))}return t||n||!r||(r="{"+r+"}"),r},_goInner:function(e){return e?lt.go(e,!0):e},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var r={a:lt._goInner(e.a),b:lt._goInner(e.b),p:lt._goInner(e.p),o:lt._goInner(e.o),q:lt._goInner(e.q),d:lt._goInner(e.d)};r.a&&(r.a.match(/^[+\-]/)&&(r.a="{"+r.a+"}"),t+=r.a+"\\,"),(r.b||r.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(r.b||"")+"}}_{\\hphantom{"+(r.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\vphantom{2}\\mathllap{"+(r.b||"")+"}}",t+="_{\\vphantom{2}\\mathllap{"+(r.p||"")+"}}"),r.o&&(r.o.match(/^[+\-]/)&&(r.o="{"+r.o+"}"),t+=r.o),"kv"===e.dType?((r.d||r.q)&&(t+="{\\vphantom{X}}"),r.d&&(t+="^{"+r.d+"}"),r.q&&(t+="_{"+r.q+"}")):"oxidation"===e.dType?(r.d&&(t+="{\\vphantom{X}}",t+="^{"+r.d+"}"),r.q&&(t+="{{}}",t+="_{"+r.q+"}")):(r.q&&(t+="{{}}",t+="_{"+r.q+"}"),r.d&&(t+="{{}}",t+="^{"+r.d+"}"));break;case"rm":case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+lt._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+lt._goInner(e.p1);break;case"bond":if(!(t=lt._getBond(e.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var n="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+n+"}{"+n+"}{"+n+"}{"+n+"}";break;case"pu-frac":var a="\\frac{"+lt._goInner(e.p1)+"}{"+lt._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+a+"}{"+a+"}{"+a+"}{"+a+"}";break;case"tex-math":case"1st-level escape":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+lt._goInner(e.p1)+"}{"+lt._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+lt._goInner(e.p1)+"}{"+lt._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+lt._goInner(e.p1)+"}{"+lt._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+lt._goInner(e.p1)+"}_{"+lt._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+lt._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var o={rd:lt._goInner(e.rd),rq:lt._goInner(e.rq)},i=lt._getArrow(e.r);o.rq&&(i+="[{\\rm "+o.rq+"}]"),t=i+=o.rd?"{\\rm "+o.rd+"}":"{}";break;case"operator":t=lt._getOperator(e.kind_);break;case"space":t=" ";break;case"entitySkip":case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\text{\\textbullet}\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){case"->":case"→":case"⟶":return"\\yields";case"<-":return"\\yieldsLeft";case"<->":return"\\mesomerism";case"<--\x3e":return"\\yieldsLeftRight";case"<=>":case"⇌":return"\\equilibrium";case"<=>>":return"\\equilibriumRight";case"<<=>":return"\\equilibriumLeft";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripleDash}";case"~-":return"{\\tripleDashOverLine}";case"~=":case"~--":return"{\\tripleDashOverDoubleLine}";case"-~-":return"{\\tripleDashBetweenDoubleLine}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function ct(e){const t=[];e.consumeSpaces();let r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}Ze("\\darr","\\downarrow"),Ze("\\dArr","\\Downarrow"),Ze("\\Darr","\\Downarrow"),Ze("\\lang","\\langle"),Ze("\\rang","\\rangle"),Ze("\\uarr","\\uparrow"),Ze("\\uArr","\\Uparrow"),Ze("\\Uarr","\\Uparrow"),Ze("\\N","\\mathbb{N}"),Ze("\\R","\\mathbb{R}"),Ze("\\Z","\\mathbb{Z}"),Ze("\\alef","\\aleph"),Ze("\\alefsym","\\aleph"),Ze("\\bull","\\bullet"),Ze("\\clubs","\\clubsuit"),Ze("\\cnums","\\mathbb{C}"),Ze("\\Complex","\\mathbb{C}"),Ze("\\Dagger","\\ddagger"),Ze("\\diamonds","\\diamondsuit"),Ze("\\empty","\\emptyset"),Ze("\\exist","\\exists"),Ze("\\harr","\\leftrightarrow"),Ze("\\hArr","\\Leftrightarrow"),Ze("\\Harr","\\Leftrightarrow"),Ze("\\hearts","\\heartsuit"),Ze("\\image","\\Im"),Ze("\\infin","\\infty"),Ze("\\isin","\\in"),Ze("\\larr","\\leftarrow"),Ze("\\lArr","\\Leftarrow"),Ze("\\Larr","\\Leftarrow"),Ze("\\lrarr","\\leftrightarrow"),Ze("\\lrArr","\\Leftrightarrow"),Ze("\\Lrarr","\\Leftrightarrow"),Ze("\\natnums","\\mathbb{N}"),Ze("\\plusmn","\\pm"),Ze("\\rarr","\\rightarrow"),Ze("\\rArr","\\Rightarrow"),Ze("\\Rarr","\\Rightarrow"),Ze("\\real","\\Re"),Ze("\\reals","\\mathbb{R}"),Ze("\\Reals","\\mathbb{R}"),Ze("\\sdot","\\cdot"),Ze("\\sect","\\S"),Ze("\\spades","\\spadesuit"),Ze("\\sub","\\subset"),Ze("\\sube","\\subseteq"),Ze("\\supe","\\supseteq"),Ze("\\thetasym","\\vartheta"),Ze("\\weierp","\\wp"),Ze("\\quantity","{\\left\\{ #1 \\right\\}}"),Ze("\\qty","{\\left\\{ #1 \\right\\}}"),Ze("\\pqty","{\\left( #1 \\right)}"),Ze("\\bqty","{\\left[ #1 \\right]}"),Ze("\\vqty","{\\left\\vert #1 \\right\\vert}"),Ze("\\Bqty","{\\left\\{ #1 \\right\\}}"),Ze("\\absolutevalue","{\\left\\vert #1 \\right\\vert}"),Ze("\\abs","{\\left\\vert #1 \\right\\vert}"),Ze("\\norm","{\\left\\Vert #1 \\right\\Vert}"),Ze("\\evaluated","{\\left.#1 \\right\\vert}"),Ze("\\eval","{\\left.#1 \\right\\vert}"),Ze("\\order","{\\mathcal{O} \\left( #1 \\right)}"),Ze("\\commutator","{\\left[ #1 , #2 \\right]}"),Ze("\\comm","{\\left[ #1 , #2 \\right]}"),Ze("\\anticommutator","{\\left\\{ #1 , #2 \\right\\}}"),Ze("\\acomm","{\\left\\{ #1 , #2 \\right\\}}"),Ze("\\poissonbracket","{\\left\\{ #1 , #2 \\right\\}}"),Ze("\\pb","{\\left\\{ #1 , #2 \\right\\}}"),Ze("\\vectorbold","{\\boldsymbol{ #1 }}"),Ze("\\vb","{\\boldsymbol{ #1 }}"),Ze("\\vectorarrow","{\\vec{\\boldsymbol{ #1 }}}"),Ze("\\va","{\\vec{\\boldsymbol{ #1 }}}"),Ze("\\vectorunit","{{\\boldsymbol{\\hat{ #1 }}}}"),Ze("\\vu","{{\\boldsymbol{\\hat{ #1 }}}}"),Ze("\\dotproduct","\\mathbin{\\boldsymbol\\cdot}"),Ze("\\vdot","{\\boldsymbol\\cdot}"),Ze("\\crossproduct","\\mathbin{\\boldsymbol\\times}"),Ze("\\cross","\\mathbin{\\boldsymbol\\times}"),Ze("\\cp","\\mathbin{\\boldsymbol\\times}"),Ze("\\gradient","{\\boldsymbol\\nabla}"),Ze("\\grad","{\\boldsymbol\\nabla}"),Ze("\\divergence","{\\grad\\vdot}"),Ze("\\curl","{\\grad\\cross}"),Ze("\\laplacian","\\nabla^2"),Ze("\\tr","{\\operatorname{tr}}"),Ze("\\Tr","{\\operatorname{Tr}}"),Ze("\\rank","{\\operatorname{rank}}"),Ze("\\erf","{\\operatorname{erf}}"),Ze("\\Res","{\\operatorname{Res}}"),Ze("\\principalvalue","{\\mathcal{P}}"),Ze("\\pv","{\\mathcal{P}}"),Ze("\\PV","{\\operatorname{P.V.}}"),Ze("\\qqtext","{\\quad\\text{ #1 }\\quad}"),Ze("\\qq","{\\quad\\text{ #1 }\\quad}"),Ze("\\qcomma","{\\text{,}\\quad}"),Ze("\\qc","{\\text{,}\\quad}"),Ze("\\qcc","{\\quad\\text{c.c.}\\quad}"),Ze("\\qif","{\\quad\\text{if}\\quad}"),Ze("\\qthen","{\\quad\\text{then}\\quad}"),Ze("\\qelse","{\\quad\\text{else}\\quad}"),Ze("\\qotherwise","{\\quad\\text{otherwise}\\quad}"),Ze("\\qunless","{\\quad\\text{unless}\\quad}"),Ze("\\qgiven","{\\quad\\text{given}\\quad}"),Ze("\\qusing","{\\quad\\text{using}\\quad}"),Ze("\\qassume","{\\quad\\text{assume}\\quad}"),Ze("\\qsince","{\\quad\\text{since}\\quad}"),Ze("\\qlet","{\\quad\\text{let}\\quad}"),Ze("\\qfor","{\\quad\\text{for}\\quad}"),Ze("\\qall","{\\quad\\text{all}\\quad}"),Ze("\\qeven","{\\quad\\text{even}\\quad}"),Ze("\\qodd","{\\quad\\text{odd}\\quad}"),Ze("\\qinteger","{\\quad\\text{integer}\\quad}"),Ze("\\qand","{\\quad\\text{and}\\quad}"),Ze("\\qor","{\\quad\\text{or}\\quad}"),Ze("\\qas","{\\quad\\text{as}\\quad}"),Ze("\\qin","{\\quad\\text{in}\\quad}"),Ze("\\differential","{\\text{d}}"),Ze("\\dd","{\\text{d}}"),Ze("\\derivative","{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}"),Ze("\\dv","{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}"),Ze("\\partialderivative","{\\frac{\\partial{ #1 }}{\\partial{ #2 }}}"),Ze("\\variation","{\\delta}"),Ze("\\var","{\\delta}"),Ze("\\functionalderivative","{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}"),Ze("\\fdv","{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}"),Ze("\\innerproduct","{\\left\\langle {#1} \\mid { #2} \\right\\rangle}"),Ze("\\outerproduct","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"),Ze("\\dyad","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"),Ze("\\ketbra","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"),Ze("\\op","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"),Ze("\\expectationvalue","{\\left\\langle {#1 } \\right\\rangle}"),Ze("\\expval","{\\left\\langle {#1 } \\right\\rangle}"),Ze("\\ev","{\\left\\langle {#1 } \\right\\rangle}"),Ze("\\matrixelement","{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}"),Ze("\\matrixel","{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}"),Ze("\\mel","{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}");const ut=e=>{if(!e.parser.settings.displayMode)throw new t(`{${e.envName}} can be used only in display mode.`)},dt=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/,pt=e=>{let t=e.get("\\arraystretch");"string"!=typeof t&&(t=Je(t.tokens)),t=isNaN(t)?null:Number(t);let r=e.get("\\arraycolsep");"string"!=typeof r&&(r=Je(r.tokens));const n=dt.exec(r);return[t,n?{number:+(n[1]+n[2]),unit:n[3]}:null]},mt=e=>{let r="";for(let n=0;n<e.length;n++)if("label"===e[n].type){if(r)throw new t("Multiple \\labels in one row");r=e[n].string}return r};function ht(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function ft(e,{cols:r,envClasses:n,autoTag:a,singleRow:o,emptySingleRow:i,maxNumCols:s,leqno:l,arraystretch:c,arraycolsep:u},d){const p=n&&n.includes("bordermatrix")?"}":"\\end";e.gullet.beginGroup(),o||e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();let m=[];const h=[m],f=[],g=[],x=[],b=null!=a?[]:void 0;function w(){a&&e.gullet.macros.set("\\@eqnsw","1",!0)}function y(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new We("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(a)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(w(),x.push(ct(e));;){let r=e.parseExpression(!1,o?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),r={type:"ordgroup",mode:e.mode,body:r,semisimple:!0},m.push(r);const a=e.fetch().text;if("&"===a){if(s&&m.length===s){if(!n.includes("array"))throw new t(2===s?"The split environment accepts no more than two columns":"The equation environment accepts only one column",e.nextToken);if(e.settings.strict)throw new t("Too few columns specified in the {array} column argument.",e.nextToken)}e.consume()}else{if(a===p){y(),1===m.length&&0===r.body.length&&(h.length>1||!i)&&h.pop(),g.push(mt(r.body)),x.length<h.length+1&&x.push([]);break}if("\\\\"!==a)throw new t("Expected & or \\\\ or \\cr or "+p,e.nextToken);{let t;e.consume()," "!==e.gullet.future().text&&(t=e.parseSizeGroup(!0)),f.push(t?t.value:null),y(),g.push(mt(r.body)),x.push(ct(e)),m=[],h.push(m),w()}}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,body:h,cols:r,rowGaps:f,hLinesBeforeRow:x,envClasses:n,autoTag:a,scriptLevel:d,tags:b,labels:g,leqno:l,arraystretch:c,arraycolsep:u}}function gt(e){return"d"===e.slice(0,1)?"display":"text"}const xt={c:"center ",l:"left ",r:"right "},bt=e=>{const t=new L("mtd",[]);return t.style={padding:"0",width:"50%"},e.envClasses.includes("multline")&&(t.style.width="7.5%"),t},wt=function(e,t){const r=[],n=e.body.length,a=e.hLinesBeforeRow;for(let o=0;o<n;o++){const i=e.body[o],s=[],l="text"===e.scriptLevel?1:"script"===e.scriptLevel?2:0;for(let r=0;r<i.length;r++){const a=new L("mtd",[fe(i[r],t.withLevel(l))]);if(e.envClasses.includes("multline")){const e=0===o?"left":o===n-1?"right":"center";a.setAttribute("columnalign",e),"center"!==e&&a.classes.push("tml-"+e)}s.push(a)}const c=e.body[0].length;for(let e=0;e<c-i.length;e++)s.push(new L("mtd",[],t));if(e.autoTag){const r=e.tags[o];let n;!0===r?n=new L("mtext",[new _(["tml-eqn"])]):!1===r?n=new L("mtext",[],[]):(n=he(r[0].body,t.withLevel(l),!0),n=le(n),n.classes=["tml-tag"]),n&&(s.unshift(bt(e)),s.push(bt(e)),e.leqno?(s[0].children.push(n),s[0].classes.push("tml-left")):(s[s.length-1].children.push(n),s[s.length-1].classes.push("tml-right")))}const u=new L("mtr",s,[]),d=e.labels.shift();d&&e.tags&&e.tags[o]&&(u.setAttribute("id",d),Array.isArray(e.tags[o])&&u.classes.push("tml-tageqn")),0===o&&a[0].length>0&&(2===a[0].length?u.children.forEach((e=>{e.style.borderTop="0.15em double"})):u.children.forEach((e=>{e.style.borderTop=a[0][0]?"0.06em dashed":"0.06em solid"}))),a[o+1].length>0&&(2===a[o+1].length?u.children.forEach((e=>{e.style.borderBottom="0.15em double"})):u.children.forEach((e=>{e.style.borderBottom=a[o+1][0]?"0.06em dashed":"0.06em solid"})));let p=!0;for(let e=0;e<u.children.length;e++){const t=u.children[e].children[0];if(!t||"mpadded"!==t.type||"0px"!==t.attributes.height){p=!1;break}}if(p)for(let e=0;e<u.children.length;e++)u.children[e].style.paddingTop="0",u.children[e].style.paddingBottom="0";r.push(u)}if(e.arraystretch&&1!==e.arraystretch){const t=String(1.4*e.arraystretch-.8)+"ex";for(let e=0;e<r.length;e++)for(let n=0;n<r[e].children.length;n++)r[e].children[n].style.paddingTop=t,r[e].children[n].style.paddingBottom=t}let o,i;if(e.envClasses.length>0&&(o=e.envClasses.includes("abut")||e.envClasses.includes("cases")?"0":e.envClasses.includes("small")?"0.1389":e.envClasses.includes("cd")?"0.25":"0.4",i="em"),e.arraycolsep){const r=Ne(e.arraycolsep,t);o=r.number.toFixed(4),i=r.unit}if(o){const t=0===r.length?0:r[0].children.length,n=(r,n)=>0===r&&0===n||r===t-1&&1===n?"0":"align"!==e.envClasses[0]?o:1===n?"0":e.autoTag?r%2?"1":"0":r%2?"0":"1";for(let e=0;e<r.length;e++)for(let t=0;t<r[e].children.length;t++)r[e].children[t].style.paddingLeft=`${n(t,0)}${i}`,r[e].children[t].style.paddingRight=`${n(t,1)}${i}`}if(0===e.envClasses.length)for(let e=0;e<r.length;e++)r[e].children[0].style.paddingLeft="0em",r[e].children.length===r[0].children.length&&(r[e].children[r[e].children.length-1].style.paddingRight="0em");if(e.envClasses.length>0){const t=e.envClasses.includes("align")||e.envClasses.includes("alignat");for(let n=0;n<r.length;n++){const a=r[n];if(t){for(let e=0;e<a.children.length;e++)a.children[e].classes=["tml-"+(e%2?"left":"right")];if(e.autoTag){const t=e.leqno?0:a.children.length-1;a.children[t].classes=["tml-"+(e.leqno?"left":"right")]}}if(a.children.length>1&&e.envClasses.includes("cases")&&(a.children[1].style.paddingLeft="1em"),e.envClasses.includes("cases")||e.envClasses.includes("subarray"))for(const e of a.children)e.classes.push("tml-left")}}let s=new L("mtable",r);e.envClasses.length>0&&(e.envClasses.includes("jot")?s.classes.push("tml-jot"):e.envClasses.includes("small")&&s.classes.push("tml-small")),"display"===e.scriptLevel&&s.setAttribute("displaystyle","true"),(e.autoTag||e.envClasses.includes("multline"))&&(s.style.width="100%");let l="";if(e.cols&&e.cols.length>0){const t=e.cols;let r=!1,n=0,a=t.length;for(;"separator"===t[n].type;)n+=1;for(;"separator"===t[a-1].type;)a-=1;if("separator"===t[0].type){const e="separator"===t[1].type?"0.15em double":"|"===t[0].separator?"0.06em solid ":"0.06em dashed ";for(const t of s.children)t.children[0].style.borderLeft=e}let o=e.autoTag?0:-1;for(let e=n;e<a;e++)if("align"===t[e].type){const n=xt[t[e].align];l+=n,o+=1;for(const e of s.children)"center"!==n.trim()&&o<e.children.length&&(e.children[o].classes=["tml-"+n.trim()]);r=!0}else if("separator"===t[e].type){if(r){const r="separator"===t[e+1].type?"0.15em double":"|"===t[e].separator?"0.06em solid":"0.06em dashed";for(const e of s.children)o<e.children.length&&(e.children[o].style.borderRight=r)}r=!1}if("separator"===t[t.length-1].type){const e="separator"===t[t.length-2].type?"0.15em double":"|"===t[t.length-1].separator?"0.06em solid":"0.06em dashed";for(const t of s.children)t.children[t.children.length-1].style.borderRight=e,t.children[t.children.length-1].style.paddingRight="0.4em"}}return e.autoTag&&(l="left "+(l.length>0?l:"center ")+"right "),l&&s.setAttribute("columnalign",l.trim()),e.envClasses.includes("small")&&(s=new L("mstyle",[s]),s.setAttribute("scriptlevel","1")),s},yt=function(e,r){-1===e.envName.indexOf("ed")&&ut(e);const n="split"===e.envName,a=[],o=ft(e.parser,{cols:a,emptySingleRow:!0,autoTag:n?void 0:ht(e.envName),envClasses:["abut","jot"],maxNumCols:"split"===e.envName?2:void 0,leqno:e.parser.settings.leqno},"display");let i,s=0;const l=e.envName.indexOf("at")>-1;if(r[0]&&l){let e="";for(let t=0;t<r[0].body.length;t++)e+=Ie(r[0].body[t],"textord").text;if(isNaN(e))throw new t("The alignat enviroment requires a numeric first argument.");i=Number(e),s=2*i}o.body.forEach((function(e){if(l){const r=e.length/2;if(i<r)throw new t(`Too many math in a row: expected ${i}, but got ${r}`,e[0])}else s<e.length&&(s=e.length)}));for(let e=0;e<s;++e){let t="r";e%2==1&&(t="l"),a[e]={type:"align",align:t}}return"split"===e.envName||(l?o.envClasses.push("alignat"):o.envClasses[0]="align"),o};$e({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,r){const n=(Re(r[0])?[r[0]]:Ie(r[0],"ordgroup").body).map((function(e){const r=Pe(e).text;if(-1!=="lcr".indexOf(r))return{type:"align",align:r};if("|"===r)return{type:"separator",separator:"|"};if(":"===r)return{type:"separator",separator:":"};throw new t("Unknown column alignment: "+r,e)})),[a,o]=pt(e.parser.gullet.macros),i={cols:n,envClasses:["array"],maxNumCols:n.length,arraystretch:a,arraycolsep:o};return ft(e.parser,i,gt(e.envName))},mathmlBuilder:wt}),$e({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const r={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let n="c";const a={envClasses:[],cols:[]};if("*"===e.envName.charAt(e.envName.length-1)){const r=e.parser;if(r.consumeSpaces(),"["===r.fetch().text){if(r.consume(),r.consumeSpaces(),n=r.fetch().text,-1==="lcr".indexOf(n))throw new t("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),a.cols=[]}}const o=ft(e.parser,a,"text");o.cols=new Array(o.body[0].length).fill({type:"align",align:n});const[i,s]=pt(e.parser.gullet.macros);return o.arraystretch=i,!s||6===s&&"pt"===s||(o.arraycolsep=s),r?{type:"leftright",mode:e.mode,body:[o],left:r[0],right:r[1],rightColor:void 0}:o},mathmlBuilder:wt}),$e({type:"array",names:["bordermatrix"],props:{numArgs:0},handler(e){const t=ft(e.parser,{cols:[],envClasses:["bordermatrix"]},"text");return t.cols=new Array(t.body[0].length).fill({type:"align",align:"c"}),t.envClasses=[],t.arraystretch=1,"matrix"===e.envName?t:((e,t)=>{const r=e.body;r[0].shift();const n=new Array(r.length-1).fill().map((()=>[]));for(let e=1;e<r.length;e++){n[e-1].push(r[e].shift());const t=[];for(let n=0;n<r[e].length;n++)t.push(structuredClone(r[e][n]));n[e-1].push(He(t,"vphantom"))}const a=new Array(r.length).fill().map((()=>[]));for(let e=0;e<r[0].length;e++)a[0].push(structuredClone(r[0][e]));for(let e=1;e<r.length;e++)for(let t=0;t<r[0].length;t++)a[e].push(He(structuredClone(r[e][t]).body,"hphantom"));for(let e=0;e<r[0].length;e++)r[0][e]=He(structuredClone(r[0][e]).body,"hphantom");const o={type:"array",mode:"math",body:n,cols:[{type:"align",align:"c"}],rowGaps:new Array(n.length-1).fill(null),hLinesBeforeRow:new Array(n.length+1).fill().map((()=>[])),envClasses:[],scriptLevel:"text",arraystretch:1,labels:new Array(n.length).fill(""),arraycolsep:{number:.04,unit:"em"}},i={type:"styling",mode:"math",scriptLevel:"text",body:[{type:"array",mode:"math",body:a,cols:new Array(a.length).fill({type:"align",align:"c"}),rowGaps:new Array(a.length-1).fill(null),hLinesBeforeRow:new Array(a.length+1).fill().map((()=>[])),envClasses:[],scriptLevel:"text",arraystretch:1,labels:new Array(a.length).fill(""),arraycolsep:null}]},s={type:"leftright",mode:"math",body:[e],left:t?t[0]:"(",right:t?t[1]:")",rightColor:void 0};return Ge([o,{type:"supsub",mode:"math",base:{type:"op",mode:"math",limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!0,symbol:!1,stack:!0,suppressBaseShift:!0,body:[s]},sup:i,sub:null}])})(t,e.delimiters)},mathmlBuilder:wt}),$e({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){const t=ft(e.parser,{type:"small"},"script");return t.envClasses=["small"],t},mathmlBuilder:wt}),$e({type:"array",names:["subarray"],props:{numArgs:1},handler(e,r){const n=(Re(r[0])?[r[0]]:Ie(r[0],"ordgroup").body).map((function(e){const r=Pe(e).text;if(-1!=="lc".indexOf(r))return{type:"align",align:r};throw new t("Unknown column alignment: "+r,e)}));if(n.length>1)throw new t("{subarray} can contain only one column");let a={cols:n,envClasses:["small"]};if(a=ft(e.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new t("{subarray} can contain only one column");return a},mathmlBuilder:wt}),$e({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){const t=ft(e.parser,{cols:[],envClasses:["cases"]},gt(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}},mathmlBuilder:wt}),$e({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:yt,mathmlBuilder:wt}),$e({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:yt,mathmlBuilder:wt}),$e({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){"gathered"!==e.envName&&ut(e);const t={cols:[],envClasses:["abut","jot"],autoTag:ht(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ft(e.parser,t,"display")},mathmlBuilder:wt}),$e({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ut(e);const t={autoTag:ht(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,envClasses:["align"],leqno:e.parser.settings.leqno};return ft(e.parser,t,"display")},mathmlBuilder:wt}),$e({type:"array",names:["multline","multline*"],props:{numArgs:0},handler(e){ut(e);const t={autoTag:"multline"===e.envName,maxNumCols:1,envClasses:["jot","multline"],leqno:e.parser.settings.leqno};return ft(e.parser,t,"display")},mathmlBuilder:wt}),$e({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(ut(e),function(e){const r=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){r.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();const n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===r[r.length-1].length&&r.pop();break}throw new t("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}let n=[];const a=[n];for(let s=0;s<r.length;s++){const l=r[s];let c={type:"styling",body:[],mode:"math",scriptLevel:"display"};for(let r=0;r<l.length;r++)if(ze(l[r])){n.push(c),r+=1;const a=Pe(l[r]).text,s=new Array(2);if(s[0]={type:"ordgroup",mode:"math",body:[]},s[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(a)>-1);else{if(!("<>AV".indexOf(a)>-1))throw new t('Expected one of "<>AV=|." after @.');for(let e=0;e<2;e++){let n=!0;for(let c=r+1;c<l.length;c++){if(i=a,("mathord"===(o=l[c]).type||"atom"===o.type)&&o.text===i){n=!1,r=c;break}if(ze(l[c]))throw new t("Missing a "+a+" character to complete a CD arrow.",l[c]);s[e].body.push(l[c])}if(n)throw new t("Missing a "+a+" character to complete a CD arrow.",l[r])}}const u=Ue(a,s,e);n.push(u),c={type:"styling",body:[],mode:"math",scriptLevel:"display"}}else c.body.push(l[r]);s%2==0?n.push(c):n.shift(),n=[],a.push(n)}var o,i;return a.pop(),e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:a,tags:null,labels:new Array(a.length+1).fill(""),envClasses:["jot","cd"],cols:[],hLinesBeforeRow:new Array(a.length+1).fill([])}}(e.parser)),mathmlBuilder:wt}),f({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,r){throw new t(`${e.funcName} valid only within array environment`)}});const vt=Fe;f({type:"bordermatrix",names:["\\bordermatrix","\\matrix"],props:{numArgs:0,numOptionalArgs:1},handler:({parser:e,funcName:t},r,n)=>{let a=["(",")"];if("\\bordermatrix"===t&&n[0]&&n[0].body){const e=n[0].body;2===e.length&&"atom"===e[0].type&&"atom"===e[1].type&&"open"===e[0].family&&"close"===e[1].family&&(a=[e[0].text,e[1].text])}e.consumeSpaces(),e.consume();const o=vt.bordermatrix,i={mode:e.mode,envName:t.slice(1),delimiters:a,parser:e},s=o.handler(i);return e.expect("}",!0),s}}),f({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler({parser:e,token:r},n){const a=Ie(n[0],"ordgroup").body;let o="";for(let e=0;e<a.length;e++)o+=Ie(a[e],"textord").text;const i=parseInt(o);if(isNaN(i))throw new t(`\\@char has non-numeric argument ${o}`,r);return{type:"textord",mode:e.mode,text:String.fromCodePoint(i)}}});const At=/^(#[a-f0-9]{3}|#?[a-f0-9]{6})$/i,Et=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i,_t=/^ *\d{1,3} *(?:, *\d{1,3} *){2}$/,Ct=/^ *[10](?:\.\d*)? *(?:, *[10](?:\.\d*)? *){2}$/,qt=/^[a-f0-9]{6}$/i,Tt=e=>{let t=e.toString(16);return 1===t.length&&(t="0"+t),t},kt=JSON.parse('{\n "Apricot": "#ffb484",\n "Aquamarine": "#08b4bc",\n "Bittersweet": "#c84c14",\n "blue": "#0000FF",\n "Blue": "#303494",\n "BlueGreen": "#08b4bc",\n "BlueViolet": "#503c94",\n "BrickRed": "#b8341c",\n "brown": "#BF8040",\n "Brown": "#802404",\n "BurntOrange": "#f8941c",\n "CadetBlue": "#78749c",\n "CarnationPink": "#f884b4",\n "Cerulean": "#08a4e4",\n "CornflowerBlue": "#40ace4",\n "cyan": "#00FFFF",\n "Cyan": "#08acec",\n "Dandelion": "#ffbc44",\n "darkgray": "#404040",\n "DarkOrchid": "#a8548c",\n "Emerald": "#08ac9c",\n "ForestGreen": "#089c54",\n "Fuchsia": "#90348c",\n "Goldenrod": "#ffdc44",\n "gray": "#808080",\n "Gray": "#98949c",\n "green": "#00FF00",\n "Green": "#08a44c",\n "GreenYellow": "#e0e474",\n "JungleGreen": "#08ac9c",\n "Lavender": "#f89cc4",\n "lightgray": "#c0c0c0",\n "lime": "#BFFF00",\n "LimeGreen": "#90c43c",\n "magenta": "#FF00FF",\n "Magenta": "#f0048c",\n "Mahogany": "#b0341c",\n "Maroon": "#b03434",\n "Melon": "#f89c7c",\n "MidnightBlue": "#086494",\n "Mulberry": "#b03c94",\n "NavyBlue": "#086cbc",\n "olive": "#7F7F00",\n "OliveGreen": "#407c34",\n "orange": "#FF8000",\n "Orange": "#f8843c",\n "OrangeRed": "#f0145c",\n "Orchid": "#b074ac",\n "Peach": "#f8945c",\n "Periwinkle": "#8074bc",\n "PineGreen": "#088c74",\n "pink": "#ff7f7f",\n "Plum": "#98248c",\n "ProcessBlue": "#08b4ec",\n "purple": "#BF0040",\n "Purple": "#a0449c",\n "RawSienna": "#983c04",\n "red": "#ff0000",\n "Red": "#f01c24",\n "RedOrange": "#f86434",\n "RedViolet": "#a0246c",\n "Rhodamine": "#f0549c",\n "Royallue": "#0874bc",\n "RoyalPurple": "#683c9c",\n "RubineRed": "#f0047c",\n "Salmon": "#f8948c",\n "SeaGreen": "#30bc9c",\n "Sepia": "#701404",\n "SkyBlue": "#48c4dc",\n "SpringGreen": "#c8dc64",\n "Tan": "#e09c74",\n "teal": "#007F7F",\n "TealBlue": "#08acb4",\n "Thistle": "#d884b4",\n "Turquoise": "#08b4cc",\n "violet": "#800080",\n "Violet": "#60449c",\n "VioletRed": "#f054a4",\n "WildStrawberry": "#f0246c",\n "yellow": "#FFFF00",\n "Yellow": "#fff404",\n "YellowGreen": "#98cc6c",\n "YellowOrange": "#ffa41c"\n}'),St=(e,r)=>{let n="";if("HTML"===e){if(!At.test(r))throw new t("Invalid HTML input.");n=r}else if("RGB"===e){if(!_t.test(r))throw new t("Invalid RGB input.");r.split(",").map((e=>{n+=Tt(Number(e.trim()))}))}else{if(!Ct.test(r))throw new t("Invalid rbg input.");r.split(",").map((e=>{const r=Number(e.trim());if(r>1)throw new t("Color rgb input must be < 1.");n+=Tt(Number((255*r).toFixed(0)))}))}return"#"!==n.charAt(0)&&(n="#"+n),n},Nt=(e,r,n)=>{const a=`\\\\color@${e}`;if(!Et.exec(e))throw new t("Invalid color: '"+e+"'",n);return qt.test(e)?"#"+e:("#"===e.charAt(0)||(r.has(a)?e=r.get(a).tokens[0].text:kt[e]&&(e=kt[e])),e)},Lt=(e,t)=>{let r=me(e.body,t.withColor(e.color));return r=r.map((t=>(t.style.color=e.color,t))),M(r)};f({type:"color",names:["\\textcolor"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw","original"]},handler({parser:e,token:t},r,n){const a=n[0]&&Ie(n[0],"raw").string;let o="";if(a){const e=Ie(r[0],"raw").string;o=St(a,e)}else o=Nt(Ie(r[0],"raw").string,e.gullet.macros,t);const i=r[1];return{type:"color",mode:e.mode,color:o,isTextColor:!0,body:b(i)}},mathmlBuilder:Lt}),f({type:"color",names:["\\color"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw"]},handler({parser:e,breakOnTokenText:t,token:r},n,a){const o=a[0]&&Ie(a[0],"raw").string;let i="";if(o){const e=Ie(n[0],"raw").string;i=St(o,e)}else i=Nt(Ie(n[0],"raw").string,e.gullet.macros,r);const s=e.parseExpression(!0,t,!0);return{type:"color",mode:e.mode,color:i,isTextColor:!1,body:s}},mathmlBuilder:Lt}),f({type:"color",names:["\\definecolor"],props:{numArgs:3,allowedInText:!0,argTypes:["raw","raw","raw"]},handler({parser:e,funcName:r,token:n},a){const o=Ie(a[0],"raw").string;if(!/^[A-Za-z]+$/.test(o))throw new t("Color name must be latin letters.",n);const i=Ie(a[1],"raw").string;if(!["HTML","RGB","rgb"].includes(i))throw new t("Color model must be HTML, RGB, or rgb.",n);const s=Ie(a[2],"raw").string,l=St(i,s);return e.gullet.macros.set(`\\\\color@${o}`,{tokens:[{text:l}],numArgs:0}),{type:"internal",mode:e.mode}}}),f({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler({parser:e},t,r){const n="["===e.gullet.future().text?e.parseSizeGroup(!0):null,a=!e.settings.displayMode;return{type:"cr",mode:e.mode,newLine:a,size:n&&Ie(n,"size").value}},mathmlBuilder(e,t){const r=new L("mo");if(e.newLine&&(r.setAttribute("linebreak","newline"),e.size)){const n=Ne(e.size,t);r.setAttribute("height",n.number+n.unit)}return r}});const Ot={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Mt=e=>{const r=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new t("Expected a control sequence",e);return r},Dt=(e,t,r,n)=>{let a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};f({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler({parser:e,funcName:r}){e.consumeSpaces();const n=e.fetch();if(Ot[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=Ot[n.text]),Ie(e.parseFunction(),"internal");throw new t("Invalid token after macro prefix",n)}}),f({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({parser:e,funcName:r}){let n=e.gullet.popToken();const a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new t("Expected a control sequence",n);let o,i=0;const s=[[]];for(;"{"!==e.gullet.future().text;)if(n=e.gullet.popToken(),"#"===n.text){if("{"===e.gullet.future().text){o=e.gullet.future(),s[i].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new t(`Invalid argument number "${n.text}"`);if(parseInt(n.text)!==i+1)throw new t(`Argument number "${n.text}" out of order`);i++,s.push([])}else{if("EOF"===n.text)throw new t("Expected a macro definition");s[i].push(n.text)}let{tokens:l}=e.gullet.consumeArg();if(o&&l.unshift(o),"\\edef"===r||"\\xdef"===r){if(l=e.gullet.expandTokens(l),l.length>e.gullet.settings.maxExpand)throw new t("Too many expansions in an "+r);l.reverse()}return e.gullet.macros.set(a,{tokens:l,numArgs:i,delimiters:s},r===Ot[r]),{type:"internal",mode:e.mode}}}),f({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({parser:e,funcName:t}){const r=Mt(e.gullet.popToken());e.gullet.consumeSpaces();const n=(e=>{let t=e.gullet.popToken();return"="===t.text&&(t=e.gullet.popToken()," "===t.text&&(t=e.gullet.popToken())),t})(e);return Dt(e,r,n,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),f({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({parser:e,funcName:t}){const r=Mt(e.gullet.popToken()),n=e.gullet.popToken(),a=e.gullet.popToken();return Dt(e,r,a,"\\\\globalfuture"===t),e.gullet.pushToken(a),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}}),f({type:"internal",names:["\\newcommand","\\renewcommand","\\providecommand"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({parser:e,funcName:r}){let n="";const a=e.gullet.popToken();"{"===a.text?(n=Mt(e.gullet.popToken()),e.gullet.popToken()):n=Mt(a);const o=e.gullet.isDefined(n);if(o&&"\\newcommand"===r)throw new t(`\\newcommand{${n}} attempting to redefine ${n}; use \\renewcommand`);if(!o&&"\\renewcommand"===r)throw new t(`\\renewcommand{${n}} when command ${n} does not yet exist; use \\newcommand`);let i=0;if("["===e.gullet.future().text){let r=e.gullet.popToken();if(r=e.gullet.popToken(),!/^[0-9]$/.test(r.text))throw new t(`Invalid number of arguments: "${r.text}"`);if(i=parseInt(r.text),r=e.gullet.popToken(),"]"!==r.text)throw new t(`Invalid argument "${r.text}"`)}const{tokens:s}=e.gullet.consumeArg();return"\\providecommand"===r&&e.gullet.macros.has(n)||e.gullet.macros.set(n,{tokens:s,numArgs:i}),{type:"internal",mode:e.mode}}});const Bt={"\\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}},Ft=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","⦇","\\llparenthesis","⦈","\\rrparenthesis","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lAngle","⟪","\\rAngle","⟫","\\llangle","⦉","\\rrangle","⦊","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","\\llbracket","\\rrbracket","⟦","⟦","\\lBrace","\\rBrace","⦃","⦄","/","\\backslash","|","\\vert","\\|","\\Vert","‖","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."],$t=["}","\\left","\\middle","\\right"],It=e=>e.length>0&&(Ft.includes(e)||Bt[e]||$t.includes(e)),Pt=[0,1.2,1.8,2.4,3];function Rt(e,r){const n=Re(e);if(n&&Ft.includes(n.text))return["<","\\lt"].includes(n.text)&&(n.text="⟨"),[">","\\gt"].includes(n.text)&&(n.text="⟩"),n;throw new t(n?`Invalid delimiter '${n.text}' after '${r.funcName}'`:`Invalid delimiter type '${e.type}'`,e)}const jt=["/","\\","\\backslash","\\vert","|"];f({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)=>{const r=Rt(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Bt[e.funcName].size,mclass:Bt[e.funcName].mclass,delim:r.text}},mathmlBuilder:e=>{const t=[];"."===e.delim&&(e.delim=""),t.push(ie(e.delim,e.mode));const r=new L("mo",t);return"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),(jt.includes(e.delim)||e.delim.indexOf("arrow")>-1)&&r.setAttribute("stretchy","true"),r.setAttribute("symmetric","true"),r.setAttribute("minsize",Pt[e.size]+"em"),r.setAttribute("maxsize",Pt[e.size]+"em"),r}}),f({type:"leftright-right",names:["\\right"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>({type:"leftright-right",mode:e.parser.mode,delim:Rt(t[0],e).text})}),f({type:"leftright",names:["\\left"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,r)=>{const n=Rt(r[0],e),a=e.parser;++a.leftrightDepth;let o=a.parseExpression(!1,null,!0),i=a.fetch();for(;"\\middle"===i.text;){a.consume();const e=a.fetch().text;if(!z.math[e])throw new t(`Invalid delimiter '${e}' after '\\middle'`);Rt({type:"atom",mode:"math",text:e},{funcName:"\\middle"}),o.push({type:"middle",mode:"math",delim:e}),a.consume(),o=o.concat(a.parseExpression(!1,null,!0)),i=a.fetch()}--a.leftrightDepth,a.expect("\\right",!1);const s=Ie(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:o,left:n.text,right:s.delim}},mathmlBuilder:(e,t)=>{!function(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}(e);const r=me(e.body,t);"."===e.left&&(e.left="");const n=new L("mo",[ie(e.left,e.mode)]);n.setAttribute("fence","true"),n.setAttribute("form","prefix"),("/"===e.left||"\\"===e.left||e.left.indexOf("arrow")>-1)&&n.setAttribute("stretchy","true"),r.unshift(n),"."===e.right&&(e.right="");const a=new L("mo",[ie(e.right,e.mode)]);if(a.setAttribute("fence","true"),a.setAttribute("form","postfix"),("∖"===e.right||e.right.indexOf("arrow")>-1)&&a.setAttribute("stretchy","true"),e.body.length>0){const t=e.body[e.body.length-1];"color"!==t.type||t.isTextColor||a.setAttribute("mathcolor",t.color)}return r.push(a),ce(r)}}),f({type:"middle",names:["\\middle"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,r)=>{const n=Rt(r[0],e);if(!e.parser.leftrightDepth)throw new t("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},mathmlBuilder:(e,t)=>{const r=ie(e.delim,e.mode),n=new L("mo",[r]);return n.setAttribute("fence","true"),e.delim.indexOf("arrow")>-1&&n.setAttribute("stretchy","true"),n.setAttribute("form","prefix"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});const zt=e=>{const t=new L("mspace");return t.setAttribute("width","3pt"),t},Ut=(e,t)=>{let r;switch(r=e.label.indexOf("colorbox")>-1||"\\boxed"===e.label?new L("mrow",[zt(),fe(e.body,t),zt()]):new L("menclose",[fe(e.body,t)]),e.label){case"\\overline":r.setAttribute("notation","top"),r.classes.push("tml-overline");break;case"\\underline":r.setAttribute("notation","bottom"),r.classes.push("tml-underline");break;case"\\cancel":r.setAttribute("notation","updiagonalstrike"),r.children.push(new L("mrow",[],["tml-cancel","upstrike"]));break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike"),r.children.push(new L("mrow",[],["tml-cancel","downstrike"]));break;case"\\sout":r.setAttribute("notation","horizontalstrike"),r.children.push(new L("mrow",[],["tml-cancel","sout"]));break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike"),r.classes.push("tml-xcancel");break;case"\\longdiv":r.setAttribute("notation","longdiv"),r.classes.push("longdiv-top"),r.children.push(new L("mrow",[],["longdiv-arc"]));break;case"\\phase":r.setAttribute("notation","phasorangle"),r.classes.push("phasor-bottom"),r.children.push(new L("mrow",[],["phasor-angle"]));break;case"\\textcircled":r.setAttribute("notation","circle"),r.classes.push("circle-pad"),r.children.push(new L("mrow",[],["textcircle"]));break;case"\\angl":r.setAttribute("notation","actuarial"),r.classes.push("actuarial");break;case"\\boxed":r.setAttribute("notation","box"),r.classes.push("tml-box"),r.setAttribute("scriptlevel","0"),r.setAttribute("displaystyle","true");break;case"\\fbox":r.setAttribute("notation","box"),r.classes.push("tml-fbox");break;case"\\fcolorbox":case"\\colorbox":{const t={padding:"3pt 0 3pt 0"};"\\fcolorbox"===e.label&&(t.border="0.0667em solid "+String(e.borderColor)),r.style=t;break}}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};f({type:"enclose",names:["\\colorbox"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw","text"]},handler({parser:e,funcName:t},r,n){const a=n[0]&&Ie(n[0],"raw").string;let o="";if(a){const e=Ie(r[0],"raw").string;o=St(a,e)}else o=Nt(Ie(r[0],"raw").string,e.gullet.macros);const i=r[1];return{type:"enclose",mode:e.mode,label:t,backgroundColor:o,body:i}},mathmlBuilder:Ut}),f({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw","raw","text"]},handler({parser:e,funcName:t},r,n){const a=n[0]&&Ie(n[0],"raw").string;let o,i="";if(a){const e=Ie(r[0],"raw").string,t=Ie(r[0],"raw").string;i=St(a,e),o=St(a,t)}else i=Nt(Ie(r[0],"raw").string,e.gullet.macros),o=Nt(Ie(r[1],"raw").string,e.gullet.macros);const s=r[2];return{type:"enclose",mode:e.mode,label:t,backgroundColor:o,borderColor:i,body:s}},mathmlBuilder:Ut}),f({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:({parser:e},t)=>({type:"enclose",mode:e.mode,label:"\\fbox",body:t[0]})}),f({type:"enclose",names:["\\angl","\\cancel","\\bcancel","\\xcancel","\\sout","\\overline","\\boxed","\\longdiv","\\phase"],props:{numArgs:1},handler({parser:e,funcName:t},r){const n=r[0];return{type:"enclose",mode:e.mode,label:t,body:n}},mathmlBuilder:Ut}),f({type:"enclose",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler({parser:e,funcName:t},r){const n=r[0];return{type:"enclose",mode:e.mode,label:t,body:n}},mathmlBuilder:Ut}),f({type:"enclose",names:["\\textcircled"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler({parser:e,funcName:t},r){const n=r[0];return{type:"enclose",mode:e.mode,label:t,body:n}},mathmlBuilder:Ut}),f({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler({parser:e,funcName:r},n){const a=n[0];if("ordgroup"!==a.type)throw new t("Invalid environment name",a);let o="";for(let e=0;e<a.body.length;++e)o+=Ie(a.body[e],"textord").text;if("\\begin"===r){if(!Object.prototype.hasOwnProperty.call(vt,o))throw new t("No such environment: "+o,a);const r=vt[o],{args:n,optArgs:i}=e.parseArguments("\\begin{"+o+"}",r),s={mode:e.mode,envName:o,parser:e},l=r.handler(s,n,i);e.expect("\\end",!1);const c=e.nextToken,u=Ie(e.parseFunction(),"environment");if(u.name!==o)throw new t(`Mismatch: \\begin{${o}} matched by \\end{${u.name}}`,c);return l}return{type:"environment",mode:e.mode,name:o,nameGroup:a}}}),f({type:"envTag",names:["\\env@tag"],props:{numArgs:1,argTypes:["math"]},handler:({parser:e},t)=>({type:"envTag",mode:e.mode,body:t[0]}),mathmlBuilder:(e,t)=>new L("mrow")}),f({type:"noTag",names:["\\env@notag"],props:{numArgs:0},handler:({parser:e})=>({type:"noTag",mode:e.mode}),mathmlBuilder:(e,t)=>new L("mrow")});const Gt=(e,t)=>{const r=e.font,n=t.withFont(r),a=fe(e.body,n);if(0===a.children.length)return a;if("boldsymbol"===r&&["mo","mpadded","mrow"].includes(a.type))return a.style.fontWeight="bold",a;if(((e,t)=>{if("mathrm"!==t||"ordgroup"!==e.body.type||1===e.body.body.length)return!1;if("mathord"!==e.body.body[0].type)return!1;for(let t=1;t<e.body.body.length;t++){const r=e.body.body[t].type;if("mathord"!==r&&("textord"!==r||isNaN(e.body.body[t].text)))return!1}return!0})(e,r)){const e=a.children[0].children[0];delete e.attributes.mathvariant;for(let t=1;t<a.children.length;t++)e.children[0].text+="mn"===a.children[t].type?a.children[t].children[0].text:a.children[t].children[0].children[0].text;const t=new L("mtext",new O(""));return new L("mrow",[t,e])}let o="mo"===a.children[0].type;for(let e=1;e<a.children.length;e++)"mo"===a.children[e].type&&"boldsymbol"===r&&(a.children[e].style.fontWeight="bold"),"mi"!==a.children[e].type&&(o=!1),"normal"!==(a.children[e].attributes&&a.children[e].attributes.mathvariant||"")&&(o=!1);if(!o)return a;const i=a.children[0];for(let e=1;e<a.children.length;e++)i.children.push(a.children[e].children[0]);if(i.attributes.mathvariant&&"normal"===i.attributes.mathvariant){const e=new L("mtext",new O(""));return new L("mrow",[e,i])}return i},Ht={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};f({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\up@greek","\\boldsymbol","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathsfit","\\mathtt","\\Bbb","\\bm","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:({parser:e,funcName:t},r)=>{const n=x(r[0]);let a=t;return a in Ht&&(a=Ht[a]),{type:"font",mode:e.mode,font:a.slice(1),body:n}},mathmlBuilder:Gt}),f({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:({parser:e,funcName:t,breakOnTokenText:r},n)=>{const{mode:a}=e,o=e.parseExpression(!0,r,!0);return{type:"font",mode:a,font:`math${t.slice(1)}`,body:{type:"ordgroup",mode:e.mode,body:o}}},mathmlBuilder:Gt});const Vt=["display","text","script","scriptscript"],Wt={auto:-1,display:0,text:0,script:1,scriptscript:2},Xt=(e,t)=>{const r="auto"===e.scriptLevel?t.incrementLevel():"display"===e.scriptLevel?t.withLevel(1):"text"===e.scriptLevel?t.withLevel(2):t.withLevel(3),n=fe(e.numer,r),a=fe(e.denom,r);3===t.level&&(n.style.mathDepth="2",n.setAttribute("scriptlevel","2"),a.style.mathDepth="2",a.setAttribute("scriptlevel","2"));let o=new L("mfrac",[n,a]);if(e.hasBarLine){if(e.barSize){const r=Ne(e.barSize,t);o.setAttribute("linethickness",r.number+r.unit)}}else o.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){const t=[];if(null!=e.leftDelim){const r=new L("mo",[new O(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}if(t.push(o),null!=e.rightDelim){const r=new L("mo",[new O(e.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}o=ce(t)}return"auto"!==e.scriptLevel&&(o=new L("mstyle",[o]),o.setAttribute("displaystyle",String("display"===e.scriptLevel)),o.setAttribute("scriptlevel",Wt[e.scriptLevel])),o};f({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:({parser:e,funcName:t},r)=>{const n=r[0],a=r[1];let o=!1,i=null,s=null,l="auto";switch(t){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i="(",s=")";break;case"\\\\bracefrac":i="\\{",s="\\}";break;case"\\\\brackfrac":i="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(t){case"\\dfrac":case"\\dbinom":l="display";break;case"\\tfrac":case"\\tbinom":l="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:n,denom:a,hasBarLine:o,leftDelim:i,rightDelim:s,scriptLevel:l,barSize:null}},mathmlBuilder:Xt}),f({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:({parser:e,funcName:t},r)=>{const n=r[0],a=r[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:n,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,scriptLevel:"display",barSize:null}}}),f({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler({parser:e,funcName:t,token:r}){let n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:r}}});const Zt=function(e){let t=null;return e.length>0&&(t=e,t="."===t?null:t),t};f({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler({parser:e},t){const r=t[4],n=t[5],a=x(t[0]),o="atom"===a.type&&"open"===a.family?Zt(a.text):null,i=x(t[1]),s="atom"===i.type&&"close"===i.family?Zt(i.text):null,l=Ie(t[2],"size");let c,u=null;l.isBlank?c=!0:(u=l.value,c=u.number>0);let d="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){const e=Ie(p.body[0],"textord");d=Vt[Number(e.text)]}}else p=Ie(p,"textord"),d=Vt[Number(p.text)];return{type:"genfrac",mode:e.mode,numer:r,denom:n,continued:!1,hasBarLine:c,barSize:u,leftDelim:o,rightDelim:s,scriptLevel:d}},mathmlBuilder:Xt}),f({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:({parser:e,funcName:t,token:r},n)=>({type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",barSize:Ie(n[0],"size").value,token:r})}),f({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:({parser:e,funcName:t},r)=>{const n=r[0],a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ie(r[1],"infix").barSize),o=r[2],i=a.number>0;return{type:"genfrac",mode:e.mode,numer:n,denom:o,continued:!1,hasBarLine:i,barSize:a,leftDelim:null,rightDelim:null,scriptLevel:"auto"}},mathmlBuilder:Xt}),f({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["hbox"],allowedInArgument:!0,allowedInText:!1},handler:({parser:e},t)=>({type:"hbox",mode:e.mode,body:b(t[0])}),mathmlBuilder(e,t){const r=t.withLevel(1),n=he(e.body,r);return le(n)}}),f({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:({parser:e,funcName:t},r)=>({type:"horizBrace",mode:e.mode,label:t,isOver:/^\\over/.test(t),base:r[0]}),mathmlBuilder:(e,t)=>{const r=I(e.label);return r.style["math-depth"]=0,new L(e.isOver?"mover":"munder",[fe(e.base,t),r])}}),f({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:({parser:e,token:r},n)=>{const a=n[1],o=Ie(n[0],"url").url;if(!e.settings.isTrusted({command:"\\href",url:o}))throw new t('Function "\\href" is not trusted',r);return{type:"href",mode:e.mode,href:o,body:b(a)}},mathmlBuilder:(e,t)=>{const r=new k("math",[he(e.body,t)]);return new q(e.href,[],[r])}}),f({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:({parser:e,token:r},n)=>{const a=Ie(n[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:a}))throw new t('Function "\\url" is not trusted',r);const o=[];for(let e=0;e<a.length;e++){let t=a[e];"~"===t&&(t="\\textasciitilde"),o.push({type:"textord",mode:"text",text:t})}const i={type:"text",mode:e.mode,font:"\\texttt",body:o};return{type:"href",mode:e.mode,href:a,body:b(i)}}}),f({type:"html",names:["\\class","\\id","\\style","\\data"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:({parser:e,funcName:r,token:n},a)=>{const o=Ie(a[0],"raw").string,i=a[1];if(e.settings.strict)throw new t(`Function "${r}" is disabled in strict mode`,n);let s;const l={};switch(r){case"\\class":l.class=o,s={command:"\\class",class:o};break;case"\\id":l.id=o,s={command:"\\id",id:o};break;case"\\style":l.style=o,s={command:"\\style",style:o};break;case"\\data":{const e=o.split(",");for(let r=0;r<e.length;r++){const n=e[r].split("=");if(2!==n.length)throw new t("Error parsing key-value for \\data");l["data-"+n[0].trim()]=n[1].trim()}s={command:"\\data",attributes:l};break}default:throw new Error("Unrecognized html command")}if(!e.settings.isTrusted(s))throw new t(`Function "${r}" is not trusted`,n);return{type:"html",mode:e.mode,attributes:l,body:b(i)}},mathmlBuilder:(e,t)=>{const r=he(e.body,t),n=[];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/)),r.classes=n;for(const t in e.attributes)"class"!==t&&Object.prototype.hasOwnProperty.call(e.attributes,t)&&r.setAttribute(t,e.attributes[t]);return r}});const Yt=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};{const r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new t("Invalid size: '"+e+"' in \\includegraphics");const n={number:+(r[1]+r[2]),unit:r[3]};if(!ke(n))throw new t("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n}};f({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:({parser:e,token:r},n,a)=>{let o={number:0,unit:"em"},i={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(a[0]){const e=Ie(a[0],"raw").string.split(",");for(let r=0;r<e.length;r++){const n=e[r].split("=");if(2===n.length){const e=n[1].trim();switch(n[0].trim()){case"alt":l=e;break;case"width":o=Yt(e);break;case"height":i=Yt(e);break;case"totalheight":s=Yt(e);break;default:throw new t("Invalid key: '"+n[0]+"' in \\includegraphics.")}}}}const c=Ie(n[0],"url").url;if(""===l&&(l=c,l=l.replace(/^.*[\\/]/,""),l=l.substring(0,l.lastIndexOf("."))),!e.settings.isTrusted({command:"\\includegraphics",url:c}))throw new t('Function "\\includegraphics" is not trusted',r);return{type:"includegraphics",mode:e.mode,alt:l,width:o,height:i,totalheight:s,src:c}},mathmlBuilder:(e,t)=>{const r=Ne(e.height,t),n={number:0,unit:"em"};e.totalheight.number>0&&e.totalheight.unit===r.unit&&e.totalheight.number>r.number&&(n.number=e.totalheight.number-r.number,n.unit=r.unit);let a=0;e.width.number>0&&(a=Ne(e.width,t));const o={height:r.number+n.number+"em"};a.number>0&&(o.width=a.number+a.unit),n.number>0&&(o.verticalAlign=-n.number+n.unit);const i=new T(e.src,e.alt,o);return i.height=r,i.depth=n,new L("mtext",[i])}}),f({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler({parser:e,funcName:r,token:n},a){const o=Ie(a[0],"size");if(e.settings.strict){const a="m"===r[1],i="mu"===o.value.unit;if(a){if(!i)throw new t(`LaTeX's ${r} supports only mu units, not ${o.value.unit} units`,n);if("math"!==e.mode)throw new t(`LaTeX's ${r} works only in math mode`,n)}else if(i)throw new t(`LaTeX's ${r} doesn't support mu units`,n)}return{type:"kern",mode:e.mode,dimension:o.value}},mathmlBuilder(e,t){const r=Ne(e.dimension,t),n="em"===r.unit?Jt(r.number):"";if("text"===e.mode&&n.length>0){const e=new O(n);return new L("mtext",[e])}{const e=new L("mspace");return e.setAttribute("width",r.number+r.unit),r.number<0&&(e.style.marginLeft=r.number+r.unit),e}}});const Jt=function(e){return e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":""},Kt=/[^A-Za-z_0-9-]/g;f({type:"label",names:["\\label"],props:{numArgs:1,argTypes:["raw"]},handler:({parser:e},t)=>({type:"label",mode:e.mode,string:t[0].string.replace(Kt,"")}),mathmlBuilder(e,t){const r=new L("mrow",[],["tml-label"]);return e.string.length>0&&r.setLabel(e.string),r}});const Qt=["\\clap","\\llap","\\rlap"];f({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap","\\clap","\\llap","\\rlap"],props:{numArgs:1,allowedInText:!0},handler:({parser:e,funcName:r,token:n},a)=>{if(Qt.includes(r)){if(e.settings.strict&&"text"!==e.mode)throw new t(`{${r}} can be used only in text mode.\n Try \\math${r.slice(1)}`,n);r=r.slice(1)}else r=r.slice(5);const o=a[0];return{type:"lap",mode:e.mode,alignment:r,body:o}},mathmlBuilder:(e,t)=>{let r;if("llap"===e.alignment){const n=me(b(e.body),t),a=new L("mphantom",n);r=new L("mpadded",[a]),r.setAttribute("width","0px")}const n=fe(e.body,t);let a;if("llap"===e.alignment?(n.style.position="absolute",n.style.right="0",n.style.bottom="0",a=new L("mpadded",[r,n])):a=new L("mpadded",[n]),"rlap"===e.alignment)e.body.body.length>0&&"genfrac"===e.body.body[0].type&&a.setAttribute("lspace","0.16667em");else{const t="llap"===e.alignment?"-1":"-0.5";a.setAttribute("lspace",t+"width"),"llap"===e.alignment?a.style.position="relative":(a.style.display="flex",a.style.justifyContent="center")}return a.setAttribute("width","0px"),a}}),f({type:"ordgroup",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler({funcName:e,parser:t},r){const n=t.mode;t.switchMode("math");const a="\\("===e?"\\)":"$",o=t.parseExpression(!1,a);return t.expect(a),t.switchMode(n),{type:"ordgroup",mode:t.mode,body:o}}}),f({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,r){throw new t(`Mismatched ${e.funcName}`,r)}}),f({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:({parser:e},t)=>({type:"mathchoice",mode:e.mode,display:b(t[0]),text:b(t[1]),script:b(t[2]),scriptscript:b(t[3])}),mathmlBuilder:(e,t)=>{const r=((e,t)=>{switch(t.level){case 0:return e.display;case 1:default:return e.text;case 2:return e.script;case 3:return e.scriptscript}})(e,t);return he(r,t)}});const er=["text","textord","mathord","atom"];function tr(e,t){let r;const n=me(e.body,t);if("minner"===e.mclass)r=new L("mpadded",n);else if("mord"===e.mclass)e.isCharacterBox||"mathord"===n[0].type?(r=n[0],r.type="mi",1===r.children.length&&r.children[0].text&&"∇"===r.children[0].text&&r.setAttribute("mathvariant","normal")):r=new L("mi",n);else{r=new L("mrow",n),e.mustPromote?(r=n[0],r.type="mo",e.isCharacterBox&&e.body[0].text&&/[A-Za-z]/.test(e.body[0].text)&&r.setAttribute("mathvariant","italic")):r=new L("mrow",n);const a=t.level<2;"mrow"===r.type?a&&("mbin"===e.mclass?(r.children.unshift(Le(.2222)),r.children.push(Le(.2222))):"mrel"===e.mclass?(r.children.unshift(Le(.2778)),r.children.push(Le(.2778))):"mpunct"===e.mclass?r.children.push(Le(.1667)):"minner"===e.mclass&&(r.children.unshift(Le(.0556)),r.children.push(Le(.0556)))):"mbin"===e.mclass?(r.attributes.lspace=a?"0.2222em":"0",r.attributes.rspace=a?"0.2222em":"0"):"mrel"===e.mclass?(r.attributes.lspace=a?"0.2778em":"0",r.attributes.rspace=a?"0.2778em":"0"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace=a?"0.1667em":"0"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&a&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em"),"mopen"!==e.mclass&&"mclose"!==e.mclass&&(delete r.attributes.stretchy,delete r.attributes.form)}return r}f({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler({parser:e,funcName:t},r){const n=r[0],a=c(n);let o=!0;const i={type:"mathord",text:"",mode:e.mode},s=n.body?n.body:[n];for(const t of s){if(!er.includes(t.type)){o=!1;break}z[e.mode][t.text]?i.text+=z[e.mode][t.text].replace:t.text?i.text+=t.text:t.body&&t.body.map((e=>{i.text+=e.text}))}return o&&"\\mathord"===t&&"mathord"===i.type&&i.text.length>1?i:{type:"mclass",mode:e.mode,mclass:"m"+t.slice(5),body:b(o?i:n),isCharacterBox:a,mustPromote:o}},mathmlBuilder:tr});const rr=e=>{const 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};f({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:({parser:e},t)=>({type:"mclass",mode:e.mode,mclass:rr(t[0]),body:b(t[1]),isCharacterBox:c(t[1])})}),f({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler({parser:e,funcName:t},r){const n=r[1],a=r[0],o={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,stack:!0,suppressBaseShift:"\\stackrel"!==t,body:b(n)};return{type:"supsub",mode:a.mode,base:o,sup:"\\underset"===t?null:a,sub:"\\underset"===t?a:null}},mathmlBuilder:tr});const nr=(e,t,r)=>{if(!e)return r;const n=fe(e,t);return"mrow"===n.type&&0===n.children.length?r:n};f({type:"multiscript",names:["\\sideset","\\pres@cript"],props:{numArgs:3},handler({parser:e,funcName:r,token:n},a){if(0===a[2].body.length)throw new t(r+"cannot parse an empty base.");const o=a[2].body[0];if(e.settings.strict&&"\\sideset"===r&&!o.symbol)throw new t("The base of \\sideset must be a big operator. Try \\prescript.");if(a[0].body.length>0&&"supsub"!==a[0].body[0].type||a[1].body.length>0&&"supsub"!==a[1].body[0].type)throw new t("\\sideset can parse only subscripts and superscripts in its first two arguments",n);const i=a[0].body.length>0?a[0].body[0]:null,s=a[1].body.length>0?a[1].body[0]:null;return i||s?i?{type:"multiscript",mode:e.mode,isSideset:"\\sideset"===r,prescripts:i,postscripts:s,base:o}:{type:"styling",mode:e.mode,scriptLevel:"text",body:[{type:"supsub",mode:e.mode,base:o,sup:s.sup,sub:s.sub}]}:o},mathmlBuilder(e,t){const r=fe(e.base,t),n=new L("mprescripts"),a=new L("none");let o=[];const i=nr(e.prescripts.sub,t,a),s=nr(e.prescripts.sup,t,a);return e.isSideset&&(i.setAttribute("style","text-align: left;"),s.setAttribute("style","text-align: left;")),o=e.postscripts?[r,nr(e.postscripts.sub,t,a),nr(e.postscripts.sup,t,a),n,i,s]:[r,n,i,s],new L("mmultiscripts",o)}}),f({type:"not",names:["\\not"],props:{numArgs:1,primitive:!0,allowedInText:!1},handler({parser:e},t){const r=c(t[0]);let n;return r?(n=b(t[0]),"\\"===n[0].text.charAt(0)&&(n[0].text=z.math[n[0].text].replace),n[0].text=n[0].text.slice(0,1)+"̸"+n[0].text.slice(1)):n=[{type:"textord",mode:"math",text:"̸"},{type:"kern",mode:"math",dimension:{number:-.6,unit:"em"}},t[0]],{type:"not",mode:e.mode,body:n,isCharacterBox:r}},mathmlBuilder:(e,t)=>e.isCharacterBox?me(e.body,t,!0)[0]:he(e.body,t)});const ar=["textord","mathord","atom"],or=["\\smallint"],ir=["textord","mathord","ordgroup","close","leftright","font"],sr=e=>{e.attributes.lspace="0.1667em",e.attributes.rspace="0.1667em"},lr=(e,t)=>{let r;if(e.symbol)r=new k("mo",[ie(e.name,e.mode)]),or.includes(e.name)?r.setAttribute("largeop","false"):r.setAttribute("movablelimits","false"),e.fromMathOp&&sr(r);else if(e.body)r=new k("mo",me(e.body,t)),e.fromMathOp&&sr(r);else if(r=new k("mi",[new S(e.name.slice(1))]),!e.parentIsSupSub){const t=[r,new k("mo",[ie("","text")])];if(e.needsLeadingSpace){const e=new k("mspace");e.setAttribute("width","0.1667em"),t.unshift(e)}if(!e.isFollowedByDelimiter){const e=new k("mspace");e.setAttribute("width","0.1667em"),t.push(e)}r=new k("mrow",t)}return r},cr={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨅":"\\bigsqcap","⨆":"\\bigsqcup","⨃":"\\bigcupdot","⨇":"\\bigdoublevee","⨈":"\\bigdoublewedge","⨉":"\\bigtimes"};f({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcupplus","\\bigcupdot","\\bigcap","\\bigcup","\\bigdoublevee","\\bigdoublewedge","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcap","\\bigsqcup","\\bigtimes","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:({parser:e,funcName:t},r)=>{let n=t;return 1===n.length&&(n=cr[n]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,stack:!1,name:n}},mathmlBuilder:lr}),f({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:({parser:e},t)=>{const r=t[0],n=r.body?r.body:[r],a=1===n.length&&ar.includes(n[0].type);return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:a,fromMathOp:!0,stack:!1,name:a?n[0].text:null,body:a?null:b(r)}},mathmlBuilder:lr});const ur={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint","∱":"\\intclockwise","∲":"\\varointclockwise","⨌":"\\iiiint","⨍":"\\intbar","⨎":"\\intBar","⨏":"\\fint","⨒":"\\rppolint","⨓":"\\scpolint","⨕":"\\pointint","⨖":"\\sqint","⨗":"\\intlarhk","⨘":"\\intx","⨙":"\\intcap","⨚":"\\intcup"};f({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","\\sgn","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler({parser:e,funcName:t}){const r=e.prevAtomType,n=e.gullet.future().text;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,stack:!1,isFollowedByDelimiter:It(n),needsLeadingSpace:r.length>0&&ir.includes(r),name:t}},mathmlBuilder:lr}),f({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler({parser:e,funcName:t}){const r=e.prevAtomType,n=e.gullet.future().text;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,stack:!1,isFollowedByDelimiter:It(n),needsLeadingSpace:r.length>0&&ir.includes(r),name:t}},mathmlBuilder:lr}),f({type:"op",names:["\\int","\\iint","\\iiint","\\iiiint","\\oint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\intbar","\\intBar","\\fint","\\rppolint","\\scpolint","\\pointint","\\sqint","\\intlarhk","\\intx","\\intcap","\\intcup","∫","∬","∭","∮","∯","∰","∱","∲","⨌","⨍","⨎","⨏","⨒","⨓","⨕","⨖","⨗","⨘","⨙","⨚"],props:{numArgs:0},handler({parser:e,funcName:t}){let r=t;return 1===r.length&&(r=ur[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,stack:!1,name:r}},mathmlBuilder:lr}),f({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1,allowedInArgument:!0},handler:({parser:e,funcName:t},r)=>{const n=r[0],a=e.prevAtomType,o=e.gullet.future().text;return{type:"operatorname",mode:e.mode,body:b(n),alwaysHandleSupSub:"\\operatornamewithlimits"===t,limits:!1,parentIsSupSub:!1,isFollowedByDelimiter:It(o),needsLeadingSpace:a.length>0&&ir.includes(a)}},mathmlBuilder:(e,t)=>{let r,n=me(e.body,t.withFont("mathrm")),a=!0;for(let e=0;e<n.length;e++){let t=n[e];if(t instanceof L)switch(("mrow"===t.type||"mpadded"===t.type)&&1===t.children.length&&t.children[0]instanceof L&&(t=t.children[0]),t.type){case"mi":case"mn":case"ms":case"mtext":break;case"mspace":if(t.attributes.width){const r=t.attributes.width.replace("em",""),o=Jt(Number(r));""===o?a=!1:n[e]=new L("mtext",[new O(o)])}break;case"mo":{const e=t.children[0];1===t.children.length&&e instanceof O?e.text=e.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break}default:a=!1}else a=!1}if(a){const e=n.map((e=>e.toText())).join("");n=[new O(e)]}else if(1===n.length&&["mover","munder"].includes(n[0].type)&&("mi"===n[0].children[0].type||"mtext"===n[0].children[0].type)){if(n[0].children[0].type="mi",e.parentIsSupSub)return new L("mrow",n);{const e=new L("mo",[ie("","text")]);return M([n[0],e])}}if(a?(r=new L("mi",n),1===n[0].text.length&&r.setAttribute("mathvariant","normal")):r=new L("mrow",n),!e.parentIsSupSub){const t=[r,new L("mo",[ie("","text")])];if(e.needsLeadingSpace){const e=new L("mspace");e.setAttribute("width","0.1667em"),t.unshift(e)}if(!e.isFollowedByDelimiter){const e=new L("mspace");e.setAttribute("width","0.1667em"),t.push(e)}return M(t)}return r}}),Ze("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),g({type:"ordgroup",mathmlBuilder:(e,t)=>he(e.body,t,e.semisimple)}),f({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:({parser:e},t)=>{const r=t[0];return{type:"phantom",mode:e.mode,body:b(r)}},mathmlBuilder:(e,t)=>{const r=me(e.body,t);return new L("mphantom",r)}}),f({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:({parser:e},t)=>{const r=t[0];return{type:"hphantom",mode:e.mode,body:r}},mathmlBuilder:(e,t)=>{const r=me(b(e.body),t),n=new L("mphantom",r),a=new L("mpadded",[n]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}}),f({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:({parser:e},t)=>{const r=t[0];return{type:"vphantom",mode:e.mode,body:r}},mathmlBuilder:(e,t)=>{const r=me(b(e.body),t),n=new L("mphantom",r),a=new L("mpadded",[n]);return a.setAttribute("width","0px"),a}}),f({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler:({parser:e},t)=>({type:"pmb",mode:e.mode,body:b(t[0])}),mathmlBuilder(e,t){const r=me(e.body,t),n=N(r);return n.setAttribute("style","font-weight:bold"),n}});const dr=(e,t)=>{const r=t.withLevel(1),n=new L("mpadded",[fe(e.body,r)]),a=Ne(e.dy,t);return n.setAttribute("voffset",a.number+a.unit),a.number>0?n.style.padding=a.number+a.unit+" 0 0 0":n.style.padding="0 0 "+Math.abs(a.number)+a.unit+" 0",n};f({type:"raise",names:["\\raise","\\lower"],props:{numArgs:2,argTypes:["size","primitive"],primitive:!0},handler({parser:e,funcName:t},r){const n=Ie(r[0],"size").value;"\\lower"===t&&(n.number*=-1);const a=r[1];return{type:"raise",mode:e.mode,dy:n,body:a}},mathmlBuilder:dr}),f({type:"raise",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler({parser:e,funcName:t},r){const n=Ie(r[0],"size").value,a=r[1];return{type:"raise",mode:e.mode,dy:n,body:a}},mathmlBuilder:dr}),f({type:"ref",names:["\\ref","\\eqref"],props:{numArgs:1,argTypes:["raw"]},handler:({parser:e,funcName:t},r)=>({type:"ref",mode:e.mode,funcName:t,string:r[0].string.replace(Kt,"")}),mathmlBuilder(e,t){const r="\\ref"===e.funcName?["tml-ref"]:["tml-ref","tml-eqref"];return new q("#"+e.string,r,null)}}),f({type:"reflect",names:["\\reflectbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:({parser:e},t)=>({type:"reflect",mode:e.mode,body:t[0]}),mathmlBuilder(e,t){const r=fe(e.body,t);return r.style.transform="scaleX(-1)",r}}),f({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler:({parser:e})=>({type:"internal",mode:e.mode})}),f({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler({parser:e},t,r){const n=r[0],a=Ie(t[0],"size"),o=Ie(t[1],"size");return{type:"rule",mode:e.mode,shift:n&&Ie(n,"size").value,width:a.value,height:o.value}},mathmlBuilder(e,t){const r=Ne(e.width,t),n=Ne(e.height,t),a=e.shift?Ne(e.shift,t):{number:0,unit:"em"},o=t.color&&t.getColor()||"black",i=new L("mspace");if(r.number>0&&n.number>0&&i.setAttribute("mathbackground",o),i.setAttribute("width",r.number+r.unit),i.setAttribute("height",n.number+n.unit),0===a.number)return i;const s=new L("mpadded",[i]);return a.number>=0?s.setAttribute("height","+"+a.number+a.unit):(s.setAttribute("height",a.number+a.unit),s.setAttribute("depth","+"+-a.number+a.unit)),s.setAttribute("voffset",a.number+a.unit),s}});const pr={"\\tiny":.5,"\\sixptsize":.6,"\\Tiny":.6,"\\scriptsize":.7,"\\footnotesize":.8,"\\small":.9,"\\normalsize":1,"\\large":1.2,"\\Large":1.44,"\\LARGE":1.728,"\\huge":2.074,"\\Huge":2.488};f({type:"sizing",names:["\\tiny","\\sixptsize","\\Tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],props:{numArgs:0,allowedInText:!0},handler:({breakOnTokenText:e,funcName:t,parser:r},n)=>{r.settings.strict&&"math"===r.mode&&console.log(`Temml strict-mode warning: Command ${t} is invalid in math mode.`);const a=r.parseExpression(!1,e,!0);return{type:"sizing",mode:r.mode,funcName:t,body:a}},mathmlBuilder:(e,t)=>{const r=t.withFontSize(pr[e.funcName]),n=me(e.body,r),a=N(n),o=(pr[e.funcName]/t.fontSize).toFixed(4);return a.setAttribute("mathsize",o+"em"),a}}),f({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:({parser:e},t,r)=>{let n=!1,a=!1;const o=r[0]&&Ie(r[0],"ordgroup");if(o){let e="";for(let t=0;t<o.body.length;++t)if(e=o.body[t].text,"t"===e)n=!0;else{if("b"!==e){n=!1,a=!1;break}a=!0}}else n=!0,a=!0;const i=t[0];return{type:"smash",mode:e.mode,body:i,smashHeight:n,smashDepth:a}},mathmlBuilder:(e,t)=>{const r=new L("mpadded",[fe(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),f({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler({parser:e},t,r){const n=r[0],a=t[0];return{type:"sqrt",mode:e.mode,body:a,index:n}},mathmlBuilder(e,t){const{body:r,index:n}=e;return n?new L("mroot",[fe(r,t),fe(n,t.incrementLevel())]):new L("msqrt",[fe(r,t)])}});const mr={display:0,text:1,script:2,scriptscript:3},hr={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]};f({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler({breakOnTokenText:e,funcName:t,parser:r},n){const a=r.parseExpression(!0,e,!0),o=t.slice(1,t.length-5);return{type:"styling",mode:r.mode,scriptLevel:o,body:a}},mathmlBuilder(e,t){const r=t.withLevel(mr[e.scriptLevel]),n=me(e.body,r),a=N(n),o=hr[e.scriptLevel];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});const fr=/^m(over|under|underover)$/;g({type:"supsub",mathmlBuilder(e,t){let r,n,a=!1,o=!1,i=!1,s=!1;e.base&&"horizBrace"===e.base.type&&(n=!!e.sup,n===e.base.isOver&&(a=!0,r=e.base.isOver)),!e.base||e.base.stack||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0,o=!e.base.symbol,i=o&&!e.isFollowedByDelimiter,s=e.base.needsLeadingSpace);const l=e.base&&e.base.stack?[fe(e.base.body[0],t)]:[fe(e.base,t)],c=t.inSubOrSup();if(e.sub){const r=fe(e.sub,c);3===t.level&&r.setAttribute("scriptlevel","2"),l.push(r)}if(e.sup){const r=fe(e.sup,c);3===t.level&&r.setAttribute("scriptlevel","2");const n="mrow"===r.type?r.children[0]:r;n&&"mo"===n.type&&n.classes.includes("tml-prime")&&e.base&&e.base.text&&"fF".indexOf(e.base.text)>-1&&n.classes.push("prime-pad"),l.push(r)}let u;if(a)u=r?"mover":"munder";else if(e.sub)if(e.sup){const r=e.base;u=r&&("op"===r.type&&r.limits||"multiscript"===r.type)&&(0===t.level||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(0===t.level||r.limits)?"munderover":"msubsup"}else{const r=e.base;u=r&&"op"===r.type&&r.limits&&(0===t.level||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||0===t.level)?"munder":"msub"}else{const r=e.base;u=r&&"op"===r.type&&r.limits&&(0===t.level||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||0===t.level)?"mover":"msup"}let d=new L(u,l);if(o){const e=new L("mo",[ie("","text")]);if(s){const t=new L("mspace");t.setAttribute("width","0.1667em"),d=M([t,d,e])}else d=M([d,e]);if(i){const e=new L("mspace");e.setAttribute("width","0.1667em"),d.children.push(e)}}else fr.test(u)&&(d=new L("mrow",[d]));return d}});const gr=["\\shortmid","\\nshortmid","\\shortparallel","\\nshortparallel","\\smallsetminus"],xr=["\\Rsh","\\Lsh","\\restriction"];g({type:"atom",mathmlBuilder(e,t){const r=new L("mo",[ie(e.text,e.mode)]);if("punct"===e.family)r.setAttribute("separator","true");else if("open"===e.family||"close"===e.family)"open"===e.family?(r.setAttribute("form","prefix"),r.setAttribute("stretchy","false")):"close"===e.family&&(r.setAttribute("form","postfix"),r.setAttribute("stretchy","false"));else if("\\mid"===e.text)r.setAttribute("lspace","0.22em"),r.setAttribute("rspace","0.22em"),r.setAttribute("stretchy","false");else if("rel"===e.family&&(e=>{if(1===e.length){const t=e.codePointAt(0);return 8591<t&&t<8704}return e.indexOf("arrow")>-1||e.indexOf("harpoon")>-1||xr.includes(e)})(e.text))r.setAttribute("stretchy","false");else if(gr.includes(e.text))r.setAttribute("mathsize","70%");else if(":"===e.text)r.attributes.lspace="0.2222em",r.attributes.rspace="0.2222em";else if(e.needsSpacing)return"bin"===e.family?new L("mrow",[Le(.222),r,Le(.222)]):new L("mrow",[Le(.2778),r,Le(.2778)]);return r}});const br={mathbf:"bold",mathrm:"normal",textit:"italic",mathit:"italic",mathnormal:"italic",mathbb:"double-struck",mathcal:"script",mathfrak:"fraktur",mathscr:"script",mathsf:"sans-serif",mathtt:"monospace"},wr=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsc"===t.fontFamily)return"normal";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"sans-serif-bold":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";const r=t.font;if(!r||"mathnormal"===r)return null;const n=e.mode;switch(r){case"mathit":case"greekItalic":return"italic";case"mathrm":{const t=e.text.codePointAt(0);return 939<t&&t<975?"italic":"normal"}case"up@greek":return"normal";case"boldsymbol":case"mathboldsymbol":return"bold-italic";case"mathbf":return"bold";case"mathbb":return"double-struck";case"mathfrak":return"fraktur";case"mathscr":case"mathcal":return"script";case"mathsf":return"sans-serif";case"mathsfit":return"sans-serif-italic";case"mathtt":return"monospace"}let a=e.text;return z[n][a]&&z[n][a].replace&&(a=z[n][a].replace),Object.prototype.hasOwnProperty.call(br,r)?br[r]:null},yr=Object.freeze({B:8426,E:8427,F:8427,H:8387,I:8391,L:8390,M:8422,R:8393,e:8394,g:8355,o:8389}),vr=Object.freeze({C:8426,H:8388,I:8392,R:8394,Z:8398}),Ar=Object.freeze({C:8383,H:8389,N:8391,P:8393,Q:8393,R:8395,Z:8394}),Er=Object.freeze({ϵ:119527,ϑ:119564,ϰ:119534,φ:119577,ϱ:119535,ϖ:119563}),_r=Object.freeze({ϵ:119643,ϑ:119680,ϰ:119650,φ:119693,ϱ:119651,ϖ:119679}),Cr=Object.freeze({ϵ:119701,ϑ:119738,ϰ:119708,φ:119751,ϱ:119709,ϖ:119737}),qr=Object.freeze({ϵ:119759,ϑ:119796,ϰ:119766,φ:119809,ϱ:119767,ϖ:119795}),Tr=Object.freeze({upperCaseLatin:{normal:e=>0,bold:e=>119743,italic:e=>119795,"bold-italic":e=>119847,script:e=>yr[e]||119899,"script-bold":e=>119951,fraktur:e=>vr[e]||120003,"fraktur-bold":e=>120107,"double-struck":e=>Ar[e]||120055,"sans-serif":e=>120159,"sans-serif-bold":e=>120211,"sans-serif-italic":e=>120263,"sans-serif-bold-italic":e=>120380,monospace:e=>120367},lowerCaseLatin:{normal:e=>0,bold:e=>119737,italic:e=>"h"===e?8358:119789,"bold-italic":e=>119841,script:e=>yr[e]||119893,"script-bold":e=>119945,fraktur:e=>119997,"fraktur-bold":e=>120101,"double-struck":e=>120049,"sans-serif":e=>120153,"sans-serif-bold":e=>120205,"sans-serif-italic":e=>120257,"sans-serif-bold-italic":e=>120309,monospace:e=>120361},upperCaseGreek:{normal:e=>0,bold:e=>119575,italic:e=>119633,"bold-italic":e=>119575,script:e=>0,"script-bold":e=>0,fraktur:e=>0,"fraktur-bold":e=>0,"double-struck":e=>0,"sans-serif":e=>119749,"sans-serif-bold":e=>119749,"sans-serif-italic":e=>0,"sans-serif-bold-italic":e=>119807,monospace:e=>0},lowerCaseGreek:{normal:e=>0,bold:e=>119569,italic:e=>119627,"bold-italic":e=>"ϕ"===e?119678:119685,script:e=>0,"script-bold":e=>0,fraktur:e=>0,"fraktur-bold":e=>0,"double-struck":e=>0,"sans-serif":e=>119743,"sans-serif-bold":e=>119743,"sans-serif-italic":e=>0,"sans-serif-bold-italic":e=>119801,monospace:e=>0},varGreek:{normal:e=>0,bold:e=>Er[e]||-51,italic:e=>0,"bold-italic":e=>_r[e]||58,script:e=>0,"script-bold":e=>0,fraktur:e=>0,"fraktur-bold":e=>0,"double-struck":e=>0,"sans-serif":e=>Cr[e]||116,"sans-serif-bold":e=>Cr[e]||116,"sans-serif-italic":e=>0,"sans-serif-bold-italic":e=>qr[e]||174,monospace:e=>0},numeral:{normal:e=>0,bold:e=>120734,italic:e=>0,"bold-italic":e=>0,script:e=>0,"script-bold":e=>0,fraktur:e=>0,"fraktur-bold":e=>0,"double-struck":e=>120744,"sans-serif":e=>120754,"sans-serif-bold":e=>120764,"sans-serif-italic":e=>0,"sans-serif-bold-italic":e=>0,monospace:e=>120774}}),kr=(e,t)=>{const r=e.codePointAt(0),n=64<r&&r<91?"upperCaseLatin":96<r&&r<123?"lowerCaseLatin":912<r&&r<938?"upperCaseGreek":944<r&&r<970||"ϕ"===e?"lowerCaseGreek":120545<r&&r<120572||Er[e]?"varGreek":47<r&&r<58?"numeral":"other";return"other"===n?e:String.fromCodePoint(r+Tr[n][t](e))},Sr=Object.freeze({a:"ᴀ",b:"ʙ",c:"ᴄ",d:"ᴅ",e:"ᴇ",f:"ꜰ",g:"ɢ",h:"ʜ",i:"ɪ",j:"ᴊ",k:"ᴋ",l:"ʟ",m:"ᴍ",n:"ɴ",o:"ᴏ",p:"ᴘ",q:"ǫ",r:"ʀ",s:"s",t:"ᴛ",u:"ᴜ",v:"ᴠ",w:"ᴡ",x:"x",y:"ʏ",z:"ᴢ"}),Nr=/^\d(?:[\d,.]*\d)?$/,Lr=/[A-Ba-z]/,Or=new Set(["\\prime","\\dprime","\\trprime","\\qprime","\\backprime","\\backdprime","\\backtrprime"]);g({type:"mathord",mathmlBuilder(e,t){const r=ie(e.text,e.mode,t),n=r.text.codePointAt(0),a=912<n&&n<938?"normal":"italic",o=wr(e,t)||a;if("script"===o)return r.text=kr(r.text,o),new L("mi",[r],[t.font]);"italic"!==o&&(r.text=kr(r.text,o));let i=new L("mi",[r]);return"normal"===o&&(i.setAttribute("mathvariant","normal"),1===r.text.length&&(i=new L("mpadded",[i]),i.setAttribute("lspace","0"),i.setAttribute("rspace","0"))),i}}),g({type:"textord",mathmlBuilder(e,t){let r=e.text;const n=r.codePointAt(0);"textsc"===t.fontFamily&&96<n&&n<123&&(r=Sr[r]);const a=ie(r,e.mode,t),o=wr(e,t)||"normal";let i;if(Nr.test(e.text)){const t="text"===e.mode?"mtext":"mn";if("italic"===o||"bold-italic"===o)return((e,t,r)=>{const n=new L(r,[e]),a=new L("mstyle",[n]);return a.style["font-style"]="italic",a.style["font-family"]="Cambria, 'Times New Roman', serif","bold-italic"===t&&(a.style["font-weight"]="bold"),a})(a,o,t);"normal"!==o&&(a.text=a.text.split("").map((e=>kr(e,o))).join("")),i=new L(t,[a])}else if("text"===e.mode)"normal"!==o&&(a.text=kr(a.text,o)),i=new L("mtext",[a]);else if(Or.has(e.text))i=new L("mo",[a]),i.classes.push("tml-prime");else{const e=a.text;"italic"!==o&&(a.text=kr(a.text,o)),i=new L("mi",[a]),a.text===e&&Lr.test(e)&&i.setAttribute("mathvariant","italic")}return i}});const Mr={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Dr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};g({type:"spacing",mathmlBuilder(e,r){let n;if(Object.prototype.hasOwnProperty.call(Dr,e.text))n=new L("mtext",[new O(" ")]);else{if(!Object.prototype.hasOwnProperty.call(Mr,e.text))throw new t(`Unknown type of space "${e.text}"`);n=new L("mo"),"\\nobreak"===e.text&&n.setAttribute("linebreak","nobreak")}return n}}),g({type:"tag"});const Br={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm","\\textsc":"textsc"},Fr={"\\textbf":"textbf","\\textmd":"textmd"},$r={"\\textit":"textit","\\textup":"textup"};f({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textsc","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler({parser:e,funcName:t},r){const n=r[0];return{type:"text",mode:e.mode,body:b(n),font:t}},mathmlBuilder(e,t){const r=((e,t)=>{const r=e.font;return r?Br[r]?t.withTextFontFamily(Br[r]):Fr[r]?t.withTextFontWeight(Fr[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape($r[r]):t})(e,t),n=he(e.body,r);return le(n)}}),f({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:({parser:e},t)=>({type:"vcenter",mode:e.mode,body:t[0]}),mathmlBuilder(e,t){const r=new L("mtd",[fe(e.body,t)]);r.style.padding="0";const n=new L("mtr",[r]);return new L("mtable",[n])}}),f({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,r,n){throw new t("\\verb ended by end of line instead of matching delimiter")},mathmlBuilder(e,t){const r=new O(Ir(e)),n=new L("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});const Ir=e=>e.body.replace(/ /g,e.star?"␣":" "),Pr=m,Rr="[ \r\n\t]",jr=`(\\\\[a-zA-Z@]+)${Rr}*`,zr="[̀-ͯ]",Ur=new RegExp(`${zr}+$`),Gr=`(${Rr}+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]${zr}*|[\ud800-\udbff][\udc00-\udfff]${zr}*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|${jr}|\\\\[^\ud800-\udfff])`;class Hr{constructor(e,t){this.input=e,this.settings=t,this.tokenRegex=new RegExp(Gr,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new We("EOF",new Ve(this,r,r));const n=this.tokenRegex.exec(e);if(null===n||n.index!==r)throw new t(`Unexpected character: '${e[r]}'`,new We(e[r],new Ve(this,r,r+1)));const a=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[a]){const r=e.indexOf("\n",this.tokenRegex.lastIndex);if(-1===r){if(this.tokenRegex.lastIndex=e.length,this.settings.strict)throw new t("% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode")}else this.tokenRegex.lastIndex=r+1;return this.lex()}return new We(a,new Ve(this,r,this.tokenRegex.lastIndex))}}class Vr{constructor(e={},t={}){this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new t("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const e=this.undefStack.pop();for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(void 0===e[t]?delete this.current[t]:this.current[t]=e[t])}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){return Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:this.builtins[e]}set(e,t,r=!1){if(r){for(let t=0;t<this.undefStack.length;t++)delete this.undefStack[t][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{const t=this.undefStack[this.undefStack.length-1];t&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=this.current[e])}this.current[e]=t}}const Wr={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Xr{constructor(e,t,r){this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Vr(Ye,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Hr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}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){let t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new We("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){const r=[],n=e&&e.length>0;n||this.consumeSpaces();const a=this.future();let o,i=0,s=0;do{if(o=this.popToken(),r.push(o),"{"===o.text)++i;else if("}"===o.text){if(--i,-1===i)throw new t("Extra }",o)}else if("EOF"===o.text)throw new t("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",o);if(e&&n)if((0===i||1===i&&"{"===e[s])&&o.text===e[s]){if(++s,s===e.length){r.splice(-s,s);break}}else s=0}while(0!==i||n);return"{"===a.text&&"}"===r[r.length-1].text&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:a,end:o}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new t("The length of delimiters doesn't match the number of args!");const n=r[0];for(let e=0;e<n.length;e++){const r=this.popToken();if(n[e]!==r.text)throw new t("Use of the macro doesn't match its definition",r)}}const n=[];for(let t=0;t<e;t++)n.push(this.consumeArg(r&&r[t+1]).tokens);return n}expandOnce(e){const r=this.popToken(),n=r.text,a=r.noexpand?null:this._getExpansion(n);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===n[0]&&!this.isDefined(n))throw new t("Undefined control sequence: "+n);return this.pushToken(r),!1}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new t("Too many expansions: infinite loop or need to increase maxExpand setting");let o=a.tokens;const i=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs){o=o.slice();for(let e=o.length-1;e>=0;--e){let r=o[e];if("#"===r.text){if(0===e)throw new t("Incomplete placeholder at end of macro body",r);if(r=o[--e],"#"===r.text)o.splice(e+1,1);else{if(!/^[1-9]$/.test(r.text))throw new t("Not a valid argument number",r);o.splice(e,2,...i[+r.text-1])}}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){const e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new We(e)]):void 0}expandTokens(e){const t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return t}expandMacroAsText(e){const t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){const t=this.macros.get(e);if(null==t)return t;if(1===e.length){const t=this.lexer.catcodes[e];if(null!=t&&13!==t)return}const r="function"==typeof t?t(this):t;if("string"==typeof r){let e=0;if(-1!==r.indexOf("#")){const t=r.replace(/##/g,"");for(;-1!==t.indexOf("#"+(e+1));)++e}const t=new Hr(r,this.settings),n=[];let a=t.lex();for(;"EOF"!==a.text;)n.push(a),a=t.lex();return n.reverse(),{tokens:n,numArgs:e}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(Pr,e)||Object.prototype.hasOwnProperty.call(z.math,e)||Object.prototype.hasOwnProperty.call(z.text,e)||Object.prototype.hasOwnProperty.call(Wr,e)}isExpandable(e){const t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Object.prototype.hasOwnProperty.call(Pr,e)&&!Pr[e].primitive}}const Zr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Yr=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",ₐ:"a",ₑ:"e",ₕ:"h",ᵢ:"i",ⱼ:"j",ₖ:"k",ₗ:"l",ₘ:"m",ₙ:"n",ₒ:"o",ₚ:"p",ᵣ:"r",ₛ:"s",ₜ:"t",ᵤ:"u",ᵥ:"v",ₓ:"x",ᵦ:"β",ᵧ:"γ",ᵨ:"ρ",ᵩ:"ϕ",ᵪ:"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9",ᴬ:"A",ᴮ:"B",ᴰ:"D",ᴱ:"E",ᴳ:"G",ᴴ:"H",ᴵ:"I",ᴶ:"J",ᴷ:"K",ᴸ:"L",ᴹ:"M",ᴺ:"N",ᴼ:"O",ᴾ:"P",ᴿ:"R",ᵀ:"T",ᵁ:"U",ⱽ:"V",ᵂ:"W",ᵃ:"a",ᵇ:"b",ᶜ:"c",ᵈ:"d",ᵉ:"e",ᶠ:"f",ᵍ:"g",ʰ:"h",ⁱ:"i",ʲ:"j",ᵏ:"k",ˡ:"l",ᵐ:"m",ⁿ:"n",ᵒ:"o",ᵖ:"p",ʳ:"r",ˢ:"s",ᵗ:"t",ᵘ:"u",ᵛ:"v",ʷ:"w",ˣ:"x",ʸ:"y",ᶻ:"z",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),Jr=Object.freeze({𝒜:"A",ℬ:"B",𝒞:"C",𝒟:"D",ℰ:"E",ℱ:"F",𝒢:"G",ℋ:"H",ℐ:"I",𝒥:"J",𝒦:"K",ℒ:"L",ℳ:"M",𝒩:"N",𝒪:"O",𝒫:"P",𝒬:"Q",ℛ:"R",𝒮:"S",𝒯:"T",𝒰:"U",𝒱:"V",𝒲:"W",𝒳:"X",𝒴:"Y",𝒵:"Z"});var Kr={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Qr={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",č:"č",ĉ:"ĉ",ċ:"ċ",ď:"ď",ḋ:"ḋ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ĺ:"ĺ",ľ:"ľ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ď:"Ď",Ḋ:"Ḋ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ĺ:"Ĺ",Ľ:"Ľ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ť:"Ť",Ṫ:"Ṫ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};const en=["bin","op","open","punct","rel"],tn=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/,rn=/^ *\\text/;class nn{constructor(e,t,r=!1){this.mode="math",this.gullet=new Xr(e,t,this.mode),this.settings=t,this.isPreamble=r,this.leftrightDepth=0,this.prevAtomType=""}expect(e,r=!0){if(this.fetch().text!==e)throw new t(`Expected '${e}', got '${this.fetch().text}'`,this.fetch());r&&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.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");const e=this.parseExpression(!1);if(this.expect("EOF"),this.isPreamble){const e=Object.create(null);return Object.entries(this.gullet.macros.current).forEach((([t,r])=>{e[t]=r})),this.gullet.endGroup(),e}const t=this.gullet.macros.get("\\df@tag");return this.gullet.endGroup(),t&&(this.gullet.macros.current["\\df@tag"]=t),e}static get endOfExpression(){return["}","\\endgroup","\\end","\\right","\\endtoggle","&"]}subparse(e){const t=this.nextToken;this.consume(),this.gullet.pushToken(new We("}")),this.gullet.pushTokens(e);const r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t,r){const n=[];for(this.prevAtomType="";;){"math"===this.mode&&this.consumeSpaces();const a=this.fetch();if(-1!==nn.endOfExpression.indexOf(a.text))break;if(t&&a.text===t)break;if(r&&"\\middle"===a.text)break;if(e&&Pr[a.text]&&Pr[a.text].infix)break;const o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&(n.push(o),this.prevAtomType="atom"===o.type?o.family:o.type)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){let r,n=-1;for(let a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==n)throw new t("only one infix operator per group",e[a].token);n=a,r=e[a].replaceWith}if(-1!==n&&r){let t,a;const o=e.slice(0,n),i=e.slice(n+1);let s;return t=1===o.length&&"ordgroup"===o[0].type?o[0]:{type:"ordgroup",mode:this.mode,body:o},a=1===i.length&&"ordgroup"===i[0].type?i[0]:{type:"ordgroup",mode:this.mode,body:i},s="\\\\abovefrac"===r?this.callFunction(r,[t,e[n],a],[]):this.callFunction(r,[t,a],[]),[s]}return e}handleSupSubscript(e){const r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();const a=this.parseGroup(e);if(!a)throw new t("Expected group after '"+n+"'",r);return a}formatUnsupportedCmd(e){const t=[];for(let r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});const r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){const r=this.parseGroup("atom",e);if("text"===this.mode)return r;let n,a;for(;;){this.consumeSpaces();const e=this.fetch();if("\\limits"===e.text||"\\nolimits"===e.text){if(r&&"op"===r.type){const t="\\limits"===e.text;r.limits=t,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new t("Limit controls must follow a math operator",e);r.alwaysHandleSupSub&&(r.limits="\\limits"===e.text)}this.consume()}else if("^"===e.text){if(n)throw new t("Double superscript",e);n=this.handleSupSubscript("superscript")}else if("_"===e.text){if(a)throw new t("Double subscript",e);a=this.handleSupSubscript("subscript")}else if("'"===e.text){if(n)throw new t("Double superscript",e);const r={type:"textord",mode:this.mode,text:"\\prime"},a=[r];for(this.consume();"'"===this.fetch().text;)a.push(r),this.consume();"^"===this.fetch().text&&a.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:a}}else{if(!Yr[e.text])break;{const t=Zr.test(e.text),r=[];for(r.push(new We(Yr[e.text])),this.consume();;){const e=this.fetch().text;if(!Yr[e])break;if(Zr.test(e)!==t)break;r.unshift(new We(Yr[e])),this.consume()}const o=this.subparse(r);t?a={type:"ordgroup",mode:"math",body:o}:n={type:"ordgroup",mode:"math",body:o}}}}if(n||a){if(r&&"multiscript"===r.type&&!r.postscripts)return r.postscripts={sup:n,sub:a},r;{const e=!r||"op"!==r.type&&"operatorname"!==r.type?void 0:It(this.nextToken.text);return{type:"supsub",mode:this.mode,base:r,sup:n,sub:a,isFollowedByDelimiter:e}}}return r}parseFunction(e,r){const n=this.fetch(),a=n.text,o=Pr[a];if(!o)return null;if(this.consume(),r&&"atom"!==r&&!o.allowedInArgument)throw new t("Got function '"+a+"' with no arguments"+(r?" as "+r:""),n);if("text"===this.mode&&!o.allowedInText)throw new t("Can't use function '"+a+"' in text mode",n);if("math"===this.mode&&!1===o.allowedInMath)throw new t("Can't use function '"+a+"' in math mode",n);const i=this.prevAtomType,{args:s,optArgs:l}=this.parseArguments(a,o);return this.prevAtomType=i,this.callFunction(a,s,l,n,e)}callFunction(e,r,n,a,o){const i={funcName:e,parser:this,token:a,breakOnTokenText:o},s=Pr[e];if(s&&s.handler)return s.handler(i,r,n);throw new t(`No function handler for ${e}`)}parseArguments(e,r){const n=r.numArgs+r.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};const a=[],o=[];for(let i=0;i<n;i++){let n=r.argTypes&&r.argTypes[i];const s=i<r.numOptionalArgs;(r.primitive&&null==n||"sqrt"===r.type&&1===i&&null==o[0])&&(n="primitive");const l=this.parseGroupOfType(`argument to '${e}'`,n,s);if(s)o.push(l);else{if(null==l)throw new t("Null argument, please report this as a bug");a.push(l)}}return{args:a,optArgs:o}}parseGroupOfType(e,r,n){switch(r){case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{const e=this.parseArgumentGroup(n,"text");return null!=e?{type:"styling",mode:e.mode,body:[e],scriptLevel:"text"}:null}case"raw":{const e=this.parseStringGroup("raw",n);return null!=e?{type:"raw",mode:"text",string:e.text}:null}case"primitive":{if(n)throw new t("A primitive argument cannot be optional");const r=this.parseGroup(e);if(null==r)throw new t("Expected group as "+e,this.fetch());return r}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new t("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;;){const e=this.fetch().text;if(" "!==e&&" "!==e&&"︎"!==e)break;this.consume()}}parseStringGroup(e,t){const r=this.gullet.scanArgument(t);if(null==r)return null;let n,a="";for(;"EOF"!==(n=this.fetch()).text;)a+=n.text,this.consume();return this.consume(),r.text=a,r}parseRegexGroup(e,r){const n=this.fetch();let a,o=n,i="";for(;"EOF"!==(a=this.fetch()).text&&e.test(i+a.text);)o=a,i+=o.text,this.consume();if(""===i)throw new t("Invalid "+r+": '"+n.text+"'",n);return n.range(o,i)}parseSizeGroup(e){let r,n=!1;if(this.gullet.consumeSpaces(),r=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"),!r)return null;e||0!==r.text.length||(r.text="0pt",n=!0);const a=tn.exec(r.text);if(!a)throw new t("Invalid size: '"+r.text+"'",r);const o={number:+(a[1]+a[2]),unit:a[3]};if(!ke(o))throw new t("Invalid unit: '"+o.unit+"'",r);return{type:"size",mode:this.mode,value:o,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;let r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return r=t.text.replace(/{\u2044}/g,"/"),{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){const r=this.gullet.scanArgument(e);if(null==r)return null;const n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();const a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const o={type:"ordgroup",mode:this.mode,loc:r.loc,body:a};return t&&this.switchMode(n),o}parseGroup(e,t){const r=this.fetch(),n=r.text;let a;if("{"===n||"\\begingroup"===n||"\\toggle"===n){this.consume();const e="{"===n?"}":"\\begingroup"===n?"\\endgroup":"\\endtoggle";this.gullet.beginGroup();const t=this.parseExpression(!1,e),o=this.fetch();this.expect(e),this.gullet.endGroup(),a={type:"\\endtoggle"===o.text?"toggle":"ordgroup",mode:this.mode,loc:Ve.range(r,o),body:t,semisimple:"\\begingroup"===n||void 0}}else a=this.parseFunction(t,e)||this.parseSymbol(),null!=a||"\\"!==n[0]||Object.prototype.hasOwnProperty.call(Wr,n)||(a=this.formatUnsupportedCmd(n),this.consume());return a}formLigatures(e){let t=e.length-1;for(let r=0;r<t;++r){const n=e[r],a=n.text;"-"===a&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:Ve.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Ve.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==a&&"`"!==a||e[r+1].text!==a||(e.splice(r,2,{type:"textord",mode:"text",loc:Ve.range(n,e[r+1]),text:a+a}),t-=1)}}parseSymbol(){const e=this.fetch();let r=e.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();let e=r.slice(5);const n="*"===e.charAt(0);if(n&&(e=e.slice(1)),e.length<2||e.charAt(0)!==e.slice(-1))throw new t("\\verb assertion failed --\n please report what input caused this bug");return e=e.slice(1,-1),{type:"verb",mode:"text",body:e,star:n}}if(Object.prototype.hasOwnProperty.call(Qr,r[0])&&"math"===this.mode&&!z[this.mode][r[0]]){if(this.settings.strict&&"math"===this.mode)throw new t(`Accented Unicode text character "${r[0]}" used in math mode`,e);r=Qr[r[0]]+r.slice(1)}const n="math"===this.mode?Ur.exec(r):null;let a;if(n&&(r=r.substring(0,n.index),"i"===r?r="ı":"j"===r&&(r="ȷ")),z[this.mode][r]){let t=z[this.mode][r].group;"bin"===t&&en.includes(this.prevAtomType)&&(t="open");const n=Ve.range(e);let o;if(Object.prototype.hasOwnProperty.call(R,t)){const e=t;o={type:"atom",mode:this.mode,family:e,loc:n,text:r},"rel"!==e&&"bin"!==e||"text"!==this.prevAtomType||rn.test(n.lexer.input.slice(n.end))&&(o.needsSpacing=!0)}else{if(Jr[r]){this.consume();const e=this.fetch().text.charCodeAt(0),t=65025===e?"mathscr":"mathcal";return 65024!==e&&65025!==e||this.consume(),{type:"font",mode:"math",font:t,body:{type:"mathord",mode:"math",loc:n,text:Jr[r]}}}o={type:t,mode:this.mode,loc:n,text:r}}a=o}else{if(!(r.charCodeAt(0)>=128||Ur.exec(r)))return null;if(this.settings.strict&&"math"===this.mode)throw new t(`Unicode text character "${r[0]}" used in math mode`,e);a={type:"textord",mode:"text",loc:Ve.range(e),text:r}}if(this.consume(),n)for(let r=0;r<n[0].length;r++){const o=n[0][r];if(!Kr[o])throw new t(`Unknown accent ' ${o}'`,e);const i=Kr[o][this.mode]||Kr[o].text;if(!i)throw new t(`Accent ${o} unsupported in ${this.mode} mode`,e);a={type:"accent",mode:this.mode,loc:Ve.range(e),label:i,isStretchy:!1,base:a}}return a}}const an=function(e,r){if(!("string"==typeof e||e instanceof String))throw new TypeError("Temml can only parse string typed expression");const n=new nn(e,r);delete n.gullet.macros.current["\\df@tag"];let a=n.parse();if(!(a.length>0&&a[0].type&&"array"===a[0].type&&a[0].addEqnNum)&&n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new t("\\tag works only in display mode");n.gullet.feed("\\df@tag"),a=[{type:"tag",mode:"text",body:a,tag:n.parse()}]}return a},on=[2,2,3,3];class sn{constructor(e){this.level=e.level,this.color=e.color,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontSize=e.fontSize||1,this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.maxSize=e.maxSize}extend(e){const t={level:this.level,color:this.color,font:this.font,fontFamily:this.fontFamily,fontSize:this.fontSize,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return new sn(t)}withLevel(e){return this.extend({level:e})}incrementLevel(){return this.extend({level:Math.min(this.level+1,3)})}inSubOrSup(){return this.extend({level:on[this.level]})}withColor(e){return this.extend({color:e})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withFontSize(e){return this.extend({fontSize:e})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}getColor(){return this.color}}function ln(e){const t={};let r=0;const n=document.getElementsByClassName("tml-eqn");for(let e of n)for(r+=1,e.setAttribute("id","tml-eqn-"+String(r));"mtable"!==e.tagName;){if(e.getElementsByClassName("tml-label").length>0){const n=e.attributes.id.value;t[n]=String(r);break}e=e.parentElement}const a=document.getElementsByClassName("tml-tageqn");for(const e of a)if(e.getElementsByClassName("tml-label").length>0){const r=e.getElementsByClassName("tml-tag");if(r.length>0){const n=e.attributes.id.value;t[n]=r[0].textContent}}[...e.getElementsByClassName("tml-ref")].forEach((e=>{const r=e.getAttribute("href");let n=t[r.slice(1)];-1===e.className.indexOf("tml-eqref")?(n=n.replace(/^\(/,""),n=n.replace(/\)$/,"")):("("!==n.charAt(0)&&(n="("+n),")"!==n.slice(-1)&&(n+=")"));const a=document.createElementNS("http://www.w3.org/1998/Math/MathML","mtext");a.appendChild(document.createTextNode(n));const o=document.createElementNS("http://www.w3.org/1998/Math/MathML","math");o.appendChild(a),e.textContent="",e.appendChild(o)}))}const cn=function(e,t,r){let n=r,a=0;const o=e.length;for(;n<t.length;){const r=t[n];if(a<=0&&t.slice(n,n+o)===e)return n;"\\"===r?n++:"{"===r?a++:"}"===r&&a--,n++}return-1},un=/^\\(?:begin|(?:eq)?ref){/,dn=[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{equation*}",right:"\\end{equation*}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{align*}",right:"\\end{align*}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{alignat*}",right:"\\end{alignat*}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{gather*}",right:"\\end{gather*}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\ref{",right:"}",display:!1},{left:"\\eqref{",right:"}",display:!1},{left:"\\[",right:"\\]",display:!0}],pn={$:[{left:"$$",right:"$$",display:!0},{left:"$`",right:"`$",display:!1},{left:"$",right:"$",display:!1}],"(":[{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]},mn=[{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{equation*}",right:"\\end{equation*}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{align*}",right:"\\end{align*}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{alignat*}",right:"\\end{alignat*}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{gather*}",right:"\\end{gather*}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\ref{",right:"}",display:!1},{left:"\\eqref{",right:"}",display:!1}],hn=function(e,r){const n=function(e,t){let r;const n=[],a=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(a),-1!==r;){r>0&&(n.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));const a=t.findIndex((t=>e.startsWith(t.left)));if(r=cn(t[a].right,e,t[a].left.length),-1===r)break;const o=e.slice(0,r+t[a].right.length),i=un.test(o)?o:e.slice(t[a].left.length,r);n.push({type:"math",data:i,rawData:o,display:t[a].display}),e=e.slice(r+t[a].right.length)}return""!==e&&n.push({type:"text",data:e}),n}(e,r.delimiters);if(1===n.length&&"text"===n[0].type)return null;const a=document.createDocumentFragment();for(let e=0;e<n.length;e++)if("text"===n[e].type)a.appendChild(document.createTextNode(n[e].data));else{const o=document.createElement("span");let i=n[e].data;r.displayMode=n[e].display;try{r.preProcess&&(i=r.preProcess(i)),temml.render(i,o,r)}catch(o){if(!(o instanceof t))throw o;r.errorCallback("Temml auto-render: Failed to parse `"+n[e].data+"` with ",o),a.appendChild(document.createTextNode(n[e].rawData));continue}a.appendChild(o)}return a},fn=function(e,t){for(let r=0;r<e.childNodes.length;r++){const n=e.childNodes[r];if(3===n.nodeType){const a=hn(n.textContent,t);a&&(r+=a.childNodes.length-1,e.replaceChild(a,n))}else if(1===n.nodeType){const e=" "+n.className+" ";-1===t.ignoredTags.indexOf(n.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&fn(n,t)}}};let gn=function(e,t,r={}){t.textContent="";const n="math"===t.tagName.toLowerCase();n&&(r.wrap="none");const a=xn(e,r);n||a.children.length>1?(t.textContent="",a.children.forEach((e=>{t.appendChild(e.toNode())}))):t.appendChild(a.toNode())};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: Temml doesn't work in quirks mode. Make sure your website has a suitable doctype."),gn=function(){throw new t("Temml doesn't work in quirks mode.")});const xn=function(e,r){const n=new p(r);try{return function(e,t,r,n){let a=null;1===e.length&&"tag"===e[0].type&&(a=e[0].tag,e=e[0].body);const o=me(e,r);if(1===o.length&&o[0]instanceof q)return o[0];const i=n.displayMode||n.annotate?"none":n.wrap,s=0===o.length?null:o[0];let l=1===o.length&&null===a&&s instanceof k?o[0]:function(e,t,r){const n=[];let a=[],o=[],i=0,s=0,l=0;for(;s<e.length;){for(;e[s]instanceof w;)e.splice(s,1,...e[s].children);const r=e[s];if(r.attributes&&r.attributes.linebreak&&"newline"===r.attributes.linebreak){o.length>0&&a.push(new L("mrow",o)),a.push(r),o=[];const e=new L("mtd",a);e.style.textAlign="left",n.push(new L("mtr",[e])),a=[],s+=1}else{if(o.push(r),r.type&&"mo"===r.type&&1===r.children.length&&!Object.prototype.hasOwnProperty.call(r.attributes,"movablelimits")){const n=r.children[0].text;if("([{⌊⌈⟨⟮⎰⟦⦃".indexOf(n)>-1)l+=1;else if(")]}⌋⌉⟩⟯⎱⟦⦄".indexOf(n)>-1)l-=1;else if(0===l&&"="===t&&"="===n){if(i+=1,i>1){o.pop();const e=new L("mrow",o);a.push(e),o=[r]}}else if(0===l&&"tex"===t&&"∇"!==n){const t=s<e.length-1?e[s+1]:null;let r=!0;if(!t||"mtext"!==t.type||!t.attributes.linebreak||"nobreak"!==t.attributes.linebreak)for(let t=s+1;t<e.length;t++){const n=e[t];if(!n.type||"mspace"!==n.type||n.attributes.linebreak&&"newline"===n.attributes.linebreak)break;o.push(n),s+=1,n.attributes&&n.attributes.linebreak&&"nobreak"===n.attributes.linebreak&&(r=!1)}if(r){const e=new L("mrow",o);a.push(e),o=[]}}}s+=1}}if(o.length>0){const e=new L("mrow",o);a.push(e)}if(n.length>0){const e=new L("mtd",a);e.style.textAlign="left";const t=new L("mtr",[e]);n.push(t);const o=new L("mtable",n);return r||(o.setAttribute("columnalign","left"),o.setAttribute("rowspacing","0em")),o}return M(a)}(o,i,n.displayMode);if(a&&(l=((e,t,r,n)=>{t=he(t[0].body,r),(t=le(t)).classes.push("tml-tag");const a=be(e);e=new L("mtd",[e]);const o=[ge(),e,ge()];o[n?0:2].classes.push(n?"tml-left":"tml-right"),o[n?0:2].children.push(t);const i=new L("mtr",o,["tml-tageqn"]);a&&i.setAttribute("id",a);const s=new L("mtable",[i]);return s.style.width="100%",s.setAttribute("displaystyle","true"),s})(l,a,r,n.leqno)),n.annotate){const e=new L("annotation",[new O(t)]);e.setAttribute("encoding","application/x-tex"),l=new L("semantics",[l,e])}const c=new L("math",[l]);return n.xml&&c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),l.style.width&&(c.style.width="100%"),n.displayMode&&(c.setAttribute("display","block"),c.style.display="block math",c.classes=["tml-display"]),c}(an(e,n),e,new sn({level:n.displayMode?0:1,maxSize:n.maxSize}),n)}catch(r){return function(e,r,n){if(n.throwOnError||!(e instanceof t))throw e;const a=new _(["temml-error"],[new C(r+"\n\n"+e.toString())]);return a.style.color=n.errorColor,a.style.whiteSpace="pre-line",a}(r,e,n)}};var bn={version:"0.11.02",render:gn,renderToString:function(e,t){return xn(e,t).toMarkup()},renderMathInElement:function(e,t){if(!e)throw new Error("No element provided to render");const r={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);var n;r.fences?r.delimiters="$"===(n=r.fences)||"("===n?pn[n]:"$+"===n||"(+"===n?pn[n.slice(0,1)].concat(mn):"ams"===n?mn:"all"===n?pn["("].concat(pn.$).concat(mn):dn:r.delimiters=r.delimiters||dn,r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},fn(e,r),ln(e)},postProcess:ln,ParseError:t,definePreamble:function(e,t){const r=new p(t);if(r.macros={},!("string"==typeof e||e instanceof String))throw new TypeError("Temml can only parse string typed expression");const n=new nn(e,r,!0);return delete n.gullet.macros.current["\\df@tag"],n.parse()},__parse:function(e,t){const r=new p(t);return an(e,r)},__renderToMathMLTree:xn,__defineSymbol:U,__defineMacro:Ze};e.exports=bn}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}var n={};return(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.Defuddle=void 0;var t=r(628);Object.defineProperty(e,"Defuddle",{enumerable:!0,get:function(){return t.Defuddle}})})(),n})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Defuddle=t():e.Defuddle=t()}("undefined"!=typeof self?self:this,(()=>(()=>{"use strict";var e={608:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataExtractor=void 0;t.MetadataExtractor=class{static extract(e,t){var r,o;let n="",a="";try{a=(null===(r=e.location)||void 0===r?void 0:r.href)||"",a||(a=this.getMetaContent(e,"property","og:url")||this.getMetaContent(e,"property","twitter:url")||this.getSchemaProperty(e,t,"url")||this.getSchemaProperty(e,t,"mainEntityOfPage.url")||this.getSchemaProperty(e,t,"mainEntity.url")||this.getSchemaProperty(e,t,"WebSite.url")||(null===(o=e.querySelector('link[rel="canonical"]'))||void 0===o?void 0:o.getAttribute("href"))||""),a&&(n=new URL(a).hostname.replace(/^www\./,""))}catch(t){const r=e.querySelector("base[href]");if(r)try{a=r.getAttribute("href")||"",n=new URL(a).hostname.replace(/^www\./,"")}catch(e){console.warn("Failed to parse base URL:",e)}}return{title:this.getTitle(e,t),description:this.getDescription(e,t),domain:n,favicon:this.getFavicon(e,a),image:this.getImage(e,t),published:this.getPublished(e,t),author:this.getAuthor(e,t),site:this.getSite(e,t),schemaOrgData:t,wordCount:0,parseTime:0}}static getAuthor(e,t){return this.getMetaContent(e,"name","sailthru.author")||this.getSchemaProperty(e,t,"author.name")||this.getMetaContent(e,"property","author")||this.getMetaContent(e,"name","byl")||this.getMetaContent(e,"name","author")||this.getMetaContent(e,"name","authorList")||this.getMetaContent(e,"name","copyright")||this.getSchemaProperty(e,t,"copyrightHolder.name")||this.getMetaContent(e,"property","og:site_name")||this.getSchemaProperty(e,t,"publisher.name")||this.getSchemaProperty(e,t,"sourceOrganization.name")||this.getSchemaProperty(e,t,"isPartOf.name")||this.getMetaContent(e,"name","twitter:creator")||this.getMetaContent(e,"name","application-name")||""}static getSite(e,t){return this.getSchemaProperty(e,t,"publisher.name")||this.getMetaContent(e,"property","og:site_name")||this.getSchemaProperty(e,t,"WebSite.name")||this.getSchemaProperty(e,t,"sourceOrganization.name")||this.getMetaContent(e,"name","copyright")||this.getSchemaProperty(e,t,"copyrightHolder.name")||this.getSchemaProperty(e,t,"isPartOf.name")||this.getMetaContent(e,"name","application-name")||this.getAuthor(e,t)||""}static getTitle(e,t){var r,o;const n=this.getMetaContent(e,"property","og:title")||this.getMetaContent(e,"name","twitter:title")||this.getSchemaProperty(e,t,"headline")||this.getMetaContent(e,"name","title")||this.getMetaContent(e,"name","sailthru.title")||(null===(o=null===(r=e.querySelector("title"))||void 0===r?void 0:r.textContent)||void 0===o?void 0:o.trim())||"";return this.cleanTitle(n,this.getSite(e,t))}static cleanTitle(e,t){if(!e||!t)return e;const r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=[`\\s*[\\|\\-\u2013\u2014]\\s*${r}\\s*$`,`^\\s*${r}\\s*[\\|\\-\u2013\u2014]\\s*`];for(const t of o){const r=new RegExp(t,"i");if(r.test(e)){e=e.replace(r,"");break}}return e.trim()}static getDescription(e,t){return this.getMetaContent(e,"name","description")||this.getMetaContent(e,"property","description")||this.getMetaContent(e,"property","og:description")||this.getSchemaProperty(e,t,"description")||this.getMetaContent(e,"name","twitter:description")||this.getMetaContent(e,"name","sailthru.description")||""}static getImage(e,t){return this.getMetaContent(e,"property","og:image")||this.getMetaContent(e,"name","twitter:image")||this.getSchemaProperty(e,t,"image.url")||this.getMetaContent(e,"name","sailthru.image.full")||""}static getFavicon(e,t){var r,o;const n=this.getMetaContent(e,"property","og:image:favicon");if(n)return n;const a=null===(r=e.querySelector("link[rel='icon']"))||void 0===r?void 0:r.getAttribute("href");if(a)return a;const i=null===(o=e.querySelector("link[rel='shortcut icon']"))||void 0===o?void 0:o.getAttribute("href");if(i)return i;if(t)try{return new URL("/favicon.ico",t).href}catch(e){console.warn("Failed to construct favicon URL:",e)}return""}static getPublished(e,t){return this.getSchemaProperty(e,t,"datePublished")||this.getMetaContent(e,"name","publishDate")||this.getMetaContent(e,"property","article:published_time")||this.getTimeElement(e)||this.getMetaContent(e,"name","sailthru.date")||""}static getMetaContent(e,t,r){var o,n;const a=`meta[${t}]`,i=Array.from(e.querySelectorAll(a)).find((e=>{var o;return(null===(o=e.getAttribute(t))||void 0===o?void 0:o.toLowerCase())===r.toLowerCase()})),s=i&&null!==(n=null===(o=i.getAttribute("content"))||void 0===o?void 0:o.trim())&&void 0!==n?n:"";return this.decodeHTMLEntities(s,e)}static getTimeElement(e){var t,r,o,n;const a=Array.from(e.querySelectorAll("time"))[0],i=a&&null!==(n=null!==(r=null===(t=a.getAttribute("datetime"))||void 0===t?void 0:t.trim())&&void 0!==r?r:null===(o=a.textContent)||void 0===o?void 0:o.trim())&&void 0!==n?n:"";return this.decodeHTMLEntities(i,e)}static decodeHTMLEntities(e,t){const r=t.createElement("textarea");return r.innerHTML=e,r.value}static getSchemaProperty(e,t,r,o=""){if(!t)return o;const n=(e,t,r,o=!0)=>{if("string"==typeof e)return 0===t.length?[e]:[];if(!e||"object"!=typeof e)return[];if(Array.isArray(e)){const a=t[0];if(/^\[\d+\]$/.test(a)){const i=parseInt(a.slice(1,-1));return e[i]?n(e[i],t.slice(1),r,o):[]}return 0===t.length&&e.every((e=>"string"==typeof e||"number"==typeof e))?e.map(String):e.flatMap((e=>n(e,t,r,o)))}const[a,...i]=t;if(!a)return"string"==typeof e?[e]:"object"==typeof e&&e.name?[e.name]:[];if(e.hasOwnProperty(a))return n(e[a],i,r?`${r}.${a}`:a,!0);if(!o){const o=[];for(const a in e)if("object"==typeof e[a]){const i=n(e[a],t,r?`${r}.${a}`:a,!1);o.push(...i)}if(o.length>0)return o}return[]};try{let a=n(t,r.split("."),"",!0);0===a.length&&(a=n(t,r.split("."),"",!1));const i=a.length>0?a.filter(Boolean).join(", "):o;return this.decodeHTMLEntities(i,e)}catch(e){return console.error(`Error in getSchemaProperty for ${r}:`,e),o}}static extractSchemaOrgData(e){const t=e.querySelectorAll('script[type="application/ld+json"]'),r=[];return t.forEach((e=>{let t=e.textContent||"";try{t=t.replace(/\/\*[\s\S]*?\*\/|^\s*\/\/.*$/gm,"").replace(/^\s*<!\[CDATA\[([\s\S]*?)\]\]>\s*$/,"$1").replace(/^\s*(\*\/|\/\*)\s*|\s*(\*\/|\/\*)\s*$/g,"").trim();const e=JSON.parse(t);e["@graph"]&&Array.isArray(e["@graph"])?r.push(...e["@graph"]):r.push(e)}catch(e){console.error("Error parsing schema.org data:",e),console.error("Problematic JSON content:",t)}})),r}}},628:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Defuddle=void 0;const o=r(608),n=r(640),a=[...r(826).mathStandardizationRules,{selector:"pre",element:"pre",transform:e=>{if(!(e instanceof HTMLElement))return e;const t=e=>{const t=e.getAttribute("data-lang")||e.getAttribute("data-language");if(t)return t.toLowerCase();const r=[/^language-(\w+)$/,/^lang-(\w+)$/,/^(\w+)-code$/,/^code-(\w+)$/,/^syntax-(\w+)$/,/^code-snippet__(\w+)$/,/^highlight-(\w+)$/,/^(\w+)-snippet$/];if(e.className&&"string"==typeof e.className){for(const t of r){const r=e.className.toLowerCase().match(t);if(r)return r[1].toLowerCase()}if(n.SUPPORTED_LANGUAGES.has(e.className.toLowerCase()))return e.className.toLowerCase()}const o=Array.from(e.classList);for(const e of o)for(const t of r){const r=e.match(t);if(r)return r[1].toLowerCase()}for(const e of o)if(n.SUPPORTED_LANGUAGES.has(e.toLowerCase()))return e.toLowerCase();return""};let r="",o=e;for(;o&&!r;)r=t(o),!r&&o.querySelector("code")&&(r=t(o.querySelector("code"))),o=o.parentElement;const a=e=>{if(e.nodeType===Node.TEXT_NODE)return e.textContent||"";let t="";if(e instanceof HTMLElement){if("BR"===e.tagName)return"\n";if(e.matches('div[class*="line"], span[class*="line"], .ec-line, [data-line-number], [data-line]')){const t=e.querySelector('.code, .content, [class*="code-"], [class*="content-"]');if(t)return(t.textContent||"")+"\n";const r=e.querySelector('.line-number, .gutter, [class*="line-number"], [class*="gutter"]');if(r){return Array.from(e.childNodes).filter((e=>!r.contains(e))).map((e=>a(e))).join("")+"\n"}return e.textContent+"\n"}e.childNodes.forEach((e=>{t+=a(e)}))}return t};let i=a(e);i=i.replace(/^\n+/,"").replace(/\n+$/,"").replace(/\n{3,}/g,"\n\n");const s=document.createElement("pre");Array.from(e.attributes).forEach((e=>{n.ALLOWED_ATTRIBUTES.has(e.name)&&s.setAttribute(e.name,e.value)}));const l=document.createElement("code");return r&&(l.setAttribute("data-lang",r),l.setAttribute("class",`language-${r}`)),l.textContent=i,s.appendChild(l),s}},{selector:"h1, h2, h3, h4, h5, h6",element:"keep",transform:e=>{var t;const r=document.createElement(e.tagName);Array.from(e.attributes).forEach((e=>{n.ALLOWED_ATTRIBUTES.has(e.name)&&r.setAttribute(e.name,e.value)}));const o=e.cloneNode(!0);Array.from(o.querySelectorAll("*")).filter((e=>{if(e instanceof HTMLAnchorElement){const t=e.getAttribute("href");return(null==t?void 0:t.includes("#"))||(null==t?void 0:t.startsWith("#"))}return!!e.classList.contains("anchor")||(e instanceof HTMLButtonElement||!(!(e instanceof HTMLSpanElement||e instanceof HTMLDivElement)||!e.querySelector('a[href^="#"]')))})).forEach((e=>e.remove()));const a=(null===(t=o.textContent)||void 0===t?void 0:t.trim())||"";return r.textContent=a,r}},{selector:'div[data-testid^="paragraph"], div[role="paragraph"]',element:"p",transform:e=>{const t=document.createElement("p");return t.innerHTML=e.innerHTML,Array.from(e.attributes).forEach((e=>{n.ALLOWED_ATTRIBUTES.has(e.name)&&t.setAttribute(e.name,e.value)})),t}},{selector:'div[role="list"]',element:"ul",transform:e=>{var t;const r=e.querySelector('div[role="listitem"] .label'),o=((null===(t=null==r?void 0:r.textContent)||void 0===t?void 0:t.trim())||"").match(/^\d+\)/),n=document.createElement(o?"ol":"ul");return e.querySelectorAll('div[role="listitem"]').forEach((e=>{const t=document.createElement("li"),r=e.querySelector(".content");if(r){r.querySelectorAll('div[role="paragraph"]').forEach((e=>{const t=document.createElement("p");t.innerHTML=e.innerHTML,e.replaceWith(t)}));r.querySelectorAll('div[role="list"]').forEach((e=>{var t;const r=e.querySelector('div[role="listitem"] .label'),o=((null===(t=null==r?void 0:r.textContent)||void 0===t?void 0:t.trim())||"").match(/^\d+\)/),n=document.createElement(o?"ol":"ul");e.querySelectorAll('div[role="listitem"]').forEach((e=>{const t=document.createElement("li"),r=e.querySelector(".content");if(r){r.querySelectorAll('div[role="paragraph"]').forEach((e=>{const t=document.createElement("p");t.innerHTML=e.innerHTML,e.replaceWith(t)})),t.innerHTML=r.innerHTML}n.appendChild(t)})),e.replaceWith(n)})),t.innerHTML=r.innerHTML}n.appendChild(t)})),n}},{selector:'div[role="listitem"]',element:"li",transform:e=>{const t=e.querySelector(".content");if(!t)return e;return t.querySelectorAll('div[role="paragraph"]').forEach((e=>{const t=document.createElement("p");t.innerHTML=e.innerHTML,e.replaceWith(t)})),t}},{selector:'.wp-block-syntaxhighlighter-code, .syntaxhighlighter, .highlight, .highlight-source, .wp-block-code, pre[class*="language-"], pre[class*="brush:"]',element:"pre",transform:e=>{if(!(e instanceof HTMLElement))return e;const t=document.createElement("pre");let r="";const o=e.querySelector(".syntaxhighlighter");if(o){const e=Array.from(o.classList).find((e=>!["syntaxhighlighter","nogutter"].includes(e)));e&&n.SUPPORTED_LANGUAGES.has(e.toLowerCase())&&(r=e.toLowerCase())}if(!r){const t=Array.from(e.classList),o=[/(?:^|\s)(?:language|lang|brush|syntax)-(\w+)(?:\s|$)/i,/(?:^|\s)(\w+)(?:\s|$)/i];for(const e of t){for(const t of o){const o=e.match(t);if(o&&o[1]&&n.SUPPORTED_LANGUAGES.has(o[1].toLowerCase())){r=o[1].toLowerCase();break}}if(r)break}}let a="";const i=e.querySelector(".syntaxhighlighter table .code .container");if(i){a=Array.from(i.children).map((e=>{const t=Array.from(e.querySelectorAll("code")).map((e=>{let t=e.textContent||"";return e.classList.contains("spaces")&&(t=" ".repeat(t.length)),t})).join("");return t||e.textContent||""})).join("\n")}else{const t=e.querySelectorAll(".code .line");a=t.length>0?Array.from(t).map((e=>{const t=Array.from(e.querySelectorAll("code")).map((e=>e.textContent||"")).join("");return t||e.textContent||""})).join("\n"):e.textContent||""}a=a.replace(/^\s+|\s+$/g,"").replace(/\t/g," ").replace(/\n{3,}/g,"\n\n").replace(/\u00a0/g," ");const s=document.createElement("code");return r&&(s.setAttribute("data-lang",r),s.setAttribute("class",`language-${r}`)),s.textContent=a,t.appendChild(s),t}}];t.Defuddle=class{constructor(e,t={}){this.doc=e,this.options=t,this.debug=t.debug||!1}parse(){const e=performance.now(),t=o.MetadataExtractor.extractSchemaOrgData(this.doc),r=o.MetadataExtractor.extract(this.doc,t);try{const t=this._evaluateMediaQueries(this.doc),o=this.findSmallImages(this.doc),n=this.doc.cloneNode(!0);this.applyMobileStyles(n,t);const a=this.findMainContent(n);if(!a){const t=performance.now();return Object.assign(Object.assign({content:this.doc.body.innerHTML},r),{wordCount:this.countWords(this.doc.body.innerHTML),parseTime:Math.round(t-e)})}this.removeSmallImages(n,o),this.removeHiddenElements(n),this.removeClutter(n),this.cleanContent(a,r);const i=a?a.outerHTML:this.doc.body.innerHTML,s=performance.now();return Object.assign(Object.assign({content:i},r),{wordCount:this.countWords(i),parseTime:Math.round(s-e)})}catch(t){console.error("Defuddle","Error processing document:",t);const o=performance.now();return Object.assign(Object.assign({content:this.doc.body.innerHTML},r),{wordCount:this.countWords(this.doc.body.innerHTML),parseTime:Math.round(o-e)})}}countWords(e){const t=document.createElement("div");t.innerHTML=e;return(t.textContent||"").trim().replace(/\s+/g," ").split(" ").filter((e=>e.length>0)).length}_log(...e){this.debug&&console.log("Defuddle:",...e)}_evaluateMediaQueries(e){const t=[],r=/max-width[^:]*:\s*(\d+)/;try{const o=Array.from(e.styleSheets).filter((e=>{try{return e.cssRules,!0}catch(e){if(e instanceof DOMException&&"SecurityError"===e.name)return!1;throw e}}));o.flatMap((e=>{try{return Array.from(e.cssRules).filter((e=>e instanceof CSSMediaRule&&e.conditionText.includes("max-width")))}catch(e){return this.debug&&console.warn("Defuddle: Failed to process stylesheet:",e),[]}})).forEach((e=>{const o=e.conditionText.match(r);if(o){const r=parseInt(o[1]);if(n.MOBILE_WIDTH<=r){Array.from(e.cssRules).filter((e=>e instanceof CSSStyleRule)).forEach((e=>{try{t.push({selector:e.selectorText,styles:e.style.cssText})}catch(e){this.debug&&console.warn("Defuddle: Failed to process CSS rule:",e)}}))}}}))}catch(e){console.error("Defuddle: Error evaluating media queries:",e)}return t}applyMobileStyles(e,t){t.forEach((({selector:t,styles:r})=>{try{e.querySelectorAll(t).forEach((e=>{e.setAttribute("style",(e.getAttribute("style")||"")+r)}))}catch(e){console.error("Defuddle","Error applying styles for selector:",t,e)}}))}removeHiddenElements(e){let t=0;const r=new Set,o=e.querySelectorAll(n.HIDDEN_ELEMENT_SELECTORS);o.forEach((e=>r.add(e))),t+=o.length;const a=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>r.has(e)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),i=[];let s;for(;s=a.nextNode();)i.push(s);for(let e=0;e<i.length;e+=100){const o=i.slice(e,e+100),n=o.map((e=>window.getComputedStyle(e)));o.forEach(((e,o)=>{const a=n[o];"none"!==a.display&&"hidden"!==a.visibility&&"0"!==a.opacity||(r.add(e),t++)}))}r.forEach((e=>e.remove())),this._log("Removed hidden elements:",t)}removeClutter(e){const t=performance.now();let r=0,o=0;const a=new Set;e.querySelectorAll(n.EXACT_SELECTORS.join(",")).forEach((e=>{(null==e?void 0:e.parentNode)&&(a.add(e),r++)}));const i=n.PARTIAL_SELECTORS.join("|"),s=new RegExp(i,"i");e.querySelectorAll("[class],[id],[data-testid],[data-test-id],[data-qa],[data-cy]").forEach((e=>{if(a.has(e))return;const t=[e.className&&"string"==typeof e.className?e.className:"",e.id||"",e.getAttribute("data-testid")||"",e.getAttribute("data-test-id")||"",e.getAttribute("data-qa")||"",e.getAttribute("data-cy")||""].join(" ").toLowerCase();t.trim()&&s.test(t)&&(a.add(e),o++)})),a.forEach((e=>e.remove()));const l=performance.now();this._log("Removed clutter elements:",{exactSelectors:r,partialSelectors:o,total:a.size,processingTime:`${(l-t).toFixed(2)}ms`})}flattenDivs(e){let t=0;const r=performance.now();let o=!0;const a=e=>{const t=e.tagName.toLowerCase();if(n.PRESERVE_ELEMENTS.has(t))return!0;const r=e.getAttribute("role");if(r&&["article","main","navigation","banner","contentinfo"].includes(r))return!0;if(e.className.toLowerCase().match(/(?:article|main|content|footnote|reference|bibliography)/))return!0;if("div"===t){if(Array.from(e.children).some((e=>n.PRESERVE_ELEMENTS.has(e.tagName.toLowerCase())||"article"===e.getAttribute("role")||e.className.toLowerCase().includes("article"))))return!0}return!1},i=e=>{var t;if(!(null===(t=e.textContent)||void 0===t?void 0:t.trim()))return!0;const r=Array.from(e.children);if(0===r.length)return!0;if(r.every((e=>{const t=e.tagName.toLowerCase();return"div"===t||"p"===t||"h1"===t||"h2"===t||"h3"===t||"h4"===t||"h5"===t||"h6"===t||"ul"===t||"ol"===t||"pre"===t||"blockquote"===t||"figure"===t})))return!0;const o=e.className.toLowerCase();if(/(?:wrapper|container|layout|row|col|grid|flex|outer|inner|content-area)/i.test(o))return!0;const a=Array.from(e.childNodes).filter((e=>{var t;return e.nodeType===Node.TEXT_NODE&&(null===(t=e.textContent)||void 0===t?void 0:t.trim())}));if(0===a.length)return!0;return!(!(r.length>0)||r.some((e=>{const t=e.tagName.toLowerCase();return n.INLINE_ELEMENTS.has(t)})))},s=r=>{var o,s;if(!r.isConnected||a(r))return!1;if(!r.hasChildNodes()||!(null===(o=r.textContent)||void 0===o?void 0:o.trim()))return r.remove(),t++,!0;if(r.parentElement===e){const e=Array.from(r.children);if(e.length>0&&!e.some((e=>{const t=e.tagName.toLowerCase();return n.INLINE_ELEMENTS.has(t)}))){const e=document.createDocumentFragment();for(;r.firstChild;)e.appendChild(r.firstChild);return r.replaceWith(e),t++,!0}}if(i(r)){if(!Array.from(r.children).some((e=>{const t=e.tagName.toLowerCase();return n.INLINE_ELEMENTS.has(t)}))){const e=document.createDocumentFragment();for(;r.firstChild;)e.appendChild(r.firstChild);return r.replaceWith(e),t++,!0}const e=document.createDocumentFragment();for(;r.firstChild;)e.appendChild(r.firstChild);return r.replaceWith(e),t++,!0}if(!r.children.length&&(null===(s=r.textContent)||void 0===s?void 0:s.trim())){const e=document.createElement("p");return e.textContent=r.textContent,r.replaceWith(e),t++,!0}if(1===r.children.length){const e=r.firstElementChild,o=e.tagName.toLowerCase();if(!n.INLINE_ELEMENTS.has(o)&&!a(e))return r.replaceWith(e),t++,!0}let l=0,c=r.parentElement;for(;c;)"div"===c.tagName.toLowerCase()&&l++,c=c.parentElement;if(l>0){const e=document.createDocumentFragment();for(;r.firstChild;)e.appendChild(r.firstChild);return r.replaceWith(e),t++,!0}return!1},l=()=>{const t=Array.from(e.children).filter((e=>"div"===e.tagName.toLowerCase()));let r=!1;return t.forEach((e=>{s(e)&&(r=!0)})),r},c=()=>{const t=Array.from(e.getElementsByTagName("div")).sort(((e,t)=>{const r=e=>{let t=0,r=e.parentElement;for(;r;)"div"===r.tagName.toLowerCase()&&t++,r=r.parentElement;return t};return r(t)-r(e)}));let r=!1;return t.forEach((e=>{s(e)&&(r=!0)})),r},d=()=>{const r=Array.from(e.getElementsByTagName("div"));let o=!1;return r.forEach((e=>{if(Array.from(e.children).every((e=>"p"===e.tagName.toLowerCase()))||!a(e)&&i(e)){const r=document.createDocumentFragment();for(;e.firstChild;)r.appendChild(e.firstChild);e.replaceWith(r),t++,o=!0}})),o};do{o=!1,l()&&(o=!0),c()&&(o=!0),d()&&(o=!0)}while(o);const m=performance.now();this._log("Flattened divs:",{count:t,processingTime:`${(m-r).toFixed(2)}ms`})}cleanContent(e,t){this.removeHtmlComments(e),this.handleHeadings(e,t.title),this.standardizeFootnotes(e),this.handleLazyImages(e),this.standardizeElements(e),this.debug?(this.stripUnwantedAttributes(e),this.removeEmptyElements(e),this.removeTrailingHeadings(e),this._log("Debug mode: Skipping div flattening to preserve structure")):(this.flattenDivs(e),this.stripUnwantedAttributes(e),this.removeEmptyElements(e),this.removeTrailingHeadings(e),this.flattenDivs(e),this.removeEmptyLines(e))}removeTrailingHeadings(e){let t=0;const r=t=>{let o="",n=t.nextSibling;for(;n;)(n.nodeType===Node.TEXT_NODE||n.nodeType===Node.ELEMENT_NODE)&&(o+=n.textContent||""),n=n.nextSibling;if(o.trim())return!0;const a=t.parentElement;return!(!a||a===e)&&r(a)};Array.from(e.querySelectorAll("h1, h2, h3, h4, h5, h6")).reverse().forEach((e=>{r(e)||(e.remove(),t++)})),t>0&&this._log("Removed trailing headings:",t)}handleHeadings(e,t){const r=e=>e.replace(/\u00A0/g," ").replace(/\s+/g," ").trim().toLowerCase(),o=e.getElementsByTagName("h1");Array.from(o).forEach((e=>{var t;const r=document.createElement("h2");r.innerHTML=e.innerHTML,Array.from(e.attributes).forEach((e=>{n.ALLOWED_ATTRIBUTES.has(e.name)&&r.setAttribute(e.name,e.value)})),null===(t=e.parentNode)||void 0===t||t.replaceChild(r,e)}));const a=e.getElementsByTagName("h2");if(a.length>0){const e=a[0],o=r(e.textContent||""),n=r(t);n&&n===o&&e.remove()}}removeHtmlComments(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT,null);let o;for(;o=r.nextNode();)t.push(o);t.forEach((e=>{e.remove()})),this._log("Removed HTML comments:",t.length)}stripUnwantedAttributes(e){let t=0;const r=e=>{if(e instanceof SVGElement)return;Array.from(e.attributes).forEach((r=>{const o=r.name.toLowerCase();this.debug?n.ALLOWED_ATTRIBUTES.has(o)||n.ALLOWED_ATTRIBUTES_DEBUG.has(o)||o.startsWith("data-")||(e.removeAttribute(r.name),t++):n.ALLOWED_ATTRIBUTES.has(o)||(e.removeAttribute(r.name),t++)}))};r(e),e.querySelectorAll("*").forEach(r),this._log("Stripped attributes:",t)}removeEmptyElements(e){let t=0,r=0,o=!0;for(;o;){r++,o=!1;const a=Array.from(e.getElementsByTagName("*")).filter((e=>{if(n.ALLOWED_EMPTY_ELEMENTS.has(e.tagName.toLowerCase()))return!1;const t=e.textContent||"",r=0===t.trim().length,o=t.includes("\xa0"),a=!e.hasChildNodes()||Array.from(e.childNodes).every((e=>{if(e.nodeType===Node.TEXT_NODE){const t=e.textContent||"";return 0===t.trim().length&&!t.includes("\xa0")}return!1}));if("div"===e.tagName.toLowerCase()){const t=Array.from(e.children);if(t.length>0&&t.every((e=>{var t;if("span"!==e.tagName.toLowerCase())return!1;const r=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"";return","===r||""===r||" "===r})))return!0}return r&&!o&&a}));a.length>0&&(a.forEach((e=>{e.remove(),t++})),o=!0)}this._log("Removed empty elements:",{count:t,iterations:r})}removeEmptyLines(e){let t=0;const r=performance.now(),o=e=>{var r;if(e instanceof Element){const t=e.tagName.toLowerCase();if("pre"===t||"code"===t)return}if(Array.from(e.childNodes).forEach(o),e.nodeType===Node.TEXT_NODE){const o=e.textContent||"";if(!o||o.match(/^[\u200C\u200B\u200D\u200E\u200F\uFEFF\xA0\s]*$/))null===(r=e.parentNode)||void 0===r||r.removeChild(e),t++;else{const r=o.replace(/\n{3,}/g,"\n\n").replace(/^[\n\r\t]+/,"").replace(/[\n\r\t]+$/,"").replace(/[ \t]*\n[ \t]*/g,"\n").replace(/[ \t]{3,}/g," ").replace(/^[ ]+$/," ").replace(/\s+([,.!?:;])/g,"$1").replace(/[\u200C\u200B\u200D\u200E\u200F\uFEFF]+/g,"").replace(/(?:\xA0){2,}/g,"\xa0");r!==o&&(e.textContent=r,t+=o.length-r.length)}}},n=e=>{if(!(e instanceof Element))return;const r=e.tagName.toLowerCase();if("pre"===r||"code"===r)return;Array.from(e.children).forEach(n),e.normalize();const o="block"===getComputedStyle(e).display,a=o?/^[\n\r\t \u200C\u200B\u200D\u200E\u200F\uFEFF\xA0]*$/:/^[\n\r\t\u200C\u200B\u200D\u200E\u200F\uFEFF]*$/,i=o?/^[\n\r\t \u200C\u200B\u200D\u200E\u200F\uFEFF\xA0]*$/:/^[\n\r\t\u200C\u200B\u200D\u200E\u200F\uFEFF]*$/;for(;e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(e.firstChild.textContent||"").match(a);)e.removeChild(e.firstChild),t++;for(;e.lastChild&&e.lastChild.nodeType===Node.TEXT_NODE&&(e.lastChild.textContent||"").match(i);)e.removeChild(e.lastChild),t++;if(!o){const t=e.previousSibling,r=e.nextSibling;if(t&&t.nodeType===Node.TEXT_NODE){const r=t.textContent||"",o=e.textContent||"";r.endsWith(" ")||r.endsWith("\n")||r.endsWith("\xa0")||o.match(/^[,.!?:;]/)||(t.textContent=r+" ")}if(r&&r.nodeType===Node.TEXT_NODE){const e=r.textContent||"";e.startsWith(" ")||e.startsWith("\n")||e.startsWith("\xa0")||e.match(/^[,.!?:;]/)||(r.textContent=" "+e)}}};o(e),n(e);const a=performance.now();this._log("Removed empty lines:",{charactersRemoved:t,processingTime:`${(a-r).toFixed(2)}ms`})}createFootnoteItem(e,t,r){const o=document.createElement("li");if(o.className="footnote",o.id=`fn:${e}`,"string"==typeof t){const e=document.createElement("p");e.innerHTML=t,o.appendChild(e)}else{const e=Array.from(t.querySelectorAll("p"));if(0===e.length){const e=document.createElement("p");e.innerHTML=t.innerHTML,o.appendChild(e)}else e.forEach((e=>{const t=document.createElement("p");t.innerHTML=e.innerHTML,o.appendChild(t)}))}const n=o.querySelector("p:last-of-type")||o;return r.forEach(((e,t)=>{const o=document.createElement("a");o.href=`#${e}`,o.title="return to article",o.className="footnote-backref",o.innerHTML="\u21a9",t<r.length-1&&(o.innerHTML+=" "),n.appendChild(o)})),o}collectFootnotes(e){const t={};let r=1;const o=new Set;return e.querySelectorAll(n.FOOTNOTE_LIST_SELECTORS).forEach((e=>{if(e.matches('div.footnote[data-component-name="FootnoteToDOM"]')){const n=e.querySelector("a.footnote-number"),a=e.querySelector(".footnote-content");if(n&&a){const e=n.id.replace("footnote-","").toLowerCase();e&&!o.has(e)&&(t[r]={content:a,originalId:e,refs:[]},o.add(e),r++)}return}e.querySelectorAll('li, div[role="listitem"]').forEach((e=>{var n,a,i,s;let l="",c=null;const d=e.querySelector(".citations");if(null===(n=null==d?void 0:d.id)||void 0===n?void 0:n.toLowerCase().startsWith("r")){l=d.id.toLowerCase();const e=d.querySelector(".citation-content");e&&(c=e)}else{if(e.id.toLowerCase().startsWith("bib.bib"))l=e.id.replace("bib.bib","").toLowerCase();else if(e.id.toLowerCase().startsWith("fn:"))l=e.id.replace("fn:","").toLowerCase();else if(e.id.toLowerCase().startsWith("fn"))l=e.id.replace("fn","").toLowerCase();else if(e.hasAttribute("data-counter"))l=(null===(i=null===(a=e.getAttribute("data-counter"))||void 0===a?void 0:a.replace(/\.$/,""))||void 0===i?void 0:i.toLowerCase())||"";else{const t=null===(s=e.id.split("/").pop())||void 0===s?void 0:s.match(/cite_note-(.+)/);l=t?t[1].toLowerCase():e.id.toLowerCase()}c=e}l&&!o.has(l)&&(t[r]={content:c||e,originalId:l,refs:[]},o.add(l),r++)}))})),t}findOuterFootnoteContainer(e){let t=e,r=e.parentElement;for(;r&&("span"===r.tagName.toLowerCase()||"sup"===r.tagName.toLowerCase());)t=r,r=r.parentElement;return t}createFootnoteReference(e,t){const r=document.createElement("sup");r.id=t;const o=document.createElement("a");return o.href=`#fn:${e}`,o.textContent=e,r.appendChild(o),r}standardizeFootnotes(e){const t=this.collectFootnotes(e),r=e.querySelectorAll(n.FOOTNOTE_INLINE_REFERENCES),o=new Map;r.forEach((e=>{var r,n,a,i;if(!(e instanceof HTMLElement))return;let s="",l="";if(e.matches('a[id^="ref-link"]'))s=(null===(r=e.textContent)||void 0===r?void 0:r.trim())||"";else if(e.matches('a[role="doc-biblioref"]')){const t=e.getAttribute("data-xml-rid");if(t)s=t;else{const t=e.getAttribute("href");(null==t?void 0:t.startsWith("#core-R"))&&(s=t.replace("#core-",""))}}else if(e.matches("a.footnote-anchor, span.footnote-hovercard-target a")){const t=(null===(n=e.id)||void 0===n?void 0:n.replace("footnote-anchor-",""))||"";t&&(s=t.toLowerCase())}else if(e.matches("cite.ltx_cite")){const t=e.querySelector("a");if(t){const e=t.getAttribute("href");if(e){const t=null===(a=e.split("/").pop())||void 0===a?void 0:a.match(/bib\.bib(\d+)/);t&&(s=t[1].toLowerCase())}}}else if(e.matches("sup.reference")){const t=e.querySelectorAll("a");Array.from(t).forEach((e=>{var t;const r=e.getAttribute("href");if(r){const e=null===(t=r.split("/").pop())||void 0===t?void 0:t.match(/(?:cite_note|cite_ref)-(.+)/);e&&(s=e[1].toLowerCase())}}))}else if(e.matches('sup[id^="fnref:"]'))s=e.id.replace("fnref:","").toLowerCase();else if(e.matches('sup[id^="fnr"]'))s=e.id.replace("fnr","").toLowerCase();else if(e.matches("span.footnote-reference"))s=e.getAttribute("data-footnote-id")||"";else if(e.matches("span.footnote-link"))s=e.getAttribute("data-footnote-id")||"",l=e.getAttribute("data-footnote-content")||"";else if(e.matches("a.citation"))s=(null===(i=e.textContent)||void 0===i?void 0:i.trim())||"",l=e.getAttribute("href")||"";else if(e.matches('a[id^="fnref"]'))s=e.id.replace("fnref","").toLowerCase();else{const t=e.getAttribute("href");if(t){const e=t.replace(/^[#]/,"");s=e.toLowerCase()}}if(s){const r=Object.entries(t).find((([e,t])=>t.originalId===s.toLowerCase()));if(r){const[t,n]=r,a=n.refs.length>0?`fnref:${t}-${n.refs.length+1}`:`fnref:${t}`;n.refs.push(a);const i=this.findOuterFootnoteContainer(e);if("sup"===i.tagName.toLowerCase()){o.has(i)||o.set(i,[]);o.get(i).push(this.createFootnoteReference(t,a))}else i.replaceWith(this.createFootnoteReference(t,a))}}})),o.forEach(((e,t)=>{if(e.length>0){const r=document.createDocumentFragment();e.forEach(((e,t)=>{const o=e.querySelector("a");if(o){const t=document.createElement("sup");t.id=e.id,t.appendChild(o.cloneNode(!0)),r.appendChild(t)}})),t.replaceWith(r)}}));const a=document.createElement("footnotes");a.className="footnotes";const i=document.createElement("ol");Object.entries(t).forEach((([e,t])=>{const r=this.createFootnoteItem(parseInt(e),t.content,t.refs);i.appendChild(r)}));e.querySelectorAll(n.FOOTNOTE_LIST_SELECTORS).forEach((e=>e.remove())),i.children.length>0&&(a.appendChild(i),e.appendChild(a))}handleLazyImages(e){let t=0;e.querySelectorAll("img[data-src], img[data-srcset]").forEach((e=>{if(!(e instanceof HTMLImageElement))return;const r=e.getAttribute("data-src");r&&!e.src&&(e.src=r,t++);const o=e.getAttribute("data-srcset");o&&!e.srcset&&(e.srcset=o,t++),e.classList.remove("lazy","lazyload"),e.removeAttribute("data-ll-status"),e.removeAttribute("data-src"),e.removeAttribute("data-srcset")})),this._log("Processed lazy images:",t)}standardizeElements(e){let t=0;a.forEach((r=>{e.querySelectorAll(r.selector).forEach((e=>{if(r.transform){const o=r.transform(e);e.replaceWith(o),t++}}))}));e.querySelectorAll("lite-youtube").forEach((e=>{const r=e.getAttribute("videoid");if(!r)return;const o=document.createElement("iframe");o.width="560",o.height="315",o.src=`https://www.youtube.com/embed/${r}`,o.title=e.getAttribute("videotitle")||"YouTube video player",o.frameBorder="0",o.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",o.setAttribute("allowfullscreen",""),e.replaceWith(o),t++})),this._log("Converted embedded elements:",t)}findSmallImages(e){const t=new Set,r=/scale\(([\d.]+)\)/,o=performance.now();let n=0;const a=[...Array.from(e.getElementsByTagName("img")),...Array.from(e.getElementsByTagName("svg"))].filter((e=>{if(e instanceof HTMLImageElement){return!(e.classList.contains("lazy")||e.classList.contains("lazyload")||e.classList.contains("latex")||e.hasAttribute("decoding")||e.hasAttribute("data-src")||e.hasAttribute("data-srcset"))}return!0}));if(0===a.length)return t;const i=a.map((e=>({element:e,naturalWidth:e instanceof HTMLImageElement?e.naturalWidth:0,naturalHeight:e instanceof HTMLImageElement?e.naturalHeight:0,attrWidth:parseInt(e.getAttribute("width")||"0"),attrHeight:parseInt(e.getAttribute("height")||"0")})));for(let e=0;e<i.length;e+=50){const o=i.slice(e,e+50);try{const e=o.map((({element:e})=>window.getComputedStyle(e))),a=o.map((({element:e})=>e.getBoundingClientRect()));o.forEach(((o,i)=>{var s;try{const l=e[i],c=a[i],d=l.transform,m=d?parseFloat((null===(s=d.match(r))||void 0===s?void 0:s[1])||"1"):1,u=[o.naturalWidth,o.attrWidth,parseInt(l.width)||0,c.width*m].filter((e=>"number"==typeof e&&e>0)),h=[o.naturalHeight,o.attrHeight,parseInt(l.height)||0,c.height*m].filter((e=>"number"==typeof e&&e>0));if(u.length>0&&h.length>0){const e=Math.min(...u),r=Math.min(...h);if(e<33||r<33){const e=this.getElementIdentifier(o.element);e&&(t.add(e),n++)}}}catch(e){this.debug&&console.warn("Defuddle: Failed to process element dimensions:",e)}}))}catch(e){this.debug&&console.warn("Defuddle: Failed to process batch:",e)}}const s=performance.now();return this._log("Found small elements:",{count:n,totalElements:a.length,processingTime:`${(s-o).toFixed(2)}ms`}),t}removeSmallImages(e,t){let r=0;["img","svg"].forEach((o=>{const n=e.getElementsByTagName(o);Array.from(n).forEach((e=>{const o=this.getElementIdentifier(e);o&&t.has(o)&&(e.remove(),r++)}))})),this._log("Removed small elements:",r)}getElementIdentifier(e){if(e instanceof HTMLImageElement){const t=e.getAttribute("data-src");if(t)return`src:${t}`;const r=e.src||"",o=e.srcset||"",n=e.getAttribute("data-srcset");if(r)return`src:${r}`;if(o)return`srcset:${o}`;if(n)return`srcset:${n}`}const t=e.id||"",r=e.className||"",o=e instanceof SVGElement&&e.getAttribute("viewBox")||"";return t?`id:${t}`:o?`viewBox:${o}`:r?`class:${r}`:null}findMainContent(e){const t=[];return n.ENTRY_POINT_ELEMENTS.forEach(((r,o)=>{e.querySelectorAll(r).forEach((e=>{let r=10*(n.ENTRY_POINT_ELEMENTS.length-o);r+=this.scoreElement(e),t.push({element:e,score:r})}))})),0===t.length?this.findContentByScoring(e):(t.sort(((e,t)=>t.score-e.score)),this.debug&&this._log("Content candidates:",t.map((e=>({element:e.element.tagName,selector:this.getElementSelector(e.element),score:e.score})))),t[0].element)}findContentByScoring(e){const t=this.scoreElements(e);return t.length>0?t[0].element:null}getElementSelector(e){const t=[];let r=e;for(;r&&r!==this.doc.documentElement;){let e=r.tagName.toLowerCase();r.id?e+="#"+r.id:r.className&&"string"==typeof r.className&&(e+="."+r.className.trim().split(/\s+/).join(".")),t.unshift(e),r=r.parentElement}return t.join(" > ")}scoreElements(e){const t=[];return n.BLOCK_ELEMENTS.forEach((r=>{Array.from(e.getElementsByTagName(r)).forEach((e=>{const r=this.scoreElement(e);r>0&&t.push({score:r,element:e})}))})),t.sort(((e,t)=>t.score-e.score))}scoreElement(e){let t=0;e.className&&"string"==typeof e.className&&e.className.toLowerCase(),e.id&&e.id.toLowerCase();const r=e.textContent||"",o=r.split(/\s+/).length;t+=Math.min(Math.floor(o/100),3);const n=e.getElementsByTagName("a"),a=Array.from(n).reduce(((e,t)=>{var r;return e+((null===(r=t.textContent)||void 0===r?void 0:r.length)||0)}),0);(r.length?a/r.length:0)>.5&&(t-=10);t+=e.getElementsByTagName("p").length;const i=e.getElementsByTagName("img").length;return t+=Math.min(3*i,9),t}}},640:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_LANGUAGES=t.ALLOWED_ATTRIBUTES_DEBUG=t.ALLOWED_ATTRIBUTES=t.ALLOWED_EMPTY_ELEMENTS=t.FOOTNOTE_LIST_SELECTORS=t.FOOTNOTE_INLINE_REFERENCES=t.PARTIAL_SELECTORS=t.EXACT_SELECTORS=t.HIDDEN_ELEMENT_SELECTORS=t.INLINE_ELEMENTS=t.PRESERVE_ELEMENTS=t.BLOCK_ELEMENTS=t.MOBILE_WIDTH=t.ENTRY_POINT_ELEMENTS=void 0,t.ENTRY_POINT_ELEMENTS=["article",'[role="article"]',".post-content",".article-content","#article-content",".content-article","main",'[role="main"]',"body"],t.MOBILE_WIDTH=600,t.BLOCK_ELEMENTS=["div","section","article","main"],t.PRESERVE_ELEMENTS=new Set(["pre","code","table","thead","tbody","tr","td","th","ul","ol","li","dl","dt","dd","figure","figcaption","picture","details","summary","blockquote","form","fieldset"]),t.INLINE_ELEMENTS=new Set(["a","span","strong","em","i","b","u","code","br","small","sub","sup","mark","del","ins","q","abbr","cite","time"]),t.HIDDEN_ELEMENT_SELECTORS=["[hidden]",'[style*="visibility: hidden"]','[style*="visibility:hidden"]',".hidden",".invisible"].join(","),t.EXACT_SELECTORS=["noscript",'script:not([type^="math/"])',"style","meta","link",'.ad:not([class*="gradient"])','[class^="ad-" i]','[class$="-ad" i]','[id^="ad-" i]','[id$="-ad" i]','[role="banner" i]',".promo",".Promo","#barrier-page",'[id="comments" i]',"header",".header","#header","nav",".navigation","#navigation",'[role="navigation" i]','[role="dialog" i]','[role*="complementary" i]','[class*="pagination" i]',".menu","#menu","#siteSub",".author",".Author",".contributor",".date","[data-date]",".meta",".tags",".toc",".Toc","#toc","#title","#Title","#articleTag",'[href*="/category"]','[href*="/categories"]','[href*="/tag/"]','[href*="/tags/"]','[href*="/topics"]','[href*="author"]','[href="#top"]','[href="#Top"]','[href="#site-content"]','[src*="author"]',"footer","aside","button","canvas","dialog","fieldset","form",'input:not([type="checkbox"])',"label","option","select","textarea","time","instaread-player",'iframe:not([src*="youtube"]):not([src*="youtu.be"]):not([src*="vimeo"]):not([src*="twitter"])','[class="logo" i]',"#logo","#Logo","#newsletter","#Newsletter",".noprint",'[data-link-name*="skip" i]','[data-print-layout="hide" i]','[data-block="donotprint" i]','[class*="clickable-icon" i]','li span[class*="ltx_tag" i][class*="ltx_tag_item" i]','a[href^="#"][class*="anchor" i]','a[href^="#"][class*="ref" i]','[data-container*="most-viewed" i]',".sidebar",".Sidebar","#sidebar","#Sidebar","#sitesub",".gutter","#primaryaudio","#NYT_ABOVE_MAIN_CONTENT_REGION",'[data-testid="photoviewer-children-figure"] > span',"table.infobox",".pencraft:not(.pc-display-contents)",'[data-optimizely="related-articles-section" i]'],t.PARTIAL_SELECTORS=["access-wall","activitypub","actioncall","appendix","avatar","advert","ad-placement","_ad_","allterms","alert-box","around-the-web","article-bottom-section","article-bottom","article-citation","article__copy","article_date","article-end ","article_header","article-header","article__header","article__info","article-info","article-meta","article_meta","article__meta","article-subject","article_subject","article-snippet","article-separator","article--share","article--topics","articletags","article-tags","article_tags","article-title","article_title","articletopics","article-topics","article-type","article--lede","articlewell","associated-people","audio-card","authored-by","author-box","author-info","author-name","author-bio","author-mini-bio","back-to-top","backlinks-section","banner","bio-block","blog-pager","bookmark-","-bookmark","bottom-of-article","brand-bar","breadcrumb","button-wrapper","btn-","-btn","byline","captcha","card-text","card-media","cat_header","catlinks","chapter-list","collections","comments","commentbox","comment-count","comment-content","comment-form","comment-number","comment-respond","comment-thread","complementary","consent","content-card","content-topics","contentpromo","context-bar","context-widget","core-collateral","creative-commons_","_cta","-cta","cta-","cta_","current-issue","custom-list-number","dateline","dateheader","date-header","date_header-","disclaimer","disclosure","discussion","discuss_","disqus","donate","dropdown","eletters","emailsignup","engagement-widget","entry-author-info","entry-categories","entry-date","entry-meta","entry-title","entry-utility","eyebrow","expand-reduce","externallinkembedwrapper","extra-services","extra-title","facebook","favorite","feedback","feed-links","field-site-sections","fixed","floating-vid","follow","footer","footnote-back","footnoteback","for-you","frontmatter","further-reading","gist-meta","google","goog-","graph-view","header-logo","header-pattern","hero-list","hide-for-print","hide-print","hide-when-no-script","hidden-sidenote","hidden-accessibility","interlude","interaction","jumplink","jump-to-","kicker","labstab","-labels","language-name","latest-content","-ledes-","-license","link-box","links-grid","links-title","listing-dynamic-terms","list-tags","listinks","loading","loa-info","logo_container","ltx_role_refnum","ltx_tag_bibitem","ltx_error","marketing","media-inquiry","menu-","metadata","might-like","more-about","_modal","-modal","more-","morenews","morestories","move-helper","mw-editsection","mw-cite-backlink","mw-indicators","mw-jump-link","nav-","nav_","navbar","next-","newsgallery","news-story-title","newsletter_","newsletter-form","newsletter-signup","newslettersignup","newsletterwidget","newsletterwrapper","not-found","nomobile","noprint","originally-published","outline-view","overlay","page-title","paywall_message","-partners","plea","popular","pop-up","popover","post-bottom","post__category","postcomment","postdate","post-author","post-date","post_date","post-feeds","postinfo","post-info","post_info","post-inline-date","post-links","post-meta","postmeta","postsnippet","post_snippet","post-snippet","posttitle","post-title","post_title","post__title","posttax","post-tax","post_tax","posttag","post_tag","post-tag","prevnext","previousnext","press-inquiries","print-none","print-header","profile","promo_article","promo-box","pubdate","pub_date","pub-date","publication-date","publicationName","qr-code","qr_code","_rail","readmore","read-next","read_next","read_time","read-time","reading_time","reading-time","reading-list","recent-","recent-articles","recentpost","recent_post","recent-post","recommend","redirectedfrom","recirc","register","related","relevant","reversefootnote","screen-reader-text","share-box","sharedaddy","share-icons","sharelinks","share-section","sidebartitle","sidebar_","sidebar-content","similar-","similar_","similars-","sideitems","sidebar-author","sidebar-item","side-box","site-index","site-header","site-logo","site-name","skip-content","c-skip-link","_skip-link","slug-wrap","social","speechify-ignore","sponsor","springercitation","_stats","storyreadtime","storypublishdate","subject-label","subscribe","_tags","tags__item","tag_list","taxonomy","table-content","table-of-contents","tabs-","terminaltout","time-rubric","timestamp","tip_off","tiptout","-tout-","-toc","toggle-caption","topic-list","toolbar","tooltip","top-wrapper","tree-item","trending","trust-feat","trust-badge","twitter","u-hide","visually-hidden","welcomebox"],t.FOOTNOTE_INLINE_REFERENCES=["sup.reference","cite.ltx_cite",'sup[id^="fnr"]','sup[id^="fnref:"]',"span.footnote-link","a.citation",'a[id^="ref-link"]','a[href^="#fn"]','a[href^="#cite"]','a[href^="#reference"]','a[href^="#footnote"]','a[href^="#r"]','a[href^="#b"]','a[href*="cite_note"]','a[href*="cite_ref"]',"a.footnote-anchor","span.footnote-hovercard-target a",'a[role="doc-biblioref"]','a[id^="fnref"]','a[id^="ref-link"]'].join(","),t.FOOTNOTE_LIST_SELECTORS=["div.footnote ol","div.footnotes ol",'div[role="doc-endnotes"]','div[role="doc-footnotes"]',"ol.footnotes-list","ol.footnotes","ol.references",'ol[class*="article-references"]',"section.footnotes ol",'section[role="doc-endnotes"]','section[role="doc-footnotes"]','section[role="doc-bibliography"]',"ul.footnotes-list","ul.ltx_biblist",'div.footnote[data-component-name="FootnoteToDOM"]'].join(","),t.ALLOWED_EMPTY_ELEMENTS=new Set(["area","audio","base","br","circle","col","defs","ellipse","embed","figure","g","hr","iframe","img","input","line","link","mask","meta","object","param","path","pattern","picture","polygon","polyline","rect","source","stop","svg","td","th","track","use","video","wbr"]),t.ALLOWED_ATTRIBUTES=new Set(["alt","allow","allowfullscreen","aria-label","checked","colspan","controls","data-latex","data-src","data-srcset","data-lang","dir","display","frameborder","headers","height","href","lang","role","rowspan","src","srcset","title","type","width","accent","accentunder","align","columnalign","columnlines","columnspacing","columnspan","data-mjx-texclass","depth","displaystyle","fence","frame","framespacing","linethickness","lspace","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","rowalign","rowlines","rowspacing","rowspan","rspace","scriptlevel","separator","stretchy","symmetric","voffset","xmlns"]),t.ALLOWED_ATTRIBUTES_DEBUG=new Set(["class","id"]),t.SUPPORTED_LANGUAGES=new Set(["markup","html","xml","svg","mathml","ssml","atom","rss","javascript","js","jsx","typescript","ts","tsx","webassembly","wasm","python","java","csharp","cs","dotnet","aspnet","cpp","c++","c","objc","ruby","rb","php","golang","rust","swift","kotlin","scala","dart","bash","shell","sh","powershell","batch","json","jsonp","yaml","yml","toml","dockerfile","gitignore","sql","mysql","postgresql","graphql","mongodb","sparql","markdown","md","latex","tex","asciidoc","adoc","jsdoc","haskell","hs","elm","elixir","erlang","ocaml","fsharp","scheme","lisp","elisp","clojure","matlab","fortran","cobol","pascal","perl","lua","julia","groovy","crystal","nim","zig","regex","gradle","cmake","makefile","nix","terraform","solidity","glsl","hlsl","nasm","masm","armasm","gdscript","unrealscript","abap","actionscript","ada","agda","antlr4","applescript","arduino","coffeescript","django","erlang","fortran","haxe","idris","kotlin","livescript","matlab","nginx","pascal","prolog","puppet","scala","scheme","tcl","verilog","vhdl"])},648:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mathSelectors=t.isBlockDisplay=t.getBasicLatexFromElement=t.getMathMLFromElement=void 0;t.getMathMLFromElement=e=>{if("math"===e.tagName.toLowerCase()){const t="block"===e.getAttribute("display");return{mathml:e.outerHTML,latex:e.getAttribute("alttext")||null,isBlock:t}}const t=e.getAttribute("data-mathml");if(t){const e=document.createElement("div");e.innerHTML=t;const r=e.querySelector("math");if(r){const e="block"===r.getAttribute("display");return{mathml:r.outerHTML,latex:r.getAttribute("alttext")||null,isBlock:e}}}const r=e.querySelector(".MJX_Assistive_MathML, mjx-assistive-mml");if(r){const e=r.querySelector("math");if(e){const t=e.getAttribute("display"),o=r.getAttribute("display"),n="block"===t||"block"===o;return{mathml:e.outerHTML,latex:e.getAttribute("alttext")||null,isBlock:n}}}const o=e.querySelector(".katex-mathml math");return o?{mathml:o.outerHTML,latex:null,isBlock:!1}:null};t.getBasicLatexFromElement=e=>{var t,r,o;const n=e.getAttribute("data-latex");if(n)return n;if(e instanceof HTMLImageElement&&e.classList.contains("latex")){const t=e.getAttribute("alt");if(t)return t;const r=e.getAttribute("src");if(r){const e=r.match(/latex\.php\?latex=([^&]+)/);if(e)return decodeURIComponent(e[1]).replace(/\+/g," ").replace(/%5C/g,"\\")}}const a=e.querySelector('annotation[encoding="application/x-tex"]');if(null==a?void 0:a.textContent)return a.textContent.trim();if(e.matches(".katex")){const t=e.querySelector('.katex-mathml annotation[encoding="application/x-tex"]');if(null==t?void 0:t.textContent)return t.textContent.trim()}if(e.matches('script[type="math/tex"]')||e.matches('script[type="math/tex; mode=display"]'))return(null===(t=e.textContent)||void 0===t?void 0:t.trim())||null;if(e.parentElement){const t=e.parentElement.querySelector('script[type="math/tex"], script[type="math/tex; mode=display"]');if(t)return(null===(r=t.textContent)||void 0===r?void 0:r.trim())||null}return e.getAttribute("alt")||(null===(o=e.textContent)||void 0===o?void 0:o.trim())||null};t.isBlockDisplay=e=>{if("block"===e.getAttribute("display"))return!0;const t=e.className.toLowerCase();if(t.includes("display")||t.includes("block"))return!0;if(e.closest('.katex-display, .MathJax_Display, [data-display="block"]'))return!0;const r=e.previousElementSibling;if("p"===(null==r?void 0:r.tagName.toLowerCase()))return!0;if(e.matches(".mwe-math-fallback-image-display"))return!0;if(e.matches(".katex"))return null!==e.closest(".katex-display");if(e.hasAttribute("display"))return"true"===e.getAttribute("display");if(e.matches('script[type="math/tex; mode=display"]'))return!0;if(e.hasAttribute("display"))return"true"===e.getAttribute("display");const o=e.closest("[display]");return!!o&&"true"===o.getAttribute("display")},t.mathSelectors=['img.latex[src*="latex.php"]',"span.MathJax","mjx-container",'script[type="math/tex"]','script[type="math/tex; mode=display"]','.MathJax_Preview + script[type="math/tex"]',".MathJax_Display",".MathJax_SVG",".MathJax_MathML",".mwe-math-element",".mwe-math-fallback-image-inline",".mwe-math-fallback-image-display",".mwe-math-mathml-inline",".mwe-math-mathml-display",".katex",".katex-display",".katex-mathml",".katex-html","[data-katex]",'script[type="math/katex"]',"math","[data-math]","[data-latex]","[data-tex]",'script[type^="math/"]','annotation[encoding="application/x-tex"]'].join(",")},826:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mathStandardizationRules=t.createCleanMathEl=void 0;const o=r(648);t.createCleanMathEl=(e,t,r)=>{const o=document.createElement("math");if(o.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),o.setAttribute("display",r?"block":"inline"),o.setAttribute("data-latex",t||""),null==e?void 0:e.mathml){const t=document.createElement("div");t.innerHTML=e.mathml;const r=t.querySelector("math");r&&(o.innerHTML=r.innerHTML)}else t&&(o.textContent=t);return o},t.mathStandardizationRules=[{selector:o.mathSelectors,element:"math",transform:e=>{if(!(e instanceof HTMLElement))return e;const r=(0,o.getMathMLFromElement)(e),n=(0,o.getBasicLatexFromElement)(e),a=(0,o.isBlockDisplay)(e),i=(0,t.createCleanMathEl)(r,n,a);if(e.parentElement){e.parentElement.querySelectorAll('\n\t\t\t\t\t/* MathJax scripts and previews */\n\t\t\t\t\tscript[type^="math/"],\n\t\t\t\t\t.MathJax_Preview,\n\n\t\t\t\t\t/* External math library scripts */\n\t\t\t\t\tscript[type="text/javascript"][src*="mathjax"],\n\t\t\t\t\tscript[type="text/javascript"][src*="katex"]\n\t\t\t\t').forEach((e=>e.remove()))}return i}}]}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}var o={};return(()=>{var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.Defuddle=void 0;var t=r(628);Object.defineProperty(e,"Defuddle",{enumerable:!0,get:function(){return t.Defuddle}})})(),o})()));
|