(()=>{"use strict";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};t.r(e),t.d(e,{LinkedomAdaptor:()=>h,linkedomAdaptor:()=>p});const n=("undefined"!=typeof window?window:t.g).MathJax._.components.global,o=(n.GLOBAL,n.isObject,n.combineConfig,n.combineDefaults,n.combineWithMathJax),r=(n.MathJax,MathJax._.adaptors.HTMLAdaptor.HTMLAdaptor),a=MathJax._.util.Options,i=(a.isObject,a.APPEND,a.REMOVE,a.OPTIONS,a.Expandable,a.expandable,a.makeArray,a.keys,a.copy,a.insert,a.defaultOptions),s=a.userOptions,d=(a.selectOptions,a.selectOptionsFromKeys,a.separateOptions,a.lookup,MathJax._.util.AsyncLoad.asyncLoad);var c=function(t,e,n,o){return new(n||(n=Promise))(function(r,a){function i(t){try{d(o.next(t))}catch(t){a(t)}}function s(t){try{d(o.throw(t))}catch(t){a(t)}}function d(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(i,s)}d((o=o.apply(t,e||[])).next())})};const u={badCSS:!0,badSizes:!0};class h extends(function(t,e={}){var n;return e=s(i({},u),e),(n=class extends t{constructor(...t){super(t[0]),this.canMeasureNodes=!1;const e=this.constructor;this.options=s(i({},e.OPTIONS),t[1])}fontSize(t){return e.badCSS?this.options.fontSize:super.fontSize(t)}fontFamily(t){return e.badCSS?this.options.fontFamily:super.fontFamily(t)}nodeSize(t,o=1,r=null){if(!e.badSizes)return super.nodeSize(t,o,r);const a=this.textContent(t),i=Array.from(a.replace(n.cjkPattern,"")).length;return[(Array.from(a).length-i)*this.options.cjkCharWidth+i*this.options.unknownCharWidth,this.options.unknownCharHeight]}nodeBBox(t){return e.badSizes?{left:0,right:0,top:0,bottom:0}:super.nodeBBox(t)}createWorker(t,e){return c(this,void 0,void 0,function*(){const{Worker:n}=yield d("node:worker_threads");const{path:o,maps:r}=e,a=`${o}/${e.worker}`,i=new class{constructor(t,e={}){this.worker=new n(t,e)}addEventListener(t,e){this.worker.on(t,e)}postMessage(t){this.worker.postMessage({data:t})}terminate(){this.worker.terminate()}}(a,{type:"module",workerData:{maps:r}});return i.addEventListener("message",t),i})}}).OPTIONS=Object.assign(Object.assign({},e.badCSS?{fontSize:16,fontFamily:"Times"}:{}),e.badSizes?{cjkCharWidth:1,unknownCharWidth:.6,unknownCharHeight:.8}:{}),n.cjkPattern=new RegExp(["[","\u1100-\u115f","\u2329\u232a","\u2e80-\u303e","\u3040-\u3247","\u3250-\u4dbf","\u4e00-\ua4c6","\ua960-\ua97c","\uac00-\ud7a3","\uf900-\ufaff","\ufe10-\ufe19","\ufe30-\ufe6b","\uff01-\uff60\uffe0-\uffe6","\u{1b000}-\u{1b001}","\u{1f200}-\u{1f251}","\u{20000}-\u{3fffd}","]"].join(""),"gu"),n}(r)){parse(t,e="text/html"){return t.match(/^(?:\s|\n)*</)||(t="<html>"+t+"</html>"),this.parser.parseFromString(t,e)}serializeXML(t){return this.outerHTML(t)}}function p(t,e=null){const n=t("<html></html>");return n.HTMLCollection=class{},n.Text.prototype.splitText=function(t){const e=this.data;if(t>e.length)throw Error("Index Size Error");const o=n.document.createTextNode(e.substring(t));return this.parentNode.insertBefore(o,this.nextSibling),this.data=e.substring(0,t),o},new h(n,e)}MathJax.loader&&MathJax.loader.checkVersion("adaptors/linkedom","4.1.2","adaptors"),o({_:{adaptors:{linkedomAdaptor:e}}}),MathJax.startup&&(MathJax.startup.registerConstructor("linkedomAdaptor",t=>p(MathJax.config.LINKEDOM,t)),MathJax.startup.useAdaptor("linkedomAdaptor",!0))})();