{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newState = exports.STATE = exports.AbstractMathItem = exports.protoItem = void 0;\nfunction protoItem(open, math, close, n, start, end, display) {\n if (display === void 0) {\n display = null;\n }\n var item = {\n open: open,\n math: math,\n close: close,\n n: n,\n start: {\n n: start\n },\n end: {\n n: end\n },\n display: display\n };\n return item;\n}\nexports.protoItem = protoItem;\nvar AbstractMathItem = function () {\n function AbstractMathItem(math, jax, display, start, end) {\n if (display === void 0) {\n display = true;\n }\n if (start === void 0) {\n start = {\n i: 0,\n n: 0,\n delim: ''\n };\n }\n if (end === void 0) {\n end = {\n i: 0,\n n: 0,\n delim: ''\n };\n }\n this.root = null;\n this.typesetRoot = null;\n this.metrics = {};\n this.inputData = {};\n this.outputData = {};\n this._state = exports.STATE.UNPROCESSED;\n this.math = math;\n this.inputJax = jax;\n this.display = display;\n this.start = start;\n this.end = end;\n this.root = null;\n this.typesetRoot = null;\n this.metrics = {};\n this.inputData = {};\n this.outputData = {};\n }\n Object.defineProperty(AbstractMathItem.prototype, \"isEscaped\", {\n get: function () {\n return this.display === null;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMathItem.prototype.render = function (document) {\n document.renderActions.renderMath(this, document);\n };\n AbstractMathItem.prototype.rerender = function (document, start) {\n if (start === void 0) {\n start = exports.STATE.RERENDER;\n }\n if (this.state() >= start) {\n this.state(start - 1);\n }\n document.renderActions.renderMath(this, document, start);\n };\n AbstractMathItem.prototype.convert = function (document, end) {\n if (end === void 0) {\n end = exports.STATE.LAST;\n }\n document.renderActions.renderConvert(this, document, end);\n };\n AbstractMathItem.prototype.compile = function (document) {\n if (this.state() < exports.STATE.COMPILED) {\n this.root = this.inputJax.compile(this, document);\n this.state(exports.STATE.COMPILED);\n }\n };\n AbstractMathItem.prototype.typeset = function (document) {\n if (this.state() < exports.STATE.TYPESET) {\n this.typesetRoot = document.outputJax[this.isEscaped ? 'escaped' : 'typeset'](this, document);\n this.state(exports.STATE.TYPESET);\n }\n };\n AbstractMathItem.prototype.updateDocument = function (_document) {};\n AbstractMathItem.prototype.removeFromDocument = function (_restore) {\n if (_restore === void 0) {\n _restore = false;\n }\n };\n AbstractMathItem.prototype.setMetrics = function (em, ex, cwidth, lwidth, scale) {\n this.metrics = {\n em: em,\n ex: ex,\n containerWidth: cwidth,\n lineWidth: lwidth,\n scale: scale\n };\n };\n AbstractMathItem.prototype.state = function (state, restore) {\n if (state === void 0) {\n state = null;\n }\n if (restore === void 0) {\n restore = false;\n }\n if (state != null) {\n if (state < exports.STATE.INSERTED && this._state >= exports.STATE.INSERTED) {\n this.removeFromDocument(restore);\n }\n if (state < exports.STATE.TYPESET && this._state >= exports.STATE.TYPESET) {\n this.outputData = {};\n }\n if (state < exports.STATE.COMPILED && this._state >= exports.STATE.COMPILED) {\n this.inputData = {};\n }\n this._state = state;\n }\n return this._state;\n };\n AbstractMathItem.prototype.reset = function (restore) {\n if (restore === void 0) {\n restore = false;\n }\n this.state(exports.STATE.UNPROCESSED, restore);\n };\n return AbstractMathItem;\n}();\nexports.AbstractMathItem = AbstractMathItem;\nexports.STATE = {\n UNPROCESSED: 0,\n FINDMATH: 10,\n COMPILED: 20,\n CONVERT: 100,\n METRICS: 110,\n RERENDER: 125,\n TYPESET: 150,\n INSERTED: 200,\n LAST: 10000\n};\nfunction newState(name, state) {\n if (name in exports.STATE) {\n throw Error('State ' + name + ' already exists');\n }\n exports.STATE[name] = state;\n}\nexports.newState = newState;","map":{"version":3,"names":["Object","defineProperty","exports","value","newState","STATE","AbstractMathItem","protoItem","open","math","close","n","start","end","display","item","jax","i","delim","root","typesetRoot","metrics","inputData","outputData","_state","UNPROCESSED","inputJax","prototype","get","enumerable","configurable","render","document","renderActions","renderMath","rerender","RERENDER","state","convert","LAST","renderConvert","compile","COMPILED","typeset","TYPESET","outputJax","isEscaped","updateDocument","_document","removeFromDocument","_restore","setMetrics","em","ex","cwidth","lwidth","scale","containerWidth","lineWidth","restore","INSERTED","reset","FINDMATH","CONVERT","METRICS","name","Error"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/mathjax-full/js/core/MathItem.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.newState = exports.STATE = exports.AbstractMathItem = exports.protoItem = void 0;\nfunction protoItem(open, math, close, n, start, end, display) {\n if (display === void 0) { display = null; }\n var item = { open: open, math: math, close: close,\n n: n, start: { n: start }, end: { n: end }, display: display };\n return item;\n}\nexports.protoItem = protoItem;\nvar AbstractMathItem = (function () {\n function AbstractMathItem(math, jax, display, start, end) {\n if (display === void 0) { display = true; }\n if (start === void 0) { start = { i: 0, n: 0, delim: '' }; }\n if (end === void 0) { end = { i: 0, n: 0, delim: '' }; }\n this.root = null;\n this.typesetRoot = null;\n this.metrics = {};\n this.inputData = {};\n this.outputData = {};\n this._state = exports.STATE.UNPROCESSED;\n this.math = math;\n this.inputJax = jax;\n this.display = display;\n this.start = start;\n this.end = end;\n this.root = null;\n this.typesetRoot = null;\n this.metrics = {};\n this.inputData = {};\n this.outputData = {};\n }\n Object.defineProperty(AbstractMathItem.prototype, \"isEscaped\", {\n get: function () {\n return this.display === null;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMathItem.prototype.render = function (document) {\n document.renderActions.renderMath(this, document);\n };\n AbstractMathItem.prototype.rerender = function (document, start) {\n if (start === void 0) { start = exports.STATE.RERENDER; }\n if (this.state() >= start) {\n this.state(start - 1);\n }\n document.renderActions.renderMath(this, document, start);\n };\n AbstractMathItem.prototype.convert = function (document, end) {\n if (end === void 0) { end = exports.STATE.LAST; }\n document.renderActions.renderConvert(this, document, end);\n };\n AbstractMathItem.prototype.compile = function (document) {\n if (this.state() < exports.STATE.COMPILED) {\n this.root = this.inputJax.compile(this, document);\n this.state(exports.STATE.COMPILED);\n }\n };\n AbstractMathItem.prototype.typeset = function (document) {\n if (this.state() < exports.STATE.TYPESET) {\n this.typesetRoot = document.outputJax[this.isEscaped ? 'escaped' : 'typeset'](this, document);\n this.state(exports.STATE.TYPESET);\n }\n };\n AbstractMathItem.prototype.updateDocument = function (_document) { };\n AbstractMathItem.prototype.removeFromDocument = function (_restore) {\n if (_restore === void 0) { _restore = false; }\n };\n AbstractMathItem.prototype.setMetrics = function (em, ex, cwidth, lwidth, scale) {\n this.metrics = {\n em: em, ex: ex,\n containerWidth: cwidth,\n lineWidth: lwidth,\n scale: scale\n };\n };\n AbstractMathItem.prototype.state = function (state, restore) {\n if (state === void 0) { state = null; }\n if (restore === void 0) { restore = false; }\n if (state != null) {\n if (state < exports.STATE.INSERTED && this._state >= exports.STATE.INSERTED) {\n this.removeFromDocument(restore);\n }\n if (state < exports.STATE.TYPESET && this._state >= exports.STATE.TYPESET) {\n this.outputData = {};\n }\n if (state < exports.STATE.COMPILED && this._state >= exports.STATE.COMPILED) {\n this.inputData = {};\n }\n this._state = state;\n }\n return this._state;\n };\n AbstractMathItem.prototype.reset = function (restore) {\n if (restore === void 0) { restore = false; }\n this.state(exports.STATE.UNPROCESSED, restore);\n };\n return AbstractMathItem;\n}());\nexports.AbstractMathItem = AbstractMathItem;\nexports.STATE = {\n UNPROCESSED: 0,\n FINDMATH: 10,\n COMPILED: 20,\n CONVERT: 100,\n METRICS: 110,\n RERENDER: 125,\n TYPESET: 150,\n INSERTED: 200,\n LAST: 10000\n};\nfunction newState(name, state) {\n if (name in exports.STATE) {\n throw Error('State ' + name + ' already exists');\n }\n exports.STATE[name] = state;\n}\nexports.newState = newState;\n"],"mappings":"AAAA,YAAY;;AACZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7DD,OAAO,CAACE,QAAQ,GAAGF,OAAO,CAACG,KAAK,GAAGH,OAAO,CAACI,gBAAgB,GAAGJ,OAAO,CAACK,SAAS,GAAG,KAAK,CAAC;AACxF,SAASA,SAASA,CAACC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAEC,C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