@mz1999/defuddle 0.14.1
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/LICENSE +21 -0
- package/README.md +371 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +145 -0
- package/dist/cli.js.map +1 -0
- package/dist/constants.d.ts +24 -0
- package/dist/constants.js +950 -0
- package/dist/constants.js.map +1 -0
- package/dist/defuddle.d.ts +136 -0
- package/dist/defuddle.js +1816 -0
- package/dist/defuddle.js.map +1 -0
- package/dist/elements/callouts.d.ts +6 -0
- package/dist/elements/callouts.js +74 -0
- package/dist/elements/callouts.js.map +1 -0
- package/dist/elements/code.d.ts +5 -0
- package/dist/elements/code.js +346 -0
- package/dist/elements/code.js.map +1 -0
- package/dist/elements/footnotes.d.ts +5 -0
- package/dist/elements/footnotes.js +619 -0
- package/dist/elements/footnotes.js.map +1 -0
- package/dist/elements/headings.d.ts +11 -0
- package/dist/elements/headings.js +100 -0
- package/dist/elements/headings.js.map +1 -0
- package/dist/elements/images.d.ts +8 -0
- package/dist/elements/images.js +877 -0
- package/dist/elements/images.js.map +1 -0
- package/dist/elements/math.base.d.ts +9 -0
- package/dist/elements/math.base.js +195 -0
- package/dist/elements/math.base.js.map +1 -0
- package/dist/elements/math.core.d.ts +7 -0
- package/dist/elements/math.core.js +52 -0
- package/dist/elements/math.core.js.map +1 -0
- package/dist/elements/math.d.ts +2 -0
- package/dist/elements/math.full.d.ts +8 -0
- package/dist/elements/math.js +7 -0
- package/dist/elements/math.js.map +1 -0
- package/dist/extractor-registry.d.ts +16 -0
- package/dist/extractor-registry.js +140 -0
- package/dist/extractor-registry.js.map +1 -0
- package/dist/extractors/_base.d.ts +22 -0
- package/dist/extractors/_base.js +27 -0
- package/dist/extractors/_base.js.map +1 -0
- package/dist/extractors/_conversation.d.ts +9 -0
- package/dist/extractors/_conversation.js +78 -0
- package/dist/extractors/_conversation.js.map +1 -0
- package/dist/extractors/chatgpt.d.ts +14 -0
- package/dist/extractors/chatgpt.js +138 -0
- package/dist/extractors/chatgpt.js.map +1 -0
- package/dist/extractors/claude.d.ts +10 -0
- package/dist/extractors/claude.js +91 -0
- package/dist/extractors/claude.js.map +1 -0
- package/dist/extractors/gemini.d.ts +14 -0
- package/dist/extractors/gemini.js +111 -0
- package/dist/extractors/gemini.js.map +1 -0
- package/dist/extractors/github.d.ts +20 -0
- package/dist/extractors/github.js +251 -0
- package/dist/extractors/github.js.map +1 -0
- package/dist/extractors/grok.d.ts +15 -0
- package/dist/extractors/grok.js +142 -0
- package/dist/extractors/grok.js.map +1 -0
- package/dist/extractors/hackernews.d.ts +21 -0
- package/dist/extractors/hackernews.js +155 -0
- package/dist/extractors/hackernews.js.map +1 -0
- package/dist/extractors/reddit.d.ts +22 -0
- package/dist/extractors/reddit.js +197 -0
- package/dist/extractors/reddit.js.map +1 -0
- package/dist/extractors/twitter.d.ts +16 -0
- package/dist/extractors/twitter.js +204 -0
- package/dist/extractors/twitter.js.map +1 -0
- package/dist/extractors/x-article.d.ts +24 -0
- package/dist/extractors/x-article.js +267 -0
- package/dist/extractors/x-article.js.map +1 -0
- package/dist/extractors/x-oembed.d.ts +20 -0
- package/dist/extractors/x-oembed.js +350 -0
- package/dist/extractors/x-oembed.js.map +1 -0
- package/dist/extractors/youtube.d.ts +87 -0
- package/dist/extractors/youtube.js +869 -0
- package/dist/extractors/youtube.js.map +1 -0
- package/dist/fetch.d.ts +18 -0
- package/dist/fetch.js +265 -0
- package/dist/fetch.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.full.d.ts +12 -0
- package/dist/index.full.js +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/markdown.d.ts +30 -0
- package/dist/markdown.js +661 -0
- package/dist/markdown.js.map +1 -0
- package/dist/metadata.d.ts +25 -0
- package/dist/metadata.js +426 -0
- package/dist/metadata.js.map +1 -0
- package/dist/node.d.ts +19 -0
- package/dist/node.js +78 -0
- package/dist/node.js.map +1 -0
- package/dist/scoring.d.ts +31 -0
- package/dist/scoring.js +472 -0
- package/dist/scoring.js.map +1 -0
- package/dist/standardize.d.ts +2 -0
- package/dist/standardize.js +1101 -0
- package/dist/standardize.js.map +1 -0
- package/dist/types/extractors.d.ts +41 -0
- package/dist/types/extractors.js +3 -0
- package/dist/types/extractors.js.map +1 -0
- package/dist/types.d.ts +135 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/comments.d.ts +44 -0
- package/dist/utils/comments.js +103 -0
- package/dist/utils/comments.js.map +1 -0
- package/dist/utils/dom.d.ts +42 -0
- package/dist/utils/dom.js +104 -0
- package/dist/utils/dom.js.map +1 -0
- package/dist/utils/linkedom-compat.d.ts +5 -0
- package/dist/utils/linkedom-compat.js +23 -0
- package/dist/utils/linkedom-compat.js.map +1 -0
- package/dist/utils/transcript.d.ts +37 -0
- package/dist/utils/transcript.js +61 -0
- package/dist/utils/transcript.js.map +1 -0
- package/dist/utils.d.ts +13 -0
- package/dist/utils.js +98 -0
- package/dist/utils.js.map +1 -0
- package/package.json +107 -0
|
@@ -0,0 +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()}(Object("undefined"!=typeof self?self:this),(()=>(()=>{var e={354(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"}),o=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===o.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 o=e[n];if(t.call(void 0,o,n,e))return o}},t.freeze=r,t.MIME_TYPE=n,t.NAMESPACE=o},5752:(e,t,r)=>{var n=r(4582),o=r(4722),a=r(6559),i=r(4466),s=o.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 h(e){this.options=e||{locator:{}}}function m(){this.cdata=!1}function p(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 b(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var r=this.options,n=new u,o=r.domBuilder||new m,i=r.errorHandler,s=r.locator,c=r.xmlns||{},h=/\/x?html?$/.test(t),p=h?a.HTML_ENTITIES:a.XML_ENTITIES;s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof m)return t;e=t}var n={},o=e instanceof Function;function a(t){var a=e[t];!a&&o&&(a=2==e.length?function(r){e(t,r)}:e),n[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+f(r))}||function(){}}return r=r||{},a("warning"),a("error"),a("fatalError"),n}(i,o,s),n.domBuilder=r.domBuilder||o,h&&(c[""]=l.HTML),c.xml=c.xml||l.XML;var g=r.normalizeLineEndings||d;return e&&"string"==typeof e?n.parse(g(e),c,p):n.errorHandler.error("invalid doc source"),o.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 o=this.doc,a=o.createElementNS(e,r||t),i=n.length;b(this,a),this.currentElement=a,this.locator&&p(this.locator,a);for(var s=0;s<i;s++){e=n.getURI(s);var l=n.getValue(s),c=(r=n.getQName(s),o.createAttributeNS(e,r));this.locator&&p(n.getLocator(s),c),c.value=c.nodeValue=l,a.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&&p(this.locator,r),b(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&&p(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&&p(this.locator,n),b(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 o=n.createDocumentType(e,t,r);this.locator&&p(this.locator,o),b(this,o),this.doc.doctype=o}},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=h},4722:(e,t,r)=>{var n=r(4582),o=n.find,a=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={},h=d.ELEMENT_NODE=1,m=d.ATTRIBUTE_NODE=2,p=d.TEXT_NODE=3,f=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,b=d.ENTITY_NODE=6,x=d.PROCESSING_INSTRUCTION_NODE=7,y=d.COMMENT_NODE=8,v=d.DOCUMENT_NODE=9,w=d.DOCUMENT_TYPE_NODE=10,A=d.DOCUMENT_FRAGMENT_NODE=11,C=d.NOTATION_NODE=12,E={},S={},_=(E.INDEX_SIZE_ERR=(S[1]="Index size error",1),E.DOMSTRING_SIZE_ERR=(S[2]="DOMString size error",2),E.HIERARCHY_REQUEST_ERR=(S[3]="Hierarchy request error",3)),T=(E.WRONG_DOCUMENT_ERR=(S[4]="Wrong document",4),E.INVALID_CHARACTER_ERR=(S[5]="Invalid character",5),E.NO_DATA_ALLOWED_ERR=(S[6]="No data allowed",6),E.NO_MODIFICATION_ALLOWED_ERR=(S[7]="No modification allowed",7),E.NOT_FOUND_ERR=(S[8]="Not found",8)),q=(E.NOT_SUPPORTED_ERR=(S[9]="Not supported",9),E.INUSE_ATTRIBUTE_ERR=(S[10]="Attribute in use",10));function k(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,S[e]),this.message=S[e],Error.captureStackTrace&&Error.captureStackTrace(this,k);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(xe(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 o=e.ownerDocument;o&&(n&&z(o,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===a.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function $(e,t,r){var n=D(t,r);if(!(n>=0))throw new k(T,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var a=e.ownerDocument;a&&(z(a,e,r),r.ownerElement=null)}}function I(){}function R(){}function P(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function F(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(F(e,t))return!0}while(e=e.nextSibling)}function j(){this.ownerDocument=this}function z(e,t,r,n){e&&e._inc++,r.namespaceURI===a.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function H(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,a=0;o;)n[a++]=o,o=o.nextSibling;n.length=a,delete n[n.length]}}}function U(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,H(e.ownerDocument,e),t}function G(e){return e&&e.nodeType===R.DOCUMENT_TYPE_NODE}function W(e){return e&&e.nodeType===R.ELEMENT_NODE}function V(e){return e&&e.nodeType===R.TEXT_NODE}function X(e,t){var r=e.childNodes||[];if(o(r,W)||G(t))return!1;var n=o(r,G);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function J(e,t){var r=e.childNodes||[];if(o(r,(function(e){return W(e)&&e!==t})))return!1;var n=o(r,G);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function Z(e,t,r){var n=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===R.DOCUMENT_FRAGMENT_NODE){var i=a.filter(W);if(i.length>1||o(a,V))throw new k(_,"More than one element or text in fragment");if(1===i.length&&!X(e,r))throw new k(_,"Element in fragment can not be inserted before doctype")}if(W(t)&&!X(e,r))throw new k(_,"Only one element can be added and only after doctype");if(G(t)){if(o(n,G))throw new k(_,"Only one doctype is allowed");var s=o(n,W);if(r&&n.indexOf(s)<n.indexOf(r))throw new k(_,"Doctype can only be inserted before an element");if(!r&&s)throw new k(_,"Doctype can not be appended since element is present")}}function Y(e,t,r){var n=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===R.DOCUMENT_FRAGMENT_NODE){var i=a.filter(W);if(i.length>1||o(a,V))throw new k(_,"More than one element or text in fragment");if(1===i.length&&!J(e,r))throw new k(_,"Element in fragment can not be inserted before doctype")}if(W(t)&&!J(e,r))throw new k(_,"Only one element can be added and only after doctype");if(G(t)){if(o(n,(function(e){return G(e)&&e!==r})))throw new k(_,"Only one doctype is allowed");var s=o(n,W);if(r&&n.indexOf(s)<n.indexOf(r))throw new k(_,"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===R.DOCUMENT_NODE||e.nodeType===R.DOCUMENT_FRAGMENT_NODE||e.nodeType===R.ELEMENT_NODE)}(e))throw new k(_,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new k(T,"child not in parent");if(!function(e){return e&&(W(e)||V(e)||G(e)||e.nodeType===R.DOCUMENT_FRAGMENT_NODE||e.nodeType===R.COMMENT_NODE||e.nodeType===R.PROCESSING_INSTRUCTION_NODE)}(t)||G(t)&&e.nodeType!==R.DOCUMENT_NODE)throw new k(_,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)})(e,t,r),e.nodeType===R.DOCUMENT_NODE&&(n||Z)(e,t,r);var o=t.parentNode;if(o&&o.removeChild(t),t.nodeType===A){var a=t.firstChild;if(null==a)return t;var i=t.lastChild}else a=i=t;var s=r?r.previousSibling:e.lastChild;a.previousSibling=s,i.nextSibling=r,s?s.nextSibling=a:e.firstChild=a,null==r?e.lastChild=i:r.previousSibling=i;do{a.parentNode=e}while(a!==i&&(a=a.nextSibling));return H(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 oe(){}function ae(){}function ie(){}function se(){}function le(){}function ce(){}function ue(){}function de(){}function he(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,a=n.namespaceURI;if(a&&null==o&&null==(o=n.lookupPrefix(a)))var i=[{namespace:a,prefix:null}];return fe(this,r,e,t,i),r.join("")}function me(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===n&&o===a.XML||o===a.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==o}return!0}function pe(e,t,r){e.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,P),'"')}function fe(e,t,r,n,o){if(o||(o=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var i=e.attributes,s=i.length,l=e.firstChild,c=e.tagName,u=c;if(!(r=a.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var d,b=0;b<i.length;b++)if("xmlns"===i.item(b).name){d=i.item(b).value;break}if(!d)for(var C=o.length-1;C>=0;C--)if(""===(E=o[C]).prefix&&E.namespace===e.namespaceURI){d=E.namespace;break}if(d!==e.namespaceURI)for(C=o.length-1;C>=0;C--){var E;if((E=o[C]).namespace===e.namespaceURI){E.prefix&&(u=E.prefix+":"+c);break}}}t.push("<",u);for(var S=0;S<s;S++)"xmlns"==(_=i.item(S)).prefix?o.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&o.push({prefix:"",namespace:_.value});for(S=0;S<s;S++){var _,T,q;me(_=i.item(S),0,o)&&(pe(t,(T=_.prefix||"")?"xmlns:"+T:"xmlns",q=_.namespaceURI),o.push({prefix:T,namespace:q})),fe(_,t,r,n,o)}if(c===u&&me(e,0,o)&&(pe(t,(T=e.prefix||"")?"xmlns:"+T:"xmlns",q=e.namespaceURI),o.push({prefix:T,namespace:q})),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,o.slice()),l=l.nextSibling;else for(;l;)fe(l,t,r,n,o.slice()),l=l.nextSibling;t.push("</",u,">")}else t.push("/>");return;case v:case A:for(l=e.firstChild;l;)fe(l,t,r,n,o.slice()),l=l.nextSibling;return;case m:return pe(t,e.name,e.value);case p:return t.push(e.data.replace(/[<&>]/g,P));case f:return t.push("<![CDATA[",e.data,"]]>");case y:return t.push("\x3c!--",e.data,"--\x3e");case w:var k=e.publicId,N=e.systemId;if(t.push("<!DOCTYPE ",e.name),k)t.push(" PUBLIC ",k),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 x: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 h:(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 o=t.firstChild;o;)n.appendChild(ge(e,o,r)),o=o.nextSibling;return n}function be(e,t,r){var n=new t.constructor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=t[o];"object"!=typeof a&&a!=n[o]&&(n[o]=a)}switch(t.childNodes&&(n.childNodes=new N),n.ownerDocument=e,n.nodeType){case h:var i=t.attributes,s=n.attributes=new M,l=i.length;s._ownerElement=n;for(var c=0;c<l;c++)n.setAttributeNode(be(e,i.item(c),!0));break;case m:r=!0}if(r)for(var u=t.firstChild;u;)n.appendChild(be(e,u,r)),u=u.nextSibling;return n}function xe(e,t,r){e[t]=r}E.INVALID_STATE_ERR=(S[11]="Invalid state",11),E.SYNTAX_ERR=(S[12]="Syntax error",12),E.INVALID_MODIFICATION_ERR=(S[13]="Invalid modification",13),E.NAMESPACE_ERR=(S[14]="Invalid namespace",14),E.INVALID_ACCESS_ERR=(S[15]="Invalid access",15),k.prototype=Error.prototype,c(E,k),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 k(q);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 k(q);return t=this.getNamedItemNS(e.namespaceURI,e.localName),B(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return $(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return $(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}},I.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 o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new ae;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},R.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,Y),t&&this.removeChild(t)},removeChild:function(e){return U(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return be(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==p&&e.nodeType==p?(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,R),c(d,R.prototype),j.prototype={nodeName:"#document",nodeType:v,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===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),U(this,e)},replaceChild:function(e,t){K(this,e,t,Y),e.ownerDocument=this,t&&this.removeChild(t),W(e)&&(this.documentElement=e)},importNode:function(e,t){return ge(this,e,t)},getElementById:function(e){var t=null;return F(this.documentElement,(function(r){if(r.nodeType==h&&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&&F(r.documentElement,(function(o){if(o!==r&&o.nodeType===h){var a=o.getAttribute("class");if(a){var i=e===a;if(!i){var s=l(a);i=t.every((c=s,function(e){return c&&-1!==c.indexOf(e)}))}i&&n.push(o)}}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 oe;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(":"),o=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,o._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,R),Q.prototype={nodeType:h,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,H(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 F(t,(function(n){n===t||n.nodeType!=h||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new L(this,(function(r){var n=[];return F(r,(function(o){o===r||o.nodeType!==h||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},j.prototype.getElementsByTagName=Q.prototype.getElementsByTagName,j.prototype.getElementsByTagNameNS=Q.prototype.getElementsByTagNameNS,u(Q,R),ee.prototype.nodeType=m,u(ee,R),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(S[_])},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,R),re.prototype={nodeName:"#text",nodeType:p,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:y},u(ne,te),oe.prototype={nodeName:"#cdata-section",nodeType:f},u(oe,te),ae.prototype.nodeType=w,u(ae,R),ie.prototype.nodeType=C,u(ie,R),se.prototype.nodeType=b,u(se,R),le.prototype.nodeType=g,u(le,R),ce.prototype.nodeName="#document-fragment",ce.prototype.nodeType=A,u(ce,R),ue.prototype.nodeType=x,u(ue,R),de.prototype.serializeToString=function(e,t,r){return he.call(e,t,r)},R.prototype.toString=he;try{if(Object.defineProperty){function ye(e){switch(e.nodeType){case h:case A:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(ye(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(R.prototype,"textContent",{get:function(){return ye(this)},set:function(e){switch(this.nodeType){case h: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}}}),xe=function(e,t,r){e["$$"+t]=r}}}catch(ve){}t.DocumentType=ae,t.DOMException=k,t.DOMImplementation=I,t.Element=Q,t.Node=R,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:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\u{1d504}",afr:"\u{1d51e}",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",AMP:"&",amp:"&",And:"\u2a53",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1d538}",aopf:"\u{1d552}",ap:"\u2248",apacir:"\u2a6f",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\u{1d49c}",ascr:"\u{1d4b6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\u{1d505}",bfr:"\u{1d51f}",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\u{1d539}",bopf:"\u{1d553}",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250c",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252c",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxUL:"\u255d",boxUl:"\u255c",boxuL:"\u255b",boxul:"\u2518",boxUR:"\u255a",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256c",boxVh:"\u256b",boxvH:"\u256a",boxvh:"\u253c",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255f",boxvR:"\u255e",boxvr:"\u251c",bprime:"\u2035",Breve:"\u02d8",breve:"\u02d8",brvbar:"\xa6",Bscr:"\u212c",bscr:"\u{1d4b7}",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22d2",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",CenterDot:"\xb7",centerdot:"\xb7",Cfr:"\u212d",cfr:"\u{1d520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",cir:"\u25cb",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",Conint:"\u222f",conint:"\u222e",ContourIntegral:"\u222e",Copf:"\u2102",copf:"\u{1d554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xa9",copy:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",Cross:"\u2a2f",cross:"\u2717",Cscr:"\u{1d49e}",cscr:"\u{1d4b8}",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",Cup:"\u22d3",cup:"\u222a",cupbrcap:"\u2a48",CupCap:"\u224d",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21a1",dArr:"\u21d3",darr:"\u2193",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\u{1d507}",dfr:"\u{1d521}",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",Diamond:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\u{1d53b}",dopf:"\u{1d555}",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21d3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\u{1d49f}",dscr:"\u{1d4b9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",ecir:"\u2256",Ecirc:"\xca",ecirc:"\xea",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1d508}",efr:"\u{1d522}",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1d53c}",eopf:"\u{1d556}",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212f",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\u{1d509}",ffr:"\u{1d523}",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\u{1d53d}",fopf:"\u{1d557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1d4bb}",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\u{1d50a}",gfr:"\u{1d524}",Gg:"\u22d9",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2aa5",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gnE:"\u2269",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\u{1d53e}",gopf:"\u{1d558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\u{1d4a2}",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",Gt:"\u226b",GT:">",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\u{1d525}",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\u{1d559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\u{1d4bd}",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",Ifr:"\u2111",ifr:"\u{1d526}",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\u{1d540}",iopf:"\u{1d55a}",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",Iscr:"\u2110",iscr:"\u{1d4be}",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1d50d}",jfr:"\u{1d527}",jmath:"\u0237",Jopf:"\u{1d541}",jopf:"\u{1d55b}",Jscr:"\u{1d4a5}",jscr:"\u{1d4bf}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\u{1d50e}",kfr:"\u{1d528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\u{1d542}",kopf:"\u{1d55c}",Kscr:"\u{1d4a6}",kscr:"\u{1d4c0}",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\u{1d50f}",lfr:"\u{1d529}",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\u{1d543}",lopf:"\u{1d55d}",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1d4c1}",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226a",LT:"<",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\u{1d510}",mfr:"\u{1d52a}",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\u{1d544}",mopf:"\u{1d55e}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1d4c2}",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1d511}",nfr:"\u{1d52b}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",nopf:"\u{1d55f}",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\u{1d4a9}",nscr:"\u{1d4c3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nVDash:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwArr:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\u{1d512}",ofr:"\u{1d52c}",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\u{1d546}",oopf:"\u{1d560}",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\u{1d4aa}",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\u{1d513}",pfr:"\u{1d52d}",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\u{1d561}",pound:"\xa3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\u{1d4ab}",pscr:"\u{1d4c5}",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\u{1d514}",qfr:"\u{1d52e}",qint:"\u2a0c",Qopf:"\u211a",qopf:"\u{1d562}",qprime:"\u2057",Qscr:"\u{1d4ac}",qscr:"\u{1d4c6}",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\xae",reg:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\u{1d52f}",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\u{1d563}",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\u{1d4c7}",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1d516}",sfr:"\u{1d530}",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\u{1d54a}",sopf:"\u{1d564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\u{1d4ae}",sscr:"\u{1d4c8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\u{1d517}",tfr:"\u{1d531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\u{1d54b}",topf:"\u{1d565}",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\u{1d4af}",tscr:"\u{1d4c9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\u{1d518}",ufr:"\u{1d532}",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1d54c}",uopf:"\u{1d566}",UpArrow:"\u2191",Uparrow:"\u21d1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\u{1d4b0}",uscr:"\u{1d4ca}",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\u{1d519}",vfr:"\u{1d533}",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\u{1d54d}",vopf:"\u{1d567}",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\u{1d4b1}",vscr:"\u{1d4cb}",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1d51a}",wfr:"\u{1d534}",Wopf:"\u{1d54e}",wopf:"\u{1d568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1d4b2}",wscr:"\u{1d4cc}",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\u{1d51b}",xfr:"\u{1d535}",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\u{1d54f}",xopf:"\u{1d569}",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\u{1d4b3}",xscr:"\u{1d4cd}",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\u{1d51c}",yfr:"\u{1d536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1d550}",yopf:"\u{1d56a}",Yscr:"\u{1d4b4}",yscr:"\u{1d4ce}",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\xff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\u{1d537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\u{1d56b}",Zscr:"\u{1d4b5}",zscr:"\u{1d4cf}",zwj:"\u200d",zwnj:"\u200c"}),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,o=/[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]/,a=new RegExp("[\\-\\.0-9"+o.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+o.source+a.source+"*(?::"+o.source+a.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,o,a,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,a),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,h=e.slice(t,c),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(l,h=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:"/"===(h=e.slice(t,c)).slice(-1)&&(r.closed=!0,h=h.slice(0,-1));case 2:2===u&&(h=l),4==u?(i.warning('attribute "'+h+'" missed quot(")!'),s(l,h,t)):(n.isHTML(o[""])&&h.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),s(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"\x80":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 h=e.slice(t,c);i.warning('attribute "'+h+'" missed quot(")!!'),s(l,h,t);case 5:u=6}else switch(u){case 2:r.tagName,n.isHTML(o[""])&&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 o=e.tagName,a=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),h="xmlns"===u&&d;else d=l,u=null,h="xmlns"===l&&"";s.localName=d,!1!==h&&(null==a&&(a={},p(r,r={})),r[h]=a[h]=c,s.uri=n.XMLNS,t.startPrefixMapping(h,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=o.indexOf(":"))>0?(u=e.prefix=o.slice(0,m),d=e.localName=o.slice(m+1)):(u=null,d=e.localName=o);var f=e.uri=r[u||""];if(t.startElement(f,d,o,e),!e.closed)return e.currentNSMap=r,e.localNSMap=a,!0;if(t.endElement(f,d,o),a)for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&t.endPrefixMapping(u)}function h(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var a=e.indexOf("</"+r+">",t),i=e.substring(t+1,a);if(/[&<]/.test(i))return/^script$/i.test(r)?(o.characters(i,0,i.length),a):(i=i.replace(/&#?\w+;/g,n),o.characters(i,0,i.length),a)}return t+1}function m(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function p(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)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var a=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(o.lastIndex=t,o.exec(e);r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),i=a.length;if(i>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],l=!1,c=!1;i>3&&(/^public$/i.test(a[2][0])?(l=a[3][0],c=i>4&&a[4][0]):/^system$/i.test(a[2][0])&&(c=a[3][0]));var u=a[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 o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function b(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,l.prototype={parse:function(e,t,r){var o=this.domBuilder;o.startDocument(),p(t,t={}),function(e,t,r,o,a){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"))):(a.error("entity not found:"+e),e)}function l(t){if(t>E){var r=e.substring(E,t).replace(/&#?\w+;/g,i);w&&p(E),o.characters(r,0,t-E),E=t}}function p(t,r){for(;t>=y&&(r=v.exec(e));)x=r.index,y=x+r[0].length,w.lineNumber++;w.columnNumber=t-x+1}for(var x=0,y=0,v=/.*(?:\r\n?|\n)|.*$/g,w=o.locator,A=[{currentNSMap:t}],C={},E=0;;){try{var S=e.indexOf("<",E);if(S<0){if(!e.substr(E).match(/^\s*$/)){var _=o.doc,T=_.createTextNode(e.substr(E));_.appendChild(T),o.currentElement=T}return}switch(S>E&&l(S),e.charAt(S+1)){case"/":var q=e.indexOf(">",S+3),k=e.substring(S+2,q).replace(/[ \t\n\r]+$/g,""),N=A.pop();q<0?(k=e.substring(S+2).replace(/[\s<].*/,""),a.error("end tag name: "+k+" is not complete:"+N.tagName),q=S+1+k.length):k.match(/\s</)&&(k=k.replace(/[\s<].*/,""),a.error("end tag name: "+k+" maybe not complete"),q=S+1+k.length);var L=N.localNSMap,O=N.tagName==k;if(O||N.tagName&&N.tagName.toLowerCase()==k.toLowerCase()){if(o.endElement(N.uri,N.localName,k),L)for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&o.endPrefixMapping(M);O||a.fatalError("end tag name: "+k+" is not match the current start tagName:"+N.tagName)}else A.push(N);q++;break;case"?":w&&p(S),q=g(e,S,o);break;case"!":w&&p(S),q=f(e,S,o,a);break;default:w&&p(S);var D=new b,B=A[A.length-1].currentNSMap,$=(q=u(e,S,D,B,i,a),D.length);if(!D.closed&&m(e,q,D.tagName,C)&&(D.closed=!0,r.nbsp||a.warning("unclosed xml attribute")),w&&$){for(var I=c(w,{}),R=0;R<$;R++){var P=D[R];p(P.offset),P.locator=c(w,{})}o.locator=I,d(D,o,B)&&A.push(D),o.locator=w}else d(D,o,B)&&A.push(D);n.isHTML(D.uri)&&!D.closed?q=h(e,q,D.tagName,i,o):q++}}catch(e){if(e instanceof s)throw e;a.error("element parse error: "+e),q=-1}q>E?E=q:l(Math.max(S,E)+1)}}(e,t,r,o,this.errorHandler),o.endDocument()}},b.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 o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=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}),o(r(828),t),o(r(5975),t),o(r(799),t),o(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,n=""){const o=t.length>0?t:void 0!==n?[n]:[];return new r(o)._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[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 o=r(1168);Object.defineProperty(t,"ParenthesisWrapper",{enumerable:!0,get:function(){return o.ParenthesisWrapper}});var a=r(5025);Object.defineProperty(t,"GenericWrapper",{enumerable:!0,get:function(){return a.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),o=r(8917),a=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 o.InvalidNumberOfChildrenError(e,2,r);const a=(0,n.mathMLElementToLaTeXConverter)(t[0]).convert(),i=(0,n.mathMLElementToLaTeXConverter)(t[1]).convert();return this._applyCommand(a,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 a.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.MSpace=t.MRow=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 o=r(7037);Object.defineProperty(t,"MI",{enumerable:!0,get:function(){return o.MI}});var a=r(3487);Object.defineProperty(t,"MO",{enumerable:!0,get:function(){return a.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 h=r(2631);Object.defineProperty(t,"MEnclose",{enumerable:!0,get:function(){return h.MEnclose}});var m=r(1840);Object.defineProperty(t,"MError",{enumerable:!0,get:function(){return m.MError}});var p=r(7443);Object.defineProperty(t,"MPhantom",{enumerable:!0,get:function(){return p.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 b=r(1358);Object.defineProperty(t,"MSubsup",{enumerable:!0,get:function(){return b.MSubsup}});var x=r(8303);Object.defineProperty(t,"MMultiscripts",{enumerable:!0,get:function(){return x.MMultiscripts}});var y=r(3951);Object.defineProperty(t,"MText",{enumerable:!0,get:function(){return y.MText}});var v=r(1222);Object.defineProperty(t,"MUnderover",{enumerable:!0,get:function(){return v.MUnderover}});var w=r(2350);Object.defineProperty(t,"MTable",{enumerable:!0,get:function(){return w.MTable}});var A=r(1586);Object.defineProperty(t,"MTr",{enumerable:!0,get:function(){return A.MTr}});var C=r(4760);Object.defineProperty(t,"GenericSpacingWrapper",{enumerable:!0,get:function(){return C.GenericSpacingWrapper}});var E=r(9376);Object.defineProperty(t,"GenericUnderOver",{enumerable:!0,get:function(){return E.GenericUnderOver}});var S=r(6346);Object.defineProperty(t,"MRow",{enumerable:!0,get:function(){return S.MRow}});var _=r(3700);Object.defineProperty(t,"MSpace",{enumerable:!0,get:function(){return _.MSpace}});var T=r(9165);Object.defineProperty(t,"Void",{enumerable:!0,get:function(){return T.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),o=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,o.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),o=r(4279);t.MFenced=class{constructor(e){this._mathmlElement=e,this.open=this._mathmlElement.attributes.open||"",this.close=this._mathmlElement.attributes.close||""}convert(){const e=this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert()));if(this._isThereRelativeOfName(this._mathmlElement.children,"mtable"))return new i(this.open,this.close).apply(e);const t=this._mathmlElement.attributes.separators,r=void 0!==t,o=t?Array.from(t):[],s=r?"":",";return new a(this.open,this.close,o,s).apply(e)}_isThereRelativeOfName(e,t){return e.some((e=>e.name===t||this._isThereRelativeOfName(e.children,t)))}};class a{constructor(e,t,r,n){this.separators=r,this.defaultSeparator=n,this.open=e||"(",this.close=t||")"}apply(e){const t=o.JoinWithManySeparators.join(e,this.separators,this.defaultSeparator);return new o.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 o.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),o=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 a=(0,o.mathMLElementToLaTeXConverter)(e[0]).convert(),i=(0,o.mathMLElementToLaTeXConverter)(e[1]).convert();return this._isBevelled()?`${this._wrapIfMoreThanOneChar(a)}/${this._wrapIfMoreThanOneChar(i)}`:`\\frac{${a}}{${i}}`}_wrapIfMoreThanOneChar(e){return(new o.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),o=r(5406),a=r(6122);t.MI=class{constructor(e){this.utf8Converter=new a.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),o=this.utf8Converter.convert(r);return o!==r?o: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 a.HashUTF8ToLtXConverter).convert(this._value)}_findByCharacter(){return o.allMathSymbolsByChar[this._value]}_findByGlyph(){return o.allMathSymbolsByGlyph[this._value]}_findByNumber(){return o.mathNumberByGlyph[this._value]}}},8303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MMultiscripts=void 0;const n=r(4279),o=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 o.InvalidNumberOfChildrenError(e,3,r,"at least");const a=(0,n.mathMLElementToLaTeXConverter)(t[0]).convert();return this._prescriptLatex()+this._wrapInParenthesisIfThereIsSpace(a)+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),o=r(5406);t.MN=class{constructor(e){this._mathmlElement=e}convert(){const e=(0,n.normalizeWhiteSpaces)(this._mathmlElement.value).trim();return o.mathNumberByGlyph[e]||e}}},3487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MO=void 0;const n=r(4279),o=r(5406);t.MO=class{constructor(e){this._mathmlElement=e}convert(){const e=(0,n.normalizeWhiteSpaces)(this._mathmlElement.value).trim();return a.operate(e)}};class a{constructor(e){this._value=e}static operate(e){return new a(e)._operate()}_operate(){return this._findByCharacter()||this._findByGlyph()||this._findByNumber()||(new o.HashUTF8ToLtXConverter).convert(this._value)}_findByCharacter(){return o.allMathOperatorsByChar[this._value]}_findByGlyph(){return o.allMathOperatorsByGlyph[this._value]}_findByNumber(){return o.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),o=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 o.InvalidNumberOfChildrenError(e,2,r);const a=(0,n.mathMLElementToLaTeXConverter)(t[0]).convert();return`\\sqrt[${(0,n.mathMLElementToLaTeXConverter)(t[1]).convert()}]{${a}}`}}},6346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MRow=void 0;const n=r(4279);t.MRow=class{constructor(e){this._mathmlElement=e}convert(){return this._isLinearSystemPattern()?this._convertAsLinearSystem():this._mathmlElement.children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" ")}_isLinearSystemPattern(){const{children:e}=this._mathmlElement;if(3!==e.length)return!1;const t=e[0],r="mo"===t.name&&"{"===t.value.trim(),n="mtable"===e[1].name,o=e[2],a="mo"===o.name&&""===o.value.trim();return r&&n&&a}_convertAsLinearSystem(){return`\\begin{cases} ${this._mathmlElement.children[1].children.map((e=>(0,n.mathMLElementToLaTeXConverter)(e))).map((e=>e.convert())).join(" \\\\ ")} \\end{cases}`}}},3700:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSpace=void 0,t.MSpace=class{constructor(e){this._mathmlElement=e}convert(){const{linebreak:e}=this._mathmlElement.attributes;return"newline"===e?" \\\\ ":" "}}},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),o=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 o.InvalidNumberOfChildrenError(e,2,r);const n=t[0],a=t[1];return`${this._handleBaseChild(n)}_${this._handleSubscriptChild(a)}`}_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),o=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 o.InvalidNumberOfChildrenError(e,3,r);const n=t[0],a=t[1],i=t[2];return`${this._handleBaseChild(n)}_${this._handleSubscriptChild(a)}^${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),o=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 o.InvalidNumberOfChildrenError(e,2,r);const n=t[0],a=t[1];return`${this._handleBaseChild(n)}^${this._handleExponentChild(a)}`}_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 o(e.mathvariant).apply(t.value):new n.MI({name:"mi",attributes:{},children:[],value:t.value}).convert())).join("")}};class o{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),o=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 o.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 o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}: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}),a=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MathMLElementToLatexConverterAdapter=void 0;const i=a(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.MRow,mspace:i.MSpace,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 o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=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}),o(r(9548),t),o(r(5243),t),o(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 o=n(r(8978));t.XmlToMathMLAdapter=class{constructor(e,t){this._xml="",this._elementsConvertor=e,this._errorHandler=t,this._xmlDOM=new o.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 o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=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}),o(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 o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=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}),o(r(3798),t)},3798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MathMLToLaTeX=void 0;const n=r(5443),o=r(7941);t.MathMLToLaTeX=class{static convert(e){return(0,o.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","˘":"","ˍ":"\\_","ˋ":"\u02cb","ˊ":"\u02ca","ˉ":"\u02c9","ˇ":"","ˆ":"\\hat","º":"o","¹":"1","¸":"\xb8","´":"\xb4","³":"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","\u23e1":"\\underbrace","\u23e0":"\\overbrace","\u23df":"\\underbrace","\u23de":"\\overbrace","\u23dd":"\\underbrace","\u23dc":"\\overbrace","\u23b5":"\\underbrace","\u23b4":"\\overbrace","\u20dc":"\\square","\u20db":"\\square","\u2064":"","\u2057":"''''","\u203e":"\\overline","\u2037":"```","\u2036":"``","\u2035":"`","\u2034":"'''","\u2033":"''","\u201f":"``","\u201e":",,","\u201b":"`","\u201a":",","^":"\\hat","\u02f7":"\\sim","\u02dd":"\\sim","\u02dc":"\\sim","\u02da":"\\circ","\u02d9":"\\cdot","\u02d8":" ",\u02cd:"\\_",\u02cb:"\u02cb",\u02ca:"\u02ca",\u02c9:"\u02c9",\u02c7:"",\u02c6:"\\hat",\u00ba:"o","\xb9":"1","\xb8":",","\xb4":"\xb4","\xb3":"3","\xb2":"2","\xb0":"\\circ","\xaf":"\\bar",\u00aa:"a","\u219b":"\\nrightarrow","\xa8":"\\cdot\\cdot","~":"\\sim","`":"`","--":"--","++":"++","&":"\\&","\u221c":"\\sqrt[4]{}","\u221b":"\\sqrt[3]{}","\u221a":"\\sqrt{}",\u2146:"d",\u2145:"\\mathbb{D}","?":"?","@":"@","//":"//","!!":"!!","!":"!","\u266f":"\\#","\u266e":"","\u266d":"","\u2032":"'","<>":"<>","**":"\\star\\star","\u2207":"\\nabla","\u2202":"\\partial","\u2299":"\\bigodot","\xac":"\\neg","\u2222":"\\measuredangle","\u2221":"\\measuredangle","\u2220":"\\angle","\xf7":"\\div","/":"/","\u2216":"\\backslash","\\":"\\backslash","%":"\\%","\u2297":"\\bigotimes","\xb7":"\\cdot","\u2a3f":"\\coprod","\u2a2f":"\\times","\u22c5":"\\cdot","\u22a1":"\\boxdot","\u22a0":"\\boxtimes","\u2062":"","\u2043":"-","\u2022":"\\cdot",".":".","*":"\\star","\u222a":"\\cup","\u2229":"\\cap","\u2210":"\\coprod","\u220f":"\\prod","\u2240":"","\u2aff":"","\u2afc":"\\mid\\mid\\mid","\u2a09":"\\times","\u2a08":"","\u2a07":"","\u2a06":"\\sqcup","\u2a05":"\\sqcap","\u2a02":"\\otimes","\u2a00":"\\odot","\u22c2":"\\cap","\u22c1":"\\vee","\u22c0":"\\wedge","\u2a04":"\\uplus","\u2a03":"\\cup","\u22c3":"\\cup","\u2a1c":"\\underline{\\int}","\u2a1b":"\\overline{\\int}","\u2a1a":"\\int","\u2a19":"\\int","\u2a18":"\\int","\u2a17":"\\int","\u2a16":"\\oint","\u2a15":"\\oint","\u2a14":"\\int","\u2a13":"\\int","\u2a12":"\\int","\u2a11":"\\int","\u2a10":"\\int","\u2a0f":"\\bcancel{\\int}","\u2a0e":"","\u2a0d":"\\hcancel{\\int}","\u2a0c":"\\iiiint","\u2233":"\\oint","\u2232":"\\oint","\u2231":"\\int","\u2230":"\\oiint","\u222f":"\\oiint","\u222e":"\\oint","\u222b":"\\int","\u2a01":"\\oplus","\u2298":"\\oslash","\u2296":"\\ominus","\u2295":"\\oplus","\u222d":"\\iiint","\u222c":"\\iint","\u2a0b":"","\u2a0a":"","\u2211":"\\sum","\u229f":"\\boxminus","\u229e":"\\boxplus","\u2214":"\\dot{+}","\u2213":"+-","\u2212":"-","\xb1":"\\pm","-":"-","+":"+","\u2b46":"\\Rrightarrow","\u2b45":"\\Lleftarrow","\u29f4":":\\rightarrow","\u29ef":"","\u29df":"\\bullet-\\bullet","\u299f":"\\angle","\u299e":"\\measuredangle","\u299d":"\\measuredangle","\u299c":"\\perp","\u299b":"\\measuredangle","\u299a":"","\u2999":"\\vdots","\u297f":"","\u297e":"","\u297d":"\\prec","\u297c":"\\succ","\u297b":"\\underset{\\rightarrow}{\\supset}","\u297a":"","\u2979":"\\underset{\\rightarrow}{\\subset}","\u2978":"\\underset{\\rightarrow}{>}","\u2977":"","\u2976":"\\underset{\\leftarrow}{<}","\u2975":"\\underset{\\approx}{\\rightarrow}","\u2974":"\\underset{\\sim}{\\rightarrow}","\u2973":"\\underset{\\sim}{\\leftarrow}","\u2972":"\\overset{\\sim}{\\rightarrow}","\u2971":"\\overset{=}{\\rightarrow}","\u2970":"","\u296f":"","\u296e":"","\u296d":"\\overline{\\rightharpoondown}","\u296c":"\\underline{\\rightharpoonup}","\u296b":"\\overline{\\leftharpoondown}","\u296a":"\\underline{\\leftharpoonup}","\u2969":"\\rightleftharpoons","\u2968":"\\rightleftharpoons","\u2967":"\\rightleftharpoons","\u2966":"\\rightleftharpoons","\u2965":"\\Downarrow","\u2964":"\\Rightarrow","\u2963":"\\Uparrow","\u2962":"\\Leftarrow","\u2961":"\\downarrow","\u2960":"\\uparrow","\u295f":"\\rightarrow","\u295e":"\\leftarrow","\u295d":"\\downarrow","\u295c":"\\uparrow","\u295b":"\\rightarrow","\u295a":"\\leftarrow","\u2959":"\\downarrow","\u2958":"\\uparrow","\u2957":"\\rightarrow","\u2956":"\\leftarrow","\u2955":"\\downarrow","\u2954":"\\uparrow","\u2953":"\\rightarrow","\u2952":"\\leftarrow","\u2951":"\\updownarrow","\u2950":"\\leftrightarrow","\u294f":"\\updownarrow","\u294e":"\\leftrightarrow","\u294d":"\\updownarrow","\u294c":"\\updownarrow","\u294b":"\\leftrightarrow","\u294a":"\\leftrightarrow","\u2949":"","\u2948":"\\leftrightarrow","\u2947":"\\nrightarrow","\u2946":"","\u2945":"","\u2944":"\\rightleftarrows","\u2943":"\\leftrightarrows","\u2942":"\\rightleftarrows","\u2941":"\\circlearrowright","\u2940":"\\circlearrowleft","\u293f":"\\rightarrow","\u293e":"\\leftarrow","\u293d":"\\leftarrow","\u293c":"\\rightarrow","\u293b":"\\rightarrow","\u293a":"\\leftarrow","\u2939":"\\downarrow","\u2938":"\\downarrow","\u2937":"\\Rsh","\u2936":"\\Lsh","\u2935":"\\downarrow","\u2934":"\\uparrow","\u2933":"\\rightarrow","\u2932":"\\leftarrow","\u2931":" ","\u2930":" ","\u292f":" ","\u292e":" ","\u292d":" ","\u292c":"\\times","\u292b":"\\times","\u292a":" ","\u2929":" ","\u2928":" ","\u2927":" ","\u2926":" ","\u2925":" ","\u2924":" ","\u2923":" ","\u2922":" ","\u2921":" ","\u2920":"\\mapsto\\cdot","\u291f":"\\cdot\\leftarrow","\u291e":"\\rightarrow\\cdot","\u291d":"\\leftarrow","\u291c":"\\rightarrow","\u291b":"\\leftarrow","\u291a":"\\rightarrow","\u2919":"\\leftarrow","\u2918":"\\rightarrow","\u2917":"\\rightarrow","\u2916":"\\rightarrow","\u2915":"\\rightarrow","\u2914":"\\rightarrow","\u2913":"\\downarrow","\u2912":"\\uparrow","\u2911":"\\rightarrow","\u2910":"\\rightarrow","\u290f":"\\rightarrow","\u290e":"\\leftarrow","\u290d":"\\rightarrow","\u290c":"\\leftarrow","\u290b":"\\Downarrow","\u290a":"\\Uparrow","\u2909":"\\uparrow","\u2908":"\\downarrow","\u2907":"\\Rightarrow","\u2906":"\\Leftarrow","\u2905":"\\mapsto","\u2904":"\\nLeftrightarrow","\u2903":"\\nRightarrow","\u2902":"\\nLeftarrow","\u2901":"\\rightsquigarrow","\u2900":"\\rightsquigarrow","\u27ff":"\\rightsquigarrow","\u27fe":"\\Rightarrow","\u27fd":"\\Leftarrow","\u27fc":"\\mapsto","\u27fb":"\\leftarrow","\u27fa":"\\Longleftrightarrow","\u27f9":"\\Longrightarrow","\u27f8":"\\Longleftarrow","\u27f7":"\\leftrightarrow","\u27f6":"\\rightarrow","\u27f5":"\\leftarrow","\u27f1":"\\Downarrow","\u27f0":"\\Uparrow","\u22b8":"\\rightarrow","\u21ff":"\\leftrightarrow","\u21fe":"\\rightarrow","\u21fd":"\\leftarrow","\u21fc":"\\nleftrightarrow","\u21fb":"\\nrightarrow","\u21fa":"\\nleftarrow","\u21f9":"\\nleftrightarrow","\u21f8":"\\nrightarrow","\u21f7":"\\nleftarrow","\u21f6":"\\Rrightarrow","\u21f5":"","\u21f4":"\\rightarrow","\u21f3":"\\Updownarrow","\u21f2":"\\searrow","\u21f1":"\\nwarrow","\u21f0":"\\Leftarrow","\u21ef":"\\Uparrow","\u21ee":"\\Uparrow","\u21ed":"\\Uparrow","\u21ec":"\\Uparrow","\u21eb":"\\Uparrow","\u21ea":"\\Uparrow","\u21e9":"\\Downarrow","\u21e8":"\\Rightarrow","\u21e7":"\\Uparrow","\u21e6":"\\Leftarrow","\u21e5":"\\rightarrow","\u21e4":"\\leftarrow","\u21e3":"\\downarrow","\u21e2":"\\rightarrow","\u21e1":"\\uparrow","\u21e0":"\\leftarrow","\u21df":"\\downarrow","\u21de":"\\uparrow","\u21dd":"\\rightsquigarrow","\u21dc":"\\leftarrow","\u21db":"\\Rrightarrow","\u21da":"\\Lleftarrow","\u21d9":"\\swarrow","\u21d8":"\\searrow","\u21d7":"\\nearrow","\u21d6":"\\nwarrow","\u21d5":"\\Updownarrow","\u21d4":"\\Leftrightarrow","\u21d3":"\\Downarrow","\u21d2":"\\Rightarrow","\u21d1":"\\Uparrow","\u21d0":"\\Leftarrow","\u21cf":"\\nRightarrow","\u21ce":"\\nLeftrightarrow","\u21cd":"\\nLeftarrow","\u21cc":"\\rightleftharpoons","\u21cb":"\\leftrightharpoons","\u21ca":"\\downdownarrows","\u21c9":"\\rightrightarrows","\u21c8":"\\upuparrows","\u21c7":"\\leftleftarrows","\u21c6":"\\leftrightarrows","\u21c5":"","\u21c4":"\\rightleftarrows","\u21c3":"\\downharpoonleft","\u21c2":"\\downharpoonright","\u21c1":"\\rightharpoondown","\u21c0":"\\rightharpoonup","\u21bf":"\\upharpoonleft","\u21be":"\\upharpoonright","\u21bd":"\\leftharpoondown","\u21bc":"\\leftharpoonup","\u21bb":"\\circlearrowright","\u21ba":"\\circlearrowleft","\u21b9":"\\leftrightarrows","\u21b8":"\\overline{\\nwarrow}","\u21b7":"\\curvearrowright","\u21b6":"\\curvearrowleft","\u21b5":"\\swarrow","\u21b4":"\\searrow","\u21b3":"\\Rsh","\u21b2":"\\Lsh","\u21b1":"\\Rsh","\u21b0":"\\Lsh","\u21af":"\\swarrow","\u21ae":"","\u21ad":"\\leftrightsquigarrow","\u21ac":"\\looparrowright","\u21ab":"\\looparrowleft","\u21aa":"\\hookrightarrow","\u21a9":"\\hookleftarrow","\u21a8":"\\underline{\\updownarrow}","\u21a7":"\\downarrow","\u21a6":"\\rightarrowtail","\u21a5":"\\uparrow","\u21a4":"\\leftarrowtail","\u21a3":"\\rightarrowtail","\u21a2":"\\leftarrowtail","\u21a1":"\\downarrow","\u21a0":"\\twoheadrightarrow","\u219f":"\\uparrow","\u219e":"\\twoheadleftarrow","\u219d":"\\nearrow","\u219c":"\\nwarrow","\u219a":"","\u2199":"\\swarrow","\u2198":"\\searrow","\u2197":"\\nearrow","\u2196":"\\nwarrow","\u2195":"\\updownarrow","\u2194":"\\leftrightarrow","\u2193":"\\downarrow","\u2192":"\\rightarrow","\u2191":"\\uparrow","\u2190":"\\leftarrow","|||":"\\left|||\\right.","||":"\\left||\\right.","|":"\\mid","\u2afe":"","\u2afd":"//","\u2afb":"///","\u2afa":"","\u2af9":"","\u2af8":"","\u2af7":"","\u2af6":"\\vdots","\u2af5":"","\u2af4":"","\u2af3":"","\u2af2":"\\nparallel","\u2af1":"","\u2af0":"","\u2aef":"","\u2aee":"\\bcancel{\\mid}","\u2aed":"","\u2aec":"","\u2aeb":"","\u2aea":"","\u2ae9":"","\u2ae8":"\\underline{\\perp}","\u2ae7":"\\overline{\\top}","\u2ae6":"","\u2ae5":"","\u2ae4":"","\u2ae3":"","\u2ae2":"","\u2ae1":"","\u2ae0":"\\perp","\u2adf":"\\top","\u2ade":"\\dashv","\u2add\u0338":"","\u2add":"","\u2adb":"\\pitchfork","\u2ada":"","\u2ad9":"","\u2ad8":"","\u2ad7":"","\u2ad6":"","\u2ad5":"","\u2ad4":"","\u2ad3":"","\u2ad2":"","\u2ad1":"","\u2ad0":"","\u2acf":"","\u2ace":"","\u2acd":"","\u2acc":"\\underset{\\neq}{\\supset}","\u2acb":"\\underset{\\neq}{\\subset}","\u2aca":"\\underset{\\approx}{\\supset}","\u2ac9":"\\underset{\\approx}{\\subset}","\u2ac8":"\\underset{\\sim}{\\supset}","\u2ac7":"\\underset{\\sim}{\\subset}","\u2ac6":"\\supseteqq","\u2ac5":"\\subseteqq","\u2ac4":"\\dot{\\supseteq}","\u2ac3":"\\dot{\\subseteq}","\u2ac2":"\\underset{\\times}{\\supset}","\u2ac1":"\\underset{\\times}{\\subset}","\u2ac0":"\\underset{+}{\\supset}","\u2abf":"\\underset{+}{\\subset}","\u2abe":"","\u2abd":"","\u2abc":"\\gg ","\u2abb":"\\ll","\u2aba":"\\underset{\\cancel{\\approx}}{\\succ}","\u2ab9":"\\underset{\\cancel{\\approx}}{\\prec}","\u2ab8":"\\underset{\\approx}{\\succ}","\u2ab7":"\\underset{\\approx}{\\prec}","\u2ab6":"\\underset{\\cancel{=}}{\\succ}","\u2ab5":"\\underset{\\cancel{=}}{\\prec}","\u2ab4":"\\underset{=}{\\succ}","\u2ab3":"\\underset{=}{\\prec}","\u2ab2":"","\u2ab1":"","\u2aae":"","\u2aad":"\\underline{\\hcancel{>}}","\u2aac":"\\underline{\\hcancel{>}}","\u2aab":"\\hcancel{>}","\u2aaa":"\\hcancel{<}","\u2aa9":"","\u2aa8":"","\u2aa7":"\\vartriangleright","\u2aa6":"\\vartriangleleft","\u2aa5":"><","\u2aa4":"><","\u2aa3":"\\underline{\\ll}","\u2aa2\u0338":"\\cancel{\\gg}","\u2aa2":"\\gg","\u2aa1\u0338":"\\cancel{\\ll}","\u2aa1":"\\ll","\u2aa0":"\\overset{\\sim}{\\geqq}","\u2a9f":"\\overset{\\sim}{\\leqq}","\u2a9e":"\\overset{\\sim}{>}","\u2a9d":"\\overset{\\sim}{<}","\u2a9c":"","\u2a9b":"","\u2a9a":"\\overset{=}{>}","\u2a99":"\\overset{=}{<}","\u2a98":"","\u2a97":"","\u2a96":"","\u2a95":"","\u2a94":"","\u2a93":"","\u2a92":"\\underset{=}{\\gtrless}","\u2a91":"\\underset{=}{\\lessgtr}","\u2a90":"\\underset{<}{\\gtrsim}","\u2a8f":"\\underset{>}{\\lesssim}","\u2a8e":"\\underset{\\simeq}{>}","\u2a8d":"\\underset{\\simeq}{<}","\u2a8c":"\\gtreqqless","\u2a8b":"\\lesseqqgtr","\u2a8a":"\\underset{\\cancel{\\approx}}{>}","\u2a89":"\\underset{\\approx}{<}","\u2a86":"\\underset{\\approx}{>}","\u2a85":"\\underset{\\approx}{<}","\u2a84":"","\u2a83":"","\u2a82":"","\u2a81":"","\u2a80":"","\u2a7f":"","\u2a7e\u0338":"\\bcancel{\\geq}","\u2a7e":"\\geq","\u2a7d\u0338":"\\bcancel{\\leq}","\u2a7d":"\\leq","\u2a7c":"","\u2a7b":"","\u2a7a":"","\u2a79":"","\u2a78":"\\overset{\\dots}{\\equiv}","\u2a77":"","\u2a76":"===","\u2a75":"==","\u2a74":"::=","\u2a73":"","\u2a72":"\\underset{=}{+}","\u2a71":"\\overset{=}{+}","\u2a70":"\\overset{\\approx}{=}","\u2a6f":"\\overset{\\wedge}{=}","\u2a6e":"\\overset{*}{=}","\u2a6d":"\\dot{\\approx}","\u2a6c":"","\u2a6b":"","\u2a6a":"\\dot{\\sim}","\u2a69":"","\u2a68":"","\u2a67":"\\dot{\\equiv}","\u2a66":"\\underset{\\cdot}{=}","\u2a65":"","\u2a64":"","\u2a63":"\\underset{=}{\\vee}","\u2a62":"\\overset{=}{\\vee}","\u2a61":"ul(vv)","\u2a60":"\\underset{=}{\\wedge}","\u2a5f":"\\underline{\\wedge}","\u2a5e":"\\overset{=}{\\wedge}","\u2a5d":"\\hcancel{\\vee}","\u2a5c":"\\hcancel{\\wedge}","\u2a5b":"","\u2a5a":"","\u2a59":"","\u2a58":"\\vee","\u2a57":"\\wedge","\u2a56":"","\u2a55":"","\u2a54":"","\u2a53":"","\u2a52":"\\dot{\\vee}","\u2a51":"\\dot{\\wedge}","\u2a50":"","\u2a4f":"","\u2a4e":"","\u2a4d":"\\overline{\\cap}","\u2a4c":"\\overline{\\cup}","\u2a4b":"","\u2a4a":"","\u2a49":"","\u2a48":"","\u2a47":"","\u2a46":"","\u2a45":"","\u2a44":"","\u2a43":"\\overline{\\cap}","\u2a42":"\\overline{\\cup}","\u2a41":"","\u2a40":"","\u2a3e":"","\u2a3d":"\\llcorner","\u2a3c":"\\lrcorner","\u2a3b":"","\u2a3a":"","\u2a39":"","\u2a38":"","\u2a37":"","\u2a36":"\\hat{\\otimes}","\u2a35":"","\u2a34":"","\u2a33":"","\u2a32":"\\underline{\\times}","\u2a31":"\\underline{\\times}","\u2a30":"\\dot{\\times}","\u2a2e":"\\bigodot","\u2a2d":"\\bigodot","\u2a2c":"","\u2a2b":"","\u2a2a":"","\u2a29":"","\u2a28":"","\u2a27":"","\u25fb":"\\Box","\u2a26":"\\underset{\\sim}{+}","\u2a25":"\\underset{\\circ}{+}","\u2a24":"\\overset{\\sim}{+}","\u2a23":"\\hat{+}","\u2a22":"\\dot{+}","\u2a21":"\\upharpoonright","\u2a20":">>","\u2a1f":"","\u2a1e":"\\triangleleft","\u2a1d":"\\bowtie","\u29ff":"","\u29fe":"+","\u29fb":"\\hcancel{|||}","\u29fa":"\\hcancel{||}","\u29f9":"\\backslash","\u29f8":"/","\u29f7":"hcancel{\backslash}","\u29f6":"","\u29f5":"\\backslash","\u29f2":"\\Phi","\u29f1":"","\u29f0":"","\u29ee":"","\u29ed":"","\u29ec":"","\u29eb":"\\lozenge","\u29ea":"","\u29e9":"","\u29e8":"","\u29e7":"\\ddagger","\u29e2":"\\sqcup\\sqcup","\u29e1":"","\u29e0":"\\square","\u29de":"","\u29dd":"","\u29dc":"","\u29db":"\\{\\{","\u29d9":"\\{","\u29d8":"\\}","\u29d7":"","\u29d6":"","\u29d5":"\\bowtie","\u29d4":"\\bowtie","\u29d3":"\\bowtie","\u29d2":"\\bowtie","\u29d1":"\\bowtie","\u29d0\u0338":"| \\not\\triangleright","\u29d0":"| \\triangleright","\u29cf\u0338":"\\not\\triangleleft |","\u29cf":"\\triangleleft |","\u29ce":"","\u29cd":"\\triangle","\u29cc":"","\u29cb":"\\underline{\\triangle}","\u29ca":"\\dot{\\triangle}","\u29c9":"","\u29c8":"\\boxed{\\circ}","\u29c7":"\\boxed{\\circ}","\u29c6":"\\boxed{\\rightarrow}","\u29c5":"\\bcancel{\\square}","\u29c4":"\\cancel{\\square}","\u29c3":"\\odot","\u29c2":"\\odot","\u29bf":"\\odot","\u29be":"\\odot","\u29bd":"\\varnothing","\u29bc":"\\oplus","\u29bb":"\\otimes","\u29ba":"","\u29b9":"\\varnothing","\u29b8":"\\varnothing","\u29b7":"\\ominus","\u29b6":"\\ominus","\u29b5":"\\ominus","\u29b4":"\\vec{\\varnothing}","\u29b3":"\\vec{\\varnothing}","\u29b2":"\\dot{\\varnothing}","\u29b1":"\\overline{\\varnothing}","\u29b0":"\\varnothing","\u29af":"\\measuredangle","\u29ae":"\\measuredangle","\u29ad":"\\measuredangle","\u29ac":"\\measuredangle","\u29ab":"\\measuredangle","\u29aa":"\\measuredangle","\u29a9":"\\measuredangle","\u29a8":"\\measuredangle","\u29a7":"","\u29a6":"","\u29a5":"","\u29a4":"","\u29a3":"\\ulcorner","\u29a2":"\\measuredangle","\u29a1":"\\not\\lor","\u29a0":"\\bcancel{>}","\u2982":":","\u2981":"\\cdot","\u2758":"\\mid","\u25b2":"\\bigtriangleup","\u22ff":"\\Epsilon","\u22fe":"\\overline{\\ni}","\u22fd":"\\overline{\\ni}","\u22fc":"\\in","\u22fb":"\\in","\u22fa":"\\in","\u22f9":"\\underline{\\in}","\u22f8":"\\underline{\\in}","\u22f7":"\\overline{\\in}","\u22f6":"\\overline{\\in}","\u22f5":"\\dot{\\in}","\u22f4":"\\in","\u22f3":"\\in","\u22f2":"\\in","\u22f0":"\\ddots","\u0589":":","\u22e9":"\\underset{\\sim}{\\succ}","\u22e8":"\\underset{\\sim}{\\prec}","\u22e7":"\\underset{\\not\\sim}{>}","\u22e6":"\\underset{\\not\\sim}{<}","\u22e5":"\\not\\sqsupseteq","\u22e4":"\\not\\sqsubseteq","\u22e3":"\\not\\sqsupseteq","\u22e2":"\\not\\sqsubseteq","\u22e1":"\\nsucc","\u22e0":"\\nprec","\u22df":"\\succ","\u22de":"\\prec","\u22dd":"\\overline{>}","\u22dc":"\\overline{<}","\u22db":"\\underset{>}{\\leq}","\u22da":"\\underset{<}{\\geq}","\u22d5":"\\#","\u22d3":"\\cup","\u22d2":"\\cap","\u22d1":"\\supset","\u22d0":"\\subset","\u22cf":"\\wedge","\u22ce":"\\vee","\u22cd":"\\simeq","\u22c8":"\\Join","\u22c7":"\\ast","\u22c6":"\\star","\u22c4":"\\diamond","\u22bf":"\\triangle","\u22be":"\\measuredangle","\u22bd":"\\overline{\\lor}","\u22bc":"\\overline{\\land}","\u22bb":"\\underline{\\lor}","\u22ba":"\\top",\u571f:"\\pm",\u5341:"+","\u22b9":"","\u22b7":"\\circ\\multimap","\u22b6":"\\circ\\multimap","\u22b3":"\\triangleright","\u22b2":"\\triangleleft","\u22b1":"\\succ","\u22b0":"\\prec","\u22ab":"|\\models","\u22aa":"|\\models","\u22a7":"\\models","\u22a6":"\\vdash","\u229d":"\\ominus","\u229c":"\\ominus","\u229b":"\\odot","\u229a":"\\odot","\u2294":"\\sqcup","\u2293":"\\sqcap","\u2292":"\\sqsupseteq","\u2291":"\\sqsubseteq","\u2290\u0338":"\\not\\sqsupset","\u2290":"\\sqsupset","\u228f\u0338":"\\not\\sqsubset","\u228f":"\\sqsubset","\u228e":"\\cup","\u228d":"\\cup","\u228c":"\\cup","\u227f\u0338":"\\not\\succsim","\u227f":"\\succsim","\u227e":"\\precsim","\u2279":"\\not\\overset{>}{<}","\u2278":"\\not\\overset{>}{<}","\u2277":"\\overset{>}{<}","\u2276":"\\overset{<}{>}","\u2275":"\\not\\geg","\u2274":"\\not\\leq","\u2273":"\\geg","\u2272":"\\leq","\u226c":"","\u2267":"\\geg","\u2266\u0338":"\\not\\leq","\u2266":"\\leq","\u2263":"\\overset{=}{=} ","\u225e":"\\overset{m}{=} ","\u225d":"\\overset{def}{=}","\u2258":"=","\u2256":"=","\u2255":"=:","\u2253":"\\doteq","\u2252":"\\doteq","\u2251":"\\doteq","\u2250":"\\doteq","\u224f\u0338":"","\u224f":"","\u224e\u0338":"","\u224e":"","\u224c":"\\approx","\u224b":"\\approx","\u224a":"\\approx","\u2242\u0338":"\\neq","\u2242":"=","\u223f":"\\sim","\u223e":"\\infty","\u223d\u0331":"\\sim","\u223d":"\\sim","\u223b":"\\sim","\u223a":":-:","\u2239":"-:","\u2238":"\\bot","\u2237":"::","\u2236":":","\u2223":"\\mid","\u221f":"\\llcorner","\u2218":"\\circ","\u2217":"*","\u2215":"/","\u220e":"\\square","\u220d":"\\ni","\u220a":"\\in","\u2206":"\\Delta","\u2044":"/","\u2ab0\u0338":"\\nsucceq","\u2ab0":"\\succeq","\u2aaf\u0338":"\\npreceq","\u2aaf":"\\preceq","\u2a88":"\\ngeqslant","\u2a87":"\\nleqslant","\u29f3":"\\Phi","\u29e6":"\\models","\u29e5":"\\not\\equiv","\u29e4":"\\approx\\neq","\u29e3":"\\neq","\u29c1":"\\circle","\u29c0":"\\circle","\u25e6":"\\circle","\u25d7":"\\circle","\u25d6":"\\circle","\u25cf":"\\circle","\u25ce":"\\circledcirc","\u25cd":"\\circledcirc","\u25cc":"\\circledcirc","\u25c9":"\\circledcirc","\u25c8":"\\diamond","\u25c7":"\\diamond","\u25c6":"\\diamond","\u25c5":"\\triangleleft","\u25c4":"\\triangleleft","\u25c3":"\\triangleleft","\u25c2":"\\triangleleft","\u25c1":"\\triangleleft","\u25c0":"\\triangleleft","\u25bf":"\\triangledown","\u25be":"\\triangledown","\u25bd":"\\triangledown","\u25bc":"\\triangledown","\u25b9":"\\triangleright","\u25b8":"\\triangleright","\u25b7":"\\triangleright","\u25b6":"\\triangleright","\u25b5":"\\triangle","\u25b4":"\\triangle","\u25b3":"\\triangle","\u25b1":"\\square","\u25b0":"\\blacksquare","\u25af":"\\square","\u25ae":"\\blacksquare","\u25ad":"\\square","\u25ab":"\\square","\u25aa":"\\square","\u25a1":"\\square","\u25a0":"\\blacksquare","\u22ed":"\\not\\triangleright","\u22ec":"\\not\\triangleleft","\u22eb":"\\not\\triangleright","\u22ea":"\\not\\triangleleft","\u22d9":"\\ggg","\u22d8":"\\lll","\u22d7":"*>","\u22d6":"<*","\u22d4":"\\pitchfork","\u22cc":"","\u22cb":"\\bowtie","\u22ca":"\\ltimes","\u22c9":"\\rtimes","\u22b5":"\\triangleright","\\triangleleft":"","\u22a5":"\\bot","\u2281":"\\nsucc","\u2280":"\\preceq","\u227d":"\\succeq","\u227c":"\\preceq","\u227b":"\\succ","\u227a":"\\prec","\u2271":"\\geq/","\u2270":"\\leq/","\u226d":"\\neq","\u226b\u0338":"\\not\\gg","\u226b":"\\gg","\u226a\u0338":"\\not\\ll","\u226a":"\\ll","\u2269":"\\ngeqslant","\u2268":"\\nleqslant","\u2261":"\\equiv","\u225f":"\\doteq","\u225c":"\\triangleq","\u225b":"\\doteq","\u225a":"\\triangleq","\u2259":"\\triangleq","\u2257":"\\doteq","\u2254":":=","\u224d":"\\asymp","\u2247":"\\ncong","\u2246":"\\ncong","\u2245":"\\cong","\u2244":"\\not\\simeq","\u2243":"\\simeq","\u2241":"\\not\\sim","\u2226":"\\not\\parallel","\u2225":"\\parallel","\u2224":"\\not|","\u221d":"\\propto","==":"==","=":"=",":=":":=","/=":"=","-=":"-=","+=":"+=","*=":"*=","!=":"!=","\u2260":"\\neq","\u2262":"\\equiv /","\u2249":"\\approx /","\u223c":"sim","\u2248":"\\approx","\u226e":"</","<":"<","\u226f":">/",">=":">=",">":">","\u2265":"\\geq","\u2264":"\\leq","<=":"<=","\u228b":"\\supsetneq","\u228a":"\\subsetneq","\u2289":"\\nsupseteq","\u2288":"\\nsubseteq","\u2287":"\\supseteq","\u2286":"\\subseteq","\u2285":"\\not\\supset","\u2284":"\\not\\subset","\u2283\u20d2":"\\supset |","\u2283":"\\supset","\u2282\u20d2":"\\subset |","\u2282":"\\subset","\u220c":"\\not\\in","\u2209":"\\notin","\u2208":"\\in","\u2201":"C","\u2204":"\\nexists","\u2203":"\\exists","\u2200":"\\forall","\u2227":"\\land","&&":"\\&\\&","\u2228":"\\lor","\u22af":"\\cancel{\\vDash}","\u22ae":"\\cancel{\\Vdash}","\u22ad":"\\nvDash","\u22ac":"\\nvDash","\u22a9":"\\Vdash","\u22a8":"\\vDash","\u22a4":"\\top","\u22a3":"\\dashv","\u22a2":"\\vdash","\u220b":"\\ni","\u22f1":"\\ddots","\u22ef":"\\hdots","\u22ee":"\\vdots","\u03f6":"\\ni",":":":","...":"\\cdots","..":"..","->":"->","\u2235":"\\because","\u2234":"\\therefore ","\u2063":"\\llbracket",",":",",";":";","\u29fd":"\\}","\u29fc":"\\{","\u2998":"\\]","\u2997":"\\[","\u2996":"\\ll","\u2995":"\\gg","\u2994":"\\gg","\u2993":"\\ll","\u2992":"\\gg","\u2991":"\\ll","\u2990":"\\]","\u298f":"\\]","\u298e":"\\]","\u298d":"\\[","\u298c":"\\[","\u298b":"\\]","\u298a":"\\triangleright","\u2989":"\\triangleleft","\u2988":"|\\)","\u2987":"\\(|","\u2986":"|\\)","\u2985":"\\(\\(","\u2984":"|\\}","\u2983":"\\{|","\u2980":"\\||","\u27ef":"\\left. \\right]","\u27ee":"\\left[ \\right.","\u27ed":"\\left. \\right]]","\u27ec":"\\left[[ \\right.","\u27eb":"\\gg","\u27ea":"\\ll","\u27e7":"\\)|","\u27e6":"\\(|","\u2773":"\\left.\\right)","\u2772":"\\left(\\right.","\u232a":"\\rangle","\u2329":"\\langle","\u230b":"\\rfloor","\u230a":"\\lfloor","\u2309":"\\rceil","\u2308":"\\lceil","\u2016":"\\parallel","}":"\\left.\\right}","{":"\\left{\\right.","]":"\\left]\\right.","[":"\\left[\\right.",")":"\\left.\\right)","(":"\\left(\\right.","\u201d":'\\"',"\u201c":"\\text{``}","\u2019":"'","\u2018":"`",\u03b1:"\\alpha",\u03b2:"\\beta",\u03b3:"\\gamma",\u0393:"\\Gamma",\u03b4:"\\delta",\u0394:"\\Delta",\u03f5:"\\epsilon",\u03b6:"\\zeta",\u03b7:"\\eta",\u03b8:"\\theta",\u0398:"\\Theta",\u03b9:"\\iota",\u03ba:"\\kappa",\u03bb:"\\lambda",\u03bd:"\\nu",\u03bf:"\\omicron",\u03c0:"\\pi",\u03a0:"\\Pi",\u03c1:"\\rho",\u03c3:"\\sigma",\u03a3:"\\Sigma",\u03c4:"\\tau",\u03c5:"\\upsilon",\u03a5:"\\Upsilon",\u03d5:"\\phi",\u03a6:"\\Phi",\u03c7:"\\chi",\u03c8:"\\psi",\u03a8:"\\Psi",\u03c9:"\\omega",\u03a9:"\\Omega",\u2126:"\\Omega","\u2205":"\\emptyset","\u27f2":"\\circlearrowleft","\u27f3":"\\circlearrowright","\xd7":"\\times","\xbd":"\\dfrac{1}{2}",\u03bc:"\\mu",\u04e8:"\\theta","\u2713":"\\checkmark","\u27e9":"\\rangle","\u27e8":"\\langle","\xbc":"\\dfrac{1}{4}","\u2026":"\\ldots",\u210f:"\\hbar",\u211c:"\\mathfrak{R}",\u0472:"\\theta",\u00d8:"\\emptyset",\u03f1:"\\varrho",\u0444:"\\phi",\u2107:"\\varepsilon",T:"T","\u2219":"\\cdot",\u03a1:"P","\u221e":"\\infty",\u1401:"\\nabla",\u019e:"\\eta","\u207a":"^{+}","\u207b":"^{-}","\u207c":"^{=}","\u207d":"^{(}","\u207e":"^{)}","\u3017":"\\)|","\u3016":"\\langle","\u037e":";","\u0d66":"\\circ","\u2534":"\\perp","\u2715":"\\times","\u23bb":"-","\xbb":"\\gg","\u2b06":"\\uparrow","\u2b07":"\\downarrow","\u2b05":"\\leftarrow","\u27a1":"\\rightarrow","\u23bc":"-","\u239c":"\\mid","\u23a5":"\\mid",\u0127:"\\hbar","\u2b95":"\\rightarrow","\u30fb":"\\cdot","\xa6":"\\mid","\xa3":"\\pounds","\xa5":"\\yen","\u2717":"\\times","\u2714":"\\checkmark",\u207f:"^{n}","\xab":"\\ll",\u0e40:"\\prime","\u2020":"\\dagger","\u2502":"\\mid",$:"\\$","#":"\\#","\u2103":"\\text{\\textdegree C}","\u2109":"\\text{\\textdegree F}","\u2588":"\\blacksquare","\u2127":"\\mho",\u2147:"\\text{e}",\u027c:"r","\u2021":"\\ddagger",\u1f31:"i",\u03d2:"\\Upsilon",\u{1d6ff}:"\\delta","\u02f3":"\\cdot",\u0473:"\\theta",\u{1d719}:"\\phi",\u041f:"\\prod",\u043e:"o",\u0452:"\\hbar",\u0245:"\\Lambda","\u0964":"\\mid","\u20ac":"\\euro",\u1fe1:"\\bar{u}",\u03c6:"\\varphi",\u023c:"c",\u{1d7ae}:"\\epsilon",\u03a7:"\\mathsf{X}",\u2099:"_{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","\u202c":"\\text{\\textdir TRT}","\u200e":"\\text{\\textdir LTR}"}},8171:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allMathSymbolsByGlyph=void 0,t.allMathSymbolsByGlyph={" ":"\\textrm{ }","\u2203":"\\exists","\u2200":"\\forall","\u21d4":"\\iff","\u21d2":"\\Rightarrow","\xac":"\\neg","\u25a1":"\\square","\u22c4":"\\diamond","\u25b3":"\\triangle","\u2322":"\\frown","\u2220":"\\angle","\u22f1":"\\ddots","\u22ee":"\\vdots","\u2235":"\\because","\u2234":"\\therefore",\u2135:"\\aleph","\u2205":"\\emptyset","\xb1":"\\pm","\u2207":"\\nabla","\u2202":"\\partial","\u222e":"\\oint","\u222b":"\\int","\u22c3":"\\cup","\u222a":"\\cup","\u22c2":"\\cap","\u2229":"\\cap","\u22c1":"\\vee","\u2228":"\\vee","\u22c0":"\\wedge","\u2227":"\\wedge","\u220f":"\\prod","\u2211":"\\sum","\u2299":"\\bigodot","\u2297":"\\bigoplus","\u2295":"o+","\u2218":"@","\u22c8":"\\bowtie","\u22ca":"\\rtimes","\u22c9":"\\ltimes","\xf7":"\\div","\xd7":"\\times","\\":"\\backslash","\u22c6":"\\star","\u2217":"\\star","\u22c5":"\\cdot",\u03a9:"\\Omega",\u03c9:"\\omega",\u03a8:"\\Psi",\u03c8:"\\psi",\u03c7:"\\chi",\u03c6:"\\varphi",\u03a6:"\\Phi",\u03d5:"\\phi",\u03c5:"\\upsilon",\u03c4:"\\tau",\u03a3:"\\Sigma",\u03c3:"\\sigma",\u03c1:"\\rho",\u03a0:"\\Pi",\u03c0:"\\pi",\u039e:"\\Xi",\u03be:"\\xi",\u03bd:"\\nu",\u03bc:"\\mu",\u039b:"\\Lambda",\u03bb:"\\lambda",\u03ba:"\\kappa",\u03b9:"\\iota",\u03d1:"\\vartheta",\u0398:"\\Theta",\u03b8:"\\theta",\u03b7:"\\eta",\u03b6:"\\zeta",\u025b:"\\varepsilon",\u03b5:"\\epsilon",\u0394:"\\Delta",\u03b4:"\\delta",\u0393:"\\Gamma",\u03b3:"\\gamma",\u03b2:"\\beta",\u03b1:"\\alpha","\u221e":"\\infty",\u03f5:"\\epsilon",\u00b5:"\\mu","\xb2":"^{2}",\u0131:"\\imath","\u220e":"\\blacksquare",\u0e21:"\\mathbf{m}",\u2126:"\\Omega","\u27f2":"\\circlearrowleft","\u27f3":"\\circlearrowright",\u0924:" ","\xa5":"\\yen","\u207d":"^{(}","\u207e":"^{)}",\u00df:"\\ss",\u040b:"\\hbar","\u29b5":"\\ominus","\u22bf":"\\bigtriangleup","\u219b'":"\\nrightarrow","\u2020":"\\dagger",\u0e40:"\\prime",\u767d:" ","\u2ff1":" ",\u2138:"\\wp",\ud4f0:" ",\u207f:"^{n}","\u2714":"\\checkmark","\u2717":"\\times","\xbd":"\\dfrac{1}{2}",\u04e8:"\\theta","\u2713":"\\checkmark","\u27e9":"\\rangle","\u27e8":"\\langle","\u2329":"\\langle","\xbc":"\\dfrac{1}{4}","\u2026":"\\ldots",\u210f:"\\hbar",\u211c:"\\mathfrak{R}",\u0472:"\\theta",\u00d8:"\\emptyset",\u03f1:"\\varrho",\u0444:"\\phi",T:"T","\u2219":"\\cdot",\u03a1:"P",\u1401:"\\nabla",\u019e:"\\eta",\u0263:"\\gamma",\u045b:"\\hbar",\u0190:"\\varepsilon",\u2145:"\\_{D}",\u{1d706}:"\\lambda","\u3017":"\\rangle","\u3016":"\\langle","\u037e":";",\u{1d465}:"x",\u{1d466}:"y",\u{1d467}:"z",\u{1d456}:"i",\u{1d457}:"j",\u{1d458}:"k",\u{1d45a}:"m",\u{1d452}:"e",\u{1d45f}:"r",\u0273:"\\eta",\u{1d6fd}:"\\beta","\u2375":"\\omega",\u2118:"\\wp",\u{1d70b}:"\\pi",\u0404:"\\epsilon",\u0454:"\\epsilon",\u{1d700}:"\\epsilon",\u043f:"\\pi",\u039d:"\\nu",\u0275:"\\theta",\u{1d713}:"\\psi",\u03f4:"\\theta",\u0278:"\\phi",\u04f6:"\\Gamma",\u026d:"\\ell",\u028b:"\\upsilon",\u{1d6df}:"\\varphi","\u236c":"\\theta",\u0424:"\\Phi",\u{1d711}:"\\varphi",\u2148:"i",\u03bf:"o",\u01a1:"o",\u0192:"f","\u2374":"\\rho","\u{1f1fd}":"x",\u{1d45d}:"p",\u{1d45e}:"q",\u{1d460}:"s",\u{1d461}:"t",\u{1d462}:"u",\u{1d463}:"v",\u{1d464}:"w",\u{1d44e}:"a",\u{1d44f}:"b",\u{1d450}:"c",\u{1d451}:"d",\u{1d453}:"f",\u{1d454}:"g",\u{1d459}:"l",\u{1d45b}:"n",\u{1d45c}:"o",\u{1d500}:"w",\u{1d69f}:"v",\u1e41:"m","\u0d66":"\\circ","\u2534":"\\perp","\u2715":"\\times","\u2223":"\\mid",\u0553:"\\Phi","\u239c":"\\mid",\u0127:"\\hbar",\u1348:" ","\u29a8":"\\llbracket",\u1ebf:"\\hat{e}","\xa2":"\\cent","\u2939":"\\downarrow","\u2938":"\\downarrow","\u2937":"\\Rsh","\u2936":"\\Lsh","\u2935":"\\downarrow","\u2934":"\\uparrow","\u2933":"\\rightarrow","|":"\\mid","\u23a5":"\\mid","\u2665":"\\heartsuit",\u041e:"0",\u03a5:"Y",\u0445:"x",\u{1d4cf}:"z",\u{1d4ce}:"y",\u{1d4cd}:"x",\u0440:"p",\u0430:"a","\xa3":"\\pounds",m:"m",\u{1d6b5}:"\\Xi","\u24ea":"\\textcircled{0}","\u2460":"\\textcircled{1}","\u2461":"\\textcircled{2}","\u2462":"\\textcircled{3}","\u2463":"\\textcircled{4}","\u2464":"\\textcircled{5}","\u2465":"\\textcircled{6}","\u2466":"\\textcircled{7}","\u2467":"\\textcircled{8}","\u2468":"\\textcircled{9}","\u2469":"\\textcircled{10}","\u246a":"\\textcircled{11}","\u246b":"\\textcircled{12}","\u246c":"\\textcircled{13}","\u246d":"\\textcircled{14}","\u246e":"\\textcircled{15}","\u246f":"\\textcircled{16}","\u2470":"\\textcircled{17}","\u2471":"\\textcircled{18}","\u2472":"\\textcircled{19}","\u2473":"\\textcircled{20}","\u3251":"\\textcircled{21}","\u3252":"\\textcircled{22}","\u3253":"\\textcircled{23}","\u3254":"\\textcircled{24}","\u3255":"\\textcircled{25}","\u3256":"\\textcircled{26}","\u3257":"\\textcircled{27}","\u3258":"\\textcircled{28}","\u3259":"\\textcircled{29}","\u325a":"\\textcircled{30}","\u325b":"\\textcircled{31}","\u325c":"\\textcircled{32}","\u325d":"\\textcircled{33}","\u325e":"\\textcircled{34}","\u325f":"\\textcircled{35}","\u32b1":"\\textcircled{36}","\u32b2":"\\textcircled{37}","\u32b3":"\\textcircled{38}","\u32b4":"\\textcircled{39}","\u32b5":"\\textcircled{40}","\u32b6":"\\textcircled{41}","\u32b7":"\\textcircled{42}","\u32b8":"\\textcircled{43}","\u32b9":"\\textcircled{44}","\u32ba":"\\textcircled{45}","\u32bb":"\\textcircled{46}","\u32bc":"\\textcircled{47}","\u32bd":"\\textcircled{48}","\u32be":"\\textcircled{49}","\u32bf":"\\textcircled{50}","&":"\\&","\u2016":"\\parallel","%":"\\%","\u201c":"\\text{``}",$:"\\$","#":"\\#","\u2103":"\\text{\\textdegree C}","\u2109":"\\text{\\textdegree F}","\u2588":"\\blacksquare","\u2127":"\\mho","\u230b":"\\rfloor","\u230a":"\\lfloor","\u2309":"\\rceil","\u2308":"\\lceil",\u2107:"\\varepsilon",\u2147:"\\text{e}",\u027c:"r","\u219b":"\\nrightarrow",\u02c6:"\\hat{}","\u203e":"\\overline","\u2192":"\\rightarrow","\u2021":"\\ddagger","\u30fb":"\\cdot","\u25b1":"\\square","\u2206":"\\Delta",\u1f31:"i","\u2221":"\\angle",\u03d2:"\\Upsilon","\u2193":"\\downarrow","\u2191":"\\uparrow","\xbb":"\\gg","\u22a4":"\\top","\u29f8":"/",\u{1d6ff}:"\\delta","\u02f3":"\\cdot","\u0589":":","\u29aa":"\\measuredangle","\u29a9":"\\measuredangle","\u29ab":"\\measuredangle","\u2981":"\\cdot",\u0473:"\\theta","\u29a2":"\\measuredangle","\xb8":",","\u23bb":"\\overline","\u27e6":"\\llbracket",\u{1d719}:"\\phi",\u041f:"\\prod",\u043e:"o","\u2248":"\\approx","\u2264":"\\leq",\u0452:"\\hbar",\u0245:"\\Lambda",\u571f:"\\pm","\u23bc":"-",\u5341:"+","\u2260":"\\neq","\u2190":"\\leftarrow","\u0964":"\\mid","\u20ac":"\\euro","\u02d8":" ",\u1fe1:"\\bar{u}","\u2225":"\\parallel","\u2194":"\\leftrightarrow","\u221a":"\\sqrt{}",\u023c:"c",\u{1d7ae}:"\\epsilon","\xb7":"\\cdot","\u29ac":"\\measuredangle","\u29ae":"\\measuredangle","\u29ad":"\\measuredangle","\xab":"\\ll",\u03a7:"\\mathsf{X}","\u2502":"\\mid","\u232a":"\\rangle",\u2099:"_{n}","\u25ab":"\\square","\u25cf":"\\circle","\u201d":'\\"'}},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 o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=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}),o(r(2965),t),o(r(9039),t),o(r(8249),t),o(r(8171),t),o(r(472),t),o(r(4320),t),o(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={"\u2080":"_{0}","\u2081":"_{1}","\u2082":"_{2}","\u2083":"_{3}","\u2084":"_{4}","\u2085":"_{5}","\u2086":"_{6}","\u2087":"_{7}","\u2088":"_{8}","\u2089":"_{9}","\u2070":"^{0}","\xb9":"^{1}","\xb2":"^{2}","\xb3":"^{3}","\u2074":"^{4}","\u2075":"^{5}","\u2076":"^{6}","\u2077":"^{7}","\u2078":"^{8}","\u2079":"^{9}",\u207f:"^{n}",\u2099:"_{n}","\u24ea":"\\textcircled{0}","\u2460":"\\textcircled{1}","\u2461":"\\textcircled{2}","\u2462":"\\textcircled{3}","\u2463":"\\textcircled{4}","\u2464":"\\textcircled{5}","\u2465":"\\textcircled{6}","\u2466":"\\textcircled{7}","\u2467":"\\textcircled{8}","\u2468":"\\textcircled{9}","\u2469":"\\textcircled{10}","\u246a":"\\textcircled{11}","\u246b":"\\textcircled{12}","\u246c":"\\textcircled{13}","\u246d":"\\textcircled{14}","\u246e":"\\textcircled{15}","\u246f":"\\textcircled{16}","\u2470":"\\textcircled{17}","\u2471":"\\textcircled{18}","\u2472":"\\textcircled{19}","\u2473":"\\textcircled{20}","\u3251":"\\textcircled{21}","\u3252":"\\textcircled{22}","\u3253":"\\textcircled{23}","\u3254":"\\textcircled{24}","\u3255":"\\textcircled{25}","\u3256":"\\textcircled{26}","\u3257":"\\textcircled{27}","\u3258":"\\textcircled{28}","\u3259":"\\textcircled{29}","\u325a":"\\textcircled{30}","\u325b":"\\textcircled{31}","\u325c":"\\textcircled{32}","\u325d":"\\textcircled{33}","\u325e":"\\textcircled{34}","\u325f":"\\textcircled{35}","\u32b1":"\\textcircled{36}","\u32b2":"\\textcircled{37}","\u32b3":"\\textcircled{38}","\u32b4":"\\textcircled{39}","\u32b5":"\\textcircled{40}","\u32b6":"\\textcircled{41}","\u32b7":"\\textcircled{42}","\u32b8":"\\textcircled{43}","\u32b9":"\\textcircled{44}","\u32ba":"\\textcircled{45}","\u32bb":"\\textcircled{46}","\u32bc":"\\textcircled{47}","\u32bd":"\\textcircled{48}","\u32be":"\\textcircled{49}","\u32bf":"\\textcircled{50}","\xbd":"\\dfrac{1}{2}","\u2153":"\\dfrac{1}{3}","\u2154":"\\dfrac{2}{3}","\xbc":"\\dfrac{1}{4}","\xbe":"\\dfrac{3}{4}","\u2155":"\\dfrac{1}{5}","\u2156":"\\dfrac{2}{5}","\u2157":"\\dfrac{3}{5}","\u2158":"\\dfrac{4}{5}","\u2159":"\\dfrac{1}{6}","\u215a":"\\dfrac{5}{6}","\u2150":"\\dfrac{1}{7}","\u215b":"\\dfrac{1}{8}","\u215c":"\\dfrac{3}{8}","\u215d":"\\dfrac{5}{8}","\u215e":"\\dfrac{7}{8}","\u2151":"\\dfrac{1}{9}","\u2152":"\\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,o=n[r];return o?`\\${o}{${t}}`:null}convertSpecialCharToLtX(e){const t=o[e];if(!t)return null;const{letter:r,fontCmd:n}=t;return`\\${n}{${r}}`}};const r={\u00e1:{char:"a",accent:"\xb4"},\u00e0:{char:"a",accent:"`"},\u00e2:{char:"a",accent:"^"},\u00e3:{char:"a",accent:"~"},\u00e4:{char:"a",accent:"\xa8"},\u00e5:{char:"a",accent:"\u02da"},\u0105:{char:"a",accent:"\u02d9"},\u0103:{char:"a",accent:"\u02d8"},\u01ce:{char:"a",accent:"\u02c7"},\u01df:{char:"a",accent:"\u02c6"},\u01fb:{char:"a",accent:"\u02d9"},\u01e1:{char:"a",accent:"-"},\u0101:{char:"a",accent:"-"},\u00e9:{char:"e",accent:"\xb4"},\u00e8:{char:"e",accent:"`"},\u00ea:{char:"e",accent:"^"},\u00eb:{char:"e",accent:"\xa8"},\u0119:{char:"e",accent:"\u02d9"},\u011b:{char:"e",accent:"\u02c7"},\u0207:{char:"i",accent:"^"},\u0451:{char:"e",accent:"\xa8"},\u0113:{char:"e",accent:"-"},\u00ed:{char:"i",accent:"\xb4"},\u00ec:{char:"i",accent:"`"},\u00ee:{char:"i",accent:"^"},\u00ef:{char:"i",accent:"\xa8"},\u012f:{char:"i",accent:"\u02d9"},\u01d0:{char:"i",accent:"\u02c7"},\u0209:{char:"i",accent:"`"},\u020b:{char:"i",accent:"\xa8"},\u012b:{char:"i",accent:"-"},\u00f3:{char:"o",accent:"\xb4"},\u00f2:{char:"o",accent:"`"},\u00f4:{char:"o",accent:"^"},\u00f5:{char:"o",accent:"~"},\u00f6:{char:"o",accent:"\xa8"},\u0151:{char:"o",accent:"\u02dd"},\u01d2:{char:"o",accent:"\u02c7"},\u020d:{char:"o",accent:"`"},\u020f:{char:"o",accent:"\xa8"},\u022b:{char:"o",accent:"\u02d8"},\u022d:{char:"o",accent:"\u02dd"},\u022f:{char:"o",accent:"\u02d9"},\u014d:{char:"o",accent:"-"},\u00fa:{char:"u",accent:"\xb4"},\u00f9:{char:"u",accent:"`"},\u00fb:{char:"u",accent:"^"},\u00fc:{char:"u",accent:"\xa8"},\u0171:{char:"u",accent:"\u02dd"},\u01d4:{char:"u",accent:"\u02c7"},\u01d6:{char:"u",accent:"\xa8"},\u01d8:{char:"u",accent:"\xa8"},\u01da:{char:"u",accent:"\xa8"},\u01dc:{char:"u",accent:"\xa8"},\u0215:{char:"u",accent:"`"},\u0217:{char:"u",accent:"\xa8"},\u016b:{char:"u",accent:"-"},\u00fd:{char:"y",accent:"\xb4"},\u1ef3:{char:"y",accent:"`"},\u0177:{char:"y",accent:"^"},\u00ff:{char:"y",accent:"\xa8"},\u0233:{char:"y",accent:"-"},\u00c1:{char:"A",accent:"\xb4"},\u00c0:{char:"A",accent:"`"},\u00c2:{char:"A",accent:"^"},\u00c3:{char:"A",accent:"~"},\u00c4:{char:"A",accent:"\xa8"},\u00c5:{char:"A",accent:"\u02da"},\u212b:{char:"A",accent:"\u02da"},\u0226:{char:"A",accent:"\u02d9"},\u0102:{char:"A",accent:"\u02d8"},\u01cd:{char:"A",accent:"\u02c7"},\u01de:{char:"A",accent:"\u02dd"},\u01fa:{char:"A",accent:"\u02da"},\u01e0:{char:"A",accent:"-"},\u0100:{char:"A",accent:"-"},\u00c9:{char:"E",accent:"\xb4"},\u00c8:{char:"E",accent:"`"},\u0116:{char:"E",accent:"\u02d9"},\u00ca:{char:"E",accent:"^"},\u00cb:{char:"E",accent:"\xa8"},\u011a:{char:"E",accent:"\u02c7"},\u0204:{char:"E",accent:"`"},\u0206:{char:"E",accent:"\xa8"},\u0112:{char:"E",accent:"-"},\u00cd:{char:"I",accent:"\xb4"},\u00cc:{char:"I",accent:"`"},\u00ce:{char:"I",accent:"^"},\u00cf:{char:"I",accent:"\xa8"},\u012c:{char:"I",accent:"\u02d8"},\u01cf:{char:"I",accent:"\u02c7"},\u0208:{char:"I",accent:"`"},\u020a:{char:"I",accent:"\xa8"},\u012a:{char:"I",accent:"-"},\u00d3:{char:"O",accent:"\xb4"},\u00d2:{char:"O",accent:"`"},\u00d4:{char:"O",accent:"^"},\u00d5:{char:"O",accent:"~"},\u00d6:{char:"O",accent:"\xa8"},\u0150:{char:"O",accent:"\u02dd"},\u01d1:{char:"O",accent:"\u02c7"},\u020c:{char:"O",accent:"`"},\u020e:{char:"O",accent:"\xa8"},\u022a:{char:"O",accent:"\u02d8"},\u022c:{char:"O",accent:"\u02dd"},\u022e:{char:"O",accent:"\u02d9"},\u014c:{char:"O",accent:"-"},\u00da:{char:"U",accent:"\xb4"},\u00d9:{char:"U",accent:"`"},\u00db:{char:"U",accent:"^"},\u00dc:{char:"U",accent:"\xa8"},\u0170:{char:"U",accent:"\u02dd"},\u01d3:{char:"U",accent:"\u02c7"},\u01d5:{char:"U",accent:"\xa8"},\u0214:{char:"U",accent:"`"},\u0216:{char:"U",accent:"\xa8"},\u016a:{char:"U",accent:"-"},\u00dd:{char:"Y",accent:"\xb4"},\u1ef2:{char:"Y",accent:"`"},\u0176:{char:"Y",accent:"^"},\u0178:{char:"Y",accent:"\xa8"},\u0232:{char:"Y",accent:"-"},\u00f1:{char:"n",accent:"~"},\u00d1:{char:"N",accent:"~"},\u00e7:{char:"c",accent:"\u02d9"},\u00c7:{char:"C",accent:"\u02d9"},\u1e7d:{char:"v",accent:"~"},\u1e7c:{char:"V",accent:"~"},\u0135:{char:"j",accent:"^"},\u0134:{char:"J",accent:"^"},\u017a:{char:"z",accent:"\xb4"},\u0179:{char:"Z",accent:"\xb4"},\u017b:{char:"Z",accent:"^"},\u017c:{char:"z",accent:"^"},\u017d:{char:"Z",accent:"\u02c7"},\u017e:{char:"z",accent:"\u02c7"},\u1e91:{char:"z",accent:"\u02c6"}},n={"\xb4":"acute","`":"grave","^":"hat","~":"tilde","\xa8":"ddot","\u02da":"mathring","\u02d8":"breve",\u02c7:"check","\u02dd":"H","\u02d9":"dot","-":"bar",\u02c6:"hat","\u02dc":"tilde"},o={\u{1d400}:{letter:"A",fontCmd:"mathbf"},\u{1d401}:{letter:"B",fontCmd:"mathbf"},\u{1d402}:{letter:"C",fontCmd:"mathbf"},\u{1d403}:{letter:"D",fontCmd:"mathbf"},\u{1d404}:{letter:"E",fontCmd:"mathbf"},\u0395:{letter:"E",fontCmd:"mathbf"},\u{1d405}:{letter:"F",fontCmd:"mathbf"},\u{1d406}:{letter:"G",fontCmd:"mathbf"},\u{1d407}:{letter:"H",fontCmd:"mathbf"},\u{1d408}:{letter:"I",fontCmd:"mathbf"},\u{1d409}:{letter:"J",fontCmd:"mathbf"},\u{1d40a}:{letter:"K",fontCmd:"mathbf"},\u{1d40b}:{letter:"L",fontCmd:"mathbf"},\u{1d40c}:{letter:"M",fontCmd:"mathbf"},\u{1d40d}:{letter:"N",fontCmd:"mathbf"},\u{1d40e}:{letter:"O",fontCmd:"mathbf"},\u{1d40f}:{letter:"P",fontCmd:"mathbf"},\u{1d410}:{letter:"Q",fontCmd:"mathbf"},\u{1d411}:{letter:"R",fontCmd:"mathbf"},\u{1d412}:{letter:"S",fontCmd:"mathbf"},\u{1d413}:{letter:"T",fontCmd:"mathbf"},\u{1d414}:{letter:"U",fontCmd:"mathbf"},\u{1d415}:{letter:"V",fontCmd:"mathbf"},\u{1d416}:{letter:"W",fontCmd:"mathbf"},\u{1d417}:{letter:"X",fontCmd:"mathbf"},\u{1d786}:{letter:"X",fontCmd:"mathbf"},\u{1d418}:{letter:"Y",fontCmd:"mathbf"},\u{1d419}:{letter:"Z",fontCmd:"mathbf"},"\u{1d7ce}":{letter:"0",fontCmd:"mathbf"},"\u{1d7cf}":{letter:"1",fontCmd:"mathbf"},"\u{1d7d0}":{letter:"2",fontCmd:"mathbf"},"\u{1d7d1}":{letter:"3",fontCmd:"mathbf"},"\u{1d7d2}":{letter:"4",fontCmd:"mathbf"},"\u{1d7d3}":{letter:"5",fontCmd:"mathbf"},"\u{1d7d4}":{letter:"6",fontCmd:"mathbf"},"\u{1d7d5}":{letter:"7",fontCmd:"mathbf"},"\u{1d7d6}":{letter:"8",fontCmd:"mathbf"},"\u{1d7d7}":{letter:"9",fontCmd:"mathbf"},\u{1d434}:{letter:"A",fontCmd:"mathit"},\u{1d435}:{letter:"B",fontCmd:"mathit"},\u{1d436}:{letter:"C",fontCmd:"mathit"},\u{1d437}:{letter:"D",fontCmd:"mathit"},\u{1d438}:{letter:"E",fontCmd:"mathit"},\u{1d439}:{letter:"F",fontCmd:"mathit"},\u{1d43a}:{letter:"G",fontCmd:"mathit"},\u{1d43b}:{letter:"H",fontCmd:"mathit"},\u{1d43c}:{letter:"I",fontCmd:"mathit"},\u0399:{letter:"I",fontCmd:"mathit"},\u{1d43d}:{letter:"J",fontCmd:"mathit"},\u{1d43e}:{letter:"K",fontCmd:"mathit"},\u{1d43f}:{letter:"L",fontCmd:"mathit"},\u{1d440}:{letter:"M",fontCmd:"mathit"},\u{1d441}:{letter:"N",fontCmd:"mathit"},\u{1d442}:{letter:"O",fontCmd:"mathit"},\u{1d443}:{letter:"P",fontCmd:"mathit"},\u{1d444}:{letter:"Q",fontCmd:"mathit"},\u{1d445}:{letter:"R",fontCmd:"mathit"},\u{1d446}:{letter:"S",fontCmd:"mathit"},\u{1d447}:{letter:"T",fontCmd:"mathit"},\u{1d448}:{letter:"U",fontCmd:"mathit"},\u{1d449}:{letter:"V",fontCmd:"mathit"},\u{1d44a}:{letter:"W",fontCmd:"mathit"},\u{1d44b}:{letter:"X",fontCmd:"mathit"},\u{1d44c}:{letter:"Y",fontCmd:"mathit"},\u{1d44d}:{letter:"Z",fontCmd:"mathit"},\u{1d538}:{letter:"A",fontCmd:"mathbb"},\u{1d539}:{letter:"B",fontCmd:"mathbb"},\u2102:{letter:"C",fontCmd:"mathbb"},\u{1d53b}:{letter:"D",fontCmd:"mathbb"},\u{1d53c}:{letter:"E",fontCmd:"mathbb"},\u{1d53d}:{letter:"F",fontCmd:"mathbb"},\u{1d53e}:{letter:"G",fontCmd:"mathbb"},\u210d:{letter:"H",fontCmd:"mathbb"},\u{1d540}:{letter:"I",fontCmd:"mathbb"},\u{1d541}:{letter:"J",fontCmd:"mathbb"},\u{1d542}:{letter:"K",fontCmd:"mathbb"},\u{1d543}:{letter:"L",fontCmd:"mathbb"},\u{1d544}:{letter:"M",fontCmd:"mathbb"},\u2115:{letter:"N",fontCmd:"mathbb"},\u{1d546}:{letter:"O",fontCmd:"mathbb"},\u2119:{letter:"P",fontCmd:"mathbb"},\u211a:{letter:"Q",fontCmd:"mathbb"},\u211d:{letter:"R",fontCmd:"mathbb"},\u{1d54a}:{letter:"S",fontCmd:"mathbb"},\u{1d54b}:{letter:"T",fontCmd:"mathbb"},\u{1d54c}:{letter:"U",fontCmd:"mathbb"},\u{1d54d}:{letter:"V",fontCmd:"mathbb"},\u{1d54e}:{letter:"W",fontCmd:"mathbb"},\u{1d54f}:{letter:"X",fontCmd:"mathbb"},\u{1d550}:{letter:"Y",fontCmd:"mathbb"},\u2124:{letter:"Z",fontCmd:"mathbb"},"\u{1d7d8}":{letter:"0",fontCmd:"mathbb"},"\u{1d7d9}":{letter:"1",fontCmd:"mathbb"},"\u{1d7da}":{letter:"2",fontCmd:"mathbb"},"\u{1d7db}":{letter:"3",fontCmd:"mathbb"},"\u{1d7dc}":{letter:"4",fontCmd:"mathbb"},"\u{1d7dd}":{letter:"5",fontCmd:"mathbb"},"\u{1d7de}":{letter:"6",fontCmd:"mathbb"},"\u{1d7df}":{letter:"7",fontCmd:"mathbb"},"\u{1d7e0}":{letter:"8",fontCmd:"mathbb"},"\u{1d7e1}":{letter:"9",fontCmd:"mathbb"},\u{1d49c}:{letter:"A",fontCmd:"mathcal"},\u{1d4d0}:{letter:"A",fontCmd:"mathcal"},\u212c:{letter:"B",fontCmd:"mathcal"},\u{1d49e}:{letter:"C",fontCmd:"mathcal"},\u{1d49f}:{letter:"D",fontCmd:"mathcal"},\u{1d4d3}:{letter:"D",fontCmd:"mathcal"},\u2130:{letter:"E",fontCmd:"mathcal"},\u2131:{letter:"F",fontCmd:"mathcal"},\u{1d4d5}:{letter:"F",fontCmd:"mathcal"},\u{1d4a2}:{letter:"G",fontCmd:"mathcal"},\u210b:{letter:"H",fontCmd:"mathcal"},\u2110:{letter:"I",fontCmd:"mathcal"},\u{1d4a5}:{letter:"J",fontCmd:"mathcal"},\u{1d4a6}:{letter:"K",fontCmd:"mathcal"},\u2112:{letter:"L",fontCmd:"mathcal"},\u{1d4db}:{letter:"L",fontCmd:"mathcal"},\u2133:{letter:"M",fontCmd:"mathcal"},\u{1d4a9}:{letter:"N",fontCmd:"mathcal"},\u{1d4aa}:{letter:"O",fontCmd:"mathcal"},\u{1d4de}:{letter:"O",fontCmd:"mathcal"},\u{1d4ab}:{letter:"P",fontCmd:"mathcal"},\u{1d4ac}:{letter:"Q",fontCmd:"mathcal"},\u211b:{letter:"R",fontCmd:"mathcal"},\u{1d57d}:{letter:"R",fontCmd:"mathcal"},"\u211f":{letter:"R",fontCmd:"mathcal"},\u{1d4ae}:{letter:"S",fontCmd:"mathcal"},\u{1d4af}:{letter:"T",fontCmd:"mathcal"},\u{1d4b0}:{letter:"U",fontCmd:"mathcal"},\u{1d4b1}:{letter:"V",fontCmd:"mathcal"},\u{1d4b2}:{letter:"W",fontCmd:"mathcal"},\u{1d4b3}:{letter:"X",fontCmd:"mathcal"},\u{1d4b4}:{letter:"Y",fontCmd:"mathcal"},\u{1d4b5}:{letter:"Z",fontCmd:"mathcal"},\u{1d504}:{letter:"A",fontCmd:"mathfrak"},\u{1d505}:{letter:"B",fontCmd:"mathfrak"},\u212d:{letter:"C",fontCmd:"mathfrak"},\u{1d507}:{letter:"D",fontCmd:"mathfrak"},\u{1d508}:{letter:"E",fontCmd:"mathfrak"},\u{1d509}:{letter:"F",fontCmd:"mathfrak"},\u{1d50a}:{letter:"G",fontCmd:"mathfrak"},\u210c:{letter:"H",fontCmd:"mathfrak"},\u2111:{letter:"I",fontCmd:"mathfrak"},\u{1d50d}:{letter:"J",fontCmd:"mathfrak"},\u{1d50e}:{letter:"K",fontCmd:"mathfrak"},\u{1d50f}:{letter:"L",fontCmd:"mathfrak"},\u{1d510}:{letter:"M",fontCmd:"mathfrak"},\u{1d511}:{letter:"N",fontCmd:"mathfrak"},\u{1d512}:{letter:"O",fontCmd:"mathfrak"},\u{1d513}:{letter:"P",fontCmd:"mathfrak"},\u{1d514}:{letter:"Q",fontCmd:"mathfrak"},\u211c:{letter:"R",fontCmd:"mathfrak"},\u{1d516}:{letter:"S",fontCmd:"mathfrak"},\u{1d517}:{letter:"T",fontCmd:"mathfrak"},\u{1d518}:{letter:"U",fontCmd:"mathfrak"},\u{1d519}:{letter:"V",fontCmd:"mathfrak"},\u{1d51a}:{letter:"W",fontCmd:"mathfrak"},\u{1d51b}:{letter:"X",fontCmd:"mathfrak"},\u{1d51c}:{letter:"Y",fontCmd:"mathfrak"},\u2128:{letter:"Z",fontCmd:"mathfrak"},\u{1d5a0}:{letter:"A",fontCmd:"mathsf"},\u0391:{letter:"A",fontCmd:"mathsf"},\u{1d5a1}:{letter:"B",fontCmd:"mathsf"},\u0392:{letter:"B",fontCmd:"mathsf"},\u{1d5a2}:{letter:"C",fontCmd:"mathsf"},\u{1d5a3}:{letter:"D",fontCmd:"mathsf"},\u{1d5a4}:{letter:"E",fontCmd:"mathsf"},\u{1d5a5}:{letter:"F",fontCmd:"mathsf"},\u{1d5a6}:{letter:"G",fontCmd:"mathsf"},\u{1d5a7}:{letter:"H",fontCmd:"mathsf"},\u{1d5a8}:{letter:"I",fontCmd:"mathsf"},\u{1d5a9}:{letter:"J",fontCmd:"mathsf"},\u0237:{letter:"J",fontCmd:"mathsf"},\u{1d5aa}:{letter:"K",fontCmd:"mathsf"},\u039a:{letter:"K",fontCmd:"mathsf"},\u{1d5ab}:{letter:"L",fontCmd:"mathsf"},\u{1d5ac}:{letter:"M",fontCmd:"mathsf"},\u{1d5ad}:{letter:"N",fontCmd:"mathsf"},\u{1d5ae}:{letter:"O",fontCmd:"mathsf"},\u{1d5af}:{letter:"P",fontCmd:"mathsf"},\u{1d5b0}:{letter:"Q",fontCmd:"mathsf"},\u{1d5b1}:{letter:"R",fontCmd:"mathsf"},\u{1d5b2}:{letter:"S",fontCmd:"mathsf"},\u{1d5b3}:{letter:"T",fontCmd:"mathsf"},\u{1d5b4}:{letter:"U",fontCmd:"mathsf"},\u{1d5b5}:{letter:"V",fontCmd:"mathsf"},\u{1d5b6}:{letter:"W",fontCmd:"mathsf"},\u{1d5b7}:{letter:"X",fontCmd:"mathsf"},\u03a7:{letter:"X",fontCmd:"mathsf"},\u{1d5b8}:{letter:"Y",fontCmd:"mathsf"},\u{1d5b9}:{letter:"Z",fontCmd:"mathsf"},\u{1d6a8}:{letter:"A",fontCmd:"mathtt"},\u{1d6a9}:{letter:"B",fontCmd:"mathtt"},\u{1d6aa}:{letter:"\\Gamma",fontCmd:"mathtt"},\u{1d6ab}:{letter:"\\Delta",fontCmd:"mathtt"},\u{1d6ac}:{letter:"E",fontCmd:"mathtt"},\u{1d6ad}:{letter:"F",fontCmd:"mathtt"},\u{1d6ae}:{letter:"G",fontCmd:"mathtt"},\u{1d6af}:{letter:"\\Theta",fontCmd:"mathtt"},\u{1d6b0}:{letter:"I",fontCmd:"mathtt"},\u{1d6b1}:{letter:"J",fontCmd:"mathtt"},\u{1d6b2}:{letter:"\\Lambda",fontCmd:"mathtt"},\u{1d6b3}:{letter:"L",fontCmd:"mathtt"},\u{1d6b4}:{letter:"M",fontCmd:"mathtt"},\u{1d6b5}:{letter:"\\Pi",fontCmd:"mathtt"},\u{1d6b6}:{letter:"O",fontCmd:"mathtt"},\u{1d6b7}:{letter:"\\Pi",fontCmd:"mathtt"},\u{1d6b8}:{letter:"Q",fontCmd:"mathtt"},\u{1d6b9}:{letter:"R",fontCmd:"mathtt"},\u{1d6ba}:{letter:"S",fontCmd:"mathtt"},\u{1d6bb}:{letter:"T",fontCmd:"mathtt"},\u{1d6bc}:{letter:"U",fontCmd:"mathtt"},\u{1d6bd}:{letter:"\\Phi",fontCmd:"mathtt"},\u{1d6be}:{letter:"W",fontCmd:"mathtt"},\u{1d6bf}:{letter:"\\Psi",fontCmd:"mathtt"},\u{1d6c0}:{letter:"\\Omega",fontCmd:"mathtt"}}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.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()},640(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ALLOWED_ATTRIBUTES_DEBUG=t.ALLOWED_ATTRIBUTES=t.ALLOWED_EMPTY_ELEMENTS=t.FOOTNOTE_LIST_SELECTORS=t.FOOTNOTE_INLINE_REFERENCES=t.TEST_ATTRIBUTES_SELECTOR=t.PARTIAL_SELECTORS_REGEX=t.PARTIAL_SELECTORS=t.TEST_ATTRIBUTES=t.EXACT_SELECTORS_JOINED=t.EXACT_SELECTORS=t.HIDDEN_EXACT_SKIP_SELECTOR=t.HIDDEN_EXACT_SELECTOR=t.HIDDEN_EXACT_SELECTORS=t.HIDDEN_EXACT_SKIP_SELECTORS=t.CONTENT_ELEMENT_SELECTOR=t.INLINE_ELEMENTS=t.PRESERVE_ELEMENTS=t.BLOCK_LEVEL_ELEMENTS=t.BLOCK_ELEMENTS_SET=t.BLOCK_ELEMENTS_SELECTOR=t.BLOCK_ELEMENTS=t.MOBILE_WIDTH=t.ENTRY_POINT_ELEMENTS=void 0,t.ENTRY_POINT_ELEMENTS=["#post",".post-content",".post-body",".article-content","#article-content",".article_post",".article-wrapper",".entry-content",".content-article",".instapaper_body",".post",".markdown-body","article",'[role="article"]',"main",'[role="main"]',"#content","body"],t.MOBILE_WIDTH=600,t.BLOCK_ELEMENTS=["div","section","article","main","aside","header","footer","nav","content"],t.BLOCK_ELEMENTS_SELECTOR=t.BLOCK_ELEMENTS.join(","),t.BLOCK_ELEMENTS_SET=new Set(t.BLOCK_ELEMENTS),t.BLOCK_LEVEL_ELEMENTS=new Set([...t.BLOCK_ELEMENTS,"p","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","pre","blockquote","figure","figcaption","table","thead","tbody","tfoot","tr","td","th","details","summary","address","hr","form","fieldset"]),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","date","del","ins","q","abbr","cite","relative-time","time","font"]),t.CONTENT_ELEMENT_SELECTOR=["math","[data-mathml]",".katex",".katex-mathml",".katex-display",".MathJax",".MathJax_Display",".MathJax_SVG","mjx-container","pre","code","table","img","picture","video","blockquote","figure"].join(", "),t.HIDDEN_EXACT_SKIP_SELECTORS=["[hidden]",'[aria-hidden="true"]',".hidden",".invisible"],t.HIDDEN_EXACT_SELECTORS=t.HIDDEN_EXACT_SKIP_SELECTORS.map((e=>'[aria-hidden="true"]'===e?'[aria-hidden="true"]:not([class*="math"])':e)),t.HIDDEN_EXACT_SELECTOR=t.HIDDEN_EXACT_SELECTORS.join(","),t.HIDDEN_EXACT_SKIP_SELECTOR=t.HIDDEN_EXACT_SKIP_SELECTORS.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]','[alt*="advert" i]',".promo",".Promo","#barrier-page",".alert",'[id="comments" i]','[id="comment" i]','div[class*="cover-"]','div[id*="cover-"]',"header",".header:not(.banner)","#header","#Header","#banner","#Banner","nav",".navigation","#navigation",'[role="navigation" i]','[role="dialog" i]','[role*="complementary" i]','[class*="pagination" i]',".menu","#siteSub",".previous",".author",".Author",'[class$="_bio"]',"#categories",".contributor",".date","#date","[data-date]",".entry-meta",".meta",".tags","#tags",'[rel="tag"]',".toc",".Toc","#toc",".headline","#headline","#title","#Title","#articleTag",'[href*="/tag/"]','[href*="/tags/"]','[href*="/author/"]','[href*="/author?"]','[href$="/author"]','a[href*="copyright.com"]','a[href*="google.com/preferences"]','[href*="#toc"]','[href="#top"]','[href="#Top"]','[href="#page-header"]','[href="#content"]','[href="#site-content"]','[href="#main-content"]','[href^="#main"]','[src*="author"]',"footer",".aside",'aside:not([class*="callout"])',"button","canvas","date","dialog","fieldset","form",'input:not([type="checkbox"])',"label","option","select",'[role="listbox"]','[role="option"]',"textarea",...t.HIDDEN_EXACT_SELECTORS,"instaread-player",'iframe:not([src*="youtube"]):not([src*="youtu.be"]):not([src*="vimeo"]):not([src*="twitter"]):not([src*="x.com"]):not([src*="datawrapper"])','[class="logo" i]',"#logo","#Logo","#newsletter","#Newsletter",".subscribe",".noprint",'[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]:not(.ltx_ref)','[data-container*="most-viewed" i]',".sidebar",".Sidebar","#sidebar","#Sidebar","#side-bar","#sitesub",'[data-link-name*="skip" i]','[aria-label*="skip" i]',".copyright","#copyright",".licensebox","#page-info","#rss","#feed",".gutter","#primaryaudio","#NYT_ABOVE_MAIN_CONTENT_REGION",'[data-testid="photoviewer-children-figure"] > span',"table.infobox",'[data-optimizely="related-articles-section" i]','[data-orientation="vertical"]',".gh-header-sticky",'[data-testid="issue-metadata-sticky"]'],t.EXACT_SELECTORS_JOINED=t.EXACT_SELECTORS.join(","),t.TEST_ATTRIBUTES=["class","id","data-test","data-testid","data-test-id","data-qa","data-cy"],t.PARTIAL_SELECTORS=["a-statement","access-wall","activitypub","actioncall","addcomment","addtoany","advert","adlayout","ad-tldr","ad-placement","ads-container","_ad_","AdBlock_","AdUnit","after_content","after_main_article","afterpost","allterms","-alert-","alert-box","_archive","around-the-web","aroundpages","article-author","article-badges","article-banner","article-bottom-section","article-bottom","article-category","article-card","article-citation","article__copy","article_date","article-date","article-end ","article_header","article-header","article__header","article__hero","article__info","article-info","article-meta","article_meta","article__meta","articlename","article-subject","article_subject","article-snippet","article-separator","article--share","article--topics","articletags","article-tags","article_tags","articletitle","article-title","article_title","articletopics","article-topics","article-actions","article--lede","articlewell","associated-people","audio-card","author-bio","author-box","author-info","author_info","authorm","author-mini-bio","author-name","author-publish-info","authored-by","avatar","back-to-top","backlink_container","backlinks-section","bio-block","biobox","blog-pager","bookmark-","-bookmark","bottominfo","bottomnav","bottom-of-article","bottom-wrapper","brand-bar","bcrumb","breadcrumb","brdcrumb","button-wrapper","buttons-container","btn-","-btn","byline","captcha","card-text","card-media","card-post","carouselcontainer","carousel-container","cat_header","catlinks","_categories","card-author","card-content","chapter-list","collections","comments","-comment","commentbox","comment-button","commentcomp","comment-content","comment-count","comment-form","comment-number","comment-respond","comment-thread","comment-wrap","complementary","consent","contact-","content-card","content-topics","contentpromo","context-bar","context-widget","core-collateral","cover-image","cover-photo","cover-wrap","created-date","creative-commons_","c-subscribe","_cta","-cta","cta-","cta_","current-issue","custom-list-number","dateline","dateheader","date-header","date-pub","disclaimer","disclosure","discussion","discuss_","-dismiss","disqus","donate","donation","dropdown","element-invisible","eletters","emailsignup","emoji-bar","engagement-widget","enhancement-","entry-author-info","entry-categories","entry-date","entry-title","entry-utility","-error","error-","eyebrow","expand-reduce","external-anchor","externallinkembedwrapper","extra-services","extra-title","facebook","fancy-box","favorite","featured-content","feature_feed","feedback","feed-links","field-site-sections","fixheader","floating-vid","follower","footer","footnote-back","footnoteback","form-group","for-you","frontmatter","further-reading","fullbleedheader","gallery-count","gated-","gh-feed","gist-meta","goog-","graph-view","hamburger","header_logo","header-logo","header-pattern","hero-list","hide-for-print","hide-print","hide-when-no-script","hidden-print","hidden-sidenote","hidden-accessibility","infoline","inline-topic","instacartIntegration","interlude","interaction","itemendrow","intro-date","invisible","jp-no-solution","jp-relatedposts","jswarning","js-warning","jumplink","jumpto","jump-to-","js-skip-to-content","keepreading","keep-reading","keep_reading","keyword_wrap","kicker","labstab","-labels","language-name","lastupdated","latest-content","-ledes-","-license","license-","lightbox-popup","like-button","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","masthead","marketing","media-inquiry","-menu","menu-","metadata","meta-date","meta-row","might-like","minibio","more-about","mod-paywall","_modal","-modal","more-","morenews","morestories","more_wrapper","most-read","move-helper","mw-editsection","mw-cite-backlink","mw-indicators","mw-jump-link","nav-","nav_","navigation-post","next-","newsgallery","news-story-title","newsletter_","newsletterbanner","newslettercontainer","newsletter-form","newsletter-signup","newslettersignup","newsletterwidget","newsletterwrapper","not-found","notessection","nomobile","noprint","open-slideshow","originally-published","other-blogs","outline-view","pagehead","page-header","page-title","paywall_message","-partners","permission-","plea","popular","popup_links","pop_stories","pop-up","post-author","post-bottom","post__category","postcomment","postdate","post-date","post_date","post-details","post-feeds","postinfo","post-info","post_info","post-inline-date","post-links","postlist","post_list","post_meta","post-meta","postmeta","post_more","postnavi","post-navigation","postpath","post-preview","postsnippet","post_snippet","post-snippet","post-subject","posttax","post-tax","post_tax","posttag","post_tag","post-tag","post_time","posttitle","post-title","post_title","post__title","post-ufi-button","prev-post","prevnext","prev_next","prev-next","previousnext","press-inquiries","print-none","print-header","print:hidden","privacy-notice","privacy-settings","profile","promo_article","promo-bar","promo-box","pubdate","pub_date","pub-date","publish_date","publish-date","publication-date","publicationName","qr-code","qr_code","quick_up","_rail","ratingssection","read_also","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","robots-nocontent","_rss","rss-link","screen-reader-text","scroll_to","scroll-to","_search","-search","section-nav","series-banner","share-box","sharedaddy","share-icons","sharelinks","share-post","share-print","share-section","shariff-","show-for-print","sidebartitle","sidebar-content","sidebar-wrapper","sideitems","sidebar-author","sidebar-item","side-box","side-logo","sign-in-gate","similar-","similar_","similars-","site-index","site-header","siteheader","site-logo","site-name","site-wordpress","skip-content","skip-to-content","skip-link","c-skip-link","_skip-link","-slider","slug-wrap","social-author","social-shar","social-date","speechify-ignore","speedbump","sponsor","springercitation","sr-only","_stats","story-date","story-navigation","storyreadtime","storysmall","storypublishdate","subject-label","subhead","submenu","-subscribe-","subscriber-drive","subscription-","_tags","tags__item","tag_list","taxonomy","table-of-contents","tabs-","terminaltout","time-rubric","timestamp","time-read","time-to-read","tip_off","tiptout","-tout-","toc-container","toggle-caption","tooltip-content","topbar","topic-authors","topic-footer","topic-list","topic-subnav","top-wrapper","tree-item","trending","trust-feat","trust-badge","trust-project","twitter","u-hide","upsell","viewbottom","yarpp-related","visually-hidden","welcomebox","widget_pages"],t.PARTIAL_SELECTORS_REGEX=new RegExp(t.PARTIAL_SELECTORS.join("|"),"i"),t.TEST_ATTRIBUTES_SELECTOR=t.TEST_ATTRIBUTES.map((e=>`[${e}]`)).join(","),t.FOOTNOTE_INLINE_REFERENCES=["sup.reference","cite.ltx_cite",'sup[id^="fnr"]','span[id^="fnr"]','span[class*="footnote_ref"]','span[class*="footnote-ref"]',"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"]',"sup.footnoteref"].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"]',"div.footnotes-footer"].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-callout","data-callout-title","data-lang","dir","display","frameborder","headers","height","href","kind","label","lang","role","rowspan","src","srclang","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"])},628(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Defuddle=void 0;const o=r(608),a=r(864),i=r(917),s=r(640),l=r(840),c=r(610),u=r(726),d=r(968),h=r(552),m=r(639),p=new Set(["title","author","published","site","description","image","language"]),f=/width\s*:\s*(\d+)/,g=/height\s*:\s*(\d+)/,b=/(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\s+\d{1,2}/i,x=/\d+\s*min(?:ute)?s?\s+read\b/i,y=[/^This (?:article|story|piece) (?:appeared|was published|originally appeared) in\b/i,/^A version of this (?:article|story) (?:appeared|was published) in\b/i,/^Originally (?:published|appeared) (?:in|on|at)\b/i],v=[/\b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:t(?:ember)?)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\b/gi,/\b\d+(?:st|nd|rd|th)?\b/g,/\bmin(?:ute)?s?\b/gi,/\bread\b/gi,/[|\xb7\u2022\u2014\u2013\-,.\s]/g];t.Defuddle=class{constructor(e,t={}){this._schemaOrgData=void 0,this._schemaOrgExtracted=!1,this.doc=e,this.options=t,this.debug=t.debug||!1}getSchemaOrgData(){return this._schemaOrgExtracted||(this._schemaOrgData=this._extractSchemaOrgData(this.doc),this._schemaOrgExtracted=!0),this._schemaOrgData}parse(){let e=this.parseInternal();if(e.wordCount<200){this._log("Initial parse returned very little content, trying again");const t=this.parseInternal({removePartialSelectors:!1});t.wordCount>2*e.wordCount&&(this._log("Retry produced more content"),e=t)}if(e.wordCount<50){this._log("Still very little content, retrying without hidden-element removal");const t=this.parseInternal({removeHiddenElements:!1});t.wordCount>2*e.wordCount&&(this._log("Hidden-element retry produced more content"),e=t);const r=this.findLargestHiddenContentSelector();if(r){this._log("Retrying with hidden content selector:",r);const t=this.parseInternal({removeHiddenElements:!1,removePartialSelectors:!1,contentSelector:r});(t.wordCount>e.wordCount||t.wordCount>Math.max(20,.7*e.wordCount)&&t.content.length<e.content.length)&&(this._log("Hidden-selector retry produced better focused content"),e=t)}}if(e.wordCount<50){this._log("Still very little content, retrying without scoring/partial selectors (possible index page)");const t=this.parseInternal({removeLowScoring:!1,removePartialSelectors:!1,removeContentPatterns:!1});t.wordCount>e.wordCount&&(this._log("Index page retry produced more content"),e=t)}this._stripUnsafeElements();const t=this._getSchemaText(e.schemaOrgData);if(t&&this.countHtmlWords(t)>e.wordCount){const r=this._findContentBySchemaText(t);r?(this._log("Found DOM content matching schema.org text"),e.content=r,e.wordCount=this.countHtmlWords(r)):(this._log("Using schema.org text as content (DOM element not found)"),e.content=t,e.wordCount=this.countHtmlWords(t))}return e}_getSchemaText(e,t=0){if(!e||t>10)return"";const r=Array.isArray(e)?e:[e];for(const e of r)if(Array.isArray(e)){const r=this._getSchemaText(e,t+1);if(r)return r}else{if((null==e?void 0:e.text)&&"string"==typeof e.text)return e.text;if((null==e?void 0:e.articleBody)&&"string"==typeof e.articleBody)return e.articleBody;if((null==e?void 0:e["@graph"])&&Array.isArray(e["@graph"])){const r=this._getSchemaText(e["@graph"],t+1);if(r)return r}}return""}_stripUnsafeElements(){const e=this.doc.body;if(!e)return;const t=e.querySelectorAll('script:not([type^="math/"]), style, noscript, frame, frameset, object, embed, applet, base');for(const e of t)e.remove();const r=e.querySelectorAll("*");for(const e of r)for(const t of Array.from(e.attributes)){const r=t.name.toLowerCase();(r.startsWith("on")||"srcdoc"===r||["href","src","action","formaction","xlink:href"].includes(r)&&(0,m.isDangerousUrl)(t.value))&&e.removeAttribute(t.name)}}_findElementBySchemaText(e,t){var r;const n=((null===(r=t.split(/\n\s*\n/)[0])||void 0===r?void 0:r.trim())||"").substring(0,100).trim();if(!n)return null;const o=(0,h.countWords)(t);let a=null,i=1/0;const s=e.querySelectorAll("*");for(const t of s){if(t===e)continue;const r=t.textContent||"";if(!r.includes(n))continue;const s=(0,h.countWords)(r);s>=.8*o&&s<i&&(i=s,a=t)}return a}_findContentBySchemaText(e){const t=this.doc.body;if(!t)return"";const r=this._findElementBySchemaText(t,e);if(!r)return"";let n="",o="";const i=r.parentElement;if(i&&i!==t){const e=i.querySelectorAll("img");let t=null,a=0;for(const n of e){if(r.contains(n))continue;const e=parseInt(n.getAttribute("width")||"0",10)*parseInt(n.getAttribute("height")||"0",10);e>a&&(a=e,t=n)}if(t){n=this._getLargestImageSrc(t),o=t.getAttribute("alt")||"";try{const e=this.options.url||this.doc.URL;e&&(n=new URL(n,e).href)}catch(e){}}}(0,a.removeHeadingAnchors)(r),this.resolveRelativeUrls(r);let s=(0,m.serializeHTML)(r);if(n){const e=this.doc.createElement("img");e.setAttribute("src",n),e.setAttribute("alt",o),s+=e.outerHTML}return s}findLargestHiddenContentSelector(){const e=this.doc.body;if(!e)return;const t=Array.from(e.querySelectorAll(s.HIDDEN_EXACT_SKIP_SELECTOR)).filter((e=>!(e.getAttribute("class")||"").includes("math")));let r=null,n=0;for(const e of t){const t=(0,h.countWords)(e.textContent||"");t>n&&(r=e,n=t)}return!r||n<30?void 0:this.getElementSelector(r)}_getLargestImageSrc(e){const t=e.getAttribute("srcset")||"";if(!t)return e.getAttribute("src")||"";const r=/(.+?)\s+(\d+(?:\.\d+)?)w/g;let n,o="",a=0,i=0;for(;null!==(n=r.exec(t));){let e=n[1].trim();i>0&&(e=e.replace(/^,\s*/,"")),i=r.lastIndex;const t=parseFloat(n[2]);e&&t>a&&(a=t,o=e)}let s=o||e.getAttribute("src")||"";return s=s.replace(/,w_\d+/g,"").replace(/,c_\w+/g,""),s}parseAsync(){return n(this,void 0,void 0,(function*(){var e;if(!1!==this.options.useAsync){const e=yield this.tryAsyncExtractor(i.ExtractorRegistry.findPreferredAsyncExtractor.bind(i.ExtractorRegistry));if(e)return e}const t=this.parse();return t.wordCount>0||!1===this.options.useAsync?t:null!==(e=yield this.tryAsyncExtractor(i.ExtractorRegistry.findAsyncExtractor.bind(i.ExtractorRegistry)))&&void 0!==e?e:t}))}fetchAsyncVariables(){return n(this,void 0,void 0,(function*(){var e;if(!1===this.options.useAsync)return null;try{const t=this.options.url||this.doc.URL,r=this.getSchemaOrgData(),n={includeReplies:null!==(e=this.options.includeReplies)&&void 0!==e?e:"extractors",language:this.options.language},o=i.ExtractorRegistry.findPreferredAsyncExtractor(this.doc,t,r,n);if(o){const e=yield o.extractAsync();return this.getExtractorVariables(e.variables)||null}}catch(e){console.error("Defuddle","Error fetching async variables:",e)}return null}))}tryAsyncExtractor(e){return n(this,void 0,void 0,(function*(){var t;try{const r=this.options.url||this.doc.URL,n=this.getSchemaOrgData(),a={includeReplies:null!==(t=this.options.includeReplies)&&void 0!==t?t:"extractors",language:this.options.language},i=e(this.doc,r,n,a);if(i){const e=Date.now(),t=yield i.extractAsync(),r=this._collectMetaTags(),a=o.MetadataExtractor.extract(this.doc,n,r);return this.buildExtractorResponse(t,a,e,i,r)}}catch(e){console.error("Defuddle","Error in async extraction:",e)}return null}))}parseInternal(e={}){var t;const r=Date.now();if(!this.doc.documentElement){const e=this.options.url||"";return{content:"",title:"",description:"",domain:e?new URL(e).hostname:"",favicon:"",image:"",language:"",parseTime:Date.now()-r,published:"",author:"",site:"",schemaOrgData:null,wordCount:0}}const n=Object.assign(Object.assign({removeExactSelectors:!0,removePartialSelectors:!0,removeHiddenElements:!0,removeLowScoring:!0,removeSmallImages:!0,removeContentPatterns:!0,standardize:!0,includeReplies:"extractors"},this.options),e),a=[],s=this.getSchemaOrgData();this._metaTags||(this._metaTags=this._collectMetaTags());const h=this._metaTags;this._metadata||(this._metadata=o.MetadataExtractor.extract(this.doc,s,h));const p=this._metadata;n.removeImages&&this.removeImages(this.doc);try{const e=n.url||this.doc.URL,o={includeReplies:n.includeReplies,language:n.language},f=i.ExtractorRegistry.findExtractor(this.doc,e,s,o);if(f&&f.canExtract()){const e=f.extract();return this.buildExtractorResponse(e,p,r,f,h)}this._mobileStyles||(this._mobileStyles=this._evaluateMediaQueries(this.doc));const g=this._mobileStyles;this._smallImages||(this._smallImages=this.findSmallImages(this.doc));const b=this._smallImages,x=this.doc.cloneNode(!0);null===(t=x.body)||void 0===t||t.normalize(),this.flattenShadowRoots(this.doc,x),this.resolveStreamedContent(x),this.applyMobileStyles(x,g);let y=null;if(n.contentSelector&&(y=x.querySelector(n.contentSelector),this._log("Using contentSelector:",n.contentSelector,y?"found":"not found")),y||(y=this.findMainContent(x)),y&&"body"===y.tagName.toLowerCase()){const e=this._getSchemaText(s);if(e){const t=this._findElementBySchemaText(x.body,e);t&&(this._log("Found content element via schema.org text"),y=t)}}if(!y){const e=this.doc.body?this.resolveContentUrls((0,m.serializeHTML)(this.doc.body)):"",t=Date.now();return Object.assign(Object.assign({content:e},p),{wordCount:this.countHtmlWords(e),parseTime:Math.round(t-r),metaTags:h})}y.querySelectorAll("wbr").forEach((e=>e.remove())),n.standardize&&((0,c.standardizeFootnotes)(y),(0,u.standardizeCallouts)(y)),n.removeSmallImages&&this.removeSmallImages(x,b),n.removeHiddenElements&&this.removeHiddenElements(x,a),(n.removeExactSelectors||n.removePartialSelectors)&&this.removeBySelector(x,n.removeExactSelectors,n.removePartialSelectors,y,a,!1===n.removeHiddenElements),n.removeLowScoring&&d.ContentScorer.scoreAndRemove(x,this.debug,a,y),n.removeContentPatterns&&y&&this.removeByContentPattern(y,this.debug?a:void 0),n.standardize&&(0,l.standardizeContent)(y,p,this.doc,this.debug),this.resolveRelativeUrls(y);const v=y.outerHTML,w=Date.now(),A=Object.assign(Object.assign({content:v},p),{wordCount:this.countHtmlWords(v),parseTime:Math.round(w-r),metaTags:h});return this.debug&&(A.debug={contentSelector:this.getElementSelector(y),removals:a}),A}catch(e){console.error("Defuddle","Error processing document:",e);const t=this.doc.body?this.resolveContentUrls((0,m.serializeHTML)(this.doc.body)):"",n=Date.now();return Object.assign(Object.assign({content:t},p),{wordCount:this.countHtmlWords(t),parseTime:Math.round(n-r),metaTags:h})}}countHtmlWords(e){const t=e.replace(/<[^>]*>/g," ").replace(/ /gi," ").replace(/&/gi,"&").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/&#\d+;/g," ").replace(/&\w+;/g," ");return(0,h.countWords)(t)}_log(...e){this.debug&&console.log("Defuddle:",...e)}_evaluateMediaQueries(e){const t=[],r=/max-width[^:]*:\s*(\d+)/;try{if(!e.styleSheets)return t;const n=Array.from(e.styleSheets).filter((e=>{try{return e.cssRules,!0}catch(e){return e instanceof DOMException&&e.name,!1}}));n.flatMap((e=>{try{return"undefined"==typeof CSSMediaRule?[]: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]);if(s.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)}}))}removeImages(e){const t=e.getElementsByTagName("img");Array.from(t).forEach((e=>{e.remove()}))}removeHiddenElements(e,t){let r=0;const n=new Map,o=/(?:^|;\s*)(?:display\s*:\s*none|visibility\s*:\s*hidden|opacity\s*:\s*0)(?:\s*;|\s*$)/i,a=e.defaultView,i="undefined"!=typeof window&&a===window,s=e.querySelectorAll("*");for(const e of s){if(e.querySelector("math, [data-mathml], .katex-mathml")||"math"===e.tagName.toLowerCase())continue;const t=e.getAttribute("style");if(t&&o.test(t)){const o=t.includes("display")?"display:none":t.includes("visibility")?"visibility:hidden":"opacity:0";n.set(e,o),r++;continue}if(i)try{const t=a.getComputedStyle(e);let o="";if("none"===t.display?o="display:none":"hidden"===t.visibility?o="visibility:hidden":"0"===t.opacity&&(o="opacity:0"),o){n.set(e,o),r++;continue}}catch(e){}const s=e.getAttribute("class")||"";if(s){const t=s.split(/\s+/);for(const o of t)if("hidden"===o||o.endsWith(":hidden")||"invisible"===o||o.endsWith(":invisible")){n.set(e,`class:${o}`),r++;break}}}n.forEach(((e,r)=>{this.debug&&t&&t.push({step:"removeHiddenElements",reason:e,text:(0,h.textPreview)(r)}),r.remove()})),this._log("Removed hidden elements:",r)}removeBySelector(e,t=!0,r=!0,n,o,a=!1){const i=Date.now();let l=0,c=0;const u=new Map;if(t){e.querySelectorAll(s.EXACT_SELECTORS_JOINED).forEach((e=>{if(null==e?void 0:e.parentNode){if(a){const t=e.closest(s.HIDDEN_EXACT_SKIP_SELECTOR),r=(e.getAttribute("role")||"").toLowerCase();if(e.matches(s.HIDDEN_EXACT_SELECTOR)||t&&"dialog"===r)return}if(e.closest("pre, code"))return;u.set(e,{type:"exact"}),l++}}))}if(r){const t=this.debug?s.PARTIAL_SELECTORS.map((e=>({pattern:e,regex:new RegExp(e,"i")}))):null;e.querySelectorAll(s.TEST_ATTRIBUTES_SELECTOR).forEach((e=>{var r;if(u.has(e))return;const n=e.tagName;if("CODE"===n||"PRE"===n||e.querySelector("pre")||e.closest("code, pre"))return;const o=s.TEST_ATTRIBUTES.map((t=>"class"===t?(0,m.getClassName)(e):"id"===t?e.id||"":e.getAttribute(t)||"")).join(" ").toLowerCase();if(o.trim()&&s.PARTIAL_SELECTORS_REGEX.test(o)){const n=t?null===(r=t.find((e=>e.regex.test(o))))||void 0===r?void 0:r.pattern:void 0;u.set(e,{type:"partial",selector:n}),c++}}))}u.forEach((({type:e,selector:t},r)=>{if(!(n&&r.contains(n)||"A"===r.tagName&&r.closest("h1, h2, h3, h4, h5, h6"))){try{if(r.matches(s.FOOTNOTE_LIST_SELECTORS)||r.querySelector(s.FOOTNOTE_LIST_SELECTORS))return;const e=r.parentElement;if(e&&e.matches(s.FOOTNOTE_LIST_SELECTORS))return}catch(e){}this.debug&&o&&o.push({step:"removeBySelector",selector:"exact"===e?"exact":t,reason:"exact"===e?"exact selector match":`partial match: ${t}`,text:(0,h.textPreview)(r)}),r.remove()}}));const d=Date.now();this._log("Removed clutter elements:",{exactSelectors:l,partialSelectors:c,total:u.size,processingTime:`${(d-i).toFixed(2)}ms`})}findSmallImages(e){var t,r;const n=new Set;let o=0;const a=e.querySelectorAll("img, svg"),i=e.defaultView,s="undefined"!=typeof window&&i===window;for(const e of a){const a=parseInt(e.getAttribute("width")||"0"),l=parseInt(e.getAttribute("height")||"0"),c=e.getAttribute("style")||"",u=parseInt((null===(t=c.match(f))||void 0===t?void 0:t[1])||"0"),d=parseInt((null===(r=c.match(g))||void 0===r?void 0:r[1])||"0");let h=0,m=0;if(s){try{const t=i.getComputedStyle(e);h=parseInt(t.width)||0,m=parseInt(t.height)||0}catch(e){}try{const t=e.getBoundingClientRect();t.width>0&&(h=h||t.width),t.height>0&&(m=m||t.height)}catch(e){}}const p=[a,u,h].filter((e=>e>0)),b=[l,d,m].filter((e=>e>0));if(p.length>0&&b.length>0){const t=Math.min(...p),r=Math.min(...b);if(t<33||r<33){const t=this.getElementIdentifier(e);t&&(n.add(t),o++)}}}return this._log("Found small elements:",o),n}removeSmallImages(e,t){let r=0;["img","svg"].forEach((n=>{const o=e.getElementsByTagName(n);Array.from(o).forEach((e=>{const n=this.getElementIdentifier(e);n&&t.has(n)&&(e.remove(),r++)}))})),this._log("Removed small elements:",r)}getElementIdentifier(e){if("img"===e.tagName.toLowerCase()){const t=e.getAttribute("data-src");if(t)return`src:${t}`;const r=e.getAttribute("src")||"",n=e.getAttribute("srcset")||"",o=e.getAttribute("data-srcset");if(r)return`src:${r}`;if(n)return`srcset:${n}`;if(o)return`srcset:${o}`}const t=e.id||"",r=(0,m.getClassName)(e),n="svg"===e.tagName.toLowerCase()&&e.getAttribute("viewBox")||"";return t?`id:${t}`:n?`viewBox:${n}`:r?`class:${r}`:null}findMainContent(e){const t=[];if(s.ENTRY_POINT_ELEMENTS.forEach(((r,n)=>{e.querySelectorAll(r).forEach((e=>{let r=40*(s.ENTRY_POINT_ELEMENTS.length-n);r+=d.ContentScorer.scoreElement(e),t.push({element:e,score:r,selectorIndex:n})}))})),0===t.length)return this.findContentByScoring(e);if(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})))),1===t.length&&"body"===t[0].element.tagName.toLowerCase()){const t=this.findTableBasedContent(e);if(t)return t}const r=t[0];let n=r;for(let e=1;e<t.length;e++){const o=t[e],a=(0,h.countWords)(o.element.textContent||"");if(o.selectorIndex<n.selectorIndex&&n.element.contains(o.element)&&a>50){let e=0;for(const n of t)if(n.selectorIndex===o.selectorIndex&&r.element.contains(n.element)&&++e>1)break;if(e>1)continue;n=o}}return n!==r?n.element:r.element}findTableBasedContent(e){if(!Array.from(e.getElementsByTagName("table")).some((e=>{var t;const r=parseInt(e.getAttribute("width")||"0"),n=this.getComputedStyle(e);return r>400||(null===(t=null==n?void 0:n.width)||void 0===t?void 0:t.includes("px"))&&parseInt(n.width)>400||"center"===e.getAttribute("align")||(e.className||"").toLowerCase().includes("content")||(e.className||"").toLowerCase().includes("article")})))return null;const t=Array.from(e.getElementsByTagName("td"));return d.ContentScorer.findBestElement(t)}findContentByScoring(e){const t=[];return e.querySelectorAll(s.BLOCK_ELEMENTS_SELECTOR).forEach((e=>{const r=d.ContentScorer.scoreElement(e);r>0&&t.push({score:r,element:e})})),t.length>0?t.sort(((e,t)=>t.score-e.score))[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:(0,m.getClassName)(r)&&(e+="."+(0,m.getClassName)(r).trim().split(/\s+/).join(".")),t.unshift(e),r=r.parentElement}return t.join(" > ")}getComputedStyle(e){return(0,h.getComputedStyle)(e)}resolveRelativeUrls(e){const t=this.options.url||this.doc.URL;if(!t)return;let r=t;const n=this.doc.querySelector("base[href]");if(n){const e=n.getAttribute("href");if(e)try{r=new URL(e,t).href}catch(e){}}const o=e=>{const t=e.trim().replace(/^\\?["']+/,"").replace(/\\?["']+$/,"");try{return new URL(t,r).href}catch(r){return t||e}};e.querySelectorAll("[href]").forEach((e=>{const t=e.getAttribute("href");t&&e.setAttribute("href",o(t))})),e.querySelectorAll("[src]").forEach((e=>{const t=e.getAttribute("src");t&&e.setAttribute("src",o(t))})),e.querySelectorAll("[srcset]").forEach((e=>{const t=e.getAttribute("srcset");if(t){const r=/(.+?)\s+(\d+(?:\.\d+)?[wx])/g,n=[];let a,i=0;for(;null!==(a=r.exec(t));){let e=a[1].trim();i>0&&(e=e.replace(/^,\s*/,"")),i=r.lastIndex,n.push(`${o(e)} ${a[2]}`)}if(n.length>0)e.setAttribute("srcset",n.join(", "));else{const r=t.split(",").map((e=>{const t=e.trim().split(/\s+/);return t[0]&&(t[0]=o(t[0])),t.join(" ")})).join(", ");e.setAttribute("srcset",r)}}})),e.querySelectorAll("[poster]").forEach((e=>{const t=e.getAttribute("poster");t&&e.setAttribute("poster",o(t))}))}flattenShadowRoots(e,t){var r,n,o;if(!e.body||!t.body)return;const a=Array.from(e.body.querySelectorAll("*")),i=a.find((e=>e.shadowRoot));if(!i)return;const s=Array.from(t.body.querySelectorAll("*"));if((null!==(o=null===(n=null===(r=i.shadowRoot)||void 0===r?void 0:r.childNodes)||void 0===n?void 0:n.length)&&void 0!==o?o:0)>0)for(let e=a.length-1;e>=0;e--){const r=a[e];if(!r.shadowRoot)continue;const n=s[e];if(!n)continue;const o=r.shadowRoot.innerHTML;o.length>0&&this.replaceShadowHost(n,o,t)}else{const e=[];for(let t=0;t<a.length;t++){const r=a[t],n=r.getAttribute("data-defuddle-shadow");if(!n)continue;const o=s[t];o&&(e.push({cloneEl:o,html:n}),r.removeAttribute("data-defuddle-shadow"),o.removeAttribute("data-defuddle-shadow"))}for(const{cloneEl:r,html:n}of e)this.replaceShadowHost(r,n,t)}}resolveStreamedContent(e){const t=e.querySelectorAll("script"),r=[],n=/\$RC\("(B:\d+)","(S:\d+)"\)/g;for(const e of t){const t=e.textContent||"";if(!t.includes("$RC("))continue;let o;for(n.lastIndex=0;null!==(o=n.exec(t));)r.push({templateId:o[1],contentId:o[2]})}if(0===r.length)return;let o=0;for(const{templateId:t,contentId:n}of r){const r=e.getElementById(t),a=e.getElementById(n);if(!r||!a)continue;const i=r.parentNode;if(!i)continue;let s=r.nextSibling,l=!1;for(;s;){const e=s.nextSibling;if(8===s.nodeType&&"/$"===s.data){s.remove(),l=!0;break}s.remove(),s=e}if(l){for(;a.firstChild;)i.insertBefore(a.firstChild,r);r.remove(),a.remove(),o++}}o>0&&this._log("Resolved streamed content:",o,"suspense boundaries")}replaceShadowHost(e,t,r){var n;const o=(0,m.parseHTML)(r,t);if(e.tagName.includes("-")){const t=r.createElement("div");t.appendChild(o),null===(n=e.parentNode)||void 0===n||n.replaceChild(t,e)}else e.textContent="",e.appendChild(o)}resolveContentUrls(e){if(!(this.options.url||this.doc.URL))return e;const t=this.doc.createElement("div");return t.appendChild((0,m.parseHTML)(this.doc,e)),this.resolveRelativeUrls(t),(0,m.serializeHTML)(t)}_extractSchemaOrgData(e){const t=e.querySelectorAll('script[type="application/ld+json"]'),r=[];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("Defuddle: Error parsing schema.org data:",e),this.debug&&console.error("Defuddle: Problematic JSON content:",t)}}));const n=e=>{if("string"==typeof e)return this._decodeHTMLEntities(e);if(Array.isArray(e))return e.map(n);if("object"==typeof e&&null!==e){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=n(e[r]));return t}return e};return r.map(n)}_collectMetaTags(){const e=[];return this.doc.querySelectorAll("meta").forEach((t=>{const r=t.getAttribute("name"),n=t.getAttribute("property");let o=t.getAttribute("content");o&&e.push({name:r,property:n,content:this._decodeHTMLEntities(o)})})),e}_decodeHTMLEntities(e){return(0,m.decodeHTMLEntities)(this.doc,e)}buildExtractorResponse(e,t,r,n,o){var a,i,s,l,c;const u=this.resolveContentUrls(e.contentHtml),d=this.getExtractorVariables(e.variables);return Object.assign({content:u,title:(null===(a=e.variables)||void 0===a?void 0:a.title)||t.title,description:t.description,domain:t.domain,favicon:t.favicon,image:t.image,language:(null===(i=e.variables)||void 0===i?void 0:i.language)||t.language,published:(null===(s=e.variables)||void 0===s?void 0:s.published)||t.published,author:(null===(l=e.variables)||void 0===l?void 0:l.author)||t.author,site:(null===(c=e.variables)||void 0===c?void 0:c.site)||t.site,schemaOrgData:t.schemaOrgData,wordCount:this.countHtmlWords(e.contentHtml),parseTime:Math.round(Date.now()-r),extractorType:n.constructor.name.replace("Extractor","").toLowerCase(),metaTags:o},d?{variables:d}:{})}getExtractorVariables(e){if(!e)return;const t={};let r=!1;for(const[n,o]of Object.entries(e))p.has(n)||(t[n]=o,r=!0);return r?t:void 0}removeByContentPattern(e,t){var r,n,o,a,i,l,c,u,d,m,p,f,g,w;const A=Array.from(e.querySelectorAll("p, span, div, time"));for(const e of A){if(!e.parentNode)continue;if(e.closest("pre")||e.closest("code"))continue;const n=(null===(r=e.textContent)||void 0===r?void 0:r.trim())||"";if((0,h.countWords)(n)<=15&&b.test(n)&&x.test(n)&&0===e.querySelectorAll("p, div, section, article").length){let r=n;for(const e of v)r=r.replace(e,"");if(r.trim().length>0)continue;this.debug&&t&&t.push({step:"removeByContentPattern",reason:"read time metadata",text:(0,h.textPreview)(e)}),e.remove()}}const C=Array.from(e.querySelectorAll("time")),E=e.textContent||"";for(const r of C){if(!r.parentNode)continue;let i=r,s=(null===(n=i.textContent)||void 0===n?void 0:n.trim())||"";for(;i.parentElement&&i.parentElement!==e;){const e=i.parentElement.tagName.toLowerCase(),t=(null===(o=i.parentElement.textContent)||void 0===o?void 0:o.trim())||"";if("p"===e&&t===s){i=i.parentElement;break}if(!["i","em","span","b","strong","small"].includes(e)||t!==s)break;i=i.parentElement,s=t}const l=(null===(a=i.textContent)||void 0===a?void 0:a.trim())||"";if((0,h.countWords)(l)>10)continue;const c=E.indexOf(l),u=E.length-(c+l.length);c>200&&u>200||(this.debug&&t&&t.push({step:"removeByContentPattern",reason:"boundary date element",text:(0,h.textPreview)(i)}),i.remove())}const S=e.querySelectorAll("ul, ol");for(const r of S){if(!r.parentNode)continue;const n=Array.from(r.children).filter((e=>"LI"===e.tagName));if(n.length<2||n.length>8)continue;const o=(null===(i=r.textContent)||void 0===i?void 0:i.trim())||"",a=E.indexOf(o),s=E.length-(a+o.length);if(a>500&&s>500)continue;const d=r.previousElementSibling;if(d){if(((null===(l=d.textContent)||void 0===l?void 0:l.trim())||"").endsWith(":"))continue}let m=!0;for(const e of n){const t=(null===(c=e.textContent)||void 0===c?void 0:c.trim())||"";if((0,h.countWords)(t)>8){m=!1;break}if(/[.!?]$/.test(t)){m=!1;break}}if(!m)continue;if((0,h.countWords)(o)>30)continue;let p=r;for(;p.parentElement&&p.parentElement!==e;){if(((null===(u=p.parentElement.textContent)||void 0===u?void 0:u.trim())||"")!==o)break;p=p.parentElement}this.debug&&t&&t.push({step:"removeByContentPattern",reason:"blog metadata list",text:(0,h.textPreview)(p)}),p.remove()}const _=this.options.url||this.doc.URL||"";let T="",q="";try{const e=new URL(_);T=e.pathname,q=e.hostname.replace(/^www\./,"")}catch(e){}if(T){const r=e.querySelectorAll("div, span, p");for(const e of r){if(!e.parentNode)continue;const r=(null===(d=e.textContent)||void 0===d?void 0:d.trim())||"";if((0,h.countWords)(r)>10)continue;if(e.querySelectorAll("p, div, section, article").length>0)continue;const n=e.querySelector("a[href]");if(n)try{const r=new URL(n.getAttribute("href")||"",_).pathname;"/"!==r&&r!==T&&T.startsWith(r)&&(this.debug&&t&&t.push({step:"removeByContentPattern",reason:"section breadcrumb",text:(0,h.textPreview)(e)}),e.remove())}catch(e){}}}if(q){const r=e.querySelectorAll("h2, h3, h4, h5, h6");for(const n of r){if(!n.parentNode)continue;const r=n.nextElementSibling;if(!r||"UL"!==r.tagName&&"OL"!==r.tagName)continue;const o=Array.from(r.children).filter((e=>"LI"===e.tagName));if(o.length<2)continue;let a=!1,i=r;for(;i&&i!==e;){let e=i.nextElementSibling;for(;e;){if(((null===(m=e.textContent)||void 0===m?void 0:m.trim())||"").length>0){a=!0;break}e=e.nextElementSibling}if(a)break;i=i.parentElement}if(a)continue;let s=!0;for(const e of o){const t=e.querySelectorAll("a[href]");if(0===t.length){s=!1;break}const r=(null===(p=e.textContent)||void 0===p?void 0:p.trim())||"";let n=0;for(const e of t){n+=((null===(f=e.textContent)||void 0===f?void 0:f.trim())||"").length;try{if(new URL(e.getAttribute("href")||"",_).hostname.replace(/^www\./,"")===q){s=!1;break}}catch(e){}}if(!s)break;if(n<.6*r.length){s=!1;break}}s&&(this.debug&&t&&(t.push({step:"removeByContentPattern",reason:"trailing external link list",text:(0,h.textPreview)(n)}),t.push({step:"removeByContentPattern",reason:"trailing external link list",text:(0,h.textPreview)(r)})),r.remove(),n.remove())}}const k=(0,h.countWords)(e.textContent||"");if(k>300){const r=[];let n=0,o=e.lastElementChild;for(;o;){let e=0;for(const t of o.querySelectorAll("svg"))e+=(0,h.countWords)(t.textContent||"");const t=(0,h.countWords)((null===(g=o.textContent)||void 0===g?void 0:g.trim())||"")-e;if(t>25)break;n+=t,r.push(o),o=o.previousElementSibling}if(r.length>=1&&n<.15*k){const e=r.some((e=>/^H[1-6]$/.test(e.tagName)||e.querySelector("h1, h2, h3, h4, h5, h6"))),n=r.some((e=>e.querySelector(s.CONTENT_ELEMENT_SELECTOR)));if(e&&!n)for(const e of r)this.debug&&t&&t.push({step:"removeByContentPattern",reason:"trailing thin section",text:(0,h.textPreview)(e)}),e.remove()}}const N=e.textContent||"",L=e.querySelectorAll("p, div, span, section");for(const r of L){if(!r.parentNode)continue;const n=(null===(w=r.textContent)||void 0===w?void 0:w.trim())||"",o=(0,h.countWords)(n);if(!(o>50||o<3))for(const o of y)if(o.test(n)){let n=r;for(;n.parentElement&&n.parentElement!==e&&!n.nextElementSibling;)n=n.parentElement;const o=n.textContent||"";if(N.indexOf(o)<200)continue;const a=[];let i=n.parentElement;for(;i&&i!==e;)a.push(i),i=i.parentElement;this.removeTrailingSiblings(n,!0,t);for(const e of a)this.removeTrailingSiblings(e,!1,t);return}}}removeTrailingSiblings(e,t,r){let n=e.nextElementSibling;for(;n;){const e=n.nextElementSibling;this.debug&&r&&r.push({step:"removeByContentPattern",reason:"trailing non-content",text:(0,h.textPreview)(n)}),n.remove(),n=e}t&&(this.debug&&r&&r.push({step:"removeByContentPattern",reason:"boilerplate text",text:(0,h.textPreview)(e)}),e.remove())}}},726(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardizeCallouts=function(e){var t;const r=e.ownerDocument;if(!r)return;const n=Array.from(e.querySelectorAll(".markdown-alert"));for(const e of n){const t=Array.from(e.classList).find((e=>e.startsWith("markdown-alert-")&&"markdown-alert"!==e)),n=t?t.replace("markdown-alert-",""):"note",a=n.charAt(0).toUpperCase()+n.slice(1),i=e.querySelector(".markdown-alert-title");i&&i.remove(),e.replaceWith(o(r,n,a,e))}const a=Array.from(e.querySelectorAll('aside[class*="callout"]'));for(const e of a){const t=Array.from(e.classList).find((e=>e.startsWith("callout-"))),n=t?t.replace("callout-",""):"note",a=n.charAt(0).toUpperCase()+n.slice(1),i=e.querySelector(".callout-content");e.replaceWith(o(r,n,a,i||e))}const i=Array.from(e.querySelectorAll('.alert[class*="alert-"]'));for(const e of i){const n=Array.from(e.classList).find((e=>e.startsWith("alert-")&&"alert-dismissible"!==e)),a=n?n.replace("alert-",""):"note",i=e.querySelector(".alert-heading, .alert-title"),s=(null===(t=null==i?void 0:i.textContent)||void 0===t?void 0:t.trim())||a.charAt(0).toUpperCase()+a.slice(1);i&&i.remove(),e.replaceWith(o(r,a,s,e))}};const n=r(639);function o(e,t,r,o){const a=e.createElement("div");a.setAttribute("data-callout",t),a.className="callout";const i=e.createElement("div");i.className="callout-title";const s=e.createElement("div");s.className="callout-title-inner",s.textContent=r,i.appendChild(s),a.appendChild(i);const l=e.createElement("div");return l.className="callout-content",(0,n.transferContent)(o,l),a.appendChild(l),a}},754(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.codeBlockRules=void 0;const n=r(552),o=[/^language-(\w+)$/,/^lang-(\w+)$/,/^(\w+)-code$/,/^code-(\w+)$/,/^syntax-(\w+)$/,/^code-snippet__(\w+)$/,/^highlight-(\w+)$/,/^(\w+)-snippet$/,/(?:^|\s)(?:language|lang|brush|syntax)-(\w+)(?:\s|$)/i],a=new Set(["abap","actionscript","ada","adoc","agda","antlr4","applescript","arduino","armasm","asciidoc","aspnet","atom","bash","batch","c","clojure","cmake","cobol","coffeescript","cpp","c++","crystal","csharp","cs","dart","django","dockerfile","dotnet","elixir","elm","erlang","fortran","fsharp","gdscript","gitignore","glsl","golang","gradle","graphql","groovy","haskell","hs","haxe","hlsl","html","idris","java","javascript","js","jsx","jsdoc","json","jsonp","julia","kotlin","latex","lean","lean4","lisp","elisp","livescript","lua","makefile","markdown","md","markup","masm","mathml","matlab","mongodb","mysql","nasm","nginx","nim","nix","objc","ocaml","pascal","perl","php","postgresql","powershell","prolog","puppet","python","regex","rss","ruby","rb","rust","scala","scheme","shell","sh","solidity","sparql","sql","ssml","svg","swift","tcl","terraform","tex","toml","typescript","ts","tsx","unrealscript","verilog","vhdl","webassembly","wasm","xml","yaml","yml","zig"]);t.codeBlockRules=[{selector:["pre",'div[class*="prismjs"]',".syntaxhighlighter",".highlight",".highlight-source",".wp-block-syntaxhighlighter-code",".wp-block-code",'div[class*="language-"]',"code.hl.block"].join(", "),element:"pre",transform:(e,t)=>{if(!(e=>"classList"in e&&"getAttribute"in e&&"querySelector"in e)(e))return e;const r=e=>{var t;const r=e.getAttribute("data-lang")||e.getAttribute("data-language")||e.getAttribute("language");if(r)return r.toLowerCase();const n=Array.from(e.classList||[]);if(null===(t=e.classList)||void 0===t?void 0:t.contains("syntaxhighlighter")){const e=n.find((e=>!["syntaxhighlighter","nogutter"].includes(e)));if(e&&a.has(e.toLowerCase()))return e.toLowerCase()}for(const e of n)for(const t of o){const r=e.toLowerCase().match(t);if(r&&r[1]&&a.has(r[1].toLowerCase()))return r[1].toLowerCase()}for(const e of n)if(a.has(e.toLowerCase()))return e.toLowerCase();return""};let i="",s=e;for(;s&&!i;){i=r(s);const e=s.querySelector("code");!i&&e&&(i=r(e)),s=s.parentElement}const l=e=>{var t;if((0,n.isTextNode)(e))return(null===(t=e.parentElement)||void 0===t?void 0:t.querySelector("[data-line], .line"))&&!(e.textContent||"").trim()?"":e.textContent||"";let r="";if((0,n.isElement)(e)){if(e.matches(".hover-info, .hover-container"))return"";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=>l(e))).join("")+"\n"}return e.textContent+"\n"}e.childNodes.forEach((e=>{r+=l(e)}))}return r};let c="";e.matches(".syntaxhighlighter, .wp-block-syntaxhighlighter-code")&&(c=(e=>{const t=e.querySelector(".syntaxhighlighter table .code .container");if(t)return Array.from(t.children).map((e=>{const t=Array.from(e.querySelectorAll("code")).map((e=>{var t;let r=e.textContent||"";return(null===(t=e.classList)||void 0===t?void 0:t.contains("spaces"))&&(r=" ".repeat(r.length)),r})).join("");return t||e.textContent||""})).join("\n");const r=e.querySelectorAll(".code .line");return r.length>0?Array.from(r).map((e=>{const t=Array.from(e.querySelectorAll("code")).map((e=>e.textContent||"")).join("");return t||e.textContent||""})).join("\n"):""})(e)),c||(c=l(e));c=e.matches("code.hl.block")?c.replace(/^[ \t]+|[ \t]+$/g,"").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/^\n+/,""):c.replace(/^\s+|\s+$/g,"").replace(/\t/g," ").replace(/\n{3,}/g,"\n\n").replace(/\u00a0/g," ").replace(/^\n+/,"").replace(/\n+$/,"");let u=e;for(let t=0;t<3&&u;t++){const t=u.parentElement;if(!t||"BODY"===t.tagName)break;const r=Array.from(t.children);for(const t of r){if(t.contains(e))continue;const r=t.tagName;if("DIV"!==r&&"SPAN"!==r)continue;const o=(t.textContent||"").trim();(0,n.countWords)(o)<=5&&!t.querySelector("pre, code, img, table, h1, h2, h3, h4, h5, h6, p, blockquote, ul, ol")&&t.remove()}u=t}const d=t.createElement("pre");e.matches("code.hl.block, pre.hl.lean.lean-output")&&d.setAttribute("data-verso-code","true");const h=t.createElement("code");return i&&(h.setAttribute("data-lang",i),h.setAttribute("class",`language-${i}`)),h.textContent=c,d.appendChild(h),d}}]},610(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardizeFootnotes=function(e){const t=e.ownerDocument;if(!t)return void console.warn("standardizeFootnotes: No document available");new a(t).standardizeFootnotes(e)};const n=r(640),o=r(639);class a{constructor(e){this.genericContainer=null,this.doc=e}createFootnoteItem(e,t,r){const n="string"==typeof t?this.doc:t.ownerDocument,a=n.createElement("li");if(a.className="footnote",a.id=`fn:${e}`,"string"==typeof t){const e=n.createElement("p");e.appendChild((0,o.parseHTML)(n,t)),a.appendChild(e)}else{const e=Array.from(t.querySelectorAll("p"));if(0===e.length){const e=n.createElement("p");(0,o.transferContent)(t,e),this.removeBackrefs(e),a.appendChild(e)}else e.forEach((e=>{const t=n.createElement("p");(0,o.transferContent)(e,t),this.removeBackrefs(t),a.appendChild(t)}))}const i=a.querySelector("p:last-of-type")||a;return r.forEach(((e,t)=>{const o=n.createElement("a");o.href=`#${e}`,o.title="return to article",o.className="footnote-backref",o.textContent="\u21a9",t<r.length-1&&(o.textContent+=" "),i.appendChild(o)})),a}collectFootnotes(e){const t={};let r=1;const a=new Set;if(e.querySelectorAll(n.FOOTNOTE_LIST_SELECTORS).forEach((n=>{if(n.matches("div.footnotes-footer")){return void n.querySelectorAll("div.footnote-footer").forEach((n=>{const i=(n.id||"").match(/^footnote-(\d+)$/);if(i){const s=i[1];if(!a.has(s)){const i=n.cloneNode(!0),l=i.querySelector("a");l&&l.remove();let c=(0,o.serializeHTML)(i);c=c.replace(/^\s*\.\s*/,"");const u=e.ownerDocument.createElement("div");u.appendChild((0,o.parseHTML)(e.ownerDocument,c.trim())),t[r]={content:u,originalId:s,refs:[]},a.add(s),r++}}}))}if(n.matches('div.footnote[data-component-name="FootnoteToDOM"]')){const e=n.querySelector("a.footnote-number"),o=n.querySelector(".footnote-content");if(e&&o){const n=e.id.replace("footnote-","").toLowerCase();n&&!a.has(n)&&(t[r]={content:o,originalId:n,refs:[]},a.add(n),r++)}return}n.querySelectorAll('li, div[role="listitem"]').forEach((e=>{var n,o,i,s;let l="",c=null;const u=e.querySelector(".citations");if(null===(n=null==u?void 0:u.id)||void 0===n?void 0:n.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&&!a.has(l)&&(t[r]={content:c||e,originalId:l,refs:[]},a.add(l),r++)}))})),1===r){const n=new Map;if(e.querySelectorAll('a[href*="#"]').forEach((e=>{var t,r;const o=null===(t=(e.getAttribute("href")||"").split("#").pop())||void 0===t?void 0:t.toLowerCase();if(!o)return;const a=(null===(r=e.textContent)||void 0===r?void 0:r.trim())||"";if(!/^\[?\(?\d{1,4}\)?\]?$/.test(a))return;const i=e.parentElement;if(!i)return;const s=i.tagName.toLowerCase();"sup"!==s&&"span"!==s&&"a"!==e.tagName.toLowerCase()||(n.has(o)||n.set(o,[]),n.get(o).push(e))})),n.size>=2){const o=new Set(n.keys()),i=e.querySelectorAll("div, section, aside, footer");let s=null,l=0;if(i.forEach((t=>{if(t===e)return;const r=t.querySelectorAll("p[id], li[id], div[id]");let n=0;r.forEach((e=>{o.has(e.id.toLowerCase())&&n++})),n>=2&&n>=l&&(l=n,s=t)})),s){const n=s.querySelectorAll("p[id], li[id], div[id]"),i=[];n.forEach((e=>{o.has(e.id.toLowerCase())&&i.push(e)})),i.forEach((n=>{const o=n.id.toLowerCase();if(a.has(o))return;const i=e.ownerDocument.createElement("div"),s=n.cloneNode(!0),l=s.childNodes[0];l&&3===l.nodeType&&(l.textContent=l.textContent.replace(/^\d+\.\s*/,"")),i.appendChild(s);let c=n.nextElementSibling;for(;c&&!c.id;){const e=c.cloneNode(!0);i.appendChild(e),c=c.nextElementSibling}t[r]={content:i,originalId:o,refs:[]},a.add(o),r++})),this.genericContainer=s}}}return t}removeBackrefs(e){for(e.querySelectorAll("a").forEach((e=>{var t,r;const n=(null===(t=e.textContent)||void 0===t?void 0:t.trim().replace(/\uFE0E|\uFE0F/g,""))||"";(/^[\u21A9\u21A5\u2191\u21B5\u2934\u2935\u23CE]+$/.test(n)||(null===(r=e.classList)||void 0===r?void 0:r.contains("footnote-backref")))&&e.remove()}));e.lastChild&&3===e.lastChild.nodeType;){const t=e.lastChild.textContent;if(!/^[\s,.;]*$/.test(t))break;e.lastChild.remove()}}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=this.doc.createElement("sup");r.id=t;const n=this.doc.createElement("a");return n.href=`#fn:${e}`,n.textContent=e,r.appendChild(n),r}collectInlineSidenotes(e){const t={},r=e.querySelectorAll("span.footnote-container, span.sidenote-container");if(0===r.length)return t;let n=1;return r.forEach((e=>{const r=e.querySelector("span.footnote, span.sidenote");if(!r)return;const o=r.cloneNode(!0);t[n]={content:o,originalId:String(n),refs:[`fnref:${n}`]};const a=this.createFootnoteReference(String(n),`fnref:${n}`);e.replaceWith(a),n++})),t}standardizeFootnotes(e){const t=this.collectInlineSidenotes(e),r=this.collectFootnotes(e),o=e.querySelectorAll(n.FOOTNOTE_INLINE_REFERENCES),a=new Map;o.forEach((e=>{var t,n,o,i;if(!e||!e.parentNode)return;let s="",l="";if(e.matches("sup.footnoteref")){const t=e.querySelector('a[id^="footnoteref-"]');if(t){const e=(t.id||"").match(/^footnoteref-(\d+)$/);e&&(s=e[1])}}else if(e.matches('a[id^="ref-link"]'))s=(null===(t=e.textContent)||void 0===t?void 0:t.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=Array.from(e.querySelectorAll("a"));if(t.length>0){const n=[];if(t.forEach((e=>{var t;const o=e.getAttribute("href");if(!o)return;const a=null===(t=o.split("/").pop())||void 0===t?void 0:t.match(/bib\.bib(\d+)/);if(!a)return;const i=a[1].toLowerCase(),s=Object.entries(r).find((([e,t])=>t.originalId===i));if(!s)return;const[l,c]=s,u=c.refs.length>0?`fnref:${l}-${c.refs.length+1}`:`fnref:${l}`;c.refs.push(u),n.push(this.createFootnoteReference(l,u))})),n.length>0){const t=this.findOuterFootnoteContainer(e),r=e.ownerDocument.createDocumentFragment();return n.forEach(((t,n)=>{n>0&&r.appendChild(e.ownerDocument.createTextNode(" ")),r.appendChild(t)})),void t.replaceWith(r)}}}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")||"",!s&&(null===(o=e.id)||void 0===o?void 0:o.startsWith("fnref"))&&(s=e.id.replace("fnref","").toLowerCase());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 t=Object.entries(r).find((([e,t])=>t.originalId===s.toLowerCase()));if(t){const[r,n]=t,o=n.refs.length>0?`fnref:${r}-${n.refs.length+1}`:`fnref:${r}`;n.refs.push(o);const i=this.findOuterFootnoteContainer(e);if("sup"===i.tagName.toLowerCase()){a.has(i)||a.set(i,[]);a.get(i).push(this.createFootnoteReference(r,o))}else i.replaceWith(this.createFootnoteReference(r,o))}}}));const i=Object.entries(r).filter((([e,t])=>0===t.refs.length));if(i.length>0){const t=new Map,n=new Map;i.forEach((([e,r])=>{t.set(r.originalId,[e,r]),n.set(e,[e,r])}));e.querySelectorAll('a[href*="#"]').forEach((e=>{var r,n;if(!e.parentNode)return;if(e.closest('[id^="fnref:"]'))return;if(e.closest("#footnotes"))return;if(this.genericContainer&&this.genericContainer.contains(e))return;const o=null===(r=(e.getAttribute("href")||"").split("#").pop())||void 0===r?void 0:r.toLowerCase();if(!o)return;const a=t.get(o);if(!a)return;const i=(null===(n=e.textContent)||void 0===n?void 0:n.trim())||"";if(!/^[\[\(]?\d{1,4}[\]\)]?$/.test(i))return;const[s,l]=a,c=l.refs.length>0?`fnref:${s}-${l.refs.length+1}`:`fnref:${s}`;l.refs.push(c);this.findOuterFootnoteContainer(e).replaceWith(this.createFootnoteReference(s,c))}));if(Object.entries(r).filter((([e,t])=>0===t.refs.length)).length>0){e.querySelectorAll("sup, span.footnote-ref").forEach((e=>{var r,o;if(!e.parentNode)return;if(null===(r=e.id)||void 0===r?void 0:r.startsWith("fnref:"))return;if(e.closest("#footnotes"))return;const a=((null===(o=e.textContent)||void 0===o?void 0:o.trim())||"").match(/^[\[\(]?(\d{1,4})[\]\)]?$/);if(!a)return;const i=a[1],s=n.get(i)||t.get(i);if(!s)return;const[l,c]=s;if(c.refs.length>0)return;const u=`fnref:${l}`;c.refs.push(u);this.findOuterFootnoteContainer(e).replaceWith(this.createFootnoteReference(l,u))}))}}a.forEach(((e,t)=>{if(e.length>0){const r=this.doc.createDocumentFragment();e.forEach((e=>{const t=e.querySelector("a");if(t){const n=this.doc.createElement("sup");n.id=e.id,n.appendChild(t.cloneNode(!0)),r.appendChild(n)}})),t.replaceWith(r)}}));const s=this.doc.createElement("div");s.id="footnotes";const l=this.doc.createElement("ol"),c=Object.assign(Object.assign({},t),r);Object.entries(c).forEach((([e,t])=>{const r=this.createFootnoteItem(parseInt(e),t.content,t.refs);l.appendChild(r)}));e.querySelectorAll(n.FOOTNOTE_LIST_SELECTORS).forEach((e=>e.remove())),this.genericContainer&&this.genericContainer.parentNode&&this.genericContainer.remove(),l.children.length>0&&(s.appendChild(l),e.appendChild(s))}}},864(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.headingRules=void 0,t.removeHeadingAnchors=function(e){Array.from(e.querySelectorAll("h1 a, h2 a, h3 a, h4 a, h5 a, h6 a")).forEach((e=>{o(e)&&e.remove()}))},t.isPermalinkAnchor=o;const n=r(640);function o(e){if("a"!==e.tagName.toLowerCase())return!1;const t=e.getAttribute("href")||"",r=(e.getAttribute("title")||"").toLowerCase(),n=(e.getAttribute("class")||"").toLowerCase(),o=(e.textContent||"").trim();return!(!t.startsWith("#")&&!t.includes("#"))||(!!r.includes("permalink")||(!!(n.includes("permalink")||n.includes("heading-anchor")||n.includes("anchor-link"))||!!/^[#\xb6\xa7\ud83d\udd17]$/.test(o)))}t.headingRules=[{selector:"h1, h2, h3, h4, h5, h6",element:"keep",transform:e=>{var t;const r=e.ownerDocument;if(!r)return console.warn("No document available"),e;const a=r.createElement(e.tagName);Array.from(e.attributes).forEach((e=>{n.ALLOWED_ATTRIBUTES.has(e.name)&&a.setAttribute(e.name,e.value)}));const i=e.cloneNode(!0),s=new Map,l=[];Array.from(i.querySelectorAll("*")).forEach((e=>{var t,r,n,a;if(!function(e){const t=e.tagName.toLowerCase();return"button"===t||!("a"!==t||!o(e))||!(!e.classList.contains("anchor")&&!e.classList.contains("permalink-widget"))||!("span"!==t&&"div"!==t||!Array.from(e.querySelectorAll("a")).some((e=>o(e))))}(e))return;s.set(e,(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"");const c=e.parentElement;c&&c!==i&&(null===(r=c.textContent)||void 0===r?void 0:r.trim())===(null===(n=e.textContent)||void 0===n?void 0:n.trim())&&s.set(c,(null===(a=e.textContent)||void 0===a?void 0:a.trim())||""),l.push(e)})),l.forEach((e=>e.remove()));let c=(null===(t=i.textContent)||void 0===t?void 0:t.trim())||"";return!c&&s.size>0&&(c=Array.from(s.values())[0]),a.textContent=c,a}}]},649(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.imageRules=void 0;const n=r(552),o=r(639),a=r(640),i=/^data:image\/([^;]+);base64,/,s=/\.(jpg|jpeg|png|webp)\s+\d/,l=/^\s*\S+\.(jpg|jpeg|png|webp)\S*\s*$/,c=/\.(jpg|jpeg|png|webp|gif|avif)(\?.*)?$/i,u=/\s(\d+)w/,d=/dpr=(\d+(?:\.\d+)?)/,h=/^([^\s]+)/,m=/^[\w\-\.\/\\]+\.(jpg|jpeg|png|gif|webp|svg)$/i,p=/^\d{4}-\d{2}-\d{2}$/;function f(e,t,r){const a=r.createElement("figure");a.appendChild(e.cloneNode(!0));const i=r.createElement("figcaption"),s=function(e){const t=[],r=new Set,a=e=>{var o;if((0,n.isTextNode)(e)){const n=(null===(o=e.textContent)||void 0===o?void 0:o.trim())||"";n&&!r.has(n)&&(t.push(n),r.add(n))}else if((0,n.isElement)(e)){const t=e.childNodes;for(let e=0;e<t.length;e++)a(t[e])}},i=e.childNodes;for(let e=0;e<i.length;e++)a(i[e]);if(t.length>0)return t.join(" ");return(0,o.serializeHTML)(e)}(t);return i.appendChild((0,o.parseHTML)(r,s)),a.appendChild(i),a}function g(e,t){t.setAttribute("srcset",e);const r=q(e);r&&v(r)&&t.setAttribute("src",r)}function b(e,t,r){for(let n=0;n<e.attributes.length;n++){const o=e.attributes[n];r.includes(o.name)||t.setAttribute(o.name,o.value)}}function x(e){const t=e.match(i);if(!t)return!1;if("svg+xml"===t[1])return!1;const r=t[0].length;return e.length-r<133}function y(e){return e.startsWith("data:image/svg+xml")}function v(e){return!e.startsWith("data:")&&(!(!e||""===e.trim())&&(c.test(e)||e.includes("image")||e.includes("img")||e.includes("photo")))}function w(e){if(A(e))return!0;return e.querySelectorAll("img, video, picture, source").length>0}function A(e){const t=e.tagName.toLowerCase();return"img"===t||"video"===t||"picture"===t||"source"===t}function C(e){if(A(e))return e;const t=e.querySelectorAll("picture");if(t.length>0)return t[0];const r=e.querySelectorAll("img"),n=[];for(let e=0;e<r.length;e++){const t=r[e],o=t.getAttribute("src")||"",a=t.getAttribute("alt")||"";o.includes("data:image/svg+xml")||(x(o)||!a.trim()&&r.length>1||n.push(t))}if(n.length>0)return n[0];const o=e.querySelectorAll("video");if(o.length>0)return o[0];const a=e.querySelectorAll("source");if(a.length>0)return a[0];const i=e.querySelectorAll("img, picture, source, video");return i.length>0?i[0]:null}function E(e){var t,r,n,o;const a=e.querySelector("figcaption");if(a)return a;const i=new Set,s=['[class*="caption"]','[class*="description"]','[class*="alt"]','[class*="title"]','[class*="credit"]','[class*="text"]','[class*="post-thumbnail-text"]','[class*="image-caption"]','[class*="photo-caption"]',"[aria-label]","[title]"].join(", "),l=e.querySelectorAll(s);for(let e=0;e<l.length;e++){const r=l[e];if(A(r))continue;const n=null===(t=r.textContent)||void 0===t?void 0:t.trim();if(n&&n.length>0&&!i.has(n))return i.add(n),r}const c=e.querySelector("img");if(c&&c.hasAttribute("alt")){const t=c.getAttribute("alt");if(t&&t.trim().length>0){const r=e.ownerDocument.createElement("div");return r.textContent=t,r}}if(e.parentElement){const t=e.parentElement.children;for(let n=0;n<t.length;n++){const o=t[n];if(o===e)continue;if(Array.from(o.classList).some((e=>e.includes("caption")||e.includes("credit")||e.includes("text")||e.includes("description")))){const e=null===(r=o.textContent)||void 0===r?void 0:r.trim();if(e&&e.length>0)return o}}}const u=e.querySelectorAll("img");for(let e=0;e<u.length;e++){const t=u[e];if(!t.parentElement)continue;let r=t.nextElementSibling;for(;r;){if(["EM","STRONG","SPAN","I","B","SMALL","CITE"].includes(r.tagName)){const e=null===(n=r.textContent)||void 0===n?void 0:n.trim();if(e&&e.length>0)return r}r=r.nextElementSibling}}for(let e=0;e<u.length;e++){const t=u[e],r=t.parentElement;if(!r)continue;const n=r.querySelectorAll("em, strong, span, i, b, small, cite");for(let e=0;e<n.length;e++){const r=n[e];if(r===t)continue;const a=null===(o=r.textContent)||void 0===o?void 0:o.trim();if(a&&a.length>0)return r}}return null}function S(e){var t;const r=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"";return!(r.length<10||r.startsWith("http://")||r.startsWith("https://"))&&(!m.test(r)&&(!r.match(/^\d+$/)&&!p.test(r)))}function _(e,t){const r=e.tagName.toLowerCase();if("img"===r)return T(e,t);if("picture"===r){const r=e.querySelector("img");return r?T(r,t):e.cloneNode(!0)}return"source"===r?function(e,t){const r=t.createElement("img"),n=e.getAttribute("srcset");n&&g(n,r);const o=e.parentElement;if(o){const e=o.querySelectorAll("img"),t=[];for(let r=0;r<e.length;r++){const n=e[r],o=n.getAttribute("src")||"";x(o)||y(o)||""===o||t.push(n)}if(t.length>0){if(b(t[0],r,["src","srcset"]),!r.hasAttribute("src")||!v(r.getAttribute("src")||"")){const e=t[0].getAttribute("src");e&&v(e)&&r.setAttribute("src",e)}}else{const e=o.querySelector("img[data-src]");if(e&&(b(e,r,["src","srcset"]),!r.hasAttribute("src")||!v(r.getAttribute("src")||""))){const t=e.getAttribute("data-src");t&&v(t)&&r.setAttribute("src",t)}}}return r}(e,t):e.cloneNode(!0)}function T(e,t){const r=e.getAttribute("src")||"";if(x(r)||y(r)){const r=e.parentElement;if(r){const n=r.querySelectorAll("source"),o=[];for(let e=0;e<n.length;e++){const t=n[e];t.hasAttribute("data-srcset")&&""!==t.getAttribute("data-srcset")&&o.push(t)}if(o.length>0){const r=t.createElement("img"),n=e.getAttribute("data-src");return n&&!y(n)&&r.setAttribute("src",n),b(e,r,["src"]),r}}}return e.cloneNode(!0)}function q(e){if(!e||!e.trim())return null;const t=e.trim(),r=/(.+?)\s+(\d+(?:\.\d+)?[wx])/g;let n,o=0;for(;null!==(n=r.exec(t));){let e=n[1].trim();if(o>0&&(e=e.replace(/^,\s*/,"")),o=r.lastIndex,e&&!y(e))return e}const a=t.match(h);return a&&a[1]&&!y(a[1])?a[1]:null}function k(e){if(0===e.length)return null;if(1===e.length)return e[0];for(let t=0;t<e.length;t++)if(!e[t].hasAttribute("media"))return e[t];let t=null,r=0;for(let n=0;n<e.length;n++){const o=e[n],a=o.getAttribute("srcset");if(!a)continue;const i=a.match(u),s=a.match(d);if(i&&i[1]){const e=parseInt(i[1],10)*(s?parseFloat(s[1]):1);e>r&&(r=e,t=o)}}return t||e[0]}t.imageRules=[{selector:"picture",element:"picture",transform:(e,t)=>{const r=e.querySelectorAll("source"),n=e.querySelector("img");if(!n){console.warn("Picture element without img fallback:",e.outerHTML);const n=k(r);if(n){const r=n.getAttribute("srcset");if(r){const n=t.createElement("img");return g(r,n),e.replaceChildren(n),e}}return e}let o=null,a=null;if(r.length>0){const e=k(r);e&&(o=e.getAttribute("srcset"),o&&(a=q(o)))}if(o&&n.setAttribute("srcset",o),a&&v(a))n.setAttribute("src",a);else if(!n.hasAttribute("src")||!v(n.getAttribute("src")||"")){const e=q(n.getAttribute("srcset")||o||"");e&&v(e)&&n.setAttribute("src",e)}return r.forEach((e=>e.remove())),e}},{selector:"uni-image-full-width",element:"figure",transform:(e,t)=>{var r;const n=t.createElement("figure"),a=t.createElement("img"),i=e.querySelector("img");if(!i)return console.warn("uni-image-full-width without img:",e.outerHTML),n;let s=i.getAttribute("src");const l=i.getAttribute("data-loading");if(l)try{const e=JSON.parse(l);e.desktop&&v(e.desktop)&&(s=e.desktop)}catch(e){console.warn("Failed to parse data-loading attribute:",l,e)}if(!s||!v(s))return console.warn("Could not find valid src for uni-image-full-width:",e.outerHTML),n;a.setAttribute("src",s);let c=i.getAttribute("alt");c||(c=e.getAttribute("alt-text")),c&&a.setAttribute("alt",c),n.appendChild(a);const u=e.querySelector("figcaption");if(u){const e=null===(r=u.textContent)||void 0===r?void 0:r.trim();if(e&&e.length>5){const r=t.createElement("figcaption"),a=u.querySelector(".rich-text p");a?(0,o.transferContent)(a,r):r.textContent=e,n.appendChild(r)}}return n}},{selector:'img[data-src], img[data-srcset], img[loading="lazy"], img.lazy, img.lazyload',element:"img",transform:(e,t)=>{const r=e.getAttribute("src")||"",n=function(e){if(e.hasAttribute("data-src")||e.hasAttribute("data-srcset"))return!0;for(let t=0;t<e.attributes.length;t++){const r=e.attributes[t];if("src"!==r.name){if(r.name.startsWith("data-")&&/\.(jpg|jpeg|png|webp|gif)(\?.*)?$/i.test(r.value))return!0;if(/\.(jpg|jpeg|png|webp|gif)(\?.*)?$/i.test(r.value))return!0}}return!1}(e);x(r)&&n&&e.removeAttribute("src");const o=e.getAttribute("data-src");o&&!e.getAttribute("src")&&e.setAttribute("src",o);const a=e.getAttribute("data-srcset");a&&!e.getAttribute("srcset")&&e.setAttribute("srcset",a);for(let t=0;t<e.attributes.length;t++){const r=e.attributes[t];if("src"===r.name||"srcset"===r.name||"alt"===r.name)continue;const n=r.value.charAt(0);"{"!==n&&"["!==n&&(s.test(r.value)?e.setAttribute("srcset",r.value):l.test(r.value)&&e.setAttribute("src",r.value))}return e.classList.remove("lazy","lazyload"),e.removeAttribute("data-ll-status"),e.removeAttribute("data-src"),e.removeAttribute("data-srcset"),e.removeAttribute("loading"),e}},{selector:"span:has(img)",element:"span",transform:(e,t)=>{try{if(!w(e))return e;for(const t of e.children)if(a.BLOCK_LEVEL_ELEMENTS.has(t.tagName.toLowerCase()))return e;const r=C(e);if(!r)return e;const n=E(e),o=_(r,t);if(n&&S(n)){const e=f(o,n,t);return n.parentNode&&n.parentNode.removeChild(n),e}return o}catch(t){return console.warn("Error processing span with image:",t),e}}},{selector:'figure, p:has([class*="caption"])',element:"figure",transform:(e,t)=>{try{if(!w(e))return e;const r=C(e);if(!r)return e;const n=E(e);if(n&&S(n)){const o=C(e);let a;return o?a=o:(console.warn("Figure rule couldn't find current image element in:",e.outerHTML),a=_(r,t)),f(a,n,t)}return e}catch(t){return console.warn("Error processing complex image element:",t),e}}}]},282(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mathSelectors=t.isBlockDisplay=t.getBasicLatexFromElement=t.getMathMLFromElement=void 0;const n=r(639);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 r=e.ownerDocument||document,o=(0,n.parseHTML)(r,t).querySelector("math");if(o){const e="block"===o.getAttribute("display");return{mathml:o.outerHTML,latex:o.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"),o="block"===t||"block"===n;return{mathml:e.outerHTML,latex:e.getAttribute("alttext")||null,isBlock:o}}}const o=e.querySelector(".katex-mathml math");return o?{mathml:o.outerHTML,latex:null,isBlock:!1}:null};t.getBasicLatexFromElement=e=>{var t,r,n;const o=e.getAttribute("data-latex");if(o)return o;if("img"===e.tagName.toLowerCase()&&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"math"===e.tagName.toLowerCase()&&(null===(n=e.textContent)||void 0===n?void 0:n.trim())?e.textContent.trim():e.getAttribute("alt")||null};t.isBlockDisplay=e=>{if("block"===e.getAttribute("display"))return!0;const t=(0,n.getClassName)(e).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;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(",")},974(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.mathRules=t.createCleanMathEl=t.getLatexFromElement=void 0;const o=r(354),a=n(r(914)),i=r(282),s=r(639);t.getLatexFromElement=e=>{const t=(0,i.getBasicLatexFromElement)(e);if(t)return t;const r=(0,i.getMathMLFromElement)(e);if(null==r?void 0:r.mathml)try{return o.MathMLToLaTeX.convert(r.mathml)}catch(e){console.warn("Failed to convert MathML to LaTeX:",e)}return null};t.createCleanMathEl=(e,t,r,n)=>{const o=n.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=(0,s.parseHTML)(n,e.mathml).querySelector("math");t&&(0,s.transferContent)(t,o)}else if(t)try{const e=a.default.renderToString(t,{displayMode:r,throwOnError:!1}),i=(0,s.parseHTML)(n,e).querySelector("math");if(i)for(;i.firstChild;)o.appendChild(i.firstChild);else o.textContent=t}catch(e){console.warn("Failed to convert LaTeX to MathML:",e),o.textContent=t}return o},t.mathRules=[{selector:i.mathSelectors,element:"math",transform:e=>{if(!("classList"in e)||!("getAttribute"in e)||!("querySelector"in e))return e;const r=(0,i.getMathMLFromElement)(e),n=(0,t.getLatexFromElement)(e),o=(0,i.isBlockDisplay)(e),a=(0,t.createCleanMathEl)(r,n,o,e.ownerDocument);if(e.parentElement&&!e.matches('script[type^="math/"]')){e.parentElement.querySelectorAll('script[type^="math/"], .MathJax_Preview, script[type="text/javascript"][src*="mathjax"], script[type="text/javascript"][src*="katex"]').forEach((e=>e.remove()))}return a}}]},917(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtractorRegistry=void 0;const n=r(959),o=r(248),a=r(64),i=r(258),s=r(458),l=r(632),c=r(397),u=r(20),d=r(732),h=r(588),m=r(666);class p{static initialize(){this.register({patterns:["x.com","twitter.com"],extractor:a.XArticleExtractor}),this.register({patterns:["twitter.com",/\/x\.com\/.*/],extractor:o.TwitterExtractor}),this.register({patterns:["x.com","twitter.com"],extractor:m.XOembedExtractor}),this.register({patterns:["reddit.com","old.reddit.com","new.reddit.com",/^https:\/\/[^\/]+\.reddit\.com/],extractor:n.RedditExtractor}),this.register({patterns:["youtube.com","youtu.be",/youtube\.com\/watch\?v=.*/,/youtu\.be\/.*/],extractor:i.YoutubeExtractor}),this.register({patterns:[/news\.ycombinator\.com\/item\?id=.*/],extractor:s.HackerNewsExtractor}),this.register({patterns:[/^https?:\/\/chatgpt\.com\/(c|share)\/.*/],extractor:l.ChatGPTExtractor}),this.register({patterns:["claude.ai",/^https?:\/\/claude\.ai\/(chat|share)\/.*/],extractor:c.ClaudeExtractor}),this.register({patterns:[/^https?:\/\/grok\.com\/(chat|share)(\/.*)?$/],extractor:u.GrokExtractor}),this.register({patterns:[/^https?:\/\/gemini\.google\.com\/app\/.*/],extractor:d.GeminiExtractor}),this.register({patterns:["github.com",/^https?:\/\/github\.com\/.*/],extractor:h.GitHubExtractor})}static register(e){this.mappings.push(e)}static findExtractor(e,t,r,n){return this.findByPredicate(e,t,r,(e=>e.canExtract()),n)}static findAsyncExtractor(e,t,r,n){return this.findByPredicate(e,t,r,(e=>e.canExtractAsync()),n)}static findPreferredAsyncExtractor(e,t,r,n){return this.findByPredicate(e,t,r,(e=>e.canExtractAsync()&&e.prefersAsync()),n)}static findByPredicate(e,t,r,n,o){try{const a=new URL(t).hostname;for(const{patterns:i,extractor:s}of this.mappings){if(i.some((e=>e instanceof RegExp?e.test(t):a.includes(e)))){const a=new s(e,t,r,o);if(n(a))return a}}return null}catch(e){return console.error("Error finding extractor:",e),null}}}t.ExtractorRegistry=p,p.mappings=[],p.initialize()},279(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseExtractor=void 0;t.BaseExtractor=class{constructor(e,t,r,n){this.document=e,this.url=t,this.schemaOrgData=r,this.options=n||{}}canExtractAsync(){return!1}prefersAsync(){return!1}extractAsync(){return r(this,void 0,void 0,(function*(){return this.extract()}))}}},181(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConversationExtractor=void 0;const n=r(279),o=r(628),a=r(639);class i extends n.BaseExtractor{getFootnotes(){return[]}extract(){var e;const t=this.extractMessages(),r=this.getMetadata(),n=this.getFootnotes(),i=this.createContentHtml(t,n),s=this.document.implementation.createHTMLDocument(),l=s.createElement("article");l.appendChild((0,a.parseHTML)(s,i)),s.body.appendChild(l);const c=new o.Defuddle(s).parse(),u=c.content;return{content:u,contentHtml:u,extractedContent:{messageCount:t.length.toString()},variables:{title:r.title||"Conversation",site:r.site,description:r.description||`${r.site} conversation with ${t.length} messages`,wordCount:(null===(e=c.wordCount)||void 0===e?void 0:e.toString())||""}}}createContentHtml(e,t){return`${e.map(((t,r)=>{const n=t.timestamp?`<div class="message-timestamp">${t.timestamp}</div>`:"",o=/<p[^>]*>[\s\S]*?<\/p>/i.test(t.content)?t.content:`<p>${t.content}</p>`,a=t.metadata?Object.entries(t.metadata).map((([e,t])=>`data-${e}="${t}"`)).join(" "):"";return`\n\t\t\t<div class="message message-${t.author.toLowerCase()}" ${a}>\n\t\t\t\t<div class="message-header">\n\t\t\t\t\t<p class="message-author"><strong>${t.author}</strong></p>\n\t\t\t\t\t${n}\n\t\t\t\t</div>\n\t\t\t\t<div class="message-content">\n\t\t\t\t\t${o}\n\t\t\t\t</div>\n\t\t\t</div>${r<e.length-1?"\n<hr>":""}`})).join("\n").trim()}\n${t.length>0?`\n\t\t\t<div id="footnotes">\n\t\t\t\t<ol>\n\t\t\t\t\t${t.map(((e,t)=>`\n\t\t\t\t\t\t<li class="footnote" id="fn:${t+1}">\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<a href="${e.url}" target="_blank">${e.text}</a> <a href="#fnref:${t+1}" class="footnote-backref">\u21a9</a>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t`)).join("")}\n\t\t\t\t</ol>\n\t\t\t</div>`:""}`.trim()}}t.ConversationExtractor=i},632(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatGPTExtractor=void 0;const n=r(181),o=r(639);class a extends n.ConversationExtractor{constructor(e,t){super(e,t),this.cachedMessages=null,this.articles=e.querySelectorAll('article[data-testid^="conversation-turn-"]'),this.footnotes=[],this.footnoteCounter=0}canExtract(){return!!this.articles&&this.articles.length>0}extractMessages(){if(this.cachedMessages)return this.cachedMessages;const e=[];return this.footnotes=[],this.footnoteCounter=0,this.articles?(this.articles.forEach((t=>{var r,n;const a=t.querySelector("h5.sr-only, h6.sr-only"),i=(null===(n=null===(r=null==a?void 0:a.textContent)||void 0===r?void 0:r.trim())||void 0===n?void 0:n.replace(/:\s*$/,""))||"";let s="";const l=t.getAttribute("data-message-author-role");l&&(s=l);let c=(0,o.serializeHTML)(t);c=c.replace(/\u200B/g,"");const u=this.document.createElement("div");u.appendChild((0,o.parseHTML)(this.document,c)),u.querySelectorAll('h5.sr-only, h6.sr-only, span[data-state="closed"]').forEach((e=>e.remove())),c=(0,o.serializeHTML)(u);c=c.replace(/(​)?(<span[^>]*?>\s*<a(?=[^>]*?href="([^"]+)")(?=[^>]*?target="_blank")(?=[^>]*?rel="noopener")[^>]*?>[\s\S]*?<\/a>\s*<\/span>)/gi,((e,t,r,n)=>{let o="",a="";try{o=new URL(n).hostname.replace(/^www\./,"");const e=n.split("#:~:text=");if(e.length>1){a=decodeURIComponent(e[1]),a=a.replace(/%2C/g,",");const t=a.split(",");a=t.length>1&&t[0].trim()?` \u2014 ${t[0].trim()}...`:t[0].trim()?` \u2014 ${a.trim()}`:""}}catch(e){console.error(`Failed to parse URL: ${n}`,e),o=n}let i,s=this.footnotes.findIndex((e=>e.url===n));return-1===s?(this.footnoteCounter++,i=this.footnoteCounter,this.footnotes.push({url:n,text:`<a href="${n}">${o}</a>${a}`})):i=s+1,`<sup id="fnref:${i}"><a href="#fn:${i}">${i}</a></sup>`})),c=c.replace(/<p[^>]*>\s*<\/p>/g,""),e.push({author:i,content:c.trim(),metadata:{role:s||"unknown"}})})),this.cachedMessages=e,e):e}getFootnotes(){return this.footnotes}getMetadata(){const e=this.getTitle(),t=this.extractMessages();return{title:e,site:"ChatGPT",url:this.url,messageCount:t.length,description:`ChatGPT conversation with ${t.length} messages`}}getTitle(){var e,t,r;const n=null===(e=this.document.title)||void 0===e?void 0:e.trim();if(n&&"ChatGPT"!==n)return n;const o=null===(r=null===(t=this.articles)||void 0===t?void 0:t.item(0))||void 0===r?void 0:r.querySelector(".text-message");if(o){const e=o.textContent||"";return e.length>50?e.slice(0,50)+"...":e}return"ChatGPT Conversation"}}t.ChatGPTExtractor=a},397(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClaudeExtractor=void 0;const n=r(181),o=r(639);class a extends n.ConversationExtractor{constructor(e,t){super(e,t),this.articles=e.querySelectorAll('div[data-testid="user-message"], div[data-testid="assistant-message"], div.font-claude-response')}canExtract(){return!!this.articles&&this.articles.length>0}extractMessages(){const e=[];return this.articles?(this.articles.forEach((t=>{let r,n;if(t.hasAttribute("data-testid")){if("user-message"!==t.getAttribute("data-testid"))return;r="you",n=(0,o.serializeHTML)(t)}else{if(!t.classList.contains("font-claude-response"))return;{r="assistant";const e=t.querySelector(".standard-markdown")||t;n=(0,o.serializeHTML)(e)}}n&&(n=n.replace(/\u200B/g,"").replace(/<p[^>]*>\s*<\/p>/g,""),e.push({author:"you"===r?"You":"Claude",content:n.trim(),metadata:{role:r}}))})),e):e}getMetadata(){const e=this.getTitle(),t=this.extractMessages();return{title:e,site:"Claude",url:this.url,messageCount:t.length,description:`Claude conversation with ${t.length} messages`}}getTitle(){var e,t,r,n,o;const a=null===(e=this.document.title)||void 0===e?void 0:e.trim();if(a&&"Claude"!==a)return a.replace(/ - Claude$/,"");const i=null===(r=null===(t=this.document.querySelector("header .font-tiempos"))||void 0===t?void 0:t.textContent)||void 0===r?void 0:r.trim();if(i)return i;const s=null===(o=null===(n=this.articles)||void 0===n?void 0:n.item(0))||void 0===o?void 0:o.querySelector('[data-testid="user-message"]');if(s){const e=s.textContent||"";return e.length>50?e.slice(0,50)+"...":e}return"Claude Conversation"}}t.ClaudeExtractor=a},732(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeminiExtractor=void 0;const n=r(181),o=r(639);class a extends n.ConversationExtractor{constructor(e,t){super(e,t),this.messageCount=null,this.conversationContainers=e.querySelectorAll("div.conversation-container"),this.footnotes=[]}canExtract(){return!!this.conversationContainers&&this.conversationContainers.length>0}extractMessages(){this.messageCount=0;const e=[];return this.conversationContainers?(this.extractSources(),this.conversationContainers.forEach((t=>{const r=t.querySelector("user-query");if(r){const t=r.querySelector(".query-text");if(t){const r=(0,o.serializeHTML)(t);e.push({author:"You",content:r.trim(),metadata:{role:"user"}})}}const n=t.querySelector("model-response");if(n){const t=n.querySelector(".model-response-text .markdown"),r=n.querySelector("#extended-response-markdown-content")||t;if(r){let t=(0,o.serializeHTML)(r);const n=this.document.createElement("div");n.appendChild((0,o.parseHTML)(this.document,t)),n.querySelectorAll(".table-content").forEach((e=>{e.classList.remove("table-content")})),t=(0,o.serializeHTML)(n),e.push({author:"Gemini",content:t.trim(),metadata:{role:"assistant"}})}}})),this.messageCount=e.length,e):e}extractSources(){const e=this.document.querySelectorAll("browse-item");e&&e.length>0&&e.forEach((e=>{var t,r,n,o;const a=e.querySelector("a");if(a instanceof HTMLAnchorElement){const e=a.href,i=(null===(r=null===(t=a.querySelector(".domain"))||void 0===t?void 0:t.textContent)||void 0===r?void 0:r.trim())||"",s=(null===(o=null===(n=a.querySelector(".title"))||void 0===n?void 0:n.textContent)||void 0===o?void 0:o.trim())||"";e&&(i||s)&&this.footnotes.push({url:e,text:s?`${i}: ${s}`:i})}}))}getFootnotes(){return this.footnotes}getMetadata(){var e;const t=this.getTitle(),r=null!==(e=this.messageCount)&&void 0!==e?e:this.extractMessages().length;return{title:t,site:"Gemini",url:this.url,messageCount:r,description:`Gemini conversation with ${r} messages`}}getTitle(){var e,t,r,n,o;const a=null===(e=this.document.title)||void 0===e?void 0:e.trim();if(a&&"Gemini"!==a&&!a.includes("Gemini"))return a;const i=null===(r=null===(t=this.document.querySelector(".title-text"))||void 0===t?void 0:t.textContent)||void 0===r?void 0:r.trim();if(i)return i;const s=null===(o=null===(n=this.conversationContainers)||void 0===n?void 0:n.item(0))||void 0===o?void 0:o.querySelector(".query-text");if(s){const e=s.textContent||"";return e.length>50?e.slice(0,50)+"...":e}return"Gemini Conversation"}}t.GeminiExtractor=a},588(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GitHubExtractor=void 0;const n=r(279),o=r(639),a=r(77);class i extends n.BaseExtractor{constructor(e,t){super(e,t),this.isIssue=/\/issues\/\d+/.test(t),this.isPR=/\/pull\/\d+/.test(t)}canExtract(){return!!['meta[name="expected-hostname"][content="github.com"]','meta[name="octolytics-url"]','meta[name="github-keyboard-shortcuts"]',".js-header-wrapper","#js-repo-pjax-container"].some((e=>null!==this.document.querySelector(e)))&&(this.isIssue?['[data-testid="issue-metadata-sticky"]','[data-testid="issue-title"]'].some((e=>null!==this.document.querySelector(e))):!!this.isPR&&[".pull-discussion-timeline",".discussion-timeline",".gh-header-title",".js-issue-title"].some((e=>null!==this.document.querySelector(e))))}extract(){const e=this.extractRepoInfo(),t=this.extractNumber(),r=this.isPR?"pull":"issue",n=this.isPR?this.getPRBody():null,{content:o,author:a,published:i}=this.isPR?this.getPRContent(n):this.getIssueContent(),s=!1!==this.options.includeReplies?this.isPR?this.extractPRComments(n):this.extractComments():"",l=this.createContentHtml(o,s);return{content:l,contentHtml:l,extractedContent:{type:r,number:t,repository:e.repo,owner:e.owner},variables:{title:this.document.title,author:a,published:i,site:`GitHub - ${e.owner}/${e.repo}`,description:this.createDescription(l)}}}createContentHtml(e,t){return(0,a.buildContentHtml)("github",e,t)}getIssueContent(){const e=this.document.querySelector('[data-testid="issue-viewer-issue-container"]');if(!e)return{content:"",author:"",published:""};const t=this.extractAuthor(e,['a[data-testid="issue-body-header-author"]',".IssueBodyHeaderAuthor-module__authorLoginLink--_S7aT",".ActivityHeader-module__AuthorLink--iofTU",'a[href*="/users/"][data-hovercard-url*="/users/"]','a[aria-label*="profile"]']),r=e.querySelector("relative-time"),n=(null==r?void 0:r.getAttribute("datetime"))||"",o=e.querySelector('[data-testid="issue-body-viewer"] .markdown-body');if(!o)return{content:"",author:t,published:n};return{content:this.cleanBodyContent(o),author:t,published:n}}extractComments(){const e=Array.from(this.document.querySelectorAll("[data-wrapper-timeline-id]")),t=new Set,r=[];for(const n of e){const e=n.querySelector(".react-issue-comment");if(!e)continue;const o=n.getAttribute("data-wrapper-timeline-id");if(!o||t.has(o))continue;t.add(o);const a=this.extractAuthor(e,[".ActivityHeader-module__AuthorLink--iofTU",'a[data-testid="avatar-link"]','a[href^="/"][data-hovercard-url*="/users/"]']),i=e.querySelector("relative-time"),s=(null==i?void 0:i.getAttribute("datetime"))||"",l=s?new Date(s).toISOString().split("T")[0]:"",c=e.querySelector(".markdown-body");if(!c)continue;const u=this.cleanBodyContent(c);u&&r.push({author:a,date:l,content:u})}return(0,a.buildCommentTree)(r)}getPRBody(){return this.document.querySelector('[id^="pullrequest-"]')||this.document.querySelector(".timeline-comment")}getPRContent(e){var t;const r=(null==e?void 0:e.querySelector(".comment-body.markdown-body"))||this.document.querySelector(".comment-body.markdown-body"),n=r?this.cleanBodyContent(r):"",o=(null==e?void 0:e.querySelector(".author"))||this.document.querySelector(".gh-header-meta .author"),a=(null===(t=null==o?void 0:o.textContent)||void 0===t?void 0:t.trim())||"",i=null==e?void 0:e.querySelector("relative-time");return{content:n,author:a,published:(null==i?void 0:i.getAttribute("datetime"))||""}}extractPRComments(e){var t;const r=Array.from(this.document.querySelectorAll(".timeline-comment, .review-comment")),n=[];for(const o of r){if(e&&(o===e||e.contains(o)))continue;const r=o.querySelector(".author"),a=(null===(t=null==r?void 0:r.textContent)||void 0===t?void 0:t.trim())||"",i=o.querySelector("relative-time"),s=(null==i?void 0:i.getAttribute("datetime"))||"",l=s?new Date(s).toISOString().split("T")[0]:"",c=o.querySelector(".comment-body.markdown-body");if(!c)continue;const u=this.cleanBodyContent(c);u&&n.push({author:a,date:l,content:u})}return(0,a.buildCommentTree)(n)}extractAuthor(e,t){for(const r of t){const t=e.querySelector(r);if(t){const e=t.getAttribute("href");if(e){if(e.startsWith("/"))return e.substring(1);if(e.includes("github.com/")){const t=e.match(/github\.com\/([^\/\?#]+)/);if(t&&t[1])return t[1]}}}}return"Unknown"}cleanBodyContent(e){const t=e.cloneNode(!0);return t.querySelectorAll('button, [data-testid*="button"], [data-testid*="menu"]').forEach((e=>e.remove())),t.querySelectorAll(".js-clipboard-copy, .zeroclipboard-container").forEach((e=>e.remove())),t.querySelectorAll('div.highlight[class*="highlight-source-"] pre, div.highlight pre').forEach((e=>{const t=e.parentElement;if(!t)return;const r=t.className.match(/highlight-source-(\w+)/),n=(null==r?void 0:r[1])||"",o=t.getAttribute("data-snippet-clipboard-copy-content")||e.textContent||"",a=this.document.createElement("code");n&&(a.setAttribute("class",`language-${n}`),a.setAttribute("data-lang",n)),a.textContent=o;const i=this.document.createElement("pre");i.appendChild(a),t.replaceWith(i)})),(0,o.serializeHTML)(t).trim()}extractNumber(){var e;const t=this.url.match(/\/(issues|pull)\/(\d+)/);if(t)return t[2];const r=this.document.querySelector("h1"),n=null===(e=null==r?void 0:r.textContent)||void 0===e?void 0:e.match(/#(\d+)/);return n?n[1]:""}extractRepoInfo(){const e=this.url.match(/github\.com\/([^\/]+)\/([^\/]+)/);if(e)return{owner:e[1],repo:e[2]};const t=this.document.title.match(/([^\/\s]+)\/([^\/\s]+)/);return t?{owner:t[1],repo:t[2]}:{owner:"",repo:""}}createDescription(e){var t;if(!e)return"";const r=this.document.createElement("div");return r.appendChild((0,o.parseHTML)(this.document,e)),(null===(t=r.textContent)||void 0===t?void 0:t.trim().slice(0,140).replace(/\s+/g," "))||""}}t.GitHubExtractor=i},20(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GrokExtractor=void 0;const n=r(181),o=r(639);class a extends n.ConversationExtractor{constructor(e,t){super(e,t),this.messageContainerSelector=".relative.group.flex.flex-col.justify-center.w-full",this.messageBubbles=e.querySelectorAll(this.messageContainerSelector),this.footnotes=[],this.footnoteCounter=0}canExtract(){return!!this.messageBubbles&&this.messageBubbles.length>0}extractMessages(){const e=[];return this.footnotes=[],this.footnoteCounter=0,this.messageBubbles&&0!==this.messageBubbles.length?(this.messageBubbles.forEach((t=>{var r;const n=t.classList.contains("items-end"),a=t.classList.contains("items-start");if(!n&&!a)return;const i=t.querySelector(".message-bubble");if(!i)return;let s="",l="",c="";if(n)s=i.textContent||"",l="user",c="You";else if(a){l="assistant",c="Grok";const e=i.cloneNode(!0);null===(r=e.querySelector(".relative.border.border-border-l1.bg-surface-base"))||void 0===r||r.remove(),s=(0,o.serializeHTML)(e),s=this.processFootnotes(s)}s.trim()&&e.push({author:c,content:s.trim(),metadata:{role:l}})})),e):e}getFootnotes(){return this.footnotes}getMetadata(){var e;const t=this.getTitle(),r=(null===(e=this.messageBubbles)||void 0===e?void 0:e.length)||0;return{title:t,site:"Grok",url:this.url,messageCount:r,description:`Grok conversation with ${r} messages`}}getTitle(){var e,t;const r=null===(e=this.document.title)||void 0===e?void 0:e.trim();if(r&&"Grok"!==r&&!r.startsWith("Grok by "))return r.replace(/\s-\s*Grok$/,"").trim();const n=this.document.querySelector(`${this.messageContainerSelector}.items-end`);if(n){const e=n.querySelector(".message-bubble");if(e){const r=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"";return r.length>50?r.slice(0,50)+"...":r}}return"Grok Conversation"}processFootnotes(e){return e.replace(/<a\s+(?:[^>]*?\s+)?href="([^"]*)"[^>]*>(.*?)<\/a>/gi,((e,t,r)=>{if(!t||t.startsWith("#")||!t.match(/^https?:\/\//i))return e;let n;if(this.footnotes.find((e=>e.url===t)))n=this.footnotes.findIndex((e=>e.url===t))+1;else{this.footnoteCounter++,n=this.footnoteCounter;let e=t;try{const r=new URL(t).hostname.replace(/^www\./,"");e=`<a href="${t}" target="_blank" rel="noopener noreferrer">${r}</a>`}catch(r){e=`<a href="${t}" target="_blank" rel="noopener noreferrer">${t}</a>`,console.warn(`GrokExtractor: Could not parse URL for footnote: ${t}`)}this.footnotes.push({url:t,text:e})}return`${r}<sup id="fnref:${n}" class="footnote-ref"><a href="#fn:${n}" class="footnote-link">${n}</a></sup>`}))}}t.GrokExtractor=a},458(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HackerNewsExtractor=void 0;const n=r(279),o=r(639),a=r(77);class i extends n.BaseExtractor{constructor(e,t){super(e,t),this.mainPost=e.querySelector(".fatitem"),this.isCommentPage=this.detectCommentPage(),this.mainComment=this.isCommentPage?this.findMainComment():null}detectCommentPage(){var e,t;return!!(null===(e=this.mainPost)||void 0===e?void 0:e.querySelector(".onstory"))&&!(null===(t=this.mainPost)||void 0===t?void 0:t.querySelector(".titleline"))}findMainComment(){var e;return(null===(e=this.mainPost)||void 0===e?void 0:e.querySelector("tr.athing"))||null}canExtract(){return!!this.mainPost}extract(){const e=this.getPostContent(),t=!1!==this.options.includeReplies?this.extractComments():"",r=this.createContentHtml(e,t),n=this.getPostTitle(),o=this.getPostAuthor(),a=this.createDescription(),i=this.getPostDate();return{content:r,contentHtml:r,extractedContent:{postId:this.getPostId(),postAuthor:o},variables:{title:n,author:o,site:"Hacker News",description:a,published:i}}}createContentHtml(e,t){return(0,a.buildContentHtml)("hackernews",e,t)}getPostContent(){var e,t,r,n;if(!this.mainPost)return"";if(this.isCommentPage&&this.mainComment){const n=(null===(e=this.mainComment.querySelector(".hnuser"))||void 0===e?void 0:e.textContent)||"[deleted]",i=this.mainComment.querySelector(".commtext"),s=i?(0,o.serializeHTML)(i):"",l=this.mainComment.querySelector(".age"),c=((null==l?void 0:l.getAttribute("title"))||"").split("T")[0]||"",u=(null===(r=null===(t=this.mainComment.querySelector(".score"))||void 0===t?void 0:t.textContent)||void 0===r?void 0:r.trim())||"";return(0,a.buildComment)({author:n,date:c,content:s,score:u||void 0})}const i=this.mainPost.querySelector("tr.athing"),s=(null==i||i.nextElementSibling,(null===(n=null==i?void 0:i.querySelector(".titleline a"))||void 0===n?void 0:n.getAttribute("href"))||"");let l="";s&&(l+=`<p><a href="${s}" target="_blank">${s}</a></p>`);const c=this.mainPost.querySelector(".toptext");return c&&(l+=`<div class="post-text">${(0,o.serializeHTML)(c)}</div>`),l}extractComments(){const e=Array.from(this.document.querySelectorAll("tr.comtr"));return this.processComments(e)}processComments(e){var t,r,n,i;const s=[],l=new Set;for(const a of e){const e=a.getAttribute("id");if(!e||l.has(e))continue;l.add(e);const c=(null===(t=a.querySelector(".ind img"))||void 0===t?void 0:t.getAttribute("width"))||"0",u=parseInt(c)/40,d=a.querySelector(".commtext"),h=(null===(r=a.querySelector(".hnuser"))||void 0===r?void 0:r.textContent)||"[deleted]",m=a.querySelector(".age"),p=(null===(i=null===(n=a.querySelector(".score"))||void 0===n?void 0:n.textContent)||void 0===i?void 0:i.trim())||"";if(!d)continue;const f=`https://news.ycombinator.com/item?id=${e}`,g=((null==m?void 0:m.getAttribute("title"))||"").split("T")[0]||"";s.push({author:h,date:g,content:(0,o.serializeHTML)(d),depth:u,score:p||void 0,url:f})}return(0,a.buildCommentTree)(s)}getPostId(){const e=this.url.match(/id=(\d+)/);return(null==e?void 0:e[1])||""}getPostTitle(){var e,t,r,n,o;if(this.isCommentPage&&this.mainComment){const r=(null===(e=this.mainComment.querySelector(".hnuser"))||void 0===e?void 0:e.textContent)||"[deleted]",n=(null===(t=this.mainComment.querySelector(".commtext"))||void 0===t?void 0:t.textContent)||"";return`Comment by ${r}: ${n.trim().slice(0,50)+(n.length>50?"...":"")}`}return(null===(o=null===(n=null===(r=this.mainPost)||void 0===r?void 0:r.querySelector(".titleline"))||void 0===n?void 0:n.textContent)||void 0===o?void 0:o.trim())||""}getPostAuthor(){var e,t,r;return(null===(r=null===(t=null===(e=this.mainPost)||void 0===e?void 0:e.querySelector(".hnuser"))||void 0===t?void 0:t.textContent)||void 0===r?void 0:r.trim())||""}createDescription(){const e=this.getPostTitle(),t=this.getPostAuthor();return this.isCommentPage?`Comment by ${t} on Hacker News`:`${e} - by ${t} on Hacker News`}getPostDate(){if(!this.mainPost)return"";const e=this.mainPost.querySelector(".age");return((null==e?void 0:e.getAttribute("title"))||"").split("T")[0]||""}}t.HackerNewsExtractor=i},959(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RedditExtractor=void 0;const o=r(279),a=r(639),i=r(77);class s extends o.BaseExtractor{constructor(e,t){super(e,t),this.shredditPost=e.querySelector("shreddit-post"),this.isOldReddit=!!e.querySelector(".thing.link")}canExtract(){return!!this.shredditPost||this.isOldReddit}canExtractAsync(){return this.isCommentsPage()&&!this.isOldReddit}isCommentsPage(){return/\/r\/.+\/comments\//.test(this.url)}extractAsync(){return n(this,void 0,void 0,(function*(){var e,t;const r=new URL(this.url);r.hostname="old.reddit.com";const n=yield fetch(r.toString(),{headers:{"User-Agent":"Mozilla/5.0 (compatible; Defuddle/1.0)"}});if(!n.ok)throw new Error(`Failed to fetch old.reddit.com: ${n.status}`);const o=yield n.text(),a=null!==(t=null===(e=this.document.defaultView)||void 0===e?void 0:e.DOMParser)&&void 0!==t?t:"undefined"!=typeof DOMParser?DOMParser:null;if(!a)throw new Error("DOMParser is not available in this environment");const i=(new a).parseFromString(o,"text/html");return this.extractOldReddit(i)}))}extract(){var e,t;if(this.isOldReddit)return this.extractOldReddit(this.document);const r=this.document.querySelectorAll("shreddit-comment").length>0;if(this.isCommentsPage()&&!r)return{content:"",contentHtml:""};const n=this.getPostContent(),o=!1!==this.options.includeReplies?this.extractComments():"",a=this.createContentHtml(n,o),i=(null===(t=null===(e=this.document.querySelector("h1"))||void 0===e?void 0:e.textContent)||void 0===t?void 0:t.trim())||"",s=this.getSubreddit(),l=this.getPostAuthor(),c=this.createDescription(n);return{content:a,contentHtml:a,extractedContent:{postId:this.getPostId(),subreddit:s,postAuthor:l},variables:{title:i,author:l,site:`r/${s}`,description:c}}}extractOldReddit(e){var t,r;const n=e.querySelector(".thing.link"),o=(null===(r=null===(t=null==n?void 0:n.querySelector("a.title"))||void 0===t?void 0:t.textContent)||void 0===r?void 0:r.trim())||"",s=(null==n?void 0:n.getAttribute("data-author"))||"",l=(null==n?void 0:n.getAttribute("data-subreddit"))||"",c=null==n?void 0:n.querySelector(".usertext-body .md"),u=c?(0,a.serializeHTML)(c):"";let d="";if(!1!==this.options.includeReplies){const t=e.querySelector(".commentarea .sitetable"),r=t?this.collectOldRedditComments(t):[];d=r.length>0?(0,i.buildCommentTree)(r):""}const h=this.createContentHtml(u,d),m=this.createDescription(u);return{content:h,contentHtml:h,extractedContent:{postId:this.getPostId(),subreddit:l,postAuthor:s},variables:{title:o,author:s,site:`r/${l}`,description:m}}}getPostContent(){var e,t,r;const n=null===(e=this.shredditPost)||void 0===e?void 0:e.querySelector('[slot="text-body"]');return(n?(0,a.serializeHTML)(n):"")+((null===(r=null===(t=this.shredditPost)||void 0===t?void 0:t.querySelector("#post-image"))||void 0===r?void 0:r.outerHTML)||"")}createContentHtml(e,t){return(0,i.buildContentHtml)("reddit",e,t)}extractComments(){const e=Array.from(this.document.querySelectorAll("shreddit-comment"));return this.processComments(e)}getPostId(){const e=this.url.match(/comments\/([a-zA-Z0-9]+)/);return(null==e?void 0:e[1])||""}getSubreddit(){const e=this.url.match(/\/r\/([^/]+)/);return(null==e?void 0:e[1])||""}getPostAuthor(){var e;return(null===(e=this.shredditPost)||void 0===e?void 0:e.getAttribute("author"))||""}createDescription(e){var t;if(!e)return"";const r=this.document.createElement("div");return r.appendChild((0,a.parseHTML)(this.document,e)),(null===(t=r.textContent)||void 0===t?void 0:t.trim().slice(0,140).replace(/\s+/g," "))||""}collectOldRedditComments(e,t=0){var r,n;const o=[],i=Array.from(e.querySelectorAll(":scope > .thing.comment"));for(const e of i){const i=e.getAttribute("data-author")||"",s=e.getAttribute("data-permalink")||"",l=(null===(n=null===(r=e.querySelector(".entry .tagline .score.unvoted"))||void 0===r?void 0:r.textContent)||void 0===n?void 0:n.trim())||"",c=e.querySelector(".entry .tagline time[datetime]"),u=(null==c?void 0:c.getAttribute("datetime"))||"",d=u?new Date(u).toISOString().split("T")[0]:"",h=e.querySelector(".entry .usertext-body .md"),m=h?(0,a.serializeHTML)(h):"";o.push({author:i,date:d,content:m,depth:t,score:l||void 0,url:s?`https://reddit.com${s}`:void 0});const p=e.querySelector(".child > .sitetable");p&&o.push(...this.collectOldRedditComments(p,t+1))}return o}processComments(e){var t;const r=[];for(const n of e){const e=parseInt(n.getAttribute("depth")||"0"),o=n.getAttribute("author")||"",i=n.getAttribute("score")||"0",s=n.getAttribute("permalink")||"",l=n.querySelector('[slot="comment"]'),c=l?(0,a.serializeHTML)(l):"",u=n.getAttribute("created")||(null===(t=n.querySelector("time"))||void 0===t?void 0:t.getAttribute("datetime"))||"",d=u?new Date(u).toISOString().split("T")[0]:"";r.push({author:o,date:d,content:c,depth:e,score:`${i} points`,url:s?`https://reddit.com${s}`:void 0})}return(0,i.buildCommentTree)(r)}}t.RedditExtractor=s},248(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwitterExtractor=void 0;const n=r(279),o=r(639);class a extends n.BaseExtractor{constructor(e,t){var r;super(e,t),this.mainTweet=null,this.threadTweets=[];const n=e.querySelector('[aria-label="Timeline: Conversation"]');if(!n){const t=e.querySelector('article[data-testid="tweet"]');return void(t&&(this.mainTweet=t))}let o=Array.from(n.querySelectorAll('article[data-testid="tweet"]'));const a=null===(r=n.querySelector("section, h2"))||void 0===r?void 0:r.parentElement;if(a){const e=o.findIndex((e=>a.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING));-1!==e&&(o=o.slice(0,e))}this.mainTweet=o[0]||null,this.threadTweets=o.slice(1)}canExtract(){return!!this.mainTweet}extract(){const e=this.extractTweet(this.mainTweet),t=!1!==this.options.includeReplies?this.threadTweets.map((e=>this.extractTweet(e))).join("\n<hr>\n"):"",r=`\n\t\t\t<div class="tweet-thread">\n\t\t\t\t<div class="main-tweet">\n\t\t\t\t\t${e}\n\t\t\t\t</div>\n\t\t\t\t${t?`\n\t\t\t\t\t<hr>\n\t\t\t\t\t<div class="thread-tweets">\n\t\t\t\t\t\t${t}\n\t\t\t\t\t</div>\n\t\t\t\t`:""}\n\t\t\t</div>\n\t\t`.trim(),n=this.getTweetId(),o=this.getTweetAuthor();return{content:r,contentHtml:r,extractedContent:{tweetId:n,tweetAuthor:o},variables:{title:`Thread by ${o}`,author:o,site:"X (Twitter)",description:this.createDescription(this.mainTweet)}}}formatTweetText(e){if(!e)return"";const t=this.document.createElement("div");t.appendChild((0,o.parseHTML)(this.document,e)),t.querySelectorAll("a").forEach((e=>{var t;const r=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"";e.replaceWith(r)})),t.querySelectorAll("span, div").forEach((e=>{e.replaceWith(...Array.from(e.childNodes))}));return(0,o.serializeHTML)(t).split("\n").map((e=>e.trim())).filter((e=>e)).map((e=>`<p>${e}</p>`)).join("\n")}extractTweet(e){var t,r;if(!e)return"";const n=e.cloneNode(!0);n.querySelectorAll('img[src*="/emoji/"]').forEach((e=>{if("img"===e.tagName.toLowerCase()&&e.getAttribute("alt")){const t=e.getAttribute("alt");t&&e.replaceWith(t)}}));const a=n.querySelector('[data-testid="tweetText"]'),i=a?(0,o.serializeHTML)(a):"",s=this.formatTweetText(i),l=this.extractImages(e),c=this.extractUserInfo(e),u=null===(r=null===(t=e.querySelector('[aria-labelledby*="id__"]'))||void 0===t?void 0:t.querySelector('[data-testid="User-Name"]'))||void 0===r?void 0:r.closest('[aria-labelledby*="id__"]'),d=u?this.extractTweet(u):"";return`\n\t\t\t<div class="tweet">\n\t\t\t\t<div class="tweet-header">\n\t\t\t\t\t<span class="tweet-author"><strong>${c.fullName}</strong> <span class="tweet-handle">${c.handle}</span></span>\n\t\t\t\t\t${c.date?`<a href="${c.permalink}" class="tweet-date">${c.date}</a>`:""}\n\t\t\t\t</div>\n\t\t\t\t${s?`<div class="tweet-text">${s}</div>`:""}\n\t\t\t\t${l.length?`\n\t\t\t\t\t<div class="tweet-media">\n\t\t\t\t\t\t${l.join("\n")}\n\t\t\t\t\t</div>\n\t\t\t\t`:""}\n\t\t\t\t${d?`\n\t\t\t\t\t<blockquote class="quoted-tweet">\n\t\t\t\t\t\t${d}\n\t\t\t\t\t</blockquote>\n\t\t\t\t`:""}\n\t\t\t</div>\n\t\t`.trim()}extractUserInfo(e){var t,r,n,o,a,i,s,l,c;const u=e.querySelector('[data-testid="User-Name"]');if(!u)return{fullName:"",handle:"",date:"",permalink:""};const d=u.querySelectorAll("a");let h=(null===(r=null===(t=null==d?void 0:d[0])||void 0===t?void 0:t.textContent)||void 0===r?void 0:r.trim())||"",m=(null===(o=null===(n=null==d?void 0:d[1])||void 0===n?void 0:n.textContent)||void 0===o?void 0:o.trim())||"";h&&m||(h=(null===(i=null===(a=u.querySelector('span[style*="color: rgb(15, 20, 25)"] span'))||void 0===a?void 0:a.textContent)||void 0===i?void 0:i.trim())||"",m=(null===(l=null===(s=u.querySelector('span[style*="color: rgb(83, 100, 113)"]'))||void 0===s?void 0:s.textContent)||void 0===l?void 0:l.trim())||"");const p=e.querySelector("time"),f=(null==p?void 0:p.getAttribute("datetime"))||"";return{fullName:h,handle:m,date:f?new Date(f).toISOString().split("T")[0]:"",permalink:(null===(c=null==p?void 0:p.closest("a"))||void 0===c?void 0:c.href)||""}}extractImages(e){var t,r;const n=['[data-testid="tweetPhoto"]','[data-testid="tweet-image"]','img[src*="media"]'],o=[],a=null===(r=null===(t=e.querySelector('[aria-labelledby*="id__"]'))||void 0===t?void 0:t.querySelector('[data-testid="User-Name"]'))||void 0===r?void 0:r.closest('[aria-labelledby*="id__"]');for(const t of n){e.querySelectorAll(t).forEach((e=>{var t,r;if(!(null==a?void 0:a.contains(e))&&"img"===e.tagName.toLowerCase()&&e.getAttribute("alt")){const n=(null===(t=e.getAttribute("src"))||void 0===t?void 0:t.replace(/&name=\w+$/,"&name=large"))||"",a=(null===(r=e.getAttribute("alt"))||void 0===r?void 0:r.replace(/\s+/g," ").trim())||"";o.push(`<img src="${n}" alt="${a}" />`)}}))}return o}getTweetId(){const e=this.url.match(/status\/(\d+)/);return(null==e?void 0:e[1])||""}getTweetAuthor(){var e,t,r;const n=null===(e=this.mainTweet)||void 0===e?void 0:e.querySelector('[data-testid="User-Name"]'),o=null==n?void 0:n.querySelectorAll("a"),a=(null===(r=null===(t=null==o?void 0:o[1])||void 0===t?void 0:t.textContent)||void 0===r?void 0:r.trim())||"";return a.startsWith("@")?a:`@${a}`}createDescription(e){var t;if(!e)return"";return((null===(t=e.querySelector('[data-testid="tweetText"]'))||void 0===t?void 0:t.textContent)||"").trim().slice(0,140).replace(/\s+/g," ")}}t.TwitterExtractor=a},64(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XArticleExtractor=void 0;const n=r(279),o=r(639),a='[data-testid="twitterArticleRichTextView"]',i='[data-testid="twitter-article-title"]',s='[itemprop="author"]',l='meta[itemprop="name"]',c='meta[itemprop="additionalName"]',u='[data-testid="tweetPhoto"] img',d=".longform-unstyled, .public-DraftStyleDefault-block",h='span[style*="font-weight: bold"]',m="[data-offset-key]",p='[data-testid="simpleTweet"]',f='[data-testid="tweetText"]',g='[data-testid="User-Name"]',b='[data-testid="markdown-code-block"]';class x extends n.BaseExtractor{constructor(e,t,r){super(e,t,r),this.articleContainer=e.querySelector(a)}canExtract(){return!!this.articleContainer}extract(){const e=this.extractTitle(),t=this.extractAuthor(),r=this.extractContent(),n=this.createDescription();return{content:r,contentHtml:r,extractedContent:{articleId:this.getArticleId()},variables:{title:e,author:t,site:"X (Twitter)",description:n}}}extractTitle(){var e;const t=this.document.querySelector(i);return(null===(e=null==t?void 0:t.textContent)||void 0===e?void 0:e.trim())||"Untitled X Article"}extractAuthor(){var e,t;const r=this.document.querySelector(s);if(!r)return this.getAuthorFromUrl();const n=null===(e=r.querySelector(l))||void 0===e?void 0:e.getAttribute("content"),o=null===(t=r.querySelector(c))||void 0===t?void 0:t.getAttribute("content");return n&&o?`${n} (@${o})`:n||o||this.getAuthorFromUrl()}getAuthorFromUrl(){const e=this.url.match(/\/([a-zA-Z][a-zA-Z0-9_]{0,14})\/article\/\d+/);return e?`@${e[1]}`:this.getAuthorFromOgTitle()}getAuthorFromOgTitle(){var e;const t=((null===(e=this.document.querySelector('meta[property="og:title"]'))||void 0===e?void 0:e.getAttribute("content"))||"").match(/^(?:\(\d+\)\s+)?(.+?)\s+on\s+X\s*:/);return t?t[1].trim():"Unknown"}getArticleId(){const e=this.url.match(/article\/(\d+)/);return e?e[1]:""}extractContent(){if(!this.articleContainer)return"";const e=this.articleContainer.cloneNode(!0);return this.cleanContent(e),`<article class="x-article">${(0,o.serializeHTML)(e)}</article>`}cleanContent(e){const t=e.ownerDocument||this.document;this.convertEmbeddedTweets(e,t),this.convertCodeBlocks(e,t),this.convertHeaders(e,t),this.unwrapLinkedImages(e,t),this.upgradeImageQuality(e),this.convertBoldSpans(e,t),this.convertDraftParagraphs(e,t),this.removeDraftAttributes(e)}convertEmbeddedTweets(e,t){e.querySelectorAll(p).forEach((e=>{var r,n,o,a,i;const s=t.createElement("blockquote");s.className="embedded-tweet";const l=e.querySelector(g),c=null==l?void 0:l.querySelectorAll("a"),u=(null===(n=null===(r=null==c?void 0:c[0])||void 0===r?void 0:r.textContent)||void 0===n?void 0:n.trim())||"",d=(null===(a=null===(o=null==c?void 0:c[1])||void 0===o?void 0:o.textContent)||void 0===a?void 0:a.trim())||"",h=e.querySelector(f),m=(null===(i=null==h?void 0:h.textContent)||void 0===i?void 0:i.trim())||"";if(u||d){const e=t.createElement("cite");e.textContent=d?`${u} ${d}`:u,s.appendChild(e)}if(m){const e=t.createElement("p");e.textContent=m,s.appendChild(e)}e.replaceWith(s)}))}convertCodeBlocks(e,t){e.querySelectorAll(b).forEach((e=>{var r;const n=e.querySelector("pre"),o=e.querySelector("code");if(!n||!o)return;let a="";const i=o.className.match(/language-(\w+)/);if(i)a=i[1];else{const t=e.querySelector("span");a=(null===(r=null==t?void 0:t.textContent)||void 0===r?void 0:r.trim())||""}const s=t.createElement("pre"),l=t.createElement("code");a&&(l.setAttribute("data-lang",a),l.className=`language-${a}`),l.textContent=o.textContent||"",s.appendChild(l),e.replaceWith(s)}))}convertHeaders(e,t){e.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach((e=>{var r;const n=e.tagName.toLowerCase(),o=(null===(r=e.textContent)||void 0===r?void 0:r.trim())||"";if(!o)return;const a=t.createElement(n);a.textContent=o,e.replaceWith(a)}))}unwrapLinkedImages(e,t){e.querySelectorAll(u).forEach((r=>{var n;const o=r.closest("a");if(!o||!e.contains(o))return;let a=r.getAttribute("src")||"";const i=(null===(n=r.getAttribute("alt"))||void 0===n?void 0:n.replace(/\s+/g," ").trim())||"Image";a=a.includes("&name=")?a.replace(/&name=\w+/,"&name=large"):a.includes("?")?`${a}&name=large`:`${a}?name=large`;const s=t.createElement("img");s.setAttribute("src",a),s.setAttribute("alt",i),o.replaceWith(s)}))}upgradeImageQuality(e){e.querySelectorAll(u).forEach((e=>{const t=e.getAttribute("src");t&&(t.includes("&name=")?e.setAttribute("src",t.replace(/&name=\w+/,"&name=large")):t.includes("?")?e.setAttribute("src",`${t}&name=large`):e.setAttribute("src",`${t}?name=large`))}))}convertDraftParagraphs(e,t){e.querySelectorAll(d).forEach((e=>{const r=t.createElement("p"),n=e=>{if(3===e.nodeType)r.appendChild(t.createTextNode(e.textContent||""));else if(1===e.nodeType){const o=e,a=o.tagName.toLowerCase();if("strong"===a){const e=t.createElement("strong");e.textContent=o.textContent||"",r.appendChild(e)}else if("a"===a){const e=t.createElement("a");e.setAttribute("href",o.getAttribute("href")||""),e.textContent=o.textContent||"",r.appendChild(e)}else if("code"===a){const e=t.createElement("code");e.textContent=o.textContent||"",r.appendChild(e)}else o.childNodes.forEach((e=>n(e)))}};e.childNodes.forEach((e=>n(e))),e.replaceWith(r)}))}convertBoldSpans(e,t){e.querySelectorAll(h).forEach((e=>{const r=t.createElement("strong");r.textContent=e.textContent||"",e.replaceWith(r)}))}removeDraftAttributes(e){e.querySelectorAll(m).forEach((e=>{e.removeAttribute("data-offset-key")}))}createDescription(){var e,t;const r=(null===(t=null===(e=this.articleContainer)||void 0===e?void 0:e.textContent)||void 0===t?void 0:t.trim())||"";return r.slice(0,140)+(r.length>140?"...":"")}}t.XArticleExtractor=x},666(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.XOembedExtractor=void 0;const o=r(279),a=r(639);class i extends o.BaseExtractor{canExtract(){return!1}extract(){return{content:"",contentHtml:""}}canExtractAsync(){return/\/(status|article)\/\d+/.test(this.url)}extractAsync(){return n(this,void 0,void 0,(function*(){const e=yield this.tryExtractFxTwitter();return e||this.extractOembed()}))}extractOembed(){return n(this,void 0,void 0,(function*(){var e;const t=`https://publish.twitter.com/oembed?url=${encodeURIComponent(this.url)}&omit_script=true`,r=yield fetch(t);if(!r.ok)throw new Error(`oEmbed request failed: ${r.status}`);const n=yield r.json(),o=this.document.createElement("div");o.appendChild((0,a.parseHTML)(this.document,n.html));const i=o.querySelector("blockquote"),s=(null==i?void 0:i.querySelectorAll("p"))||[],l=Array.from(s).map((e=>`<p>${(0,a.serializeHTML)(e)}</p>`)).join("\n"),c=n.author_url?`@${n.author_url.split("/").pop()}`:"",u=null==i?void 0:i.querySelector("a:last-child"),d=(null===(e=null==u?void 0:u.textContent)||void 0===e?void 0:e.trim())||"",h=(null==u?void 0:u.getAttribute("href"))||this.url,m=(0,a.escapeHtml)(n.author_name),p=(0,a.escapeHtml)(c),f=(0,a.escapeHtml)(d),g=(0,a.escapeHtml)(h),b=`\n\t\t\t<div class="tweet-thread">\n\t\t\t\t<div class="main-tweet">\n\t\t\t\t\t<div class="tweet">\n\t\t\t\t\t\t<div class="tweet-header">\n\t\t\t\t\t\t\t<span class="tweet-author"><strong>${m}</strong> <span class="tweet-handle">${p}</span></span>\n\t\t\t\t\t\t\t${d?`<a href="${g}" class="tweet-date">${f}</a>`:""}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${l?`<div class="tweet-text">${l}</div>`:""}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`.trim();return{content:b,contentHtml:b,variables:{title:`Post by ${c||n.author_name}`,author:c||n.author_name,site:"X (Twitter)"}}}))}tryExtractFxTwitter(){return n(this,void 0,void 0,(function*(){var e,t;const r=this.url.match(/\/([a-zA-Z][a-zA-Z0-9_]{0,14})\/(status|article)\/(\d+)/);if(!r)return null;try{const n=yield this.fetchFxTwitter(r[1],r[3]);return(null===(e=n.tweet)||void 0===e?void 0:e.article)?this.buildArticleResult(n):(null===(t=n.tweet)||void 0===t?void 0:t.text)?this.buildTweetResult(n):null}catch(e){return null}}))}fetchFxTwitter(e,t){return n(this,void 0,void 0,(function*(){const r=`https://api.fxtwitter.com/${e}/status/${t}`,n=yield fetch(r,{headers:{"User-Agent":"Mozilla/5.0 (compatible; Defuddle/1.0; +https://defuddle.md)"}});if(!n.ok)throw new Error(`FxTwitter API request failed: ${n.status}`);return n.json()}))}buildArticleResult(e){const t=e.tweet.article,{blocks:r,entityMap:n}=t.content,o=this.renderArticle(r,n,t.cover_media),a=`@${e.tweet.author.screen_name}`;return{content:o,contentHtml:o,variables:{title:t.title,author:a,site:"X (Twitter)",description:t.preview_text}}}buildTweetResult(e){const t=e.tweet,r=`@${t.author.screen_name}`,n=this.renderTweet(t);return{content:n,contentHtml:n,variables:{title:`Post by ${r}`,author:r,site:"X (Twitter)"}}}renderTweet(e){var t,r,n;const o=(null===(t=e.raw_text)||void 0===t?void 0:t.text)||e.text,i=((null===(r=e.raw_text)||void 0===r?void 0:r.facets)||[]).filter((e=>"media"!==e.type)),s=o.split(/\n\n+/);let l=0;const c=[];for(const e of s){const t=o.indexOf(e,l),r=t+e.length;l=r;const n=e.trimStart().startsWith(">");let a=n?e.trimStart().slice(1).trimStart():e;const s=n?t+(e.length-e.trimStart().length)+1+(e.trimStart().slice(1).length-e.trimStart().slice(1).trimStart().length):t,u=this.applyFacets(a,s,r,i).replace(/\n/g,"<br>");n?c.push(`<blockquote><p>${u}</p></blockquote>`):u.trim()&&c.push(`<p>${u}</p>`)}if(null===(n=e.media)||void 0===n?void 0:n.photos)for(const t of e.media.photos)c.push(`<img src="${(0,a.escapeHtml)(t.url)}" alt="">`);const u=(0,a.escapeHtml)(`@${e.author.screen_name}`);return`<div class="tweet-thread"><div class="main-tweet"><div class="tweet"><div class="tweet-header"><span class="tweet-author"><strong>${(0,a.escapeHtml)(e.author.name)}</strong> <span class="tweet-handle">${u}</span></span></div><div class="tweet-text">${c.join("\n")}</div></div></div></div>`}applyMarkers(e,t){if(0===t.length)return(0,a.escapeHtml)(e);t.sort(((e,t)=>e.offset!==t.offset?e.offset-t.offset:"close"===e.type&&"open"===t.type?-1:"open"===e.type&&"close"===t.type?1:0));let r="",n=0;for(const o of t)o.offset>n&&(r+=(0,a.escapeHtml)(e.slice(n,o.offset))),r+=o.tag,n=o.offset;return n<e.length&&(r+=(0,a.escapeHtml)(e.slice(n))),r}applyFacets(e,t,r,n){const o=[];for(const i of n){const[n,s]=i.indices;if(s<=t||n>=r)continue;const l=Math.max(0,n-t),c=Math.min(e.length,s-t);if("italic"===i.type)o.push({offset:l,type:"open",tag:"<em>"}),o.push({offset:c,type:"close",tag:"</em>"});else if("mention"===i.type&&i.text){const e=`https://x.com/${(0,a.escapeHtml)(i.text)}`;o.push({offset:l,type:"open",tag:`<a href="${e}">`}),o.push({offset:c,type:"close",tag:"</a>"})}else if("url"===i.type&&i.original){const e=(0,a.escapeHtml)(i.original);o.push({offset:l,type:"open",tag:`<a href="${e}">`}),o.push({offset:c,type:"close",tag:"</a>"})}}return this.applyMarkers(e,o)}renderArticle(e,t,r){var n;const o=[];(null===(n=null==r?void 0:r.media_info)||void 0===n?void 0:n.original_img_url)&&o.push(`<img src="${(0,a.escapeHtml)(r.media_info.original_img_url)}" alt="Cover image">`);let i=0;for(;i<e.length;){const r=e[i];if("unordered-list-item"===r.type){const r=[];for(;i<e.length&&"unordered-list-item"===e[i].type;)r.push(`<li>${this.renderInlineContent(e[i],t)}</li>`),i++;o.push(`<ul>${r.join("")}</ul>`);continue}const n=this.renderBlock(r,t);n&&o.push(n),i++}return`<article class="x-article">${o.join("")}</article>`}renderBlock(e,t){switch(e.type){case"unstyled":default:return e.text.trim()?`<p>${this.renderInlineContent(e,t)}</p>`:"";case"header-two":return`<h2>${this.renderInlineContent(e,t)}</h2>`;case"header-three":return`<h3>${this.renderInlineContent(e,t)}</h3>`;case"atomic":return this.renderAtomicBlock(e,t)}}renderAtomicBlock(e,t){if(0===e.entityRanges.length)return"";const r=t.find((t=>t.key===String(e.entityRanges[0].key)));if(!r)return"";const n=r.value;switch(n.type){case"MEDIA":{const e=n.data.caption;return e?`<figure><figcaption>${(0,a.escapeHtml)(e)}</figcaption></figure>`:""}case"MARKDOWN":{const e=n.data.markdown||"",t=e.match(/^```(\w*)\n([\s\S]*?)\n?```$/);if(t){const e=t[1],r=t[2];return`<pre><code${e?` class="language-${(0,a.escapeHtml)(e)}" data-lang="${(0,a.escapeHtml)(e)}"`:""}>${(0,a.escapeHtml)(r)}</code></pre>`}return`<pre><code>${(0,a.escapeHtml)(e)}</code></pre>`}default:return""}}renderInlineContent(e,t){var r,n;const o=e.text;if(!o)return"";const i=[];for(const t of e.inlineStyleRanges)"Bold"===t.style&&(i.push({offset:t.offset,type:"open",tag:"<strong>"}),i.push({offset:t.offset+t.length,type:"close",tag:"</strong>"}));for(const r of e.entityRanges){const e=t.find((e=>e.key===String(r.key)));if("LINK"===(null==e?void 0:e.value.type)&&e.value.data.url){const t=(0,a.escapeHtml)(e.value.data.url);i.push({offset:r.offset,type:"open",tag:`<a href="${t}">`}),i.push({offset:r.offset+r.length,type:"close",tag:"</a>"})}}if(null===(r=e.data)||void 0===r?void 0:r.mentions)for(const t of e.data.mentions){const e=`https://x.com/${(0,a.escapeHtml)(t.text)}`;i.push({offset:t.fromIndex,type:"open",tag:`<a href="${e}">`}),i.push({offset:t.toIndex,type:"close",tag:"</a>"})}if(null===(n=e.data)||void 0===n?void 0:n.urls)for(const t of e.data.urls){const e=(0,a.escapeHtml)(t.text);i.push({offset:t.fromIndex,type:"open",tag:`<a href="${e}">`}),i.push({offset:t.toIndex,type:"close",tag:"</a>"})}return this.applyMarkers(o,i)}}t.XOembedExtractor=i},258(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.YoutubeExtractor=void 0;const o=r(279),a=r(552),i=r(497),s=/[.!?]["'\u2019\u201D)]*\s*$/,l=/\?["'\u2019\u201D)]*\s*$/,c="20.10.38",u={client:{clientName:"ANDROID",clientVersion:c}},d=`com.google.android.youtube/${c} (Linux; U; Android 14)`,h={client:{clientName:"WEB",clientVersion:"2.20240101.00.00"}},m={segments:"ytd-transcript-segment-renderer",timestamp:".segment-timestamp",text:".segment-text"},p={segments:"transcript-segment-view-model",timestamp:".ytwTranscriptSegmentViewModelTimestamp",text:"span.yt-core-attributed-string",chapters:"timeline-chapter-view-model h3"};class f extends o.BaseExtractor{constructor(e,t,r){super(e,t,r),this.inlineJsonCache=new Map,this.videoElement=e.querySelector("video"),this.schemaOrgData=r}canExtract(){return!0}canExtractAsync(){return!0}prefersAsync(){return!0}extract(){return this.buildResult(this.extractTranscriptFromExistingDom())}extractAsync(){return n(this,void 0,void 0,(function*(){const e=this.extractTranscriptFromExistingDom()||(yield this.fetchTranscript())||(yield this.extractTranscriptFromOpenedDom());return this.buildResult(e)}))}getCaptionTracks(e){var t,r;const n=null===(r=null===(t=null==e?void 0:e.captions)||void 0===t?void 0:t.playerCaptionsTracklistRenderer)||void 0===r?void 0:r.captionTracks;return Array.isArray(n)?n:[]}pickCaptionTrack(e){const t=this.options.language;if(t){const r=e.find((e=>e.languageCode===t));if(r)return r}return e.find((e=>"en"===e.languageCode))||e[0]}getTrackDisplayName(e){var t,r,n;return(null===(t=null==e?void 0:e.name)||void 0===t?void 0:t.simpleText)||(null===(n=null===(r=null==e?void 0:e.name)||void 0===r?void 0:r.runs)||void 0===n?void 0:n.map((e=>(null==e?void 0:e.text)||"")).join("").trim())||""}normalizeLanguageLabel(e){return e.replace(/\s*\([^)]*\)\s*/g," ").replace(/\s+/g," ").trim().toLocaleLowerCase()}getTranscriptLanguageCodeFromDom(){var e;const t=this.document.querySelector('ytd-engagement-panel-section-list-renderer[target-id="engagement-panel-searchable-transcript"] #footer yt-sort-filter-sub-menu-renderer yt-dropdown-menu button'),r=null===(e=null==t?void 0:t.textContent)||void 0===e?void 0:e.trim(),n=this.getCaptionTracks(this.parseInlineJson("ytInitialPlayerResponse")),o=this.pickCaptionTrack(n);if(!r)return(null==o?void 0:o.languageCode)||"en";const a=this.normalizeLanguageLabel(r),i=n.find((e=>this.normalizeLanguageLabel(this.getTrackDisplayName(e))===a));return(null==i?void 0:i.languageCode)||(null==o?void 0:o.languageCode)||"en"}getInlineChapters(){const e=this.parseInlineJson("ytInitialData");if(!e)return[];const t=this.extractChaptersFromPlayerBar(e);return t.length>0?t:this.extractChaptersFromEngagementPanels(e)}getTranscriptContainer(){const e=this.document.querySelector('ytd-engagement-panel-section-list-renderer[target-id="engagement-panel-searchable-transcript"] #segments-container');return e||this.document.querySelector("ytm-macro-markers-list-renderer .ytm-macro-markers-list-container")}getTranscriptSelectors(e){return e.querySelectorAll("ytd-transcript-segment-renderer").length>0?m:e.querySelectorAll("transcript-segment-view-model").length>0?p:void 0}buildTranscriptFromContainer(e,t){var r;if(0===e.children.length)return;const n=this.getTranscriptSelectors(e);if(!n)return;const o=[],a=[];if(n.chapters){const t=e.querySelectorAll(n.chapters);for(const e of t){const t=(e.textContent||"").trim();if(!t)continue;const o=e.closest("macro-markers-panel-item-view-model"),i=null===(r=null==o?void 0:o.nextElementSibling)||void 0===r?void 0:r.querySelector(n.timestamp),s=((null==i?void 0:i.textContent)||"").trim(),l=this.parseTimestamp(s);null!==l&&a.push({title:t,start:l})}}const s=e.querySelectorAll(n.segments);for(const e of s){const t=e.querySelector(n.timestamp),r=e.querySelector(n.text);if(!t||!r)continue;const a=(t.textContent||"").trim(),i=(r.textContent||"").trim();if(!i)continue;const s=this.parseTimestamp(a);null!==s&&o.push({start:s,text:i})}if(0===o.length)return;const l=t.length>0?t:a,c=this.groupTranscriptSegments(o),{html:u,text:d}=(0,i.buildTranscript)("youtube",c,l);return{html:u,text:d,languageCode:this.getTranscriptLanguageCodeFromDom()}}extractTranscriptFromExistingDom(){try{const e=this.getTranscriptContainer();if(!e)return;return this.buildTranscriptFromContainer(e,this.getInlineChapters())}catch(e){return void console.error("YoutubeExtractor: failed to extract transcript from existing DOM",e)}}canOpenTranscriptPanel(){var e;return"function"==typeof(null===(e=this.document.defaultView)||void 0===e?void 0:e.MutationObserver)}buildResult(e){const t=this.getVideoData(),r=this.getChannelName(t),n=t.description||"",o=this.formatDescription(n);let a=`<iframe width="560" height="315" src="https://www.youtube.com/embed/${this.getVideoId()}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>${o}`;(null==e?void 0:e.html)&&(a+=e.html);const i={title:t.name||"",author:r,site:"YouTube",image:Array.isArray(t.thumbnailUrl)&&t.thumbnailUrl[0]||"",published:t.uploadDate,description:n.slice(0,200).trim()};return(null==e?void 0:e.text)&&(i.transcript=e.text),(null==e?void 0:e.languageCode)&&(i.language=e.languageCode),{content:a,contentHtml:a,extractedContent:{videoId:this.getVideoId(),author:r},variables:i}}formatDescription(e){return`<p>${e.replace(/\n/g,"<br>")}</p>`}getVideoData(){if(!this.schemaOrgData)return{};return(Array.isArray(this.schemaOrgData)?this.schemaOrgData.find((e=>"VideoObject"===e["@type"])):"VideoObject"===this.schemaOrgData["@type"]?this.schemaOrgData:null)||{}}getChannelName(e){const t=this.getChannelNameFromDom();if(t)return t;const r=this.getChannelNameFromPlayerResponse();return r||((null==e?void 0:e.author)||"")}getChannelNameFromDom(){var e;const t=['ytd-video-owner-renderer #channel-name a[href^="/@"]','#owner-name a[href^="/@"]'];for(const r of t){const t=this.document.querySelector(r),n=null===(e=null==t?void 0:t.textContent)||void 0===e?void 0:e.trim();if(n)return n}return this.getChannelNameFromMicrodata()}getChannelNameFromMicrodata(){var e;const t=this.document.querySelector('[itemprop="author"]');if(!t)return"";const r=t.querySelector('meta[itemprop="name"]');if(null==r?void 0:r.getAttribute("content"))return r.getAttribute("content").trim();const n=t.querySelector('link[itemprop="name"]');if(null==n?void 0:n.getAttribute("content"))return n.getAttribute("content").trim();const o=t.querySelector('[itemprop="name"], a, span');return(null===(e=null==o?void 0:o.textContent)||void 0===e?void 0:e.trim())||""}getChannelNameFromPlayerResponse(){var e,t,r,n;const o=this.parseInlineJson("ytInitialPlayerResponse");if(!o)return"";const a=(null===(e=null==o?void 0:o.videoDetails)||void 0===e?void 0:e.author)||(null===(t=null==o?void 0:o.videoDetails)||void 0===t?void 0:t.ownerChannelName);if(a)return a;return(null===(n=null===(r=null==o?void 0:o.microformat)||void 0===r?void 0:r.playerMicroformatRenderer)||void 0===n?void 0:n.ownerChannelName)||""}parseInlineJson(e){if(this.inlineJsonCache.has(e))return this.inlineJsonCache.get(e);const t=Array.from(this.document.querySelectorAll("script"));for(const r of t){const t=r.textContent||"";if(!t.includes(e))continue;const n=t.indexOf("{",t.indexOf(e));if(-1===n)continue;let o=0;for(let r=n;r<t.length;r++){const a=t[r];if("{"===a)o+=1;else if("}"===a&&(o-=1,0===o)){const o=t.slice(n,r+1);try{const t=JSON.parse(o);return this.inlineJsonCache.set(e,t),t}catch(e){console.error("YoutubeExtractor: failed to parse inline JSON",e);break}}}}return null}fetchTranscript(){return n(this,void 0,void 0,(function*(){try{const e=this.getVideoId();if(!e)return;const[t,r]=yield Promise.all([this.fetchPlayerData(e),this.fetchChapters(e)]);if(!t)return;const n=this.getCaptionTracks(t);if(0===n.length)return;const o=this.pickCaptionTrack(n);if(!(null==o?void 0:o.baseUrl))return;try{if(!new URL(o.baseUrl).hostname.endsWith(".youtube.com"))return}catch(e){return}const a={"User-Agent":"Mozilla/5.0"};this.options.language&&(a["Accept-Language"]=this.options.language);const i=yield fetch(o.baseUrl,{headers:a});if(!i.ok)return;let s;try{s=yield i.text()}catch(e){return void console.error("YoutubeExtractor: response.text() failed:",e)}if(!s)return;return this.parseTranscriptXml(s,o.languageCode||"en",r)}catch(e){return void console.error("YoutubeExtractor: failed to fetch transcript",e)}}))}pollFor(e,t=20){return new Promise((r=>{let n=0;const o=()=>{const a=e();a?r(a):n++<t?setTimeout(o,250):r(null)};o()}))}waitForTranscriptSegments(){return this.pollFor((()=>{const e=this.getTranscriptContainer();return e&&0!==e.children.length&&e.querySelectorAll(p.segments).length>0?e:null}))}waitForTranscriptContainer(){return this.pollFor((()=>{const e=this.getTranscriptContainer();return e&&e.children.length>0?e:null}))}waitForElement(e){return this.pollFor((()=>this.document.querySelector(e)))}isMobileYoutube(){return!!this.document.querySelector("ytm-slim-video-metadata-section-renderer")}extractTranscriptFromOpenedDom(){return n(this,void 0,void 0,(function*(){try{if(!this.canOpenTranscriptPanel())return;if(this.isMobileYoutube())return this.openMobileTranscriptPanel();const e=this.document.querySelector("ytd-video-description-transcript-section-renderer button");if(!e)return;e.click();const t=yield this.waitForTranscriptContainer();if(!t)return;const r=this.getVideoId(),n=r?yield this.fetchChapters(r):this.getInlineChapters();return this.buildTranscriptFromContainer(t,n)}catch(e){return void console.error("YoutubeExtractor: failed to extract transcript from opened DOM",e)}}))}openMobileTranscriptPanel(){return n(this,void 0,void 0,(function*(){try{const e=this.document.querySelector('button[aria-label="Show more"]');e&&e.click();const t=yield this.waitForElement('button[aria-label="View all"]');if(!t)return;t.click();const r=yield this.waitForElement('button[aria-label="Timeline"]');if(!r)return;r.click();const n=yield this.waitForTranscriptSegments();if(!n)return;return this.buildTranscriptFromContainer(n,[])}catch(e){return void console.error("YoutubeExtractor: failed to open mobile transcript panel",e)}}))}fetchPlayerData(e){return n(this,void 0,void 0,(function*(){try{const t={"Content-Type":"application/json","User-Agent":d};this.options.language&&(t["Accept-Language"]=this.options.language);const r=yield fetch("https://www.youtube.com/youtubei/v1/player?prettyPrint=false",{method:"POST",headers:t,body:JSON.stringify({context:u,videoId:e})});if(r.ok){const e=yield r.json();if(this.getCaptionTracks(e).length>0)return e}}catch(e){}const t=this.parseInlineJson("ytInitialPlayerResponse");if(this.getCaptionTracks(t).length>0)return t}))}fetchChapters(e){return n(this,void 0,void 0,(function*(){const t=this.getInlineChapters();if(t.length>0)return t;try{const t={"Content-Type":"application/json"};this.options.language&&(t["Accept-Language"]=this.options.language);const r=yield fetch("https://www.youtube.com/youtubei/v1/next?prettyPrint=false",{method:"POST",headers:t,body:JSON.stringify({context:h,videoId:e})});if(!r.ok)return[];const n=yield r.json(),o=this.extractChaptersFromPlayerBar(n);return o.length>0?o:this.extractChaptersFromEngagementPanels(n)}catch(e){return[]}}))}extractChaptersFromPlayerBar(e){var t,r,n,o,a,i,s,l;const c=[],u=null===(i=null===(a=null===(o=null===(n=null===(r=null===(t=null==e?void 0:e.playerOverlays)||void 0===t?void 0:t.playerOverlayRenderer)||void 0===r?void 0:r.decoratedPlayerBarRenderer)||void 0===n?void 0:n.decoratedPlayerBarRenderer)||void 0===o?void 0:o.playerBar)||void 0===a?void 0:a.multiMarkersPlayerBarRenderer)||void 0===i?void 0:i.markersMap;if(!Array.isArray(u))return c;for(const e of u){const t=null===(s=null==e?void 0:e.value)||void 0===s?void 0:s.chapters;if(Array.isArray(t))for(const e of t){const t=null==e?void 0:e.chapterRenderer;if(!t)continue;const r=(null===(l=t.title)||void 0===l?void 0:l.simpleText)||"",n=t.timeRangeStartMillis;r&&"number"==typeof n&&c.push({title:r,start:n/1e3})}}return c}extractChaptersFromEngagementPanels(e){var t,r,n,o;const a=[],i=null==e?void 0:e.engagementPanels;if(!Array.isArray(i))return a;for(const e of i){const i=null===(t=null==e?void 0:e.engagementPanelSectionListRenderer)||void 0===t?void 0:t.content,s=null===(r=null==i?void 0:i.macroMarkersListRenderer)||void 0===r?void 0:r.contents;if(Array.isArray(s))for(const e of s){const t=null==e?void 0:e.macroMarkersListItemRenderer;if(!t)continue;const r=(null===(n=t.title)||void 0===n?void 0:n.simpleText)||"",i=(null===(o=t.timeDescription)||void 0===o?void 0:o.simpleText)||"";if(!r||!i)continue;const s=this.parseTimestamp(i);null!==s&&a.push({title:r,start:s})}}return a}parseTimestamp(e){const t=e.split(":").map(Number);return t.some(isNaN)?null:3===t.length?3600*t[0]+60*t[1]+t[2]:2===t.length?60*t[0]+t[1]:null}parseTranscriptXml(e,t,r=[]){const n=[],o=/<p\s+t="(\d+)"[^>]*>([\s\S]*?)<\/p>/g;let a;for(;null!==(a=o.exec(e));){const e=parseInt(a[1],10),t=a[2];let r="";const o=/<s[^>]*>([^<]*)<\/s>/g;let i;for(;null!==(i=o.exec(t));)r+=i[1];r||(r=t.replace(/<[^>]+>/g,"")),r=this.decodeEntities(r),r.trim()&&n.push({start:e/1e3,text:r.trim()})}if(0===n.length){const t=/<text\s+start="([^"]*)"[^>]*>([\s\S]*?)<\/text>/g;for(;null!==(a=t.exec(e));){const e=parseFloat(a[1]);let t=this.decodeEntities(a[2].replace(/<[^>]+>/g,""));t.trim()&&n.push({start:e,text:t.trim()})}}if(0===n.length)return;const s=this.groupTranscriptSegments(n),{html:l,text:c}=(0,i.buildTranscript)("youtube",s,r);return{html:l,text:c,languageCode:t}}decodeEntities(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/'/g,"'").replace(/&#x([0-9a-fA-F]+);/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/&#(\d+);/g,((e,t)=>String.fromCodePoint(parseInt(t,10))))}getVideoId(){const e=new URL(this.url);return"youtu.be"===e.hostname?e.pathname.slice(1):new URLSearchParams(e.search).get("v")||""}groupTranscriptSegments(e){if(0===e.length)return[];return e.some((e=>/^>>/.test(e.text)))?this.groupBySpeaker(e):this.groupBySentence(e)}groupBySpeaker(e){const t=[];let r=null,n=-1,o="";for(const a of e){const e=/^>>/.test(a.text),i=a.text.replace(/^>>\s*/,"").replace(/^-\s+/,""),l=/,\s*$/.test(o),c=(s.test(o)||!o)&&!l;e&&c?(r&&t.push(r),n=(n+1)%2,r={start:a.start,segments:[{start:a.start,text:i}],speakerChange:!0,speaker:n}):(r||(r={start:a.start,segments:[],speakerChange:!1}),r.segments.push({start:a.start,text:i})),o=i}r&&t.push(r),this.splitAffirmativeTurns(t);const a=[];for(const e of t){const t=void 0===e.speaker?this.groupBySentence(e.segments):this.mergeSentenceGroupsWithinTurn(this.groupBySentence(e.segments));for(let r=0;r<t.length;r++)a.push(Object.assign(Object.assign({},t[r]),{speakerChange:0===r&&e.speakerChange,speaker:e.speaker}))}return a}splitAffirmativeTurns(e){const t=/^(mhm|yeah|yes|yep|right|okay|ok|absolutely|sure|exactly|uh-huh|mm-hmm)[.!,]?\s+/i;for(let r=0;r<e.length;r++){const n=e[r];if(void 0===n.speaker||0===n.segments.length)continue;const o=n.segments[0],i=t.exec(o.text);if(!i)continue;if(/,\s*$/.test(i[0]))continue;const s=o.text.slice(i[0].length).trim(),l=n.segments.slice(1);if((0,a.countWords)(s)+l.reduce(((e,t)=>e+(0,a.countWords)(t.text)),0)<30)continue;const c=i[0].trimEnd(),u=s?[{start:o.start,text:s},...l]:l,d={start:n.start,segments:[{start:o.start,text:c}],speakerChange:n.speakerChange,speaker:n.speaker},h={start:u[0].start,segments:u,speakerChange:!0,speaker:0===n.speaker?1:0};e.splice(r,1,d,h),r++}}mergeSentenceGroupsWithinTurn(e){if(e.length<=1)return e;const t=[];let r=Object.assign({},e[0]),n=!0;for(let o=1;o<e.length;o++){const a=e[o];this.shouldMergeSentenceGroups(r,a,n)?r.text=`${r.text} ${a.text}`:(t.push(r),r=Object.assign({},a),n=!1)}return t.push(r),t}shouldMergeSentenceGroups(e,t,r){const n=(0,a.countWords)(e.text),o=(0,a.countWords)(t.text);return!this.isShortStandaloneUtterance(e.text,n)&&!this.isShortStandaloneUtterance(t.text,o)&&(!(r&&n<8)&&(!l.test(e.text)&&!l.test(t.text)&&(!(n+o>80)&&!(t.start-e.start>45))))}isShortStandaloneUtterance(e,t){const r=null!=t?t:(0,a.countWords)(e);return r>0&&r<=3&&s.test(e)}groupBySentence(e){const t=[];let r="",n=0,o=0;const a=()=>{r.trim()&&(t.push({start:n,text:r.trim(),speakerChange:!1}),r="")};for(const t of e)r&&t.start-o>20&&a(),r||(n=t.start),r+=(r?" ":"")+t.text,o=t.start,s.test(t.text)&&a();return a(),t}}t.YoutubeExtractor=f},98(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.createMarkdownContent=void 0;const o=r(628),a=r(76);Object.defineProperty(t,"createMarkdownContent",{enumerable:!0,get:function(){return a.createMarkdownContent}});class i{constructor(e,t={}){this.defuddle=new o.Defuddle(e,t),this.options=t}parse(){var e;const t=this.defuddle.parse();return(0,a.toMarkdown)(t,this.options,null!==(e=this.options.url)&&void 0!==e?e:""),t}parseAsync(){return n(this,void 0,void 0,(function*(){var e;const t=yield this.defuddle.parseAsync();return(0,a.toMarkdown)(t,this.options,null!==(e=this.options.url)&&void 0!==e?e:""),t}))}}i.createMarkdownContent=a.createMarkdownContent,t.default=i},76(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.isGenericElement=s,t.asGenericElement=l,t.createMarkdownContent=h,t.toMarkdown=function(e,t,r){t.markdown?e.content=h(e.content,r):t.separateMarkdown&&(e.contentMarkdown=h(e.content,r))};const o=n(r(431)),a=r(552),i=r(639);function s(e){return null!==e&&"object"==typeof e&&"getAttribute"in e}function l(e){return e}const c=/^(\d+)w,?$/,u=/^\d+(?:\.\d+)?x,?$/;function d(e){const t=e.getAttribute("srcset");if(t){let e="",r=0;const n=t.trim().split(/\s+/);let o=[];for(const t of n){const n=t.match(c);if(n){const t=parseInt(n[1],10);if(o.length>0&&t>r){const n=o.join(" ").replace(/^,\s*/,"");n&&(r=t,e=n)}o=[]}else u.test(t)?o=[]:o.push(t)}if(e)return e}return e.getAttribute("src")||""}function h(e,t){const r={},n=new o.default({headingStyle:"atx",hr:"---",bulletListMarker:"-",codeBlockStyle:"fenced",emDelimiter:"*",preformattedCode:!0});function l(e){let t=e.getAttribute("data-latex"),r=e.getAttribute("alttext");return t?t.trim():r?r.trim():""}n.addRule("table",{filter:"table",replacement:function(e,t){var r,o;if(!s(t))return e;if((null===(r=t.classList)||void 0===r?void 0:r.contains("ltx_equation"))||(null===(o=t.classList)||void 0===o?void 0:o.contains("ltx_eqn_table")))return function(e){const t=e.querySelectorAll("math[alttext]");return 0===t.length?"":Array.from(t).map((e=>{const t=e.getAttribute("alttext");if(t){return null!==e.closest(".ltx_eqn_inline")?`$${t.trim()}$`:`\n$$\n${t.trim()}\n$$`}return""})).join("\n\n")}(t);const l=null!==t.querySelector("table"),c=Array.from(t.querySelectorAll("td, th")).filter((e=>(0,i.isDirectTableChild)(e,t)));if(l||c.length<=1){const e=Array.from(t.querySelectorAll("tr")).filter((e=>(0,i.isDirectTableChild)(e,t))),r=e.map((e=>c.filter((t=>t.parentNode===e)).length));if(e.length>0&&1===new Set(r).size&&r[0]<=1)return"\n\n"+n.turndown(c.map((e=>(0,i.serializeHTML)(e))).join(""))+"\n\n"}if(Array.from(t.querySelectorAll("td, th")).some((e=>s(e)&&(e.hasAttribute("colspan")||e.hasAttribute("rowspan"))))){return"\n\n"+function(e){const t=["src","href","style","align","width","height","rowspan","colspan","bgcolor","scope","valign","headers"],r=e=>{Array.from(e.attributes).forEach((r=>{t.includes(r.name)||e.removeAttribute(r.name)})),e.childNodes.forEach((e=>{(0,a.isElement)(e)&&r(e)}))},n=e.cloneNode(!0);return r(n),n.outerHTML.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}(t)+"\n\n"}const u=t,d=(u.rows&&u.rows.length>0?Array.from(u.rows):Array.from(t.querySelectorAll("tr")).filter((e=>(0,i.isDirectTableChild)(e,t)))).map((e=>`| ${(e.cells&&e.cells.length>0?Array.from(e.cells):Array.from(e.querySelectorAll("td, th")).filter((t=>t.parentNode===e))).map((e=>{let t=n.turndown((0,i.serializeHTML)(e)).replace(/\n/g," ").trim();return t=t.replace(/\|/g,"\\|"),t})).join(" | ")} |`));if(!d.length)return e;const h=`| ${Array(d[0].split("|").length-2).fill("---").join(" | ")} |`;return`\n\n${[d[0],h,...d.slice(1)].join("\n")}\n\n`}}),n.remove(["style","script"]),n.keep(["iframe","video","audio","sup","sub","svg","math"]),n.remove(["button"]),n.addRule("list",{filter:["ul","ol"],replacement:function(e,t){e=e.trim();const r=t;return(!(r.parentNode&&("UL"===r.parentNode.nodeName||"OL"===r.parentNode.nodeName))?"\n":"")+e+"\n"}}),n.addRule("listItem",{filter:"li",replacement:function(e,t,r){var n;if(!s(t))return e;const o=null===(n=t.classList)||void 0===n?void 0:n.contains("task-list-item"),a=t.querySelector('input[type="checkbox"]');let i="";o&&a&&s(a)&&(e=e.replace(/<input[^>]*>/,""),i=a.getAttribute("checked")?"[x] ":"[ ] "),e=e.replace(/\n+$/,"").split("\n").filter((e=>e.length>0)).join("\n\t");let l=r.bulletListMarker+" ",c=t.parentNode,u=0,d=t.parentNode;for(;d&&s(d);){if("UL"===d.nodeName||"OL"===d.nodeName)u++;else if("LI"!==d.nodeName)break;d=d.parentNode}const h=Math.max(0,u-1);if(l="\t".repeat(h)+l,c&&s(c)&&"OL"===c.nodeName){let e=c.getAttribute("start"),r=1;const n=Array.from(c.children||[]);for(let e=0;e<n.length;e++)if(n[e]===t){r=e+1;break}l="\t".repeat(u-1)+(e?Number(e)+r-1:r)+". "}return l+i+e.trim()+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}}),n.addRule("figure",{filter:"figure",replacement:function(e,t){var r;if(!s(t))return e;const o=t.querySelector("img"),a=t.querySelector("figcaption");if(!o||!s(o))return e;const c=o.getAttribute("alt")||"",u=d(o);let h="";if(a&&s(a)){const e=a.querySelector(".ltx_tag_figure"),o=e&&s(e)?null===(r=e.textContent)||void 0===r?void 0:r.trim():"";let c=(0,i.serializeHTML)(a);const u=t.ownerDocument;c=c.replace(/<math.*?>(.*?)<\/math>/g,((e,t,r,n)=>{let o="";if(u){const t=(0,i.parseHTML)(u,e).querySelector("math");o=t&&s(t)?l(t):""}const a=n[r-1]||"",c=n[r+e.length]||"",d=0===r||/\s/.test(a),h=r+e.length===n.length||/\s/.test(c);return`${d||/[\s$]/.test(a)?"":" "}$${o}$${h||/[\s$]/.test(c)?"":" "}`}));h=`${o} ${n.turndown(c)}`.trim()}return h=h.replace(/\[([^\]]+)\]\(([^)]+)\)/g,((e,t,r)=>`[${t}](${r})`)),`\n\n${h}\n\n`}}),n.addRule("image",{filter:"img",replacement:function(e,t){if(!s(t))return e;const r=t.getAttribute("alt")||"",n=d(t),o=t.getAttribute("title")||"";return n?``:""}}),n.addRule("embedToMarkdown",{filter:function(e){if(!s(e))return!1;const t=e.getAttribute("src");return!(!t||!t.match(/(?:youtube\.com|youtube-nocookie\.com|youtu\.be)/)&&!t.match(/(?:twitter\.com|x\.com)/))},replacement:function(e,t){if(!s(t))return e;const r=t.getAttribute("src");if(r){const e=r.match(/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)\/(?:embed\/|watch\?v=)?([a-zA-Z0-9_-]+)/);if(e&&e[1])return`\n\n`;const t=r.match(/(?:https?:\/\/)?(?:www\.)?(?:twitter\.com|x\.com)\/([^/]+)\/status\/([0-9]+)/);if(t)return`\n\n`;const n=r.match(/(?:https?:\/\/)?(?:platform\.)?twitter\.com\/embed\/Tweet\.html\?.*?id=([0-9]+)/);if(n)return`\n\n`}return e}}),n.addRule("highlight",{filter:"mark",replacement:function(e){return"=="+e+"=="}}),n.addRule("strikethrough",{filter:e=>"DEL"===e.nodeName||"S"===e.nodeName||"STRIKE"===e.nodeName,replacement:function(e){return"~~"+e+"~~"}}),n.addRule("complexLinkStructure",{filter:function(e,t){return"A"===e.nodeName&&e.childNodes.length>1&&Array.from(e.childNodes).some((e=>["H1","H2","H3","H4","H5","H6"].includes(e.nodeName)))},replacement:function(e,t,r){if(!s(t))return e;const o=t.getAttribute("href"),a=t.getAttribute("title"),l=t.querySelector("h1, h2, h3, h4, h5, h6"),c=l?n.turndown(l.outerHTML):"";l&&l.remove();let u=`${c}\n\n${n.turndown((0,i.serializeHTML)(t))}\n\n`;return o&&(u+=`[View original](${o})`,a&&(u+=` "${a}"`)),u}}),n.addRule("arXivEnumerate",{filter:e=>{var t,r;return"OL"===e.nodeName&&s(e)&&null!==(r=null===(t=e.classList)||void 0===t?void 0:t.contains("ltx_enumerate"))&&void 0!==r&&r},replacement:function(e,t){if(!s(t))return e;return"\n\n"+Array.from(t.children||[]).map(((e,t)=>{if(s(e)){const r=((0,i.serializeHTML)(e)||"").replace(/^<span class="ltx_tag ltx_tag_item">\d+\.<\/span>\s*/,"");return`${t+1}. ${n.turndown(r)}`}return""})).join("\n\n")+"\n\n"}}),n.addRule("citations",{filter:e=>{if(s(e)){const t=e.getAttribute("id");return"SUP"===e.nodeName&&null!==t&&t.startsWith("fnref:")}return!1},replacement:(e,t)=>{if(s(t)){const e=t.getAttribute("id");if("SUP"===t.nodeName&&null!==e&&e.startsWith("fnref:")){return`[^${e.replace("fnref:","").split("-")[0]}]`}}return e}}),n.addRule("footnotesList",{filter:e=>{if(s(e)){const t=e.parentNode;return"OL"===e.nodeName&&null!==t&&s(t)&&"footnotes"===t.getAttribute("id")}return!1},replacement:(e,t)=>{if(!s(t))return e;return"\n\n"+Array.from(t.children||[]).map((e=>{var t,r;let o;if(s(e)){const a=e.getAttribute("id");if(null!==a)if(a.startsWith("fn:"))o=a.replace("fn:","");else{const e=null===(t=a.split("/").pop())||void 0===t?void 0:t.match(/cite_note-(.+)/);o=e?e[1]:a}const l=e.querySelector("sup");l&&s(l)&&(null===(r=l.textContent)||void 0===r?void 0:r.trim())===o&&l.remove();const c=n.turndown((0,i.serializeHTML)(e)).replace(/\s*\u21a9\ufe0e$/,"").trim();return`[^${null==o?void 0:o.toLowerCase()}]: ${c}`}return""})).join("\n\n")+"\n\n"}}),n.addRule("removals",{filter:function(e){var t,r;return!!s(e)&&(!!(null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("#fnref"))||!!(null===(r=e.classList)||void 0===r?void 0:r.contains("footnote-backref")))},replacement:function(e,t){return""}}),n.addRule("handleTextNodesInTables",{filter:function(e){return(0,a.isTextNode)(e)&&null!==e.parentNode&&"TD"===e.parentNode.nodeName},replacement:function(e){return e}}),n.addRule("preformattedCode",{filter:e=>"PRE"===e.nodeName,replacement:(e,t)=>{var r,n;if(!s(t))return e;const o=t.querySelector("code");if(!o||!s(o))return e;return`\n\`\`\`${o.getAttribute("data-lang")||o.getAttribute("data-language")||(null===(n=null===(r=o.getAttribute("class"))||void 0===r?void 0:r.match(/language-(\w+)/))||void 0===n?void 0:n[1])||t.getAttribute("data-language")||""}\n${(o.textContent||"").trim().replace(/`/g,"\\`")}\n\`\`\`\n`}}),n.addRule("math",{filter:e=>{var t,r,n;return"math"===e.nodeName.toLowerCase()||s(e)&&((null===(t=e.classList)||void 0===t?void 0:t.contains("mwe-math-element"))||(null===(r=e.classList)||void 0===r?void 0:r.contains("mwe-math-fallback-image-inline"))||(null===(n=e.classList)||void 0===n?void 0:n.contains("mwe-math-fallback-image-display")))},replacement:(e,t)=>{var r,n,o,i,c,u;if(!s(t))return e;let d=l(t);d=d.trim();if(!("function"==typeof t.closest&&null!==t.closest("table"))&&("block"===t.getAttribute("display")||(null===(r=t.classList)||void 0===r?void 0:r.contains("mwe-math-fallback-image-display"))||t.parentNode&&s(t.parentNode)&&(null===(n=t.parentNode.classList)||void 0===n?void 0:n.contains("mwe-math-element"))&&t.parentNode.previousSibling&&s(t.parentNode.previousSibling)&&"p"===t.parentNode.previousSibling.nodeName.toLowerCase()))return`\n$$\n${d}\n$$\n`;{const e=t.previousSibling,r=t.nextSibling,n=e&&s(e)&&(null===(o=e.textContent)||void 0===o?void 0:o.slice(-1))||"",l=r&&s(r)&&(null===(i=r.textContent)||void 0===i?void 0:i[0])||"",h=!e||(0,a.isTextNode)(e)&&""===(null===(c=e.textContent)||void 0===c?void 0:c.trim()),m=!r||(0,a.isTextNode)(r)&&""===(null===(u=r.textContent)||void 0===u?void 0:u.trim());return`${h||!n||/[\s$]/.test(n)?"":" "}$${d}$${m||!l||/[\s$]/.test(l)?"":" "}`}}}),n.addRule("katex",{filter:e=>{var t,r;return s(e)&&((null===(t=e.classList)||void 0===t?void 0:t.contains("math"))||(null===(r=e.classList)||void 0===r?void 0:r.contains("katex")))},replacement:(e,t)=>{var r,n;if(!s(t))return e;let o=t.getAttribute("data-latex");if(!o){const e=t.querySelector('.katex-mathml annotation[encoding="application/x-tex"]');o=e&&s(e)&&e.textContent||""}o||(o=(null===(r=t.textContent)||void 0===r?void 0:r.trim())||"");const a=t.querySelector(".katex-mathml math");return(null===(n=t.classList)||void 0===n?void 0:n.contains("math-inline"))||a&&s(a)&&"block"!==a.getAttribute("display")?`$${o}$`:`\n$$\n${o}\n$$\n`}}),n.addRule("callout",{filter:e=>{var t;return s(e)&&!!e.getAttribute("data-callout")&&(null===(t=e.classList)||void 0===t?void 0:t.contains("callout"))},replacement:(e,t)=>{var r;if(!s(t))return e;const o=t.getAttribute("data-callout")||"note",a=t.querySelector(".callout-title-inner"),i=(null===(r=null==a?void 0:a.textContent)||void 0===r?void 0:r.trim())||o.charAt(0).toUpperCase()+o.slice(1),l=t.querySelector(".callout-title");l&&l.remove();const c=t.querySelector(".callout-content");return`\n\n> [!${o}] ${i}\n${(c?n.turndown(c.innerHTML):n.turndown(t.innerHTML)).trim().split("\n").map((e=>`> ${e}`)).join("\n")}\n\n`}});try{e=e.replace(/<wbr\s*\/?>/gi,"");let t=n.turndown(e);const o=t.match(/^# .+\n+/);if(o&&(t=t.slice(o[0].length)),t=t.replace(/\n*(?<!!)\[]\([^)]+\)\n*/g,""),t=t.replace(/!(?=!\[|\[!\[)/g,"! "),t=t.replace(/\n{3,}/g,"\n\n"),Object.keys(r).length>0){t+="\n\n---\n\n";for(const[e,n]of Object.entries(r))t+=`[^${e}]: ${n}\n\n`}return t.trim()}catch(t){return console.error("Error converting HTML to Markdown:",t),console.log("Problematic content:",e.substring(0,1e3)+"..."),`Partial conversion completed with errors. Original HTML:\n\n${e}`}}},608(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataExtractor=void 0;class r{static extract(e,t,r){var n,o;let a="",i="";try{if(i=(null===(n=e.location)||void 0===n?void 0:n.href)||"",i||(i=this.getMetaContent(r,"property","og:url")||this.getMetaContent(r,"property","twitter:url")||this.getSchemaProperty(t,"url")||this.getSchemaProperty(t,"mainEntityOfPage.url")||this.getSchemaProperty(t,"mainEntity.url")||this.getSchemaProperty(t,"WebSite.url")||(null===(o=e.querySelector('link[rel="canonical"]'))||void 0===o?void 0:o.getAttribute("href"))||""),i)try{a=new URL(i).hostname.replace(/^www\./,"")}catch(e){console.warn("Failed to parse URL:",e)}}catch(t){const r=e.querySelector("base[href]");if(r)try{i=r.getAttribute("href")||"",a=new URL(i).hostname.replace(/^www\./,"")}catch(e){console.warn("Failed to parse base URL:",e)}}return{title:this.getTitle(e,t,r),description:this.getDescription(e,t,r),domain:a,favicon:this.getFavicon(e,i,r),image:this.getImage(e,t,r),language:this.getLanguage(e,t,r),published:this.getPublished(e,t,r),author:this.getAuthor(e,t,r),site:this.getSite(e,t,r),schemaOrgData:t,wordCount:0,parseTime:0}}static getAuthor(e,t,r){var n,o;let a;if(a=this.getMetaContent(r,"name","sailthru.author")||this.getMetaContent(r,"property","author")||this.getMetaContent(r,"name","author")||this.getMetaContent(r,"name","byl")||this.getMetaContent(r,"name","authorList"),a)return a;let i=this.getMetaContents(r,"name","citation_author");if(0===i.length&&(i=this.getMetaContents(r,"property","dc.creator")),i.length>0)return a=i.map((e=>{if(!e.includes(","))return e.trim();const t=/(.*),\s(.*)/.exec(e);return t&&3===t.length?`${t[2]} ${t[1]}`:e.trim()})).join(", "),a;let s=this.getSchemaProperty(t,"author.name")||this.getSchemaProperty(t,"author.[].name");if(s){const e=s.split(",").map((e=>e.trim().replace(/,$/,"").trim())).filter(Boolean);if(e.length>0){let t=[...new Set(e)];return t.length>10&&(t=t.slice(0,10)),t.join(", ")}}const l=[],c=[{selector:'[itemprop="author"]'},{selector:".author",maxMatches:3},{selector:'[href*="/author/"]',maxMatches:3},{selector:".authors a",maxMatches:3}];for(const{selector:t,maxMatches:r}of c){const n=e.querySelectorAll(t);r&&n.length>r||n.forEach((e=>{var t;(t=e.textContent)&&t.split(",").forEach((e=>{const t=e.trim().replace(/,$/,"").trim(),r=t.toLowerCase();t&&"author"!==r&&"authors"!==r&&l.push(t)}))}))}if(l.length>0){let e=[...new Set(l.map((e=>e.trim())).filter(Boolean))];if(e.length>0)return e.length>10&&(e=e.slice(0,10)),e.join(", ")}const u=e.querySelector("h1");if(u){let e=u.nextElementSibling;for(let t=0;t<3&&e;t++){const t=(null===(n=e.textContent)||void 0===n?void 0:n.trim())||"";if(this.parseDateText(t)){const t=e.querySelectorAll("a");for(const e of t){const t=((null===(o=e.textContent)||void 0===o?void 0:o.trim())||"").replace(/\u00a0/g," ");if(t.length>0&&t.length<100&&!this.parseDateText(t))return t}}e=e.nextElementSibling}let t=u;for(let e=0;e<3&&t;e++){let e=t.previousElementSibling;for(let t=0;t<3&&e;t++){const t=this.extractByline(e);if(t)return t;e=e.previousElementSibling}e=t.nextElementSibling;for(let t=0;t<3&&e;t++){const t=this.extractByline(e);if(t)return t;e=e.nextElementSibling}t=t.parentElement}}return this.getSiteName(t,r)}static extractByline(e){var t;const r=[e,...e.querySelectorAll("p, span, address")];for(const e of r){const r=((null===(t=e.textContent)||void 0===t?void 0:t.trim())||"").replace(/\u00a0/g," ");if(r.length>0&&r.length<50){const e=r.match(/^By\s+([A-Z].+)$/i);if(e)return e[1].trim()}}return null}static getSiteName(e,t){return this.getSchemaProperty(e,"publisher.name")||this.getMetaContent(t,"property","og:site_name")||this.getSchemaProperty(e,"WebSite.name")||this.getSchemaProperty(e,"sourceOrganization.name")||this.getMetaContent(t,"name","copyright")||this.getSchemaProperty(e,"copyrightHolder.name")||this.getSchemaProperty(e,"isPartOf.name")||this.getMetaContent(t,"name","application-name")||""}static getSite(e,t,r){return this.getSiteName(t,r)||this.getAuthor(e,t,r)||""}static getTitle(e,t,r){var n,o;const a=this.getMetaContent(r,"property","og:title")||this.getMetaContent(r,"name","twitter:title")||this.getSchemaProperty(t,"headline")||this.getMetaContent(r,"name","title")||this.getMetaContent(r,"name","sailthru.title")||(null===(o=null===(n=e.querySelector("title"))||void 0===n?void 0:n.textContent)||void 0===o?void 0:o.trim())||"";return this.cleanTitle(a,this.getSite(e,t,r))}static cleanTitle(e,t){if(!e||!t)return e;const r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=[`\\s*[\\|\\-\u2013\u2014]\\s*${r}\\s*$`,`^\\s*${r}\\s*[\\|\\-\u2013\u2014]\\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,r){return this.getMetaContent(r,"name","description")||this.getMetaContent(r,"property","description")||this.getMetaContent(r,"property","og:description")||this.getSchemaProperty(t,"description")||this.getMetaContent(r,"name","twitter:description")||this.getMetaContent(r,"name","sailthru.description")||""}static getImage(e,t,r){return this.getMetaContent(r,"property","og:image")||this.getMetaContent(r,"name","twitter:image")||this.getSchemaProperty(t,"image.url")||this.getMetaContent(r,"name","sailthru.image.full")||""}static getLanguage(e,t,r){var n,o,a,i;const s=null===(o=null===(n=e.documentElement)||void 0===n?void 0:n.getAttribute("lang"))||void 0===o?void 0:o.trim();if(s)return this.normalizeLangCode(s);const l=this.getMetaContent(r,"name","content-language")||this.getMetaContent(r,"property","og:locale");if(l)return this.normalizeLangCode(l);const c=null===(i=null===(a=e.querySelector('meta[http-equiv="Content-Language" i]'))||void 0===a?void 0:a.getAttribute("content"))||void 0===i?void 0:i.trim();if(c)return this.normalizeLangCode(c);const u=this.getSchemaProperty(t,"inLanguage");return u?this.normalizeLangCode(u):""}static normalizeLangCode(e){return e.replace(/_/g,"-")}static getFavicon(e,t,r){var n,o;const a=this.getMetaContent(r,"property","og:image:favicon");if(a)return a;const i=null===(n=e.querySelector("link[rel='icon']"))||void 0===n?void 0:n.getAttribute("href");if(i)return i;const s=null===(o=e.querySelector("link[rel='shortcut icon']"))||void 0===o?void 0:o.getAttribute("href");if(s)return s;if(t&&/^https?:\/\//.test(t))try{return new URL("/favicon.ico",t).href}catch(e){}return""}static getPublished(e,t,r){var n,o,a;const i=this.getSchemaProperty(t,"datePublished")||this.getMetaContent(r,"name","publishDate")||this.getMetaContent(r,"property","article:published_time")||(null===(o=null===(n=e.querySelector('abbr[itemprop="datePublished"]'))||void 0===n?void 0:n.title)||void 0===o?void 0:o.trim())||this.getTimeElement(e)||this.getMetaContent(r,"name","sailthru.date");if(i)return i;const s=e.querySelector("h1");if(s){let e=s.nextElementSibling;for(let t=0;t<3&&e;t++){const t=this.parseDateText((null===(a=e.textContent)||void 0===a?void 0:a.trim())||"");if(t)return t;e=e.nextElementSibling}}return""}static getMetaContent(e,t,r){var n;return null!==(n=this.getMetaContents(e,t,r)[0])&&void 0!==n?n:""}static getMetaContents(e,t,r){return e.filter((e=>{const n="name"===t?e.name:e.property;return(null==n?void 0:n.toLowerCase())===r.toLowerCase()})).map((e=>{var t,r;return null!==(r=null===(t=e.content)||void 0===t?void 0:t.trim())&&void 0!==r?r:""}))}static getTimeElement(e){var t,r,n,o;const a=Array.from(e.querySelectorAll("time"))[0];return a&&null!==(o=null!==(r=null===(t=a.getAttribute("datetime"))||void 0===t?void 0:t.trim())&&void 0!==r?r:null===(n=a.textContent)||void 0===n?void 0:n.trim())&&void 0!==o?o:""}static parseDateText(e){let t=e.match(/\b(\d{1,2})\s+(January|February|March|April|May|June|July|August|September|October|November|December)\s+(\d{4})\b/i);if(t){const e=t[1].padStart(2,"0"),r=this.MONTH_MAP[t[2].toLowerCase()];return`${t[3]}-${r}-${e}T00:00:00+00:00`}if(t=e.match(/\b(January|February|March|April|May|June|July|August|September|October|November|December)\s+(\d{1,2}),?\s+(\d{4})\b/i),t){const e=this.MONTH_MAP[t[1].toLowerCase()],r=t[2].padStart(2,"0");return`${t[3]}-${e}-${r}T00:00:00+00:00`}return""}static getSchemaProperty(e,t,r=""){if(!e)return r;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 o=n(e,t.split("."),"",!0);0===o.length&&(o=n(e,t.split("."),"",!1));return o.length>0?o.filter(Boolean).join(", "):r}catch(e){return console.error(`Error in getSchemaProperty for ${t}:`,e),r}}}t.MetadataExtractor=r,r.MONTH_MAP={january:"01",february:"02",march:"03",april:"04",may:"05",june:"06",july:"07",august:"08",september:"09",october:"10",november:"11",december:"12"}},968(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContentScorer=void 0;const n=r(640),o=r(552),a=r(639),i=["admonition","article","content","entry","image","img","font","figure","figcaption","pre","main","post","story","table"],s=["advertisement","all rights reserved","banner","cookie","comments","copyright","follow me","follow us","footer","header","homepage","login","menu","more articles","more like this","most read","nav","navigation","newsletter","popular","privacy","recommended","register","related","responses","share","sidebar","sign in","sign up","signup","social","sponsored","subscribe","terms","trending"],l=/\b(linkedin\.com\/(in|company)\/|twitter\.com\/(?!intent\b)\w|x\.com\/(?!intent\b)\w|facebook\.com\/(?!share\b)\w|instagram\.com\/\w|threads\.net\/\w|mastodon\.\w)/i,c=/(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\s+\d{1,2}/i,u=/\bBy\s+[A-Z]/,d=s.map((e=>new RegExp(`\\b${e.replace(/\s+/g,"\\s+")}\\b`))),h=new RegExp(s.map((e=>e.replace(/\s+/g,"\\s+"))).join("|"),"i"),m=/\b(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\s+\d{1,2},?\s+\d{4}\b/i,p=/\b(?:by|written by|author:)\s+[A-Za-z\s]+\b/i,f=["advert","ad-","ads","banner","cookie","copyright","footer","header","homepage","menu","nav","newsletter","popular","privacy","recommended","related","rights","share","sidebar","social","sponsored","subscribe","terms","trending","widget"];class g{constructor(e,t=!1){this.doc=e,this.debug=t}static scoreElement(e){let t=0;const r=e.textContent||"",i=(0,o.countWords)(r);t+=i;t+=10*e.getElementsByTagName("p").length;t+=r.split(/,/).length-1;t-=3*(e.getElementsByTagName("img").length/(i||1));try{const r=e.getAttribute("style")||"",n=e.getAttribute("align")||"";(r.includes("float: right")||r.includes("text-align: right")||"right"===n)&&(t+=5)}catch(e){}m.test(r)&&(t+=10);p.test(r)&&(t+=10);const s=(0,a.getClassName)(e).toLowerCase();(s.includes("content")||s.includes("article")||s.includes("post"))&&(t+=15);e.querySelector(n.FOOTNOTE_INLINE_REFERENCES)&&(t+=10);e.querySelector(n.FOOTNOTE_LIST_SELECTORS)&&(t+=10);if(t-=5*e.getElementsByTagName("table").length,"td"===e.tagName.toLowerCase()){const r=e.closest("table");if(r){const n=parseInt(r.getAttribute("width")||"0"),o=r.getAttribute("align")||"",i=(0,a.getClassName)(r).toLowerCase();if(n>400||"center"===o||i.includes("content")||i.includes("article")){const n=Array.from(r.getElementsByTagName("td")),o=n.indexOf(e);o>0&&o<n.length-1&&(t+=10)}}}const l=e.getElementsByTagName("a");let c=0;for(let e=0;e<l.length;e++)c+=(l[e].textContent||"").length;const u=r.length||1;return t*=1-Math.min(c/u,.5),t}static findBestElement(e,t=50){let r=null,n=0;return e.forEach((e=>{const t=this.scoreElement(e);t>n&&(n=t,r=e)})),n>t?r:null}static scoreAndRemove(e,t=!1,r,a){const i=Date.now(),s=new Map;Array.from(e.querySelectorAll(n.BLOCK_ELEMENTS_SELECTOR)).forEach((e=>{if(s.has(e))return;if(a&&e.contains(a))return;if(e.closest("pre"))return;if(g.isLikelyContent(e))return;const t=g.scoreNonContentBlock(e);t<0&&s.set(e,t)})),s.forEach(((e,n)=>{t&&r&&r.push({step:"scoreAndRemove",reason:`score: ${e}`,text:(0,o.textPreview)(n)}),n.remove()}));const l=Date.now();t&&console.log("Defuddle","Removed non-content blocks:",{count:s.size,processingTime:`${(l-i).toFixed(2)}ms`})}static isLikelyContent(e){const t=e.getAttribute("role");if(t&&["article","main","contentinfo"].includes(t))return!0;const r=(0,a.getClassName)(e).toLowerCase(),n=e.id.toLowerCase();for(const e of i)if(r.includes(e)||n.includes(e))return!0;if(e.querySelector("pre, table"))return!0;const s=e.textContent||"",c=(0,o.countWords)(s);if(c<1e3){const t=e.querySelectorAll("h1, h2, h3, h4, h5, h6");let r=!1;for(let e=0;e<t.length;e++){const n=(t[e].textContent||"").toLowerCase().trim();if(h.test(n)){r=!0;break}}if(r){if(c<200)return!1;if(e.getElementsByTagName("a").length/(c||1)>.2)return!1}}if(g.isCardGrid(e,c))return!1;if(c<80){const t=e.getElementsByTagName("a");for(let e=0;e<t.length;e++){const r=(t[e].getAttribute("href")||"").toLowerCase();if(l.test(r))return!1}}const u=e.getElementsByTagName("p").length+e.getElementsByTagName("li").length;if(c>50&&u>1)return!0;if(c>100)return!0;if(c>30&&u>0)return!0;if(c>=10&&/[.?!]/.test(s)){if(e.getElementsByTagName("a").length/c<.1)return!0}return!1}static scoreNonContentBlock(e){try{if(e.matches(n.FOOTNOTE_LIST_SELECTORS)||e.querySelector(n.FOOTNOTE_LIST_SELECTORS)||e.closest(n.FOOTNOTE_LIST_SELECTORS))return 0}catch(e){}let t=0;const r=e.textContent||"",i=(0,o.countWords)(r);if(i<3)return 0;t+=r.split(/,/).length-1;const s=r.toLowerCase();let h=0;for(const e of d)e.test(s)&&h++;t-=10*h;const m=e.getElementsByTagName("a"),p=m.length;if(p/(i||1)>.5&&(t-=15),p>1&&i<80){let e=0;for(let t=0;t<m.length;t++)e+=(m[t].textContent||"").length;const n=r.length;n>0&&e/n>.8&&(t-=15)}const b=e.getElementsByTagName("ul").length+e.getElementsByTagName("ol").length;if(b>0&&p>3*b&&(t-=10),i<80){const r=e.getElementsByTagName("a");for(let e=0;e<r.length;e++){const n=(r[e].getAttribute("href")||"").toLowerCase();if(l.test(n)){t-=15;break}}}i<15&&u.test(r)&&c.test(r)&&(t-=10),g.isCardGrid(e,i)&&(t-=15);const x=(0,a.getClassName)(e).toLowerCase(),y=e.id.toLowerCase();for(const e of f)(x.includes(e)||y.includes(e))&&(t-=8);return t}static isCardGrid(e,t){if(t<3||t>=500)return!1;const r=e.querySelectorAll("h2, h3, h4");if(r.length<3)return!1;if(e.querySelectorAll("img").length<2)return!1;let n=0;for(let e=0;e<r.length;e++)n+=(0,o.countWords)(r[e].textContent||"");return(t-n)/r.length<20}}t.ContentScorer=g},840(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardizeContent=function(e,t,r,o=!1){u=o,function(e){const t=e=>{if((0,l.isElement)(e)){const t=e.tagName.toLowerCase();if("pre"===t||"code"===t)return}if((0,l.isTextNode)(e)){const t=e.textContent||"",r=t.replace(/\xA0/g," ");r!==t&&(e.textContent=r)}e.hasChildNodes()&&Array.from(e.childNodes).forEach(t)};t(e)}(e),function(e){var t;let r=0;const n=e.ownerDocument.createTreeWalker(e,128),o=[];for(;n.nextNode();)o.push(n.currentNode);for(const e of o)null===(t=e.parentNode)||void 0===t||t.removeChild(e),r++;(0,l.logDebug)(u,"Removed HTML comments:",r)}(e),function(e,t,r){const o=e=>e.replace(/\u00A0/g," ").replace(/\s+/g," ").trim().toLowerCase(),a=e.getElementsByTagName("h1");Array.from(a).forEach((e=>{var t;const o=r.createElement("h2");(0,c.transferContent)(e,o),Array.from(e.attributes).forEach((e=>{n.ALLOWED_ATTRIBUTES.has(e.name)&&o.setAttribute(e.name,e.value)})),null===(t=e.parentNode)||void 0===t||t.replaceChild(o,e)}));const i=e.getElementsByTagName("h2");if(i.length>0){const e=i[0],r=o(e.textContent||""),n=o(t);n&&n===r&&e.remove()}}(e,t.title,r),function(e,t){var r;const n=Array.from(e.querySelectorAll("code"));for(const e of n){if(e.closest("pre"))continue;const n=e.getAttribute("style")||"";if(!/white-space\s*:\s*pre/.test(n))continue;const o=t.createElement("pre");null===(r=e.parentNode)||void 0===r||r.insertBefore(o,e),o.appendChild(e)}}(e,r),function(e,t){let r=0;d.forEach((n=>{let o;try{o=e.querySelectorAll(n.selector)}catch(e){return}o.forEach((e=>{if(n.transform){const o=n.transform(e,t);e.replaceWith(o),r++}}))}));Array.from(e.querySelectorAll("table.ltx_equation, table.ltx_eqn_table, table.ltx_equationgroup")).forEach((e=>{const n=e.querySelectorAll("math");if(0===n.length)return;const o=t.createDocumentFragment();n.forEach((r=>{var n;const a=r.getAttribute("alttext"),i=r.querySelector('annotation[encoding="application/x-tex"]'),s=a||(null===(n=null==i?void 0:i.textContent)||void 0===n?void 0:n.trim())||"";if(!s)return;const l="block"===r.getAttribute("display")||e.classList.contains("ltx_equation")||e.classList.contains("ltx_equationgroup"),c=t.createElement("math");c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),c.setAttribute("display",l?"block":"inline"),c.setAttribute("data-latex",s),c.textContent=s,o.appendChild(c)})),o.childNodes.length>0&&(e.replaceWith(o),r++)}));Array.from(e.querySelectorAll("span.ltx_note_outer")).forEach((e=>{e.remove(),r++}));Array.from(e.querySelectorAll("a.ltx_ref")).forEach((e=>{if(e.querySelector("span.ltx_ref_tag, span.ltx_text.ltx_ref_tag")){const n=t.createTextNode(e.textContent||"");e.replaceWith(n),r++}}));Array.from(e.querySelectorAll("table")).forEach((e=>{if(!e.parentNode)return;const n=Array.from(e.querySelectorAll("td, th")).filter((t=>(0,c.isDirectTableChild)(t,e)));if(n.some((e=>"TH"===e.tagName)))return;const o=Array.from(e.querySelectorAll("tr")).filter((t=>(0,c.isDirectTableChild)(t,e)));if(0===o.length)return;if(!o.every((e=>n.filter((t=>t.parentNode===e)).length<=1)))return;const a=t.createDocumentFragment();n.forEach((e=>{for(;e.firstChild;)a.appendChild(e.firstChild)})),e.replaceWith(a),r++}));e.querySelectorAll("lite-youtube").forEach((e=>{const n=e.getAttribute("videoid");if(!n)return;const o=t.createElement("iframe");o.width="560",o.height="315",o.src=`https://www.youtube.com/embed/${n}`,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),r++})),(0,l.logDebug)(u,"Converted embedded elements:",r),function(e){var t;const r=e=>{let t=null;for(const r of e.children){if("code"!==r.tagName.toLowerCase())return null;if(t)return null;t=r}return t},n=e=>{var t;const r=(e.getAttribute("data-lang")||"").toLowerCase();if(r)return r;const n=(e.getAttribute("class")||"").match(/(?:^|\s)language-([a-z0-9_+-]+)(?:\s|$)/i);return(null===(t=null==n?void 0:n[1])||void 0===t?void 0:t.toLowerCase())||""},o=e.querySelectorAll('pre[data-verso-code="true"]'),a=new Set;for(const e of o){const t=e.parentElement;t&&a.add(t)}for(const e of a){const o=Array.from(e.childNodes);for(let e=0;e<o.length;e++){const a=o[e];if(!(0,l.isElement)(a)||"pre"!==a.tagName.toLowerCase())continue;if("true"!==a.getAttribute("data-verso-code"))continue;const i=r(a);if(!i)continue;const s=n(i);if("lean"!==s&&"lean4"!==s)continue;const c=[{pre:a,code:i}],u=[];let d=e+1;for(;d<o.length;){const e=o[d];if((0,l.isTextNode)(e)&&!(e.textContent||"").trim()){u.push(e),d++;continue}if(!(0,l.isElement)(e)||"pre"!==e.tagName.toLowerCase())break;const t=e;if("true"!==t.getAttribute("data-verso-code"))break;const a=r(t);if(!a||n(a)!==s)break;c.push({pre:t,code:a}),d++}if(c.length<=1)continue;const h=c.map((({code:e})=>(e.textContent||"").replace(/\r?\n$/,""))).join("\n").replace(/\n{3,}/g,"\n\n").replace(/^\n+|\n+$/g,"");i.textContent=h;for(let e=1;e<c.length;e++)c[e].pre.remove();for(const e of u)null===(t=e.parentNode)||void 0===t||t.removeChild(e);e=d-1}}}(e)}(e,r),o?(m(e,o),h(e),f(e),(0,l.logDebug)(u,"Debug mode: Skipping div flattening to preserve structure")):(b(e,r),m(e,o),function(e){const t=Array.from(e.querySelectorAll("span")).reverse();let r=0;for(const e of t){if(!e.parentNode)continue;if(e.attributes.length>0)continue;const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);e.remove(),r++}}r>0&&e.normalize();(0,l.logDebug)(u,"Unwrapped bare spans:",r)}(e),Array.from(e.querySelectorAll("code a")).forEach(p),Array.from(e.querySelectorAll('a[href^="javascript:"]')).forEach(p),Array.from(e.querySelectorAll('a[href^="#"]')).forEach((e=>{e.querySelector("h1, h2, h3, h4, h5, h6")&&p(e)})),(0,i.removeHeadingAnchors)(e),e.querySelectorAll("object, embed, applet").forEach((e=>e.remove())),function(e){let t=0;const r=e=>{var t;if(n.ALLOWED_EMPTY_ELEMENTS.has(e.tagName.toLowerCase()))return!1;if("DIV"===e.tagName){const r=e.children;if(r.length>0){let e=!0;for(let n=0;n<r.length;n++){const o=r[n];if("SPAN"!==o.tagName){e=!1;break}const a=(null===(t=o.textContent)||void 0===t?void 0:t.trim())||"";if(","!==a&&""!==a&&" "!==a){e=!1;break}}if(e)return!0}}const r=e.textContent||"";if(r.trim().length>0||r.includes("\xa0"))return!1;if(!e.hasChildNodes())return!0;const o=e.childNodes;for(let e=0;e<o.length;e++){const t=o[e];if(!(0,l.isTextNode)(t))return!1;const r=t.textContent||"";if(r.trim().length>0||r.includes("\xa0"))return!1}return!0},o=Array.from(e.querySelectorAll("*")).reverse();for(const e of o)e.parentNode&&r(e)&&(e.remove(),t++);(0,l.logDebug)(u,"Removed empty elements:",t)}(e),h(e),function(e){for(;;){let t=e.firstChild;for(;t&&(0,l.isTextNode)(t)&&!(t.textContent||"").trim();)t=t.nextSibling;if(!t||!(0,l.isElement)(t)||"hr"!==t.tagName.toLowerCase())break;t.remove()}for(;;){let t=e.lastChild;for(;t&&(0,l.isTextNode)(t)&&!(t.textContent||"").trim();)t=t.previousSibling;if(!t||!(0,l.isElement)(t)||"hr"!==t.tagName.toLowerCase())break;t.remove()}}(e),b(e,r),f(e),function(e,t){let r=0;const o=Date.now(),a=e=>{var t;if((0,l.isElement)(e)){const t=e.tagName.toLowerCase();if("pre"===t||"code"===t)return}if(Array.from(e.childNodes).forEach(a),(0,l.isTextNode)(e)){const n=e.textContent||"";if(!n||/^[\u200C\u200B\u200D\u200E\u200F\uFEFF]*$/.test(n))null===(t=e.parentNode)||void 0===t||t.removeChild(e),r++;else{const t=n.replace(/[\n\r]+/g," ").replace(/\t+/g," ").replace(/ {2,}/g," ").replace(/^[ ]+$/," ").replace(/\s+([,.!?:;])/g,"$1").replace(/[\u200B\u200D\u200E\u200F\uFEFF]+/g,"").replace(/(?:\xA0){2,}/g,"\xa0");t!==n&&(e.textContent=t,r+=n.length-t.length)}}},i=e=>{var o;if(!(0,l.isElement)(e))return;const a=e.tagName.toLowerCase();if("pre"===a||"code"===a)return;Array.from(e.childNodes).filter(l.isElement).forEach(i),e.normalize();const s="block"===(null===(o=(0,l.getComputedStyle)(e))||void 0===o?void 0:o.display),c=s?/^[\n\r\t \u200C\u200B\u200D\u200E\u200F\uFEFF\xA0]*$/:/^[\n\r\t\u200C\u200B\u200D\u200E\u200F\uFEFF]*$/;for(;e.firstChild&&(0,l.isTextNode)(e.firstChild)&&(e.firstChild.textContent||"").match(c);)e.removeChild(e.firstChild),r++;for(;e.lastChild&&(0,l.isTextNode)(e.lastChild)&&(e.lastChild.textContent||"").match(c);)e.removeChild(e.lastChild),r++;if(!s&&n.INLINE_ELEMENTS.has(a)&&e.parentNode&&(r+=g(e,t,"leading"),r+=g(e,t,"trailing")),!s){const r=Array.from(e.childNodes);for(let n=0;n<r.length-1;n++){const o=r[n],a=r[n+1];if((0,l.isElement)(o)||(0,l.isElement)(a)){const r=a.textContent||"",n=o.textContent||"",i=r.match(/^[,.!?:;)\]]/),s=n.match(/[,.!?:;(\[]\s*$/),c=(0,l.isTextNode)(o)&&(o.textContent||"").endsWith(" ")||(0,l.isTextNode)(a)&&(a.textContent||"").startsWith(" ");if(!i&&!s&&!c){const r=t.createTextNode(" ");e.insertBefore(r,a)}}}}};a(e),i(e);const s=Date.now();(0,l.logDebug)(u,"Removed empty lines:",{charactersRemoved:r,processingTime:`${(s-o).toFixed(2)}ms`})}(e,r))};const n=r(640),o=r(974),a=r(754),i=r(864),s=r(649),l=r(552),c=r(639);let u=!1;const d=[...o.mathRules,...a.codeBlockRules,...i.headingRules,...s.imageRules,{selector:'div[data-testid^="paragraph"], div[role="paragraph"]',element:"p",transform:(e,t)=>{const r=t.createElement("p");return(0,c.transferContent)(e,r),Array.from(e.attributes).forEach((e=>{n.ALLOWED_ATTRIBUTES.has(e.name)&&r.setAttribute(e.name,e.value)})),r}},{selector:'div[role="list"]',element:"ul",transform:(e,t)=>{var r;const n=e.querySelector('div[role="listitem"] .label'),o=((null===(r=null==n?void 0:n.textContent)||void 0===r?void 0:r.trim())||"").match(/^\d+\)/),a=t.createElement(o?"ol":"ul");return e.querySelectorAll('div[role="listitem"]').forEach((e=>{const r=t.createElement("li"),n=e.querySelector(".content");if(n){n.querySelectorAll('div[role="paragraph"]').forEach((e=>{const r=t.createElement("p");(0,c.transferContent)(e,r),e.replaceWith(r)}));n.querySelectorAll('div[role="list"]').forEach((e=>{var r;const n=e.querySelector('div[role="listitem"] .label'),o=((null===(r=null==n?void 0:n.textContent)||void 0===r?void 0:r.trim())||"").match(/^\d+\)/),a=t.createElement(o?"ol":"ul");e.querySelectorAll('div[role="listitem"]').forEach((e=>{const r=t.createElement("li"),n=e.querySelector(".content");if(n){n.querySelectorAll('div[role="paragraph"]').forEach((e=>{const r=t.createElement("p");(0,c.transferContent)(e,r),e.replaceWith(r)})),(0,c.transferContent)(n,r)}a.appendChild(r)})),e.replaceWith(a)})),(0,c.transferContent)(n,r)}a.appendChild(r)})),a}},{selector:'div[role="listitem"]',element:"li",transform:(e,t)=>{const r=e.querySelector(".content");if(!r)return e;return r.querySelectorAll('div[role="paragraph"]').forEach((e=>{const r=t.createElement("p");(0,c.transferContent)(e,r),e.replaceWith(r)})),r}}];function h(e){let t=0;const r=t=>{let n="",o=t.nextSibling;for(;o;)((0,l.isTextNode)(o)||(0,l.isElement)(o))&&(n+=o.textContent||""),o=o.nextSibling;if(n.trim())return!0;const a=t.parentElement;return!(!a||a===e)&&r(a)},n=Array.from(e.querySelectorAll("h1, h2, h3, h4, h5, h6")).reverse();for(const e of n){if(r(e))break;e.remove(),t++}t>0&&(0,l.logDebug)(u,"Removed trailing headings:",t)}function m(e,t){let r=0;const o=e=>{if("svg"===e.tagName.toLowerCase()||"http://www.w3.org/2000/svg"===e.namespaceURI)return;const o=Array.from(e.attributes),a=e.tagName.toLowerCase();o.forEach((o=>{const i=o.name.toLowerCase(),s=o.value;"id"===i&&(s.startsWith("fnref:")||s.startsWith("fn:")||"footnotes"===s)||"class"===i&&("code"===a&&s.startsWith("language-")||"footnote-backref"===s||/^callout(?:-|$)/.test(s))||(t?n.ALLOWED_ATTRIBUTES.has(i)||n.ALLOWED_ATTRIBUTES_DEBUG.has(i)||i.startsWith("data-")||(e.removeAttribute(o.name),r++):n.ALLOWED_ATTRIBUTES.has(i)||(e.removeAttribute(o.name),r++))}))};o(e),e.querySelectorAll("*").forEach(o),(0,l.logDebug)(u,"Stripped attributes:",r)}function p(e){for(var t;e.firstChild;)null===(t=e.parentNode)||void 0===t||t.insertBefore(e.firstChild,e);e.remove()}function f(e){let t=0;const r=Date.now(),n=Array.from(e.getElementsByTagName("br"));let o=[];const a=()=>{if(o.length>2)for(let e=2;e<o.length;e++)o[e].remove(),t++;o=[]};n.forEach((e=>{var t;let r=!1;if(o.length>0){const n=o[o.length-1];let a=e.previousSibling;for(;a&&(0,l.isTextNode)(a)&&!(null===(t=a.textContent)||void 0===t?void 0:t.trim());)a=a.previousSibling;a===n&&(r=!0)}r?o.push(e):(a(),o=[e])})),a();const i=Date.now();(0,l.logDebug)(u,"Standardized br elements:",{removed:t,processingTime:`${(i-r).toFixed(2)}ms`})}function g(e,t,r){const n="leading"===r?e.firstChild:e.lastChild;if(!n||!(0,l.isTextNode)(n))return 0;const o=n.textContent||"",a="leading"===r?o.replace(/^\s+/,""):o.replace(/\s+$/,"");if(a===o||!e.parentNode)return 0;n.textContent=a;const i="leading"===r?e.previousSibling:e.nextSibling;if(!(i&&(0,l.isTextNode)(i)&&("leading"===r?(i.textContent||"").endsWith(" "):(i.textContent||"").startsWith(" ")))){const n="leading"===r?e:e.nextSibling;e.parentNode.insertBefore(t.createTextNode(" "),n)}return 1}function b(e,t){let r=0;const o=Date.now();let a=!0;function i(e){var t;for(const r of e.childNodes){if((0,l.isTextNode)(r)&&(null===(t=r.textContent)||void 0===t?void 0:t.trim()))return!0;if((0,l.isElement)(r)&&n.INLINE_ELEMENTS.has(r.nodeName.toLowerCase()))return!0}return!1}const s=e=>{var t;const r=e.tagName.toLowerCase();if(n.PRESERVE_ELEMENTS.has(r))return!0;if(e.getAttribute("data-callout")||(null===(t=e.closest)||void 0===t?void 0:t.call(e,"[data-callout]")))return!0;const o=e.getAttribute("role");if(o&&["article","main","navigation","banner","contentinfo"].includes(o))return!0;const a=(0,c.getClassName)(e);if(a&&a.toLowerCase().match(/(?:article|main|content|footnote|reference|bibliography)/))return!0;return!!Array.from(e.children).some((e=>n.PRESERVE_ELEMENTS.has(e.tagName.toLowerCase())||"article"===e.getAttribute("role")||!!(0,c.getClassName)(e)&&(0,c.getClassName)(e).toLowerCase().match(/(?:article|main|content|footnote|reference|bibliography)/)))},d=e=>{var t;if(i(e))return!1;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=>n.BLOCK_LEVEL_ELEMENTS.has(e.tagName.toLowerCase()))))return!0;const o=(0,c.getClassName)(e).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(0,l.isTextNode)(e)&&(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)})))},h=o=>{var a,c;if(!o.parentNode||s(o))return!1;const u=o.tagName.toLowerCase();if(!n.ALLOWED_EMPTY_ELEMENTS.has(u)&&!o.children.length&&!(null===(a=o.textContent)||void 0===a?void 0:a.trim()))return o.remove(),r++,!0;if(o.parentElement===e){const e=Array.from(o.children);if(e.length>0&&!e.some((e=>{const t=e.tagName.toLowerCase();return n.INLINE_ELEMENTS.has(t)}))){const e=t.createDocumentFragment();for(;o.firstChild;)e.appendChild(o.firstChild);return o.replaceWith(e),r++,!0}}if(d(o)){const e=t.createDocumentFragment();for(;o.firstChild;)e.appendChild(o.firstChild);return o.replaceWith(e),r++,!0}const h=Array.from(o.childNodes);if(h.length>0&&h.every((e=>(0,l.isTextNode)(e)||(0,l.isElement)(e)&&n.INLINE_ELEMENTS.has(e.nodeName.toLowerCase())))&&(null===(c=o.textContent)||void 0===c?void 0:c.trim())){const e=t.createElement("p");for(;o.firstChild;)e.appendChild(o.firstChild);return o.replaceWith(e),r++,!0}if(1===o.children.length){const e=o.firstElementChild,t=e.tagName.toLowerCase();if(n.BLOCK_ELEMENTS_SET.has(t)&&!s(e))return o.replaceWith(e),r++,!0}let m=0,p=o.parentElement;for(;p;){const e=p.tagName.toLowerCase();n.BLOCK_ELEMENTS_SET.has(e)&&m++,p=p.parentElement}if(m>0&&!i(o)){const e=t.createDocumentFragment();for(;o.firstChild;)e.appendChild(o.firstChild);return o.replaceWith(e),r++,!0}return!1},m=()=>{const t=Array.from(e.children).filter((e=>n.BLOCK_ELEMENTS_SET.has(e.tagName.toLowerCase())));let r=!1;return t.forEach((e=>{h(e)&&(r=!0)})),r},p=()=>{const t=Array.from(e.querySelectorAll(n.BLOCK_ELEMENTS_SELECTOR)).sort(((e,t)=>{const r=e=>{let t=0,r=e.parentElement;for(;r;){const e=r.tagName.toLowerCase();n.BLOCK_ELEMENTS_SET.has(e)&&t++,r=r.parentElement}return t};return r(t)-r(e)}));let r=!1;return t.forEach((e=>{h(e)&&(r=!0)})),r},f=()=>{const o=Array.from(e.querySelectorAll(n.BLOCK_ELEMENTS_SELECTOR));let a=!1;return o.forEach((e=>{const n=Array.from(e.children);if(n.length>0&&n.every((e=>"p"===e.tagName.toLowerCase()))||!s(e)&&d(e)){const n=t.createDocumentFragment();for(;e.firstChild;)n.appendChild(e.firstChild);e.replaceWith(n),r++,a=!0}})),a};do{a=!1,m()&&(a=!0),p()&&(a=!0),f()&&(a=!0)}while(a);const g=Date.now();(0,l.logDebug)(u,"Flattened wrapper elements:",{count:r,processingTime:`${(g-o).toFixed(2)}ms`})}},552(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isElement=function(e){return e.nodeType===r},t.isTextNode=function(e){return e.nodeType===n},t.isCommentNode=function(e){return e.nodeType===o},t.getComputedStyle=function(e){const t=a(e.ownerDocument);return t?t.getComputedStyle(e):null},t.getWindow=a,t.textPreview=function(e){return(e.textContent||"").trim().substring(0,200)},t.logDebug=function(e,t,...r){e&&console.log("Defuddle:",t,...r)},t.countWords=function(e){if(!e)return 0;let t=0,r=0,n=!1;for(let o=0;o<e.length;o++){const a=e.charCodeAt(o);a>=12352&&a<=12447||a>=12448&&a<=12543||a>=13312&&a<=19903||a>=19968&&a<=40959||a>=63744&&a<=64255||a>=44032&&a<=55215?(t++,n=!1):a<=32?n=!1:n||(r++,n=!0)}return t+r};const r=1,n=3,o=8;function a(e){return e.defaultView?e.defaultView:e.ownerWindow?e.ownerWindow:e.window?e.window:null}},77(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildContentHtml=function(e,t,r){return`\n\t\t<div class="${e} post">\n\t\t\t<div class="post-content">\n\t\t\t\t${t}\n\t\t\t</div>\n\t\t</div>\n\t\t${r?`\n\t\t\t<hr>\n\t\t\t<div class="${e} comments">\n\t\t\t\t<h2>Comments</h2>\n\t\t\t\t${r}\n\t\t\t</div>\n\t\t`:""}\n\t`.trim()},t.buildCommentTree=function(e){var t,r,n;const a=[],i=[];for(const s of e){const e=null!==(t=s.depth)&&void 0!==t?t:0;if(0===e){for(;i.length>0;)a.push("</blockquote>"),i.pop();a.push("<blockquote>"),i.push(0)}else{if(e<(null!==(r=i[i.length-1])&&void 0!==r?r:-1))for(;i.length>0&&i[i.length-1]>=e;)a.push("</blockquote>"),i.pop();e>(null!==(n=i[i.length-1])&&void 0!==n?n:-1)&&(a.push("<blockquote>"),i.push(e))}a.push(o(s))}for(;i.length>0;)a.push("</blockquote>"),i.pop();return a.join("")},t.buildComment=o;const n=r(639);function o(e){const t=`<span class="comment-author"><strong>${(0,n.escapeHtml)(e.author)}</strong></span>`,r=e.url&&!(0,n.isDangerousUrl)(e.url)?e.url:"";return`<div class="comment">\n\t<div class="comment-metadata">\n\t\t${t} \xb7 ${r?`<a href="${(0,n.escapeHtml)(r)}" class="comment-link">${(0,n.escapeHtml)(e.date)}</a>`:`<span class="comment-date">${(0,n.escapeHtml)(e.date)}</span>`}${e.score?` \xb7 <span class="comment-points">${(0,n.escapeHtml)(e.score)}</span>`:""}\n\t</div>\n\t<div class="comment-content">${e.content}</div>\n</div>`}},639(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transferContent=function(e,t){if("replaceChildren"in t)t.replaceChildren();else for(;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)},t.serializeHTML=function(e){return e.innerHTML},t.decodeHTMLEntities=function(e,t){const r=e.createElement("textarea");return r.innerHTML=t,r.value},t.escapeHtml=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},t.getClassName=function(e){return"string"==typeof e.className?e.className:e.getAttribute("class")||""},t.isDangerousUrl=function(e){const t=e.replace(/[\s\u0000-\u001F]+/g,"").toLowerCase();return t.startsWith("javascript:")||t.startsWith("data:text/html")},t.isDirectTableChild=function(e,t){let r=e.parentNode;for(;r&&r!==t;){if("TABLE"===r.nodeName)return!1;r=r.parentNode}return r===t},t.parseHTML=function(e,t){if(!t)return e.createDocumentFragment();const r=e.createElement("template");if(r.innerHTML=t,r.content)return r.content;const n=e.createElement("div");n.innerHTML=t;const o=e.createDocumentFragment();for(;n.firstChild;)o.appendChild(n.firstChild);return o}},497(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatTimestamp=o,t.buildTranscript=function(e,t,r=[]){const a=[...r].sort(((e,t)=>e.start-t.start));let i=0;const s=[],l=[];for(const e of t){for(;i<a.length&&a[i].start<=e.start;){const e=a[i].title;s.push(`<h3>${(0,n.escapeHtml)(e)}</h3>`),l.length>0&&l.push(""),l.push(`### ${e}`),l.push(""),i++}const t=o(e.start),r=void 0!==e.speaker?` speaker-${e.speaker}`:"",c=`<strong><span class="timestamp" data-timestamp="${e.start}">${t}</span></strong>`;s.push(`<p class="transcript-segment${r}">${c} \xb7 ${(0,n.escapeHtml)(e.text)}</p>`),e.speakerChange&&l.length>0&&l.push(""),l.push(`**${t}** \xb7 ${e.text}`)}return{html:`<div class="${e} transcript">\n<h2>Transcript</h2>\n${s.join("\n")}\n</div>`,text:l.join("\n")}};const n=r(639);function o(e){const t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60);return t>0?`${t}:${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`:`${r}:${String(n).padStart(2,"0")}`}},431(e,t,r){"use strict";function n(e,t){return Array(t+1).join(e)}r.r(t),r.d(t,{default:()=>M});var o=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function a(e){return c(e,o)}var i=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function s(e){return c(e,i)}var l=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function c(e,t){return t.indexOf(e.nodeName)>=0}function u(e,t){return e.getElementsByTagName&&t.some((function(t){return e.getElementsByTagName(t).length}))}var d={};function h(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function m(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function p(e,t,r){for(var n=0;n<e.length;n++){var o=e[n];if(f(o,t,r))return o}}function f(e,t,r){var n=e.filter;if("string"==typeof n){if(n===t.nodeName.toLowerCase())return!0}else if(Array.isArray(n)){if(n.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof n)throw new TypeError("`filter` needs to be a string, array, or function");if(n.call(e,t,r))return!0}}function g(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function b(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}d.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},d.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+"\n"}},d.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var o=Number(t.nodeName.charAt(1));return"setext"===r.headingStyle&&o<3?"\n\n"+e+"\n"+n(1===o?"=":"-",e.length)+"\n\n":"\n\n"+n("#",o)+" "+e+"\n\n"}},d.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},d.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return"LI"===r.nodeName&&r.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},d.listItem={filter:"li",replacement:function(e,t,r){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n ");var n=r.bulletListMarker+" ",o=t.parentNode;if("OL"===o.nodeName){var a=o.getAttribute("start"),i=Array.prototype.indexOf.call(o.children,t);n=(a?Number(a)+i:i+1)+". "}return n+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},d.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},d.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){for(var o,a=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,s=r.fence.charAt(0),l=3,c=new RegExp("^"+s+"{3,}","gm");o=c.exec(i);)o[0].length>=l&&(l=o[0].length+1);var u=n(s,l);return"\n\n"+u+a+"\n"+i.replace(/\n$/,"")+"\n"+u+"\n\n"}},d.horizontalRule={filter:"hr",replacement:function(e,t,r){return"\n\n"+r.hr+"\n\n"}},d.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href");r&&(r=r.replace(/([()])/g,"\\$1"));var n=h(t.getAttribute("title"));return n&&(n=' "'+n.replace(/"/g,'\\"')+'"'),"["+e+"]("+r+n+")"}},d.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,r){var n,o,a=t.getAttribute("href"),i=h(t.getAttribute("title"));switch(i&&(i=' "'+i+'"'),r.linkReferenceStyle){case"collapsed":n="["+e+"][]",o="["+e+"]: "+a+i;break;case"shortcut":n="["+e+"]",o="["+e+"]: "+a+i;break;default:var s=this.references.length+1;n="["+e+"]["+s+"]",o="["+s+"]: "+a+i}return this.references.push(o),n},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},d.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}},d.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}},d.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",n=e.match(/`+/gm)||[];-1!==n.indexOf(r);)r+="`";return r+t+e+t+r}},d.image={filter:"img",replacement:function(e,t){var r=h(t.getAttribute("alt")),n=t.getAttribute("src")||"",o=h(t.getAttribute("title"));return n?"+")":""}},m.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=p(this.array,e,this.options))||(t=p(this._keep,e,this.options))||(t=p(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var x="undefined"!=typeof window?window:{};var y,v,w=function(){var e=x.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?x.DOMParser:(y=function(){},function(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){x.ActiveXObject&&(e=!0)}return e}()?y.prototype.parseFromString=function(e){var t=new window.ActiveXObject("htmlfile");return t.designMode="on",t.open(),t.write(e),t.close(),t}:y.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument("");return t.open(),t.write(e),t.close(),t},y);function A(e,t){var r;"string"==typeof e?r=(v=v||new w).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):r=e.cloneNode(!0);return function(e){var t=e.element,r=e.isBlock,n=e.isVoid,o=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!o(t)){for(var a=null,i=!1,s=null,l=b(s,t,o);l!==t;){if(3===l.nodeType||4===l.nodeType){var c=l.data.replace(/[ \r\n\t]+/g," ");if(a&&!/ $/.test(a.data)||i||" "!==c[0]||(c=c.substr(1)),!c){l=g(l);continue}l.data=c,a=l}else{if(1!==l.nodeType){l=g(l);continue}r(l)||"BR"===l.nodeName?(a&&(a.data=a.data.replace(/ $/,"")),a=null,i=!1):n(l)||o(l)?(a=null,i=!0):a&&(i=!1)}var u=b(s,l,o);s=l,l=u}a&&(a.data=a.data.replace(/ $/,""),a.data||g(a))}}({element:r,isBlock:a,isVoid:s,isPre:t.preformattedCode?C:null}),r}function C(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function E(e,t){return e.isBlock=a(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!s(e)&&!function(e){return c(e,l)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return u(e,i)}(e)&&!function(e){return u(e,l)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=(n=e.textContent,o=n.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/),{leading:o[1],leadingAscii:o[2],leadingNonAscii:o[3],trailing:o[4],trailingNonAscii:o[5],trailingAscii:o[6]});var n,o;r.leadingAscii&&S("left",e,t)&&(r.leading=r.leadingNonAscii);r.trailingAscii&&S("right",e,t)&&(r.trailing=r.trailingNonAscii);return{leading:r.leading,trailing:r.trailing}}(e,t),e}function S(e,t,r){var n,o,i;return"left"===e?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(3===n.nodeType?i=o.test(n.nodeValue):r.preformattedCode&&"CODE"===n.nodeName?i=!1:1!==n.nodeType||a(n)||(i=o.test(n.textContent))),i}var _=Array.prototype.reduce,T=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function q(e){if(!(this instanceof q))return new q(e);var t={rules:d,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e}({},t,e),this.rules=new m(this.options)}function k(e){var t=this;return _.call(e.childNodes,(function(e,r){var n="";return 3===(r=new E(r,t.options)).nodeType?n=r.isCode?r.nodeValue:t.escape(r.nodeValue):1===r.nodeType&&(n=L.call(t,r)),O(e,n)}),"")}function N(e){var t=this;return this.rules.forEach((function(r){"function"==typeof r.append&&(e=O(e,r.append(t.options)))})),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function L(e){var t=this.rules.forNode(e),r=k.call(this,e),n=e.flankingWhitespace;return(n.leading||n.trailing)&&(r=r.trim()),n.leading+t.replacement(r,e,this.options)+n.trailing}function O(e,t){var r=function(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}(e),n=t.replace(/^\n*/,""),o=Math.max(e.length-r.length,t.length-n.length);return r+"\n\n".substring(0,o)+n}q.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=k.call(this,new A(e,this.options));return N.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return T.reduce((function(e,t){return e.replace(t[0],t[1])}),e)}};const M=q},914(e){"use strict";class t{constructor(e,r){let n,o=" "+e;const a=r&&r.loc;if(a&&a.start<=a.end){const e=a.lexer.input;n=a.start;const t=a.end;n===e.length?o+=" at end of input: ":o+=" at position "+(n+1)+": \n";const r=e.slice(n,t).replace(/[^]/g,"$&\u0332");let i,s;i=n>15?"\u2026"+e.slice(n-15,n):e.slice(0,n),s=t+15<e.length?e.slice(t,t+15)+"\u2026":e.slice(t),o+=i+r+s}const i=new Error(o);return i.name="ParseError",i.__proto__=t.prototype,i.position=n,i}}t.prototype.__proto__=Error.prototype;const r=function(e,t){return void 0===e?t:e},n=/([A-Z])/g,o=function(e){return e.replace(n,"-$1").toLowerCase()},a={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;function s(e){return String(e).replace(i,(e=>a[e]))}const l=function(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?l(e.body[0]):e:"font"===e.type?l(e.body):e},c=function(e){const t=l(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},u=function(e){return+e.toFixed(4)},d="aceg\u0131\u0237mnopqrsuvwxyz\u03b1\u03b3\u03b5\u03b7\u03b9\u03ba\u03bc\u03bd\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c7\u03c9\u03d5\u{1d41a}\u{1d41c}\u{1d41e}\u{1d420}\u{1d426}\u{1d427}\u{1d428}\u{1d429}\u{1d42a}\u{1d42b}\u{1d42c}\u{1d42e}\u{1d42f}\u{1d430}\u{1d431}\u{1d432}\u{1d433}";class h{constructor(e){e=e||{},this.displayMode=r(e.displayMode,!1),this.annotate=r(e.annotate,!1),this.leqno=r(e.leqno,!1),this.throwOnError=r(e.throwOnError,!1),this.errorColor=r(e.errorColor,"#b22222"),this.macros=e.macros||{},this.wrap=r(e.wrap,"none"),this.xml=r(e.xml,!1),this.colorIsTextColor=r(e.colorIsTextColor,!1),this.strict=r(e.strict,!1),this.trust=r(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,r(e.maxExpand,1e3))}isTrusted(e){if(e.url&&!e.protocol){const t=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"}(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={},p={};function f({type:e,names:t,props:r,handler:n,mathmlBuilder:o}){const a={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]]=a;e&&o&&(p[e]=o)}function g({type:e,mathmlBuilder:t}){f({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},mathmlBuilder:t})}const b=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},x=function(e){return"ordgroup"===e.type?e.body:[e]};class y{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 v=function(e){return e.filter((e=>e)).join(" ")},w=function(e,t){this.classes=e||[],this.attributes={},this.style=t||{}},A=function(e){const t=document.createElement(e);t.className=v(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},C=function(e){let t=`<${e}`;this.classes.length&&(t+=` class="${s(v(this.classes))}"`);let r="";for(const e in this.style)Object.prototype.hasOwnProperty.call(this.style,e)&&(r+=`${o(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 E{constructor(e,t,r){w.call(this,e,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}toNode(){return A.call(this,"span")}toMarkup(){return C.call(this,"span")}}let S=class{constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return s(this.text)}};class _{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=v(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(v(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+=`${o(e)}:${this.style[e]};`);return t&&(e+=` style="${s(t)}"`),e+=">",e}}function q(e){return new y(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=v(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(v(this.classes))}"`);let t="";for(const e in this.style)Object.prototype.hasOwnProperty.call(this.style,e)&&(t+=`${o(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 N{constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return s(this.toText())}toText(){return this.text}}const L=e=>{let t;return 1===e.length&&"mrow"===e[0].type?(t=e.pop(),t.type="mstyle"):t=new k("mstyle",e),t},O=e=>{let t=0;if(e.body&&Array.isArray(e.body))for(const r of e.body)t+=O(r);else if(e.body)t+=O(e.body);else if("supsub"===e.type)t+=O(e.base),e.sub&&(t+=.7*O(e.sub)),e.sup&&(t+=.7*O(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},M={widehat:"^",widecheck:"\u02c7",widetilde:"~",wideparen:"\u23dc",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overbracket:"\u23b4",underbracket:"\u23b5",overgroup:"\u23e0",overparen:"\u23dc",undergroup:"\u23e1",underparen:"\u23dd",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xrightleftarrows:"\u21c4",xtofrom:"\u21c4",xleftrightharpoons:"\u21cb",xrightleftharpoons:"\u21cc",yields:"\u2192",yieldsLeft:"\u2190",mesomerism:"\u2194",longrightharpoonup:"\u21c0",longleftharpoondown:"\u21bd",eqrightharpoonup:"\u21c0",eqleftharpoondown:"\u21bd","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"=",yieldsLeftRight:"\u21c4",chemequilibrium:"\u21cc"},D=function(e){const t=new N(M[e.slice(1)]),r=new k("mo",[t]);return r.setAttribute("stretchy","true"),r},B=["\\widetilde","\\widehat","\\widecheck","\\utilde"],$=e=>{const t=D(e.label);if(B.includes(e.label)){const r=O(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},I={bin:1,close:1,inner:1,open:1,punct:1,rel:1},R={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},P={math:{},text:{}};function F(e,t,r,n,o){P[e][n]={group:t,replace:r},o&&r&&(P[e][r]=P[e][n])}const j="math",z="text",H="accent-token",U="bin",G="close",W="inner",V="mathord",X="op-token",J="open",Z="punct",Y="rel",K="spacing",Q="textord";F(j,Y,"\u2261","\\equiv",!0),F(j,Y,"\u227a","\\prec",!0),F(j,Y,"\u227b","\\succ",!0),F(j,Y,"\u223c","\\sim",!0),F(j,Y,"\u27c2","\\perp",!0),F(j,Y,"\u2aaf","\\preceq",!0),F(j,Y,"\u2ab0","\\succeq",!0),F(j,Y,"\u2243","\\simeq",!0),F(j,Y,"\u224c","\\backcong",!0),F(j,Y,"|","\\mid",!0),F(j,Y,"\u226a","\\ll",!0),F(j,Y,"\u226b","\\gg",!0),F(j,Y,"\u224d","\\asymp",!0),F(j,Y,"\u2225","\\parallel"),F(j,Y,"\u2323","\\smile",!0),F(j,Y,"\u2291","\\sqsubseteq",!0),F(j,Y,"\u2292","\\sqsupseteq",!0),F(j,Y,"\u2250","\\doteq",!0),F(j,Y,"\u2322","\\frown",!0),F(j,Y,"\u220b","\\ni",!0),F(j,Y,"\u220c","\\notni",!0),F(j,Y,"\u221d","\\propto",!0),F(j,Y,"\u22a2","\\vdash",!0),F(j,Y,"\u22a3","\\dashv",!0),F(j,Y,"\u220b","\\owns"),F(j,Y,"\u2258","\\arceq",!0),F(j,Y,"\u2259","\\wedgeq",!0),F(j,Y,"\u225a","\\veeeq",!0),F(j,Y,"\u225b","\\stareq",!0),F(j,Y,"\u225d","\\eqdef",!0),F(j,Y,"\u225e","\\measeq",!0),F(j,Y,"\u225f","\\questeq",!0),F(j,Y,"\u2260","\\ne",!0),F(j,Y,"\u2260","\\neq"),F(j,Y,"\u2a75","\\eqeq",!0),F(j,Y,"\u2a76","\\eqeqeq",!0),F(j,Y,"\u2237","\\dblcolon",!0),F(j,Y,"\u2254","\\coloneqq",!0),F(j,Y,"\u2255","\\eqqcolon",!0),F(j,Y,"\u2239","\\eqcolon",!0),F(j,Y,"\u2a74","\\Coloneqq",!0),F(j,Z,".","\\ldotp"),F(j,Z,"\xb7","\\cdotp"),F(j,Q,"#","\\#"),F(z,Q,"#","\\#"),F(j,Q,"&","\\&"),F(z,Q,"&","\\&"),F(j,Q,"\u2135","\\aleph",!0),F(j,Q,"\u2200","\\forall",!0),F(j,Q,"\u210f","\\hbar",!0),F(j,Q,"\u2203","\\exists",!0),F(j,U,"\u2207","\\nabla",!0),F(j,Q,"\u266d","\\flat",!0),F(j,Q,"\u2113","\\ell",!0),F(j,Q,"\u266e","\\natural",!0),F(j,Q,"\u212b","\\Angstrom",!0),F(z,Q,"\u212b","\\Angstrom",!0),F(j,Q,"\u2663","\\clubsuit",!0),F(j,Q,"\u2667","\\varclubsuit",!0),F(j,Q,"\u2118","\\wp",!0),F(j,Q,"\u266f","\\sharp",!0),F(j,Q,"\u2662","\\diamondsuit",!0),F(j,Q,"\u2666","\\vardiamondsuit",!0),F(j,Q,"\u211c","\\Re",!0),F(j,Q,"\u2661","\\heartsuit",!0),F(j,Q,"\u2665","\\varheartsuit",!0),F(j,Q,"\u2111","\\Im",!0),F(j,Q,"\u2660","\\spadesuit",!0),F(j,Q,"\u2664","\\varspadesuit",!0),F(j,Q,"\u2640","\\female",!0),F(j,Q,"\u2642","\\male",!0),F(j,Q,"\xa7","\\S",!0),F(z,Q,"\xa7","\\S"),F(j,Q,"\xb6","\\P",!0),F(z,Q,"\xb6","\\P"),F(z,Q,"\u263a","\\smiley",!0),F(j,Q,"\u263a","\\smiley",!0),F(j,Q,"\u2020","\\dag"),F(z,Q,"\u2020","\\dag"),F(z,Q,"\u2020","\\textdagger"),F(j,Q,"\u2021","\\ddag"),F(z,Q,"\u2021","\\ddag"),F(z,Q,"\u2021","\\textdaggerdbl"),F(j,G,"\u23b1","\\rmoustache",!0),F(j,J,"\u23b0","\\lmoustache",!0),F(j,G,"\u27ef","\\rgroup",!0),F(j,J,"\u27ee","\\lgroup",!0),F(j,U,"\u2213","\\mp",!0),F(j,U,"\u2296","\\ominus",!0),F(j,U,"\u228e","\\uplus",!0),F(j,U,"\u2293","\\sqcap",!0),F(j,U,"\u2217","\\ast"),F(j,U,"\u2294","\\sqcup",!0),F(j,U,"\u25ef","\\bigcirc",!0),F(j,U,"\u2219","\\bullet",!0),F(j,U,"\u2021","\\ddagger"),F(j,U,"\u2240","\\wr",!0),F(j,U,"\u2a3f","\\amalg"),F(j,U,"&","\\And"),F(j,U,"\u2afd","\\sslash",!0),F(j,Y,"\u27f5","\\longleftarrow",!0),F(j,Y,"\u21d0","\\Leftarrow",!0),F(j,Y,"\u27f8","\\Longleftarrow",!0),F(j,Y,"\u27f6","\\longrightarrow",!0),F(j,Y,"\u21d2","\\Rightarrow",!0),F(j,Y,"\u27f9","\\Longrightarrow",!0),F(j,Y,"\u2194","\\leftrightarrow",!0),F(j,Y,"\u27f7","\\longleftrightarrow",!0),F(j,Y,"\u21d4","\\Leftrightarrow",!0),F(j,Y,"\u27fa","\\Longleftrightarrow",!0),F(j,Y,"\u21a4","\\mapsfrom",!0),F(j,Y,"\u21a6","\\mapsto",!0),F(j,Y,"\u27fc","\\longmapsto",!0),F(j,Y,"\u2197","\\nearrow",!0),F(j,Y,"\u21a9","\\hookleftarrow",!0),F(j,Y,"\u21aa","\\hookrightarrow",!0),F(j,Y,"\u2198","\\searrow",!0),F(j,Y,"\u21bc","\\leftharpoonup",!0),F(j,Y,"\u21c0","\\rightharpoonup",!0),F(j,Y,"\u2199","\\swarrow",!0),F(j,Y,"\u21bd","\\leftharpoondown",!0),F(j,Y,"\u21c1","\\rightharpoondown",!0),F(j,Y,"\u2196","\\nwarrow",!0),F(j,Y,"\u21cc","\\rightleftharpoons",!0),F(j,V,"\u21af","\\lightning",!0),F(j,V,"\u220e","\\QED",!0),F(j,V,"\u2030","\\permil",!0),F(z,Q,"\u2030","\\permil"),F(j,V,"\u2609","\\astrosun",!0),F(j,V,"\u263c","\\sun",!0),F(j,V,"\u263e","\\leftmoon",!0),F(j,V,"\u263d","\\rightmoon",!0),F(j,V,"\u2295","\\Earth"),F(j,Y,"\u226e","\\nless",!0),F(j,Y,"\u2a87","\\lneq",!0),F(j,Y,"\u2268","\\lneqq",!0),F(j,Y,"\u2268\ufe00","\\lvertneqq"),F(j,Y,"\u22e6","\\lnsim",!0),F(j,Y,"\u2a89","\\lnapprox",!0),F(j,Y,"\u2280","\\nprec",!0),F(j,Y,"\u22e0","\\npreceq",!0),F(j,Y,"\u22e8","\\precnsim",!0),F(j,Y,"\u2ab9","\\precnapprox",!0),F(j,Y,"\u2241","\\nsim",!0),F(j,Y,"\u2224","\\nmid",!0),F(j,Y,"\u2224","\\nshortmid"),F(j,Y,"\u22ac","\\nvdash",!0),F(j,Y,"\u22ad","\\nvDash",!0),F(j,Y,"\u22ea","\\ntriangleleft"),F(j,Y,"\u22ec","\\ntrianglelefteq",!0),F(j,Y,"\u2284","\\nsubset",!0),F(j,Y,"\u2285","\\nsupset",!0),F(j,Y,"\u228a","\\subsetneq",!0),F(j,Y,"\u228a\ufe00","\\varsubsetneq"),F(j,Y,"\u2acb","\\subsetneqq",!0),F(j,Y,"\u2acb\ufe00","\\varsubsetneqq"),F(j,Y,"\u226f","\\ngtr",!0),F(j,Y,"\u2a88","\\gneq",!0),F(j,Y,"\u2269","\\gneqq",!0),F(j,Y,"\u2269\ufe00","\\gvertneqq"),F(j,Y,"\u22e7","\\gnsim",!0),F(j,Y,"\u2a8a","\\gnapprox",!0),F(j,Y,"\u2281","\\nsucc",!0),F(j,Y,"\u22e1","\\nsucceq",!0),F(j,Y,"\u22e9","\\succnsim",!0),F(j,Y,"\u2aba","\\succnapprox",!0),F(j,Y,"\u2246","\\ncong",!0),F(j,Y,"\u2226","\\nparallel",!0),F(j,Y,"\u2226","\\nshortparallel"),F(j,Y,"\u22af","\\nVDash",!0),F(j,Y,"\u22eb","\\ntriangleright"),F(j,Y,"\u22ed","\\ntrianglerighteq",!0),F(j,Y,"\u228b","\\supsetneq",!0),F(j,Y,"\u228b","\\varsupsetneq"),F(j,Y,"\u2acc","\\supsetneqq",!0),F(j,Y,"\u2acc\ufe00","\\varsupsetneqq"),F(j,Y,"\u22ae","\\nVdash",!0),F(j,Y,"\u2ab5","\\precneqq",!0),F(j,Y,"\u2ab6","\\succneqq",!0),F(j,U,"\u22b4","\\unlhd"),F(j,U,"\u22b5","\\unrhd"),F(j,Y,"\u219a","\\nleftarrow",!0),F(j,Y,"\u219b","\\nrightarrow",!0),F(j,Y,"\u21cd","\\nLeftarrow",!0),F(j,Y,"\u21cf","\\nRightarrow",!0),F(j,Y,"\u21ae","\\nleftrightarrow",!0),F(j,Y,"\u21ce","\\nLeftrightarrow",!0),F(j,Y,"\u25b3","\\vartriangle"),F(j,Q,"\u210f","\\hslash"),F(j,Q,"\u25bd","\\triangledown"),F(j,Q,"\u25ca","\\lozenge"),F(j,Q,"\u24c8","\\circledS"),F(j,Q,"\xae","\\circledR",!0),F(z,Q,"\xae","\\circledR"),F(z,Q,"\xae","\\textregistered"),F(j,Q,"\u2221","\\measuredangle",!0),F(j,Q,"\u2204","\\nexists"),F(j,Q,"\u2127","\\mho"),F(j,Q,"\u2132","\\Finv",!0),F(j,Q,"\u2141","\\Game",!0),F(j,Q,"\u2035","\\backprime"),F(j,Q,"\u2036","\\backdprime"),F(j,Q,"\u2037","\\backtrprime"),F(j,Q,"\u25b2","\\blacktriangle"),F(j,Q,"\u25bc","\\blacktriangledown"),F(j,Q,"\u25a0","\\blacksquare"),F(j,Q,"\u29eb","\\blacklozenge"),F(j,Q,"\u2605","\\bigstar"),F(j,Q,"\u2222","\\sphericalangle",!0),F(j,Q,"\u2201","\\complement",!0),F(j,Q,"\u2571","\\diagup"),F(j,Q,"\u2572","\\diagdown"),F(j,Q,"\u25a1","\\square"),F(j,Q,"\u25a1","\\Box"),F(j,Q,"\u25ca","\\Diamond"),F(j,Q,"\xa5","\\yen",!0),F(z,Q,"\xa5","\\yen",!0),F(j,Q,"\u2713","\\checkmark",!0),F(z,Q,"\u2713","\\checkmark"),F(j,Q,"\u2717","\\ballotx",!0),F(z,Q,"\u2717","\\ballotx"),F(z,Q,"\u2022","\\textbullet"),F(j,Q,"\u2136","\\beth",!0),F(j,Q,"\u2138","\\daleth",!0),F(j,Q,"\u2137","\\gimel",!0),F(j,Q,"\u03dd","\\digamma",!0),F(j,Q,"\u03f0","\\varkappa"),F(j,J,"\u231c","\\ulcorner",!0),F(j,G,"\u231d","\\urcorner",!0),F(j,J,"\u231e","\\llcorner",!0),F(j,G,"\u231f","\\lrcorner",!0),F(j,Y,"\u2266","\\leqq",!0),F(j,Y,"\u2a7d","\\leqslant",!0),F(j,Y,"\u2a95","\\eqslantless",!0),F(j,Y,"\u2272","\\lesssim",!0),F(j,Y,"\u2a85","\\lessapprox",!0),F(j,Y,"\u224a","\\approxeq",!0),F(j,U,"\u22d6","\\lessdot"),F(j,Y,"\u22d8","\\lll",!0),F(j,Y,"\u2276","\\lessgtr",!0),F(j,Y,"\u22da","\\lesseqgtr",!0),F(j,Y,"\u2a8b","\\lesseqqgtr",!0),F(j,Y,"\u2251","\\doteqdot"),F(j,Y,"\u2253","\\risingdotseq",!0),F(j,Y,"\u2252","\\fallingdotseq",!0),F(j,Y,"\u223d","\\backsim",!0),F(j,Y,"\u22cd","\\backsimeq",!0),F(j,Y,"\u2ac5","\\subseteqq",!0),F(j,Y,"\u22d0","\\Subset",!0),F(j,Y,"\u228f","\\sqsubset",!0),F(j,Y,"\u227c","\\preccurlyeq",!0),F(j,Y,"\u22de","\\curlyeqprec",!0),F(j,Y,"\u227e","\\precsim",!0),F(j,Y,"\u2ab7","\\precapprox",!0),F(j,Y,"\u22b2","\\vartriangleleft"),F(j,Y,"\u22b4","\\trianglelefteq"),F(j,Y,"\u22a8","\\vDash",!0),F(j,Y,"\u22ab","\\VDash",!0),F(j,Y,"\u22aa","\\Vvdash",!0),F(j,Y,"\u2323","\\smallsmile"),F(j,Y,"\u2322","\\smallfrown"),F(j,Y,"\u224f","\\bumpeq",!0),F(j,Y,"\u224e","\\Bumpeq",!0),F(j,Y,"\u2267","\\geqq",!0),F(j,Y,"\u2a7e","\\geqslant",!0),F(j,Y,"\u2a96","\\eqslantgtr",!0),F(j,Y,"\u2273","\\gtrsim",!0),F(j,Y,"\u2a86","\\gtrapprox",!0),F(j,U,"\u22d7","\\gtrdot"),F(j,Y,"\u22d9","\\ggg",!0),F(j,Y,"\u2277","\\gtrless",!0),F(j,Y,"\u22db","\\gtreqless",!0),F(j,Y,"\u2a8c","\\gtreqqless",!0),F(j,Y,"\u2256","\\eqcirc",!0),F(j,Y,"\u2257","\\circeq",!0),F(j,Y,"\u225c","\\triangleq",!0),F(j,Y,"\u223c","\\thicksim"),F(j,Y,"\u2248","\\thickapprox"),F(j,Y,"\u2ac6","\\supseteqq",!0),F(j,Y,"\u22d1","\\Supset",!0),F(j,Y,"\u2290","\\sqsupset",!0),F(j,Y,"\u227d","\\succcurlyeq",!0),F(j,Y,"\u22df","\\curlyeqsucc",!0),F(j,Y,"\u227f","\\succsim",!0),F(j,Y,"\u2ab8","\\succapprox",!0),F(j,Y,"\u22b3","\\vartriangleright"),F(j,Y,"\u22b5","\\trianglerighteq"),F(j,Y,"\u22a9","\\Vdash",!0),F(j,Y,"\u2223","\\shortmid"),F(j,Y,"\u2225","\\shortparallel"),F(j,Y,"\u226c","\\between",!0),F(j,Y,"\u22d4","\\pitchfork",!0),F(j,Y,"\u221d","\\varpropto"),F(j,Y,"\u25c0","\\blacktriangleleft"),F(j,Y,"\u2234","\\therefore",!0),F(j,Y,"\u220d","\\backepsilon"),F(j,Y,"\u25b6","\\blacktriangleright"),F(j,Y,"\u2235","\\because",!0),F(j,Y,"\u22d8","\\llless"),F(j,Y,"\u22d9","\\gggtr"),F(j,U,"\u22b2","\\lhd"),F(j,U,"\u22b3","\\rhd"),F(j,Y,"\u2242","\\eqsim",!0),F(j,Y,"\u2251","\\Doteq",!0),F(j,Y,"\u297d","\\strictif",!0),F(j,Y,"\u297c","\\strictfi",!0),F(j,U,"\u2214","\\dotplus",!0),F(j,U,"\u2216","\\smallsetminus"),F(j,U,"\u22d2","\\Cap",!0),F(j,U,"\u22d3","\\Cup",!0),F(j,U,"\u2a5e","\\doublebarwedge",!0),F(j,U,"\u229f","\\boxminus",!0),F(j,U,"\u229e","\\boxplus",!0),F(j,U,"\u29c4","\\boxslash",!0),F(j,U,"\u22c7","\\divideontimes",!0),F(j,U,"\u22c9","\\ltimes",!0),F(j,U,"\u22ca","\\rtimes",!0),F(j,U,"\u22cb","\\leftthreetimes",!0),F(j,U,"\u22cc","\\rightthreetimes",!0),F(j,U,"\u22cf","\\curlywedge",!0),F(j,U,"\u22ce","\\curlyvee",!0),F(j,U,"\u229d","\\circleddash",!0),F(j,U,"\u229b","\\circledast",!0),F(j,U,"\u22ba","\\intercal",!0),F(j,U,"\u22d2","\\doublecap"),F(j,U,"\u22d3","\\doublecup"),F(j,U,"\u22a0","\\boxtimes",!0),F(j,U,"\u22c8","\\bowtie",!0),F(j,U,"\u22c8","\\Join"),F(j,U,"\u27d5","\\leftouterjoin",!0),F(j,U,"\u27d6","\\rightouterjoin",!0),F(j,U,"\u27d7","\\fullouterjoin",!0),F(j,U,"\u2238","\\dotminus",!0),F(j,U,"\u27d1","\\wedgedot",!0),F(j,U,"\u27c7","\\veedot",!0),F(j,U,"\u2a62","\\doublebarvee",!0),F(j,U,"\u2a63","\\veedoublebar",!0),F(j,U,"\u2a5f","\\wedgebar",!0),F(j,U,"\u2a60","\\wedgedoublebar",!0),F(j,U,"\u2a54","\\Vee",!0),F(j,U,"\u2a53","\\Wedge",!0),F(j,U,"\u2a43","\\barcap",!0),F(j,U,"\u2a42","\\barcup",!0),F(j,U,"\u2a48","\\capbarcup",!0),F(j,U,"\u2a40","\\capdot",!0),F(j,U,"\u2a47","\\capovercup",!0),F(j,U,"\u2a46","\\cupovercap",!0),F(j,U,"\u2a4d","\\closedvarcap",!0),F(j,U,"\u2a4c","\\closedvarcup",!0),F(j,U,"\u2a2a","\\minusdot",!0),F(j,U,"\u2a2b","\\minusfdots",!0),F(j,U,"\u2a2c","\\minusrdots",!0),F(j,U,"\u22bb","\\Xor",!0),F(j,U,"\u22bc","\\Nand",!0),F(j,U,"\u22bd","\\Nor",!0),F(j,U,"\u22bd","\\barvee"),F(j,U,"\u2af4","\\interleave",!0),F(j,U,"\u29e2","\\shuffle",!0),F(j,U,"\u2af6","\\threedotcolon",!0),F(j,U,"\u2982","\\typecolon",!0),F(j,U,"\u223e","\\invlazys",!0),F(j,U,"\u2a4b","\\twocaps",!0),F(j,U,"\u2a4a","\\twocups",!0),F(j,U,"\u2a4e","\\Sqcap",!0),F(j,U,"\u2a4f","\\Sqcup",!0),F(j,U,"\u2a56","\\veeonvee",!0),F(j,U,"\u2a55","\\wedgeonwedge",!0),F(j,U,"\u29d7","\\blackhourglass",!0),F(j,U,"\u29c6","\\boxast",!0),F(j,U,"\u29c8","\\boxbox",!0),F(j,U,"\u29c7","\\boxcircle",!0),F(j,U,"\u229c","\\circledequal",!0),F(j,U,"\u29b7","\\circledparallel",!0),F(j,U,"\u29b6","\\circledvert",!0),F(j,U,"\u29b5","\\circlehbar",!0),F(j,U,"\u27e1","\\concavediamond",!0),F(j,U,"\u27e2","\\concavediamondtickleft",!0),F(j,U,"\u27e3","\\concavediamondtickright",!0),F(j,U,"\u22c4","\\diamond",!0),F(j,U,"\u29d6","\\hourglass",!0),F(j,U,"\u27e0","\\lozengeminus",!0),F(j,U,"\u233d","\\obar",!0),F(j,U,"\u29b8","\\obslash",!0),F(j,U,"\u2a38","\\odiv",!0),F(j,U,"\u29c1","\\ogreaterthan",!0),F(j,U,"\u29c0","\\olessthan",!0),F(j,U,"\u29b9","\\operp",!0),F(j,U,"\u2a37","\\Otimes",!0),F(j,U,"\u2a36","\\otimeshat",!0),F(j,U,"\u22c6","\\star",!0),F(j,U,"\u25b3","\\triangle",!0),F(j,U,"\u2a3a","\\triangleminus",!0),F(j,U,"\u2a39","\\triangleplus",!0),F(j,U,"\u2a3b","\\triangletimes",!0),F(j,U,"\u27e4","\\whitesquaretickleft",!0),F(j,U,"\u27e5","\\whitesquaretickright",!0),F(j,U,"\u2a33","\\smashtimes",!0),F(j,Y,"\u21e2","\\dashrightarrow",!0),F(j,Y,"\u21e0","\\dashleftarrow",!0),F(j,Y,"\u21c7","\\leftleftarrows",!0),F(j,Y,"\u21c6","\\leftrightarrows",!0),F(j,Y,"\u21da","\\Lleftarrow",!0),F(j,Y,"\u219e","\\twoheadleftarrow",!0),F(j,Y,"\u21a2","\\leftarrowtail",!0),F(j,Y,"\u21ab","\\looparrowleft",!0),F(j,Y,"\u21cb","\\leftrightharpoons",!0),F(j,Y,"\u21b6","\\curvearrowleft",!0),F(j,Y,"\u21ba","\\circlearrowleft",!0),F(j,Y,"\u21b0","\\Lsh",!0),F(j,Y,"\u21c8","\\upuparrows",!0),F(j,Y,"\u21bf","\\upharpoonleft",!0),F(j,Y,"\u21c3","\\downharpoonleft",!0),F(j,Y,"\u22b6","\\origof",!0),F(j,Y,"\u22b7","\\imageof",!0),F(j,Y,"\u22b8","\\multimap",!0),F(j,Y,"\u21ad","\\leftrightsquigarrow",!0),F(j,Y,"\u21c9","\\rightrightarrows",!0),F(j,Y,"\u21c4","\\rightleftarrows",!0),F(j,Y,"\u21a0","\\twoheadrightarrow",!0),F(j,Y,"\u21a3","\\rightarrowtail",!0),F(j,Y,"\u21ac","\\looparrowright",!0),F(j,Y,"\u21b7","\\curvearrowright",!0),F(j,Y,"\u21bb","\\circlearrowright",!0),F(j,Y,"\u21b1","\\Rsh",!0),F(j,Y,"\u21ca","\\downdownarrows",!0),F(j,Y,"\u21be","\\upharpoonright",!0),F(j,Y,"\u21c2","\\downharpoonright",!0),F(j,Y,"\u21dd","\\rightsquigarrow",!0),F(j,Y,"\u21dd","\\leadsto"),F(j,Y,"\u21db","\\Rrightarrow",!0),F(j,Y,"\u21be","\\restriction"),F(j,Q,"\u2018","`"),F(j,Q,"$","\\$"),F(z,Q,"$","\\$"),F(z,Q,"$","\\textdollar"),F(j,Q,"\xa2","\\cent"),F(z,Q,"\xa2","\\cent"),F(j,Q,"%","\\%"),F(z,Q,"%","\\%"),F(j,Q,"_","\\_"),F(z,Q,"_","\\_"),F(z,Q,"_","\\textunderscore"),F(z,Q,"\u2423","\\textvisiblespace",!0),F(j,Q,"\u2220","\\angle",!0),F(j,Q,"\u221e","\\infty",!0),F(j,Q,"\u2032","\\prime"),F(j,Q,"\u2033","\\dprime"),F(j,Q,"\u2034","\\trprime"),F(j,Q,"\u2057","\\qprime"),F(j,Q,"\u25b3","\\triangle"),F(z,Q,"\u0391","\\Alpha",!0),F(z,Q,"\u0392","\\Beta",!0),F(z,Q,"\u0393","\\Gamma",!0),F(z,Q,"\u0394","\\Delta",!0),F(z,Q,"\u0395","\\Epsilon",!0),F(z,Q,"\u0396","\\Zeta",!0),F(z,Q,"\u0397","\\Eta",!0),F(z,Q,"\u0398","\\Theta",!0),F(z,Q,"\u0399","\\Iota",!0),F(z,Q,"\u039a","\\Kappa",!0),F(z,Q,"\u039b","\\Lambda",!0),F(z,Q,"\u039c","\\Mu",!0),F(z,Q,"\u039d","\\Nu",!0),F(z,Q,"\u039e","\\Xi",!0),F(z,Q,"\u039f","\\Omicron",!0),F(z,Q,"\u03a0","\\Pi",!0),F(z,Q,"\u03a1","\\Rho",!0),F(z,Q,"\u03a3","\\Sigma",!0),F(z,Q,"\u03a4","\\Tau",!0),F(z,Q,"\u03a5","\\Upsilon",!0),F(z,Q,"\u03a6","\\Phi",!0),F(z,Q,"\u03a7","\\Chi",!0),F(z,Q,"\u03a8","\\Psi",!0),F(z,Q,"\u03a9","\\Omega",!0),F(j,V,"\u0391","\\Alpha",!0),F(j,V,"\u0392","\\Beta",!0),F(j,V,"\u0393","\\Gamma",!0),F(j,V,"\u0394","\\Delta",!0),F(j,V,"\u0395","\\Epsilon",!0),F(j,V,"\u0396","\\Zeta",!0),F(j,V,"\u0397","\\Eta",!0),F(j,V,"\u0398","\\Theta",!0),F(j,V,"\u0399","\\Iota",!0),F(j,V,"\u039a","\\Kappa",!0),F(j,V,"\u039b","\\Lambda",!0),F(j,V,"\u039c","\\Mu",!0),F(j,V,"\u039d","\\Nu",!0),F(j,V,"\u039e","\\Xi",!0),F(j,V,"\u039f","\\Omicron",!0),F(j,V,"\u03a0","\\Pi",!0),F(j,V,"\u03a1","\\Rho",!0),F(j,V,"\u03a3","\\Sigma",!0),F(j,V,"\u03a4","\\Tau",!0),F(j,V,"\u03a5","\\Upsilon",!0),F(j,V,"\u03a6","\\Phi",!0),F(j,V,"\u03a7","\\Chi",!0),F(j,V,"\u03a8","\\Psi",!0),F(j,V,"\u03a9","\\Omega",!0),F(j,J,"\xac","\\neg",!0),F(j,J,"\xac","\\lnot"),F(j,Q,"\u22a4","\\top"),F(j,Q,"\u22a5","\\bot"),F(j,Q,"\u2205","\\emptyset"),F(j,Q,"\u2300","\\varnothing"),F(j,V,"\u03b1","\\alpha",!0),F(j,V,"\u03b2","\\beta",!0),F(j,V,"\u03b3","\\gamma",!0),F(j,V,"\u03b4","\\delta",!0),F(j,V,"\u03f5","\\epsilon",!0),F(j,V,"\u03b6","\\zeta",!0),F(j,V,"\u03b7","\\eta",!0),F(j,V,"\u03b8","\\theta",!0),F(j,V,"\u03b9","\\iota",!0),F(j,V,"\u03ba","\\kappa",!0),F(j,V,"\u03bb","\\lambda",!0),F(j,V,"\u03bc","\\mu",!0),F(j,V,"\u03bd","\\nu",!0),F(j,V,"\u03be","\\xi",!0),F(j,V,"\u03bf","\\omicron",!0),F(j,V,"\u03c0","\\pi",!0),F(j,V,"\u03c1","\\rho",!0),F(j,V,"\u03c3","\\sigma",!0),F(j,V,"\u03c4","\\tau",!0),F(j,V,"\u03c5","\\upsilon",!0),F(j,V,"\u03d5","\\phi",!0),F(j,V,"\u03c7","\\chi",!0),F(j,V,"\u03c8","\\psi",!0),F(j,V,"\u03c9","\\omega",!0),F(j,V,"\u03b5","\\varepsilon",!0),F(j,V,"\u03d1","\\vartheta",!0),F(j,V,"\u03d6","\\varpi",!0),F(j,V,"\u03f1","\\varrho",!0),F(j,V,"\u03c2","\\varsigma",!0),F(j,V,"\u03c6","\\varphi",!0),F(j,V,"\u03d8","\\Coppa",!0),F(j,V,"\u03d9","\\coppa",!0),F(j,V,"\u03d9","\\varcoppa",!0),F(j,V,"\u03de","\\Koppa",!0),F(j,V,"\u03df","\\koppa",!0),F(j,V,"\u03e0","\\Sampi",!0),F(j,V,"\u03e1","\\sampi",!0),F(j,V,"\u03da","\\Stigma",!0),F(j,V,"\u03db","\\stigma",!0),F(j,V,"\u2aeb","\\Bot"),F(j,Q,"\xf0","\\eth",!0),F(z,Q,"\xf0","\xf0"),F(j,Q,"\xc5","\\AA"),F(z,Q,"\xc5","\\AA",!0),F(j,Q,"\xc6","\\AE",!0),F(z,Q,"\xc6","\\AE",!0),F(j,Q,"\xd0","\\DH",!0),F(z,Q,"\xd0","\\DH",!0),F(j,Q,"\xde","\\TH",!0),F(z,Q,"\xde","\\TH",!0),F(j,Q,"\xdf","\\ss",!0),F(z,Q,"\xdf","\\ss",!0),F(j,Q,"\xe5","\\aa"),F(z,Q,"\xe5","\\aa",!0),F(j,Q,"\xe6","\\ae",!0),F(z,Q,"\xe6","\\ae",!0),F(j,Q,"\xf0","\\dh"),F(z,Q,"\xf0","\\dh",!0),F(j,Q,"\xfe","\\th",!0),F(z,Q,"\xfe","\\th",!0),F(j,Q,"\u0110","\\DJ",!0),F(z,Q,"\u0110","\\DJ",!0),F(j,Q,"\u0111","\\dj",!0),F(z,Q,"\u0111","\\dj",!0),F(j,Q,"\u0141","\\L",!0),F(z,Q,"\u0141","\\L",!0),F(j,Q,"\u0141","\\l",!0),F(z,Q,"\u0141","\\l",!0),F(j,Q,"\u014a","\\NG",!0),F(z,Q,"\u014a","\\NG",!0),F(j,Q,"\u014b","\\ng",!0),F(z,Q,"\u014b","\\ng",!0),F(j,Q,"\u0152","\\OE",!0),F(z,Q,"\u0152","\\OE",!0),F(j,Q,"\u0153","\\oe",!0),F(z,Q,"\u0153","\\oe",!0),F(j,U,"\u2217","\u2217",!0),F(j,U,"+","+"),F(j,U,"\u2217","*"),F(j,U,"\u2044","/",!0),F(j,U,"\u2044","\u2044"),F(j,U,"\u2212","-",!0),F(j,U,"\u22c5","\\cdot",!0),F(j,U,"\u2218","\\circ",!0),F(j,U,"\xf7","\\div",!0),F(j,U,"\xb1","\\pm",!0),F(j,U,"\xd7","\\times",!0),F(j,U,"\u2229","\\cap",!0),F(j,U,"\u222a","\\cup",!0),F(j,U,"\u2216","\\setminus",!0),F(j,U,"\u2227","\\land"),F(j,U,"\u2228","\\lor"),F(j,U,"\u2227","\\wedge",!0),F(j,U,"\u2228","\\vee",!0),F(j,J,"\u27e6","\\llbracket",!0),F(j,G,"\u27e7","\\rrbracket",!0),F(j,J,"\u27e8","\\langle",!0),F(j,J,"\u27ea","\\lAngle",!0),F(j,J,"\u2989","\\llangle",!0),F(j,J,"|","\\lvert"),F(j,J,"\u2016","\\lVert",!0),F(j,Q,"!","\\oc"),F(j,Q,"?","\\wn"),F(j,Q,"\u2193","\\shpos"),F(j,Q,"\u2195","\\shift"),F(j,Q,"\u2191","\\shneg"),F(j,G,"?","?"),F(j,G,"!","!"),F(j,G,"\u203c","\u203c"),F(j,G,"\u27e9","\\rangle",!0),F(j,G,"\u27eb","\\rAngle",!0),F(j,G,"\u298a","\\rrangle",!0),F(j,G,"|","\\rvert"),F(j,G,"\u2016","\\rVert"),F(j,J,"\u2983","\\lBrace",!0),F(j,G,"\u2984","\\rBrace",!0),F(j,Y,"=","\\equal",!0),F(j,Y,":",":"),F(j,Y,"\u2248","\\approx",!0),F(j,Y,"\u2245","\\cong",!0),F(j,Y,"\u2265","\\ge"),F(j,Y,"\u2265","\\geq",!0),F(j,Y,"\u2190","\\gets"),F(j,Y,">","\\gt",!0),F(j,Y,"\u2208","\\in",!0),F(j,Y,"\u2209","\\notin",!0),F(j,Y,"\ue020","\\@not"),F(j,Y,"\u2282","\\subset",!0),F(j,Y,"\u2283","\\supset",!0),F(j,Y,"\u2286","\\subseteq",!0),F(j,Y,"\u2287","\\supseteq",!0),F(j,Y,"\u2288","\\nsubseteq",!0),F(j,Y,"\u2288","\\nsubseteqq"),F(j,Y,"\u2289","\\nsupseteq",!0),F(j,Y,"\u2289","\\nsupseteqq"),F(j,Y,"\u22a8","\\models"),F(j,Y,"\u2190","\\leftarrow",!0),F(j,Y,"\u2264","\\le"),F(j,Y,"\u2264","\\leq",!0),F(j,Y,"<","\\lt",!0),F(j,Y,"\u2192","\\rightarrow",!0),F(j,Y,"\u2192","\\to"),F(j,Y,"\u2271","\\ngeq",!0),F(j,Y,"\u2271","\\ngeqq"),F(j,Y,"\u2271","\\ngeqslant"),F(j,Y,"\u2270","\\nleq",!0),F(j,Y,"\u2270","\\nleqq"),F(j,Y,"\u2270","\\nleqslant"),F(j,Y,"\u2aeb","\\Perp",!0),F(j,K,"\xa0","\\ "),F(j,K,"\xa0","\\space"),F(j,K,"\xa0","\\nobreakspace"),F(z,K,"\xa0","\\ "),F(z,K,"\xa0"," "),F(z,K,"\xa0","\\space"),F(z,K,"\xa0","\\nobreakspace"),F(j,K,null,"\\nobreak"),F(j,K,null,"\\allowbreak"),F(j,Z,",",","),F(z,Z,":",":"),F(j,Z,";",";"),F(j,U,"\u22bc","\\barwedge"),F(j,U,"\u22bb","\\veebar"),F(j,U,"\u2299","\\odot",!0),F(j,U,"\u2295\ufe0e","\\oplus"),F(j,U,"\u2297","\\otimes",!0),F(j,Q,"\u2202","\\partial",!0),F(j,U,"\u2298","\\oslash",!0),F(j,U,"\u229a","\\circledcirc",!0),F(j,U,"\u22a1","\\boxdot",!0),F(j,U,"\u25b3","\\bigtriangleup"),F(j,U,"\u25bd","\\bigtriangledown"),F(j,U,"\u2020","\\dagger"),F(j,U,"\u22c4","\\diamond"),F(j,U,"\u25c3","\\triangleleft"),F(j,U,"\u25b9","\\triangleright"),F(j,J,"{","\\{"),F(z,Q,"{","\\{"),F(z,Q,"{","\\textbraceleft"),F(j,G,"}","\\}"),F(z,Q,"}","\\}"),F(z,Q,"}","\\textbraceright"),F(j,J,"{","\\lbrace"),F(j,G,"}","\\rbrace"),F(j,J,"[","\\lbrack",!0),F(z,Q,"[","\\lbrack",!0),F(j,G,"]","\\rbrack",!0),F(z,Q,"]","\\rbrack",!0),F(j,J,"(","\\lparen",!0),F(j,G,")","\\rparen",!0),F(j,J,"\u2987","\\llparenthesis",!0),F(j,G,"\u2988","\\rrparenthesis",!0),F(z,Q,"<","\\textless",!0),F(z,Q,">","\\textgreater",!0),F(j,J,"\u230a","\\lfloor",!0),F(j,G,"\u230b","\\rfloor",!0),F(j,J,"\u2308","\\lceil",!0),F(j,G,"\u2309","\\rceil",!0),F(j,Q,"\\","\\backslash"),F(j,Q,"|","|"),F(j,Q,"|","\\vert"),F(z,Q,"|","\\textbar",!0),F(j,Q,"\u2016","\\|"),F(j,Q,"\u2016","\\Vert"),F(z,Q,"\u2016","\\textbardbl"),F(z,Q,"~","\\textasciitilde"),F(z,Q,"\\","\\textbackslash"),F(z,Q,"^","\\textasciicircum"),F(j,Y,"\u2191","\\uparrow",!0),F(j,Y,"\u21d1","\\Uparrow",!0),F(j,Y,"\u2193","\\downarrow",!0),F(j,Y,"\u21d3","\\Downarrow",!0),F(j,Y,"\u2195","\\updownarrow",!0),F(j,Y,"\u21d5","\\Updownarrow",!0),F(j,X,"\u2210","\\coprod"),F(j,X,"\u22c1","\\bigvee"),F(j,X,"\u22c0","\\bigwedge"),F(j,X,"\u2a04","\\biguplus"),F(j,X,"\u2a04","\\bigcupplus"),F(j,X,"\u2a03","\\bigcupdot"),F(j,X,"\u2a07","\\bigdoublevee"),F(j,X,"\u2a08","\\bigdoublewedge"),F(j,X,"\u22c2","\\bigcap"),F(j,X,"\u22c3","\\bigcup"),F(j,X,"\u222b","\\int"),F(j,X,"\u222b","\\intop"),F(j,X,"\u222c","\\iint"),F(j,X,"\u222d","\\iiint"),F(j,X,"\u220f","\\prod"),F(j,X,"\u2211","\\sum"),F(j,X,"\u2a02","\\bigotimes"),F(j,X,"\u2a01","\\bigoplus"),F(j,X,"\u2a00","\\bigodot"),F(j,X,"\u2a09","\\bigtimes"),F(j,X,"\u222e","\\oint"),F(j,X,"\u222f","\\oiint"),F(j,X,"\u2230","\\oiiint"),F(j,X,"\u2231","\\intclockwise"),F(j,X,"\u2232","\\varointclockwise"),F(j,X,"\u2a0c","\\iiiint"),F(j,X,"\u2a0d","\\intbar"),F(j,X,"\u2a0e","\\intBar"),F(j,X,"\u2a0f","\\fint"),F(j,X,"\u2a12","\\rppolint"),F(j,X,"\u2a13","\\scpolint"),F(j,X,"\u2a15","\\pointint"),F(j,X,"\u2a16","\\sqint"),F(j,X,"\u2a17","\\intlarhk"),F(j,X,"\u2a18","\\intx"),F(j,X,"\u2a19","\\intcap"),F(j,X,"\u2a1a","\\intcup"),F(j,X,"\u2a05","\\bigsqcap"),F(j,X,"\u2a06","\\bigsqcup"),F(j,X,"\u222b","\\smallint"),F(z,W,"\u2026","\\textellipsis"),F(j,W,"\u2026","\\mathellipsis"),F(z,W,"\u2026","\\ldots",!0),F(j,W,"\u2026","\\ldots",!0),F(j,W,"\u22f0","\\iddots",!0),F(j,W,"\u22ef","\\@cdots",!0),F(j,W,"\u22f1","\\ddots",!0),F(j,Q,"\u22ee","\\varvdots"),F(z,Q,"\u22ee","\\varvdots"),F(j,H,"\xb4","\\acute"),F(j,H,"`","\\grave"),F(j,H,"\xa8","\\ddot"),F(j,H,"\u2026","\\dddot"),F(j,H,"\u2026.","\\ddddot"),F(j,H,"~","\\tilde"),F(j,H,"\u203e","\\bar"),F(j,H,"\u02d8","\\breve"),F(j,H,"\u02c7","\\check"),F(j,H,"^","\\hat"),F(j,H,"\u2192","\\vec"),F(j,H,"\u02d9","\\dot"),F(j,H,"\u02da","\\mathring"),F(j,V,"\u0131","\\imath",!0),F(j,V,"\u0237","\\jmath",!0),F(j,Q,"\u0131","\u0131"),F(j,Q,"\u0237","\u0237"),F(z,Q,"\u0131","\\i",!0),F(z,Q,"\u0237","\\j",!0),F(z,Q,"\xf8","\\o",!0),F(j,V,"\xf8","\\o",!0),F(z,Q,"\xd8","\\O",!0),F(j,V,"\xd8","\\O",!0),F(z,H,"\u02ca","\\'"),F(z,H,"\u02cb","\\`"),F(z,H,"\u02c6","\\^"),F(z,H,"~","\\~"),F(z,H,"\u02c9","\\="),F(z,H,"\u02d8","\\u"),F(z,H,"\u02d9","\\."),F(z,H,"\xb8","\\c"),F(z,H,"\u02da","\\r"),F(z,H,"\u02c7","\\v");F(z,H,"\xa8",'\\"'),F(z,H,"\u02dd","\\H"),F(j,H,"\u02ca","\\'"),F(j,H,"\u02cb","\\`"),F(j,H,"\u02c6","\\^"),F(j,H,"~","\\~"),F(j,H,"\u02c9","\\="),F(j,H,"\u02d8","\\u"),F(j,H,"\u02d9","\\."),F(j,H,"\xb8","\\c"),F(j,H,"\u02da","\\r"),F(j,H,"\u02c7","\\v"),F(j,H,"\xa8",'\\"'),F(j,H,"\u02dd","\\H");const ee={"--":!0,"---":!0,"``":!0,"''":!0};F(z,Q,"\u2013","--",!0),F(z,Q,"\u2013","\\textendash"),F(z,Q,"\u2014","---",!0),F(z,Q,"\u2014","\\textemdash"),F(z,Q,"\u2018","`",!0),F(z,Q,"\u2018","\\textquoteleft"),F(z,Q,"\u2019","'",!0),F(z,Q,"\u2019","\\textquoteright"),F(z,Q,"\u201c","``",!0),F(z,Q,"\u201c","\\textquotedblleft"),F(z,Q,"\u201d","''",!0),F(z,Q,"\u201d","\\textquotedblright"),F(j,Q,"\xb0","\\degree",!0),F(z,Q,"\xb0","\\degree"),F(z,Q,"\xb0","\\textdegree",!0),F(j,Q,"\xa3","\\pounds"),F(j,Q,"\xa3","\\mathsterling",!0),F(z,Q,"\xa3","\\pounds"),F(z,Q,"\xa3","\\textsterling",!0),F(j,Q,"\u2720","\\maltese"),F(z,Q,"\u2720","\\maltese"),F(j,Q,"\u20ac","\\euro",!0),F(z,Q,"\u20ac","\\euro",!0),F(z,Q,"\u20ac","\\texteuro"),F(j,Q,"\xa9","\\copyright",!0),F(z,Q,"\xa9","\\textcopyright"),F(j,Q,"\u2300","\\diameter",!0),F(z,Q,"\u2300","\\diameter"),F(j,Q,"\u{1d6e4}","\\varGamma"),F(j,Q,"\u{1d6e5}","\\varDelta"),F(j,Q,"\u{1d6e9}","\\varTheta"),F(j,Q,"\u{1d6ec}","\\varLambda"),F(j,Q,"\u{1d6ef}","\\varXi"),F(j,Q,"\u{1d6f1}","\\varPi"),F(j,Q,"\u{1d6f4}","\\varSigma"),F(j,Q,"\u{1d6f6}","\\varUpsilon"),F(j,Q,"\u{1d6f7}","\\varPhi"),F(j,Q,"\u{1d6f9}","\\varPsi"),F(j,Q,"\u{1d6fa}","\\varOmega"),F(z,Q,"\u{1d6e4}","\\varGamma"),F(z,Q,"\u{1d6e5}","\\varDelta"),F(z,Q,"\u{1d6e9}","\\varTheta"),F(z,Q,"\u{1d6ec}","\\varLambda"),F(z,Q,"\u{1d6ef}","\\varXi"),F(z,Q,"\u{1d6f1}","\\varPi"),F(z,Q,"\u{1d6f4}","\\varSigma"),F(z,Q,"\u{1d6f6}","\\varUpsilon"),F(z,Q,"\u{1d6f7}","\\varPhi"),F(z,Q,"\u{1d6f9}","\\varPsi"),F(z,Q,"\u{1d6fa}","\\varOmega");const te='0123456789/@."';for(let e=0;e<14;e++){const t=te.charAt(e);F(j,Q,t,t)}const re='0123456789!@*()-=+";:?/.,';for(let e=0;e<25;e++){const t=re.charAt(e);F(z,Q,t,t)}const ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<52;e++){const t=ne.charAt(e);F(j,V,t,t),F(z,Q,t,t)}const oe="\xc7\xd0\xde\xe7\xfe\u2102\u210d\u2115\u2119\u211a\u211d\u2124\u210e\u210f\u210a\u210b\u210c\u2110\u2111\u2112\u2113\u2118\u211b\u211c\u212c\u2130\u2131\u2133\u212d\u2128";for(let e=0;e<30;e++){const t=oe.charAt(e);F(j,V,t,t),F(z,Q,t,t)}let ae="";for(let e=0;e<52;e++){ae=String.fromCharCode(55349,56320+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,56372+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,56424+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,56580+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,56736+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,56788+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,56840+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,56944+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,56632+e),F(j,V,ae,ae),F(z,Q,ae,ae);const t=ne.charAt(e);ae=String.fromCharCode(55349,56476+e),F(j,V,t,ae),F(z,Q,t,ae)}for(let e=0;e<10;e++)ae=String.fromCharCode(55349,57294+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,57314+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,57324+e),F(j,V,ae,ae),F(z,Q,ae,ae),ae=String.fromCharCode(55349,57334+e),F(j,V,ae,ae),F(z,Q,ae,ae);const ie=function(e,t,r){return!P[t][e]||!P[t][e].replace||55349===e.charCodeAt(0)||Object.prototype.hasOwnProperty.call(ee,e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=P[t][e].replace),new N(e)},se=(e,t)=>{if(0===e.children.length||"mtext"!==e.children[e.children.length-1].type){const r=new k("mtext",[new N(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 k("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="\xa0"+n.children[0].text.slice(1));const o=n.children[0].text.length;o>0&&" "===n.children[0].text.charAt(o-1)&&(n.children[0].text=n.children[0].text.slice(0,-1)+"\xa0");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 y))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 k("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 N&&"."===t.text}if("mtext"===e.type&&1===e.children.length){const t=e.children[0];return t instanceof N&&"\u2008"===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 N&&","===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},he=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=[],o=[];let a;for(let r=0;r<e.length;r++)o.push(fe(e[r],t));for(let t=0;t<o.length;t++){const r=o[t];if(t<e.length-1&&he(e[t])&&he(e[t+1])&&r.setAttribute("rspace","0em"),t>0&&he(e[t])&&he(e[t-1])&&r.setAttribute("lspace","0em"),"mn"===r.type&&a&&"mn"===a.type)a.children.push(...r.children);else if(ue(r)&&a&&"mn"===a.type)a.children.push(...r.children);else if(a&&"mn"===a.type&&t<o.length-1&&"mn"===o[t+1].type&&de(e,t))a.children.push(...r.children);else{if("mn"===r.type&&ue(a))r.children=[...a.children,...r.children],n.pop();else if(("msup"===r.type||"msub"===r.type)&&r.children.length>=1&&a&&("mn"===a.type||ue(a))){const e=r.children[0];e instanceof k&&"mn"===e.type&&a&&(e.children=[...a.children,...e.children],n.pop())}n.push(r),a=r}}return n},pe=function(e,t,r=!1){return ce(me(e,t,r),r)},fe=function(e,r){if(!e)return new k("mrow");if(p[e.type]){return p[e.type](e,r)}throw new t("Got group of unknown type: '"+e.type+"'")},ge=e=>new k("mtd",[],[],{padding:"0",width:"50%"}),be=["mrow","mtd","mtable","mtr"],xe=e=>{for(const t of e.children)if(t.type&&be.includes(t.type)){if(t.classes&&"tml-label"===t.classes[0]){return t.label}{const e=xe(t);if(e)return e}}else if(!t.type){const e=xe(t);if(e)return e}};function ye(e,t,r,n){let o=null;1===e.length&&"tag"===e[0].type&&(o=e[0].tag,e=e[0].body);const a=me(e,r);if(1===a.length&&a[0]instanceof _)return a[0];const i=n.displayMode||n.annotate?"none":n.wrap,s=0===a.length?null:a[0];let l=1===a.length&&null===o&&s instanceof k?a[0]:function(e,t,r){const n=[];let o=[],a=[],i=0,s=0,l=0;for(;s<e.length;){for(;e[s]instanceof y;)e.splice(s,1,...e[s].children);const r=e[s];if(r.attributes&&r.attributes.linebreak&&"newline"===r.attributes.linebreak){a.length>0&&o.push(new k("mrow",a)),o.push(r),a=[];const e=new k("mtd",o);e.style.textAlign="left",n.push(new k("mtr",[e])),o=[],s+=1}else{if(a.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("([{\u230a\u2308\u27e8\u27ee\u23b0\u27e6\u2983".indexOf(n)>-1)l+=1;else if(")]}\u230b\u2309\u27e9\u27ef\u23b1\u27e6\u2984".indexOf(n)>-1)l-=1;else if(0===l&&"="===t&&"="===n){if(i+=1,i>1){a.pop();const e=new k("mrow",a);o.push(e),a=[r]}}else if(0===l&&"tex"===t&&"\u2207"!==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;a.push(n),s+=1,n.attributes&&n.attributes.linebreak&&"nobreak"===n.attributes.linebreak&&(r=!1)}if(r){const e=new k("mrow",a);o.push(e),a=[]}}}s+=1}}if(a.length>0){const e=new k("mrow",a);o.push(e)}if(n.length>0){const e=new k("mtd",o);e.style.textAlign="left";const t=new k("mtr",[e]);n.push(t);const a=new k("mtable",n);return r||(a.setAttribute("columnalign","left"),a.setAttribute("rowspacing","0em")),a}return q(o)}(a,i,n.displayMode);if(o&&(l=((e,t,r,n)=>{t=pe(t[0].body,r),(t=le(t)).classes.push("tml-tag");const o=xe(e);e=new k("mtd",[e]);const a=[ge(),e,ge()];a[n?0:2].children.push(t);const i=new k("mtr",a,["tml-tageqn"]);o&&i.setAttribute("id",o);const s=new k("mtable",[i]);return s.style.width="100%",s.setAttribute("displaystyle","true"),s})(l,o,r,n.leqno)),n.annotate){const e=new k("annotation",[new N(t)]);e.setAttribute("encoding","application/x-tex"),l=new k("semantics",[l,e])}const c=new k("math",[l]);return n.xml&&c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n.displayMode&&(c.setAttribute("display","block"),c.style.display="block math",c.classes=["tml-display"]),c}const ve=(e,t)=>{const r=e.isStretchy?$(e):new k("mo",[ie(e.label,e.mode)]);e.isStretchy||r.setAttribute("stretchy","false"),"\\vec"!==e.label&&(r.style.mathDepth="0");const n="\\c"===e.label?"munder":"mover",o=Ae.has(e.label);if("mover"===n&&"math"===e.mode&&!e.isStretchy&&e.base.text&&1===e.base.text.length){const t=e.base.text,n="\\vec"===e.label,a="\\vec"===n?"-vec":"";n&&r.classes.push("tml-vec");const i=n?"-vec":o?"-acc":"";"DHKLUcegorsuvxyz\u03a0\u03a5\u03a8\u03b1\u03b4\u03b7\u03b9\u03bc\u03bd\u03bf\u03c4\u03c5\u03c7\u03f5".indexOf(t)>-1?(r.classes.push(`chr-sml${a}`),r.classes.push(`wbk-sml${i}`)):"BCEGIMNOPQRSTXZlpqtw\u0393\u0398\u039e\u03a3\u03a6\u03a9\u03b2\u03b5\u03b6\u03b8\u03be\u03c1\u03c2\u03c6\u03c8\u03d1\u03d5\u03f1".indexOf(t)>-1?(r.classes.push(`chr-med${a}`),r.classes.push(`wbk-med${i}`)):"AFJdf\u0394\u039b".indexOf(t)>-1?(r.classes.push(`chr-lrg${a}`),r.classes.push(`wbk-lrg${i}`)):n?r.classes.push("wbk-vec"):o&&r.classes.push("wbk-acc")}else o&&r.classes.push("wbk-acc");return new k(n,[fe(e.base,t),r])},we=new Set(["\\acute","\\check","\\grave","\\ddot","\\dddot","\\ddddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"]),Ae=new Set(["\\acute","\\bar","\\breve","\\check","\\dot","\\ddot","\\grave","\\hat","\\mathring","\\`","\\'","\\^","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v"]),Ce={"\\`":"\u0300","\\'":"\u0301","\\^":"\u0302","\\~":"\u0303","\\=":"\u0304","\\u":"\u0306","\\.":"\u0307",'\\"':"\u0308","\\r":"\u030a","\\H":"\u030b","\\v":"\u030c","\\c":"\u0327"};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=b(t[0]),n=!we.has(e.funcName);return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,base:r}},mathmlBuilder:ve}),f({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\c","\\u","\\.",'\\"',"\\r","\\H","\\v"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{const r=b(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&&d.indexOf(r.text)>-1?{type:"textord",mode:"text",text:r.text+Ce[e.funcName]}:"\\c"===e.funcName&&"text"===n&&r.text&&1===r.text.length?{type:"textord",mode:"text",text:r.text+"\u0327"}:{type:"accent",mode:n,label:e.funcName,isStretchy:!1,base:r}},mathmlBuilder:ve}),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=$(e);r.style["math-depth"]=0;return new k("munder",[fe(e.base,t),r])}});const Ee={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},Se=["em","ex","mu","pt","mm","cm","in","px","bp","pc","dd","cc","nd","nc","sp"],_e=function(e){return"string"!=typeof e&&(e=e.unit),Se.indexOf(e)>-1},Te=e=>[1,.7,.5][Math.max(e-1,0)],qe=function(e,r){let n=e.number;if(r.maxSize[0]<0&&n>0)return{number:0,unit:"em"};const o=e.unit;switch(o){case"mm":case"cm":case"in":case"px":return n*Ee[o]>r.maxSize[1]?{number:r.maxSize[1],unit:"pt"}:{number:n,unit:o};case"em":case"ex":return"ex"===o&&(n*=.431),n=Math.min(n/Te(r.level),r.maxSize[0]),{number:u(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*Ee[o],r.maxSize[1]),{number:u(n),unit:"pt"};case"mu":return n=Math.min(n/18,r.maxSize[0]),{number:u(n),unit:"em"};default:throw new t("Invalid unit: '"+o+"'")}},ke=e=>{const t=new k("mspace");return t.setAttribute("width",e+"em"),t},Ne=(e,t=.3,r=0,n=!1)=>{if(null==e&&0===r)return ke(t);const o=e?[e]:[];if(0!==t&&o.unshift(ke(t)),r>0&&o.push(ke(r)),n){const e=new k("mpadded",o);return e.setAttribute("height","0.1px"),e}return new k("mrow",o)},Le=(e,t)=>Number(e)/Te(t),Oe=(e,t,r,n)=>{const o=D(e),a="eq"===e.slice(1,3),i="x"===e.charAt(1)?"1.75":"cd"===e.slice(2,4)?"3.0":a?"1.0":"2.0";o.setAttribute("lspace","0"),o.setAttribute("rspace",a?"0.5em":"0");const s=n.withLevel(n.level<2?2:3),l=Le(i,s.level),c=Le(i,3),u=Ne(null,l.toFixed(4),0),d=Ne(null,c.toFixed(4),0),h=Le(a?0:.3,s.level).toFixed(4);let m,p;const f=t&&t.body&&(t.body.body||t.body.length>0);if(f){let r=fe(t,s);r=Ne(r,h,h,"\\\\cdrightarrow"===e||"\\\\cdleftarrow"===e),m=new k("mover",[r,d])}const g=r&&r.body&&(r.body.body||r.body.length>0);if(g){let e=fe(r,s);e=Ne(e,h,h),p=new k("munder",[e,d])}let b;return b=f||g?f&&g?new k("munderover",[o,p,m]):f?new k("mover",[o,m]):new k("munder",[o,p]):new k("mover",[o,u]),"3.0"===i&&(b.style.height="1em"),b.setAttribute("accent","false"),b};f({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xleftrightharpoons","\\xrightleftharpoons","\\yields","\\yieldsLeft","\\mesomerism","\\longrightharpoonup","\\longleftharpoondown","\\yieldsLeftRight","\\chemequilibrium","\\\\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=[Oe(e.name,e.body,e.below,t)];return r.unshift(ke(.2778)),r.push(ke(.2778)),new k("mrow",r)}});const Me={"\\equilibriumRight":["\\longrightharpoonup","\\eqleftharpoondown"],"\\equilibriumLeft":["\\eqrightharpoonup","\\longleftharpoondown"]};f({type:"stackedArrow",names:["\\equilibriumRight","\\equilibriumLeft"],props:{numArgs:1,numOptionalArgs:1},handler({parser:e,funcName:t},r,n){const o=r[0]?{type:"hphantom",mode:e.mode,body:r[0]}:null,a=n[0]?{type:"hphantom",mode:e.mode,body:n[0]}:null;return{type:"stackedArrow",mode:e.mode,name:t,body:r[0],upperArrowBelow:a,lowerArrowBody:o,below:n[0]}},mathmlBuilder(e,t){const r=Me[e.name][0],n=Me[e.name][1],o=Oe(r,e.body,e.upperArrowBelow,t),a=Oe(n,e.lowerArrowBody,e.below,t);let i;const s=new k("mpadded",[o]);if(s.setAttribute("voffset","0.3em"),s.setAttribute("height","+0.3em"),s.setAttribute("depth","-0.3em"),"\\equilibriumLeft"===e.name){const e=new k("mpadded",[a]);e.setAttribute("width","0.5em"),i=new k("mpadded",[ke(.2778),e,s,ke(.2778)])}else s.setAttribute("width","\\equilibriumRight"===e.name?"0.5em":"0"),i=new k("mpadded",[ke(.2778),s,a,ke(.2778)]);return i.setAttribute("voffset","-0.18em"),i.setAttribute("height","-0.18em"),i.setAttribute("depth","+0.18em"),i}});const De={};function Be({type:e,names:t,props:r,handler:n,mathmlBuilder:o}){const a={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n};for(let e=0;e<t.length;++e)De[t[e]]=a;o&&(p[e]=o)}function $e(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 Ie(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(R,e.type))?e:null}const Pe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Fe=e=>"textord"===e.type&&"@"===e.text;function je(e,t,r){const n=Pe[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"},o={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",[o],[])}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 k("mrow",t);const r=fe(e.label,t);"left"===e.side&&r.classes.push("tml-shift-left");const n=new k("mtd",[r]);n.style.padding="0";const o=new k("mtr",[n]),a=new k("mtable",[o]),i=new k("mpadded",[a]);return i.setAttribute("width","0.1px"),i.setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),f({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:({parser:e},t)=>({type:"cdlabelparent",mode:e.mode,fragment:t[0]}),mathmlBuilder:(e,t)=>new k("mrow",[fe(e.fragment,t)])});const ze=e=>({type:"ordgroup",mode:"math",body:e,semisimple:!0}),He=(e,t)=>({type:t,mode:"math",body:ze(e)});class Ue{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 Ue(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Ge{constructor(e,t){this.text=e,this.loc=t}range(e,t){return new Ge(t,Ue.range(this,e))}}const We=0,Ve=1,Xe=2,Je=3,Ze={};function Ye(e,t){Ze[e]=t}const Ke=Ze;Ye("\\noexpand",(function(e){const t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Ye("\\expandafter",(function(e){const t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Ye("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Ye("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Ye("\\@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}})),Ye("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Ye("\\TextOrMath",(function(e){const t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));const Qe=e=>{let t="";for(let r=e.length-1;r>-1;r--)t+=e[r].text;return t},et={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},tt=e=>{const t=e.future().text;return"EOF"===t?[null,""]:[et[t.charAt(0)],t]},rt=(e,t,r)=>{for(let n=1;n<t.length;n++){e*=r,e+=et[t.charAt(n)]}return e};function nt(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 o=t[e].loc.start;o>n&&(r+=" ",n=o),r+=t[e].text,n+=t[e].text.length}return r}Ye("\\char",(function(e){let r,n=e.popToken(),o="";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])o=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new t("\\char` missing argument");o=n.text.charCodeAt(0)}else r=10;if(r){let a,i=n.text;if(o=et[i.charAt(0)],null==o||o>=r)throw new t(`Invalid base-${r} digit ${n.text}`);for(o=rt(o,i,r),[a,i]=tt(e);null!=a&&a<r;)o*=r,o+=a,o=rt(o,i,r),e.popToken(),[a,i]=tt(e)}return`\\@char{${o}}`})),Ye("\\surd","\\sqrt{\\vphantom{|}}"),Ye("\u2295","\\oplus"),Ye("\\long",""),Ye("\\bgroup","{"),Ye("\\egroup","}"),Ye("~","\\nobreakspace"),Ye("\\lq","`"),Ye("\\rq","'"),Ye("\\aa","\\r a"),Ye("\\Bbbk","\\Bbb{k}"),Ye("\\mathstrut","\\vphantom{(}"),Ye("\\underbar","\\underline{\\text{#1}}"),Ye("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Ye("\u22ee","\\vdots"),Ye("\\arraystretch","1"),Ye("\\arraycolsep","6pt"),Ye("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Ye("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Ye("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Ye("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");const ot={",":"\\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","\\DOTSX":"\\dotsx"};Ye("\\dots",(function(e){let t="\\dotso";const r=e.expandAfterFuture().text;return r in ot?t=ot[r]:("\\not"===r.slice(0,4)||r in P.math&&["bin","rel"].includes(P.math[r].group))&&(t="\\dotsb"),t}));const at={")":!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};Ye("\\dotso",(function(e){return e.future().text in at?"\\ldots\\,":"\\ldots"})),Ye("\\dotsc",(function(e){const t=e.future().text;return t in at&&","!==t?"\\ldots\\,":"\\ldots"})),Ye("\\cdots",(function(e){return e.future().text in at?"\\@cdots\\,":"\\@cdots"})),Ye("\\dotsb","\\cdots"),Ye("\\dotsm","\\cdots"),Ye("\\dotsi","\\!\\cdots"),Ye("\\idotsint","\\int\\!\\cdots\\!\\int"),Ye("\\dotsx","\\ldots\\,"),Ye("\\DOTSI","\\relax"),Ye("\\DOTSB","\\relax"),Ye("\\DOTSX","\\relax"),Ye("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Ye("\\,","{\\tmspace+{3mu}{.1667em}}"),Ye("\\thinspace","\\,"),Ye("\\>","\\mskip{4mu}"),Ye("\\:","{\\tmspace+{4mu}{.2222em}}"),Ye("\\medspace","\\:"),Ye("\\;","{\\tmspace+{5mu}{.2777em}}"),Ye("\\thickspace","\\;"),Ye("\\!","{\\tmspace-{3mu}{.1667em}}"),Ye("\\negthinspace","\\!"),Ye("\\negmedspace","{\\tmspace-{4mu}{.2222em}}"),Ye("\\negthickspace","{\\tmspace-{5mu}{.277em}}"),Ye("\\enspace","\\kern.5em "),Ye("\\enskip","\\hskip.5em\\relax"),Ye("\\quad","\\hskip1em\\relax"),Ye("\\qquad","\\hskip2em\\relax"),Ye("\\AA","\\TextOrMath{\\Angstrom}{\\mathring{A}}\\relax"),Ye("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Ye("\\tag@paren","\\tag@literal{({#1})}"),Ye("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new t("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Ye("\\notag","\\nonumber"),Ye("\\nonumber","\\gdef\\@eqnsw{0}"),Ye("\\bmod","\\mathbin{\\text{mod}}"),Ye("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Ye("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Ye("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Ye("\\newline","\\\\\\relax"),Ye("\\TeX","\\textrm{T}\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125em\\textrm{X}"),Ye("\\LaTeX","\\textrm{L}\\kern-.35em\\raisebox{0.2em}{\\scriptstyle A}\\kern-.15em\\TeX"),Ye("\\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}}"),Ye("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Ye("\\@hspace","\\hskip #1\\relax"),Ye("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Ye("\\colon",'\\mathpunct{\\char"3a}'),Ye("\\prescript","\\pres@cript{_{#1}^{#2}}{}{#3}"),Ye("\\ordinarycolon",'\\char"3a'),Ye("\\vcentcolon","\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}}"),Ye("\\coloneq",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"2212}'),Ye("\\Coloneq",'\\mathrel{\\char"2237\\char"2212}'),Ye("\\Eqqcolon",'\\mathrel{\\char"3d\\char"2237}'),Ye("\\Eqcolon",'\\mathrel{\\char"2212\\char"2237}'),Ye("\\colonapprox",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"2248}'),Ye("\\Colonapprox",'\\mathrel{\\char"2237\\char"2248}'),Ye("\\colonsim",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"223c}'),Ye("\\Colonsim",'\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char"223c}'),Ye("\\ratio","\\vcentcolon"),Ye("\\coloncolon","\\dblcolon"),Ye("\\colonequals","\\coloneqq"),Ye("\\coloncolonequals","\\Coloneqq"),Ye("\\equalscolon","\\eqqcolon"),Ye("\\equalscoloncolon","\\Eqqcolon"),Ye("\\colonminus","\\coloneq"),Ye("\\coloncolonminus","\\Coloneq"),Ye("\\minuscolon","\\eqcolon"),Ye("\\minuscoloncolon","\\Eqcolon"),Ye("\\coloncolonapprox","\\Colonapprox"),Ye("\\coloncolonsim","\\Colonsim"),Ye("\\notni","\\mathrel{\\char`\u220c}"),Ye("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Ye("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Ye("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Ye("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Ye("\\varlimsup","\\DOTSB\\operatorname*{\\overline{\\text{lim}}}"),Ye("\\varliminf","\\DOTSB\\operatorname*{\\underline{\\text{lim}}}"),Ye("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{\\text{lim}}}"),Ye("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{\\text{lim}}}"),Ye("\\centerdot","{\\medspace\\rule{0.167em}{0.189em}\\medspace}"),Ye("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Ye("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Ye("\\plim","\\DOTSB\\operatorname*{plim}"),Ye("\\leftmodels","\\mathop{\\reflectbox{$\\models$}}"),Ye("\\bra","\\mathinner{\\langle{#1}|}"),Ye("\\ket","\\mathinner{|{#1}\\rangle}"),Ye("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Ye("\\Bra","\\left\\langle#1\\right|"),Ye("\\Ket","\\left|#1\\right\\rangle");const it=(e,t)=>{const r=`}\\,\\middle${"|"===t[0]?"\\vert":"\\Vert"}\\,{`;return e.slice(0,t.index)+r+e.slice(t.index+t[0].length)};Ye("\\Braket",(function(e){let t=nt(e);const r=/\|\||\||\\\|/g;let n;for(;null!==(n=r.exec(t));)t=it(t,n);return"\\left\\langle{"+t+"}\\right\\rangle"})),Ye("\\Set",(function(e){let t=nt(e);const r=/\|\||\||\\\|/.exec(t);return r&&(t=it(t,r)),"\\left\\{\\:{"+t+"}\\:\\right\\}"})),Ye("\\set",(function(e){return"\\{{"+nt(e).replace(/\|/,"}\\mid{")+"}\\}"})),Ye("\\angln","{\\angl n}"),Ye("\\odv","\\@ifstar\\odv@next\\odv@numerator"),Ye("\\odv@numerator","\\frac{\\mathrm{d}#1}{\\mathrm{d}#2}"),Ye("\\odv@next","\\frac{\\mathrm{d}}{\\mathrm{d}#2}#1"),Ye("\\pdv","\\@ifstar\\pdv@next\\pdv@numerator");const st=e=>{const t=e[0][0].text,r=Qe(e[1]).split(","),n=String(r.length),o="1"===n?"\\partial":`\\partial^${n}`;let a="";return r.map((e=>{a+="\\partial "+e.trim()+"\\,"})),[t,o,a.replace(/\\,$/,"")]};Ye("\\pdv@numerator",(function(e){const[t,r,n]=st(e.consumeArgs(2));return`\\frac{${r} ${t}}{${n}}`})),Ye("\\pdv@next",(function(e){const[t,r,n]=st(e.consumeArgs(2));return`\\frac{${r}}{${n}} ${t}`})),Ye("\\upalpha","\\up@greek{\\alpha}"),Ye("\\upbeta","\\up@greek{\\beta}"),Ye("\\upgamma","\\up@greek{\\gamma}"),Ye("\\updelta","\\up@greek{\\delta}"),Ye("\\upepsilon","\\up@greek{\\epsilon}"),Ye("\\upzeta","\\up@greek{\\zeta}"),Ye("\\upeta","\\up@greek{\\eta}"),Ye("\\uptheta","\\up@greek{\\theta}"),Ye("\\upiota","\\up@greek{\\iota}"),Ye("\\upkappa","\\up@greek{\\kappa}"),Ye("\\uplambda","\\up@greek{\\lambda}"),Ye("\\upmu","\\up@greek{\\mu}"),Ye("\\upnu","\\up@greek{\\nu}"),Ye("\\upxi","\\up@greek{\\xi}"),Ye("\\upomicron","\\up@greek{\\omicron}"),Ye("\\uppi","\\up@greek{\\pi}"),Ye("\\upalpha","\\up@greek{\\alpha}"),Ye("\\uprho","\\up@greek{\\rho}"),Ye("\\upsigma","\\up@greek{\\sigma}"),Ye("\\uptau","\\up@greek{\\tau}"),Ye("\\upupsilon","\\up@greek{\\upsilon}"),Ye("\\upphi","\\up@greek{\\phi}"),Ye("\\upchi","\\up@greek{\\chi}"),Ye("\\uppsi","\\up@greek{\\psi}"),Ye("\\upomega","\\up@greek{\\omega}"),Ye("\\invamp",'\\mathbin{\\char"214b}'),Ye("\\parr",'\\mathbin{\\char"214b}'),Ye("\\with",'\\mathbin{\\char"26}'),Ye("\\multimapinv",'\\mathrel{\\char"27dc}'),Ye("\\multimapboth",'\\mathrel{\\char"29df}'),Ye("\\scoh",'{\\mkern5mu\\char"2322\\mkern5mu}'),Ye("\\sincoh",'{\\mkern5mu\\char"2323\\mkern5mu}'),Ye("\\coh",'{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char"2322}}}\n{\\smash{\\lower4mu{\\char"2323}}}\\mkern5mu}'),Ye("\\incoh",'{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char"2323}}}\n{\\smash{\\lower4mu{\\char"2322}}}\\mkern5mu}'),Ye("\\standardstate","\\text{\\tiny\\char`\u29b5}"),Ye("\\ce",(function(e){return lt(e.consumeArgs(1)[0],"ce")})),Ye("\\pu",(function(e){return lt(e.consumeArgs(1)[0],"pu")})),Ye("\\uniDash","{\\rule{0.672em}{0.06em}}"),Ye("\\triDash","{\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}}"),Ye("\\tripleDash","\\kern0.075em\\raise0.25em{\\triDash}\\kern0.075em"),Ye("\\tripleDashOverLine","\\kern0.075em\\mathrlap{\\raise0.125em{\\uniDash}}\\raise0.34em{\\triDash}\\kern0.075em"),Ye("\\tripleDashOverDoubleLine","\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\triDash}}\\raise0.27em{\\uniDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em"),Ye("\\tripleDashBetweenDoubleLine","\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\uniDash}}\\raise0.27em{\\triDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em");var lt=function(e,t){for(var r="",n=e.length&&e[e.length-1].loc.start,o=e.length-1;o>=0;o--)e[o].loc.start>n&&(r+=" ",n=e[o].loc.start),r+=e[o].text,n+=e[o].text.length;return ut.go(ct.go(r,t))},ct={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var r,n="0",o={};o.parenthesisLevel=0,e=(e=(e=e.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var a=10,i=[];;){r!==e?(a=10,r=e):a--;var s=ct.stateMachines[t],l=s.transitions[n]||s.transitions["*"];e:for(var c=0;c<l.length;c++){var u=ct.patterns.match_(l[c].pattern,e);if(u){for(var d=l[c].task,h=0;h<d.action_.length;h++){var m;if(s.actions[d.action_[h].type_])m=s.actions[d.action_[h].type_](o,u.match_,d.action_[h].option);else{if(!ct.actions[d.action_[h].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[h].type_+")"];m=ct.actions[d.action_[h].type_](o,u.match_,d.action_[h].option)}ct.concatArray(i,m)}if(n=d.nextState||n,!(e.length>0))return i;if(d.revisit||(e=u.remainder),!d.toContinue)break e}}if(a<=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=ct.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 ct.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return ct.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return ct.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return ct.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return ct.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return ct.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return ct.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return ct.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return ct.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return ct.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return ct.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return ct.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return ct.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 ct.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return ct.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return ct.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return ct.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 ct.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return ct.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return ct.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return ct.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return ct.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return ct.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return ct.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return ct.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=ct.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,o,a,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 h=function(e,t,r){for(var n=0;t<e.length;){var o=e.charAt(t),a=u(e.substr(t),r);if(null!==a&&0===n)return{endMatchBegin:t,endMatchEnd:t+a.length};if("{"===o)n++;else if("}"===o){if(0===n)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];n--}t++}return null}(e,d.length,n||o);if(null===h)return null;var m=e.substring(0,n?h.endMatchEnd:h.endMatchBegin);if(a||i){var p=this.findObserveGroups(e.substr(h.endMatchEnd),a,i,s,l);if(null===p)return null;var f=[m,p.match_];return{match_:c?f.join(""):f,remainder:p.remainder}}return{match_:m,remainder:e.substr(h.endMatchEnd)}},match_:function(e,t){var r=ct.patterns.patterns[e];if(void 0===r)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if("function"==typeof r)return ct.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 ct.go(t,"text")},"{text}":function(e,t){var r=["{"];return ct.concatArray(r,ct.go(t,"text")),r.push("}"),r},"tex-math":function(e,t){return ct.go(t,"tex-math")},"tex-math tight":function(e,t){return ct.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 ct.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 ct.go(t,"9,9")}},createTransitions:function(e){var t,r,n,o,a={};for(t in e)for(r in e[t])for(n=r.split("|"),e[t][r].stateArray=n,o=0;o<n.length;o++)a[n[o]]=[];for(t in e)for(r in e[t])for(n=e[t][r].stateArray||[],o=0;o<n.length;o++){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[o])for(var u in a)a[u].push({pattern:l[c],task:i});else a[n[o]].push({pattern:l[c],task:i})}return a},stateMachines:{}};ct.stateMachines={ce:{transitions:ct.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 ct.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 ct.concatArray(r,this.output(e)),ct.concatArray(r,ct.actions.bond(e,t,"-")),r}e.d=t},"- after o/d":function(e,t,r){var n=ct.patterns.match_("orbital",e.o||""),o=ct.patterns.match_("one lowercase greek letter $",e.o||""),a=ct.patterns.match_("one lowercase latin letter $",e.o||""),i=ct.patterns.match_("$one lowercase latin letter$ $",e.o||""),s="-"===t&&(n&&""===n.remainder||o||a||i);!s||e.a||e.b||e.p||e.d||e.q||n||!a||(e.o="$"+e.o+"$");var l=[];return s?(ct.concatArray(l,this.output(e)),l.push({type_:"hyphen"})):(n=ct.patterns.match_("digits",e.d||""),r&&n&&""===n.remainder?(ct.concatArray(l,ct.actions["d="](e,t)),ct.concatArray(l,this.output(e))):(ct.concatArray(l,this.output(e)),ct.concatArray(l,ct.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:ct.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,o,a;e.r?(o="M"===e.rdt?ct.go(e.rd,"tex-math"):"T"===e.rdt?[{type_:"text",p1:e.rd||""}]:ct.go(e.rd),a="M"===e.rqt?ct.go(e.rq,"tex-math"):"T"===e.rqt?[{type_:"text",p1:e.rq||""}]:ct.go(e.rq),n={type_:"arrow",r:e.r,rd:o,rq:a}):(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&&ct.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:ct.go(e.a,"a"),b:ct.go(e.b,"bd"),p:ct.go(e.p,"pq"),o:ct.go(e.o,"o"),q:ct.go(e.q,"pq"),d:ct.go(e.d,"oxidation"===e.dType?"oxidation":"bd"),dType:e.dType})));for(var i in e)"parenthesisLevel"!==i&&"beginsWithBond"!==i&&delete e[i];return n},"oxidation-output":function(e,t){var r=["{"];return ct.concatArray(r,ct.go(t,"oxidation")),r.push("}"),r},"frac-output":function(e,t){return{type_:"frac-ce",p1:ct.go(t[0]),p2:ct.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:ct.go(t[0]),p2:ct.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:ct.go(t[0]),p2:ct.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:ct.go(t[0]),p2:ct.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:ct.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:ct.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:ct.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:ct.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:ct.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:ct.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:ct.go(t[1],"pq")}}}},bd:{transitions:ct.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:ct.go(t[1],"bd")}}}},oxidation:{transitions:ct.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:ct.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:ct.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:ct.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:ct.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]&&(ct.concatArray(r,ct.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?ct.concatArray(r,ct.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]),ct.concatArray(r,ct.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=ct.patterns.match_("{(...)}",e.d||"");r&&""===r.remainder&&(e.d=r.match_);var n=ct.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 o={d:ct.go(e.d,"pu"),q:ct.go(e.q,"pu")};"//"===e.o?t={type_:"pu-frac",p1:o.d,p2:o.q}:(t=o.d,o.d.length>1||o.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),ct.concatArray(t,o.q))}else t=ct.go(e.d,"pu-2");for(var a in e)delete e[a];return t}}},"pu-2":{transitions:ct.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=ct.patterns.match_("{(...)}",e.rm||"");t=r&&""===r.remainder?ct.go(r.match_,"pu"):{type_:"rm",p1:e.rm}}for(var n in e)delete e[n];return t}}},"pu-9,9":{transitions:ct.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 o in e)delete e[o];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 o in e)delete e[o];return t}}}};var ut={go:function(e,t){if(!e)return"";for(var r="",n=!1,o=0;o<e.length;o++){var a=e[o];"string"==typeof a?r+=a:(r+=ut._go2(a),"1st-level escape"===a.type_&&(n=!0))}return t||n||!r||(r="{"+r+"}"),r},_goInner:function(e){return e?ut.go(e,!0):e},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var r={a:ut._goInner(e.a),b:ut._goInner(e.b),p:ut._goInner(e.p),o:ut._goInner(e.o),q:ut._goInner(e.q),d:ut._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 "+ut._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+ut._goInner(e.p1);break;case"bond":if(!(t=ut._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 o="\\frac{"+ut._goInner(e.p1)+"}{"+ut._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"tex-math":case"1st-level escape":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+ut._goInner(e.p1)+"}{"+ut._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+ut._goInner(e.p1)+"}{"+ut._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+ut._goInner(e.p1)+"}{"+ut._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+ut._goInner(e.p1)+"}_{"+ut._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+ut._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var a={rd:ut._goInner(e.rd),rq:ut._goInner(e.rq)},i=ut._getArrow(e.r);a.rq&&(i+="[{\\rm "+a.rq+"}]"),t=i+=a.rd?"{\\rm "+a.rd+"}":"{}";break;case"operator":t=ut._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"\u2192":case"\u27f6":return"\\yields";case"<-":return"\\yieldsLeft";case"<->":return"\\mesomerism";case"<--\x3e":return"\\yieldsLeftRight";case"<=>":case"\u21cc":return"\\chemequilibrium";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 dt(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}Ye("\\darr","\\downarrow"),Ye("\\dArr","\\Downarrow"),Ye("\\Darr","\\Downarrow"),Ye("\\lang","\\langle"),Ye("\\rang","\\rangle"),Ye("\\uarr","\\uparrow"),Ye("\\uArr","\\Uparrow"),Ye("\\Uarr","\\Uparrow"),Ye("\\N","\\mathbb{N}"),Ye("\\R","\\mathbb{R}"),Ye("\\Z","\\mathbb{Z}"),Ye("\\alef","\\aleph"),Ye("\\alefsym","\\aleph"),Ye("\\bull","\\bullet"),Ye("\\clubs","\\clubsuit"),Ye("\\cnums","\\mathbb{C}"),Ye("\\Complex","\\mathbb{C}"),Ye("\\Dagger","\\ddagger"),Ye("\\diamonds","\\diamondsuit"),Ye("\\empty","\\emptyset"),Ye("\\exist","\\exists"),Ye("\\harr","\\leftrightarrow"),Ye("\\hArr","\\Leftrightarrow"),Ye("\\Harr","\\Leftrightarrow"),Ye("\\hearts","\\heartsuit"),Ye("\\image","\\Im"),Ye("\\infin","\\infty"),Ye("\\isin","\\in"),Ye("\\larr","\\leftarrow"),Ye("\\lArr","\\Leftarrow"),Ye("\\Larr","\\Leftarrow"),Ye("\\lrarr","\\leftrightarrow"),Ye("\\lrArr","\\Leftrightarrow"),Ye("\\Lrarr","\\Leftrightarrow"),Ye("\\natnums","\\mathbb{N}"),Ye("\\plusmn","\\pm"),Ye("\\rarr","\\rightarrow"),Ye("\\rArr","\\Rightarrow"),Ye("\\Rarr","\\Rightarrow"),Ye("\\real","\\Re"),Ye("\\reals","\\mathbb{R}"),Ye("\\Reals","\\mathbb{R}"),Ye("\\sdot","\\cdot"),Ye("\\sect","\\S"),Ye("\\spades","\\spadesuit"),Ye("\\sub","\\subset"),Ye("\\sube","\\subseteq"),Ye("\\supe","\\supseteq"),Ye("\\thetasym","\\vartheta"),Ye("\\weierp","\\wp"),Ye("\\quantity","{\\left\\{ #1 \\right\\}}"),Ye("\\qty","{\\left\\{ #1 \\right\\}}"),Ye("\\pqty","{\\left( #1 \\right)}"),Ye("\\bqty","{\\left[ #1 \\right]}"),Ye("\\vqty","{\\left\\vert #1 \\right\\vert}"),Ye("\\Bqty","{\\left\\{ #1 \\right\\}}"),Ye("\\absolutevalue","{\\left\\vert #1 \\right\\vert}"),Ye("\\abs","{\\left\\vert #1 \\right\\vert}"),Ye("\\norm","{\\left\\Vert #1 \\right\\Vert}"),Ye("\\evaluated","{\\left.#1 \\right\\vert}"),Ye("\\eval","{\\left.#1 \\right\\vert}"),Ye("\\order","{\\mathcal{O} \\left( #1 \\right)}"),Ye("\\commutator","{\\left[ #1 , #2 \\right]}"),Ye("\\comm","{\\left[ #1 , #2 \\right]}"),Ye("\\anticommutator","{\\left\\{ #1 , #2 \\right\\}}"),Ye("\\acomm","{\\left\\{ #1 , #2 \\right\\}}"),Ye("\\poissonbracket","{\\left\\{ #1 , #2 \\right\\}}"),Ye("\\pb","{\\left\\{ #1 , #2 \\right\\}}"),Ye("\\vectorbold","{\\boldsymbol{ #1 }}"),Ye("\\vb","{\\boldsymbol{ #1 }}"),Ye("\\vectorarrow","{\\vec{\\boldsymbol{ #1 }}}"),Ye("\\va","{\\vec{\\boldsymbol{ #1 }}}"),Ye("\\vectorunit","{{\\boldsymbol{\\hat{ #1 }}}}"),Ye("\\vu","{{\\boldsymbol{\\hat{ #1 }}}}"),Ye("\\dotproduct","\\mathbin{\\boldsymbol\\cdot}"),Ye("\\vdot","{\\boldsymbol\\cdot}"),Ye("\\crossproduct","\\mathbin{\\boldsymbol\\times}"),Ye("\\cross","\\mathbin{\\boldsymbol\\times}"),Ye("\\cp","\\mathbin{\\boldsymbol\\times}"),Ye("\\gradient","{\\boldsymbol\\nabla}"),Ye("\\grad","{\\boldsymbol\\nabla}"),Ye("\\divergence","{\\grad\\vdot}"),Ye("\\curl","{\\grad\\cross}"),Ye("\\laplacian","\\nabla^2"),Ye("\\tr","{\\operatorname{tr}}"),Ye("\\Tr","{\\operatorname{Tr}}"),Ye("\\rank","{\\operatorname{rank}}"),Ye("\\erf","{\\operatorname{erf}}"),Ye("\\Res","{\\operatorname{Res}}"),Ye("\\principalvalue","{\\mathcal{P}}"),Ye("\\pv","{\\mathcal{P}}"),Ye("\\PV","{\\operatorname{P.V.}}"),Ye("\\qqtext","{\\quad\\text{ #1 }\\quad}"),Ye("\\qq","{\\quad\\text{ #1 }\\quad}"),Ye("\\qcomma","{\\text{,}\\quad}"),Ye("\\qc","{\\text{,}\\quad}"),Ye("\\qcc","{\\quad\\text{c.c.}\\quad}"),Ye("\\qif","{\\quad\\text{if}\\quad}"),Ye("\\qthen","{\\quad\\text{then}\\quad}"),Ye("\\qelse","{\\quad\\text{else}\\quad}"),Ye("\\qotherwise","{\\quad\\text{otherwise}\\quad}"),Ye("\\qunless","{\\quad\\text{unless}\\quad}"),Ye("\\qgiven","{\\quad\\text{given}\\quad}"),Ye("\\qusing","{\\quad\\text{using}\\quad}"),Ye("\\qassume","{\\quad\\text{assume}\\quad}"),Ye("\\qsince","{\\quad\\text{since}\\quad}"),Ye("\\qlet","{\\quad\\text{let}\\quad}"),Ye("\\qfor","{\\quad\\text{for}\\quad}"),Ye("\\qall","{\\quad\\text{all}\\quad}"),Ye("\\qeven","{\\quad\\text{even}\\quad}"),Ye("\\qodd","{\\quad\\text{odd}\\quad}"),Ye("\\qinteger","{\\quad\\text{integer}\\quad}"),Ye("\\qand","{\\quad\\text{and}\\quad}"),Ye("\\qor","{\\quad\\text{or}\\quad}"),Ye("\\qas","{\\quad\\text{as}\\quad}"),Ye("\\qin","{\\quad\\text{in}\\quad}"),Ye("\\differential","{\\text{d}}"),Ye("\\dd","{\\text{d}}"),Ye("\\derivative","{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}"),Ye("\\dv","{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}"),Ye("\\partialderivative","{\\frac{\\partial{ #1 }}{\\partial{ #2 }}}"),Ye("\\variation","{\\delta}"),Ye("\\var","{\\delta}"),Ye("\\functionalderivative","{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}"),Ye("\\fdv","{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}"),Ye("\\innerproduct","{\\left\\langle {#1} \\mid { #2} \\right\\rangle}"),Ye("\\outerproduct","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"),Ye("\\dyad","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"),Ye("\\ketbra","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"),Ye("\\op","{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}"),Ye("\\expectationvalue","{\\left\\langle {#1 } \\right\\rangle}"),Ye("\\expval","{\\left\\langle {#1 } \\right\\rangle}"),Ye("\\ev","{\\left\\langle {#1 } \\right\\rangle}"),Ye("\\matrixelement","{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}"),Ye("\\matrixel","{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}"),Ye("\\mel","{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}");const ht=e=>{if(!e.parser.settings.displayMode)throw new t(`{${e.envName}} can be used only in display mode.`)},mt=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/,pt=e=>{let t=e.get("\\arraystretch");"string"!=typeof t&&(t=Qe(t.tokens)),t=isNaN(t)?null:Number(t);let r=e.get("\\arraycolsep");"string"!=typeof r&&(r=Qe(r.tokens));const n=mt.exec(r);return[t,n?{number:+(n[1]+n[2]),unit:n[3]}:null]},ft=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 gt(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function bt(e,{cols:r,envClasses:n,autoTag:o,singleRow:a,emptySingleRow:i,maxNumCols:s,leqno:l,arraystretch:c,arraycolsep:u},d){const h=n&&n.includes("bordermatrix")?"}":"\\end";e.gullet.beginGroup(),a||e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();let m=[];const p=[m],f=[],g=[],b=[],x=null!=o?[]:void 0;function y(){o&&e.gullet.macros.set("\\@eqnsw","1",!0)}function v(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new Ge("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(o)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),b.push(dt(e));;){let r=e.parseExpression(!1,a?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),r={type:"ordgroup",mode:e.mode,body:r,semisimple:!0},m.push(r);const o=e.fetch().text;if("&"===o){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(o===h){v(),1===m.length&&0===r.body.length&&(p.length>1||!i)&&p.pop(),g.push(ft(r.body)),b.length<p.length+1&&b.push([]);break}if("\\\\"!==o)throw new t("Expected & or \\\\ or \\cr or "+h,e.nextToken);{let t;e.consume()," "!==e.gullet.future().text&&(t=e.parseSizeGroup(!0)),f.push(t?t.value:null),v(),g.push(ft(r.body)),b.push(dt(e)),m=[],p.push(m),y()}}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,body:p,cols:r,rowGaps:f,hLinesBeforeRow:b,envClasses:n,autoTag:o,scriptLevel:d,tags:x,labels:g,leqno:l,arraystretch:c,arraycolsep:u}}function xt(e){return"d"===e.slice(0,1)?"display":"text"}const yt={c:"center ",l:"left ",r:"right "},vt=e=>{const t=new k("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,o=e.hLinesBeforeRow,a=e.tags&&e.tags.some((e=>e));for(let i=0;i<n;i++){const s=e.body[i],l=[],c="text"===e.scriptLevel?Ve:"script"===e.scriptLevel?Xe:We;for(let r=0;r<s.length;r++){const o=new k("mtd",[fe(s[r],t.withLevel(c))]);if(e.envClasses.includes("multline")){const e=0===i?"left":i===n-1?"right":"center";"center"!==e&&o.classes.push("tml-"+e)}l.push(o)}const u=e.body[0].length;for(let e=0;e<u-s.length;e++)l.push(new k("mtd",[],[],t));if(a){const r=e.tags[i];let n;!0===r?n=new k("mtext",[new E(["tml-eqn"])]):!1===r?n=new k("mtext",[],[]):(n=pe(r[0].body,t.withLevel(c),!0),n=le(n),n.classes=["tml-tag"]),n&&(l.unshift(vt(e)),l.push(vt(e)),e.leqno?l[0].children.push(n):l[l.length-1].children.push(n))}const d=new k("mtr",l,[]),h=e.labels.shift();h&&e.tags&&e.tags[i]&&(d.setAttribute("id",h),Array.isArray(e.tags[i])&&d.classes.push("tml-tageqn")),0===i&&o[0].length>0&&(2===o[0].length?d.children.forEach((e=>{e.style.borderTop="0.15em double"})):d.children.forEach((e=>{e.style.borderTop=o[0][0]?"0.06em dashed":"0.06em solid"}))),o[i+1].length>0&&(2===o[i+1].length?d.children.forEach((e=>{e.style.borderBottom="0.15em double"})):d.children.forEach((e=>{e.style.borderBottom=o[i+1][0]?"0.06em dashed":"0.06em solid"})));let m=!0;for(let e=0;e<d.children.length;e++){const t=d.children[e].children[0];if(!t||"mpadded"!==t.type||"0px"!==t.attributes.height){m=!1;break}}if(m)for(let e=0;e<d.children.length;e++)d.children[e].style.display="block",d.children[e].style.height="0",d.children[e].style.paddingTop="0",d.children[e].style.paddingBottom="0";r.push(d)}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 i,s;if(e.envClasses.length>0&&(i=e.envClasses.includes("abut")||e.envClasses.includes("cases")?"0":e.envClasses.includes("small")?"0.1389":e.envClasses.includes("cd")?"0.25":"0.4",s="em"),e.arraycolsep){const r=qe(e.arraycolsep,t);i=r.number.toFixed(4),s=r.unit}if(i){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]?i:1===n?"0":a?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)}${s}`,r[e].children[t].style.paddingRight=`${n(t,1)}${s}`}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 o=r[n];if(t){for(let e=0;e<o.children.length;e++)o.children[e].classes=["tml-"+(e%2?"left":"right")];if(a){const t=e.leqno?0:o.children.length-1;o.children[t].classes=[]}}if(o.children.length>1&&e.envClasses.includes("cases")&&(o.children[1].style.paddingLeft="1em"),e.envClasses.includes("cases")||e.envClasses.includes("subarray"))for(const e of o.children)e.classes.push("tml-left")}}let l=new k("mtable",r);if(e.envClasses.length>0&&(e.envClasses.includes("jot")?l.classes.push("tml-jot"):e.envClasses.includes("small")&&l.classes.push("tml-small")),"display"===e.scriptLevel&&l.setAttribute("displaystyle","true"),(e.autoTag||e.envClasses.includes("multline"))&&(l.style.width="100%"),e.cols&&e.cols.length>0){const t=e.cols;let r=!1,n=0,o=t.length;for(;"separator"===t[n].type;)n+=1;for(;"separator"===t[o-1].type;)o-=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 l.children)t.children[0].style.borderLeft=e}let i=a?0:-1;for(let e=n;e<o;e++)if("align"===t[e].type){const n=yt[t[e].align];i+=1;for(const e of l.children)"center"!==n.trim()&&i<e.children.length&&(e.children[i].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 l.children)i<e.children.length&&(e.children[i].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 l.children)t.children[t.children.length-1].style.borderRight=e,t.children[t.children.length-1].style.paddingRight="0.4em"}}return e.envClasses.includes("small")&&(l=new k("mstyle",[l]),l.setAttribute("scriptlevel","1")),l},At=function(e,r){-1===e.envName.indexOf("ed")&&ht(e);const n="split"===e.envName,o=[],a=bt(e.parser,{cols:o,emptySingleRow:!0,autoTag:n?void 0:gt(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+=$e(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}a.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"),o[e]={type:"align",align:t}}return"split"===e.envName||(l?a.envClasses.push("alignat"):a.envClasses[0]="align"),a};Be({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,r){const n=(Re(r[0])?[r[0]]:$e(r[0],"ordgroup").body).map((function(e){const r=Ie(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)})),[o,a]=pt(e.parser.gullet.macros),i={cols:n,envClasses:["array"],maxNumCols:n.length,arraystretch:o,arraycolsep:a};return bt(e.parser,i,xt(e.envName))},mathmlBuilder:wt}),Be({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 o={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(),o.cols=[]}}const a=bt(e.parser,o,"text");a.cols=a.body.length>0?new Array(a.body[0].length).fill({type:"align",align:n}):[];const[i,s]=pt(e.parser.gullet.macros);return a.arraystretch=i,!s||6===s&&"pt"===s||(a.arraycolsep=s),r?{type:"leftright",mode:e.mode,body:[a],left:r[0],right:r[1],rightColor:void 0}:a},mathmlBuilder:wt}),Be({type:"array",names:["bordermatrix"],props:{numArgs:0},handler(e){const t=bt(e.parser,{cols:[],envClasses:["bordermatrix"]},"text");return t.cols=t.body.length>0?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(r[e][n]);n[e-1].push(He(t,"vphantom"))}const o=new Array(r.length).fill().map((()=>[]));for(let e=0;e<r[0].length;e++)o[0].push(r[0][e]);for(let e=1;e<r.length;e++)for(let t=0;t<r[0].length;t++)o[e].push(He(r[e][t].body,"hphantom"));for(let e=0;e<r[0].length;e++)r[0][e]=He(r[0][e].body,"hphantom");const a={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:o,cols:new Array(o.length).fill({type:"align",align:"c"}),rowGaps:new Array(o.length-1).fill(null),hLinesBeforeRow:new Array(o.length+1).fill().map((()=>[])),envClasses:[],scriptLevel:"text",arraystretch:1,labels:new Array(o.length).fill(""),arraycolsep:null}]},s={type:"leftright",mode:"math",body:[e],left:t?t[0]:"(",right:t?t[1]:")",rightColor:void 0};return ze([a,{type:"supsub",mode:"math",stack:!0,base:{type:"op",mode:"math",limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!0,symbol:!1,suppressBaseShift:!0,body:[s]},sup:i,sub:null}])})(t,e.delimiters)},mathmlBuilder:wt}),Be({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:e=>bt(e.parser,{envClasses:["small"]},"script"),mathmlBuilder:wt}),Be({type:"array",names:["subarray"],props:{numArgs:1},handler(e,r){const n=(Re(r[0])?[r[0]]:$e(r[0],"ordgroup").body).map((function(e){const r=Ie(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 o={cols:n,envClasses:["small"]};if(o=bt(e.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new t("{subarray} can contain only one column");return o},mathmlBuilder:wt}),Be({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){const t=bt(e.parser,{cols:[],envClasses:["cases"]},xt(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}),Be({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:At,mathmlBuilder:wt}),Be({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:At,mathmlBuilder:wt}),Be({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){"gathered"!==e.envName&&ht(e);const t={cols:[],envClasses:["abut","jot"],autoTag:gt(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return bt(e.parser,t,"display")},mathmlBuilder:wt}),Be({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ht(e);const t={autoTag:gt(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,envClasses:["align"],leqno:e.parser.settings.leqno};return bt(e.parser,t,"display")},mathmlBuilder:wt}),Be({type:"array",names:["multline","multline*"],props:{numArgs:0},handler(e){ht(e);const t={autoTag:"multline"===e.envName,maxNumCols:1,envClasses:["jot","multline"],leqno:e.parser.settings.leqno};return bt(e.parser,t,"display")},mathmlBuilder:wt}),Be({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(ht(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 o=[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(Fe(l[r])){n.push(c),r+=1;const o=Ie(l[r]).text,s=new Array(2);if(s[0]={type:"ordgroup",mode:"math",body:[]},s[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(o)>-1);else{if(!("<>AV".indexOf(o)>-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=o,("mathord"===(a=l[c]).type||"atom"===a.type)&&a.text===i){n=!1,r=c;break}if(Fe(l[c]))throw new t("Missing a "+o+" character to complete a CD arrow.",l[c]);s[e].body.push(l[c])}if(n)throw new t("Missing a "+o+" character to complete a CD arrow.",l[r])}}const u=je(o,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=[],o.push(n)}var a,i;return o.pop(),e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,tags:null,labels:new Array(o.length+1).fill(""),envClasses:["jot","cd"],cols:[],hLinesBeforeRow:new Array(o.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 Ct=De;f({type:"bordermatrix",names:["\\bordermatrix","\\matrix"],props:{numArgs:0,numOptionalArgs:1},handler:({parser:e,funcName:t},r,n)=>{let o=["(",")"];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&&(o=[e[0].text,e[1].text])}e.consumeSpaces(),e.consume();const a=Ct.bordermatrix,i={mode:e.mode,envName:t.slice(1),delimiters:o,parser:e},s=a.handler(i);return e.expect("}",!0),s}}),f({type:"cancelto",names:["\\cancelto"],props:{numArgs:2},handler({parser:e},t){const r=t[0],n=t[1];return{type:"cancelto",mode:e.mode,body:n,to:r,isCharacterBox:c(n)}},mathmlBuilder(e,t){const r=new k("mrow",[fe(e.body,t)],["ff-narrow"]),n=new k("mphantom",[fe(e.body,t)]),o=new k("mrow",[n],["tml-cancelto"]);e.isCharacterBox&&d.indexOf(e.body.body[0].text)>-1&&(o.style.left="0.1em",o.style.width="90%");const a=new k("mrow",[r,o],["menclose"]);if(!e.isCharacterBox||/[f\u222b\u2211]/.test(e.body.body[0].text))n.style.paddingRight="0.2em";else{n.style.padding="0.5ex 0.1em 0 0";const e=new k("mspace",[]);e.setAttribute("height","0.85em"),r.children.push(e)}let i;if(e.isCharacterBox)i=new k("mspace",[]),i.setAttribute("height","1em");else{const r=fe(e.body,t),n=new k("mpadded",[r]);n.setAttribute("width","0.1px"),i=new k("mphantom",[n])}const s=fe(e.to,t),l=new k("mpadded",[s]);if(!e.isCharacterBox||/[f\u222b\u2211]/.test(e.body.body[0].text)){const e=new k("mspace",[]);e.setAttribute("width","0.2em"),l.children.unshift(e)}l.setAttribute("width","0.1px");const c=new k("mover",[i,l]),u=new k("mrow",[],["ff-nudge-left"]);return q([ce([a,c]),u])}}),f({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler({parser:e,token:r},n){const o=$e(n[0],"ordgroup").body;let a="";for(let e=0;e<o.length;e++){a+=$e(o[e],"textord").text}const i=parseInt(a);if(isNaN(i))throw new t(`\\@char has non-numeric argument ${a}`,r);return{type:"textord",mode:e.mode,text:String.fromCodePoint(i)}}});const Et=/^(#[a-f0-9]{3}|#?[a-f0-9]{6})$/i,St=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i,_t=/^ *\d{1,3} *(?:, *\d{1,3} *){2}$/,Tt=/^ *[10](?:\.\d*)? *(?:, *[10](?:\.\d*)? *){2}$/,qt=/^[a-f0-9]{6}$/i,kt=e=>{let t=e.toString(16);return 1===t.length&&(t="0"+t),t},Nt=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}'),Lt=(e,r)=>{let n="";if("HTML"===e){if(!Et.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+=kt(Number(e.trim()))}))}else{if(!Tt.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+=kt(Number((255*r).toFixed(0)))}))}return"#"!==n.charAt(0)&&(n="#"+n),n},Ot=(e,r,n)=>{const o=`\\\\color@${e}`;if(!St.exec(e))throw new t("Invalid color: '"+e+"'",n);return qt.test(e)?"#"+e:("#"===e.charAt(0)||(r.has(o)?e=r.get(o).tokens[0].text:Nt[e]&&(e=Nt[e])),e)},Mt=(e,t)=>{let r=me(e.body,t.withColor(e.color));return 0===r.length&&r.push(new k("mrow")),r=r.map((t=>(t.style.color=e.color,t))),q(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 o=n[0]&&$e(n[0],"raw").string;let a="";if(o){const e=$e(r[0],"raw").string;a=Lt(o,e)}else a=Ot($e(r[0],"raw").string,e.gullet.macros,t);const i=r[1];return{type:"color",mode:e.mode,color:a,isTextColor:!0,body:x(i)}},mathmlBuilder:Mt}),f({type:"color",names:["\\color"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw"]},handler({parser:e,breakOnTokenText:t,token:r},n,o){const a=o[0]&&$e(o[0],"raw").string;let i="";if(a){const e=$e(n[0],"raw").string;i=Lt(a,e)}else i=Ot($e(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:Mt}),f({type:"color",names:["\\definecolor"],props:{numArgs:3,allowedInText:!0,argTypes:["raw","raw","raw"]},handler({parser:e,funcName:r,token:n},o){const a=$e(o[0],"raw").string;if(!/^[A-Za-z]+$/.test(a))throw new t("Color name must be latin letters.",n);const i=$e(o[1],"raw").string;if(!["HTML","RGB","rgb"].includes(i))throw new t("Color model must be HTML, RGB, or rgb.",n);const s=$e(o[2],"raw").string,l=Lt(i,s);return e.gullet.macros.set(`\\\\color@${a}`,{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,o=!e.settings.displayMode;return{type:"cr",mode:e.mode,newLine:o,size:n&&$e(n,"size").value}},mathmlBuilder(e,t){const r=new k("mo");if(e.newLine&&(r.setAttribute("linebreak","newline"),e.size)){const n=qe(e.size,t);r.setAttribute("height",n.number+n.unit)}return r}});const Dt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Bt=e=>{const r=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new t("Expected a control sequence",e);return r},$t=(e,t,r,n)=>{let o=e.gullet.macros.get(r.text);null==o&&(r.noexpand=!0,o={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,o,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(Dt[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=Dt[n.text]),$e(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 o=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new t("Expected a control sequence",n);let a,i=0;const s=[[]];for(;"{"!==e.gullet.future().text;)if(n=e.gullet.popToken(),"#"===n.text){if("{"===e.gullet.future().text){a=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(a&&l.unshift(a),"\\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(o,{tokens:l,numArgs:i,delimiters:s},r===Dt[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=Bt(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 $t(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=Bt(e.gullet.popToken()),n=e.gullet.popToken(),o=e.gullet.popToken();return $t(e,r,o,"\\\\globalfuture"===t),e.gullet.pushToken(o),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 o=e.gullet.popToken();"{"===o.text?(n=Bt(e.gullet.popToken()),e.gullet.popToken()):n=Bt(o);const a=e.gullet.isDefined(n);if(a&&"\\newcommand"===r)throw new t(`\\newcommand{${n}} attempting to redefine ${n}; use \\renewcommand`);if(!a&&"\\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 It={"\\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}},Rt=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\u2987","\\llparenthesis","\u2988","\\rrparenthesis","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lAngle","\u27ea","\\rAngle","\u27eb","\\llangle","\u2989","\\rrangle","\u298a","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","\\llbracket","\\rrbracket","\u27e6","\u27e6","\\lBrace","\\rBrace","\u2983","\u2984","/","\\backslash","|","\\vert","\\|","\\Vert","\u2016","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."],Pt=["}","\\left","\\middle","\\right"],Ft=e=>e.length>0&&(Rt.includes(e)||It[e]||Pt.includes(e)),jt=[0,1.2,1.8,2.4,3];function zt(e,r){"ordgroup"===e.type&&1===e.body.length&&(e=e.body[0]);const n=Re(e);if(n&&Rt.includes(n.text))return["<","\\lt"].includes(n.text)&&(n.text="\u27e8"),[">","\\gt"].includes(n.text)&&(n.text="\u27e9"),n;throw new t(n?`Invalid delimiter '${n.text}' after '${r.funcName}'`:`Invalid delimiter type '${e.type}'`,e)}const Ht=["/","\\","\\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=zt(t[0],e),n={type:"delimsizing",mode:e.parser.mode,size:It[e.funcName].size,mclass:It[e.funcName].mclass,delim:r.text},o=e.parser.fetch().text;return"^"!==o&&"_"!==o?n:{type:"ordgroup",mode:"math",body:[n,{type:"ordgroup",mode:"math",body:[]}]}},mathmlBuilder:e=>{const t=[];"."===e.delim&&(e.delim=""),t.push(ie(e.delim,e.mode));const r=new k("mo",t);return"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),(Ht.includes(e.delim)||e.delim.indexOf("arrow")>-1)&&r.setAttribute("stretchy","true"),r.setAttribute("symmetric","true"),r.setAttribute("minsize",jt[e.size]+"em"),r.setAttribute("maxsize",jt[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:zt(t[0],e).text})}),f({type:"leftright",names:["\\left"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,r)=>{const n=zt(r[0],e),o=e.parser;++o.leftrightDepth;let a=o.parseExpression(!1,null,!0),i=o.fetch();for(;"\\middle"===i.text;){o.consume();const e=o.fetch().text;if(!P.math[e])throw new t(`Invalid delimiter '${e}' after '\\middle'`);zt({type:"atom",mode:"math",text:e},{funcName:"\\middle"}),a.push({type:"middle",mode:"math",delim:e}),o.consume(),a=a.concat(o.parseExpression(!1,null,!0)),i=o.fetch()}--o.leftrightDepth,o.expect("\\right",!1);const s=$e(o.parseFunction(),"leftright-right");return{type:"leftright",mode:o.mode,body:a,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 k("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 o=new k("mo",[ie(e.right,e.mode)]);if(o.setAttribute("fence","true"),o.setAttribute("form","postfix"),("\u2216"===e.right||e.right.indexOf("arrow")>-1)&&o.setAttribute("stretchy","true"),e.body.length>0){const t=e.body[e.body.length-1];"color"!==t.type||t.isTextColor||o.setAttribute("mathcolor",t.color)}return r.push(o),ce(r)}}),f({type:"middle",names:["\\middle"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,r)=>{const n=zt(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 k("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 Ut=["\\boxed","\\fcolorbox","\\colorbox"],Gt=(e,t)=>{const r=Ut.includes(e.label)?"mrow":"menclose",n=new k(r,[fe(e.body,t)]);switch(e.label){case"\\overline":n.setAttribute("notation","top"),n.classes.push("tml-overline");break;case"\\underline":n.setAttribute("notation","bottom"),n.classes.push("tml-underline");break;case"\\cancel":n.setAttribute("notation","updiagonalstrike"),n.children.push(new k("mrow",[],["tml-cancel","upstrike"]));break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike"),n.children.push(new k("mrow",[],["tml-cancel","downstrike"]));break;case"\\sout":n.setAttribute("notation","horizontalstrike"),n.children.push(new k("mrow",[],["tml-cancel","sout"]));break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike"),n.classes.push("tml-xcancel");break;case"\\longdiv":n.setAttribute("notation","longdiv"),n.classes.push("longdiv-top"),n.children.push(new k("mrow",[],["longdiv-arc"]));break;case"\\phase":n.setAttribute("notation","phasorangle"),n.classes.push("phasor-bottom"),n.children.push(new k("mrow",[],["phasor-angle"]));break;case"\\textcircled":n.setAttribute("notation","circle"),n.classes.push("circle-pad"),n.children.push(new k("mrow",[],["textcircle"]));break;case"\\angl":n.setAttribute("notation","actuarial"),n.classes.push("actuarial");break;case"\\boxed":n.style.padding="3pt",n.style.border="1px solid",n.setAttribute("scriptlevel","0"),n.setAttribute("displaystyle","true");break;case"\\fbox":n.setAttribute("notation","box"),n.classes.push("tml-fbox");break;case"\\fcolorbox":case"\\colorbox":n.style.padding="0.3em","\\fcolorbox"===e.label&&(n.style.border="0.0667em solid "+String(e.borderColor))}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};f({type:"enclose",names:["\\colorbox"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,argTypes:["raw","raw","text"]},handler({parser:e,funcName:t},r,n){const o=n[0]&&$e(n[0],"raw").string;let a="";if(o){const e=$e(r[0],"raw").string;a=Lt(o,e)}else a=Ot($e(r[0],"raw").string,e.gullet.macros);const i=r[1];return{type:"enclose",mode:e.mode,label:t,backgroundColor:a,body:i}},mathmlBuilder:Gt}),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 o=n[0]&&$e(n[0],"raw").string;let a,i="";if(o){const e=$e(r[0],"raw").string,t=$e(r[0],"raw").string;i=Lt(o,e),a=Lt(o,t)}else i=Ot($e(r[0],"raw").string,e.gullet.macros),a=Ot($e(r[1],"raw").string,e.gullet.macros);const s=r[2];return{type:"enclose",mode:e.mode,label:t,backgroundColor:a,borderColor:i,body:s}},mathmlBuilder:Gt}),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:Gt}),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:Gt}),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:Gt}),f({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler({parser:e,funcName:r},n){const o=n[0];if("ordgroup"!==o.type)throw new t("Invalid environment name",o);let a="";for(let e=0;e<o.body.length;++e)a+=$e(o.body[e],"textord").text;if("\\begin"===r){if(!Object.prototype.hasOwnProperty.call(Ct,a))throw new t("No such environment: "+a,o);const r=Ct[a],{args:n,optArgs:i}=e.parseArguments("\\begin{"+a+"}",r),s={mode:e.mode,envName:a,parser:e},l=r.handler(s,n,i);e.expect("\\end",!1);const c=e.nextToken,u=$e(e.parseFunction(),"environment");if(u.name!==a)throw new t(`Mismatch: \\begin{${a}} matched by \\end{${u.name}}`,c);return l}return{type:"environment",mode:e.mode,name:a,nameGroup:o}}}),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 k("mrow")}),f({type:"noTag",names:["\\env@notag"],props:{numArgs:0},handler:({parser:e})=>({type:"noTag",mode:e.mode}),mathmlBuilder:(e,t)=>new k("mrow")});const Wt=(e,t)=>{const r=e.font,n=t.withFont(r),o=fe(e.body,n);if(0===o.children.length)return o;if("boldsymbol"===r&&["mo","mpadded","mrow"].includes(o.type))return o.style.fontWeight="bold",o;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=o.children[0].children[0].children?o.children[0].children[0]:o.children[0];delete e.attributes.mathvariant;for(let t=1;t<o.children.length;t++)e.children[0].text+=o.children[t].children[0].children?o.children[t].children[0].children[0].text:o.children[t].children[0].text;const t=new k("mpadded",[e]);return t.setAttribute("lspace","0"),t}let a="mo"===o.children[0].type;for(let e=1;e<o.children.length;e++){"mo"===o.children[e].type&&"boldsymbol"===r&&(o.children[e].style.fontWeight="bold"),"mi"!==o.children[e].type&&(a=!1);"normal"!==(o.children[e].attributes&&o.children[e].attributes.mathvariant||"")&&(a=!1)}if(!a)return o;const i=o.children[0];for(let e=1;e<o.children.length;e++)i.children.push(o.children[e].children[0]);if(i.attributes.mathvariant&&"normal"===i.attributes.mathvariant){const e=new k("mtext",new N("\u200b"));return new k("mrow",[e,i])}return i},Vt={"\\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=b(r[0]);let o=t;return o in Vt&&(o=Vt[o]),{type:"font",mode:e.mode,font:o.slice(1),body:n}},mathmlBuilder:Wt}),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:o}=e,a=e.parseExpression(!0,r,!0);return{type:"font",mode:o,font:`math${t.slice(1)}`,body:{type:"ordgroup",mode:e.mode,body:a}}},mathmlBuilder:Wt});const Xt=["display","text","script","scriptscript"],Jt={auto:-1,display:0,text:0,script:1,scriptscript:2},Zt=(e,t)=>{const r="auto"===e.scriptLevel?t.incrementLevel():"display"===e.scriptLevel?t.withLevel(Ve):"text"===e.scriptLevel?t.withLevel(Xe):t.withLevel(Je),n=fe(e.numer,r),o=fe(e.denom,r);3===t.level&&(n.style.mathDepth="2",n.setAttribute("scriptlevel","2"),o.style.mathDepth="2",o.setAttribute("scriptlevel","2"));let a=new k("mfrac",[n,o]);if(e.hasBarLine){if(e.barSize){const r=qe(e.barSize,t);a.setAttribute("linethickness",r.number+r.unit)}}else a.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){const t=[];if(null!=e.leftDelim){const r=new k("mo",[new N(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}if(t.push(a),null!=e.rightDelim){const r=new k("mo",[new N(e.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}a=ce(t)}return"auto"!==e.scriptLevel&&(a=new k("mstyle",[a]),a.setAttribute("displaystyle",String("display"===e.scriptLevel)),a.setAttribute("scriptlevel",Jt[e.scriptLevel])),a};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],o=r[1];let a=!1,i=null,s=null,l="auto";switch(t){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!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:o,hasBarLine:a,leftDelim:i,rightDelim:s,scriptLevel:l,barSize:null}},mathmlBuilder:Zt}),f({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:({parser:e,funcName:t},r)=>{const n=r[0],o=r[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:n,denom:o,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 Yt=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],o=b(t[0]),a="atom"===o.type&&"open"===o.family?Yt(o.text):null,i=b(t[1]),s="atom"===i.type&&"close"===i.family?Yt(i.text):null,l=$e(t[2],"size");let c,u=null;l.isBlank?c=!0:(u=l.value,c=u.number>0);let d="auto",h=t[3];if("ordgroup"===h.type){if(h.body.length>0){const e=$e(h.body[0],"textord");d=Xt[Number(e.text)]}}else h=$e(h,"textord"),d=Xt[Number(h.text)];return{type:"genfrac",mode:e.mode,numer:r,denom:n,continued:!1,hasBarLine:c,barSize:u,leftDelim:a,rightDelim:s,scriptLevel:d}},mathmlBuilder:Zt}),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:$e(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],o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}($e(r[1],"infix").barSize),a=r[2],i=o.number>0;return{type:"genfrac",mode:e.mode,numer:n,denom:a,continued:!1,hasBarLine:i,barSize:o,leftDelim:null,rightDelim:null,scriptLevel:"auto"}},mathmlBuilder:Zt}),f({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["hbox"],allowedInArgument:!0,allowedInText:!1},handler:({parser:e},t)=>({type:"hbox",mode:e.mode,body:x(t[0])}),mathmlBuilder(e,t){const r=t.withLevel(Ve),n=pe(e.body,r);return le(n)}});f({type:"horizBracket",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler:({parser:e,funcName:t},r)=>({type:"horizBracket",mode:e.mode,label:t,isOver:/^\\over/.test(t),base:r[0]}),mathmlBuilder:(e,t)=>{const r=D(e.label);return r.style["math-depth"]=0,new k(e.isOver?"mover":"munder",[fe(e.base,t),r])}}),f({type:"html",names:["\\class","\\id","\\style","\\data"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:({parser:e,funcName:r,token:n},o)=>{const a=$e(o[0],"raw").string,i=o[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=a,s={command:"\\class",class:a};break;case"\\id":l.id=a,s={command:"\\id",id:a};break;case"\\style":l.style=a,s={command:"\\style",style:a};break;case"\\data":{const e=a.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:x(i)}},mathmlBuilder:(e,t)=>{const r=pe(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 Kt=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(!_e(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,o)=>{let a={number:0,unit:"em"},i={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(o[0]){const e=$e(o[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":a=Kt(e);break;case"height":i=Kt(e);break;case"totalheight":s=Kt(e);break;default:throw new t("Invalid key: '"+n[0]+"' in \\includegraphics.")}}}}const c=$e(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:a,height:i,totalheight:s,src:c}},mathmlBuilder:(e,t)=>{const r=qe(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 o=0;e.width.number>0&&(o=qe(e.width,t));const a={height:r.number+n.number+"em"};o.number>0&&(a.width=o.number+o.unit),n.number>0&&(a.verticalAlign=-n.number+n.unit);const i=new T(e.src,e.alt,a);return i.height=r,i.depth=n,new k("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},o){const a=$e(o[0],"size");if(e.settings.strict){const o="m"===r[1],i="mu"===a.value.unit;if(o){if(!i)throw new t(`LaTeX's ${r} supports only mu units, not ${a.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:a.value}},mathmlBuilder(e,t){const r=qe(e.dimension,t),n=r.number>0&&"em"===r.unit?Qt(r.number):"";if("text"===e.mode&&n.length>0){const e=new N(n);return new k("mtext",[e])}if(r.number>=0){const e=new k("mspace");return e.setAttribute("width",r.number+r.unit),e}{const e=new k("mrow");return e.style.marginLeft=r.number+r.unit,e}}});const Qt=function(e){return e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":""},er=/[^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(er,"")}),mathmlBuilder(e,t){const r=new k("mrow",[],["tml-label"]);return e.string.length>0&&r.setLabel(e.string),r}});const tr=["\\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},o)=>{if(tr.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 a=o[0];return{type:"lap",mode:e.mode,alignment:r,body:a}},mathmlBuilder:(e,t)=>{let r;if("llap"===e.alignment){const n=me(x(e.body),t),o=new k("mphantom",n);r=new k("mpadded",[o]),r.setAttribute("width","0.1px")}const n=fe(e.body,t);let o;if("llap"===e.alignment?(n.style.position="absolute",n.style.right="0",n.style.bottom="0",o=new k("mpadded",[r,n])):o=new k("mpadded",[n]),"rlap"===e.alignment)e.body.body.length>0&&"genfrac"===e.body.body[0].type&&o.setAttribute("lspace","0.16667em");else{const t="llap"===e.alignment?"-1":"-0.5";o.setAttribute("lspace",t+"width"),"llap"===e.alignment?o.style.position="relative":(o.style.display="flex",o.style.justifyContent="center")}return o.setAttribute("width","0.1px"),o}}),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 o="\\("===e?"\\)":"$",a=t.parseExpression(!1,o);return t.expect(o),t.switchMode(n),{type:"ordgroup",mode:t.mode,body:a}}}),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:x(t[0]),text:x(t[1]),script:x(t[2]),scriptscript:x(t[3])}),mathmlBuilder:(e,t)=>{const r=((e,t)=>{switch(t.level){case We:return e.display;case Ve:return e.text;case Xe:return e.script;case Je:return e.scriptscript;default:return e.text}})(e,t);return pe(r,t)}});const rr=["text","textord","mathord","atom"];function nr(e,t){let r;const n=me(e.body,t);if("minner"===e.mclass)r=new k("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&&"\u2207"===r.children[0].text&&r.setAttribute("mathvariant","normal")):r=new k("mi",n);else{r=new k("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 k("mrow",n);const o=t.level<2;"mrow"===r.type?o&&("mbin"===e.mclass?(r.children.unshift(ke(.2222)),r.children.push(ke(.2222))):"mrel"===e.mclass?(r.children.unshift(ke(.2778)),r.children.push(ke(.2778))):"mpunct"===e.mclass?r.children.push(ke(.1667)):"minner"===e.mclass&&(r.children.unshift(ke(.0556)),r.children.push(ke(.0556)))):"mbin"===e.mclass?(r.attributes.lspace=o?"0.2222em":"0",r.attributes.rspace=o?"0.2222em":"0"):"mrel"===e.mclass?(r.attributes.lspace=o?"0.2778em":"0",r.attributes.rspace=o?"0.2778em":"0"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace=o?"0.1667em":"0"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&o&&(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],o=c(n);let a=!0;const i={type:"mathord",text:"",mode:e.mode},s=n.body?n.body:[n];for(const t of s){if(!rr.includes(t.type)){a=!1;break}P[e.mode][t.text]?i.text+=P[e.mode][t.text].replace:t.text?i.text+=t.text:t.body&&t.body.map((e=>{i.text+=e.text}))}return a&&"\\mathord"===t&&"mathord"===i.type&&i.text.length>1?i:{type:"mclass",mode:e.mode,mclass:"m"+t.slice(5),body:x(a?i:n),isCharacterBox:o,mustPromote:a}},mathmlBuilder:nr});const or=e=>{const t="ordgroup"===e.type&&e.body.length&&1===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:or(t[0]),body:x(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],o=r[0];let a;a="\\stackrel"!==t?or(n):"mrel";const i={type:"mrel"===a||"mbin"===a?"op":"ordgroup",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==t,body:x(n)};return{type:"supsub",mode:o.mode,stack:!0,base:i,sup:"\\underset"===t?null:o,sub:"\\underset"===t?o:null}},mathmlBuilder:nr});const ar=(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},o){if(0===o[2].body.length)throw new t(r+"cannot parse an empty base.");const a=o[2].body[0];if(e.settings.strict&&"\\sideset"===r&&!a.symbol)throw new t("The base of \\sideset must be a big operator. Try \\prescript.");if(o[0].body.length>0&&"supsub"!==o[0].body[0].type||o[1].body.length>0&&"supsub"!==o[1].body[0].type)throw new t("\\sideset can parse only subscripts and superscripts in its first two arguments",n);const i=o[0].body.length>0?o[0].body[0]:null,s=o[1].body.length>0?o[1].body[0]:null;return i||s?i?{type:"multiscript",mode:e.mode,isSideset:"\\sideset"===r,prescripts:i,postscripts:s,base:a}:{type:"styling",mode:e.mode,scriptLevel:"text",body:[{type:"supsub",mode:e.mode,base:a,sup:s.sup,sub:s.sub}]}:a},mathmlBuilder(e,t){const r=fe(e.base,t),n=new k("mprescripts"),o=new k("none");let a=[];const i=ar(e.prescripts.sub,t,o),s=ar(e.prescripts.sup,t,o);if(e.isSideset&&(i.setAttribute("style","text-align: left;"),s.setAttribute("style","text-align: left;")),e.postscripts){a=[r,ar(e.postscripts.sub,t,o),ar(e.postscripts.sup,t,o),n,i,s]}else a=[r,n,i,s];return new k("mmultiscripts",a)}}),f({type:"not",names:["\\not"],props:{numArgs:1,primitive:!0,allowedInText:!1},handler({parser:e},t){const r=c(t[0]);let n;if(r)n=x(t[0]),"\\"===n[0].text.charAt(0)&&(n[0].text=P.math[n[0].text].replace),n[0].text=n[0].text.slice(0,1)+"\u0338"+n[0].text.slice(1);else{n=[{type:"textord",mode:"math",text:"\u0338"},{type:"kern",mode:"math",dimension:{number:-.6,unit:"em"}},t[0]]}return{type:"not",mode:e.mode,body:n,isCharacterBox:r}},mathmlBuilder(e,t){if(e.isCharacterBox){return me(e.body,t,!0)[0]}return pe(e.body,t)}});const ir=["textord","mathord","atom"],sr=["\\smallint"],lr=["textord","mathord","ordgroup","close","leftright","font"],cr=e=>{e.attributes.lspace="0.1667em",e.attributes.rspace="0.1667em"},ur=(e,t)=>{let r;if(e.symbol)r=new k("mo",[ie(e.name,e.mode)]),sr.includes(e.name)?r.setAttribute("largeop","false"):r.setAttribute("movablelimits","false"),e.fromMathOp&&cr(r);else if(e.body)r=new k("mo",me(e.body,t)),e.fromMathOp&&cr(r);else if(r=new k("mi",[new N(e.name.slice(1))]),!e.parentIsSupSub){const t=[r,new k("mo",[ie("\u2061","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},dr={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a05":"\\bigsqcap","\u2a06":"\\bigsqcup","\u2a03":"\\bigcupdot","\u2a07":"\\bigdoublevee","\u2a08":"\\bigdoublewedge","\u2a09":"\\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","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a03","\u2a04","\u2a05","\u2a06","\u2a07","\u2a08","\u2a09"],props:{numArgs:0},handler:({parser:e,funcName:t},r)=>{let n=t;return 1===n.length&&(n=dr[n]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,stack:!1,name:n}},mathmlBuilder:ur}),f({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:({parser:e},t)=>{const r=t[0],n=r.body?r.body:[r],o=1===n.length&&ir.includes(n[0].type);return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:o,fromMathOp:!0,stack:!1,name:o?n[0].text:null,body:o?null:x(r)}},mathmlBuilder:ur});const hr={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint","\u2231":"\\intclockwise","\u2232":"\\varointclockwise","\u2a0c":"\\iiiint","\u2a0d":"\\intbar","\u2a0e":"\\intBar","\u2a0f":"\\fint","\u2a12":"\\rppolint","\u2a13":"\\scpolint","\u2a15":"\\pointint","\u2a16":"\\sqint","\u2a17":"\\intlarhk","\u2a18":"\\intx","\u2a19":"\\intcap","\u2a1a":"\\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:Ft(n),needsLeadingSpace:r.length>0&&lr.includes(r),name:t}},mathmlBuilder:ur}),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:Ft(n),needsLeadingSpace:r.length>0&&lr.includes(r),name:t}},mathmlBuilder:ur}),f({type:"op",names:["\\int","\\iint","\\iiint","\\iiiint","\\oint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\intbar","\\intBar","\\fint","\\rppolint","\\scpolint","\\pointint","\\sqint","\\intlarhk","\\intx","\\intcap","\\intcup","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230","\u2231","\u2232","\u2a0c","\u2a0d","\u2a0e","\u2a0f","\u2a12","\u2a13","\u2a15","\u2a16","\u2a17","\u2a18","\u2a19","\u2a1a"],props:{numArgs:0,allowedInArgument:!0},handler({parser:e,funcName:t}){let r=t;return 1===r.length&&(r=hr[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,stack:!1,name:r}},mathmlBuilder:ur});f({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1,allowedInArgument:!0},handler:({parser:e,funcName:t},r)=>{const n=r[0],o=e.prevAtomType,a=e.gullet.future().text;return{type:"operatorname",mode:e.mode,body:x(n),alwaysHandleSupSub:"\\operatornamewithlimits"===t,limits:!1,parentIsSupSub:!1,isFollowedByDelimiter:Ft(a),needsLeadingSpace:o.length>0&&lr.includes(o)}},mathmlBuilder:(e,t)=>{let r,n=me(e.body,t.withFont("mathrm")),o=!0;for(let e=0;e<n.length;e++){let t=n[e];if(t instanceof k)switch(("mrow"===t.type||"mpadded"===t.type)&&1===t.children.length&&t.children[0]instanceof k&&(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",""),a=Qt(Number(r));""===a?o=!1:n[e]=new k("mtext",[new N(a)])}break;case"mo":{const e=t.children[0];1===t.children.length&&e instanceof N?e.text=e.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):o=!1;break}default:o=!1}else o=!1}if(o){const e=n.map((e=>e.toText())).join("");n=[new N(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 k("mrow",n);{const e=new k("mo",[ie("\u2061","text")]);return q([n[0],e])}}if(o?(r=new k("mi",n),1===n[0].text.length&&r.setAttribute("mathvariant","normal")):r=new k("mrow",n),!e.parentIsSupSub){const t=[r,new k("mo",[ie("\u2061","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)}return q(t)}return r}}),Ye("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),g({type:"ordgroup",mathmlBuilder:(e,t)=>pe(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:x(r)}},mathmlBuilder:(e,t)=>{const r=me(e.body,t);return new k("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(x(e.body),t),n=new k("mphantom",r),o=new k("mpadded",[n]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),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(x(e.body),t),n=new k("mphantom",r),o=new k("mpadded",[n]);return o.setAttribute("width","0px"),o}}),f({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler:({parser:e},t)=>({type:"pmb",mode:e.mode,body:x(t[0])}),mathmlBuilder(e,t){const r=me(e.body,t),n=L(r);return n.setAttribute("style","font-weight:bold"),n}});const mr=(e,t)=>{const r=t.withLevel(Ve),n=new k("mpadded",[fe(e.body,r)]),o=qe(e.dy,t);return n.setAttribute("voffset",o.number+o.unit),o.number>0?n.style.padding=o.number+o.unit+" 0 0 0":n.style.padding="0 0 "+Math.abs(o.number)+o.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=$e(r[0],"size").value;"\\lower"===t&&(n.number*=-1);const o=r[1];return{type:"raise",mode:e.mode,dy:n,body:o}},mathmlBuilder:mr}),f({type:"raise",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler({parser:e,funcName:t},r){const n=$e(r[0],"size").value,o=r[1];return{type:"raise",mode:e.mode,dy:n,body:o}},mathmlBuilder:mr}),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(er,"")}),mathmlBuilder(e,t){const r="\\ref"===e.funcName?["tml-ref"]:["tml-ref","tml-eqref"];return new _("#"+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,allowedInArgument:!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],o=$e(t[0],"size"),a=$e(t[1],"size");return{type:"rule",mode:e.mode,shift:n&&$e(n,"size").value,width:o.value,height:a.value}},mathmlBuilder(e,t){const r=qe(e.width,t),n=qe(e.height,t),o=e.shift?qe(e.shift,t):{number:0,unit:"em"},a=t.color&&t.getColor()||"black",i=new k("mspace");if(r.number>0&&n.number>0&&i.setAttribute("mathbackground",a),i.setAttribute("width",r.number+r.unit),i.setAttribute("height",n.number+n.unit),0===o.number)return i;const s=new k("mpadded",[i]);return o.number>=0?s.setAttribute("height","+"+o.number+o.unit):(s.setAttribute("height",o.number+o.unit),s.setAttribute("depth","+"+-o.number+o.unit)),s.setAttribute("voffset",o.number+o.unit),s}});const pr=/^[0-9]$/,fr={0:"\u2080",1:"\u2081",2:"\u2082",3:"\u2083",4:"\u2084",5:"\u2085",6:"\u2086",7:"\u2087",8:"\u2088",9:"\u2089"},gr={0:"\u2070",1:"\xb9",2:"\xb2",3:"\xb3",4:"\u2074",5:"\u2075",6:"\u2076",7:"\u2077",8:"\u2078",9:"\u2079"};f({type:"sfrac",names:["\\sfrac"],props:{numArgs:2,allowedInText:!0,allowedInMath:!0},handler({parser:e},r){let n="";for(const e of r[0].body){if("textord"!==e.type||!pr.test(e.text))throw new t("Numerator must be an integer.",e);n+=e.text}let o="";for(const e of r[1].body){if("textord"!==e.type||!pr.test(e.text))throw new t("Denominator must be an integer.",e);o+=e.text}return{type:"sfrac",mode:e.mode,numerator:n,denominator:o}},mathmlBuilder(e,t){const r=e.numerator.split("").map((e=>gr[e])).join(""),n=e.denominator.split("").map((e=>fr[e])).join(""),o=new N(r+"\u2044"+n,e.mode,t);return new k("mn",[o],["special-fraction"])}});const br={"\\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 o=r.parseExpression(!1,e,!0);return{type:"sizing",mode:r.mode,funcName:t,body:o}},mathmlBuilder:(e,t)=>{const r=t.withFontSize(br[e.funcName]),n=me(e.body,r),o=L(n),a=(br[e.funcName]/t.fontSize).toFixed(4);return o.setAttribute("mathsize",a+"em"),o}}),f({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:({parser:e},t,r)=>{let n=!1,o=!1;const a=r[0]&&$e(r[0],"ordgroup");if(a){let e="";for(let t=0;t<a.body.length;++t){if(e=a.body[t].text,"t"===e)n=!0;else{if("b"!==e){n=!1,o=!1;break}o=!0}}}else n=!0,o=!0;const i=t[0];return{type:"smash",mode:e.mode,body:i,smashHeight:n,smashDepth:o}},mathmlBuilder:(e,t)=>{const r=new k("mpadded",[fe(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});const xr=["a","c","e","\u0131","m","n","o","r","s","u","v","w","x","z","\u03b1","\u03b5","\u03b9","\u03ba","\u03bd","\u03bf","\u03c0","\u03c3","\u03c4","\u03c5","\u03c9","\\alpha","\\epsilon","\\iota","\\kappa","\\nu","\\omega","\\pi","\\tau","\\omega"];f({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler({parser:e},t,r){const n=r[0],o=t[0];return o.body&&1===o.body.length&&o.body[0].text&&xr.includes(o.body[0].text)&&o.body.push({type:"rule",mode:"math",shift:null,width:{number:0,unit:"pt"},height:{number:.5,unit:"em"}}),{type:"sqrt",mode:e.mode,body:o,index:n}},mathmlBuilder(e,t){const{body:r,index:n}=e;return n?new k("mroot",[fe(r,t),fe(n,t.incrementLevel())]):new k("msqrt",[fe(r,t)])}});const yr={display:0,text:1,script:2,scriptscript:3},vr={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 o=r.parseExpression(!0,e,!0),a=t.slice(1,t.length-5);return{type:"styling",mode:r.mode,scriptLevel:a,body:o}},mathmlBuilder(e,t){const r=t.withLevel(yr[e.scriptLevel]),n=me(e.body,r),o=L(n),a=vr[e.scriptLevel];return o.setAttribute("scriptlevel",a[0]),o.setAttribute("displaystyle",a[1]),o}});const wr=/^m(over|under|underover)$/;g({type:"supsub",mathmlBuilder(e,t){let r,n,o=!1,a=!1,i=!1,s=!1;e.base&&"horizBracket"===e.base.type&&(n=!!e.sup,n===e.base.isOver&&(o=!0,r=e.base.isOver)),!e.base||e.stack||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0,a=!e.base.symbol,i=a&&!e.isFollowedByDelimiter,s=e.base.needsLeadingSpace);const l=e.stack&&1===e.base.body.length?[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);if(3===t.level&&r.setAttribute("scriptlevel","2"),e.base&&e.base.text&&1===e.base.text.length){const t=e.base.text;"DHKLUcegorsuvxyz\u03a0\u03a5\u03a8\u03b1\u03b4\u03b7\u03b9\u03bc\u03bd\u03bf\u03c4\u03c5\u03c7\u03f5".indexOf(t)>-1?r.classes.push("tml-sml-pad"):"BCEFGIMNOPQRSTXZlpqtw\u0393\u0398\u039e\u03a3\u03a6\u03a9\u03b2\u03b5\u03b6\u03b8\u03be\u03c1\u03c2\u03c6\u03c8\u03d1\u03d5\u03f1".indexOf(t)>-1?r.classes.push("tml-med-pad"):"AJdf\u0394\u039b".indexOf(t)>-1&&r.classes.push("tml-lrg-pad")}l.push(r)}let u;if(o)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)&&(t.level===We||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(t.level===We||r.limits)?"munderover":"msubsup"}else{const r=e.base;u=e.stack||r&&"op"===r.type&&r.limits&&(t.level===We||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.level===We)?"munder":"msub"}else{const r=e.base;u=r&&"op"===r.type&&r.limits&&(t.level===We||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.level===We)?"mover":"msup"}let d=new k(u,l);if(a){const e=new k("mo",[ie("\u2061","text")]);if(s){const t=new k("mspace");t.setAttribute("width","0.1667em"),d=q([t,d,e])}else d=q([d,e]);if(i){const e=new k("mspace");e.setAttribute("width","0.1667em"),d.children.push(e)}}else wr.test(u)&&(d=new k("mrow",[d]));return d}});const Ar=["\\shortmid","\\nshortmid","\\shortparallel","\\nshortparallel","\\smallsetminus"],Cr=["\\Rsh","\\Lsh","\\restriction"];g({type:"atom",mathmlBuilder(e,t){const r=new k("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||Cr.includes(e)})(e.text))r.setAttribute("stretchy","false");else if(Ar.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 k("mrow",[ke(.222),r,ke(.222)]):new k("mrow",[ke(.2778),r,ke(.2778)]);return r}});const Er={mathbf:"bold",mathrm:"normal",textit:"italic",mathit:"italic",mathnormal:"italic",mathbb:"double-struck",mathcal:"script",mathfrak:"fraktur",mathscr:"script",mathsf:"sans-serif",mathtt:"monospace"},Sr=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 o=e.text;return P[n][o]&&P[n][o].replace&&(o=P[n][o].replace),Object.prototype.hasOwnProperty.call(Er,r)?Er[r]:null},_r=Object.freeze({B:8426,E:8427,F:8427,H:8387,I:8391,L:8390,M:8422,R:8393,e:8394,g:8355,o:8389}),Tr=Object.freeze({C:8426,H:8388,I:8392,R:8394,Z:8398}),qr=Object.freeze({C:8383,H:8389,N:8391,P:8393,Q:8393,R:8395,Z:8394}),kr=Object.freeze({\u03f5:119527,\u03d1:119564,\u03f0:119534,\u03c6:119577,\u03f1:119535,\u03d6:119563}),Nr=Object.freeze({\u03f5:119643,\u03d1:119680,\u03f0:119650,\u03c6:119693,\u03f1:119651,\u03d6:119679}),Lr=Object.freeze({\u03f5:119701,\u03d1:119738,\u03f0:119708,\u03c6:119751,\u03f1:119709,\u03d6:119737}),Or=Object.freeze({\u03f5:119759,\u03d1:119796,\u03f0:119766,\u03c6:119809,\u03f1:119767,\u03d6:119795}),Mr=Object.freeze({upperCaseLatin:{normal:e=>0,bold:e=>119743,italic:e=>119795,"bold-italic":e=>119847,script:e=>_r[e]||119899,"script-bold":e=>119951,fraktur:e=>Tr[e]||120003,"fraktur-bold":e=>120107,"double-struck":e=>qr[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=>_r[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=>"\u03d5"===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=>kr[e]||-51,italic:e=>0,"bold-italic":e=>Nr[e]||58,script:e=>0,"script-bold":e=>0,fraktur:e=>0,"fraktur-bold":e=>0,"double-struck":e=>0,"sans-serif":e=>Lr[e]||116,"sans-serif-bold":e=>Lr[e]||116,"sans-serif-italic":e=>0,"sans-serif-bold-italic":e=>Or[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}}),Dr=(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||"\u03d5"===e?"lowerCaseGreek":120545<r&&r<120572||kr[e]?"varGreek":47<r&&r<58?"numeral":"other";return"other"===n?e:String.fromCodePoint(r+Mr[n][t](e))},Br=Object.freeze({a:"\u1d00",b:"\u0299",c:"\u1d04",d:"\u1d05",e:"\u1d07",f:"\ua730",g:"\u0262",h:"\u029c",i:"\u026a",j:"\u1d0a",k:"\u1d0b",l:"\u029f",m:"\u1d0d",n:"\u0274",o:"\u1d0f",p:"\u1d18",q:"\u01eb",r:"\u0280",s:"s",t:"\u1d1b",u:"\u1d1c",v:"\u1d20",w:"\u1d21",x:"x",y:"\u028f",z:"\u1d22"}),$r=/^\d(?:[\d,.]*\d)?$/,Ir=/[A-Ba-z]/,Rr=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),o=912<n&&n<938?"normal":"italic",a=Sr(e,t)||o;if("script"===a)return r.text=Dr(r.text,a),new k("mi",[r],[t.font]);"italic"!==a&&(r.text=Dr(r.text,a));let i=new k("mi",[r]);return"normal"===a&&(i.setAttribute("mathvariant","normal"),1===r.text.length&&(i=new k("mpadded",[i]),i.setAttribute("lspace","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=Br[r]);const o=ie(r,e.mode,t),a=Sr(e,t)||"normal";let i;if($r.test(e.text)){const t="text"===e.mode?"mtext":"mn";if("italic"===a||"bold-italic"===a)return((e,t,r)=>{const n=new k(r,[e]),o=new k("mstyle",[n]);return o.style["font-style"]="italic",o.style["font-family"]="Cambria, 'Times New Roman', serif","bold-italic"===t&&(o.style["font-weight"]="bold"),o})(o,a,t);"normal"!==a&&(o.text=o.text.split("").map((e=>Dr(e,a))).join("")),i=new k(t,[o])}else if("text"===e.mode)"normal"!==a&&(o.text=Dr(o.text,a)),i=new k("mtext",[o]);else if(Rr.has(e.text))i=new k("mo",[o]),i.classes.push("tml-prime");else{const e=o.text;"italic"!==a&&(o.text=Dr(o.text,a)),i=new k("mi",[o]),o.text===e&&Ir.test(e)&&i.setAttribute("mathvariant","italic")}return i}});const Pr={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Fr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};g({type:"spacing",mathmlBuilder(e,r){let n;if(Object.prototype.hasOwnProperty.call(Fr,e.text))n=new k("mtext",[new N("\xa0")]);else{if(!Object.prototype.hasOwnProperty.call(Pr,e.text))throw new t(`Unknown type of space "${e.text}"`);n=new k("mo"),"\\nobreak"===e.text&&n.setAttribute("linebreak","nobreak")}return n}}),g({type:"tag"});const jr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm","\\textsc":"textsc"},zr={"\\textbf":"textbf","\\textmd":"textmd"},Hr={"\\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:x(n),font:t}},mathmlBuilder(e,t){const r=((e,t)=>{const r=e.font;return r?jr[r]?t.withTextFontFamily(jr[r]):zr[r]?t.withTextFontWeight(zr[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Hr[r]):t})(e,t),n=pe(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 k("mtd",[fe(e.body,t)]);r.style.padding="0";const n=new k("mtr",[r]);return new k("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 N(Ur(e)),n=new k("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});const Ur=e=>e.body.replace(/ /g,e.star?"\u2423":"\xa0"),Gr=m,Wr="[ \r\n\t]",Vr=`(\\\\[a-zA-Z@]+)${Wr}*`,Xr="[\u0300-\u036f]",Jr=new RegExp(`${Xr}+$`),Zr=`(${Wr}+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]${Xr}*|[\ud800-\udbff][\udc00-\udfff]${Xr}*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|${Vr}|\\\\[^\ud800-\udfff])`;class Yr{constructor(e,t){this.input=e,this.settings=t,this.tokenRegex=new RegExp(Zr,"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 Ge("EOF",new Ue(this,r,r));const n=this.tokenRegex.exec(e);if(null===n||n.index!==r)throw new t(`Unexpected character: '${e[r]}'`,new Ge(e[r],new Ue(this,r,r+1)));const o=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[o]){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 Ge(o,new Ue(this,r,this.tokenRegex.lastIndex))}}class Kr{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 Qr={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class en{constructor(e,t,r){this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Kr(Ke,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Yr(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 Ge("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){const r=[],n=e&&e.length>0;n||this.consumeSpaces();const o=this.future();let a,i=0,s=0;do{if(a=this.popToken(),r.push(a),"{"===a.text)++i;else if("}"===a.text){if(--i,-1===i)throw new t("Extra }",a)}else if("EOF"===a.text)throw new t("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",a);if(e&&n)if((0===i||1===i&&"{"===e[s])&&a.text===e[s]){if(++s,s===e.length){r.splice(-s,s);break}}else s=0}while(0!==i||n);return"{"===o.text&&"}"===r[r.length-1].text&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:o,end:a}}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,o=r.noexpand?null:this._getExpansion(n);if(null==o||e&&o.unexpandable){if(e&&null==o&&"\\"===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 a=o.tokens;const i=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){a=a.slice();for(let e=a.length-1;e>=0;--e){let r=a[e];if("#"===r.text){if(0===e)throw new t("Incomplete placeholder at end of macro body",r);if(r=a[--e],"#"===r.text)a.splice(e+1,1);else{if(!/^[1-9]$/.test(r.text))throw new t("Not a valid argument number",r);a.splice(e,2,...i[+r.text-1])}}}}return this.pushTokens(a),a.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 Ge(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 Yr(r,this.settings),n=[];let o=t.lex();for(;"EOF"!==o.text;)n.push(o),o=t.lex();n.reverse();return{tokens:n,numArgs:e}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(Gr,e)||Object.prototype.hasOwnProperty.call(P.math,e)||Object.prototype.hasOwnProperty.call(P.text,e)||Object.prototype.hasOwnProperty.call(Qr,e)}isExpandable(e){const t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Object.prototype.hasOwnProperty.call(Gr,e)&&!Gr[e].primitive}}const tn=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,rn=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9",\u2090:"a",\u2091:"e",\u2095:"h",\u1d62:"i",\u2c7c:"j",\u2096:"k",\u2097:"l",\u2098:"m",\u2099:"n",\u2092:"o",\u209a:"p",\u1d63:"r",\u209b:"s",\u209c:"t",\u1d64:"u",\u1d65:"v",\u2093:"x",\u1d66:"\u03b2",\u1d67:"\u03b3",\u1d68:"\u03c1",\u1d69:"\u03d5",\u1d6a:"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9",\u1d2c:"A",\u1d2e:"B",\u1d30:"D",\u1d31:"E",\u1d33:"G",\u1d34:"H",\u1d35:"I",\u1d36:"J",\u1d37:"K",\u1d38:"L",\u1d39:"M",\u1d3a:"N",\u1d3c:"O",\u1d3e:"P",\u1d3f:"R",\u1d40:"T",\u1d41:"U",\u2c7d:"V",\u1d42:"W",\u1d43:"a",\u1d47:"b",\u1d9c:"c",\u1d48:"d",\u1d49:"e",\u1da0:"f",\u1d4d:"g",\u02b0:"h",\u2071:"i",\u02b2:"j",\u1d4f:"k",\u02e1:"l",\u1d50:"m",\u207f:"n",\u1d52:"o",\u1d56:"p",\u02b3:"r",\u02e2:"s",\u1d57:"t",\u1d58:"u",\u1d5b:"v",\u02b7:"w",\u02e3:"x",\u02b8:"y",\u1dbb:"z",\u1d5d:"\u03b2",\u1d5e:"\u03b3",\u1d5f:"\u03b4",\u1d60:"\u03d5",\u1d61:"\u03c7",\u1dbf:"\u03b8"}),nn=Object.freeze({\u{1d49c}:"A",\u212c:"B",\u{1d49e}:"C",\u{1d49f}:"D",\u2130:"E",\u2131:"F",\u{1d4a2}:"G",\u210b:"H",\u2110:"I",\u{1d4a5}:"J",\u{1d4a6}:"K",\u2112:"L",\u2133:"M",\u{1d4a9}:"N",\u{1d4aa}:"O",\u{1d4ab}:"P",\u{1d4ac}:"Q",\u211b:"R",\u{1d4ae}:"S",\u{1d4af}:"T",\u{1d4b0}:"U",\u{1d4b1}:"V",\u{1d4b2}:"W",\u{1d4b3}:"X",\u{1d4b4}:"Y",\u{1d4b5}:"Z"});var on={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},an={\u00e1:"a\u0301",\u00e0:"a\u0300",\u00e4:"a\u0308",\u01df:"a\u0308\u0304",\u00e3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1eaf:"a\u0306\u0301",\u1eb1:"a\u0306\u0300",\u1eb5:"a\u0306\u0303",\u01ce:"a\u030c",\u00e2:"a\u0302",\u1ea5:"a\u0302\u0301",\u1ea7:"a\u0302\u0300",\u1eab:"a\u0302\u0303",\u0227:"a\u0307",\u01e1:"a\u0307\u0304",\u00e5:"a\u030a",\u01fb:"a\u030a\u0301",\u1e03:"b\u0307",\u0107:"c\u0301",\u010d:"c\u030c",\u0109:"c\u0302",\u010b:"c\u0307",\u010f:"d\u030c",\u1e0b:"d\u0307",\u00e9:"e\u0301",\u00e8:"e\u0300",\u00eb:"e\u0308",\u1ebd:"e\u0303",\u0113:"e\u0304",\u1e17:"e\u0304\u0301",\u1e15:"e\u0304\u0300",\u0115:"e\u0306",\u011b:"e\u030c",\u00ea:"e\u0302",\u1ebf:"e\u0302\u0301",\u1ec1:"e\u0302\u0300",\u1ec5:"e\u0302\u0303",\u0117:"e\u0307",\u1e1f:"f\u0307",\u01f5:"g\u0301",\u1e21:"g\u0304",\u011f:"g\u0306",\u01e7:"g\u030c",\u011d:"g\u0302",\u0121:"g\u0307",\u1e27:"h\u0308",\u021f:"h\u030c",\u0125:"h\u0302",\u1e23:"h\u0307",\u00ed:"i\u0301",\u00ec:"i\u0300",\u00ef:"i\u0308",\u1e2f:"i\u0308\u0301",\u0129:"i\u0303",\u012b:"i\u0304",\u012d:"i\u0306",\u01d0:"i\u030c",\u00ee:"i\u0302",\u01f0:"j\u030c",\u0135:"j\u0302",\u1e31:"k\u0301",\u01e9:"k\u030c",\u013a:"l\u0301",\u013e:"l\u030c",\u1e3f:"m\u0301",\u1e41:"m\u0307",\u0144:"n\u0301",\u01f9:"n\u0300",\u00f1:"n\u0303",\u0148:"n\u030c",\u1e45:"n\u0307",\u00f3:"o\u0301",\u00f2:"o\u0300",\u00f6:"o\u0308",\u022b:"o\u0308\u0304",\u00f5:"o\u0303",\u1e4d:"o\u0303\u0301",\u1e4f:"o\u0303\u0308",\u022d:"o\u0303\u0304",\u014d:"o\u0304",\u1e53:"o\u0304\u0301",\u1e51:"o\u0304\u0300",\u014f:"o\u0306",\u01d2:"o\u030c",\u00f4:"o\u0302",\u1ed1:"o\u0302\u0301",\u1ed3:"o\u0302\u0300",\u1ed7:"o\u0302\u0303",\u022f:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030b",\u1e55:"p\u0301",\u1e57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030c",\u1e59:"r\u0307",\u015b:"s\u0301",\u1e65:"s\u0301\u0307",\u0161:"s\u030c",\u1e67:"s\u030c\u0307",\u015d:"s\u0302",\u1e61:"s\u0307",\u1e97:"t\u0308",\u0165:"t\u030c",\u1e6b:"t\u0307",\u00fa:"u\u0301",\u00f9:"u\u0300",\u00fc:"u\u0308",\u01d8:"u\u0308\u0301",\u01dc:"u\u0308\u0300",\u01d6:"u\u0308\u0304",\u01da:"u\u0308\u030c",\u0169:"u\u0303",\u1e79:"u\u0303\u0301",\u016b:"u\u0304",\u1e7b:"u\u0304\u0308",\u016d:"u\u0306",\u01d4:"u\u030c",\u00fb:"u\u0302",\u016f:"u\u030a",\u0171:"u\u030b",\u1e7d:"v\u0303",\u1e83:"w\u0301",\u1e81:"w\u0300",\u1e85:"w\u0308",\u0175:"w\u0302",\u1e87:"w\u0307",\u1e98:"w\u030a",\u1e8d:"x\u0308",\u1e8b:"x\u0307",\u00fd:"y\u0301",\u1ef3:"y\u0300",\u00ff:"y\u0308",\u1ef9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1e8f:"y\u0307",\u1e99:"y\u030a",\u017a:"z\u0301",\u017e:"z\u030c",\u1e91:"z\u0302",\u017c:"z\u0307",\u00c1:"A\u0301",\u00c0:"A\u0300",\u00c4:"A\u0308",\u01de:"A\u0308\u0304",\u00c3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1eae:"A\u0306\u0301",\u1eb0:"A\u0306\u0300",\u1eb4:"A\u0306\u0303",\u01cd:"A\u030c",\u00c2:"A\u0302",\u1ea4:"A\u0302\u0301",\u1ea6:"A\u0302\u0300",\u1eaa:"A\u0302\u0303",\u0226:"A\u0307",\u01e0:"A\u0307\u0304",\u00c5:"A\u030a",\u01fa:"A\u030a\u0301",\u1e02:"B\u0307",\u0106:"C\u0301",\u010c:"C\u030c",\u0108:"C\u0302",\u010a:"C\u0307",\u010e:"D\u030c",\u1e0a:"D\u0307",\u00c9:"E\u0301",\u00c8:"E\u0300",\u00cb:"E\u0308",\u1ebc:"E\u0303",\u0112:"E\u0304",\u1e16:"E\u0304\u0301",\u1e14:"E\u0304\u0300",\u0114:"E\u0306",\u011a:"E\u030c",\u00ca:"E\u0302",\u1ebe:"E\u0302\u0301",\u1ec0:"E\u0302\u0300",\u1ec4:"E\u0302\u0303",\u0116:"E\u0307",\u1e1e:"F\u0307",\u01f4:"G\u0301",\u1e20:"G\u0304",\u011e:"G\u0306",\u01e6:"G\u030c",\u011c:"G\u0302",\u0120:"G\u0307",\u1e26:"H\u0308",\u021e:"H\u030c",\u0124:"H\u0302",\u1e22:"H\u0307",\u00cd:"I\u0301",\u00cc:"I\u0300",\u00cf:"I\u0308",\u1e2e:"I\u0308\u0301",\u0128:"I\u0303",\u012a:"I\u0304",\u012c:"I\u0306",\u01cf:"I\u030c",\u00ce:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1e30:"K\u0301",\u01e8:"K\u030c",\u0139:"L\u0301",\u013d:"L\u030c",\u1e3e:"M\u0301",\u1e40:"M\u0307",\u0143:"N\u0301",\u01f8:"N\u0300",\u00d1:"N\u0303",\u0147:"N\u030c",\u1e44:"N\u0307",\u00d3:"O\u0301",\u00d2:"O\u0300",\u00d6:"O\u0308",\u022a:"O\u0308\u0304",\u00d5:"O\u0303",\u1e4c:"O\u0303\u0301",\u1e4e:"O\u0303\u0308",\u022c:"O\u0303\u0304",\u014c:"O\u0304",\u1e52:"O\u0304\u0301",\u1e50:"O\u0304\u0300",\u014e:"O\u0306",\u01d1:"O\u030c",\u00d4:"O\u0302",\u1ed0:"O\u0302\u0301",\u1ed2:"O\u0302\u0300",\u1ed6:"O\u0302\u0303",\u022e:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030b",\u1e54:"P\u0301",\u1e56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030c",\u1e58:"R\u0307",\u015a:"S\u0301",\u1e64:"S\u0301\u0307",\u0160:"S\u030c",\u1e66:"S\u030c\u0307",\u015c:"S\u0302",\u1e60:"S\u0307",\u0164:"T\u030c",\u1e6a:"T\u0307",\u00da:"U\u0301",\u00d9:"U\u0300",\u00dc:"U\u0308",\u01d7:"U\u0308\u0301",\u01db:"U\u0308\u0300",\u01d5:"U\u0308\u0304",\u01d9:"U\u0308\u030c",\u0168:"U\u0303",\u1e78:"U\u0303\u0301",\u016a:"U\u0304",\u1e7a:"U\u0304\u0308",\u016c:"U\u0306",\u01d3:"U\u030c",\u00db:"U\u0302",\u016e:"U\u030a",\u0170:"U\u030b",\u1e7c:"V\u0303",\u1e82:"W\u0301",\u1e80:"W\u0300",\u1e84:"W\u0308",\u0174:"W\u0302",\u1e86:"W\u0307",\u1e8c:"X\u0308",\u1e8a:"X\u0307",\u00dd:"Y\u0301",\u1ef2:"Y\u0300",\u0178:"Y\u0308",\u1ef8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1e8e:"Y\u0307",\u0179:"Z\u0301",\u017d:"Z\u030c",\u1e90:"Z\u0302",\u017b:"Z\u0307",\u03ac:"\u03b1\u0301",\u1f70:"\u03b1\u0300",\u1fb1:"\u03b1\u0304",\u1fb0:"\u03b1\u0306",\u03ad:"\u03b5\u0301",\u1f72:"\u03b5\u0300",\u03ae:"\u03b7\u0301",\u1f74:"\u03b7\u0300",\u03af:"\u03b9\u0301",\u1f76:"\u03b9\u0300",\u03ca:"\u03b9\u0308",\u0390:"\u03b9\u0308\u0301",\u1fd2:"\u03b9\u0308\u0300",\u1fd1:"\u03b9\u0304",\u1fd0:"\u03b9\u0306",\u03cc:"\u03bf\u0301",\u1f78:"\u03bf\u0300",\u03cd:"\u03c5\u0301",\u1f7a:"\u03c5\u0300",\u03cb:"\u03c5\u0308",\u03b0:"\u03c5\u0308\u0301",\u1fe2:"\u03c5\u0308\u0300",\u1fe1:"\u03c5\u0304",\u1fe0:"\u03c5\u0306",\u03ce:"\u03c9\u0301",\u1f7c:"\u03c9\u0300",\u038e:"\u03a5\u0301",\u1fea:"\u03a5\u0300",\u03ab:"\u03a5\u0308",\u1fe9:"\u03a5\u0304",\u1fe8:"\u03a5\u0306",\u038f:"\u03a9\u0301",\u1ffa:"\u03a9\u0300"};const sn=["bin","op","open","punct","rel"],ln=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/,cn=/^ *\\text/;class un{constructor(e,t,r=!1){this.mode="math",this.gullet=new en(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 Ge("}")),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 o=this.fetch();if(-1!==un.endOfExpression.indexOf(o.text))break;if(t&&o.text===t)break;if(r&&"\\middle"===o.text)break;if(e&&Gr[o.text]&&Gr[o.text].infix)break;const a=this.parseAtom(t);if(!a)break;"internal"!==a.type&&(n.push(a),this.prevAtomType="atom"===a.type?a.family:a.type)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){let r,n=-1;for(let o=0;o<e.length;o++)if("infix"===e[o].type){if(-1!==n)throw new t("only one infix operator per group",e[o].token);n=o,r=e[o].replaceWith}if(-1!==n&&r){let t,o;const a=e.slice(0,n),i=e.slice(n+1);let s;return t=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},o=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],o],[]):this.callFunction(r,[t,o],[]),[s]}return e}handleSupSubscript(e){const r=this.fetch(),n=r.text;let o;this.consume(),this.consumeSpaces();do{o=this.parseGroup(e)}while(o.type&&"internal"===o.type);if(!o)throw new t("Expected group after '"+n+"'",r);return o}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(r&&"internal"===r.type)return r;if("text"===this.mode)return r;let n,o;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(o)throw new t("Double subscript",e);o=this.handleSupSubscript("subscript")}else if("'"===e.text){if(n)throw new t("Double superscript",e);const r={type:"textord",mode:this.mode,text:"\\prime"},o=[r];for(this.consume();"'"===this.fetch().text;)o.push(r),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:o}}else{if(!rn[e.text])break;{const t=tn.test(e.text),r=[];for(r.push(new Ge(rn[e.text])),this.consume();;){const e=this.fetch().text;if(!rn[e])break;if(tn.test(e)!==t)break;r.unshift(new Ge(rn[e])),this.consume()}const a=this.subparse(r);t?o={type:"ordgroup",mode:"math",body:a}:n={type:"ordgroup",mode:"math",body:a}}}}if(n||o){if(r&&"multiscript"===r.type&&!r.postscripts)return r.postscripts={sup:n,sub:o},r;{const e=!r||"op"!==r.type&&"operatorname"!==r.type?void 0:Ft(this.nextToken.text);return{type:"supsub",mode:this.mode,base:r,sup:n,sub:o,isFollowedByDelimiter:e}}}return r}parseFunction(e,r){const n=this.fetch(),o=n.text,a=Gr[o];if(!a)return null;if(this.consume(),r&&"atom"!==r&&!a.allowedInArgument)throw new t("Got function '"+o+"' with no arguments"+(r?" as "+r:""),n);if("text"===this.mode&&!a.allowedInText)throw new t("Can't use function '"+o+"' in text mode",n);if("math"===this.mode&&!1===a.allowedInMath)throw new t("Can't use function '"+o+"' in math mode",n);const i=this.prevAtomType,{args:s,optArgs:l}=this.parseArguments(o,a);return this.prevAtomType=i,this.callFunction(o,s,l,n,e)}callFunction(e,r,n,o,a){const i={funcName:e,parser:this,token:o,breakOnTokenText:a},s=Gr[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 o=[],a=[];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==a[0])&&(n="primitive");const l=this.parseGroupOfType(`argument to '${e}'`,n,s);if(s)a.push(l);else{if(null==l)throw new t("Null argument, please report this as a bug");o.push(l)}}return{args:o,optArgs:a}}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&&"\xa0"!==e&&"\ufe0e"!==e)break;this.consume()}}parseStringGroup(e,t){const r=this.gullet.scanArgument(t);if(null==r)return null;let n,o="";for(;"EOF"!==(n=this.fetch()).text;)o+=n.text,this.consume();return this.consume(),r.text=o,r}parseRegexGroup(e,r){const n=this.fetch();let o,a=n,i="";for(;"EOF"!==(o=this.fetch()).text&&e.test(i+o.text);)a=o,i+=a.text,this.consume();if(""===i)throw new t("Invalid "+r+": '"+n.text+"'",n);return n.range(a,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 o=ln.exec(r.text);if(!o)throw new t("Invalid size: '"+r.text+"'",r);const a={number:+(o[1]+o[2]),unit:o[3]};if(!_e(a))throw new t("Invalid unit: '"+a.unit+"'",r);return{type:"size",mode:this.mode,value:a,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 o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const a={type:"ordgroup",mode:this.mode,loc:r.loc,body:o};return t&&this.switchMode(n),a}parseGroup(e,r){const n=this.fetch(),o=n.text;let a;if("{"===o||"\\begingroup"===o||"\\toggle"===o){this.consume();const e="{"===o?"}":"\\begingroup"===o?"\\endgroup":"\\endtoggle";this.gullet.beginGroup();const t=this.parseExpression(!1,e),r=this.fetch();this.expect(e),this.gullet.endGroup(),a={type:"\\endtoggle"===r.text?"toggle":"ordgroup",mode:this.mode,loc:Ue.range(n,r),body:t,semisimple:"\\begingroup"===o||void 0}}else if(a=this.parseFunction(r,e)||this.parseSymbol(),null==a&&"\\"===o[0]&&!Object.prototype.hasOwnProperty.call(Qr,o)){if(this.settings.throwOnError)throw new t("Unsupported function name: "+o,n);a=this.formatUnsupportedCmd(o),this.consume()}return a}formLigatures(e){let t=e.length-1;for(let r=0;r<t;++r){const n=e[r],o=n.text;"-"===o&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:Ue.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Ue.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==o&&"`"!==o||e[r+1].text!==o||(e.splice(r,2,{type:"textord",mode:"text",loc:Ue.range(n,e[r+1]),text:o+o}),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(an,r[0])&&"math"===this.mode&&!P[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=an[r[0]]+r.slice(1)}const n="math"===this.mode?Jr.exec(r):null;let o;if(n&&(r=r.substring(0,n.index),"i"===r?r="\u0131":"j"===r&&(r="\u0237")),P[this.mode][r]){let t=P[this.mode][r].group;"bin"===t&&sn.includes(this.prevAtomType)&&(t="open");const n=Ue.range(e);let a;if(Object.prototype.hasOwnProperty.call(I,t)){const e=t;a={type:"atom",mode:this.mode,family:e,loc:n,text:r},"rel"!==e&&"bin"!==e||"text"!==this.prevAtomType||cn.test(n.lexer.input.slice(n.end))&&(a.needsSpacing=!0)}else{if(nn[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:nn[r]}}}a={type:t,mode:this.mode,loc:n,text:r}}o=a}else{if(!(r.charCodeAt(0)>=128||Jr.exec(r)))return null;if(this.settings.strict&&"math"===this.mode)throw new t(`Unicode text character "${r[0]}" used in math mode`,e);o={type:"textord",mode:"text",loc:Ue.range(e),text:r}}if(this.consume(),n)for(let r=0;r<n[0].length;r++){const a=n[0][r];if(!on[a])throw new t(`Unknown accent ' ${a}'`,e);const i=on[a][this.mode]||on[a].text;if(!i)throw new t(`Accent ${a} unsupported in ${this.mode} mode`,e);o={type:"accent",mode:this.mode,loc:Ue.range(e),label:i,isStretchy:!1,base:o}}return o}}const dn=function(e,r){if(!("string"==typeof e||e instanceof String))throw new TypeError("Temml can only parse string typed expression");const n=new un(e,r);delete n.gullet.macros.current["\\df@tag"];let o=n.parse();if(!(o.length>0&&o[0].type&&"array"===o[0].type&&o[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"),o=[{type:"tag",mode:"text",body:o,tag:n.parse()}]}return o},hn=[2,2,3,3];class mn{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 mn(t)}withLevel(e){return this.extend({level:e})}incrementLevel(){return this.extend({level:Math.min(this.level+1,3)})}inSubOrSup(){return this.extend({level:hn[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 pn(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 o=document.getElementsByClassName("tml-tageqn");for(const e of o){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 o=document.createElementNS("http://www.w3.org/1998/Math/MathML","mtext");o.appendChild(document.createTextNode(n));const a=document.createElementNS("http://www.w3.org/1998/Math/MathML","math");a.appendChild(o),e.textContent="",e.appendChild(a)}))}const fn=function(e,t,r){let n=r,o=0;const a=e.length;for(;n<t.length;){const r=t[n];if(o<=0&&t.slice(n,n+a)===e)return n;"\\"===r?n++:"{"===r?o++:"}"===r&&o--,n++}return-1},gn=/^\\(?:begin|(?:eq)?ref){/,bn=[{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}],xn={$:[{left:"$$",right:"$$",display:!0},{left:"$`",right:"`$",display:!1},{left:"$",right:"$",display:!1}],"(":[{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]},yn=[{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}],vn=function(e,r){const n=function(e,t){let r;const n=[],o=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(o),-1!==r;){r>0&&(n.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));const o=t.findIndex((t=>e.startsWith(t.left)));if(r=fn(t[o].right,e,t[o].left.length),-1===r)break;const a=e.slice(0,r+t[o].right.length),i=gn.test(a)?a:e.slice(t[o].left.length,r);n.push({type:"math",data:i,rawData:a,display:t[o].display}),e=e.slice(r+t[o].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 o=document.createDocumentFragment();for(let e=0;e<n.length;e++)if("text"===n[e].type)o.appendChild(document.createTextNode(n[e].data));else{const a=document.createElement("span");let i=n[e].data;r.displayMode=n[e].display;try{r.preProcess&&(i=r.preProcess(i)),temml.render(i,a,r)}catch(a){if(!(a instanceof t))throw a;r.errorCallback("Temml auto-render: Failed to parse `"+n[e].data+"` with ",a),o.appendChild(document.createTextNode(n[e].rawData));continue}o.appendChild(a)}return o},wn=function(e,t){for(let r=0;r<e.childNodes.length;r++){const n=e.childNodes[r];if(3===n.nodeType){const o=vn(n.textContent,t);o&&(r+=o.childNodes.length-1,e.replaceChild(o,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+" ")))&&wn(n,t)}}};let An=function(e,t,r={}){t.textContent="";const n="math"===t.tagName.toLowerCase();n&&(r.wrap="none");const o=Cn(e,r);n||o.children.length>1?(t.textContent="",o.children.forEach((e=>{t.appendChild(e.toNode())}))):t.appendChild(o.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."),An=function(){throw new t("Temml doesn't work in quirks mode.")});const Cn=function(e,r){const n=new h(r);try{const t=dn(e,n);return ye(t,e,new mn({level:n.displayMode?We:Ve,maxSize:n.maxSize}),n)}catch(r){return function(e,r,n){if(n.throwOnError||!(e instanceof t))throw e;const o=new E(["temml-error"],[new S(r+"\n\n"+e.toString())]);return o.style.color=n.errorColor,o.style.whiteSpace="pre-line",o}(r,e,n)}};var En={version:"0.13.01",render:An,renderToString:function(e,t){return Cn(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]);r.fences?r.delimiters=(e=>{if("$"===e||"("===e)return xn[e];if("$+"===e||"(+"===e)return xn[e.slice(0,1)].concat(yn);return"ams"===e?yn:"all"===e?xn["("].concat(xn.$).concat(yn):bn})(r.fences):r.delimiters=r.delimiters||bn,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||{},wn(e,r),pn(e)},postProcess:pn,ParseError:t,definePreamble:function(e,t){const r=new h(t);if(r.macros={},!("string"==typeof e||e instanceof String))throw new TypeError("Temml can only parse string typed expression");const n=new un(e,r,!0);delete n.gullet.macros.current["\\df@tag"];return n.parse()},__parse:function(e,t){const r=new h(t);return dn(e,r)},__renderToMathMLTree:Cn,__defineSymbol:F,__defineMacro:Ye};e.exports=En}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(98);return n=n.default})()));
|