10
2
Fork 0
has-writeup/mathjax/a11y/complexity.js

1 line
18 KiB
JavaScript
Raw Normal View History

2020-06-04 00:31:32 +00:00
!function(o){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=o,r.c=i,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(o,i,function(t){return e[t]}.bind(null,i));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=9)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=MathJax._.components.global.isObject,e.combineConfig=MathJax._.components.global.combineConfig,e.combineDefaults=MathJax._.components.global.combineDefaults,e.combineWithMathJax=MathJax._.components.global.combineWithMathJax,e.MathJax=MathJax._.components.global.MathJax},function(t,e,o){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},n=this&&this.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var i,r,n=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=n.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(r)throw r.error}}return s},l=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],i=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0});var c=o(7),p=o(2),u=o(3),h=o(5);function d(t,e){return r(o,i=t),o.prototype.complexity=function(t){this.state()<c.STATE.COMPLEXITY&&!this.isEscaped&&(this.enrich(t),e(this.root),this.state(c.STATE.COMPLEXITY))},o;function o(){return null!==i&&i.apply(this,arguments)||this}var i}function y(t){var e,n;return r(o,n=t),o.prototype.complexity=function(){var e,t;if(!this.processed.isSet("complexity")){try{for(var o=a(this.math),i=o.next();!i.done;i=o.next())i.value.complexity(this)}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this.processed.set("complexity")}return this},o.prototype.state=function(t,e){return void 0===e&&(e=!1),n.prototype.state.call(this,t,e),t<c.STATE.COMPLEXITY&&this.processed.clear("complexity"),this},(e=o).OPTIONS=s(s(s({},t.OPTIONS),u.ComplexityVisitor.OPTIONS),{ComplexityVisitor:u.ComplexityVisitor,renderActions:h.expandable(s(s({},t.OPTIONS.renderActions),{complexity:[c.STATE.COMPLEXITY]}))}),e;function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=n.apply(this,l(t))||this,i=o.constructor.ProcessBits;i.has("complexity")||i.allocate("complexity");var r=h.selectOptionsFromKeys(o.options,o.options.ComplexityVisitor.OPTIONS);o.complexityVisitor=new o.options.ComplexityVisitor(o.mmlFactory,r);return o.options.MathItem=d(o.options.MathItem,function(t){return o.complexityVisitor.visitTree(t)}),o}}c.newState("COMPLEXITY",40),e.ComplexityMat