1 line
206 KiB
JavaScript
1 line
206 KiB
JavaScript
|
|
!function(){"use strict";var t,e,r,o,n,i,a,s,l,h,c,u,p,d,f,m,y,v,b,x,g,M,_,w,C,j,S,O,T,L,B,P,H,A,k,N,E,D,W,R,I,F,J,V,z,X,K,q,U,Q,G,Y,Z,$,tt,et,rt,ot,nt,it,at,st,lt,ht,ct={7016:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],o=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.CHTML=void 0;var s=r(716),l=r(4477),h=r(4142),c=r(6914),u=r(6720),p=function(t){function e(e){void 0===e&&(e=null);var r=t.call(this,e,l.CHTMLWrapperFactory,h.TeXFont)||this;return r.chtmlStyles=null,r.font.adaptiveCSS(r.options.adaptiveCSS),r}return n(e,t),e.prototype.escaped=function(t,e){return this.setDocument(e),this.html("span",{},[this.text(t.math)])},e.prototype.styleSheet=function(r){if(this.chtmlStyles&&!this.options.adaptiveCSS)return this.chtmlStyles;var o=this.chtmlStyles=t.prototype.styleSheet.call(this,r);return this.adaptor.setAttribute(o,"id",e.STYLESHEETID),o},e.prototype.addClassStyles=function(e){var r;this.options.adaptiveCSS&&!e.used||(e.autoStyle&&"unknown"!==e.kind&&this.cssStyles.addStyles(((r={})["mjx-"+e.kind]={display:"inline-block","text-align":"left"},r)),t.prototype.addClassStyles.call(this,e))},e.prototype.processMath=function(t,e){this.factory.wrap(t).toCHTML(e)},e.prototype.clearCache=function(){var t,e;this.cssStyles.clear(),this.font.clearCache();try{for(var r=a(this.factory.getKinds()),o=r.next();!o.done;o=r.next()){var n=o.value;this.factory.getNodeClass(n).used=!1}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.reset=function(){this.clearCache()},e.prototype.unknownText=function(t,e){var r={},o=100/this.math.metrics.scale;if(100!==o&&(r["font-size"]=this.fixed(o,1)+"%",r.padding=c.em(75/o)+" 0 "+c.em(20/o)+" 0"),"-explicitFont"!==e){var n=u.unicodeChars(t);(1!==n.length||n[0]<119808||n[0]>120831)&&this.cssFontStyles(this.font.getCssFont(e),r)}return this.html("mjx-utext",{variant:e,style:r},[this.text(t)])},e.prototype.measureTextNode=function(t){var e=this.adaptor;t=e.clone(t);var r=this.html("mjx-measure-text",{style:{position:"absolute","white-space":"nowrap"}},[t]);e.append(e.parent(this.math.start.node),this.container),e.append(this.container,r);var o=e.nodeSize(t,this.math.metrics.em)[0]/this.math.metrics.scale;return e.remove(this.container),e.remove(r),{w:o,h:.75,d:.2}},e.NAME="CHTML",e.OPTIONS=i(i({},s.CommonOutputJax.OPTIONS),{adaptiveCSS:!0}),e.commonStyles={'mjx-container[jax="CHTML"]':{"line-height":0},'mjx-container [space="1"]':{"margin-left":".111em"},'mjx-container [space="2"]':{"margin-left":".167em"},'mjx-container [space="3"]':{"margin-left":".222em"},'mjx-container [space="4"]':{"margin-left":".278em"},'mjx-container [space="5"]':{"margin-left":".333em"},'mjx-container [rspace="1"]':{"margin-right":".111em"},'mjx-container [rspace="2"]':{"margin-right":".167em"},'mjx-container [rspace="3"]':{"margin-right":".222em"},'mjx-container [rspace="4"]':{"margin-right":".278em"},'mjx-container [rspace="5"]':{"margin-right":".333em"},'mjx-container [size="s"]':{"font-size":"70.7%"},'mjx-container [size="ss"]':{"font-size":"50%"},'mjx-container [size="Tn"]':{"font
|