hmn/public/mathjax.js

1 line
1.6 MiB
JavaScript
Raw Normal View History

2021-06-20 19:06:22 +00:00
!function(){"use strict";var Q={351:function(t,e,Q){var T,r=this&&this.__extends||(T=function(t,e){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var Q in e)Object.prototype.hasOwnProperty.call(e,Q)&&(t[Q]=e[Q])})(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 Q(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(Q.prototype=e.prototype,new Q)}),o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,Q=1,T=arguments.length;Q<T;Q++)for(var r in e=arguments[Q])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},i=this&&this.__read||function(t,e){var Q="function"==typeof Symbol&&t[Symbol.iterator];if(!Q)return t;var T,r,n=Q.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(T=n.next()).done;)o.push(T.value)}catch(t){r={error:t}}finally{try{T&&!T.done&&(Q=n.return)&&Q.call(n)}finally{if(r)throw r.error}}return o},a=this&&this.__spreadArray||function(t,e){for(var Q=0,T=e.length,r=t.length;Q<T;Q++,r++)t[r]=e[Q];return t},s=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,Q=e&&t[e],T=0;if(Q)return Q.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&T>=t.length?void 0:t)&&t[T++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AssistiveMmlHandler=e.AssistiveMmlMathDocumentMixin=e.AssistiveMmlMathItemMixin=e.LimitedMmlVisitor=void 0;var n,l=Q(4474),c=Q(9259),u=Q(7233),p=(n=c.SerializedMmlVisitor,r(h,n),h.prototype.getAttributes=function(t){return n.prototype.getAttributes.call(this,t).replace(/ ?id=".*?"/,"")},h);function h(){return null!==n&&n.apply(this,arguments)||this}function d(t){return r(e,Q=t),e.prototype.assistiveMml=function(t,e){void 0===e&&(e=!1),this.state()>=l.STATE.ASSISTIVEMML||(this.isEscaped||!t.options.enableAssistiveMml&&!e||(e=t.adaptor,t=t.toMML(this.root).replace(/\n */g,"").replace(/<!--.*?-->/g,""),t=e.firstChild(e.body(e.parse(t,"text/html"))),t=e.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[t]),e.setAttribute(e.firstChild(this.typesetRoot),"aria-hidden","true"),e.setStyle(this.typesetRoot,"position","relative"),e.append(this.typesetRoot,t)),this.state(l.STATE.ASSISTIVEMML))},e;function e(){return null!==Q&&Q.apply(this,arguments)||this}var Q}function f(t){var e,n;return r(Q,n=t),Q.prototype.toMML=function(t){return this.visitor.visitTree(t)},Q.prototype.assistiveMml=function(){var t,e;if(!this.processed.isSet("assistive-mml")){try{for(var Q=s(this.math),T=Q.next();!T.done;T=Q.next())T.value.assistiveMml(this)}catch(e){t={error:e}}finally{try{T&&!T.done&&(e=Q.return)&&e.call(Q)}finally{if(t)throw t.error}}this.processed.set("assistive-mml")}return this},Q.prototype.state=function(t,e){return n.prototype.state.call(this,t,e=void 0===e?!1:e),t<l.STATE.ASSISTIVEMML&&this.processed.clear("assistive-mml"),this},(e=Q).OPTIONS=o(o({},t.OPTIONS),{enableAssistiveMml:!0,renderActions:u.expandable(o(o({},t.OPTIONS.renderActions),{assistiveMml:[l.STATE.ASSISTIVEMML]}))}),e.assistiveStyles={"mjx-assistive-mml":{position:"absolute !important",top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)",padding:"1px 0px 0px 0px !important",border:"0px !important",display:"block !important",width:"auto !important",overflow:"hidden !important","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},'mjx-assistive-mml[display="block"]':{width:"100% !important"}},e;function Q(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var Q=n.apply(this,a([],i(t)))||this,T=Q.constructor,r=T.ProcessBits;return r.has("assistive-mml")||r.allocate("assistive-mml"),Q.visitor=new p(Q.mmlFactory),Q.options.MathItem=d(Q.options.MathItem),"addStyles"in Q&&Q.addStyles(T.assistiveStyles),Q}}e.LimitedMmlVisit