1 |
- {"ast":null,"code":"\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __read = this && this.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CommonMpaddedMixin = void 0;\nfunction CommonMpaddedMixin(Base) {\n return function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n class_1.prototype.getDimens = function () {\n var values = this.node.attributes.getList('width', 'height', 'depth', 'lspace', 'voffset');\n var bbox = this.childNodes[0].getBBox();\n var w = bbox.w,\n h = bbox.h,\n d = bbox.d;\n var W = w,\n H = h,\n D = d,\n x = 0,\n y = 0,\n dx = 0;\n if (values.width !== '') w = this.dimen(values.width, bbox, 'w', 0);\n if (values.height !== '') h = this.dimen(values.height, bbox, 'h', 0);\n if (values.depth !== '') d = this.dimen(values.depth, bbox, 'd', 0);\n if (values.voffset !== '') y = this.dimen(values.voffset, bbox);\n if (values.lspace !== '') x = this.dimen(values.lspace, bbox);\n var align = this.node.attributes.get('data-align');\n if (align) {\n dx = this.getAlignX(w, bbox, align);\n }\n return [H, D, W, h - H, d - D, w - W, x, y, dx];\n };\n class_1.prototype.dimen = function (length, bbox, d, m) {\n if (d === void 0) {\n d = '';\n }\n if (m === void 0) {\n m = null;\n }\n length = String(length);\n var match = length.match(/width|height|depth/);\n var size = match ? bbox[match[0].charAt(0)] : d ? bbox[d] : 0;\n var dimen = this.length2em(length, size) || 0;\n if (length.match(/^[-+]/) && d) {\n dimen += size;\n }\n if (m != null) {\n dimen = Math.max(m, dimen);\n }\n return dimen;\n };\n class_1.prototype.computeBBox = function (bbox, recompute) {\n if (recompute === void 0) {\n recompute = false;\n }\n var _a = __read(this.getDimens(), 6),\n H = _a[0],\n D = _a[1],\n W = _a[2],\n dh = _a[3],\n dd = _a[4],\n dw = _a[5];\n bbox.w = W + dw;\n bbox.h = H + dh;\n bbox.d = D + dd;\n this.setChildPWidths(recompute, bbox.w);\n };\n class_1.prototype.getWrapWidth = function (_i) {\n return this.getBBox().w;\n };\n class_1.prototype.getChildAlign = function (_i) {\n return this.node.attributes.get('data-align') || 'left';\n };\n return class_1;\n }(Base);\n}\nexports.CommonMpaddedMixin = CommonMpaddedMixin;","map":{"version":3,"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","__read","o","n","m","Symbol","iterator","i","r","ar","e","next","done","push","value","error","defineProperty","exports","CommonMpaddedMixin","Base","_super","class_1","apply","arguments","getDimens","values","node","attributes","getList","bbox","childNodes","getBBox","w","h","W","H","D","x","y","dx","width","dimen","height","depth","voffset","lspace","align","get","getAlignX","length","match","size","charAt","length2em","Math","max","computeBBox","recompute","_a","dh","dd","dw","setChildPWidths","getWrapWidth","_i","getChildAlign"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/mathjax-full/js/output/common/Wrappers/mpadded.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CommonMpaddedMixin = void 0;\nfunction CommonMpaddedMixin(Base) {\n return (function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n class_1.prototype.getDimens = function () {\n var values = this.node.attributes.getList('width', 'height', 'depth', 'lspace', 'voffset');\n var bbox = this.childNodes[0].getBBox();\n var w = bbox.w, h = bbox.h, d = bbox.d;\n var W = w, H = h, D = d, x = 0, y = 0, dx = 0;\n if (values.width !== '')\n w = this.dimen(values.width, bbox, 'w', 0);\n if (values.height !== '')\n h = this.dimen(values.height, bbox, 'h', 0);\n if (values.depth !== '')\n d = this.dimen(values.depth, bbox, 'd', 0);\n if (values.voffset !== '')\n y = this.dimen(values.voffset, bbox);\n if (values.lspace !== '')\n x = this.dimen(values.lspace, bbox);\n var align = this.node.attributes.get('data-align');\n if (align) {\n dx = this.getAlignX(w, bbox, align);\n }\n return [H, D, W, h - H, d - D, w - W, x, y, dx];\n };\n class_1.prototype.dimen = function (length, bbox, d, m) {\n if (d === void 0) { d = ''; }\n if (m === void 0) { m = null; }\n length = String(length);\n var match = length.match(/width|height|depth/);\n var size = (match ? bbox[match[0].charAt(0)] :\n (d ? bbox[d] : 0));\n var dimen = (this.length2em(length, size) || 0);\n if (length.match(/^[-+]/) && d) {\n dimen += size;\n }\n if (m != null) {\n dimen = Math.max(m, dimen);\n }\n return dimen;\n };\n class_1.prototype.computeBBox = function (bbox, recompute) {\n if (recompute === void 0) { recompute = false; }\n var _a = __read(this.getDimens(), 6), H = _a[0], D = _a[1], W = _a[2], dh = _a[3], dd = _a[4], dw = _a[5];\n bbox.w = W + dw;\n bbox.h = H + dh;\n bbox.d = D + dd;\n this.setChildPWidths(recompute, bbox.w);\n };\n class_1.prototype.getWrapWidth = function (_i) {\n return this.getBBox().w;\n };\n class_1.prototype.getChildAlign = function (_i) {\n return this.node.attributes.get('data-align') || 'left';\n };\n return class_1;\n }(Base));\n}\nexports.CommonMpaddedMixin = CommonMpaddedMixin;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAI,IAAI,IAAI,IAAI,CAACA,SAAS,IAAM,YAAY;EACrD,IAAIC,aAAa,GAAG,SAAAA,CAAUC,CAAC,EAAEC,CAAC,EAAE;IAChCF,aAAa,GAAGG,MAAM,CAACC,cAAc,IAChC;MAAEC,SAAS,EAAE;IAAG,CAAC,YAAYC,KAAK,IAAI,UAAUL,CAAC,EAAEC,CAAC,EAAE;MAAED,CAAC,CAACI,SAAS,GAAGH,CAAC;IAAE,CAAE,IAC5E,UAAUD,CAAC,EAAEC,CAAC,EAAE;MAAE,KAAK,IAAIK,CAAC,IAAIL,CAAC,EAAE,IAAIC,MAAM,CAACK,SAAS,CAACC,cAAc,CAACC,IAAI,CAACR,CAAC,EAAEK,CAAC,CAAC,EAAEN,CAAC,CAACM,CAAC,CAAC,GAAGL,CAAC,CAACK,CAAC,CAAC;IAAE,CAAC;IACrG,OAAOP,aAAa,CAACC,CAAC,EAAEC,CAAC,CAAC;EAC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