afg-website/static/js/mathjax/input/asciimath.js

1 line
104 KiB
JavaScript
Raw Normal View History

2024-05-11 13:51:37 +02:00
!function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=16)}([function(t,e,i){"use strict";var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var a in e=arguments[i])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)},r=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,s=i.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)r.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(a)throw a.error}}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.AsciiMath=void 0;var o=i(3),l=i(4),u=i(12),h=i(1),p=function(t){function e(i){var n=this,a=r(u.separateOptions(i,h.FindAsciiMath.OPTIONS,e.OPTIONS),3),s=a[1],o=a[2];return(n=t.call(this,o)||this).findAsciiMath=n.options.FindAsciiMath||new h.FindAsciiMath(s),n}return a(e,t),e.prototype.compile=function(t,e){return l.LegacyAsciiMath.Compile(t.math,t.display)},e.prototype.findMath=function(t){return this.findAsciiMath.findMath(t)},e.NAME="AsciiMath",e.OPTIONS=s(s({},o.AbstractInputJax.OPTIONS),{FindAsciiMath:null}),e}(o.AbstractInputJax);e.AsciiMath=p},function(t,e,i){"use strict";var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,s=i.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)r.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(a)throw a.error}}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.FindAsciiMath=void 0;var r=i(13),o=i(14),l=i(15),u=function(t){function e(e){var i=t.call(this,e)||this;return i.getPatterns(),i}return a(e,t),e.prototype.getPatterns=function(){var t=this,e=this.options,i=[];this.end={},e.delimiters.forEach((function(e){return t.addPattern(i,e,!1)})),this.start=new RegExp(i.join("|"),"g"),this.hasPatterns=i.length>0},e.prototype.addPattern=function(t,e,i){var n=s(e,2),a=n[0],r=n[1];t.push(o.quotePattern(a)),this.end[a]=[r,i,new RegExp(o.quotePattern(r),"g")]},e.prototype.findEnd=function(t,e,i,n){var a=s(n,3),r=a[1],o=a[2],u=o.lastIndex=i.index+i[0].length,h=o.exec(t);return h?l.protoItem(i[0],t.substr(u,h.index-u),h[0],e,i.index,h.index+h[0].length,r):null},e.prototype.findMathInString=function(t,e,i){var n,a;for(this.start.lastIndex=0;n=this.start.exec(i);)(a=this.findEnd(i,e,n,this.end[n[0]]))&&(t.push(a),this.start.lastIndex=a.end.n)},e.prototype.findMath=function(t){var e=[];if(this.hasPatterns)for(var i=0,n=t.