stuff
This commit is contained in:
parent
bc92231240
commit
b8225c639e
11904 changed files with 1472749 additions and 133 deletions
164
node_modules/mathjax-full/js/output/common/FontData.d.ts
generated
vendored
Normal file
164
node_modules/mathjax-full/js/output/common/FontData.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
import { OptionList } from '../../util/Options.js';
|
||||
import { StyleList } from '../../util/StyleList.js';
|
||||
export interface CharOptions {
|
||||
ic?: number;
|
||||
sk?: number;
|
||||
dx?: number;
|
||||
unknown?: boolean;
|
||||
smp?: number;
|
||||
}
|
||||
export declare type CharData<C extends CharOptions> = [
|
||||
number,
|
||||
number,
|
||||
number
|
||||
] | [
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
C
|
||||
];
|
||||
export declare type CharMap<C extends CharOptions> = {
|
||||
[n: number]: CharData<C>;
|
||||
};
|
||||
export declare type CharMapMap<C extends CharOptions> = {
|
||||
[name: string]: CharMap<C>;
|
||||
};
|
||||
export interface VariantData<C extends CharOptions> {
|
||||
linked: CharMap<C>[];
|
||||
chars: CharMap<C>;
|
||||
}
|
||||
export declare type VariantMap<C extends CharOptions, V extends VariantData<C>> = {
|
||||
[name: string]: V;
|
||||
};
|
||||
export declare type CssFontData = [string, boolean, boolean];
|
||||
export declare type CssFontMap = {
|
||||
[name: string]: CssFontData;
|
||||
};
|
||||
export declare const enum DIRECTION {
|
||||
None = 0,
|
||||
Vertical = 1,
|
||||
Horizontal = 2
|
||||
}
|
||||
export declare const V = DIRECTION.Vertical;
|
||||
export declare const H = DIRECTION.Horizontal;
|
||||
export declare type DelimiterData = {
|
||||
dir: DIRECTION;
|
||||
sizes?: number[];
|
||||
variants?: number[];
|
||||
schar?: number[];
|
||||
stretch?: number[];
|
||||
stretchv?: number[];
|
||||
HDW?: number[];
|
||||
min?: number;
|
||||
c?: number;
|
||||
fullExt?: [number, number];
|
||||
};
|
||||
export declare type DelimiterMap<D extends DelimiterData> = {
|
||||
[n: number]: D;
|
||||
};
|
||||
export declare const NOSTRETCH: DelimiterData;
|
||||
export declare type RemapData = string;
|
||||
export declare type RemapMap = {
|
||||
[key: number]: RemapData;
|
||||
};
|
||||
export declare type RemapMapMap = {
|
||||
[key: string]: RemapMap;
|
||||
};
|
||||
export declare type SmpMap = {
|
||||
[c: number]: number;
|
||||
};
|
||||
export declare type SmpData = [number, number, number?, number?, number?];
|
||||
export declare type FontParameters = {
|
||||
x_height: number;
|
||||
quad: number;
|
||||
num1: number;
|
||||
num2: number;
|
||||
num3: number;
|
||||
denom1: number;
|
||||
denom2: number;
|
||||
sup1: number;
|
||||
sup2: number;
|
||||
sup3: number;
|
||||
sub1: number;
|
||||
sub2: number;
|
||||
sup_drop: number;
|
||||
sub_drop: number;
|
||||
delim1: number;
|
||||
delim2: number;
|
||||
axis_height: number;
|
||||
rule_thickness: number;
|
||||
big_op_spacing1: number;
|
||||
big_op_spacing2: number;
|
||||
big_op_spacing3: number;
|
||||
big_op_spacing4: number;
|
||||
big_op_spacing5: number;
|
||||
surd_height: number;
|
||||
scriptspace: number;
|
||||
nulldelimiterspace: number;
|
||||
delimiterfactor: number;
|
||||
delimitershortfall: number;
|
||||
min_rule_thickness: number;
|
||||
separation_factor: number;
|
||||
extra_ic: number;
|
||||
};
|
||||
export declare class FontData<C extends CharOptions, V extends VariantData<C>, D extends DelimiterData> {
|
||||
static OPTIONS: OptionList;
|
||||
static JAX: string;
|
||||
static NAME: string;
|
||||
static defaultVariants: string[][];
|
||||
static defaultCssFonts: CssFontMap;
|
||||
protected static defaultCssFamilyPrefix: string;
|
||||
static VariantSmp: {
|
||||
[name: string]: SmpData;
|
||||
};
|
||||
static SmpRanges: number[][];
|
||||
static SmpRemap: SmpMap;
|
||||
static SmpRemapGreekU: SmpMap;
|
||||
static SmpRemapGreekL: SmpMap;
|
||||
protected static defaultAccentMap: RemapMap;
|
||||
protected static defaultMoMap: RemapMap;
|
||||
protected static defaultMnMap: RemapMap;
|
||||
static defaultParams: FontParameters;
|
||||
protected static defaultDelimiters: DelimiterMap<any>;
|
||||
protected static defaultChars: CharMapMap<any>;
|
||||
protected static defaultSizeVariants: string[];
|
||||
protected static defaultStretchVariants: string[];
|
||||
protected options: OptionList;
|
||||
protected variant: VariantMap<C, V>;
|
||||
protected delimiters: DelimiterMap<D>;
|
||||
protected sizeVariants: string[];
|
||||
protected stretchVariants: string[];
|
||||
protected cssFontMap: CssFontMap;
|
||||
cssFamilyPrefix: string;
|
||||
protected remapChars: RemapMapMap;
|
||||
params: FontParameters;
|
||||
skewIcFactor: number;
|
||||
protected _styles: StyleList;
|
||||
static charOptions(font: CharMap<CharOptions>, n: number): CharOptions;
|
||||
constructor(options?: OptionList);
|
||||
get styles(): StyleList;
|
||||
set styles(style: StyleList);
|
||||
createVariant(name: string, inherit?: string, link?: string): void;
|
||||
protected remapSmpChars(chars: CharMap<C>, name: string): void;
|
||||
protected smpChar(n: number): CharData<C>;
|
||||
createVariants(variants: string[][]): void;
|
||||
defineChars(name: string, chars: CharMap<C>): void;
|
||||
defineDelimiters(delims: DelimiterMap<D>): void;
|
||||
defineRemap(name: string, remap: RemapMap): void;
|
||||
getDelimiter(n: number): DelimiterData;
|
||||
getSizeVariant(n: number, i: number): string;
|
||||
getStretchVariant(n: number, i: number): string;
|
||||
getChar(name: string, n: number): CharData<C>;
|
||||
getVariant(name: string): V;
|
||||
getCssFont(variant: string): CssFontData;
|
||||
getFamily(family: string): string;
|
||||
getRemappedChar(name: string, c: number): string;
|
||||
}
|
||||
export interface FontDataClass<C extends CharOptions, V extends VariantData<C>, D extends DelimiterData> {
|
||||
OPTIONS: OptionList;
|
||||
defaultCssFonts: CssFontMap;
|
||||
defaultVariants: string[][];
|
||||
defaultParams: FontParameters;
|
||||
charOptions(font: CharMap<C>, n: number): C;
|
||||
new (...args: any[]): FontData<C, V, D>;
|
||||
}
|
||||
435
node_modules/mathjax-full/js/output/common/FontData.js
generated
vendored
Normal file
435
node_modules/mathjax-full/js/output/common/FontData.js
generated
vendored
Normal file
|
|
@ -0,0 +1,435 @@
|
|||
"use strict";
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FontData = exports.NOSTRETCH = exports.H = exports.V = void 0;
|
||||
var Options_js_1 = require("../../util/Options.js");
|
||||
exports.V = 1;
|
||||
exports.H = 2;
|
||||
exports.NOSTRETCH = { dir: 0 };
|
||||
var FontData = (function () {
|
||||
function FontData(options) {
|
||||
var e_1, _a, e_2, _b;
|
||||
if (options === void 0) { options = null; }
|
||||
this.variant = {};
|
||||
this.delimiters = {};
|
||||
this.cssFontMap = {};
|
||||
this.remapChars = {};
|
||||
this.skewIcFactor = .75;
|
||||
var CLASS = this.constructor;
|
||||
this.options = (0, Options_js_1.userOptions)((0, Options_js_1.defaultOptions)({}, CLASS.OPTIONS), options);
|
||||
this.params = __assign({}, CLASS.defaultParams);
|
||||
this.sizeVariants = __spreadArray([], __read(CLASS.defaultSizeVariants), false);
|
||||
this.stretchVariants = __spreadArray([], __read(CLASS.defaultStretchVariants), false);
|
||||
this.cssFontMap = __assign({}, CLASS.defaultCssFonts);
|
||||
try {
|
||||
for (var _c = __values(Object.keys(this.cssFontMap)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
||||
var name_1 = _d.value;
|
||||
if (this.cssFontMap[name_1][0] === 'unknown') {
|
||||
this.cssFontMap[name_1][0] = this.options.unknownFamily;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
this.cssFamilyPrefix = CLASS.defaultCssFamilyPrefix;
|
||||
this.createVariants(CLASS.defaultVariants);
|
||||
this.defineDelimiters(CLASS.defaultDelimiters);
|
||||
try {
|
||||
for (var _e = __values(Object.keys(CLASS.defaultChars)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
||||
var name_2 = _f.value;
|
||||
this.defineChars(name_2, CLASS.defaultChars[name_2]);
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
this.defineRemap('accent', CLASS.defaultAccentMap);
|
||||
this.defineRemap('mo', CLASS.defaultMoMap);
|
||||
this.defineRemap('mn', CLASS.defaultMnMap);
|
||||
}
|
||||
FontData.charOptions = function (font, n) {
|
||||
var char = font[n];
|
||||
if (char.length === 3) {
|
||||
char[3] = {};
|
||||
}
|
||||
return char[3];
|
||||
};
|
||||
Object.defineProperty(FontData.prototype, "styles", {
|
||||
get: function () {
|
||||
return this._styles;
|
||||
},
|
||||
set: function (style) {
|
||||
this._styles = style;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
FontData.prototype.createVariant = function (name, inherit, link) {
|
||||
if (inherit === void 0) { inherit = null; }
|
||||
if (link === void 0) { link = null; }
|
||||
var variant = {
|
||||
linked: [],
|
||||
chars: (inherit ? Object.create(this.variant[inherit].chars) : {})
|
||||
};
|
||||
if (link && this.variant[link]) {
|
||||
Object.assign(variant.chars, this.variant[link].chars);
|
||||
this.variant[link].linked.push(variant.chars);
|
||||
variant.chars = Object.create(variant.chars);
|
||||
}
|
||||
this.remapSmpChars(variant.chars, name);
|
||||
this.variant[name] = variant;
|
||||
};
|
||||
FontData.prototype.remapSmpChars = function (chars, name) {
|
||||
var e_3, _a, e_4, _b;
|
||||
var CLASS = this.constructor;
|
||||
if (CLASS.VariantSmp[name]) {
|
||||
var SmpRemap = CLASS.SmpRemap;
|
||||
var SmpGreek = [null, null, CLASS.SmpRemapGreekU, CLASS.SmpRemapGreekL];
|
||||
try {
|
||||
for (var _c = __values(CLASS.SmpRanges), _d = _c.next(); !_d.done; _d = _c.next()) {
|
||||
var _e = __read(_d.value, 3), i = _e[0], lo = _e[1], hi = _e[2];
|
||||
var base = CLASS.VariantSmp[name][i];
|
||||
if (!base)
|
||||
continue;
|
||||
for (var n = lo; n <= hi; n++) {
|
||||
if (n === 0x3A2)
|
||||
continue;
|
||||
var smp = base + n - lo;
|
||||
chars[n] = this.smpChar(SmpRemap[smp] || smp);
|
||||
}
|
||||
if (SmpGreek[i]) {
|
||||
try {
|
||||
for (var _f = (e_4 = void 0, __values(Object.keys(SmpGreek[i]).map(function (x) { return parseInt(x); }))), _g = _f.next(); !_g.done; _g = _f.next()) {
|
||||
var n = _g.value;
|
||||
chars[n] = this.smpChar(base + SmpGreek[i][n]);
|
||||
}
|
||||
}
|
||||
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
||||
}
|
||||
finally { if (e_4) throw e_4.error; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
}
|
||||
if (name === 'bold') {
|
||||
chars[0x3DC] = this.smpChar(0x1D7CA);
|
||||
chars[0x3DD] = this.smpChar(0x1D7CB);
|
||||
}
|
||||
};
|
||||
FontData.prototype.smpChar = function (n) {
|
||||
return [, , , { smp: n }];
|
||||
};
|
||||
FontData.prototype.createVariants = function (variants) {
|
||||
var e_5, _a;
|
||||
try {
|
||||
for (var variants_1 = __values(variants), variants_1_1 = variants_1.next(); !variants_1_1.done; variants_1_1 = variants_1.next()) {
|
||||
var variant = variants_1_1.value;
|
||||
this.createVariant(variant[0], variant[1], variant[2]);
|
||||
}
|
||||
}
|
||||
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (variants_1_1 && !variants_1_1.done && (_a = variants_1.return)) _a.call(variants_1);
|
||||
}
|
||||
finally { if (e_5) throw e_5.error; }
|
||||
}
|
||||
};
|
||||
FontData.prototype.defineChars = function (name, chars) {
|
||||
var e_6, _a;
|
||||
var variant = this.variant[name];
|
||||
Object.assign(variant.chars, chars);
|
||||
try {
|
||||
for (var _b = __values(variant.linked), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var link = _c.value;
|
||||
Object.assign(link, chars);
|
||||
}
|
||||
}
|
||||
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_6) throw e_6.error; }
|
||||
}
|
||||
};
|
||||
FontData.prototype.defineDelimiters = function (delims) {
|
||||
Object.assign(this.delimiters, delims);
|
||||
};
|
||||
FontData.prototype.defineRemap = function (name, remap) {
|
||||
if (!this.remapChars.hasOwnProperty(name)) {
|
||||
this.remapChars[name] = {};
|
||||
}
|
||||
Object.assign(this.remapChars[name], remap);
|
||||
};
|
||||
FontData.prototype.getDelimiter = function (n) {
|
||||
return this.delimiters[n];
|
||||
};
|
||||
FontData.prototype.getSizeVariant = function (n, i) {
|
||||
if (this.delimiters[n].variants) {
|
||||
i = this.delimiters[n].variants[i];
|
||||
}
|
||||
return this.sizeVariants[i];
|
||||
};
|
||||
FontData.prototype.getStretchVariant = function (n, i) {
|
||||
return this.stretchVariants[this.delimiters[n].stretchv ? this.delimiters[n].stretchv[i] : 0];
|
||||
};
|
||||
FontData.prototype.getChar = function (name, n) {
|
||||
return this.variant[name].chars[n];
|
||||
};
|
||||
FontData.prototype.getVariant = function (name) {
|
||||
return this.variant[name];
|
||||
};
|
||||
FontData.prototype.getCssFont = function (variant) {
|
||||
return this.cssFontMap[variant] || ['serif', false, false];
|
||||
};
|
||||
FontData.prototype.getFamily = function (family) {
|
||||
return (this.cssFamilyPrefix ? this.cssFamilyPrefix + ', ' + family : family);
|
||||
};
|
||||
FontData.prototype.getRemappedChar = function (name, c) {
|
||||
var map = this.remapChars[name] || {};
|
||||
return map[c];
|
||||
};
|
||||
FontData.OPTIONS = {
|
||||
unknownFamily: 'serif'
|
||||
};
|
||||
FontData.JAX = 'common';
|
||||
FontData.NAME = '';
|
||||
FontData.defaultVariants = [
|
||||
['normal'],
|
||||
['bold', 'normal'],
|
||||
['italic', 'normal'],
|
||||
['bold-italic', 'italic', 'bold'],
|
||||
['double-struck', 'bold'],
|
||||
['fraktur', 'normal'],
|
||||
['bold-fraktur', 'bold', 'fraktur'],
|
||||
['script', 'italic'],
|
||||
['bold-script', 'bold-italic', 'script'],
|
||||
['sans-serif', 'normal'],
|
||||
['bold-sans-serif', 'bold', 'sans-serif'],
|
||||
['sans-serif-italic', 'italic', 'sans-serif'],
|
||||
['sans-serif-bold-italic', 'bold-italic', 'bold-sans-serif'],
|
||||
['monospace', 'normal']
|
||||
];
|
||||
FontData.defaultCssFonts = {
|
||||
normal: ['unknown', false, false],
|
||||
bold: ['unknown', false, true],
|
||||
italic: ['unknown', true, false],
|
||||
'bold-italic': ['unknown', true, true],
|
||||
'double-struck': ['unknown', false, true],
|
||||
fraktur: ['unknown', false, false],
|
||||
'bold-fraktur': ['unknown', false, true],
|
||||
script: ['cursive', false, false],
|
||||
'bold-script': ['cursive', false, true],
|
||||
'sans-serif': ['sans-serif', false, false],
|
||||
'bold-sans-serif': ['sans-serif', false, true],
|
||||
'sans-serif-italic': ['sans-serif', true, false],
|
||||
'sans-serif-bold-italic': ['sans-serif', true, true],
|
||||
monospace: ['monospace', false, false]
|
||||
};
|
||||
FontData.defaultCssFamilyPrefix = '';
|
||||
FontData.VariantSmp = {
|
||||
bold: [0x1D400, 0x1D41A, 0x1D6A8, 0x1D6C2, 0x1D7CE],
|
||||
italic: [0x1D434, 0x1D44E, 0x1D6E2, 0x1D6FC],
|
||||
'bold-italic': [0x1D468, 0x1D482, 0x1D71C, 0x1D736],
|
||||
script: [0x1D49C, 0x1D4B6],
|
||||
'bold-script': [0x1D4D0, 0x1D4EA],
|
||||
fraktur: [0x1D504, 0x1D51E],
|
||||
'double-struck': [0x1D538, 0x1D552, , , 0x1D7D8],
|
||||
'bold-fraktur': [0x1D56C, 0x1D586],
|
||||
'sans-serif': [0x1D5A0, 0x1D5BA, , , 0x1D7E2],
|
||||
'bold-sans-serif': [0x1D5D4, 0x1D5EE, 0x1D756, 0x1D770, 0x1D7EC],
|
||||
'sans-serif-italic': [0x1D608, 0x1D622],
|
||||
'sans-serif-bold-italic': [0x1D63C, 0x1D656, 0x1D790, 0x1D7AA],
|
||||
'monospace': [0x1D670, 0x1D68A, , , 0x1D7F6]
|
||||
};
|
||||
FontData.SmpRanges = [
|
||||
[0, 0x41, 0x5A],
|
||||
[1, 0x61, 0x7A],
|
||||
[2, 0x391, 0x3A9],
|
||||
[3, 0x3B1, 0x3C9],
|
||||
[4, 0x30, 0x39]
|
||||
];
|
||||
FontData.SmpRemap = {
|
||||
0x1D455: 0x210E,
|
||||
0x1D49D: 0x212C,
|
||||
0x1D4A0: 0x2130,
|
||||
0x1D4A1: 0x2131,
|
||||
0x1D4A3: 0x210B,
|
||||
0x1D4A4: 0x2110,
|
||||
0x1D4A7: 0x2112,
|
||||
0x1D4A8: 0x2133,
|
||||
0x1D4AD: 0x211B,
|
||||
0x1D4BA: 0x212F,
|
||||
0x1D4BC: 0x210A,
|
||||
0x1D4C4: 0x2134,
|
||||
0x1D506: 0x212D,
|
||||
0x1D50B: 0x210C,
|
||||
0x1D50C: 0x2111,
|
||||
0x1D515: 0x211C,
|
||||
0x1D51D: 0x2128,
|
||||
0x1D53A: 0x2102,
|
||||
0x1D53F: 0x210D,
|
||||
0x1D545: 0x2115,
|
||||
0x1D547: 0x2119,
|
||||
0x1D548: 0x211A,
|
||||
0x1D549: 0x211D,
|
||||
0x1D551: 0x2124,
|
||||
};
|
||||
FontData.SmpRemapGreekU = {
|
||||
0x2207: 0x19,
|
||||
0x03F4: 0x11
|
||||
};
|
||||
FontData.SmpRemapGreekL = {
|
||||
0x3D1: 0x1B,
|
||||
0x3D5: 0x1D,
|
||||
0x3D6: 0x1F,
|
||||
0x3F0: 0x1C,
|
||||
0x3F1: 0x1E,
|
||||
0x3F5: 0x1A,
|
||||
0x2202: 0x19
|
||||
};
|
||||
FontData.defaultAccentMap = {
|
||||
0x0300: '\u02CB',
|
||||
0x0301: '\u02CA',
|
||||
0x0302: '\u02C6',
|
||||
0x0303: '\u02DC',
|
||||
0x0304: '\u02C9',
|
||||
0x0306: '\u02D8',
|
||||
0x0307: '\u02D9',
|
||||
0x0308: '\u00A8',
|
||||
0x030A: '\u02DA',
|
||||
0x030C: '\u02C7',
|
||||
0x2192: '\u20D7',
|
||||
0x2032: '\'',
|
||||
0x2033: '\'\'',
|
||||
0x2034: '\'\'\'',
|
||||
0x2035: '`',
|
||||
0x2036: '``',
|
||||
0x2037: '```',
|
||||
0x2057: '\'\'\'\'',
|
||||
0x20D0: '\u21BC',
|
||||
0x20D1: '\u21C0',
|
||||
0x20D6: '\u2190',
|
||||
0x20E1: '\u2194',
|
||||
0x20F0: '*',
|
||||
0x20DB: '...',
|
||||
0x20DC: '....',
|
||||
0x20EC: '\u21C1',
|
||||
0x20ED: '\u21BD',
|
||||
0x20EE: '\u2190',
|
||||
0x20EF: '\u2192'
|
||||
};
|
||||
FontData.defaultMoMap = {
|
||||
0x002D: '\u2212'
|
||||
};
|
||||
FontData.defaultMnMap = {
|
||||
0x002D: '\u2212'
|
||||
};
|
||||
FontData.defaultParams = {
|
||||
x_height: .442,
|
||||
quad: 1,
|
||||
num1: .676,
|
||||
num2: .394,
|
||||
num3: .444,
|
||||
denom1: .686,
|
||||
denom2: .345,
|
||||
sup1: .413,
|
||||
sup2: .363,
|
||||
sup3: .289,
|
||||
sub1: .15,
|
||||
sub2: .247,
|
||||
sup_drop: .386,
|
||||
sub_drop: .05,
|
||||
delim1: 2.39,
|
||||
delim2: 1.0,
|
||||
axis_height: .25,
|
||||
rule_thickness: .06,
|
||||
big_op_spacing1: .111,
|
||||
big_op_spacing2: .167,
|
||||
big_op_spacing3: .2,
|
||||
big_op_spacing4: .6,
|
||||
big_op_spacing5: .1,
|
||||
surd_height: .075,
|
||||
scriptspace: .05,
|
||||
nulldelimiterspace: .12,
|
||||
delimiterfactor: 901,
|
||||
delimitershortfall: .3,
|
||||
min_rule_thickness: 1.25,
|
||||
separation_factor: 1.75,
|
||||
extra_ic: .033
|
||||
};
|
||||
FontData.defaultDelimiters = {};
|
||||
FontData.defaultChars = {};
|
||||
FontData.defaultSizeVariants = [];
|
||||
FontData.defaultStretchVariants = [];
|
||||
return FontData;
|
||||
}());
|
||||
exports.FontData = FontData;
|
||||
//# sourceMappingURL=FontData.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/FontData.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/FontData.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
54
node_modules/mathjax-full/js/output/common/Notation.d.ts
generated
vendored
Normal file
54
node_modules/mathjax-full/js/output/common/Notation.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import { AnyWrapper } from './Wrapper.js';
|
||||
import { CommonMenclose } from './Wrappers/menclose.js';
|
||||
export declare const ARROWX = 4, ARROWDX = 1, ARROWY = 2;
|
||||
export declare const THICKNESS = 0.067;
|
||||
export declare const PADDING = 0.2;
|
||||
export declare const SOLID: string;
|
||||
export declare type Menclose = CommonMenclose<any, any, any>;
|
||||
export declare type PaddingData = [number, number, number, number];
|
||||
export declare type Renderer<W extends AnyWrapper, N> = (node: W, child: N) => void;
|
||||
export declare type BBoxExtender<W extends AnyWrapper> = (node: W) => PaddingData;
|
||||
export declare type BBoxBorder<W extends AnyWrapper> = (node: W) => PaddingData;
|
||||
export declare type Initializer<W extends AnyWrapper> = (node: W) => void;
|
||||
export declare type NotationDef<W extends AnyWrapper, N> = {
|
||||
renderer: Renderer<W, N>;
|
||||
bbox: BBoxExtender<W>;
|
||||
border?: BBoxBorder<W>;
|
||||
renderChild?: boolean;
|
||||
init?: Initializer<W>;
|
||||
remove?: string;
|
||||
};
|
||||
export declare type DefPair<W extends AnyWrapper, N> = [string, NotationDef<W, N>];
|
||||
export declare type DefList<W extends AnyWrapper, N> = Map<string, NotationDef<W, N>>;
|
||||
export declare type DefPairF<T, W extends AnyWrapper, N> = (name: T) => DefPair<W, N>;
|
||||
export declare type List<W extends AnyWrapper, N> = {
|
||||
[notation: string]: NotationDef<W, N>;
|
||||
};
|
||||
export declare const sideIndex: {
|
||||
top: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
left: number;
|
||||
};
|
||||
export declare type Side = keyof typeof sideIndex;
|
||||
export declare const sideNames: ("left" | "top" | "bottom" | "right")[];
|
||||
export declare const fullBBox: BBoxExtender<Menclose>;
|
||||
export declare const fullPadding: BBoxExtender<Menclose>;
|
||||
export declare const fullBorder: BBoxBorder<Menclose>;
|
||||
export declare const arrowHead: (node: Menclose) => number;
|
||||
export declare const arrowBBoxHD: (node: Menclose, TRBL: PaddingData) => PaddingData;
|
||||
export declare const arrowBBoxW: (node: Menclose, TRBL: PaddingData) => PaddingData;
|
||||
export declare const arrowDef: {
|
||||
[name: string]: [number, boolean, boolean, string];
|
||||
};
|
||||
export declare const diagonalArrowDef: {
|
||||
[name: string]: [number, number, boolean, string];
|
||||
};
|
||||
export declare const arrowBBox: {
|
||||
[name: string]: BBoxExtender<Menclose>;
|
||||
};
|
||||
export declare const CommonBorder: <W extends Menclose, N>(render: Renderer<W, N>) => DefPairF<"left" | "top" | "bottom" | "right", W, N>;
|
||||
export declare const CommonBorder2: <W extends Menclose, N>(render: Renderer<W, N>) => (name: string, side1: Side, side2: Side) => DefPair<W, N>;
|
||||
export declare const CommonDiagonalStrike: <W extends Menclose, N>(render: (sname: string) => Renderer<W, N>) => DefPairF<string, W, N>;
|
||||
export declare const CommonDiagonalArrow: <W extends Menclose, N>(render: Renderer<W, N>) => DefPairF<string, W, N>;
|
||||
export declare const CommonArrow: <W extends Menclose, N>(render: Renderer<W, N>) => DefPairF<string, W, N>;
|
||||
164
node_modules/mathjax-full/js/output/common/Notation.js
generated
vendored
Normal file
164
node_modules/mathjax-full/js/output/common/Notation.js
generated
vendored
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
"use strict";
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonArrow = exports.CommonDiagonalArrow = exports.CommonDiagonalStrike = exports.CommonBorder2 = exports.CommonBorder = exports.arrowBBox = exports.diagonalArrowDef = exports.arrowDef = exports.arrowBBoxW = exports.arrowBBoxHD = exports.arrowHead = exports.fullBorder = exports.fullPadding = exports.fullBBox = exports.sideNames = exports.sideIndex = exports.SOLID = exports.PADDING = exports.THICKNESS = exports.ARROWY = exports.ARROWDX = exports.ARROWX = void 0;
|
||||
exports.ARROWX = 4, exports.ARROWDX = 1, exports.ARROWY = 2;
|
||||
exports.THICKNESS = .067;
|
||||
exports.PADDING = .2;
|
||||
exports.SOLID = exports.THICKNESS + 'em solid';
|
||||
exports.sideIndex = { top: 0, right: 1, bottom: 2, left: 3 };
|
||||
exports.sideNames = Object.keys(exports.sideIndex);
|
||||
exports.fullBBox = (function (node) { return new Array(4).fill(node.thickness + node.padding); });
|
||||
exports.fullPadding = (function (node) { return new Array(4).fill(node.padding); });
|
||||
exports.fullBorder = (function (node) { return new Array(4).fill(node.thickness); });
|
||||
var arrowHead = function (node) {
|
||||
return Math.max(node.padding, node.thickness * (node.arrowhead.x + node.arrowhead.dx + 1));
|
||||
};
|
||||
exports.arrowHead = arrowHead;
|
||||
var arrowBBoxHD = function (node, TRBL) {
|
||||
if (node.childNodes[0]) {
|
||||
var _a = node.childNodes[0].getBBox(), h = _a.h, d = _a.d;
|
||||
TRBL[0] = TRBL[2] = Math.max(0, node.thickness * node.arrowhead.y - (h + d) / 2);
|
||||
}
|
||||
return TRBL;
|
||||
};
|
||||
exports.arrowBBoxHD = arrowBBoxHD;
|
||||
var arrowBBoxW = function (node, TRBL) {
|
||||
if (node.childNodes[0]) {
|
||||
var w = node.childNodes[0].getBBox().w;
|
||||
TRBL[1] = TRBL[3] = Math.max(0, node.thickness * node.arrowhead.y - w / 2);
|
||||
}
|
||||
return TRBL;
|
||||
};
|
||||
exports.arrowBBoxW = arrowBBoxW;
|
||||
exports.arrowDef = {
|
||||
up: [-Math.PI / 2, false, true, 'verticalstrike'],
|
||||
down: [Math.PI / 2, false, true, 'verticakstrike'],
|
||||
right: [0, false, false, 'horizontalstrike'],
|
||||
left: [Math.PI, false, false, 'horizontalstrike'],
|
||||
updown: [Math.PI / 2, true, true, 'verticalstrike uparrow downarrow'],
|
||||
leftright: [0, true, false, 'horizontalstrike leftarrow rightarrow']
|
||||
};
|
||||
exports.diagonalArrowDef = {
|
||||
updiagonal: [-1, 0, false, 'updiagonalstrike northeastarrow'],
|
||||
northeast: [-1, 0, false, 'updiagonalstrike updiagonalarrow'],
|
||||
southeast: [1, 0, false, 'downdiagonalstrike'],
|
||||
northwest: [1, Math.PI, false, 'downdiagonalstrike'],
|
||||
southwest: [-1, Math.PI, false, 'updiagonalstrike'],
|
||||
northeastsouthwest: [-1, 0, true, 'updiagonalstrike northeastarrow updiagonalarrow southwestarrow'],
|
||||
northwestsoutheast: [1, 0, true, 'downdiagonalstrike northwestarrow southeastarrow']
|
||||
};
|
||||
exports.arrowBBox = {
|
||||
up: function (node) { return (0, exports.arrowBBoxW)(node, [(0, exports.arrowHead)(node), 0, node.padding, 0]); },
|
||||
down: function (node) { return (0, exports.arrowBBoxW)(node, [node.padding, 0, (0, exports.arrowHead)(node), 0]); },
|
||||
right: function (node) { return (0, exports.arrowBBoxHD)(node, [0, (0, exports.arrowHead)(node), 0, node.padding]); },
|
||||
left: function (node) { return (0, exports.arrowBBoxHD)(node, [0, node.padding, 0, (0, exports.arrowHead)(node)]); },
|
||||
updown: function (node) { return (0, exports.arrowBBoxW)(node, [(0, exports.arrowHead)(node), 0, (0, exports.arrowHead)(node), 0]); },
|
||||
leftright: function (node) { return (0, exports.arrowBBoxHD)(node, [0, (0, exports.arrowHead)(node), 0, (0, exports.arrowHead)(node)]); }
|
||||
};
|
||||
var CommonBorder = function (render) {
|
||||
return function (side) {
|
||||
var i = exports.sideIndex[side];
|
||||
return [side, {
|
||||
renderer: render,
|
||||
bbox: function (node) {
|
||||
var bbox = [0, 0, 0, 0];
|
||||
bbox[i] = node.thickness + node.padding;
|
||||
return bbox;
|
||||
},
|
||||
border: function (node) {
|
||||
var bbox = [0, 0, 0, 0];
|
||||
bbox[i] = node.thickness;
|
||||
return bbox;
|
||||
}
|
||||
}];
|
||||
};
|
||||
};
|
||||
exports.CommonBorder = CommonBorder;
|
||||
var CommonBorder2 = function (render) {
|
||||
return function (name, side1, side2) {
|
||||
var i1 = exports.sideIndex[side1];
|
||||
var i2 = exports.sideIndex[side2];
|
||||
return [name, {
|
||||
renderer: render,
|
||||
bbox: function (node) {
|
||||
var t = node.thickness + node.padding;
|
||||
var bbox = [0, 0, 0, 0];
|
||||
bbox[i1] = bbox[i2] = t;
|
||||
return bbox;
|
||||
},
|
||||
border: function (node) {
|
||||
var bbox = [0, 0, 0, 0];
|
||||
bbox[i1] = bbox[i2] = node.thickness;
|
||||
return bbox;
|
||||
},
|
||||
remove: side1 + ' ' + side2
|
||||
}];
|
||||
};
|
||||
};
|
||||
exports.CommonBorder2 = CommonBorder2;
|
||||
var CommonDiagonalStrike = function (render) {
|
||||
return function (name) {
|
||||
var cname = 'mjx-' + name.charAt(0) + 'strike';
|
||||
return [name + 'diagonalstrike', {
|
||||
renderer: render(cname),
|
||||
bbox: exports.fullBBox
|
||||
}];
|
||||
};
|
||||
};
|
||||
exports.CommonDiagonalStrike = CommonDiagonalStrike;
|
||||
var CommonDiagonalArrow = function (render) {
|
||||
return function (name) {
|
||||
var _a = __read(exports.diagonalArrowDef[name], 4), c = _a[0], pi = _a[1], double = _a[2], remove = _a[3];
|
||||
return [name + 'arrow', {
|
||||
renderer: function (node, _child) {
|
||||
var _a = __read(node.arrowAW(), 2), a = _a[0], W = _a[1];
|
||||
var arrow = node.arrow(W, c * (a - pi), double);
|
||||
render(node, arrow);
|
||||
},
|
||||
bbox: function (node) {
|
||||
var _a = node.arrowData(), a = _a.a, x = _a.x, y = _a.y;
|
||||
var _b = __read([node.arrowhead.x, node.arrowhead.y, node.arrowhead.dx], 3), ax = _b[0], ay = _b[1], adx = _b[2];
|
||||
var _c = __read(node.getArgMod(ax + adx, ay), 2), b = _c[0], ar = _c[1];
|
||||
var dy = y + (b > a ? node.thickness * ar * Math.sin(b - a) : 0);
|
||||
var dx = x + (b > Math.PI / 2 - a ? node.thickness * ar * Math.sin(b + a - Math.PI / 2) : 0);
|
||||
return [dy, dx, dy, dx];
|
||||
},
|
||||
remove: remove
|
||||
}];
|
||||
};
|
||||
};
|
||||
exports.CommonDiagonalArrow = CommonDiagonalArrow;
|
||||
var CommonArrow = function (render) {
|
||||
return function (name) {
|
||||
var _a = __read(exports.arrowDef[name], 4), angle = _a[0], double = _a[1], isVertical = _a[2], remove = _a[3];
|
||||
return [name + 'arrow', {
|
||||
renderer: function (node, _child) {
|
||||
var _a = node.getBBox(), w = _a.w, h = _a.h, d = _a.d;
|
||||
var _b = __read((isVertical ? [h + d, 'X'] : [w, 'Y']), 2), W = _b[0], offset = _b[1];
|
||||
var dd = node.getOffset(offset);
|
||||
var arrow = node.arrow(W, angle, double, offset, dd);
|
||||
render(node, arrow);
|
||||
},
|
||||
bbox: exports.arrowBBox[name],
|
||||
remove: remove
|
||||
}];
|
||||
};
|
||||
};
|
||||
exports.CommonArrow = CommonArrow;
|
||||
//# sourceMappingURL=Notation.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Notation.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Notation.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
65
node_modules/mathjax-full/js/output/common/OutputJax.d.ts
generated
vendored
Normal file
65
node_modules/mathjax-full/js/output/common/OutputJax.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
import { AbstractOutputJax } from '../../core/OutputJax.js';
|
||||
import { MathDocument } from '../../core/MathDocument.js';
|
||||
import { MathItem, Metrics } from '../../core/MathItem.js';
|
||||
import { MmlNode } from '../../core/MmlTree/MmlNode.js';
|
||||
import { FontData, FontDataClass, CssFontData } from './FontData.js';
|
||||
import { OptionList } from '../../util/Options.js';
|
||||
import { CommonWrapper, AnyWrapper } from './Wrapper.js';
|
||||
import { CommonWrapperFactory, AnyWrapperFactory } from './WrapperFactory.js';
|
||||
import { StyleList, Styles } from '../../util/Styles.js';
|
||||
import { StyleList as CssStyleList, CssStyles } from '../../util/StyleList.js';
|
||||
export interface ExtendedMetrics extends Metrics {
|
||||
family: string;
|
||||
}
|
||||
export declare type MetricMap<N> = Map<N, ExtendedMetrics>;
|
||||
export declare type UnknownBBox = {
|
||||
w: number;
|
||||
h: number;
|
||||
d: number;
|
||||
};
|
||||
export declare type UnknownMap = Map<string, UnknownBBox>;
|
||||
export declare type UnknownVariantMap = Map<string, UnknownMap>;
|
||||
export declare abstract class CommonOutputJax<N, T, D, W extends AnyWrapper, F extends AnyWrapperFactory, FD extends FontData<any, any, any>, FC extends FontDataClass<any, any, any>> extends AbstractOutputJax<N, T, D> {
|
||||
static NAME: string;
|
||||
static OPTIONS: OptionList;
|
||||
static commonStyles: CssStyleList;
|
||||
cssStyles: CssStyles;
|
||||
document: MathDocument<N, T, D>;
|
||||
math: MathItem<N, T, D>;
|
||||
container: N;
|
||||
table: AnyWrapper;
|
||||
pxPerEm: number;
|
||||
font: FD;
|
||||
factory: F;
|
||||
nodeMap: Map<MmlNode, W>;
|
||||
testInline: N;
|
||||
testDisplay: N;
|
||||
protected unknownCache: UnknownVariantMap;
|
||||
constructor(options?: OptionList, defaultFactory?: typeof CommonWrapperFactory, defaultFont?: FC);
|
||||
typeset(math: MathItem<N, T, D>, html: MathDocument<N, T, D>): N;
|
||||
protected createNode(): N;
|
||||
protected setScale(node: N): void;
|
||||
toDOM(math: MathItem<N, T, D>, node: N, html?: MathDocument<N, T, D>): void;
|
||||
protected abstract processMath(math: MmlNode, node: N): void;
|
||||
getBBox(math: MathItem<N, T, D>, html: MathDocument<N, T, D>): any;
|
||||
getMetrics(html: MathDocument<N, T, D>): void;
|
||||
getMetricsFor(node: N, display: boolean): ExtendedMetrics;
|
||||
protected getMetricMaps(html: MathDocument<N, T, D>): MetricMap<N>[];
|
||||
protected getTestElement(node: N, display: boolean): N;
|
||||
protected measureMetrics(node: N, getFamily: boolean): ExtendedMetrics;
|
||||
styleSheet(html: MathDocument<N, T, D>): N;
|
||||
protected addFontStyles(styles: CssStyles): void;
|
||||
protected addWrapperStyles(styles: CssStyles): void;
|
||||
protected addClassStyles(CLASS: typeof CommonWrapper, styles: CssStyles): void;
|
||||
protected setDocument(html: MathDocument<N, T, D>): void;
|
||||
html(type: string, def?: OptionList, content?: (N | T)[], ns?: string): N;
|
||||
text(text: string): T;
|
||||
fixed(m: number, n?: number): string;
|
||||
abstract unknownText(text: string, variant: string): N;
|
||||
measureText(text: string, variant: string, font?: CssFontData): UnknownBBox;
|
||||
measureTextNodeWithCache(text: N, chars: string, variant: string, font?: CssFontData): UnknownBBox;
|
||||
abstract measureTextNode(text: N): UnknownBBox;
|
||||
measureXMLnode(xml: N): UnknownBBox;
|
||||
cssFontStyles(font: CssFontData, styles?: StyleList): StyleList;
|
||||
getFontData(styles: Styles): CssFontData;
|
||||
}
|
||||
431
node_modules/mathjax-full/js/output/common/OutputJax.js
generated
vendored
Normal file
431
node_modules/mathjax-full/js/output/common/OutputJax.js
generated
vendored
Normal file
|
|
@ -0,0 +1,431 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonOutputJax = void 0;
|
||||
var OutputJax_js_1 = require("../../core/OutputJax.js");
|
||||
var MathItem_js_1 = require("../../core/MathItem.js");
|
||||
var Options_js_1 = require("../../util/Options.js");
|
||||
var lengths_js_1 = require("../../util/lengths.js");
|
||||
var Styles_js_1 = require("../../util/Styles.js");
|
||||
var StyleList_js_1 = require("../../util/StyleList.js");
|
||||
var CommonOutputJax = (function (_super) {
|
||||
__extends(CommonOutputJax, _super);
|
||||
function CommonOutputJax(options, defaultFactory, defaultFont) {
|
||||
if (options === void 0) { options = null; }
|
||||
if (defaultFactory === void 0) { defaultFactory = null; }
|
||||
if (defaultFont === void 0) { defaultFont = null; }
|
||||
var _this = this;
|
||||
var _a = __read((0, Options_js_1.separateOptions)(options, defaultFont.OPTIONS), 2), jaxOptions = _a[0], fontOptions = _a[1];
|
||||
_this = _super.call(this, jaxOptions) || this;
|
||||
_this.factory = _this.options.wrapperFactory ||
|
||||
new defaultFactory();
|
||||
_this.factory.jax = _this;
|
||||
_this.cssStyles = _this.options.cssStyles || new StyleList_js_1.CssStyles();
|
||||
_this.font = _this.options.font || new defaultFont(fontOptions);
|
||||
_this.unknownCache = new Map();
|
||||
return _this;
|
||||
}
|
||||
CommonOutputJax.prototype.typeset = function (math, html) {
|
||||
this.setDocument(html);
|
||||
var node = this.createNode();
|
||||
this.toDOM(math, node, html);
|
||||
return node;
|
||||
};
|
||||
CommonOutputJax.prototype.createNode = function () {
|
||||
var jax = this.constructor.NAME;
|
||||
return this.html('mjx-container', { 'class': 'MathJax', jax: jax });
|
||||
};
|
||||
CommonOutputJax.prototype.setScale = function (node) {
|
||||
var scale = this.math.metrics.scale * this.options.scale;
|
||||
if (scale !== 1) {
|
||||
this.adaptor.setStyle(node, 'fontSize', (0, lengths_js_1.percent)(scale));
|
||||
}
|
||||
};
|
||||
CommonOutputJax.prototype.toDOM = function (math, node, html) {
|
||||
if (html === void 0) { html = null; }
|
||||
this.setDocument(html);
|
||||
this.math = math;
|
||||
this.pxPerEm = math.metrics.ex / this.font.params.x_height;
|
||||
math.root.setTeXclass(null);
|
||||
this.setScale(node);
|
||||
this.nodeMap = new Map();
|
||||
this.container = node;
|
||||
this.processMath(math.root, node);
|
||||
this.nodeMap = null;
|
||||
this.executeFilters(this.postFilters, math, html, node);
|
||||
};
|
||||
CommonOutputJax.prototype.getBBox = function (math, html) {
|
||||
this.setDocument(html);
|
||||
this.math = math;
|
||||
math.root.setTeXclass(null);
|
||||
this.nodeMap = new Map();
|
||||
var bbox = this.factory.wrap(math.root).getOuterBBox();
|
||||
this.nodeMap = null;
|
||||
return bbox;
|
||||
};
|
||||
CommonOutputJax.prototype.getMetrics = function (html) {
|
||||
var e_1, _a;
|
||||
this.setDocument(html);
|
||||
var adaptor = this.adaptor;
|
||||
var maps = this.getMetricMaps(html);
|
||||
try {
|
||||
for (var _b = __values(html.math), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var math = _c.value;
|
||||
var parent_1 = adaptor.parent(math.start.node);
|
||||
if (math.state() < MathItem_js_1.STATE.METRICS && parent_1) {
|
||||
var map = maps[math.display ? 1 : 0];
|
||||
var _d = map.get(parent_1), em = _d.em, ex = _d.ex, containerWidth = _d.containerWidth, lineWidth = _d.lineWidth, scale = _d.scale, family = _d.family;
|
||||
math.setMetrics(em, ex, containerWidth, lineWidth, scale);
|
||||
if (this.options.mtextInheritFont) {
|
||||
math.outputData.mtextFamily = family;
|
||||
}
|
||||
if (this.options.merrorInheritFont) {
|
||||
math.outputData.merrorFamily = family;
|
||||
}
|
||||
math.state(MathItem_js_1.STATE.METRICS);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
};
|
||||
CommonOutputJax.prototype.getMetricsFor = function (node, display) {
|
||||
var getFamily = (this.options.mtextInheritFont || this.options.merrorInheritFont);
|
||||
var test = this.getTestElement(node, display);
|
||||
var metrics = this.measureMetrics(test, getFamily);
|
||||
this.adaptor.remove(test);
|
||||
return metrics;
|
||||
};
|
||||
CommonOutputJax.prototype.getMetricMaps = function (html) {
|
||||
var e_2, _a, e_3, _b, e_4, _c, e_5, _d, e_6, _e;
|
||||
var adaptor = this.adaptor;
|
||||
var domMaps = [new Map(), new Map()];
|
||||
try {
|
||||
for (var _f = __values(html.math), _g = _f.next(); !_g.done; _g = _f.next()) {
|
||||
var math = _g.value;
|
||||
var node = adaptor.parent(math.start.node);
|
||||
if (node && math.state() < MathItem_js_1.STATE.METRICS) {
|
||||
var map = domMaps[math.display ? 1 : 0];
|
||||
if (!map.has(node)) {
|
||||
map.set(node, this.getTestElement(node, math.display));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_g && !_g.done && (_a = _f.return)) _a.call(_f);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
var getFamily = this.options.mtextInheritFont || this.options.merrorInheritFont;
|
||||
var maps = [new Map(), new Map()];
|
||||
try {
|
||||
for (var _h = __values(maps.keys()), _j = _h.next(); !_j.done; _j = _h.next()) {
|
||||
var i = _j.value;
|
||||
try {
|
||||
for (var _k = (e_4 = void 0, __values(domMaps[i].keys())), _l = _k.next(); !_l.done; _l = _k.next()) {
|
||||
var node = _l.value;
|
||||
maps[i].set(node, this.measureMetrics(domMaps[i].get(node), getFamily));
|
||||
}
|
||||
}
|
||||
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_l && !_l.done && (_c = _k.return)) _c.call(_k);
|
||||
}
|
||||
finally { if (e_4) throw e_4.error; }
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_j && !_j.done && (_b = _h.return)) _b.call(_h);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
try {
|
||||
for (var _m = __values(maps.keys()), _o = _m.next(); !_o.done; _o = _m.next()) {
|
||||
var i = _o.value;
|
||||
try {
|
||||
for (var _p = (e_6 = void 0, __values(domMaps[i].values())), _q = _p.next(); !_q.done; _q = _p.next()) {
|
||||
var node = _q.value;
|
||||
adaptor.remove(node);
|
||||
}
|
||||
}
|
||||
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_q && !_q.done && (_e = _p.return)) _e.call(_p);
|
||||
}
|
||||
finally { if (e_6) throw e_6.error; }
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_o && !_o.done && (_d = _m.return)) _d.call(_m);
|
||||
}
|
||||
finally { if (e_5) throw e_5.error; }
|
||||
}
|
||||
return maps;
|
||||
};
|
||||
CommonOutputJax.prototype.getTestElement = function (node, display) {
|
||||
var adaptor = this.adaptor;
|
||||
if (!this.testInline) {
|
||||
this.testInline = this.html('mjx-test', { style: {
|
||||
display: 'inline-block',
|
||||
width: '100%',
|
||||
'font-style': 'normal',
|
||||
'font-weight': 'normal',
|
||||
'font-size': '100%',
|
||||
'font-size-adjust': 'none',
|
||||
'text-indent': 0,
|
||||
'text-transform': 'none',
|
||||
'letter-spacing': 'normal',
|
||||
'word-spacing': 'normal',
|
||||
overflow: 'hidden',
|
||||
height: '1px',
|
||||
'margin-right': '-1px'
|
||||
} }, [
|
||||
this.html('mjx-left-box', { style: {
|
||||
display: 'inline-block',
|
||||
width: 0,
|
||||
'float': 'left'
|
||||
} }),
|
||||
this.html('mjx-ex-box', { style: {
|
||||
position: 'absolute',
|
||||
overflow: 'hidden',
|
||||
width: '1px', height: '60ex'
|
||||
} }),
|
||||
this.html('mjx-right-box', { style: {
|
||||
display: 'inline-block',
|
||||
width: 0,
|
||||
'float': 'right'
|
||||
} })
|
||||
]);
|
||||
this.testDisplay = adaptor.clone(this.testInline);
|
||||
adaptor.setStyle(this.testDisplay, 'display', 'table');
|
||||
adaptor.setStyle(this.testDisplay, 'margin-right', '');
|
||||
adaptor.setStyle(adaptor.firstChild(this.testDisplay), 'display', 'none');
|
||||
var right = adaptor.lastChild(this.testDisplay);
|
||||
adaptor.setStyle(right, 'display', 'table-cell');
|
||||
adaptor.setStyle(right, 'width', '10000em');
|
||||
adaptor.setStyle(right, 'float', '');
|
||||
}
|
||||
return adaptor.append(node, adaptor.clone(display ? this.testDisplay : this.testInline));
|
||||
};
|
||||
CommonOutputJax.prototype.measureMetrics = function (node, getFamily) {
|
||||
var adaptor = this.adaptor;
|
||||
var family = (getFamily ? adaptor.fontFamily(node) : '');
|
||||
var em = adaptor.fontSize(node);
|
||||
var _a = __read(adaptor.nodeSize(adaptor.childNode(node, 1)), 2), w = _a[0], h = _a[1];
|
||||
var ex = (w ? h / 60 : em * this.options.exFactor);
|
||||
var containerWidth = (!w ? 1000000 : adaptor.getStyle(node, 'display') === 'table' ?
|
||||
adaptor.nodeSize(adaptor.lastChild(node))[0] - 1 :
|
||||
adaptor.nodeBBox(adaptor.lastChild(node)).left -
|
||||
adaptor.nodeBBox(adaptor.firstChild(node)).left - 2);
|
||||
var scale = Math.max(this.options.minScale, this.options.matchFontHeight ? ex / this.font.params.x_height / em : 1);
|
||||
var lineWidth = 1000000;
|
||||
return { em: em, ex: ex, containerWidth: containerWidth, lineWidth: lineWidth, scale: scale, family: family };
|
||||
};
|
||||
CommonOutputJax.prototype.styleSheet = function (html) {
|
||||
var e_7, _a;
|
||||
this.setDocument(html);
|
||||
this.cssStyles.clear();
|
||||
this.cssStyles.addStyles(this.constructor.commonStyles);
|
||||
if ('getStyles' in html) {
|
||||
try {
|
||||
for (var _b = __values(html.getStyles()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var styles = _c.value;
|
||||
this.cssStyles.addStyles(styles);
|
||||
}
|
||||
}
|
||||
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_7) throw e_7.error; }
|
||||
}
|
||||
}
|
||||
this.addWrapperStyles(this.cssStyles);
|
||||
this.addFontStyles(this.cssStyles);
|
||||
var sheet = this.html('style', { id: 'MJX-styles' }, [this.text('\n' + this.cssStyles.cssText + '\n')]);
|
||||
return sheet;
|
||||
};
|
||||
CommonOutputJax.prototype.addFontStyles = function (styles) {
|
||||
styles.addStyles(this.font.styles);
|
||||
};
|
||||
CommonOutputJax.prototype.addWrapperStyles = function (styles) {
|
||||
var e_8, _a;
|
||||
try {
|
||||
for (var _b = __values(this.factory.getKinds()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var kind = _c.value;
|
||||
this.addClassStyles(this.factory.getNodeClass(kind), styles);
|
||||
}
|
||||
}
|
||||
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_8) throw e_8.error; }
|
||||
}
|
||||
};
|
||||
CommonOutputJax.prototype.addClassStyles = function (CLASS, styles) {
|
||||
styles.addStyles(CLASS.styles);
|
||||
};
|
||||
CommonOutputJax.prototype.setDocument = function (html) {
|
||||
if (html) {
|
||||
this.document = html;
|
||||
this.adaptor.document = html.document;
|
||||
}
|
||||
};
|
||||
CommonOutputJax.prototype.html = function (type, def, content, ns) {
|
||||
if (def === void 0) { def = {}; }
|
||||
if (content === void 0) { content = []; }
|
||||
return this.adaptor.node(type, def, content, ns);
|
||||
};
|
||||
CommonOutputJax.prototype.text = function (text) {
|
||||
return this.adaptor.text(text);
|
||||
};
|
||||
CommonOutputJax.prototype.fixed = function (m, n) {
|
||||
if (n === void 0) { n = 3; }
|
||||
if (Math.abs(m) < .0006) {
|
||||
return '0';
|
||||
}
|
||||
return m.toFixed(n).replace(/\.?0+$/, '');
|
||||
};
|
||||
CommonOutputJax.prototype.measureText = function (text, variant, font) {
|
||||
if (font === void 0) { font = ['', false, false]; }
|
||||
var node = this.unknownText(text, variant);
|
||||
if (variant === '-explicitFont') {
|
||||
var styles = this.cssFontStyles(font);
|
||||
this.adaptor.setAttributes(node, { style: styles });
|
||||
}
|
||||
return this.measureTextNodeWithCache(node, text, variant, font);
|
||||
};
|
||||
CommonOutputJax.prototype.measureTextNodeWithCache = function (text, chars, variant, font) {
|
||||
if (font === void 0) { font = ['', false, false]; }
|
||||
if (variant === '-explicitFont') {
|
||||
variant = [font[0], font[1] ? 'T' : 'F', font[2] ? 'T' : 'F', ''].join('-');
|
||||
}
|
||||
if (!this.unknownCache.has(variant)) {
|
||||
this.unknownCache.set(variant, new Map());
|
||||
}
|
||||
var map = this.unknownCache.get(variant);
|
||||
var cached = map.get(chars);
|
||||
if (cached)
|
||||
return cached;
|
||||
var bbox = this.measureTextNode(text);
|
||||
map.set(chars, bbox);
|
||||
return bbox;
|
||||
};
|
||||
CommonOutputJax.prototype.measureXMLnode = function (xml) {
|
||||
var adaptor = this.adaptor;
|
||||
var content = this.html('mjx-xml-block', { style: { display: 'inline-block' } }, [adaptor.clone(xml)]);
|
||||
var base = this.html('mjx-baseline', { style: { display: 'inline-block', width: 0, height: 0 } });
|
||||
var style = {
|
||||
position: 'absolute',
|
||||
display: 'inline-block',
|
||||
'font-family': 'initial',
|
||||
'line-height': 'normal'
|
||||
};
|
||||
var node = this.html('mjx-measure-xml', { style: style }, [base, content]);
|
||||
adaptor.append(adaptor.parent(this.math.start.node), this.container);
|
||||
adaptor.append(this.container, node);
|
||||
var em = this.math.metrics.em * this.math.metrics.scale;
|
||||
var _a = adaptor.nodeBBox(content), left = _a.left, right = _a.right, bottom = _a.bottom, top = _a.top;
|
||||
var w = (right - left) / em;
|
||||
var h = (adaptor.nodeBBox(base).top - top) / em;
|
||||
var d = (bottom - top) / em - h;
|
||||
adaptor.remove(this.container);
|
||||
adaptor.remove(node);
|
||||
return { w: w, h: h, d: d };
|
||||
};
|
||||
CommonOutputJax.prototype.cssFontStyles = function (font, styles) {
|
||||
if (styles === void 0) { styles = {}; }
|
||||
var _a = __read(font, 3), family = _a[0], italic = _a[1], bold = _a[2];
|
||||
styles['font-family'] = this.font.getFamily(family);
|
||||
if (italic)
|
||||
styles['font-style'] = 'italic';
|
||||
if (bold)
|
||||
styles['font-weight'] = 'bold';
|
||||
return styles;
|
||||
};
|
||||
CommonOutputJax.prototype.getFontData = function (styles) {
|
||||
if (!styles) {
|
||||
styles = new Styles_js_1.Styles();
|
||||
}
|
||||
return [this.font.getFamily(styles.get('font-family')),
|
||||
styles.get('font-style') === 'italic',
|
||||
styles.get('font-weight') === 'bold'];
|
||||
};
|
||||
CommonOutputJax.NAME = 'Common';
|
||||
CommonOutputJax.OPTIONS = __assign(__assign({}, OutputJax_js_1.AbstractOutputJax.OPTIONS), { scale: 1, minScale: .5, mtextInheritFont: false, merrorInheritFont: false, mtextFont: '', merrorFont: 'serif', mathmlSpacing: false, skipAttributes: {}, exFactor: .5, displayAlign: 'center', displayIndent: '0', wrapperFactory: null, font: null, cssStyles: null });
|
||||
CommonOutputJax.commonStyles = {};
|
||||
return CommonOutputJax;
|
||||
}(OutputJax_js_1.AbstractOutputJax));
|
||||
exports.CommonOutputJax = CommonOutputJax;
|
||||
//# sourceMappingURL=OutputJax.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/OutputJax.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/OutputJax.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
83
node_modules/mathjax-full/js/output/common/Wrapper.d.ts
generated
vendored
Normal file
83
node_modules/mathjax-full/js/output/common/Wrapper.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
import { AbstractWrapper, WrapperClass } from '../../core/Tree/Wrapper.js';
|
||||
import { PropertyList } from '../../core/Tree/Node.js';
|
||||
import { MmlNode, TextNode } from '../../core/MmlTree/MmlNode.js';
|
||||
import { Property } from '../../core/Tree/Node.js';
|
||||
import { Styles } from '../../util/Styles.js';
|
||||
import { StyleList } from '../../util/StyleList.js';
|
||||
import { CommonOutputJax } from './OutputJax.js';
|
||||
import { CommonWrapperFactory } from './WrapperFactory.js';
|
||||
import { BBox } from '../../util/BBox.js';
|
||||
import { FontData, DelimiterData, CharData, CharOptions, DIRECTION } from './FontData.js';
|
||||
export declare type StringMap = {
|
||||
[key: string]: string;
|
||||
};
|
||||
export declare type Constructor<T> = new (...args: any[]) => T;
|
||||
export declare type AnyWrapper = CommonWrapper<any, any, any, any, any, any>;
|
||||
export declare type AnyWrapperClass = CommonWrapperClass<any, any, any, any, any, any>;
|
||||
export declare type WrapperConstructor = Constructor<AnyWrapper>;
|
||||
export interface CommonWrapperClass<J extends CommonOutputJax<any, any, any, W, CommonWrapperFactory<J, W, C, CC, DD, FD>, FD, any>, W extends CommonWrapper<J, W, C, CC, DD, FD>, C extends CommonWrapperClass<J, W, C, CC, DD, FD>, CC extends CharOptions, DD extends DelimiterData, FD extends FontData<CC, any, DD>> extends WrapperClass<MmlNode, CommonWrapper<J, W, C, CC, DD, FD>> {
|
||||
new (factory: CommonWrapperFactory<J, W, C, CC, DD, FD>, node: MmlNode, ...args: any[]): W;
|
||||
}
|
||||
export declare class CommonWrapper<J extends CommonOutputJax<any, any, any, W, CommonWrapperFactory<J, W, C, CC, DD, FD>, FD, any>, W extends CommonWrapper<J, W, C, CC, DD, FD>, C extends CommonWrapperClass<J, W, C, CC, DD, FD>, CC extends CharOptions, DD extends DelimiterData, FD extends FontData<CC, any, DD>> extends AbstractWrapper<MmlNode, CommonWrapper<J, W, C, CC, DD, FD>> {
|
||||
static kind: string;
|
||||
static styles: StyleList;
|
||||
static removeStyles: string[];
|
||||
static skipAttributes: {
|
||||
[name: string]: boolean;
|
||||
};
|
||||
static BOLDVARIANTS: {
|
||||
[name: string]: StringMap;
|
||||
};
|
||||
static ITALICVARIANTS: {
|
||||
[name: string]: StringMap;
|
||||
};
|
||||
protected factory: CommonWrapperFactory<J, W, C, CC, DD, FD>;
|
||||
parent: W;
|
||||
childNodes: W[];
|
||||
protected removedStyles: StringMap;
|
||||
protected styles: Styles;
|
||||
variant: string;
|
||||
bbox: BBox;
|
||||
protected bboxComputed: boolean;
|
||||
stretch: DD;
|
||||
font: FD;
|
||||
get jax(): J;
|
||||
get adaptor(): import("../../core/DOMAdaptor.js").DOMAdaptor<any, any, any>;
|
||||
get metrics(): import("../../core/MathItem.js").Metrics;
|
||||
get fixesPWidth(): boolean;
|
||||
constructor(factory: CommonWrapperFactory<J, W, C, CC, DD, FD>, node: MmlNode, parent?: W);
|
||||
wrap(node: MmlNode, parent?: W): W;
|
||||
getBBox(save?: boolean): BBox;
|
||||
getOuterBBox(save?: boolean): BBox;
|
||||
protected computeBBox(bbox: BBox, recompute?: boolean): void;
|
||||
setChildPWidths(recompute: boolean, w?: (number | null), clear?: boolean): boolean;
|
||||
invalidateBBox(): void;
|
||||
protected copySkewIC(bbox: BBox): void;
|
||||
protected getStyles(): void;
|
||||
protected getVariant(): void;
|
||||
protected explicitVariant(fontFamily: string, fontWeight: string, fontStyle: string): string;
|
||||
protected getScale(): void;
|
||||
protected getSpace(): void;
|
||||
protected getMathMLSpacing(): void;
|
||||
protected getTeXSpacing(isTop: boolean, hasSpacing: boolean): void;
|
||||
protected isTopEmbellished(): boolean;
|
||||
core(): CommonWrapper<J, W, C, CC, DD, FD>;
|
||||
coreMO(): CommonWrapper<J, W, C, CC, DD, FD>;
|
||||
getText(): string;
|
||||
canStretch(direction: DIRECTION): boolean;
|
||||
protected getAlignShift(): [string, number];
|
||||
protected getAlignX(W: number, bbox: BBox, align: string): number;
|
||||
protected getAlignY(H: number, D: number, h: number, d: number, align: string): number;
|
||||
getWrapWidth(i: number): number;
|
||||
getChildAlign(_i: number): string;
|
||||
protected percent(m: number): string;
|
||||
protected em(m: number): string;
|
||||
protected px(m: number, M?: number): string;
|
||||
protected length2em(length: Property, size?: number, scale?: number): number;
|
||||
protected unicodeChars(text: string, name?: string): number[];
|
||||
remapChars(chars: number[]): number[];
|
||||
mmlText(text: string): TextNode;
|
||||
mmlNode(kind: string, properties?: PropertyList, children?: MmlNode[]): MmlNode;
|
||||
protected createMo(text: string): CommonWrapper<J, W, C, CC, DD, FD>;
|
||||
protected getVariantChar(variant: string, n: number): CharData<CC>;
|
||||
}
|
||||
588
node_modules/mathjax-full/js/output/common/Wrapper.js
generated
vendored
Normal file
588
node_modules/mathjax-full/js/output/common/Wrapper.js
generated
vendored
Normal file
|
|
@ -0,0 +1,588 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonWrapper = void 0;
|
||||
var Wrapper_js_1 = require("../../core/Tree/Wrapper.js");
|
||||
var MmlNode_js_1 = require("../../core/MmlTree/MmlNode.js");
|
||||
var string_js_1 = require("../../util/string.js");
|
||||
var LENGTHS = __importStar(require("../../util/lengths.js"));
|
||||
var Styles_js_1 = require("../../util/Styles.js");
|
||||
var BBox_js_1 = require("../../util/BBox.js");
|
||||
var FontData_js_1 = require("./FontData.js");
|
||||
var SMALLSIZE = 2 / 18;
|
||||
function MathMLSpace(script, size) {
|
||||
return (script ? size < SMALLSIZE ? 0 : SMALLSIZE : size);
|
||||
}
|
||||
var CommonWrapper = (function (_super) {
|
||||
__extends(CommonWrapper, _super);
|
||||
function CommonWrapper(factory, node, parent) {
|
||||
if (parent === void 0) { parent = null; }
|
||||
var _this = _super.call(this, factory, node) || this;
|
||||
_this.parent = null;
|
||||
_this.removedStyles = null;
|
||||
_this.styles = null;
|
||||
_this.variant = '';
|
||||
_this.bboxComputed = false;
|
||||
_this.stretch = FontData_js_1.NOSTRETCH;
|
||||
_this.font = null;
|
||||
_this.parent = parent;
|
||||
_this.font = factory.jax.font;
|
||||
_this.bbox = BBox_js_1.BBox.zero();
|
||||
_this.getStyles();
|
||||
_this.getVariant();
|
||||
_this.getScale();
|
||||
_this.getSpace();
|
||||
_this.childNodes = node.childNodes.map(function (child) {
|
||||
var wrapped = _this.wrap(child);
|
||||
if (wrapped.bbox.pwidth && (node.notParent || node.isKind('math'))) {
|
||||
_this.bbox.pwidth = BBox_js_1.BBox.fullWidth;
|
||||
}
|
||||
return wrapped;
|
||||
});
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(CommonWrapper.prototype, "jax", {
|
||||
get: function () {
|
||||
return this.factory.jax;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(CommonWrapper.prototype, "adaptor", {
|
||||
get: function () {
|
||||
return this.factory.jax.adaptor;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(CommonWrapper.prototype, "metrics", {
|
||||
get: function () {
|
||||
return this.factory.jax.math.metrics;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(CommonWrapper.prototype, "fixesPWidth", {
|
||||
get: function () {
|
||||
return !this.node.notParent && !this.node.isToken;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
CommonWrapper.prototype.wrap = function (node, parent) {
|
||||
if (parent === void 0) { parent = null; }
|
||||
var wrapped = this.factory.wrap(node, parent || this);
|
||||
if (parent) {
|
||||
parent.childNodes.push(wrapped);
|
||||
}
|
||||
this.jax.nodeMap.set(node, wrapped);
|
||||
return wrapped;
|
||||
};
|
||||
CommonWrapper.prototype.getBBox = function (save) {
|
||||
if (save === void 0) { save = true; }
|
||||
if (this.bboxComputed) {
|
||||
return this.bbox;
|
||||
}
|
||||
var bbox = (save ? this.bbox : BBox_js_1.BBox.zero());
|
||||
this.computeBBox(bbox);
|
||||
this.bboxComputed = save;
|
||||
return bbox;
|
||||
};
|
||||
CommonWrapper.prototype.getOuterBBox = function (save) {
|
||||
var e_1, _a;
|
||||
if (save === void 0) { save = true; }
|
||||
var bbox = this.getBBox(save);
|
||||
if (!this.styles)
|
||||
return bbox;
|
||||
var obox = new BBox_js_1.BBox();
|
||||
Object.assign(obox, bbox);
|
||||
try {
|
||||
for (var _b = __values(BBox_js_1.BBox.StyleAdjust), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var _d = __read(_c.value, 2), name_1 = _d[0], side = _d[1];
|
||||
var x = this.styles.get(name_1);
|
||||
if (x) {
|
||||
obox[side] += this.length2em(x, 1, obox.rscale);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
return obox;
|
||||
};
|
||||
CommonWrapper.prototype.computeBBox = function (bbox, recompute) {
|
||||
var e_2, _a;
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
bbox.empty();
|
||||
try {
|
||||
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var child = _c.value;
|
||||
bbox.append(child.getOuterBBox());
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
bbox.clean();
|
||||
if (this.fixesPWidth && this.setChildPWidths(recompute)) {
|
||||
this.computeBBox(bbox, true);
|
||||
}
|
||||
};
|
||||
CommonWrapper.prototype.setChildPWidths = function (recompute, w, clear) {
|
||||
var e_3, _a;
|
||||
if (w === void 0) { w = null; }
|
||||
if (clear === void 0) { clear = true; }
|
||||
if (recompute) {
|
||||
return false;
|
||||
}
|
||||
if (clear) {
|
||||
this.bbox.pwidth = '';
|
||||
}
|
||||
var changed = false;
|
||||
try {
|
||||
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var child = _c.value;
|
||||
var cbox = child.getOuterBBox();
|
||||
if (cbox.pwidth && child.setChildPWidths(recompute, w === null ? cbox.w : w, clear)) {
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
return changed;
|
||||
};
|
||||
CommonWrapper.prototype.invalidateBBox = function () {
|
||||
if (this.bboxComputed) {
|
||||
this.bboxComputed = false;
|
||||
if (this.parent) {
|
||||
this.parent.invalidateBBox();
|
||||
}
|
||||
}
|
||||
};
|
||||
CommonWrapper.prototype.copySkewIC = function (bbox) {
|
||||
var first = this.childNodes[0];
|
||||
if (first === null || first === void 0 ? void 0 : first.bbox.sk) {
|
||||
bbox.sk = first.bbox.sk;
|
||||
}
|
||||
if (first === null || first === void 0 ? void 0 : first.bbox.dx) {
|
||||
bbox.dx = first.bbox.dx;
|
||||
}
|
||||
var last = this.childNodes[this.childNodes.length - 1];
|
||||
if (last === null || last === void 0 ? void 0 : last.bbox.ic) {
|
||||
bbox.ic = last.bbox.ic;
|
||||
bbox.w += bbox.ic;
|
||||
}
|
||||
};
|
||||
CommonWrapper.prototype.getStyles = function () {
|
||||
var styleString = this.node.attributes.getExplicit('style');
|
||||
if (!styleString)
|
||||
return;
|
||||
var style = this.styles = new Styles_js_1.Styles(styleString);
|
||||
for (var i = 0, m = CommonWrapper.removeStyles.length; i < m; i++) {
|
||||
var id = CommonWrapper.removeStyles[i];
|
||||
if (style.get(id)) {
|
||||
if (!this.removedStyles)
|
||||
this.removedStyles = {};
|
||||
this.removedStyles[id] = style.get(id);
|
||||
style.set(id, '');
|
||||
}
|
||||
}
|
||||
};
|
||||
CommonWrapper.prototype.getVariant = function () {
|
||||
if (!this.node.isToken)
|
||||
return;
|
||||
var attributes = this.node.attributes;
|
||||
var variant = attributes.get('mathvariant');
|
||||
if (!attributes.getExplicit('mathvariant')) {
|
||||
var values = attributes.getList('fontfamily', 'fontweight', 'fontstyle');
|
||||
if (this.removedStyles) {
|
||||
var style = this.removedStyles;
|
||||
if (style.fontFamily)
|
||||
values.family = style.fontFamily;
|
||||
if (style.fontWeight)
|
||||
values.weight = style.fontWeight;
|
||||
if (style.fontStyle)
|
||||
values.style = style.fontStyle;
|
||||
}
|
||||
if (values.fontfamily)
|
||||
values.family = values.fontfamily;
|
||||
if (values.fontweight)
|
||||
values.weight = values.fontweight;
|
||||
if (values.fontstyle)
|
||||
values.style = values.fontstyle;
|
||||
if (values.weight && values.weight.match(/^\d+$/)) {
|
||||
values.weight = (parseInt(values.weight) > 600 ? 'bold' : 'normal');
|
||||
}
|
||||
if (values.family) {
|
||||
variant = this.explicitVariant(values.family, values.weight, values.style);
|
||||
}
|
||||
else {
|
||||
if (this.node.getProperty('variantForm'))
|
||||
variant = '-tex-variant';
|
||||
variant = (CommonWrapper.BOLDVARIANTS[values.weight] || {})[variant] || variant;
|
||||
variant = (CommonWrapper.ITALICVARIANTS[values.style] || {})[variant] || variant;
|
||||
}
|
||||
}
|
||||
this.variant = variant;
|
||||
};
|
||||
CommonWrapper.prototype.explicitVariant = function (fontFamily, fontWeight, fontStyle) {
|
||||
var style = this.styles;
|
||||
if (!style)
|
||||
style = this.styles = new Styles_js_1.Styles();
|
||||
style.set('fontFamily', fontFamily);
|
||||
if (fontWeight)
|
||||
style.set('fontWeight', fontWeight);
|
||||
if (fontStyle)
|
||||
style.set('fontStyle', fontStyle);
|
||||
return '-explicitFont';
|
||||
};
|
||||
CommonWrapper.prototype.getScale = function () {
|
||||
var scale = 1, parent = this.parent;
|
||||
var pscale = (parent ? parent.bbox.scale : 1);
|
||||
var attributes = this.node.attributes;
|
||||
var scriptlevel = Math.min(attributes.get('scriptlevel'), 2);
|
||||
var fontsize = attributes.get('fontsize');
|
||||
var mathsize = (this.node.isToken || this.node.isKind('mstyle') ?
|
||||
attributes.get('mathsize') : attributes.getInherited('mathsize'));
|
||||
if (scriptlevel !== 0) {
|
||||
scale = Math.pow(attributes.get('scriptsizemultiplier'), scriptlevel);
|
||||
var scriptminsize = this.length2em(attributes.get('scriptminsize'), .8, 1);
|
||||
if (scale < scriptminsize)
|
||||
scale = scriptminsize;
|
||||
}
|
||||
if (this.removedStyles && this.removedStyles.fontSize && !fontsize) {
|
||||
fontsize = this.removedStyles.fontSize;
|
||||
}
|
||||
if (fontsize && !attributes.getExplicit('mathsize')) {
|
||||
mathsize = fontsize;
|
||||
}
|
||||
if (mathsize !== '1') {
|
||||
scale *= this.length2em(mathsize, 1, 1);
|
||||
}
|
||||
this.bbox.scale = scale;
|
||||
this.bbox.rscale = scale / pscale;
|
||||
};
|
||||
CommonWrapper.prototype.getSpace = function () {
|
||||
var isTop = this.isTopEmbellished();
|
||||
var hasSpacing = this.node.hasSpacingAttributes();
|
||||
if (this.jax.options.mathmlSpacing || hasSpacing) {
|
||||
isTop && this.getMathMLSpacing();
|
||||
}
|
||||
else {
|
||||
this.getTeXSpacing(isTop, hasSpacing);
|
||||
}
|
||||
};
|
||||
CommonWrapper.prototype.getMathMLSpacing = function () {
|
||||
var node = this.node.coreMO();
|
||||
var child = node.coreParent();
|
||||
var parent = child.parent;
|
||||
if (!parent || !parent.isKind('mrow') || parent.childNodes.length === 1)
|
||||
return;
|
||||
var attributes = node.attributes;
|
||||
var isScript = (attributes.get('scriptlevel') > 0);
|
||||
this.bbox.L = (attributes.isSet('lspace') ?
|
||||
Math.max(0, this.length2em(attributes.get('lspace'))) :
|
||||
MathMLSpace(isScript, node.lspace));
|
||||
this.bbox.R = (attributes.isSet('rspace') ?
|
||||
Math.max(0, this.length2em(attributes.get('rspace'))) :
|
||||
MathMLSpace(isScript, node.rspace));
|
||||
var n = parent.childIndex(child);
|
||||
if (n === 0)
|
||||
return;
|
||||
var prev = parent.childNodes[n - 1];
|
||||
if (!prev.isEmbellished)
|
||||
return;
|
||||
var bbox = this.jax.nodeMap.get(prev).getBBox();
|
||||
if (bbox.R) {
|
||||
this.bbox.L = Math.max(0, this.bbox.L - bbox.R);
|
||||
}
|
||||
};
|
||||
CommonWrapper.prototype.getTeXSpacing = function (isTop, hasSpacing) {
|
||||
if (!hasSpacing) {
|
||||
var space = this.node.texSpacing();
|
||||
if (space) {
|
||||
this.bbox.L = this.length2em(space);
|
||||
}
|
||||
}
|
||||
if (isTop || hasSpacing) {
|
||||
var attributes = this.node.coreMO().attributes;
|
||||
if (attributes.isSet('lspace')) {
|
||||
this.bbox.L = Math.max(0, this.length2em(attributes.get('lspace')));
|
||||
}
|
||||
if (attributes.isSet('rspace')) {
|
||||
this.bbox.R = Math.max(0, this.length2em(attributes.get('rspace')));
|
||||
}
|
||||
}
|
||||
};
|
||||
CommonWrapper.prototype.isTopEmbellished = function () {
|
||||
return (this.node.isEmbellished &&
|
||||
!(this.node.parent && this.node.parent.isEmbellished));
|
||||
};
|
||||
CommonWrapper.prototype.core = function () {
|
||||
return this.jax.nodeMap.get(this.node.core());
|
||||
};
|
||||
CommonWrapper.prototype.coreMO = function () {
|
||||
return this.jax.nodeMap.get(this.node.coreMO());
|
||||
};
|
||||
CommonWrapper.prototype.getText = function () {
|
||||
var e_4, _a;
|
||||
var text = '';
|
||||
if (this.node.isToken) {
|
||||
try {
|
||||
for (var _b = __values(this.node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var child = _c.value;
|
||||
if (child instanceof MmlNode_js_1.TextNode) {
|
||||
text += child.getText();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_4) throw e_4.error; }
|
||||
}
|
||||
}
|
||||
return text;
|
||||
};
|
||||
CommonWrapper.prototype.canStretch = function (direction) {
|
||||
this.stretch = FontData_js_1.NOSTRETCH;
|
||||
if (this.node.isEmbellished) {
|
||||
var core = this.core();
|
||||
if (core && core.node !== this.node) {
|
||||
if (core.canStretch(direction)) {
|
||||
this.stretch = core.stretch;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.stretch.dir !== 0;
|
||||
};
|
||||
CommonWrapper.prototype.getAlignShift = function () {
|
||||
var _a;
|
||||
var _b = (_a = this.node.attributes).getList.apply(_a, __spreadArray([], __read(MmlNode_js_1.indentAttributes), false)), indentalign = _b.indentalign, indentshift = _b.indentshift, indentalignfirst = _b.indentalignfirst, indentshiftfirst = _b.indentshiftfirst;
|
||||
if (indentalignfirst !== 'indentalign') {
|
||||
indentalign = indentalignfirst;
|
||||
}
|
||||
if (indentalign === 'auto') {
|
||||
indentalign = this.jax.options.displayAlign;
|
||||
}
|
||||
if (indentshiftfirst !== 'indentshift') {
|
||||
indentshift = indentshiftfirst;
|
||||
}
|
||||
if (indentshift === 'auto') {
|
||||
indentshift = this.jax.options.displayIndent;
|
||||
if (indentalign === 'right' && !indentshift.match(/^\s*0[a-z]*\s*$/)) {
|
||||
indentshift = ('-' + indentshift.trim()).replace(/^--/, '');
|
||||
}
|
||||
}
|
||||
var shift = this.length2em(indentshift, this.metrics.containerWidth);
|
||||
return [indentalign, shift];
|
||||
};
|
||||
CommonWrapper.prototype.getAlignX = function (W, bbox, align) {
|
||||
return (align === 'right' ? W - (bbox.w + bbox.R) * bbox.rscale :
|
||||
align === 'left' ? bbox.L * bbox.rscale :
|
||||
(W - bbox.w * bbox.rscale) / 2);
|
||||
};
|
||||
CommonWrapper.prototype.getAlignY = function (H, D, h, d, align) {
|
||||
return (align === 'top' ? H - h :
|
||||
align === 'bottom' ? d - D :
|
||||
align === 'center' ? ((H - h) - (D - d)) / 2 :
|
||||
0);
|
||||
};
|
||||
CommonWrapper.prototype.getWrapWidth = function (i) {
|
||||
return this.childNodes[i].getBBox().w;
|
||||
};
|
||||
CommonWrapper.prototype.getChildAlign = function (_i) {
|
||||
return 'left';
|
||||
};
|
||||
CommonWrapper.prototype.percent = function (m) {
|
||||
return LENGTHS.percent(m);
|
||||
};
|
||||
CommonWrapper.prototype.em = function (m) {
|
||||
return LENGTHS.em(m);
|
||||
};
|
||||
CommonWrapper.prototype.px = function (m, M) {
|
||||
if (M === void 0) { M = -LENGTHS.BIGDIMEN; }
|
||||
return LENGTHS.px(m, M, this.metrics.em);
|
||||
};
|
||||
CommonWrapper.prototype.length2em = function (length, size, scale) {
|
||||
if (size === void 0) { size = 1; }
|
||||
if (scale === void 0) { scale = null; }
|
||||
if (scale === null) {
|
||||
scale = this.bbox.scale;
|
||||
}
|
||||
return LENGTHS.length2em(length, size, scale, this.jax.pxPerEm);
|
||||
};
|
||||
CommonWrapper.prototype.unicodeChars = function (text, name) {
|
||||
if (name === void 0) { name = this.variant; }
|
||||
var chars = (0, string_js_1.unicodeChars)(text);
|
||||
var variant = this.font.getVariant(name);
|
||||
if (variant && variant.chars) {
|
||||
var map_1 = variant.chars;
|
||||
chars = chars.map(function (n) { return ((map_1[n] || [])[3] || {}).smp || n; });
|
||||
}
|
||||
return chars;
|
||||
};
|
||||
CommonWrapper.prototype.remapChars = function (chars) {
|
||||
return chars;
|
||||
};
|
||||
CommonWrapper.prototype.mmlText = function (text) {
|
||||
return this.node.factory.create('text').setText(text);
|
||||
};
|
||||
CommonWrapper.prototype.mmlNode = function (kind, properties, children) {
|
||||
if (properties === void 0) { properties = {}; }
|
||||
if (children === void 0) { children = []; }
|
||||
return this.node.factory.create(kind, properties, children);
|
||||
};
|
||||
CommonWrapper.prototype.createMo = function (text) {
|
||||
var mmlFactory = this.node.factory;
|
||||
var textNode = mmlFactory.create('text').setText(text);
|
||||
var mml = mmlFactory.create('mo', { stretchy: true }, [textNode]);
|
||||
mml.inheritAttributesFrom(this.node);
|
||||
var node = this.wrap(mml);
|
||||
node.parent = this;
|
||||
return node;
|
||||
};
|
||||
CommonWrapper.prototype.getVariantChar = function (variant, n) {
|
||||
var char = this.font.getChar(variant, n) || [0, 0, 0, { unknown: true }];
|
||||
if (char.length === 3) {
|
||||
char[3] = {};
|
||||
}
|
||||
return char;
|
||||
};
|
||||
CommonWrapper.kind = 'unknown';
|
||||
CommonWrapper.styles = {};
|
||||
CommonWrapper.removeStyles = [
|
||||
'fontSize', 'fontFamily', 'fontWeight',
|
||||
'fontStyle', 'fontVariant', 'font'
|
||||
];
|
||||
CommonWrapper.skipAttributes = {
|
||||
fontfamily: true, fontsize: true, fontweight: true, fontstyle: true,
|
||||
color: true, background: true,
|
||||
'class': true, href: true, style: true,
|
||||
xmlns: true
|
||||
};
|
||||
CommonWrapper.BOLDVARIANTS = {
|
||||
bold: {
|
||||
normal: 'bold',
|
||||
italic: 'bold-italic',
|
||||
fraktur: 'bold-fraktur',
|
||||
script: 'bold-script',
|
||||
'sans-serif': 'bold-sans-serif',
|
||||
'sans-serif-italic': 'sans-serif-bold-italic'
|
||||
},
|
||||
normal: {
|
||||
bold: 'normal',
|
||||
'bold-italic': 'italic',
|
||||
'bold-fraktur': 'fraktur',
|
||||
'bold-script': 'script',
|
||||
'bold-sans-serif': 'sans-serif',
|
||||
'sans-serif-bold-italic': 'sans-serif-italic'
|
||||
}
|
||||
};
|
||||
CommonWrapper.ITALICVARIANTS = {
|
||||
italic: {
|
||||
normal: 'italic',
|
||||
bold: 'bold-italic',
|
||||
'sans-serif': 'sans-serif-italic',
|
||||
'bold-sans-serif': 'sans-serif-bold-italic'
|
||||
},
|
||||
normal: {
|
||||
italic: 'normal',
|
||||
'bold-italic': 'bold',
|
||||
'sans-serif-italic': 'sans-serif',
|
||||
'sans-serif-bold-italic': 'bold-sans-serif'
|
||||
}
|
||||
};
|
||||
return CommonWrapper;
|
||||
}(Wrapper_js_1.AbstractWrapper));
|
||||
exports.CommonWrapper = CommonWrapper;
|
||||
//# sourceMappingURL=Wrapper.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrapper.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrapper.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
13
node_modules/mathjax-full/js/output/common/WrapperFactory.d.ts
generated
vendored
Normal file
13
node_modules/mathjax-full/js/output/common/WrapperFactory.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { CommonOutputJax } from './OutputJax.js';
|
||||
import { AbstractWrapperFactory } from '../../core/Tree/WrapperFactory.js';
|
||||
import { CommonWrapper, CommonWrapperClass } from './Wrapper.js';
|
||||
import { CharOptions, DelimiterData, FontData } from './FontData.js';
|
||||
import { MmlNode } from '../../core/MmlTree/MmlNode.js';
|
||||
export declare class CommonWrapperFactory<J extends CommonOutputJax<any, any, any, W, CommonWrapperFactory<J, W, C, CC, DD, FD>, FD, any>, W extends CommonWrapper<J, W, C, CC, DD, FD>, C extends CommonWrapperClass<J, W, C, CC, DD, FD>, CC extends CharOptions, DD extends DelimiterData, FD extends FontData<CC, any, DD>> extends AbstractWrapperFactory<MmlNode, W, C> {
|
||||
static defaultNodes: {
|
||||
[kind: string]: CommonWrapperClass<any, any, any, any, any, any>;
|
||||
};
|
||||
jax: J;
|
||||
get Wrappers(): Object;
|
||||
}
|
||||
export declare type AnyWrapperFactory = CommonWrapperFactory<any, any, any, any, any, any>;
|
||||
38
node_modules/mathjax-full/js/output/common/WrapperFactory.js
generated
vendored
Normal file
38
node_modules/mathjax-full/js/output/common/WrapperFactory.js
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonWrapperFactory = void 0;
|
||||
var WrapperFactory_js_1 = require("../../core/Tree/WrapperFactory.js");
|
||||
var CommonWrapperFactory = (function (_super) {
|
||||
__extends(CommonWrapperFactory, _super);
|
||||
function CommonWrapperFactory() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.jax = null;
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(CommonWrapperFactory.prototype, "Wrappers", {
|
||||
get: function () {
|
||||
return this.node;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
CommonWrapperFactory.defaultNodes = {};
|
||||
return CommonWrapperFactory;
|
||||
}(WrapperFactory_js_1.AbstractWrapperFactory));
|
||||
exports.CommonWrapperFactory = CommonWrapperFactory;
|
||||
//# sourceMappingURL=WrapperFactory.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/WrapperFactory.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/WrapperFactory.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"WrapperFactory.js","sourceRoot":"","sources":["../../../ts/output/common/WrapperFactory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,uEAAyE;AAezE;IAOU,wCAAqC;IAP/C;QAAA,qEA2BC;QATQ,SAAG,GAAM,IAAI,CAAC;;IASvB,CAAC;IAJC,sBAAI,0CAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;;;OAAA;IAZa,iCAAY,GAAuE,EAAE,CAAC;IActG,2BAAC;CAAA,AA3BD,CAOU,0CAAsB,GAoB/B;AA3BY,oDAAoB"}
|
||||
5
node_modules/mathjax-full/js/output/common/Wrappers/TeXAtom.d.ts
generated
vendored
Normal file
5
node_modules/mathjax-full/js/output/common/Wrappers/TeXAtom.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonTeXAtom extends AnyWrapper {
|
||||
}
|
||||
export declare type TeXAtomConstructor = Constructor<CommonTeXAtom>;
|
||||
export declare function CommonTeXAtomMixin<T extends WrapperConstructor>(Base: T): TeXAtomConstructor & T;
|
||||
44
node_modules/mathjax-full/js/output/common/Wrappers/TeXAtom.js
generated
vendored
Normal file
44
node_modules/mathjax-full/js/output/common/Wrappers/TeXAtom.js
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonTeXAtomMixin = void 0;
|
||||
var MmlNode_js_1 = require("../../../core/MmlTree/MmlNode.js");
|
||||
function CommonTeXAtomMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
_super.prototype.computeBBox.call(this, bbox, recompute);
|
||||
if (this.childNodes[0] && this.childNodes[0].bbox.ic) {
|
||||
bbox.ic = this.childNodes[0].bbox.ic;
|
||||
}
|
||||
if (this.node.texClass === MmlNode_js_1.TEXCLASS.VCENTER) {
|
||||
var h = bbox.h, d = bbox.d;
|
||||
var a = this.font.params.axis_height;
|
||||
var dh = ((h + d) / 2 + a) - h;
|
||||
bbox.h += dh;
|
||||
bbox.d -= dh;
|
||||
}
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonTeXAtomMixin = CommonTeXAtomMixin;
|
||||
//# sourceMappingURL=TeXAtom.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/TeXAtom.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/TeXAtom.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"TeXAtom.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/TeXAtom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,+DAA0D;AAoB1D,SAAgB,kBAAkB,CAA+B,IAAO;IAEtE;QAAqB,2BAAI;QAAlB;;QAsBP,CAAC;QAjBQ,6BAAW,GAAlB,UAAmB,IAAU,EAAE,SAA0B;YAA1B,0BAAA,EAAA,iBAA0B;YACvD,iBAAM,WAAW,YAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YACnC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE;gBACpD,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;aACtC;YAID,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,qBAAQ,CAAC,OAAO,EAAE;gBACpC,IAAA,CAAC,GAAO,IAAI,EAAX,EAAE,CAAC,GAAI,IAAI,EAAR,CAAS;gBACpB,IAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;gBACvC,IAAM,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;gBACjC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;gBACb,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;aACd;QACH,CAAC;QAEH,cAAC;IAAD,CAAC,AAtBM,CAAc,IAAI,GAsBvB;AAEJ,CAAC;AA1BD,gDA0BC"}
|
||||
6
node_modules/mathjax-full/js/output/common/Wrappers/TextNode.d.ts
generated
vendored
Normal file
6
node_modules/mathjax-full/js/output/common/Wrappers/TextNode.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonTextNode extends AnyWrapper {
|
||||
remappedText(text: string, variant: string): number[];
|
||||
}
|
||||
export declare type TextNodeConstructor = Constructor<CommonTextNode>;
|
||||
export declare function CommonTextNodeMixin<T extends WrapperConstructor>(Base: T): TextNodeConstructor & T;
|
||||
112
node_modules/mathjax-full/js/output/common/Wrappers/TextNode.js
generated
vendored
Normal file
112
node_modules/mathjax-full/js/output/common/Wrappers/TextNode.js
generated
vendored
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonTextNodeMixin = void 0;
|
||||
function CommonTextNodeMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.computeBBox = function (bbox, _recompute) {
|
||||
var e_1, _a;
|
||||
if (_recompute === void 0) { _recompute = false; }
|
||||
var variant = this.parent.variant;
|
||||
var text = this.node.getText();
|
||||
if (variant === '-explicitFont') {
|
||||
var font = this.jax.getFontData(this.parent.styles);
|
||||
var _b = this.jax.measureText(text, variant, font), w = _b.w, h = _b.h, d = _b.d;
|
||||
bbox.h = h;
|
||||
bbox.d = d;
|
||||
bbox.w = w;
|
||||
}
|
||||
else {
|
||||
var chars = this.remappedText(text, variant);
|
||||
bbox.empty();
|
||||
try {
|
||||
for (var chars_1 = __values(chars), chars_1_1 = chars_1.next(); !chars_1_1.done; chars_1_1 = chars_1.next()) {
|
||||
var char = chars_1_1.value;
|
||||
var _c = __read(this.getVariantChar(variant, char), 4), h = _c[0], d = _c[1], w = _c[2], data = _c[3];
|
||||
if (data.unknown) {
|
||||
var cbox = this.jax.measureText(String.fromCodePoint(char), variant);
|
||||
w = cbox.w;
|
||||
h = cbox.h;
|
||||
d = cbox.d;
|
||||
}
|
||||
bbox.w += w;
|
||||
if (h > bbox.h)
|
||||
bbox.h = h;
|
||||
if (d > bbox.d)
|
||||
bbox.d = d;
|
||||
bbox.ic = data.ic || 0;
|
||||
bbox.sk = data.sk || 0;
|
||||
bbox.dx = data.dx || 0;
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (chars_1_1 && !chars_1_1.done && (_a = chars_1.return)) _a.call(chars_1);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
if (chars.length > 1) {
|
||||
bbox.sk = 0;
|
||||
}
|
||||
bbox.clean();
|
||||
}
|
||||
};
|
||||
class_1.prototype.remappedText = function (text, variant) {
|
||||
var c = this.parent.stretch.c;
|
||||
return (c ? [c] : this.parent.remapChars(this.unicodeChars(text, variant)));
|
||||
};
|
||||
class_1.prototype.getStyles = function () { };
|
||||
class_1.prototype.getVariant = function () { };
|
||||
class_1.prototype.getScale = function () { };
|
||||
class_1.prototype.getSpace = function () { };
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonTextNodeMixin = CommonTextNodeMixin;
|
||||
//# sourceMappingURL=TextNode.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/TextNode.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/TextNode.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"TextNode.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/TextNode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,SAAgB,mBAAmB,CAA+B,IAAO;IAEvE;QAAqB,2BAAI;QAAlB;;QAuFP,CAAC;QAlFQ,6BAAW,GAAlB,UAAmB,IAAU,EAAE,UAA2B;;YAA3B,2BAAA,EAAA,kBAA2B;YACxD,IAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACpC,IAAM,IAAI,GAAI,IAAI,CAAC,IAAiB,CAAC,OAAO,EAAE,CAAC;YAC/C,IAAI,OAAO,KAAK,eAAe,EAAE;gBAI/B,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAChD,IAAA,KAAY,IAAI,CAAC,GAAG,CAAC,WAAW,CAA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E,IAAI,CAAC,CAAC;wBACvB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;qBACxB;;;;;;;;;gBACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;oBACpB,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;iBACb;gBACD,IAAI,CAAC,KAAK,EAAE,CAAC;aACd;QACH,CAAC;QAOM,8BAAY,GAAnB,UAAoB,IAAY,EAAE,OAAe;YAC/C,IAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YAChC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC;QAWM,2BAAS,GAAhB,cAAoB,CAAC;QAKd,4BAAU,GAAjB,cAAqB,CAAC;QAKf,0BAAQ,GAAf,cAAmB,CAAC;QAKb,0BAAQ,GAAf,cAAmB,CAAC;QAEtB,cAAC;IAAD,CAAC,AAvFM,CAAc,IAAI,GAuFvB;AAEJ,CAAC;AA3FD,kDA2FC"}
|
||||
30
node_modules/mathjax-full/js/output/common/Wrappers/maction.d.ts
generated
vendored
Normal file
30
node_modules/mathjax-full/js/output/common/Wrappers/maction.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor, AnyWrapperClass } from '../Wrapper.js';
|
||||
export declare type ActionData = {
|
||||
[name: string]: any;
|
||||
};
|
||||
export declare type ActionHandler<W extends AnyWrapper> = (node: W, data?: ActionData) => void;
|
||||
export declare type ActionPair<W extends AnyWrapper> = [ActionHandler<W>, ActionData];
|
||||
export declare type ActionMap<W extends AnyWrapper> = Map<string, ActionPair<W>>;
|
||||
export declare type ActionDef<W extends AnyWrapper> = [string, [ActionHandler<W>, ActionData]];
|
||||
export declare type EventHandler = (event: Event) => void;
|
||||
export declare const TooltipData: {
|
||||
dx: string;
|
||||
dy: string;
|
||||
postDelay: number;
|
||||
clearDelay: number;
|
||||
hoverTimer: Map<any, number>;
|
||||
clearTimer: Map<any, number>;
|
||||
stopTimers: (node: any, data: ActionData) => void;
|
||||
};
|
||||
export interface CommonMaction<W extends AnyWrapper> extends AnyWrapper {
|
||||
action: ActionHandler<W>;
|
||||
data: ActionData;
|
||||
dx: number;
|
||||
dy: number;
|
||||
readonly selected: W;
|
||||
}
|
||||
export interface CommonMactionClass<W extends AnyWrapper> extends AnyWrapperClass {
|
||||
actions: ActionMap<W>;
|
||||
}
|
||||
export declare type MactionConstructor<W extends AnyWrapper> = Constructor<CommonMaction<W>>;
|
||||
export declare function CommonMactionMixin<W extends AnyWrapper, T extends WrapperConstructor>(Base: T): MactionConstructor<W> & T;
|
||||
104
node_modules/mathjax-full/js/output/common/Wrappers/maction.js
generated
vendored
Normal file
104
node_modules/mathjax-full/js/output/common/Wrappers/maction.js
generated
vendored
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMactionMixin = exports.TooltipData = void 0;
|
||||
var string_js_1 = require("../../../util/string.js");
|
||||
exports.TooltipData = {
|
||||
dx: '.2em',
|
||||
dy: '.1em',
|
||||
postDelay: 600,
|
||||
clearDelay: 100,
|
||||
hoverTimer: new Map(),
|
||||
clearTimer: new Map(),
|
||||
stopTimers: function (node, data) {
|
||||
if (data.clearTimer.has(node)) {
|
||||
clearTimeout(data.clearTimer.get(node));
|
||||
data.clearTimer.delete(node);
|
||||
}
|
||||
if (data.hoverTimer.has(node)) {
|
||||
clearTimeout(data.hoverTimer.get(node));
|
||||
data.hoverTimer.delete(node);
|
||||
}
|
||||
}
|
||||
};
|
||||
function CommonMactionMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
var actions = _this.constructor.actions;
|
||||
var action = _this.node.attributes.get('actiontype');
|
||||
var _a = __read(actions.get(action) || [(function (_node, _data) { }), {}], 2), handler = _a[0], data = _a[1];
|
||||
_this.action = handler;
|
||||
_this.data = data;
|
||||
_this.getParameters();
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "selected", {
|
||||
get: function () {
|
||||
var selection = this.node.attributes.get('selection');
|
||||
var i = Math.max(1, Math.min(this.childNodes.length, selection)) - 1;
|
||||
return this.childNodes[i] || this.wrap(this.node.selected);
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.getParameters = function () {
|
||||
var offsets = this.node.attributes.get('data-offsets');
|
||||
var _a = __read((0, string_js_1.split)(offsets || ''), 2), dx = _a[0], dy = _a[1];
|
||||
this.dx = this.length2em(dx || exports.TooltipData.dx);
|
||||
this.dy = this.length2em(dy || exports.TooltipData.dy);
|
||||
};
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
bbox.updateFrom(this.selected.getOuterBBox());
|
||||
this.selected.setChildPWidths(recompute);
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMactionMixin = CommonMactionMixin;
|
||||
//# sourceMappingURL=maction.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/maction.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/maction.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"maction.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/maction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,qDAA8C;AAmBjC,QAAA,WAAW,GAAG;IACzB,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IAEV,SAAS,EAAE,GAAG;IACd,UAAU,EAAE,GAAG;IAEf,UAAU,EAAE,IAAI,GAAG,EAAe;IAClC,UAAU,EAAE,IAAI,GAAG,EAAe;IAKlC,UAAU,EAAE,UAAC,IAAS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AAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC;gBACvE,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAE,IAAI,CAAC,IAAmB,CAAC,QAAQ,CAAC,CAAC;YAC7E,CAAC;;;WAAA;QAoBM,+BAAa,GAApB;YACE,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,cAAc,CAAW,CAAC;YAC/D,IAAA,KAAA,OAAW,IAAA,iBAAK,EAAC,OAAO,IAAI,EAAE,CAAC,IAAA,EAA9B,EAAE,QAAA,EAAE,EAAE,QAAwB,CAAC;YACpC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,mBAAW,CAAC,EAAE,CAAC,CAAC;YAC/C,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,mBAAW,CAAC,EAAE,CAAC,CAAC;QACjD,CAAC;QAKM,6BAAW,GAAlB,UAAmB,IAAU,EAAE,SAA0B;YAA1B,0BAAA,EAAA,iBAA0B;YACvD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;YAC9C,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QAEH,cAAC;IAAD,CAAC,AA9DM,CAAc,IAAI,GA8DvB;AAEJ,CAAC;AArED,gDAqEC"}
|
||||
5
node_modules/mathjax-full/js/output/common/Wrappers/math.d.ts
generated
vendored
Normal file
5
node_modules/mathjax-full/js/output/common/Wrappers/math.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonMath extends AnyWrapper {
|
||||
}
|
||||
export declare type MathConstructor = Constructor<CommonMath>;
|
||||
export declare function CommonMathMixin<T extends WrapperConstructor>(Base: T): MathConstructor & T;
|
||||
32
node_modules/mathjax-full/js/output/common/Wrappers/math.js
generated
vendored
Normal file
32
node_modules/mathjax-full/js/output/common/Wrappers/math.js
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMathMixin = void 0;
|
||||
function CommonMathMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.getWrapWidth = function (_i) {
|
||||
return (this.parent ? this.getBBox().w : this.metrics.containerWidth / this.jax.pxPerEm);
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMathMixin = CommonMathMixin;
|
||||
//# sourceMappingURL=math.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/math.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/math.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/math.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA2CA,SAAgB,eAAe,CAA+B,IAAO;IAEnE;QAAqB,2BAAI;QAAlB;;QASP,CAAC;QAJQ,8BAAY,GAAnB,UAAoB,EAAU;YAC5B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3F,CAAC;QAEH,cAAC;IAAD,CAAC,AATM,CAAc,IAAI,GASvB;AAEJ,CAAC;AAbD,0CAaC"}
|
||||
40
node_modules/mathjax-full/js/output/common/Wrappers/menclose.d.ts
generated
vendored
Normal file
40
node_modules/mathjax-full/js/output/common/Wrappers/menclose.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor, AnyWrapperClass } from '../Wrapper.js';
|
||||
import * as Notation from '../Notation.js';
|
||||
import { CommonMsqrt } from './msqrt.js';
|
||||
export interface CommonMenclose<W extends AnyWrapper, S extends CommonMsqrt, N> extends AnyWrapper {
|
||||
notations: Notation.List<W, N>;
|
||||
renderChild: Notation.Renderer<W, N>;
|
||||
msqrt: S;
|
||||
padding: number;
|
||||
thickness: number;
|
||||
arrowhead: {
|
||||
x: number;
|
||||
y: number;
|
||||
dx: number;
|
||||
};
|
||||
TRBL: Notation.PaddingData;
|
||||
getParameters(): void;
|
||||
getNotations(): void;
|
||||
removeRedundantNotations(): void;
|
||||
initializeNotations(): void;
|
||||
getBBoxExtenders(): Notation.PaddingData;
|
||||
getPadding(): Notation.PaddingData;
|
||||
maximizeEntries(X: Notation.PaddingData, Y: Notation.PaddingData): void;
|
||||
getOffset(direction: string): number;
|
||||
getArgMod(w: number, h: number): [number, number];
|
||||
arrow(w: number, a: number, double: boolean, offset?: string, trans?: number): N;
|
||||
arrowData(): {
|
||||
a: number;
|
||||
W: number;
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
arrowAW(): [number, number];
|
||||
createMsqrt(child: W): S;
|
||||
sqrtTRBL(): number[];
|
||||
}
|
||||
export interface CommonMencloseClass<W extends AnyWrapper, N> extends AnyWrapperClass {
|
||||
notations: Notation.DefList<W, N>;
|
||||
}
|
||||
export declare type MencloseConstructor<W extends AnyWrapper, S extends CommonMsqrt, N> = Constructor<CommonMenclose<W, S, N>>;
|
||||
export declare function CommonMencloseMixin<W extends AnyWrapper, S extends CommonMsqrt, N, T extends WrapperConstructor>(Base: T): MencloseConstructor<W, S, N> & T;
|
||||
298
node_modules/mathjax-full/js/output/common/Wrappers/menclose.js
generated
vendored
Normal file
298
node_modules/mathjax-full/js/output/common/Wrappers/menclose.js
generated
vendored
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMencloseMixin = void 0;
|
||||
var Notation = __importStar(require("../Notation.js"));
|
||||
var string_js_1 = require("../../../util/string.js");
|
||||
function CommonMencloseMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.notations = {};
|
||||
_this.renderChild = null;
|
||||
_this.msqrt = null;
|
||||
_this.padding = Notation.PADDING;
|
||||
_this.thickness = Notation.THICKNESS;
|
||||
_this.arrowhead = { x: Notation.ARROWX, y: Notation.ARROWY, dx: Notation.ARROWDX };
|
||||
_this.TRBL = [0, 0, 0, 0];
|
||||
_this.getParameters();
|
||||
_this.getNotations();
|
||||
_this.removeRedundantNotations();
|
||||
_this.initializeNotations();
|
||||
_this.TRBL = _this.getBBoxExtenders();
|
||||
return _this;
|
||||
}
|
||||
class_1.prototype.getParameters = function () {
|
||||
var attributes = this.node.attributes;
|
||||
var padding = attributes.get('data-padding');
|
||||
if (padding !== undefined) {
|
||||
this.padding = this.length2em(padding, Notation.PADDING);
|
||||
}
|
||||
var thickness = attributes.get('data-thickness');
|
||||
if (thickness !== undefined) {
|
||||
this.thickness = this.length2em(thickness, Notation.THICKNESS);
|
||||
}
|
||||
var arrowhead = attributes.get('data-arrowhead');
|
||||
if (arrowhead !== undefined) {
|
||||
var _b = __read((0, string_js_1.split)(arrowhead), 3), x = _b[0], y = _b[1], dx = _b[2];
|
||||
this.arrowhead = {
|
||||
x: (x ? parseFloat(x) : Notation.ARROWX),
|
||||
y: (y ? parseFloat(y) : Notation.ARROWY),
|
||||
dx: (dx ? parseFloat(dx) : Notation.ARROWDX)
|
||||
};
|
||||
}
|
||||
};
|
||||
class_1.prototype.getNotations = function () {
|
||||
var e_1, _b;
|
||||
var Notations = this.constructor.notations;
|
||||
try {
|
||||
for (var _c = __values((0, string_js_1.split)(this.node.attributes.get('notation'))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
||||
var name_1 = _d.value;
|
||||
var notation = Notations.get(name_1);
|
||||
if (notation) {
|
||||
this.notations[name_1] = notation;
|
||||
if (notation.renderChild) {
|
||||
this.renderChild = notation.renderer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
};
|
||||
class_1.prototype.removeRedundantNotations = function () {
|
||||
var e_2, _b, e_3, _c;
|
||||
try {
|
||||
for (var _d = __values(Object.keys(this.notations)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
||||
var name_2 = _e.value;
|
||||
if (this.notations[name_2]) {
|
||||
var remove = this.notations[name_2].remove || '';
|
||||
try {
|
||||
for (var _f = (e_3 = void 0, __values(remove.split(/ /))), _g = _f.next(); !_g.done; _g = _f.next()) {
|
||||
var notation = _g.value;
|
||||
delete this.notations[notation];
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_g && !_g.done && (_c = _f.return)) _c.call(_f);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_e && !_e.done && (_b = _d.return)) _b.call(_d);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
};
|
||||
class_1.prototype.initializeNotations = function () {
|
||||
var e_4, _b;
|
||||
try {
|
||||
for (var _c = __values(Object.keys(this.notations)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
||||
var name_3 = _d.value;
|
||||
var init = this.notations[name_3].init;
|
||||
init && init(this);
|
||||
}
|
||||
}
|
||||
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
||||
}
|
||||
finally { if (e_4) throw e_4.error; }
|
||||
}
|
||||
};
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
var _b = __read(this.TRBL, 4), T = _b[0], R = _b[1], B = _b[2], L = _b[3];
|
||||
var child = this.childNodes[0].getBBox();
|
||||
bbox.combine(child, L, 0);
|
||||
bbox.h += T;
|
||||
bbox.d += B;
|
||||
bbox.w += R;
|
||||
this.setChildPWidths(recompute);
|
||||
};
|
||||
class_1.prototype.getBBoxExtenders = function () {
|
||||
var e_5, _b;
|
||||
var TRBL = [0, 0, 0, 0];
|
||||
try {
|
||||
for (var _c = __values(Object.keys(this.notations)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
||||
var name_4 = _d.value;
|
||||
this.maximizeEntries(TRBL, this.notations[name_4].bbox(this));
|
||||
}
|
||||
}
|
||||
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
||||
}
|
||||
finally { if (e_5) throw e_5.error; }
|
||||
}
|
||||
return TRBL;
|
||||
};
|
||||
class_1.prototype.getPadding = function () {
|
||||
var e_6, _b;
|
||||
var _this = this;
|
||||
var BTRBL = [0, 0, 0, 0];
|
||||
try {
|
||||
for (var _c = __values(Object.keys(this.notations)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
||||
var name_5 = _d.value;
|
||||
var border = this.notations[name_5].border;
|
||||
if (border) {
|
||||
this.maximizeEntries(BTRBL, border(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
||||
}
|
||||
finally { if (e_6) throw e_6.error; }
|
||||
}
|
||||
return [0, 1, 2, 3].map(function (i) { return _this.TRBL[i] - BTRBL[i]; });
|
||||
};
|
||||
class_1.prototype.maximizeEntries = function (X, Y) {
|
||||
for (var i = 0; i < X.length; i++) {
|
||||
if (X[i] < Y[i]) {
|
||||
X[i] = Y[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
class_1.prototype.getOffset = function (direction) {
|
||||
var _b = __read(this.TRBL, 4), T = _b[0], R = _b[1], B = _b[2], L = _b[3];
|
||||
var d = (direction === 'X' ? R - L : B - T) / 2;
|
||||
return (Math.abs(d) > .001 ? d : 0);
|
||||
};
|
||||
class_1.prototype.getArgMod = function (w, h) {
|
||||
return [Math.atan2(h, w), Math.sqrt(w * w + h * h)];
|
||||
};
|
||||
class_1.prototype.arrow = function (_w, _a, _double, _offset, _dist) {
|
||||
if (_offset === void 0) { _offset = ''; }
|
||||
if (_dist === void 0) { _dist = 0; }
|
||||
return null;
|
||||
};
|
||||
class_1.prototype.arrowData = function () {
|
||||
var _b = __read([this.padding, this.thickness], 2), p = _b[0], t = _b[1];
|
||||
var r = t * (this.arrowhead.x + Math.max(1, this.arrowhead.dx));
|
||||
var _c = this.childNodes[0].getBBox(), h = _c.h, d = _c.d, w = _c.w;
|
||||
var H = h + d;
|
||||
var R = Math.sqrt(H * H + w * w);
|
||||
var x = Math.max(p, r * w / R);
|
||||
var y = Math.max(p, r * H / R);
|
||||
var _d = __read(this.getArgMod(w + 2 * x, H + 2 * y), 2), a = _d[0], W = _d[1];
|
||||
return { a: a, W: W, x: x, y: y };
|
||||
};
|
||||
class_1.prototype.arrowAW = function () {
|
||||
var _b = this.childNodes[0].getBBox(), h = _b.h, d = _b.d, w = _b.w;
|
||||
var _c = __read(this.TRBL, 4), T = _c[0], R = _c[1], B = _c[2], L = _c[3];
|
||||
return this.getArgMod(L + w + R, T + h + d + B);
|
||||
};
|
||||
class_1.prototype.createMsqrt = function (child) {
|
||||
var mmlFactory = this.node.factory;
|
||||
var mml = mmlFactory.create('msqrt');
|
||||
mml.inheritAttributesFrom(this.node);
|
||||
mml.childNodes[0] = child.node;
|
||||
var node = this.wrap(mml);
|
||||
node.parent = this;
|
||||
return node;
|
||||
};
|
||||
class_1.prototype.sqrtTRBL = function () {
|
||||
var bbox = this.msqrt.getBBox();
|
||||
var cbox = this.msqrt.childNodes[0].getBBox();
|
||||
return [bbox.h - cbox.h, 0, bbox.d - cbox.d, bbox.w - cbox.w];
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMencloseMixin = CommonMencloseMixin;
|
||||
//# sourceMappingURL=menclose.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/menclose.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/menclose.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
11
node_modules/mathjax-full/js/output/common/Wrappers/mfenced.d.ts
generated
vendored
Normal file
11
node_modules/mathjax-full/js/output/common/Wrappers/mfenced.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
import { CommonInferredMrow } from './mrow.js';
|
||||
import { MmlNode } from '../../../core/MmlTree/MmlNode.js';
|
||||
export interface CommonMfenced extends AnyWrapper {
|
||||
mrow: CommonInferredMrow;
|
||||
createMrow(): void;
|
||||
addMrowChildren(): void;
|
||||
addMo(node: MmlNode): void;
|
||||
}
|
||||
export declare type MfencedConstructor = Constructor<CommonMfenced>;
|
||||
export declare function CommonMfencedMixin<T extends WrapperConstructor>(Base: T): MfencedConstructor & T;
|
||||
118
node_modules/mathjax-full/js/output/common/Wrappers/mfenced.js
generated
vendored
Normal file
118
node_modules/mathjax-full/js/output/common/Wrappers/mfenced.js
generated
vendored
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMfencedMixin = void 0;
|
||||
function CommonMfencedMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.mrow = null;
|
||||
_this.createMrow();
|
||||
_this.addMrowChildren();
|
||||
return _this;
|
||||
}
|
||||
class_1.prototype.createMrow = function () {
|
||||
var mmlFactory = this.node.factory;
|
||||
var mrow = mmlFactory.create('inferredMrow');
|
||||
mrow.inheritAttributesFrom(this.node);
|
||||
this.mrow = this.wrap(mrow);
|
||||
this.mrow.parent = this;
|
||||
};
|
||||
class_1.prototype.addMrowChildren = function () {
|
||||
var e_1, _a;
|
||||
var mfenced = this.node;
|
||||
var mrow = this.mrow;
|
||||
this.addMo(mfenced.open);
|
||||
if (this.childNodes.length) {
|
||||
mrow.childNodes.push(this.childNodes[0]);
|
||||
}
|
||||
var i = 0;
|
||||
try {
|
||||
for (var _b = __values(this.childNodes.slice(1)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var child = _c.value;
|
||||
this.addMo(mfenced.separators[i++]);
|
||||
mrow.childNodes.push(child);
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
this.addMo(mfenced.close);
|
||||
mrow.stretchChildren();
|
||||
};
|
||||
class_1.prototype.addMo = function (node) {
|
||||
if (!node)
|
||||
return;
|
||||
var mo = this.wrap(node);
|
||||
this.mrow.childNodes.push(mo);
|
||||
mo.parent = this.mrow;
|
||||
};
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
bbox.updateFrom(this.mrow.getOuterBBox());
|
||||
this.setChildPWidths(recompute);
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMfencedMixin = CommonMfencedMixin;
|
||||
//# sourceMappingURL=mfenced.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mfenced.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mfenced.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mfenced.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mfenced.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,SAAgB,kBAAkB,CAA+B,IAAO;IAEtE;QAAqB,2BAAI;QAWvB;YAAY,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAA1B,wDACW,IAAI,mBAGd;YAVM,UAAI,GAAuB,IAAI,CAAC;YAQrC,KAAI,CAAC,UAAU,EAAE,CAAC;YAClB,KAAI,CAAC,eAAe,EAAE,CAAC;;QACzB,CAAC;QAKM,4BAAU,GAAjB;YACE,IAAM,UAAU,GAAI,IAAI,CAAC,IAAwB,CAAC,OAAO,CAAC;YAC1D,IAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;YAC/C,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAuB,CAAC;YAClD,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAC1B,CAAC;QAOM,iCAAe,GAAtB;;YACE,IAAM,OAAO,GAAG,IAAI,CAAC,IAAkB,CAA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vB;AAEJ,CAAC;AAzED,gDAyEC"}
|
||||
30
node_modules/mathjax-full/js/output/common/Wrappers/mfrac.d.ts
generated
vendored
Normal file
30
node_modules/mathjax-full/js/output/common/Wrappers/mfrac.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
import { BBox } from '../../../util/BBox.js';
|
||||
export interface CommonMfrac extends AnyWrapper {
|
||||
getFractionBBox(bbox: BBox, display: boolean, t: number): void;
|
||||
getTUV(display: boolean, t: number): {
|
||||
T: number;
|
||||
u: number;
|
||||
v: number;
|
||||
};
|
||||
getAtopBBox(bbox: BBox, display: boolean): void;
|
||||
getUVQ(display: boolean): {
|
||||
u: number;
|
||||
v: number;
|
||||
q: number;
|
||||
nbox: BBox;
|
||||
dbox: BBox;
|
||||
};
|
||||
getBevelledBBox(bbox: BBox, display: boolean): void;
|
||||
getBevelData(display: boolean): {
|
||||
H: number;
|
||||
delta: number;
|
||||
u: number;
|
||||
v: number;
|
||||
nbox: BBox;
|
||||
dbox: BBox;
|
||||
};
|
||||
isDisplay(): boolean;
|
||||
}
|
||||
export declare type MfracConstructor = Constructor<CommonMfrac>;
|
||||
export declare function CommonMfracMixin<T extends WrapperConstructor>(Base: T): MfracConstructor & T;
|
||||
167
node_modules/mathjax-full/js/output/common/Wrappers/mfrac.js
generated
vendored
Normal file
167
node_modules/mathjax-full/js/output/common/Wrappers/mfrac.js
generated
vendored
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMfracMixin = void 0;
|
||||
function CommonMfracMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.bevel = null;
|
||||
_this.pad = (_this.node.getProperty('withDelims') ? 0 : _this.font.params.nulldelimiterspace);
|
||||
if (_this.node.attributes.get('bevelled')) {
|
||||
var H = _this.getBevelData(_this.isDisplay()).H;
|
||||
var bevel = _this.bevel = _this.createMo('/');
|
||||
bevel.node.attributes.set('symmetric', true);
|
||||
bevel.canStretch(1);
|
||||
bevel.getStretchedVariant([H], true);
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
bbox.empty();
|
||||
var _a = this.node.attributes.getList('linethickness', 'bevelled'), linethickness = _a.linethickness, bevelled = _a.bevelled;
|
||||
var display = this.isDisplay();
|
||||
var w = null;
|
||||
if (bevelled) {
|
||||
this.getBevelledBBox(bbox, display);
|
||||
}
|
||||
else {
|
||||
var thickness = this.length2em(String(linethickness), .06);
|
||||
w = -2 * this.pad;
|
||||
if (thickness === 0) {
|
||||
this.getAtopBBox(bbox, display);
|
||||
}
|
||||
else {
|
||||
this.getFractionBBox(bbox, display, thickness);
|
||||
w -= .2;
|
||||
}
|
||||
w += bbox.w;
|
||||
}
|
||||
bbox.clean();
|
||||
this.setChildPWidths(recompute, w);
|
||||
};
|
||||
class_1.prototype.getFractionBBox = function (bbox, display, t) {
|
||||
var nbox = this.childNodes[0].getOuterBBox();
|
||||
var dbox = this.childNodes[1].getOuterBBox();
|
||||
var tex = this.font.params;
|
||||
var a = tex.axis_height;
|
||||
var _a = this.getTUV(display, t), T = _a.T, u = _a.u, v = _a.v;
|
||||
bbox.combine(nbox, 0, a + T + Math.max(nbox.d * nbox.rscale, u));
|
||||
bbox.combine(dbox, 0, a - T - Math.max(dbox.h * dbox.rscale, v));
|
||||
bbox.w += 2 * this.pad + .2;
|
||||
};
|
||||
class_1.prototype.getTUV = function (display, t) {
|
||||
var tex = this.font.params;
|
||||
var a = tex.axis_height;
|
||||
var T = (display ? 3.5 : 1.5) * t;
|
||||
return { T: (display ? 3.5 : 1.5) * t,
|
||||
u: (display ? tex.num1 : tex.num2) - a - T,
|
||||
v: (display ? tex.denom1 : tex.denom2) + a - T };
|
||||
};
|
||||
class_1.prototype.getAtopBBox = function (bbox, display) {
|
||||
var _a = this.getUVQ(display), u = _a.u, v = _a.v, nbox = _a.nbox, dbox = _a.dbox;
|
||||
bbox.combine(nbox, 0, u);
|
||||
bbox.combine(dbox, 0, -v);
|
||||
bbox.w += 2 * this.pad;
|
||||
};
|
||||
class_1.prototype.getUVQ = function (display) {
|
||||
var nbox = this.childNodes[0].getOuterBBox();
|
||||
var dbox = this.childNodes[1].getOuterBBox();
|
||||
var tex = this.font.params;
|
||||
var _a = __read((display ? [tex.num1, tex.denom1] : [tex.num3, tex.denom2]), 2), u = _a[0], v = _a[1];
|
||||
var p = (display ? 7 : 3) * tex.rule_thickness;
|
||||
var q = (u - nbox.d * nbox.scale) - (dbox.h * dbox.scale - v);
|
||||
if (q < p) {
|
||||
u += (p - q) / 2;
|
||||
v += (p - q) / 2;
|
||||
q = p;
|
||||
}
|
||||
return { u: u, v: v, q: q, nbox: nbox, dbox: dbox };
|
||||
};
|
||||
class_1.prototype.getBevelledBBox = function (bbox, display) {
|
||||
var _a = this.getBevelData(display), u = _a.u, v = _a.v, delta = _a.delta, nbox = _a.nbox, dbox = _a.dbox;
|
||||
var lbox = this.bevel.getOuterBBox();
|
||||
bbox.combine(nbox, 0, u);
|
||||
bbox.combine(lbox, bbox.w - delta / 2, 0);
|
||||
bbox.combine(dbox, bbox.w - delta / 2, v);
|
||||
};
|
||||
class_1.prototype.getBevelData = function (display) {
|
||||
var nbox = this.childNodes[0].getOuterBBox();
|
||||
var dbox = this.childNodes[1].getOuterBBox();
|
||||
var delta = (display ? .4 : .15);
|
||||
var H = Math.max(nbox.scale * (nbox.h + nbox.d), dbox.scale * (dbox.h + dbox.d)) + 2 * delta;
|
||||
var a = this.font.params.axis_height;
|
||||
var u = nbox.scale * (nbox.d - nbox.h) / 2 + a + delta;
|
||||
var v = dbox.scale * (dbox.d - dbox.h) / 2 + a - delta;
|
||||
return { H: H, delta: delta, u: u, v: v, nbox: nbox, dbox: dbox };
|
||||
};
|
||||
class_1.prototype.canStretch = function (_direction) {
|
||||
return false;
|
||||
};
|
||||
class_1.prototype.isDisplay = function () {
|
||||
var _a = this.node.attributes.getList('displaystyle', 'scriptlevel'), displaystyle = _a.displaystyle, scriptlevel = _a.scriptlevel;
|
||||
return displaystyle && scriptlevel === 0;
|
||||
};
|
||||
class_1.prototype.getWrapWidth = function (i) {
|
||||
var attributes = this.node.attributes;
|
||||
if (attributes.get('bevelled')) {
|
||||
return this.childNodes[i].getOuterBBox().w;
|
||||
}
|
||||
var w = this.getBBox().w;
|
||||
var thickness = this.length2em(attributes.get('linethickness'));
|
||||
return w - (thickness ? .2 : 0) - 2 * this.pad;
|
||||
};
|
||||
class_1.prototype.getChildAlign = function (i) {
|
||||
var attributes = this.node.attributes;
|
||||
return (attributes.get('bevelled') ? 'left' : attributes.get(['numalign', 'denomalign'][i]));
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMfracMixin = CommonMfracMixin;
|
||||
//# sourceMappingURL=mfrac.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mfrac.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mfrac.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
11
node_modules/mathjax-full/js/output/common/Wrappers/mglyph.d.ts
generated
vendored
Normal file
11
node_modules/mathjax-full/js/output/common/Wrappers/mglyph.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
import { CommonTextNode } from './TextNode.js';
|
||||
export interface CommonMglyph extends AnyWrapper {
|
||||
width: number;
|
||||
height: number;
|
||||
valign: number;
|
||||
charWrapper: CommonTextNode;
|
||||
getParameters(): void;
|
||||
}
|
||||
export declare type MglyphConstructor = Constructor<CommonMglyph>;
|
||||
export declare function CommonMglyphMixin<T extends WrapperConstructor>(Base: T): MglyphConstructor & T;
|
||||
85
node_modules/mathjax-full/js/output/common/Wrappers/mglyph.js
generated
vendored
Normal file
85
node_modules/mathjax-full/js/output/common/Wrappers/mglyph.js
generated
vendored
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMglyphMixin = void 0;
|
||||
function CommonMglyphMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.getParameters();
|
||||
return _this;
|
||||
}
|
||||
class_1.prototype.getParameters = function () {
|
||||
var _a = this.node.attributes.getList('width', 'height', 'valign', 'src', 'index'), width = _a.width, height = _a.height, valign = _a.valign, src = _a.src, index = _a.index;
|
||||
if (src) {
|
||||
this.width = (width === 'auto' ? 1 : this.length2em(width));
|
||||
this.height = (height === 'auto' ? 1 : this.length2em(height));
|
||||
this.valign = this.length2em(valign || '0');
|
||||
}
|
||||
else {
|
||||
var text = String.fromCodePoint(parseInt(index));
|
||||
var mmlFactory = this.node.factory;
|
||||
this.charWrapper = this.wrap(mmlFactory.create('text').setText(text));
|
||||
this.charWrapper.parent = this;
|
||||
}
|
||||
};
|
||||
class_1.prototype.computeBBox = function (bbox, _recompute) {
|
||||
if (_recompute === void 0) { _recompute = false; }
|
||||
if (this.charWrapper) {
|
||||
bbox.updateFrom(this.charWrapper.getBBox());
|
||||
}
|
||||
else {
|
||||
bbox.w = this.width;
|
||||
bbox.h = this.height + this.valign;
|
||||
bbox.d = -this.valign;
|
||||
}
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMglyphMixin = CommonMglyphMixin;
|
||||
//# sourceMappingURL=mglyph.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mglyph.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mglyph.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mglyph.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mglyph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,SAAgB,iBAAiB,CAA+B,IAAO;IAErE;QAAqB,2BAAI;QAwBvB;YAAY,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAA1B,w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CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;aAC7C;iBAAM;gBACL,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;gBACpB,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBACnC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;aACvB;QACH,CAAC;QAEH,cAAC;IAAD,CAAC,AA5DM,CAAc,IAAI,GA4DvB;AAEJ,CAAC;AAhED,8CAgEC"}
|
||||
5
node_modules/mathjax-full/js/output/common/Wrappers/mi.d.ts
generated
vendored
Normal file
5
node_modules/mathjax-full/js/output/common/Wrappers/mi.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonMi extends AnyWrapper {
|
||||
}
|
||||
export declare type MiConstructor = Constructor<CommonMi>;
|
||||
export declare function CommonMiMixin<T extends WrapperConstructor>(Base: T): MiConstructor & T;
|
||||
34
node_modules/mathjax-full/js/output/common/Wrappers/mi.js
generated
vendored
Normal file
34
node_modules/mathjax-full/js/output/common/Wrappers/mi.js
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMiMixin = void 0;
|
||||
function CommonMiMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.computeBBox = function (bbox, _recompute) {
|
||||
if (_recompute === void 0) { _recompute = false; }
|
||||
_super.prototype.computeBBox.call(this, bbox);
|
||||
this.copySkewIC(bbox);
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMiMixin = CommonMiMixin;
|
||||
//# sourceMappingURL=mi.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mi.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mi.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mi.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA4CA,SAAgB,aAAa,CAA+B,IAAO;IAEjE;QAAqB,2BAAI;QAAlB;;QASP,CAAC;QAJQ,6BAAW,GAAlB,UAAmB,IAAU,EAAE,UAA2B;YAA3B,2BAAA,EAAA,kBAA2B;YACxD,iBAAM,WAAW,YAAC,IAAI,CAAC,CAAC;YACxB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;QACH,cAAC;IAAD,CAAC,AATM,CAAc,IAAI,GASvB;AAEJ,CAAC;AAbD,sCAaC"}
|
||||
37
node_modules/mathjax-full/js/output/common/Wrappers/mmultiscripts.d.ts
generated
vendored
Normal file
37
node_modules/mathjax-full/js/output/common/Wrappers/mmultiscripts.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import { AnyWrapper, Constructor } from '../Wrapper.js';
|
||||
import { CommonMsubsup, MsubsupConstructor } from './msubsup.js';
|
||||
import { BBox } from '../../../util/BBox.js';
|
||||
export declare type ScriptData = {
|
||||
base: BBox;
|
||||
sub: BBox;
|
||||
sup: BBox;
|
||||
psub: BBox;
|
||||
psup: BBox;
|
||||
numPrescripts: number;
|
||||
numScripts: number;
|
||||
};
|
||||
export declare type ScriptDataName = keyof ScriptData;
|
||||
export declare type ScriptLists = {
|
||||
base: BBox[];
|
||||
subList: BBox[];
|
||||
supList: BBox[];
|
||||
psubList: BBox[];
|
||||
psupList: BBox[];
|
||||
};
|
||||
export declare type ScriptListName = keyof ScriptLists;
|
||||
export declare const NextScript: {
|
||||
[key: string]: ScriptListName;
|
||||
};
|
||||
export declare const ScriptNames: (keyof ScriptData)[];
|
||||
export interface CommonMmultiscripts<W extends AnyWrapper> extends CommonMsubsup<W> {
|
||||
scriptData: ScriptData;
|
||||
firstPrescript: number;
|
||||
combinePrePost(pre: BBox, post: BBox): BBox;
|
||||
getScriptData(): void;
|
||||
getScriptBBoxLists(): ScriptLists;
|
||||
padLists(list1: BBox[], list2: BBox[]): void;
|
||||
combineBBoxLists(bbox1: BBox, bbox2: BBox, list1: BBox[], list2: BBox[]): void;
|
||||
getScaledWHD(bbox: BBox): void;
|
||||
}
|
||||
export declare type MmultiscriptsConstructor<W extends AnyWrapper> = Constructor<CommonMmultiscripts<W>>;
|
||||
export declare function CommonMmultiscriptsMixin<W extends AnyWrapper, T extends MsubsupConstructor<W>>(Base: T): MmultiscriptsConstructor<W> & T;
|
||||
194
node_modules/mathjax-full/js/output/common/Wrappers/mmultiscripts.js
generated
vendored
Normal file
194
node_modules/mathjax-full/js/output/common/Wrappers/mmultiscripts.js
generated
vendored
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMmultiscriptsMixin = exports.ScriptNames = exports.NextScript = void 0;
|
||||
var BBox_js_1 = require("../../../util/BBox.js");
|
||||
exports.NextScript = {
|
||||
base: 'subList',
|
||||
subList: 'supList',
|
||||
supList: 'subList',
|
||||
psubList: 'psupList',
|
||||
psupList: 'psubList',
|
||||
};
|
||||
exports.ScriptNames = ['sup', 'sup', 'psup', 'psub'];
|
||||
function CommonMmultiscriptsMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.scriptData = null;
|
||||
_this.firstPrescript = 0;
|
||||
_this.getScriptData();
|
||||
return _this;
|
||||
}
|
||||
class_1.prototype.combinePrePost = function (pre, post) {
|
||||
var bbox = new BBox_js_1.BBox(pre);
|
||||
bbox.combine(post, 0, 0);
|
||||
return bbox;
|
||||
};
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
var scriptspace = this.font.params.scriptspace;
|
||||
var data = this.scriptData;
|
||||
var sub = this.combinePrePost(data.sub, data.psub);
|
||||
var sup = this.combinePrePost(data.sup, data.psup);
|
||||
var _a = __read(this.getUVQ(sub, sup), 2), u = _a[0], v = _a[1];
|
||||
bbox.empty();
|
||||
if (data.numPrescripts) {
|
||||
bbox.combine(data.psup, scriptspace, u);
|
||||
bbox.combine(data.psub, scriptspace, v);
|
||||
}
|
||||
bbox.append(data.base);
|
||||
if (data.numScripts) {
|
||||
var w = bbox.w;
|
||||
bbox.combine(data.sup, w, u);
|
||||
bbox.combine(data.sub, w, v);
|
||||
bbox.w += scriptspace;
|
||||
}
|
||||
bbox.clean();
|
||||
this.setChildPWidths(recompute);
|
||||
};
|
||||
class_1.prototype.getScriptData = function () {
|
||||
var data = this.scriptData = {
|
||||
base: null, sub: BBox_js_1.BBox.empty(), sup: BBox_js_1.BBox.empty(), psub: BBox_js_1.BBox.empty(), psup: BBox_js_1.BBox.empty(),
|
||||
numPrescripts: 0, numScripts: 0
|
||||
};
|
||||
var lists = this.getScriptBBoxLists();
|
||||
this.combineBBoxLists(data.sub, data.sup, lists.subList, lists.supList);
|
||||
this.combineBBoxLists(data.psub, data.psup, lists.psubList, lists.psupList);
|
||||
data.base = lists.base[0];
|
||||
data.numPrescripts = lists.psubList.length;
|
||||
data.numScripts = lists.subList.length;
|
||||
};
|
||||
class_1.prototype.getScriptBBoxLists = function () {
|
||||
var e_1, _a;
|
||||
var lists = {
|
||||
base: [], subList: [], supList: [], psubList: [], psupList: []
|
||||
};
|
||||
var script = 'base';
|
||||
try {
|
||||
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var child = _c.value;
|
||||
if (child.node.isKind('mprescripts')) {
|
||||
script = 'psubList';
|
||||
}
|
||||
else {
|
||||
lists[script].push(child.getOuterBBox());
|
||||
script = exports.NextScript[script];
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
this.firstPrescript = lists.subList.length + lists.supList.length + 2;
|
||||
this.padLists(lists.subList, lists.supList);
|
||||
this.padLists(lists.psubList, lists.psupList);
|
||||
return lists;
|
||||
};
|
||||
class_1.prototype.padLists = function (list1, list2) {
|
||||
if (list1.length > list2.length) {
|
||||
list2.push(BBox_js_1.BBox.empty());
|
||||
}
|
||||
};
|
||||
class_1.prototype.combineBBoxLists = function (bbox1, bbox2, list1, list2) {
|
||||
for (var i = 0; i < list1.length; i++) {
|
||||
var _a = __read(this.getScaledWHD(list1[i]), 3), w1 = _a[0], h1 = _a[1], d1 = _a[2];
|
||||
var _b = __read(this.getScaledWHD(list2[i]), 3), w2 = _b[0], h2 = _b[1], d2 = _b[2];
|
||||
var w = Math.max(w1, w2);
|
||||
bbox1.w += w;
|
||||
bbox2.w += w;
|
||||
if (h1 > bbox1.h)
|
||||
bbox1.h = h1;
|
||||
if (d1 > bbox1.d)
|
||||
bbox1.d = d1;
|
||||
if (h2 > bbox2.h)
|
||||
bbox2.h = h2;
|
||||
if (d2 > bbox2.d)
|
||||
bbox2.d = d2;
|
||||
}
|
||||
};
|
||||
class_1.prototype.getScaledWHD = function (bbox) {
|
||||
var w = bbox.w, h = bbox.h, d = bbox.d, rscale = bbox.rscale;
|
||||
return [w * rscale, h * rscale, d * rscale];
|
||||
};
|
||||
class_1.prototype.getUVQ = function (subbox, supbox) {
|
||||
var _a;
|
||||
if (!this.UVQ) {
|
||||
var _b = __read([0, 0, 0], 3), u = _b[0], v = _b[1], q = _b[2];
|
||||
if (subbox.h === 0 && subbox.d === 0) {
|
||||
u = this.getU();
|
||||
}
|
||||
else if (supbox.h === 0 && supbox.d === 0) {
|
||||
u = -this.getV();
|
||||
}
|
||||
else {
|
||||
_a = __read(_super.prototype.getUVQ.call(this, subbox, supbox), 3), u = _a[0], v = _a[1], q = _a[2];
|
||||
}
|
||||
this.UVQ = [u, v, q];
|
||||
}
|
||||
return this.UVQ;
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMmultiscriptsMixin = CommonMmultiscriptsMixin;
|
||||
//# sourceMappingURL=mmultiscripts.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mmultiscripts.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mmultiscripts.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/mathjax-full/js/output/common/Wrappers/mn.d.ts
generated
vendored
Normal file
5
node_modules/mathjax-full/js/output/common/Wrappers/mn.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonMn extends AnyWrapper {
|
||||
}
|
||||
export declare type MnConstructor = Constructor<CommonMn>;
|
||||
export declare function CommonMnMixin<T extends WrapperConstructor>(Base: T): MnConstructor & T;
|
||||
44
node_modules/mathjax-full/js/output/common/Wrappers/mn.js
generated
vendored
Normal file
44
node_modules/mathjax-full/js/output/common/Wrappers/mn.js
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMnMixin = void 0;
|
||||
function CommonMnMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.remapChars = function (chars) {
|
||||
if (chars.length) {
|
||||
var text = this.font.getRemappedChar('mn', chars[0]);
|
||||
if (text) {
|
||||
var c = this.unicodeChars(text, this.variant);
|
||||
if (c.length === 1) {
|
||||
chars[0] = c[0];
|
||||
}
|
||||
else {
|
||||
chars = c.concat(chars.slice(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
return chars;
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMnMixin = CommonMnMixin;
|
||||
//# sourceMappingURL=mn.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mn.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mn.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mn.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA2CA,SAAgB,aAAa,CAA+B,IAAO;IAEjE;QAAqB,2BAAI;QAAlB;;QAsBP,CAAC;QAjBQ,4BAAU,GAAjB,UAAkB,KAAe;YAI/B,IAAI,KAAK,CAAC,MAAM,EAAE;gBAChB,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvD,IAAI,IAAI,EAAE;oBACR,IAAM,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChD,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;wBAClB,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;qBACjB;yBAAM;wBACL,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;qBAClC;iBACF;aACF;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QACH,cAAC;IAAD,CAAC,AAtBM,CAAc,IAAI,GAsBvB;AAEJ,CAAC;AA1BD,sCA0BC"}
|
||||
21
node_modules/mathjax-full/js/output/common/Wrappers/mo.d.ts
generated
vendored
Normal file
21
node_modules/mathjax-full/js/output/common/Wrappers/mo.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
import { BBox } from '../../../util/BBox.js';
|
||||
import { DelimiterData } from '../FontData.js';
|
||||
export declare const DirectionVH: {
|
||||
[n: number]: string;
|
||||
};
|
||||
export interface CommonMo extends AnyWrapper {
|
||||
size: number;
|
||||
isAccent: boolean;
|
||||
protoBBox(bbox: BBox): void;
|
||||
getAccentOffset(): number;
|
||||
getCenterOffset(bbox?: BBox): number;
|
||||
getStretchedVariant(WH: number[], exact?: boolean): void;
|
||||
getSize(name: string, value: number): number;
|
||||
getWH(WH: number[]): number;
|
||||
getStretchBBox(WHD: number[], D: number, C: DelimiterData): void;
|
||||
getBaseline(WHD: number[], HD: number, C: DelimiterData): number[];
|
||||
checkExtendedHeight(D: number, C: DelimiterData): number;
|
||||
}
|
||||
export declare type MoConstructor = Constructor<CommonMo>;
|
||||
export declare function CommonMoMixin<T extends WrapperConstructor>(Base: T): MoConstructor & T;
|
||||
283
node_modules/mathjax-full/js/output/common/Wrappers/mo.js
generated
vendored
Normal file
283
node_modules/mathjax-full/js/output/common/Wrappers/mo.js
generated
vendored
Normal file
|
|
@ -0,0 +1,283 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var _a;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMoMixin = exports.DirectionVH = void 0;
|
||||
var BBox_js_1 = require("../../../util/BBox.js");
|
||||
var string_js_1 = require("../../../util/string.js");
|
||||
var FontData_js_1 = require("../FontData.js");
|
||||
exports.DirectionVH = (_a = {},
|
||||
_a[1] = 'v',
|
||||
_a[2] = 'h',
|
||||
_a);
|
||||
function CommonMoMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.size = null;
|
||||
_this.isAccent = _this.node.isAccent;
|
||||
return _this;
|
||||
}
|
||||
class_1.prototype.computeBBox = function (bbox, _recompute) {
|
||||
if (_recompute === void 0) { _recompute = false; }
|
||||
this.protoBBox(bbox);
|
||||
if (this.node.attributes.get('symmetric') &&
|
||||
this.stretch.dir !== 2) {
|
||||
var d = this.getCenterOffset(bbox);
|
||||
bbox.h += d;
|
||||
bbox.d -= d;
|
||||
}
|
||||
if (this.node.getProperty('mathaccent') &&
|
||||
(this.stretch.dir === 0 || this.size >= 0)) {
|
||||
bbox.w = 0;
|
||||
}
|
||||
};
|
||||
class_1.prototype.protoBBox = function (bbox) {
|
||||
var stretchy = (this.stretch.dir !== 0);
|
||||
if (stretchy && this.size === null) {
|
||||
this.getStretchedVariant([0]);
|
||||
}
|
||||
if (stretchy && this.size < 0)
|
||||
return;
|
||||
_super.prototype.computeBBox.call(this, bbox);
|
||||
this.copySkewIC(bbox);
|
||||
};
|
||||
class_1.prototype.getAccentOffset = function () {
|
||||
var bbox = BBox_js_1.BBox.empty();
|
||||
this.protoBBox(bbox);
|
||||
return -bbox.w / 2;
|
||||
};
|
||||
class_1.prototype.getCenterOffset = function (bbox) {
|
||||
if (bbox === void 0) { bbox = null; }
|
||||
if (!bbox) {
|
||||
bbox = BBox_js_1.BBox.empty();
|
||||
_super.prototype.computeBBox.call(this, bbox);
|
||||
}
|
||||
return ((bbox.h + bbox.d) / 2 + this.font.params.axis_height) - bbox.h;
|
||||
};
|
||||
class_1.prototype.getVariant = function () {
|
||||
if (this.node.attributes.get('largeop')) {
|
||||
this.variant = (this.node.attributes.get('displaystyle') ? '-largeop' : '-smallop');
|
||||
return;
|
||||
}
|
||||
if (!this.node.attributes.getExplicit('mathvariant') &&
|
||||
this.node.getProperty('pseudoscript') === false) {
|
||||
this.variant = '-tex-variant';
|
||||
return;
|
||||
}
|
||||
_super.prototype.getVariant.call(this);
|
||||
};
|
||||
class_1.prototype.canStretch = function (direction) {
|
||||
if (this.stretch.dir !== 0) {
|
||||
return this.stretch.dir === direction;
|
||||
}
|
||||
var attributes = this.node.attributes;
|
||||
if (!attributes.get('stretchy'))
|
||||
return false;
|
||||
var c = this.getText();
|
||||
if (Array.from(c).length !== 1)
|
||||
return false;
|
||||
var delim = this.font.getDelimiter(c.codePointAt(0));
|
||||
this.stretch = (delim && delim.dir === direction ? delim : FontData_js_1.NOSTRETCH);
|
||||
return this.stretch.dir !== 0;
|
||||
};
|
||||
class_1.prototype.getStretchedVariant = function (WH, exact) {
|
||||
var e_1, _a;
|
||||
if (exact === void 0) { exact = false; }
|
||||
if (this.stretch.dir !== 0) {
|
||||
var D = this.getWH(WH);
|
||||
var min = this.getSize('minsize', 0);
|
||||
var max = this.getSize('maxsize', Infinity);
|
||||
var mathaccent = this.node.getProperty('mathaccent');
|
||||
D = Math.max(min, Math.min(max, D));
|
||||
var df = this.font.params.delimiterfactor / 1000;
|
||||
var ds = this.font.params.delimitershortfall;
|
||||
var m = (min || exact ? D : mathaccent ? Math.min(D / df, D + ds) : Math.max(D * df, D - ds));
|
||||
var delim = this.stretch;
|
||||
var c = delim.c || this.getText().codePointAt(0);
|
||||
var i = 0;
|
||||
if (delim.sizes) {
|
||||
try {
|
||||
for (var _b = __values(delim.sizes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var d = _c.value;
|
||||
if (d >= m) {
|
||||
if (mathaccent && i) {
|
||||
i--;
|
||||
}
|
||||
this.variant = this.font.getSizeVariant(c, i);
|
||||
this.size = i;
|
||||
if (delim.schar && delim.schar[i]) {
|
||||
this.stretch = __assign(__assign({}, this.stretch), { c: delim.schar[i] });
|
||||
}
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
}
|
||||
if (delim.stretch) {
|
||||
this.size = -1;
|
||||
this.invalidateBBox();
|
||||
this.getStretchBBox(WH, this.checkExtendedHeight(D, delim), delim);
|
||||
}
|
||||
else {
|
||||
this.variant = this.font.getSizeVariant(c, i - 1);
|
||||
this.size = i - 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
class_1.prototype.getSize = function (name, value) {
|
||||
var attributes = this.node.attributes;
|
||||
if (attributes.isSet(name)) {
|
||||
value = this.length2em(attributes.get(name), 1, 1);
|
||||
}
|
||||
return value;
|
||||
};
|
||||
class_1.prototype.getWH = function (WH) {
|
||||
if (WH.length === 0)
|
||||
return 0;
|
||||
if (WH.length === 1)
|
||||
return WH[0];
|
||||
var _a = __read(WH, 2), H = _a[0], D = _a[1];
|
||||
var a = this.font.params.axis_height;
|
||||
return (this.node.attributes.get('symmetric') ? 2 * Math.max(H - a, D + a) : H + D);
|
||||
};
|
||||
class_1.prototype.getStretchBBox = function (WHD, D, C) {
|
||||
var _a;
|
||||
if (C.hasOwnProperty('min') && C.min > D) {
|
||||
D = C.min;
|
||||
}
|
||||
var _b = __read(C.HDW, 3), h = _b[0], d = _b[1], w = _b[2];
|
||||
if (this.stretch.dir === 1) {
|
||||
_a = __read(this.getBaseline(WHD, D, C), 2), h = _a[0], d = _a[1];
|
||||
}
|
||||
else {
|
||||
w = D;
|
||||
}
|
||||
this.bbox.h = h;
|
||||
this.bbox.d = d;
|
||||
this.bbox.w = w;
|
||||
};
|
||||
class_1.prototype.getBaseline = function (WHD, HD, C) {
|
||||
var hasWHD = (WHD.length === 2 && WHD[0] + WHD[1] === HD);
|
||||
var symmetric = this.node.attributes.get('symmetric');
|
||||
var _a = __read((hasWHD ? WHD : [HD, 0]), 2), H = _a[0], D = _a[1];
|
||||
var _b = __read([H + D, 0], 2), h = _b[0], d = _b[1];
|
||||
if (symmetric) {
|
||||
var a = this.font.params.axis_height;
|
||||
if (hasWHD) {
|
||||
h = 2 * Math.max(H - a, D + a);
|
||||
}
|
||||
d = h / 2 - a;
|
||||
}
|
||||
else if (hasWHD) {
|
||||
d = D;
|
||||
}
|
||||
else {
|
||||
var _c = __read((C.HDW || [.75, .25]), 2), ch = _c[0], cd = _c[1];
|
||||
d = cd * (h / (ch + cd));
|
||||
}
|
||||
return [h - d, d];
|
||||
};
|
||||
class_1.prototype.checkExtendedHeight = function (D, C) {
|
||||
if (C.fullExt) {
|
||||
var _a = __read(C.fullExt, 2), extSize = _a[0], endSize = _a[1];
|
||||
var n = Math.ceil(Math.max(0, D - endSize) / extSize);
|
||||
D = endSize + n * extSize;
|
||||
}
|
||||
return D;
|
||||
};
|
||||
class_1.prototype.remapChars = function (chars) {
|
||||
var primes = this.node.getProperty('primes');
|
||||
if (primes) {
|
||||
return (0, string_js_1.unicodeChars)(primes);
|
||||
}
|
||||
if (chars.length === 1) {
|
||||
var parent_1 = this.node.coreParent().parent;
|
||||
var isAccent = this.isAccent && !parent_1.isKind('mrow');
|
||||
var map = (isAccent ? 'accent' : 'mo');
|
||||
var text = this.font.getRemappedChar(map, chars[0]);
|
||||
if (text) {
|
||||
chars = this.unicodeChars(text, this.variant);
|
||||
}
|
||||
}
|
||||
return chars;
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMoMixin = CommonMoMixin;
|
||||
//# sourceMappingURL=mo.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mo.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mo.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
9
node_modules/mathjax-full/js/output/common/Wrappers/mpadded.d.ts
generated
vendored
Normal file
9
node_modules/mathjax-full/js/output/common/Wrappers/mpadded.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
import { BBox } from '../../../util/BBox.js';
|
||||
import { Property } from '../../../core/Tree/Node.js';
|
||||
export interface CommonMpadded extends AnyWrapper {
|
||||
getDimens(): number[];
|
||||
dimen(length: Property, bbox: BBox, d?: string, m?: number): number;
|
||||
}
|
||||
export declare type MpaddedConstructor = Constructor<CommonMpadded>;
|
||||
export declare function CommonMpaddedMixin<T extends WrapperConstructor>(Base: T): MpaddedConstructor & T;
|
||||
96
node_modules/mathjax-full/js/output/common/Wrappers/mpadded.js
generated
vendored
Normal file
96
node_modules/mathjax-full/js/output/common/Wrappers/mpadded.js
generated
vendored
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMpaddedMixin = void 0;
|
||||
function CommonMpaddedMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.getDimens = function () {
|
||||
var values = this.node.attributes.getList('width', 'height', 'depth', 'lspace', 'voffset');
|
||||
var bbox = this.childNodes[0].getBBox();
|
||||
var w = bbox.w, h = bbox.h, d = bbox.d;
|
||||
var W = w, H = h, D = d, x = 0, y = 0, dx = 0;
|
||||
if (values.width !== '')
|
||||
w = this.dimen(values.width, bbox, 'w', 0);
|
||||
if (values.height !== '')
|
||||
h = this.dimen(values.height, bbox, 'h', 0);
|
||||
if (values.depth !== '')
|
||||
d = this.dimen(values.depth, bbox, 'd', 0);
|
||||
if (values.voffset !== '')
|
||||
y = this.dimen(values.voffset, bbox);
|
||||
if (values.lspace !== '')
|
||||
x = this.dimen(values.lspace, bbox);
|
||||
var align = this.node.attributes.get('data-align');
|
||||
if (align) {
|
||||
dx = this.getAlignX(w, bbox, align);
|
||||
}
|
||||
return [H, D, W, h - H, d - D, w - W, x, y, dx];
|
||||
};
|
||||
class_1.prototype.dimen = function (length, bbox, d, m) {
|
||||
if (d === void 0) { d = ''; }
|
||||
if (m === void 0) { m = null; }
|
||||
length = String(length);
|
||||
var match = length.match(/width|height|depth/);
|
||||
var size = (match ? bbox[match[0].charAt(0)] :
|
||||
(d ? bbox[d] : 0));
|
||||
var dimen = (this.length2em(length, size) || 0);
|
||||
if (length.match(/^[-+]/) && d) {
|
||||
dimen += size;
|
||||
}
|
||||
if (m != null) {
|
||||
dimen = Math.max(m, dimen);
|
||||
}
|
||||
return dimen;
|
||||
};
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
var _a = __read(this.getDimens(), 6), H = _a[0], D = _a[1], W = _a[2], dh = _a[3], dd = _a[4], dw = _a[5];
|
||||
bbox.w = W + dw;
|
||||
bbox.h = H + dh;
|
||||
bbox.d = D + dd;
|
||||
this.setChildPWidths(recompute, bbox.w);
|
||||
};
|
||||
class_1.prototype.getWrapWidth = function (_i) {
|
||||
return this.getBBox().w;
|
||||
};
|
||||
class_1.prototype.getChildAlign = function (_i) {
|
||||
return this.node.attributes.get('data-align') || 'left';
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMpaddedMixin = CommonMpaddedMixin;
|
||||
//# sourceMappingURL=mpadded.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mpadded.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mpadded.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mpadded.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mpadded.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,SAAgB,kBAAkB,CAA+B,IAAO;IAEtE;QAAqB,2BAAI;QAAlB;;QA2EP,CAAC;QAlEQ,2BAAS,GAAhB;YACE,IAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;YAC7F,IAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YACrC,IAAA,CAAC,GAAU,IAAI,EAAd,EAAE,CAAC,GAAO,IAAI,EAAX,EAAE,CAAC,GAAI,IAAI,EAAR,CAAS;YACrB,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;YAC9C,IAAI,MAAM,CAAC,KAAK,KAAK,EAAE;gBAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,GAA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AC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAW,IAAI,MAAM,CAAC;QACpE,CAAC;QACH,cAAC;IAAD,CAAC,AA3EM,CAAc,IAAI,GA2EvB;AAEJ,CAAC;AA/ED,gDA+EC"}
|
||||
6
node_modules/mathjax-full/js/output/common/Wrappers/mroot.d.ts
generated
vendored
Normal file
6
node_modules/mathjax-full/js/output/common/Wrappers/mroot.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { Constructor } from '../../common/Wrapper.js';
|
||||
import { CommonMsqrt, MsqrtConstructor } from './msqrt.js';
|
||||
export interface CommonMroot extends CommonMsqrt {
|
||||
}
|
||||
export declare type MrootConstructor = Constructor<CommonMroot>;
|
||||
export declare function CommonMrootMixin<T extends MsqrtConstructor>(Base: T): MrootConstructor & T;
|
||||
64
node_modules/mathjax-full/js/output/common/Wrappers/mroot.js
generated
vendored
Normal file
64
node_modules/mathjax-full/js/output/common/Wrappers/mroot.js
generated
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMrootMixin = void 0;
|
||||
function CommonMrootMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "surd", {
|
||||
get: function () {
|
||||
return 2;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_1.prototype, "root", {
|
||||
get: function () {
|
||||
return 1;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.combineRootBBox = function (BBOX, sbox, H) {
|
||||
var bbox = this.childNodes[this.root].getOuterBBox();
|
||||
var h = this.getRootDimens(sbox, H)[1];
|
||||
BBOX.combine(bbox, 0, h);
|
||||
};
|
||||
class_1.prototype.getRootDimens = function (sbox, H) {
|
||||
var surd = this.childNodes[this.surd];
|
||||
var bbox = this.childNodes[this.root].getOuterBBox();
|
||||
var offset = (surd.size < 0 ? .5 : .6) * sbox.w;
|
||||
var w = bbox.w, rscale = bbox.rscale;
|
||||
var W = Math.max(w, offset / rscale);
|
||||
var dx = Math.max(0, W - w);
|
||||
var h = this.rootHeight(bbox, sbox, surd.size, H);
|
||||
var x = W * rscale - offset;
|
||||
return [x, h, dx];
|
||||
};
|
||||
class_1.prototype.rootHeight = function (rbox, sbox, size, H) {
|
||||
var h = sbox.h + sbox.d;
|
||||
var b = (size < 0 ? 1.9 : .55 * h) - (h - H);
|
||||
return b + Math.max(0, rbox.d * rbox.rscale);
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMrootMixin = CommonMrootMixin;
|
||||
//# sourceMappingURL=mroot.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mroot.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mroot.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mroot.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mroot.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA8CA,SAAgB,gBAAgB,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CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YACpD,IAAM,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC;YAC9B,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpB,CAAC;QASM,4BAAU,GAAjB,UAAkB,IAAU,EAAE,IAAU,EAAE,IAAY,EAAE,CAAS;YAC/D,IAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAC1B,IAAM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/C,CAAC;QAEH,cAAC;IAAD,CAAC,AArDM,CAAc,IAAI,GAqDvB;AAEJ,CAAC;AAzDD,4CAyDC"}
|
||||
10
node_modules/mathjax-full/js/output/common/Wrappers/mrow.d.ts
generated
vendored
Normal file
10
node_modules/mathjax-full/js/output/common/Wrappers/mrow.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonMrow extends AnyWrapper {
|
||||
stretchChildren(): void;
|
||||
}
|
||||
export declare type MrowConstructor = Constructor<CommonMrow>;
|
||||
export declare function CommonMrowMixin<T extends WrapperConstructor>(Base: T): MrowConstructor & T;
|
||||
export interface CommonInferredMrow extends CommonMrow {
|
||||
}
|
||||
export declare type InferredMrowConstructor = Constructor<CommonInferredMrow>;
|
||||
export declare function CommonInferredMrowMixin<T extends MrowConstructor>(Base: T): InferredMrowConstructor & T;
|
||||
170
node_modules/mathjax-full/js/output/common/Wrappers/mrow.js
generated
vendored
Normal file
170
node_modules/mathjax-full/js/output/common/Wrappers/mrow.js
generated
vendored
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonInferredMrowMixin = exports.CommonMrowMixin = void 0;
|
||||
var BBox_js_1 = require("../../../util/BBox.js");
|
||||
function CommonMrowMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var e_1, _a;
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.stretchChildren();
|
||||
try {
|
||||
for (var _b = __values(_this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var child = _c.value;
|
||||
if (child.bbox.pwidth) {
|
||||
_this.bbox.pwidth = BBox_js_1.BBox.fullWidth;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "fixesPWidth", {
|
||||
get: function () {
|
||||
return false;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.stretchChildren = function () {
|
||||
var e_2, _a, e_3, _b, e_4, _c;
|
||||
var stretchy = [];
|
||||
try {
|
||||
for (var _d = __values(this.childNodes), _e = _d.next(); !_e.done; _e = _d.next()) {
|
||||
var child = _e.value;
|
||||
if (child.canStretch(1)) {
|
||||
stretchy.push(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
var count = stretchy.length;
|
||||
var nodeCount = this.childNodes.length;
|
||||
if (count && nodeCount > 1) {
|
||||
var H = 0, D = 0;
|
||||
var all = (count > 1 && count === nodeCount);
|
||||
try {
|
||||
for (var _f = __values(this.childNodes), _g = _f.next(); !_g.done; _g = _f.next()) {
|
||||
var child = _g.value;
|
||||
var noStretch = (child.stretch.dir === 0);
|
||||
if (all || noStretch) {
|
||||
var _h = child.getOuterBBox(noStretch), h = _h.h, d = _h.d, rscale = _h.rscale;
|
||||
h *= rscale;
|
||||
d *= rscale;
|
||||
if (h > H)
|
||||
H = h;
|
||||
if (d > D)
|
||||
D = d;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
try {
|
||||
for (var stretchy_1 = __values(stretchy), stretchy_1_1 = stretchy_1.next(); !stretchy_1_1.done; stretchy_1_1 = stretchy_1.next()) {
|
||||
var child = stretchy_1_1.value;
|
||||
child.coreMO().getStretchedVariant([H, D]);
|
||||
}
|
||||
}
|
||||
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (stretchy_1_1 && !stretchy_1_1.done && (_c = stretchy_1.return)) _c.call(stretchy_1);
|
||||
}
|
||||
finally { if (e_4) throw e_4.error; }
|
||||
}
|
||||
}
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMrowMixin = CommonMrowMixin;
|
||||
function CommonInferredMrowMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_2, _super);
|
||||
function class_2() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_2.prototype.getScale = function () {
|
||||
this.bbox.scale = this.parent.bbox.scale;
|
||||
this.bbox.rscale = 1;
|
||||
};
|
||||
return class_2;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonInferredMrowMixin = CommonInferredMrowMixin;
|
||||
//# sourceMappingURL=mrow.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mrow.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mrow.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mrow.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mrow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,iDAA2C;AA0B3C,SAAgB,eAAe,CAA+B,IAAO;IAEnE;QAAqB,2BAAI;QAavB;;YAAY,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAA1B,wDACW,IAAI,mBAQd;YAPC,KAAI,CAAC,eAAe,EAAE,CAAC;;gBACvB,KAAoB,IAAA,KAAA,SAAA,KAAI,CAAC,UAAU,CAAA,gBAAA,4BAAE;oBAAhC,IAAM,KAAK,WAAA;oBACd,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;wBACrB,KAAI,CAAC,IAAI,CAAC,MAAM,GAAG,cAAI,CAAC,SAAS,CAAC;wBAClC,MAAM;qBACP;iBACF;;;;;;;;;;QACH,CAAC;QAjBD,sBAAI,gCAAW;iBAAf;gBACE,OAAO,KAAK,CAAC;YACf,CAAC;;;WAAA;QAqBM,iCAAe,GAAtB;;YACE,IAAI,QAAQ,GAAiB,EAAE,CAAC;;gBAIhC,KAAoB,IAAA,KAAA,SAAA,IAAI,CAAC,UAAU,CAAA,gBAAA,4BAAE;oBAAhC,IAAM,KAAK,WAAA;oBACd,IAAI,KAAK,CAAC,UAAU,GAAoB,EAAE;wBACxC,QAAQ,CAA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AAO;IAExE;QAAqB,2BAAI;QAAlB;;QAYP,CAAC;QAJQ,0BAAQ,GAAf;YACE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YACzC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACvB,CAAC;QACH,cAAC;IAAD,CAAC,AAZM,CAAc,IAAI,GAYvB;AAEJ,CAAC;AAhBD,0DAgBC"}
|
||||
6
node_modules/mathjax-full/js/output/common/Wrappers/ms.d.ts
generated
vendored
Normal file
6
node_modules/mathjax-full/js/output/common/Wrappers/ms.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonMs extends AnyWrapper {
|
||||
createText(text: string): AnyWrapper;
|
||||
}
|
||||
export declare type MsConstructor = Constructor<CommonMs>;
|
||||
export declare function CommonMsMixin<T extends WrapperConstructor>(Base: T): MsConstructor & T;
|
||||
74
node_modules/mathjax-full/js/output/common/Wrappers/ms.js
generated
vendored
Normal file
74
node_modules/mathjax-full/js/output/common/Wrappers/ms.js
generated
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMsMixin = void 0;
|
||||
function CommonMsMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
var attributes = _this.node.attributes;
|
||||
var quotes = attributes.getList('lquote', 'rquote');
|
||||
if (_this.variant !== 'monospace') {
|
||||
if (!attributes.isSet('lquote') && quotes.lquote === '"')
|
||||
quotes.lquote = '\u201C';
|
||||
if (!attributes.isSet('rquote') && quotes.rquote === '"')
|
||||
quotes.rquote = '\u201D';
|
||||
}
|
||||
_this.childNodes.unshift(_this.createText(quotes.lquote));
|
||||
_this.childNodes.push(_this.createText(quotes.rquote));
|
||||
return _this;
|
||||
}
|
||||
class_1.prototype.createText = function (text) {
|
||||
var node = this.wrap(this.mmlText(text));
|
||||
node.parent = this;
|
||||
return node;
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMsMixin = CommonMsMixin;
|
||||
//# sourceMappingURL=ms.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/ms.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/ms.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ms.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/ms.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,SAAgB,aAAa,CAA+B,IAAO;IAEjE;QAAqB,2BAAI;QAOvB;YAAY,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAA1B,wDACW,IAAI,mBASd;YARC,IAAM,UAAU,GAAG,KAAI,CAAC,IAAI,CAAC,UAAU,CAAC;YACxC,IAAI,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YACpD,IAAI,KAAI,CAAC,OAAO,KAAK,WAAW,EAAE;gBAChC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG;oBAAE,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC;gBACnF,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG;oBAAE,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC;aACpF;YACD,KAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC,CAAC;YAClE,KAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC,CAAC;;QACjE,CAAC;QAQM,4BAAU,GAAjB,UAAkB,IAAY;YAC5B,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QACH,cAAC;IAAD,CAAC,AA9BM,CAAc,IAAI,GA8BvB;AAEJ,CAAC;AAlCD,sCAkCC"}
|
||||
5
node_modules/mathjax-full/js/output/common/Wrappers/mspace.d.ts
generated
vendored
Normal file
5
node_modules/mathjax-full/js/output/common/Wrappers/mspace.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonMspace extends AnyWrapper {
|
||||
}
|
||||
export declare type MspaceConstructor = Constructor<CommonMspace>;
|
||||
export declare function CommonMspaceMixin<T extends WrapperConstructor>(Base: T): MspaceConstructor & T;
|
||||
38
node_modules/mathjax-full/js/output/common/Wrappers/mspace.js
generated
vendored
Normal file
38
node_modules/mathjax-full/js/output/common/Wrappers/mspace.js
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMspaceMixin = void 0;
|
||||
function CommonMspaceMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.computeBBox = function (bbox, _recompute) {
|
||||
if (_recompute === void 0) { _recompute = false; }
|
||||
var attributes = this.node.attributes;
|
||||
bbox.w = this.length2em(attributes.get('width'), 0);
|
||||
bbox.h = this.length2em(attributes.get('height'), 0);
|
||||
bbox.d = this.length2em(attributes.get('depth'), 0);
|
||||
};
|
||||
class_1.prototype.handleVariant = function () {
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMspaceMixin = CommonMspaceMixin;
|
||||
//# sourceMappingURL=mspace.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mspace.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mspace.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mspace.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mspace.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA4CA,SAAgB,iBAAiB,CAA+B,IAAO;IAErE;QAAqB,2BAAI;QAAlB;;QAoBP,CAAC;QAfQ,6BAAW,GAAlB,UAAmB,IAAU,EAAE,UAA2B;YAA3B,2BAAA,EAAA,kBAA2B;YACxD,IAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;YACxC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;YACpD,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACtD,CAAC;QAOM,+BAAa,GAApB;QACA,CAAC;QAEH,cAAC;IAAD,CAAC,AApBM,CAAc,IAAI,GAoBvB;AAEJ,CAAC;AAxBD,8CAwBC"}
|
||||
13
node_modules/mathjax-full/js/output/common/Wrappers/msqrt.d.ts
generated
vendored
Normal file
13
node_modules/mathjax-full/js/output/common/Wrappers/msqrt.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
import { BBox } from '../../../util/BBox.js';
|
||||
export interface CommonMsqrt extends AnyWrapper {
|
||||
readonly base: number;
|
||||
readonly surd: number;
|
||||
readonly root: number;
|
||||
surdH: number;
|
||||
combineRootBBox(bbox: BBox, sbox: BBox, H: number): void;
|
||||
getPQ(sbox: BBox): number[];
|
||||
getRootDimens(sbox: BBox, H: Number): number[];
|
||||
}
|
||||
export declare type MsqrtConstructor = Constructor<CommonMsqrt>;
|
||||
export declare function CommonMsqrtMixin<T extends WrapperConstructor>(Base: T): MsqrtConstructor & T;
|
||||
121
node_modules/mathjax-full/js/output/common/Wrappers/msqrt.js
generated
vendored
Normal file
121
node_modules/mathjax-full/js/output/common/Wrappers/msqrt.js
generated
vendored
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMsqrtMixin = void 0;
|
||||
var BBox_js_1 = require("../../../util/BBox.js");
|
||||
function CommonMsqrtMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
var surd = _this.createMo('\u221A');
|
||||
surd.canStretch(1);
|
||||
var _a = _this.childNodes[_this.base].getOuterBBox(), h = _a.h, d = _a.d;
|
||||
var t = _this.font.params.rule_thickness;
|
||||
var p = (_this.node.attributes.get('displaystyle') ? _this.font.params.x_height : t);
|
||||
_this.surdH = h + d + 2 * t + p / 4;
|
||||
surd.getStretchedVariant([_this.surdH - d, d], true);
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "base", {
|
||||
get: function () {
|
||||
return 0;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_1.prototype, "surd", {
|
||||
get: function () {
|
||||
return 1;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_1.prototype, "root", {
|
||||
get: function () {
|
||||
return null;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.createMo = function (text) {
|
||||
var node = _super.prototype.createMo.call(this, text);
|
||||
this.childNodes.push(node);
|
||||
return node;
|
||||
};
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
var surdbox = this.childNodes[this.surd].getBBox();
|
||||
var basebox = new BBox_js_1.BBox(this.childNodes[this.base].getOuterBBox());
|
||||
var q = this.getPQ(surdbox)[1];
|
||||
var t = this.font.params.rule_thickness;
|
||||
var H = basebox.h + q + t;
|
||||
var _a = __read(this.getRootDimens(surdbox, H), 1), x = _a[0];
|
||||
bbox.h = H + t;
|
||||
this.combineRootBBox(bbox, surdbox, H);
|
||||
bbox.combine(surdbox, x, H - surdbox.h);
|
||||
bbox.combine(basebox, x + surdbox.w, 0);
|
||||
bbox.clean();
|
||||
this.setChildPWidths(recompute);
|
||||
};
|
||||
class_1.prototype.combineRootBBox = function (_bbox, _sbox, _H) {
|
||||
};
|
||||
class_1.prototype.getPQ = function (sbox) {
|
||||
var t = this.font.params.rule_thickness;
|
||||
var p = (this.node.attributes.get('displaystyle') ? this.font.params.x_height : t);
|
||||
var q = (sbox.h + sbox.d > this.surdH ?
|
||||
((sbox.h + sbox.d) - (this.surdH - 2 * t - p / 2)) / 2 :
|
||||
t + p / 4);
|
||||
return [p, q];
|
||||
};
|
||||
class_1.prototype.getRootDimens = function (_sbox, _H) {
|
||||
return [0, 0, 0, 0];
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMsqrtMixin = CommonMsqrtMixin;
|
||||
//# sourceMappingURL=msqrt.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/msqrt.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/msqrt.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"msqrt.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/msqrt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,iDAA2C;AA+D3C,SAAgB,gBAAgB,CAA+B,IAAO;IAEpE;QAAqB,2BAAI;QAiCvB;YAAY,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAA1B,wDACW,IAAI,mBAQd;YAPC,IAAM,IAAI,GAAG,KAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,CAAC,UAAU,GAAoB,CAAC;YAC9B,IAAA,KAAS,KAAI,CAAC,UAAU,CAAC,KAAI,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAjD,CAAC,OAAA,EAAE,CAAC,OAA6C,CAAC;YACzD,IAAM,CAAC,GAAG,KAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;YAC1C,IAAM,CAAC,GAAG,CAAC,KAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,KAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACrF,KAAI,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAClC,IAAiB,CAAC,mBAAmB,CAAC,CAAC,KAAI,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;;QACpE,CAAC;QArCD,sBAAI,y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vendored
Normal file
19
node_modules/mathjax-full/js/output/common/Wrappers/msubsup.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { AnyWrapper, Constructor } from '../Wrapper.js';
|
||||
import { CommonScriptbase, ScriptbaseConstructor } from './scriptbase.js';
|
||||
import { BBox } from '../../../util/BBox.js';
|
||||
export interface CommonMsub<W extends AnyWrapper> extends CommonScriptbase<W> {
|
||||
}
|
||||
export declare type MsubConstructor<W extends AnyWrapper> = Constructor<CommonMsub<W>>;
|
||||
export declare function CommonMsubMixin<W extends AnyWrapper, T extends ScriptbaseConstructor<W>>(Base: T): MsubConstructor<W> & T;
|
||||
export interface CommonMsup<W extends AnyWrapper> extends CommonScriptbase<W> {
|
||||
}
|
||||
export declare type MsupConstructor<W extends AnyWrapper> = Constructor<CommonMsup<W>>;
|
||||
export declare function CommonMsupMixin<W extends AnyWrapper, T extends ScriptbaseConstructor<W>>(Base: T): MsupConstructor<W> & T;
|
||||
export interface CommonMsubsup<W extends AnyWrapper> extends CommonScriptbase<W> {
|
||||
UVQ: number[];
|
||||
readonly subChild: W;
|
||||
readonly supChild: W;
|
||||
getUVQ(subbox?: BBox, supbox?: BBox): number[];
|
||||
}
|
||||
export declare type MsubsupConstructor<W extends AnyWrapper> = Constructor<CommonMsubsup<W>>;
|
||||
export declare function CommonMsubsupMixin<W extends AnyWrapper, T extends ScriptbaseConstructor<W>>(Base: T): MsubsupConstructor<W> & T;
|
||||
149
node_modules/mathjax-full/js/output/common/Wrappers/msubsup.js
generated
vendored
Normal file
149
node_modules/mathjax-full/js/output/common/Wrappers/msubsup.js
generated
vendored
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMsubsupMixin = exports.CommonMsupMixin = exports.CommonMsubMixin = void 0;
|
||||
function CommonMsubMixin(Base) {
|
||||
var _a;
|
||||
return _a = (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "scriptChild", {
|
||||
get: function () {
|
||||
return this.childNodes[this.node.sub];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.getOffset = function () {
|
||||
return [0, -this.getV()];
|
||||
};
|
||||
return class_1;
|
||||
}(Base)),
|
||||
_a.useIC = false,
|
||||
_a;
|
||||
}
|
||||
exports.CommonMsubMixin = CommonMsubMixin;
|
||||
function CommonMsupMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_2, _super);
|
||||
function class_2() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Object.defineProperty(class_2.prototype, "scriptChild", {
|
||||
get: function () {
|
||||
return this.childNodes[this.node.sup];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_2.prototype.getOffset = function () {
|
||||
var x = this.getAdjustedIc() - (this.baseRemoveIc ? 0 : this.baseIc);
|
||||
return [x, this.getU()];
|
||||
};
|
||||
return class_2;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMsupMixin = CommonMsupMixin;
|
||||
function CommonMsubsupMixin(Base) {
|
||||
var _a;
|
||||
return _a = (function (_super) {
|
||||
__extends(class_3, _super);
|
||||
function class_3() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.UVQ = null;
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(class_3.prototype, "subChild", {
|
||||
get: function () {
|
||||
return this.childNodes[this.node.sub];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_3.prototype, "supChild", {
|
||||
get: function () {
|
||||
return this.childNodes[this.node.sup];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_3.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
var basebox = this.baseChild.getOuterBBox();
|
||||
var _a = __read([this.subChild.getOuterBBox(), this.supChild.getOuterBBox()], 2), subbox = _a[0], supbox = _a[1];
|
||||
bbox.empty();
|
||||
bbox.append(basebox);
|
||||
var w = this.getBaseWidth();
|
||||
var x = this.getAdjustedIc();
|
||||
var _b = __read(this.getUVQ(), 2), u = _b[0], v = _b[1];
|
||||
bbox.combine(subbox, w, v);
|
||||
bbox.combine(supbox, w + x, u);
|
||||
bbox.w += this.font.params.scriptspace;
|
||||
bbox.clean();
|
||||
this.setChildPWidths(recompute);
|
||||
};
|
||||
class_3.prototype.getUVQ = function (subbox, supbox) {
|
||||
if (subbox === void 0) { subbox = this.subChild.getOuterBBox(); }
|
||||
if (supbox === void 0) { supbox = this.supChild.getOuterBBox(); }
|
||||
var basebox = this.baseCore.getOuterBBox();
|
||||
if (this.UVQ)
|
||||
return this.UVQ;
|
||||
var tex = this.font.params;
|
||||
var t = 3 * tex.rule_thickness;
|
||||
var subscriptshift = this.length2em(this.node.attributes.get('subscriptshift'), tex.sub2);
|
||||
var drop = this.baseCharZero(basebox.d * this.baseScale + tex.sub_drop * subbox.rscale);
|
||||
var _a = __read([this.getU(), Math.max(drop, subscriptshift)], 2), u = _a[0], v = _a[1];
|
||||
var q = (u - supbox.d * supbox.rscale) - (subbox.h * subbox.rscale - v);
|
||||
if (q < t) {
|
||||
v += t - q;
|
||||
var p = (4 / 5) * tex.x_height - (u - supbox.d * supbox.rscale);
|
||||
if (p > 0) {
|
||||
u += p;
|
||||
v -= p;
|
||||
}
|
||||
}
|
||||
u = Math.max(this.length2em(this.node.attributes.get('superscriptshift'), u), u);
|
||||
v = Math.max(this.length2em(this.node.attributes.get('subscriptshift'), v), v);
|
||||
q = (u - supbox.d * supbox.rscale) - (subbox.h * subbox.rscale - v);
|
||||
this.UVQ = [u, -v, q];
|
||||
return this.UVQ;
|
||||
};
|
||||
return class_3;
|
||||
}(Base)),
|
||||
_a.useIC = false,
|
||||
_a;
|
||||
}
|
||||
exports.CommonMsubsupMixin = CommonMsubsupMixin;
|
||||
//# sourceMappingURL=msubsup.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/msubsup.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/msubsup.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"msubsup.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/msubsup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,SAAgB,eAAe,CAG7B,IAAO;;IAEP;YAAqB,2BAAI;YAAlB;;YAuBP,CAAC;YAbC,sBAAW,gCAAW;qBAAtB;oBACE,OAAO,IAAI,CAAC,UAAU,CAAE,I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,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACjF,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC/E,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACpE,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC,GAAG,CAAC;YAClB,CAAC;YAEH,cAAC;QAAD,CAAC,AA/FM,CAAc,IAAI;QAKT,QAAK,GAAY,KAAM;WA0FrC;AAEJ,CAAC;AAtGD,gDAsGC"}
|
||||
64
node_modules/mathjax-full/js/output/common/Wrappers/mtable.d.ts
generated
vendored
Normal file
64
node_modules/mathjax-full/js/output/common/Wrappers/mtable.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
import { CommonMtr } from './mtr.js';
|
||||
export declare type TableData = {
|
||||
H: number[];
|
||||
D: number[];
|
||||
W: number[];
|
||||
NH: number[];
|
||||
ND: number[];
|
||||
L: number;
|
||||
};
|
||||
export declare type ColumnWidths = (string | number | null)[];
|
||||
export interface CommonMtable<C extends AnyWrapper, R extends CommonMtr<C>> extends AnyWrapper {
|
||||
numCols: number;
|
||||
numRows: number;
|
||||
hasLabels: boolean;
|
||||
isTop: boolean;
|
||||
container: AnyWrapper;
|
||||
containerI: number;
|
||||
frame: boolean;
|
||||
fLine: number;
|
||||
fSpace: number[];
|
||||
cSpace: number[];
|
||||
rSpace: number[];
|
||||
cLines: number[];
|
||||
rLines: number[];
|
||||
cWidths: (number | string)[];
|
||||
data: TableData;
|
||||
pwidthCells: [C, number][];
|
||||
pWidth: number;
|
||||
readonly tableRows: R[];
|
||||
childNodes: R[];
|
||||
findContainer(): void;
|
||||
getPercentageWidth(): void;
|
||||
stretchRows(): void;
|
||||
stretchColumns(): void;
|
||||
stretchColumn(i: number, W: number): void;
|
||||
getTableData(): TableData;
|
||||
updateHDW(cell: C, i: number, j: number, align: string, H: number[], D: number[], W: number[], M: number): number;
|
||||
extendHD(i: number, H: number[], D: number[], M: number): void;
|
||||
setColumnPWidths(): void;
|
||||
getBBoxHD(height: number): number[];
|
||||
getBBoxLR(): number[];
|
||||
getPadAlignShift(side: string): [number, string, number];
|
||||
getWidth(): number;
|
||||
getEqualRowHeight(): number;
|
||||
getComputedWidths(): number[];
|
||||
getColumnWidths(): ColumnWidths;
|
||||
getEqualColumns(width: string): ColumnWidths;
|
||||
getColumnWidthsAuto(swidths: string[]): ColumnWidths;
|
||||
getColumnWidthsPercent(widths: string[]): ColumnWidths;
|
||||
getColumnWidthsFixed(swidths: string[], width: number): ColumnWidths;
|
||||
getVerticalPosition(i: number, align: string): number;
|
||||
getEmHalfSpacing(fspace: number, space: number[], scale?: number): string[];
|
||||
getRowHalfSpacing(): number[];
|
||||
getColumnHalfSpacing(): number[];
|
||||
getAlignmentRow(): [string, number | null];
|
||||
getColumnAttributes(name: string, i?: number): string[];
|
||||
getRowAttributes(name: string, i?: number): string[];
|
||||
getAttributeArray(name: string): string[];
|
||||
addEm(list: number[], n?: number): string[];
|
||||
convertLengths(list: string[]): number[];
|
||||
}
|
||||
export declare type MtableConstructor<C extends AnyWrapper, R extends CommonMtr<C>> = Constructor<CommonMtable<C, R>>;
|
||||
export declare function CommonMtableMixin<C extends AnyWrapper, R extends CommonMtr<C>, T extends WrapperConstructor>(Base: T): MtableConstructor<C, R> & T;
|
||||
604
node_modules/mathjax-full/js/output/common/Wrappers/mtable.js
generated
vendored
Normal file
604
node_modules/mathjax-full/js/output/common/Wrappers/mtable.js
generated
vendored
Normal file
|
|
@ -0,0 +1,604 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMtableMixin = void 0;
|
||||
var BBox_js_1 = require("../../../util/BBox.js");
|
||||
var string_js_1 = require("../../../util/string.js");
|
||||
var numeric_js_1 = require("../../../util/numeric.js");
|
||||
function CommonMtableMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.numCols = 0;
|
||||
_this.numRows = 0;
|
||||
_this.data = null;
|
||||
_this.pwidthCells = [];
|
||||
_this.pWidth = 0;
|
||||
_this.numCols = (0, numeric_js_1.max)(_this.tableRows.map(function (row) { return row.numCells; }));
|
||||
_this.numRows = _this.childNodes.length;
|
||||
_this.hasLabels = _this.childNodes.reduce(function (value, row) { return value || row.node.isKind('mlabeledtr'); }, false);
|
||||
_this.findContainer();
|
||||
_this.isTop = !_this.container || (_this.container.node.isKind('math') && !_this.container.parent);
|
||||
if (_this.isTop) {
|
||||
_this.jax.table = _this;
|
||||
}
|
||||
_this.getPercentageWidth();
|
||||
var attributes = _this.node.attributes;
|
||||
_this.frame = attributes.get('frame') !== 'none';
|
||||
_this.fLine = (_this.frame && attributes.get('frame') ? .07 : 0);
|
||||
_this.fSpace = (_this.frame ? _this.convertLengths(_this.getAttributeArray('framespacing')) : [0, 0]);
|
||||
_this.cSpace = _this.convertLengths(_this.getColumnAttributes('columnspacing'));
|
||||
_this.rSpace = _this.convertLengths(_this.getRowAttributes('rowspacing'));
|
||||
_this.cLines = _this.getColumnAttributes('columnlines').map(function (x) { return (x === 'none' ? 0 : .07); });
|
||||
_this.rLines = _this.getRowAttributes('rowlines').map(function (x) { return (x === 'none' ? 0 : .07); });
|
||||
_this.cWidths = _this.getColumnWidths();
|
||||
_this.stretchRows();
|
||||
_this.stretchColumns();
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "tableRows", {
|
||||
get: function () {
|
||||
return this.childNodes;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.findContainer = function () {
|
||||
var node = this;
|
||||
var parent = node.parent;
|
||||
while (parent && (parent.node.notParent || parent.node.isKind('mrow'))) {
|
||||
node = parent;
|
||||
parent = parent.parent;
|
||||
}
|
||||
this.container = parent;
|
||||
this.containerI = node.node.childPosition();
|
||||
};
|
||||
class_1.prototype.getPercentageWidth = function () {
|
||||
if (this.hasLabels) {
|
||||
this.bbox.pwidth = BBox_js_1.BBox.fullWidth;
|
||||
}
|
||||
else {
|
||||
var width = this.node.attributes.get('width');
|
||||
if ((0, string_js_1.isPercent)(width)) {
|
||||
this.bbox.pwidth = width;
|
||||
}
|
||||
}
|
||||
};
|
||||
class_1.prototype.stretchRows = function () {
|
||||
var equal = this.node.attributes.get('equalrows');
|
||||
var HD = (equal ? this.getEqualRowHeight() : 0);
|
||||
var _a = (equal ? this.getTableData() : { H: [0], D: [0] }), H = _a.H, D = _a.D;
|
||||
var rows = this.tableRows;
|
||||
for (var i = 0; i < this.numRows; i++) {
|
||||
var hd = (equal ? [(HD + H[i] - D[i]) / 2, (HD - H[i] + D[i]) / 2] : null);
|
||||
rows[i].stretchChildren(hd);
|
||||
}
|
||||
};
|
||||
class_1.prototype.stretchColumns = function () {
|
||||
for (var i = 0; i < this.numCols; i++) {
|
||||
var width = (typeof this.cWidths[i] === 'number' ? this.cWidths[i] : null);
|
||||
this.stretchColumn(i, width);
|
||||
}
|
||||
};
|
||||
class_1.prototype.stretchColumn = function (i, W) {
|
||||
var e_1, _a, e_2, _b, e_3, _c;
|
||||
var stretchy = [];
|
||||
try {
|
||||
for (var _d = __values(this.tableRows), _e = _d.next(); !_e.done; _e = _d.next()) {
|
||||
var row = _e.value;
|
||||
var cell = row.getChild(i);
|
||||
if (cell) {
|
||||
var child = cell.childNodes[0];
|
||||
if (child.stretch.dir === 0 &&
|
||||
child.canStretch(2)) {
|
||||
stretchy.push(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
var count = stretchy.length;
|
||||
var nodeCount = this.childNodes.length;
|
||||
if (count && nodeCount > 1) {
|
||||
if (W === null) {
|
||||
W = 0;
|
||||
var all = (count > 1 && count === nodeCount);
|
||||
try {
|
||||
for (var _f = __values(this.tableRows), _g = _f.next(); !_g.done; _g = _f.next()) {
|
||||
var row = _g.value;
|
||||
var cell = row.getChild(i);
|
||||
if (cell) {
|
||||
var child = cell.childNodes[0];
|
||||
var noStretch = (child.stretch.dir === 0);
|
||||
if (all || noStretch) {
|
||||
var w = child.getBBox(noStretch).w;
|
||||
if (w > W) {
|
||||
W = w;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
}
|
||||
try {
|
||||
for (var stretchy_1 = __values(stretchy), stretchy_1_1 = stretchy_1.next(); !stretchy_1_1.done; stretchy_1_1 = stretchy_1.next()) {
|
||||
var child = stretchy_1_1.value;
|
||||
child.coreMO().getStretchedVariant([W]);
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (stretchy_1_1 && !stretchy_1_1.done && (_c = stretchy_1.return)) _c.call(stretchy_1);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
}
|
||||
};
|
||||
class_1.prototype.getTableData = function () {
|
||||
if (this.data) {
|
||||
return this.data;
|
||||
}
|
||||
var H = new Array(this.numRows).fill(0);
|
||||
var D = new Array(this.numRows).fill(0);
|
||||
var W = new Array(this.numCols).fill(0);
|
||||
var NH = new Array(this.numRows);
|
||||
var ND = new Array(this.numRows);
|
||||
var LW = [0];
|
||||
var rows = this.tableRows;
|
||||
for (var j = 0; j < rows.length; j++) {
|
||||
var M = 0;
|
||||
var row = rows[j];
|
||||
var align = row.node.attributes.get('rowalign');
|
||||
for (var i = 0; i < row.numCells; i++) {
|
||||
var cell = row.getChild(i);
|
||||
M = this.updateHDW(cell, i, j, align, H, D, W, M);
|
||||
this.recordPWidthCell(cell, i);
|
||||
}
|
||||
NH[j] = H[j];
|
||||
ND[j] = D[j];
|
||||
if (row.labeled) {
|
||||
M = this.updateHDW(row.childNodes[0], 0, j, align, H, D, LW, M);
|
||||
}
|
||||
this.extendHD(j, H, D, M);
|
||||
this.extendHD(j, NH, ND, M);
|
||||
}
|
||||
var L = LW[0];
|
||||
this.data = { H: H, D: D, W: W, NH: NH, ND: ND, L: L };
|
||||
return this.data;
|
||||
};
|
||||
class_1.prototype.updateHDW = function (cell, i, j, align, H, D, W, M) {
|
||||
var _a = cell.getBBox(), h = _a.h, d = _a.d, w = _a.w;
|
||||
var scale = cell.parent.bbox.rscale;
|
||||
if (cell.parent.bbox.rscale !== 1) {
|
||||
h *= scale;
|
||||
d *= scale;
|
||||
w *= scale;
|
||||
}
|
||||
if (this.node.getProperty('useHeight')) {
|
||||
if (h < .75)
|
||||
h = .75;
|
||||
if (d < .25)
|
||||
d = .25;
|
||||
}
|
||||
var m = 0;
|
||||
align = cell.node.attributes.get('rowalign') || align;
|
||||
if (align !== 'baseline' && align !== 'axis') {
|
||||
m = h + d;
|
||||
h = d = 0;
|
||||
}
|
||||
if (h > H[j])
|
||||
H[j] = h;
|
||||
if (d > D[j])
|
||||
D[j] = d;
|
||||
if (m > M)
|
||||
M = m;
|
||||
if (W && w > W[i])
|
||||
W[i] = w;
|
||||
return M;
|
||||
};
|
||||
class_1.prototype.extendHD = function (i, H, D, M) {
|
||||
var d = (M - (H[i] + D[i])) / 2;
|
||||
if (d < .00001)
|
||||
return;
|
||||
H[i] += d;
|
||||
D[i] += d;
|
||||
};
|
||||
class_1.prototype.recordPWidthCell = function (cell, i) {
|
||||
if (cell.childNodes[0] && cell.childNodes[0].getBBox().pwidth) {
|
||||
this.pwidthCells.push([cell, i]);
|
||||
}
|
||||
};
|
||||
class_1.prototype.computeBBox = function (bbox, _recompute) {
|
||||
if (_recompute === void 0) { _recompute = false; }
|
||||
var _a = this.getTableData(), H = _a.H, D = _a.D;
|
||||
var height, width;
|
||||
if (this.node.attributes.get('equalrows')) {
|
||||
var HD = this.getEqualRowHeight();
|
||||
height = (0, numeric_js_1.sum)([].concat(this.rLines, this.rSpace)) + HD * this.numRows;
|
||||
}
|
||||
else {
|
||||
height = (0, numeric_js_1.sum)(H.concat(D, this.rLines, this.rSpace));
|
||||
}
|
||||
height += 2 * (this.fLine + this.fSpace[1]);
|
||||
var CW = this.getComputedWidths();
|
||||
width = (0, numeric_js_1.sum)(CW.concat(this.cLines, this.cSpace)) + 2 * (this.fLine + this.fSpace[0]);
|
||||
var w = this.node.attributes.get('width');
|
||||
if (w !== 'auto') {
|
||||
width = Math.max(this.length2em(w, 0) + 2 * this.fLine, width);
|
||||
}
|
||||
var _b = __read(this.getBBoxHD(height), 2), h = _b[0], d = _b[1];
|
||||
bbox.h = h;
|
||||
bbox.d = d;
|
||||
bbox.w = width;
|
||||
var _c = __read(this.getBBoxLR(), 2), L = _c[0], R = _c[1];
|
||||
bbox.L = L;
|
||||
bbox.R = R;
|
||||
if (!(0, string_js_1.isPercent)(w)) {
|
||||
this.setColumnPWidths();
|
||||
}
|
||||
};
|
||||
class_1.prototype.setChildPWidths = function (_recompute, cwidth, _clear) {
|
||||
var width = this.node.attributes.get('width');
|
||||
if (!(0, string_js_1.isPercent)(width))
|
||||
return false;
|
||||
if (!this.hasLabels) {
|
||||
this.bbox.pwidth = '';
|
||||
this.container.bbox.pwidth = '';
|
||||
}
|
||||
var _a = this.bbox, w = _a.w, L = _a.L, R = _a.R;
|
||||
var labelInWidth = this.node.attributes.get('data-width-includes-label');
|
||||
var W = Math.max(w, this.length2em(width, Math.max(cwidth, L + w + R))) - (labelInWidth ? L + R : 0);
|
||||
var cols = (this.node.attributes.get('equalcolumns') ?
|
||||
Array(this.numCols).fill(this.percent(1 / Math.max(1, this.numCols))) :
|
||||
this.getColumnAttributes('columnwidth', 0));
|
||||
this.cWidths = this.getColumnWidthsFixed(cols, W);
|
||||
var CW = this.getComputedWidths();
|
||||
this.pWidth = (0, numeric_js_1.sum)(CW.concat(this.cLines, this.cSpace)) + 2 * (this.fLine + this.fSpace[0]);
|
||||
if (this.isTop) {
|
||||
this.bbox.w = this.pWidth;
|
||||
}
|
||||
this.setColumnPWidths();
|
||||
if (this.pWidth !== w) {
|
||||
this.parent.invalidateBBox();
|
||||
}
|
||||
return this.pWidth !== w;
|
||||
};
|
||||
class_1.prototype.setColumnPWidths = function () {
|
||||
var e_4, _a;
|
||||
var W = this.cWidths;
|
||||
try {
|
||||
for (var _b = __values(this.pwidthCells), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var _d = __read(_c.value, 2), cell = _d[0], i = _d[1];
|
||||
if (cell.setChildPWidths(false, W[i])) {
|
||||
cell.invalidateBBox();
|
||||
cell.getBBox();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_4) throw e_4.error; }
|
||||
}
|
||||
};
|
||||
class_1.prototype.getBBoxHD = function (height) {
|
||||
var _a = __read(this.getAlignmentRow(), 2), align = _a[0], row = _a[1];
|
||||
if (row === null) {
|
||||
var a = this.font.params.axis_height;
|
||||
var h2 = height / 2;
|
||||
var HD = {
|
||||
top: [0, height],
|
||||
center: [h2, h2],
|
||||
bottom: [height, 0],
|
||||
baseline: [h2, h2],
|
||||
axis: [h2 + a, h2 - a]
|
||||
};
|
||||
return HD[align] || [h2, h2];
|
||||
}
|
||||
else {
|
||||
var y = this.getVerticalPosition(row, align);
|
||||
return [y, height - y];
|
||||
}
|
||||
};
|
||||
class_1.prototype.getBBoxLR = function () {
|
||||
if (this.hasLabels) {
|
||||
var attributes = this.node.attributes;
|
||||
var side = attributes.get('side');
|
||||
var _a = __read(this.getPadAlignShift(side), 2), pad = _a[0], align = _a[1];
|
||||
var labels = this.hasLabels && !!attributes.get('data-width-includes-label');
|
||||
if (labels && this.frame && this.fSpace[0]) {
|
||||
pad -= this.fSpace[0];
|
||||
}
|
||||
return (align === 'center' && !labels ? [pad, pad] :
|
||||
side === 'left' ? [pad, 0] : [0, pad]);
|
||||
}
|
||||
return [0, 0];
|
||||
};
|
||||
class_1.prototype.getPadAlignShift = function (side) {
|
||||
var L = this.getTableData().L;
|
||||
var sep = this.length2em(this.node.attributes.get('minlabelspacing'));
|
||||
var pad = L + sep;
|
||||
var _a = __read((this.styles == null ? ['', ''] :
|
||||
[this.styles.get('padding-left'), this.styles.get('padding-right')]), 2), lpad = _a[0], rpad = _a[1];
|
||||
if (lpad || rpad) {
|
||||
pad = Math.max(pad, this.length2em(lpad || '0'), this.length2em(rpad || '0'));
|
||||
}
|
||||
var _b = __read(this.getAlignShift(), 2), align = _b[0], shift = _b[1];
|
||||
if (align === side) {
|
||||
shift = (side === 'left' ? Math.max(pad, shift) - pad : Math.min(-pad, shift) + pad);
|
||||
}
|
||||
return [pad, align, shift];
|
||||
};
|
||||
class_1.prototype.getAlignShift = function () {
|
||||
return (this.isTop ? _super.prototype.getAlignShift.call(this) :
|
||||
[this.container.getChildAlign(this.containerI), 0]);
|
||||
};
|
||||
class_1.prototype.getWidth = function () {
|
||||
return this.pWidth || this.getBBox().w;
|
||||
};
|
||||
class_1.prototype.getEqualRowHeight = function () {
|
||||
var _a = this.getTableData(), H = _a.H, D = _a.D;
|
||||
var HD = Array.from(H.keys()).map(function (i) { return H[i] + D[i]; });
|
||||
return Math.max.apply(Math, HD);
|
||||
};
|
||||
class_1.prototype.getComputedWidths = function () {
|
||||
var _this = this;
|
||||
var W = this.getTableData().W;
|
||||
var CW = Array.from(W.keys()).map(function (i) {
|
||||
return (typeof _this.cWidths[i] === 'number' ? _this.cWidths[i] : W[i]);
|
||||
});
|
||||
if (this.node.attributes.get('equalcolumns')) {
|
||||
CW = Array(CW.length).fill((0, numeric_js_1.max)(CW));
|
||||
}
|
||||
return CW;
|
||||
};
|
||||
class_1.prototype.getColumnWidths = function () {
|
||||
var width = this.node.attributes.get('width');
|
||||
if (this.node.attributes.get('equalcolumns')) {
|
||||
return this.getEqualColumns(width);
|
||||
}
|
||||
var swidths = this.getColumnAttributes('columnwidth', 0);
|
||||
if (width === 'auto') {
|
||||
return this.getColumnWidthsAuto(swidths);
|
||||
}
|
||||
if ((0, string_js_1.isPercent)(width)) {
|
||||
return this.getColumnWidthsPercent(swidths);
|
||||
}
|
||||
return this.getColumnWidthsFixed(swidths, this.length2em(width));
|
||||
};
|
||||
class_1.prototype.getEqualColumns = function (width) {
|
||||
var n = Math.max(1, this.numCols);
|
||||
var cwidth;
|
||||
if (width === 'auto') {
|
||||
var W = this.getTableData().W;
|
||||
cwidth = (0, numeric_js_1.max)(W);
|
||||
}
|
||||
else if ((0, string_js_1.isPercent)(width)) {
|
||||
cwidth = this.percent(1 / n);
|
||||
}
|
||||
else {
|
||||
var w = (0, numeric_js_1.sum)([].concat(this.cLines, this.cSpace)) + 2 * this.fSpace[0];
|
||||
cwidth = Math.max(0, this.length2em(width) - w) / n;
|
||||
}
|
||||
return Array(this.numCols).fill(cwidth);
|
||||
};
|
||||
class_1.prototype.getColumnWidthsAuto = function (swidths) {
|
||||
var _this = this;
|
||||
return swidths.map(function (x) {
|
||||
if (x === 'auto' || x === 'fit')
|
||||
return null;
|
||||
if ((0, string_js_1.isPercent)(x))
|
||||
return x;
|
||||
return _this.length2em(x);
|
||||
});
|
||||
};
|
||||
class_1.prototype.getColumnWidthsPercent = function (swidths) {
|
||||
var _this = this;
|
||||
var hasFit = swidths.indexOf('fit') >= 0;
|
||||
var W = (hasFit ? this.getTableData() : { W: null }).W;
|
||||
return Array.from(swidths.keys()).map(function (i) {
|
||||
var x = swidths[i];
|
||||
if (x === 'fit')
|
||||
return null;
|
||||
if (x === 'auto')
|
||||
return (hasFit ? W[i] : null);
|
||||
if ((0, string_js_1.isPercent)(x))
|
||||
return x;
|
||||
return _this.length2em(x);
|
||||
});
|
||||
};
|
||||
class_1.prototype.getColumnWidthsFixed = function (swidths, width) {
|
||||
var _this = this;
|
||||
var indices = Array.from(swidths.keys());
|
||||
var fit = indices.filter(function (i) { return swidths[i] === 'fit'; });
|
||||
var auto = indices.filter(function (i) { return swidths[i] === 'auto'; });
|
||||
var n = fit.length || auto.length;
|
||||
var W = (n ? this.getTableData() : { W: null }).W;
|
||||
var cwidth = width - (0, numeric_js_1.sum)([].concat(this.cLines, this.cSpace)) - 2 * this.fSpace[0];
|
||||
var dw = cwidth;
|
||||
indices.forEach(function (i) {
|
||||
var x = swidths[i];
|
||||
dw -= (x === 'fit' || x === 'auto' ? W[i] : _this.length2em(x, cwidth));
|
||||
});
|
||||
var fw = (n && dw > 0 ? dw / n : 0);
|
||||
return indices.map(function (i) {
|
||||
var x = swidths[i];
|
||||
if (x === 'fit')
|
||||
return W[i] + fw;
|
||||
if (x === 'auto')
|
||||
return W[i] + (fit.length === 0 ? fw : 0);
|
||||
return _this.length2em(x, cwidth);
|
||||
});
|
||||
};
|
||||
class_1.prototype.getVerticalPosition = function (i, align) {
|
||||
var equal = this.node.attributes.get('equalrows');
|
||||
var _a = this.getTableData(), H = _a.H, D = _a.D;
|
||||
var HD = (equal ? this.getEqualRowHeight() : 0);
|
||||
var space = this.getRowHalfSpacing();
|
||||
var y = this.fLine;
|
||||
for (var j = 0; j < i; j++) {
|
||||
y += space[j] + (equal ? HD : H[j] + D[j]) + space[j + 1] + this.rLines[j];
|
||||
}
|
||||
var _b = __read((equal ? [(HD + H[i] - D[i]) / 2, (HD - H[i] + D[i]) / 2] : [H[i], D[i]]), 2), h = _b[0], d = _b[1];
|
||||
var offset = {
|
||||
top: 0,
|
||||
center: space[i] + (h + d) / 2,
|
||||
bottom: space[i] + h + d + space[i + 1],
|
||||
baseline: space[i] + h,
|
||||
axis: space[i] + h - .25
|
||||
};
|
||||
y += offset[align] || 0;
|
||||
return y;
|
||||
};
|
||||
class_1.prototype.getEmHalfSpacing = function (fspace, space, scale) {
|
||||
if (scale === void 0) { scale = 1; }
|
||||
var fspaceEm = this.em(fspace * scale);
|
||||
var spaceEm = this.addEm(space, 2 / scale);
|
||||
spaceEm.unshift(fspaceEm);
|
||||
spaceEm.push(fspaceEm);
|
||||
return spaceEm;
|
||||
};
|
||||
class_1.prototype.getRowHalfSpacing = function () {
|
||||
var space = this.rSpace.map(function (x) { return x / 2; });
|
||||
space.unshift(this.fSpace[1]);
|
||||
space.push(this.fSpace[1]);
|
||||
return space;
|
||||
};
|
||||
class_1.prototype.getColumnHalfSpacing = function () {
|
||||
var space = this.cSpace.map(function (x) { return x / 2; });
|
||||
space.unshift(this.fSpace[0]);
|
||||
space.push(this.fSpace[0]);
|
||||
return space;
|
||||
};
|
||||
class_1.prototype.getAlignmentRow = function () {
|
||||
var _a = __read((0, string_js_1.split)(this.node.attributes.get('align')), 2), align = _a[0], row = _a[1];
|
||||
if (row == null)
|
||||
return [align, null];
|
||||
var i = parseInt(row);
|
||||
if (i < 0)
|
||||
i += this.numRows + 1;
|
||||
return [align, i < 1 || i > this.numRows ? null : i - 1];
|
||||
};
|
||||
class_1.prototype.getColumnAttributes = function (name, i) {
|
||||
if (i === void 0) { i = 1; }
|
||||
var n = this.numCols - i;
|
||||
var columns = this.getAttributeArray(name);
|
||||
if (columns.length === 0)
|
||||
return null;
|
||||
while (columns.length < n) {
|
||||
columns.push(columns[columns.length - 1]);
|
||||
}
|
||||
if (columns.length > n) {
|
||||
columns.splice(n);
|
||||
}
|
||||
return columns;
|
||||
};
|
||||
class_1.prototype.getRowAttributes = function (name, i) {
|
||||
if (i === void 0) { i = 1; }
|
||||
var n = this.numRows - i;
|
||||
var rows = this.getAttributeArray(name);
|
||||
if (rows.length === 0)
|
||||
return null;
|
||||
while (rows.length < n) {
|
||||
rows.push(rows[rows.length - 1]);
|
||||
}
|
||||
if (rows.length > n) {
|
||||
rows.splice(n);
|
||||
}
|
||||
return rows;
|
||||
};
|
||||
class_1.prototype.getAttributeArray = function (name) {
|
||||
var value = this.node.attributes.get(name);
|
||||
if (!value)
|
||||
return [this.node.attributes.getDefault(name)];
|
||||
return (0, string_js_1.split)(value);
|
||||
};
|
||||
class_1.prototype.addEm = function (list, n) {
|
||||
var _this = this;
|
||||
if (n === void 0) { n = 1; }
|
||||
if (!list)
|
||||
return null;
|
||||
return list.map(function (x) { return _this.em(x / n); });
|
||||
};
|
||||
class_1.prototype.convertLengths = function (list) {
|
||||
var _this = this;
|
||||
if (!list)
|
||||
return null;
|
||||
return list.map(function (x) { return _this.length2em(x); });
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMtableMixin = CommonMtableMixin;
|
||||
//# sourceMappingURL=mtable.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mtable.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mtable.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/mathjax-full/js/output/common/Wrappers/mtd.d.ts
generated
vendored
Normal file
5
node_modules/mathjax-full/js/output/common/Wrappers/mtd.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonMtd extends AnyWrapper {
|
||||
}
|
||||
export declare type MtdConstructor = Constructor<CommonMtd>;
|
||||
export declare function CommonMtdMixin<T extends WrapperConstructor>(Base: T): MtdConstructor & T;
|
||||
48
node_modules/mathjax-full/js/output/common/Wrappers/mtd.js
generated
vendored
Normal file
48
node_modules/mathjax-full/js/output/common/Wrappers/mtd.js
generated
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMtdMixin = void 0;
|
||||
function CommonMtdMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "fixesPWidth", {
|
||||
get: function () {
|
||||
return false;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.invalidateBBox = function () {
|
||||
this.bboxComputed = false;
|
||||
};
|
||||
class_1.prototype.getWrapWidth = function (_j) {
|
||||
var table = this.parent.parent;
|
||||
var row = this.parent;
|
||||
var i = this.node.childPosition() - (row.labeled ? 1 : 0);
|
||||
return (typeof (table.cWidths[i]) === 'number' ? table.cWidths[i] : table.getTableData().W[i]);
|
||||
};
|
||||
class_1.prototype.getChildAlign = function (_i) {
|
||||
return this.node.attributes.get('columnalign');
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMtdMixin = CommonMtdMixin;
|
||||
//# sourceMappingURL=mtd.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mtd.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mtd.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mtd.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mtd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA6CA,SAAgB,cAAc,CAA+B,IAAO;IAElE;QAAqB,2BAAI;QAAlB;;QAiCP,CAAC;QA5BC,sBAAI,gCAAW;iBAAf;gBACE,OAAO,KAAK,CAAC;YACf,CAAC;;;WAAA;QAKM,gCAAc,GAArB;YACE,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC5B,CAAC;QAKM,8BAAY,GAAnB,UAAoB,EAAU;YAC5B,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAgE,CAAC;YAC3F,IAAM,GAAG,GAAG,IAAI,CAAC,MAA+B,CAAC;YACjD,IAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,OAAO,CAAC,OAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC;QAC1G,CAAC;QAKM,+BAAa,GAApB,UAAqB,EAAU;YAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAW,CAAC;QAC3D,CAAC;QAEH,cAAC;IAAD,CAAC,AAjCM,CAAc,IAAI,GAiCvB;AAEJ,CAAC;AArCD,wCAqCC"}
|
||||
5
node_modules/mathjax-full/js/output/common/Wrappers/mtext.d.ts
generated
vendored
Normal file
5
node_modules/mathjax-full/js/output/common/Wrappers/mtext.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonMtext extends AnyWrapper {
|
||||
}
|
||||
export declare type MtextConstructor = Constructor<CommonMtext>;
|
||||
export declare function CommonMtextMixin<T extends WrapperConstructor>(Base: T): MtextConstructor & T;
|
||||
51
node_modules/mathjax-full/js/output/common/Wrappers/mtext.js
generated
vendored
Normal file
51
node_modules/mathjax-full/js/output/common/Wrappers/mtext.js
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMtextMixin = void 0;
|
||||
function CommonMtextMixin(Base) {
|
||||
var _a;
|
||||
return _a = (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.getVariant = function () {
|
||||
var options = this.jax.options;
|
||||
var data = this.jax.math.outputData;
|
||||
var merror = ((!!data.merrorFamily || !!options.merrorFont) && this.node.Parent.isKind('merror'));
|
||||
if (!!data.mtextFamily || !!options.mtextFont || merror) {
|
||||
var variant = this.node.attributes.get('mathvariant');
|
||||
var font = this.constructor.INHERITFONTS[variant] || this.jax.font.getCssFont(variant);
|
||||
var family = font[0] || (merror ? data.merrorFamily || options.merrorFont :
|
||||
data.mtextFamily || options.mtextFont);
|
||||
this.variant = this.explicitVariant(family, font[2] ? 'bold' : '', font[1] ? 'italic' : '');
|
||||
return;
|
||||
}
|
||||
_super.prototype.getVariant.call(this);
|
||||
};
|
||||
return class_1;
|
||||
}(Base)),
|
||||
_a.INHERITFONTS = {
|
||||
normal: ['', false, false],
|
||||
bold: ['', false, true],
|
||||
italic: ['', true, false],
|
||||
'bold-italic': ['', true, true]
|
||||
},
|
||||
_a;
|
||||
}
|
||||
exports.CommonMtextMixin = CommonMtextMixin;
|
||||
//# sourceMappingURL=mtext.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mtext.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mtext.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mtext.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/mtext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA2CA,SAAgB,gBAAgB,CAA+B,IAAO;;IAEpE;YAAqB,2BAAI;YAAlB;;YAsCP,CAAC;YApBW,4BAAU,GAApB;gBACE,IAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;gBACjC,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;gBAMtC,IAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC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AE,IAAI,CAAC;SAC/B;WAyBF;AAEJ,CAAC;AA1CD,4CA0CC"}
|
||||
17
node_modules/mathjax-full/js/output/common/Wrappers/mtr.d.ts
generated
vendored
Normal file
17
node_modules/mathjax-full/js/output/common/Wrappers/mtr.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
import { BBox } from '../../../util/BBox.js';
|
||||
export interface CommonMtr<C extends AnyWrapper> extends AnyWrapper {
|
||||
readonly numCells: number;
|
||||
readonly labeled: boolean;
|
||||
readonly tableCells: C[];
|
||||
childNodes: C[];
|
||||
getChild(i: number): C;
|
||||
getChildBBoxes(): BBox[];
|
||||
stretchChildren(HD?: number[]): void;
|
||||
}
|
||||
export declare type MtrConstructor<C extends AnyWrapper> = Constructor<CommonMtr<C>>;
|
||||
export declare function CommonMtrMixin<C extends AnyWrapper, T extends WrapperConstructor>(Base: T): MtrConstructor<C> & T;
|
||||
export interface CommonMlabeledtr<C extends AnyWrapper> extends CommonMtr<C> {
|
||||
}
|
||||
export declare type MlabeledtrConstructor<C extends AnyWrapper> = Constructor<CommonMlabeledtr<C>>;
|
||||
export declare function CommonMlabeledtrMixin<C extends AnyWrapper, T extends MtrConstructor<C>>(Base: T): MlabeledtrConstructor<C> & T;
|
||||
178
node_modules/mathjax-full/js/output/common/Wrappers/mtr.js
generated
vendored
Normal file
178
node_modules/mathjax-full/js/output/common/Wrappers/mtr.js
generated
vendored
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMlabeledtrMixin = exports.CommonMtrMixin = void 0;
|
||||
function CommonMtrMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "fixesPWidth", {
|
||||
get: function () {
|
||||
return false;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_1.prototype, "numCells", {
|
||||
get: function () {
|
||||
return this.childNodes.length;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_1.prototype, "labeled", {
|
||||
get: function () {
|
||||
return false;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_1.prototype, "tableCells", {
|
||||
get: function () {
|
||||
return this.childNodes;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.getChild = function (i) {
|
||||
return this.childNodes[i];
|
||||
};
|
||||
class_1.prototype.getChildBBoxes = function () {
|
||||
return this.childNodes.map(function (cell) { return cell.getBBox(); });
|
||||
};
|
||||
class_1.prototype.stretchChildren = function (HD) {
|
||||
var e_1, _a, e_2, _b, e_3, _c;
|
||||
if (HD === void 0) { HD = null; }
|
||||
var stretchy = [];
|
||||
var children = (this.labeled ? this.childNodes.slice(1) : this.childNodes);
|
||||
try {
|
||||
for (var children_1 = __values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {
|
||||
var mtd = children_1_1.value;
|
||||
var child = mtd.childNodes[0];
|
||||
if (child.canStretch(1)) {
|
||||
stretchy.push(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (children_1_1 && !children_1_1.done && (_a = children_1.return)) _a.call(children_1);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
var count = stretchy.length;
|
||||
var nodeCount = this.childNodes.length;
|
||||
if (count && nodeCount > 1) {
|
||||
if (HD === null) {
|
||||
var H = 0, D = 0;
|
||||
var all = (count > 1 && count === nodeCount);
|
||||
try {
|
||||
for (var children_2 = __values(children), children_2_1 = children_2.next(); !children_2_1.done; children_2_1 = children_2.next()) {
|
||||
var mtd = children_2_1.value;
|
||||
var child = mtd.childNodes[0];
|
||||
var noStretch = (child.stretch.dir === 0);
|
||||
if (all || noStretch) {
|
||||
var _d = child.getBBox(noStretch), h = _d.h, d = _d.d;
|
||||
if (h > H) {
|
||||
H = h;
|
||||
}
|
||||
if (d > D) {
|
||||
D = d;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (children_2_1 && !children_2_1.done && (_b = children_2.return)) _b.call(children_2);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
HD = [H, D];
|
||||
}
|
||||
try {
|
||||
for (var stretchy_1 = __values(stretchy), stretchy_1_1 = stretchy_1.next(); !stretchy_1_1.done; stretchy_1_1 = stretchy_1.next()) {
|
||||
var child = stretchy_1_1.value;
|
||||
child.coreMO().getStretchedVariant(HD);
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (stretchy_1_1 && !stretchy_1_1.done && (_c = stretchy_1.return)) _c.call(stretchy_1);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
}
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMtrMixin = CommonMtrMixin;
|
||||
function CommonMlabeledtrMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_2, _super);
|
||||
function class_2() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Object.defineProperty(class_2.prototype, "numCells", {
|
||||
get: function () {
|
||||
return Math.max(0, this.childNodes.length - 1);
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_2.prototype, "labeled", {
|
||||
get: function () {
|
||||
return true;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_2.prototype, "tableCells", {
|
||||
get: function () {
|
||||
return this.childNodes.slice(1);
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_2.prototype.getChild = function (i) {
|
||||
return this.childNodes[i + 1];
|
||||
};
|
||||
class_2.prototype.getChildBBoxes = function () {
|
||||
return this.childNodes.slice(1).map(function (cell) { return cell.getBBox(); });
|
||||
};
|
||||
return class_2;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMlabeledtrMixin = CommonMlabeledtrMixin;
|
||||
//# sourceMappingURL=mtr.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/mtr.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/mtr.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"mtr.js","sourceRoot":"","sources":["../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AC;AA3GD,wCA2GC;AAyBD,SAAgB,qBAAqB,CAGnC,IAAO;IAEP;QAAqB,2BAAI;QAAlB;;QA2CP,CAAC;QAtCC,sBAAI,6BAAQ;iBAAZ;gBAIE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACjD,CAAC;;;WAAA;QAKD,sBAAI,4BAAO;iBAAX;gBACE,OAAO,IAAI,CAAC;YACd,CAAC;;;WAAA;QAKD,sBAAI,+BAAU;iBAAd;gBACE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAQ,CAAC;YACzC,CAAC;;;WAAA;QAKM,0BAAQ,GAAf,UAAgB,CAAS;YACvB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAM,CAAC;QACrC,CAAC;QAKM,gCAAc,GAArB;YAIE,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,OAAO,EAAE,EAAd,CAAc,CAAC,CAAC;QAC9D,CAAC;QAEH,cAAC;IAAD,CAAC,AA3CM,CAAc,IAAI,GA2CvB;AAEJ,CAAC;AAlDD,sDAkDC"}
|
||||
16
node_modules/mathjax-full/js/output/common/Wrappers/munderover.d.ts
generated
vendored
Normal file
16
node_modules/mathjax-full/js/output/common/Wrappers/munderover.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { AnyWrapper, Constructor } from '../Wrapper.js';
|
||||
import { CommonScriptbase, ScriptbaseConstructor } from './scriptbase.js';
|
||||
export interface CommonMunder<W extends AnyWrapper> extends CommonScriptbase<W> {
|
||||
}
|
||||
export declare type MunderConstructor<W extends AnyWrapper> = Constructor<CommonMunder<W>>;
|
||||
export declare function CommonMunderMixin<W extends AnyWrapper, T extends ScriptbaseConstructor<W>>(Base: T): MunderConstructor<W> & T;
|
||||
export interface CommonMover<W extends AnyWrapper> extends CommonScriptbase<W> {
|
||||
}
|
||||
export declare type MoverConstructor<W extends AnyWrapper> = Constructor<CommonMover<W>>;
|
||||
export declare function CommonMoverMixin<W extends AnyWrapper, T extends ScriptbaseConstructor<W>>(Base: T): MoverConstructor<W> & T;
|
||||
export interface CommonMunderover<W extends AnyWrapper> extends CommonScriptbase<W> {
|
||||
readonly underChild: W;
|
||||
readonly overChild: W;
|
||||
}
|
||||
export declare type MunderoverConstructor<W extends AnyWrapper> = Constructor<CommonMunderover<W>>;
|
||||
export declare function CommonMunderoverMixin<W extends AnyWrapper, T extends ScriptbaseConstructor<W>>(Base: T): MunderoverConstructor<W> & T;
|
||||
195
node_modules/mathjax-full/js/output/common/Wrappers/munderover.js
generated
vendored
Normal file
195
node_modules/mathjax-full/js/output/common/Wrappers/munderover.js
generated
vendored
Normal file
|
|
@ -0,0 +1,195 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonMunderoverMixin = exports.CommonMoverMixin = exports.CommonMunderMixin = void 0;
|
||||
function CommonMunderMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.stretchChildren();
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "scriptChild", {
|
||||
get: function () {
|
||||
return this.childNodes[this.node.under];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
if (this.hasMovableLimits()) {
|
||||
_super.prototype.computeBBox.call(this, bbox, recompute);
|
||||
return;
|
||||
}
|
||||
bbox.empty();
|
||||
var basebox = this.baseChild.getOuterBBox();
|
||||
var underbox = this.scriptChild.getOuterBBox();
|
||||
var v = this.getUnderKV(basebox, underbox)[1];
|
||||
var delta = (this.isLineBelow ? 0 : this.getDelta(true));
|
||||
var _a = __read(this.getDeltaW([basebox, underbox], [0, -delta]), 2), bw = _a[0], uw = _a[1];
|
||||
bbox.combine(basebox, bw, 0);
|
||||
bbox.combine(underbox, uw, v);
|
||||
bbox.d += this.font.params.big_op_spacing5;
|
||||
bbox.clean();
|
||||
this.setChildPWidths(recompute);
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMunderMixin = CommonMunderMixin;
|
||||
function CommonMoverMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_2, _super);
|
||||
function class_2() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.stretchChildren();
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(class_2.prototype, "scriptChild", {
|
||||
get: function () {
|
||||
return this.childNodes[this.node.over];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_2.prototype.computeBBox = function (bbox) {
|
||||
if (this.hasMovableLimits()) {
|
||||
_super.prototype.computeBBox.call(this, bbox);
|
||||
return;
|
||||
}
|
||||
bbox.empty();
|
||||
var basebox = this.baseChild.getOuterBBox();
|
||||
var overbox = this.scriptChild.getOuterBBox();
|
||||
if (this.node.attributes.get('accent')) {
|
||||
basebox.h = Math.max(basebox.h, this.font.params.x_height * basebox.scale);
|
||||
}
|
||||
var u = this.getOverKU(basebox, overbox)[1];
|
||||
var delta = (this.isLineAbove ? 0 : this.getDelta());
|
||||
var _a = __read(this.getDeltaW([basebox, overbox], [0, delta]), 2), bw = _a[0], ow = _a[1];
|
||||
bbox.combine(basebox, bw, 0);
|
||||
bbox.combine(overbox, ow, u);
|
||||
bbox.h += this.font.params.big_op_spacing5;
|
||||
bbox.clean();
|
||||
};
|
||||
return class_2;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMoverMixin = CommonMoverMixin;
|
||||
function CommonMunderoverMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_3, _super);
|
||||
function class_3() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.stretchChildren();
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(class_3.prototype, "underChild", {
|
||||
get: function () {
|
||||
return this.childNodes[this.node.under];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_3.prototype, "overChild", {
|
||||
get: function () {
|
||||
return this.childNodes[this.node.over];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_3.prototype, "subChild", {
|
||||
get: function () {
|
||||
return this.underChild;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_3.prototype, "supChild", {
|
||||
get: function () {
|
||||
return this.overChild;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_3.prototype.computeBBox = function (bbox) {
|
||||
if (this.hasMovableLimits()) {
|
||||
_super.prototype.computeBBox.call(this, bbox);
|
||||
return;
|
||||
}
|
||||
bbox.empty();
|
||||
var overbox = this.overChild.getOuterBBox();
|
||||
var basebox = this.baseChild.getOuterBBox();
|
||||
var underbox = this.underChild.getOuterBBox();
|
||||
if (this.node.attributes.get('accent')) {
|
||||
basebox.h = Math.max(basebox.h, this.font.params.x_height * basebox.scale);
|
||||
}
|
||||
var u = this.getOverKU(basebox, overbox)[1];
|
||||
var v = this.getUnderKV(basebox, underbox)[1];
|
||||
var delta = this.getDelta();
|
||||
var _a = __read(this.getDeltaW([basebox, underbox, overbox], [0, this.isLineBelow ? 0 : -delta, this.isLineAbove ? 0 : delta]), 3), bw = _a[0], uw = _a[1], ow = _a[2];
|
||||
bbox.combine(basebox, bw, 0);
|
||||
bbox.combine(overbox, ow, u);
|
||||
bbox.combine(underbox, uw, v);
|
||||
var z = this.font.params.big_op_spacing5;
|
||||
bbox.h += z;
|
||||
bbox.d += z;
|
||||
bbox.clean();
|
||||
};
|
||||
return class_3;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonMunderoverMixin = CommonMunderoverMixin;
|
||||
//# sourceMappingURL=munderover.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/munderover.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/munderover.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"munderover.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/munderover.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,SAAgB,iBAAiB,CAG/B,IAAO;IAEP;QAAqB,2BAAI;QAavB;YAAY,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAA1B,wDACW,IAAI,mBAEd;YADC,KAAI,CAAC,eAAe,EAAE,CAAC;;QACzB,CAAC;QAXD,sBAAW,gCAAW;iBAAtB;gBACE,OAAO,IAAI,CAAC,UAAU,CAAE,IAAI,CAAC,IAAkB,CAAC,KAAK,CAAC,CAAC;YACzD,CAAC;;;WAAA;QAcM,6BAAW,GAAlB,UAAmB,IAAU,EAAE,SAA0B;YAA1B,0BAAA,EAAA,iBAA0B;YACvD,IAAI,IAAI,CAAC,gBAAgB,EAAE,EAAE;gBAC3B,iBAAM,WAAW,YAAC,IAAI,EAAE,SAAS,CAAC,CAAC;gBACnC,OAAO;aACR;YACD,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,IAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;YAC9C,IAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;YACjD,IAAM,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,IAAM,KAAK,GAAG,CAAC,IAAI,CAAC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,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACxB,IAAA,KAAA,OAAe,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,EAC5B,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAA,EAD9F,EAAE,QAAA,EAAE,EAAE,QAAA,EAAE,EAAE,QACoF,CAAC;YACtG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YAC7B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YAC7B,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YAC9B,IAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;YAC3C,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;YACZ,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;YACZ,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;QAEH,cAAC;IAAD,CAAC,AAxEM,CAAc,IAAI,GAwEvB;AAEJ,CAAC;AA/ED,sDA+EC"}
|
||||
41
node_modules/mathjax-full/js/output/common/Wrappers/scriptbase.d.ts
generated
vendored
Normal file
41
node_modules/mathjax-full/js/output/common/Wrappers/scriptbase.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor, AnyWrapperClass } from '../Wrapper.js';
|
||||
import { BBox } from '../../../util/BBox.js';
|
||||
export interface CommonScriptbase<W extends AnyWrapper> extends AnyWrapper {
|
||||
readonly baseCore: W;
|
||||
readonly baseChild: W;
|
||||
readonly baseScale: number;
|
||||
readonly baseIc: number;
|
||||
readonly baseRemoveIc: boolean;
|
||||
readonly baseIsChar: boolean;
|
||||
readonly baseHasAccentOver: boolean;
|
||||
readonly baseHasAccentUnder: boolean;
|
||||
readonly isLineAbove: boolean;
|
||||
readonly isLineBelow: boolean;
|
||||
readonly isMathAccent: boolean;
|
||||
readonly scriptChild: W;
|
||||
getBaseCore(): W;
|
||||
getSemanticBase(): W;
|
||||
getBaseFence(fence: W, id: string): W;
|
||||
getBaseScale(): number;
|
||||
getBaseIc(): number;
|
||||
getAdjustedIc(): number;
|
||||
isCharBase(): boolean;
|
||||
checkLineAccents(): void;
|
||||
isLineAccent(script: W): boolean;
|
||||
getBaseWidth(): number;
|
||||
getOffset(): number[];
|
||||
baseCharZero(n: number): number;
|
||||
getV(): number;
|
||||
getU(): number;
|
||||
hasMovableLimits(): boolean;
|
||||
getOverKU(basebox: BBox, overbox: BBox): number[];
|
||||
getUnderKV(basebox: BBox, underbox: BBox): number[];
|
||||
getDeltaW(boxes: BBox[], delta?: number[]): number[];
|
||||
getDelta(noskew?: boolean): number;
|
||||
stretchChildren(): void;
|
||||
}
|
||||
export interface CommonScriptbaseClass extends AnyWrapperClass {
|
||||
useIC: boolean;
|
||||
}
|
||||
export declare type ScriptbaseConstructor<W extends AnyWrapper> = Constructor<CommonScriptbase<W>>;
|
||||
export declare function CommonScriptbaseMixin<W extends AnyWrapper, T extends WrapperConstructor>(Base: T): ScriptbaseConstructor<W> & T;
|
||||
378
node_modules/mathjax-full/js/output/common/Wrappers/scriptbase.js
generated
vendored
Normal file
378
node_modules/mathjax-full/js/output/common/Wrappers/scriptbase.js
generated
vendored
Normal file
|
|
@ -0,0 +1,378 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonScriptbaseMixin = void 0;
|
||||
var MmlNode_js_1 = require("../../../core/MmlTree/MmlNode.js");
|
||||
function CommonScriptbaseMixin(Base) {
|
||||
var _a;
|
||||
return _a = (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
|
||||
_this.baseScale = 1;
|
||||
_this.baseIc = 0;
|
||||
_this.baseRemoveIc = false;
|
||||
_this.baseIsChar = false;
|
||||
_this.baseHasAccentOver = null;
|
||||
_this.baseHasAccentUnder = null;
|
||||
_this.isLineAbove = false;
|
||||
_this.isLineBelow = false;
|
||||
_this.isMathAccent = false;
|
||||
var core = _this.baseCore = _this.getBaseCore();
|
||||
if (!core)
|
||||
return _this;
|
||||
_this.setBaseAccentsFor(core);
|
||||
_this.baseScale = _this.getBaseScale();
|
||||
_this.baseIc = _this.getBaseIc();
|
||||
_this.baseIsChar = _this.isCharBase();
|
||||
_this.isMathAccent = _this.baseIsChar &&
|
||||
(_this.scriptChild && !!_this.scriptChild.coreMO().node.getProperty('mathaccent'));
|
||||
_this.checkLineAccents();
|
||||
_this.baseRemoveIc = !_this.isLineAbove && !_this.isLineBelow &&
|
||||
(!_this.constructor.useIC || _this.isMathAccent);
|
||||
return _this;
|
||||
}
|
||||
Object.defineProperty(class_1.prototype, "baseChild", {
|
||||
get: function () {
|
||||
return this.childNodes[this.node.base];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(class_1.prototype, "scriptChild", {
|
||||
get: function () {
|
||||
return this.childNodes[1];
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
class_1.prototype.getBaseCore = function () {
|
||||
var core = this.getSemanticBase() || this.childNodes[0];
|
||||
while (core &&
|
||||
((core.childNodes.length === 1 &&
|
||||
(core.node.isKind('mrow') ||
|
||||
(core.node.isKind('TeXAtom') && core.node.texClass !== MmlNode_js_1.TEXCLASS.VCENTER) ||
|
||||
core.node.isKind('mstyle') || core.node.isKind('mpadded') ||
|
||||
core.node.isKind('mphantom') || core.node.isKind('semantics'))) ||
|
||||
(core.node.isKind('munderover') && core.isMathAccent))) {
|
||||
this.setBaseAccentsFor(core);
|
||||
core = core.childNodes[0];
|
||||
}
|
||||
if (!core) {
|
||||
this.baseHasAccentOver = this.baseHasAccentUnder = false;
|
||||
}
|
||||
return core || this.childNodes[0];
|
||||
};
|
||||
class_1.prototype.setBaseAccentsFor = function (core) {
|
||||
if (core.node.isKind('munderover')) {
|
||||
if (this.baseHasAccentOver === null) {
|
||||
this.baseHasAccentOver = !!core.node.attributes.get('accent');
|
||||
}
|
||||
if (this.baseHasAccentUnder === null) {
|
||||
this.baseHasAccentUnder = !!core.node.attributes.get('accentunder');
|
||||
}
|
||||
}
|
||||
};
|
||||
class_1.prototype.getSemanticBase = function () {
|
||||
var fence = this.node.attributes.getExplicit('data-semantic-fencepointer');
|
||||
return this.getBaseFence(this.baseChild, fence);
|
||||
};
|
||||
class_1.prototype.getBaseFence = function (fence, id) {
|
||||
var e_1, _a;
|
||||
if (!fence || !fence.node.attributes || !id) {
|
||||
return null;
|
||||
}
|
||||
if (fence.node.attributes.getExplicit('data-semantic-id') === id) {
|
||||
return fence;
|
||||
}
|
||||
try {
|
||||
for (var _b = __values(fence.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var child = _c.value;
|
||||
var result = this.getBaseFence(child, id);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
return null;
|
||||
};
|
||||
class_1.prototype.getBaseScale = function () {
|
||||
var child = this.baseCore;
|
||||
var scale = 1;
|
||||
while (child && child !== this) {
|
||||
var bbox = child.getOuterBBox();
|
||||
scale *= bbox.rscale;
|
||||
child = child.parent;
|
||||
}
|
||||
return scale;
|
||||
};
|
||||
class_1.prototype.getBaseIc = function () {
|
||||
return this.baseCore.getOuterBBox().ic * this.baseScale;
|
||||
};
|
||||
class_1.prototype.getAdjustedIc = function () {
|
||||
var bbox = this.baseCore.getOuterBBox();
|
||||
return (bbox.ic ? 1.05 * bbox.ic + .05 : 0) * this.baseScale;
|
||||
};
|
||||
class_1.prototype.isCharBase = function () {
|
||||
var base = this.baseCore;
|
||||
return (((base.node.isKind('mo') && base.size === null) ||
|
||||
base.node.isKind('mi') || base.node.isKind('mn')) &&
|
||||
base.bbox.rscale === 1 && Array.from(base.getText()).length === 1);
|
||||
};
|
||||
class_1.prototype.checkLineAccents = function () {
|
||||
if (!this.node.isKind('munderover'))
|
||||
return;
|
||||
if (this.node.isKind('mover')) {
|
||||
this.isLineAbove = this.isLineAccent(this.scriptChild);
|
||||
}
|
||||
else if (this.node.isKind('munder')) {
|
||||
this.isLineBelow = this.isLineAccent(this.scriptChild);
|
||||
}
|
||||
else {
|
||||
var mml = this;
|
||||
this.isLineAbove = this.isLineAccent(mml.overChild);
|
||||
this.isLineBelow = this.isLineAccent(mml.underChild);
|
||||
}
|
||||
};
|
||||
class_1.prototype.isLineAccent = function (script) {
|
||||
var node = script.coreMO().node;
|
||||
return (node.isToken && node.getText() === '\u2015');
|
||||
};
|
||||
class_1.prototype.getBaseWidth = function () {
|
||||
var bbox = this.baseChild.getOuterBBox();
|
||||
return bbox.w * bbox.rscale - (this.baseRemoveIc ? this.baseIc : 0) + this.font.params.extra_ic;
|
||||
};
|
||||
class_1.prototype.computeBBox = function (bbox, recompute) {
|
||||
if (recompute === void 0) { recompute = false; }
|
||||
var w = this.getBaseWidth();
|
||||
var _a = __read(this.getOffset(), 2), x = _a[0], y = _a[1];
|
||||
bbox.append(this.baseChild.getOuterBBox());
|
||||
bbox.combine(this.scriptChild.getOuterBBox(), w + x, y);
|
||||
bbox.w += this.font.params.scriptspace;
|
||||
bbox.clean();
|
||||
this.setChildPWidths(recompute);
|
||||
};
|
||||
class_1.prototype.getOffset = function () {
|
||||
return [0, 0];
|
||||
};
|
||||
class_1.prototype.baseCharZero = function (n) {
|
||||
var largeop = !!this.baseCore.node.attributes.get('largeop');
|
||||
var scale = this.baseScale;
|
||||
return (this.baseIsChar && !largeop && scale === 1 ? 0 : n);
|
||||
};
|
||||
class_1.prototype.getV = function () {
|
||||
var bbox = this.baseCore.getOuterBBox();
|
||||
var sbox = this.scriptChild.getOuterBBox();
|
||||
var tex = this.font.params;
|
||||
var subscriptshift = this.length2em(this.node.attributes.get('subscriptshift'), tex.sub1);
|
||||
return Math.max(this.baseCharZero(bbox.d * this.baseScale + tex.sub_drop * sbox.rscale), subscriptshift, sbox.h * sbox.rscale - (4 / 5) * tex.x_height);
|
||||
};
|
||||
class_1.prototype.getU = function () {
|
||||
var bbox = this.baseCore.getOuterBBox();
|
||||
var sbox = this.scriptChild.getOuterBBox();
|
||||
var tex = this.font.params;
|
||||
var attr = this.node.attributes.getList('displaystyle', 'superscriptshift');
|
||||
var prime = this.node.getProperty('texprimestyle');
|
||||
var p = prime ? tex.sup3 : (attr.displaystyle ? tex.sup1 : tex.sup2);
|
||||
var superscriptshift = this.length2em(attr.superscriptshift, p);
|
||||
return Math.max(this.baseCharZero(bbox.h * this.baseScale - tex.sup_drop * sbox.rscale), superscriptshift, sbox.d * sbox.rscale + (1 / 4) * tex.x_height);
|
||||
};
|
||||
class_1.prototype.hasMovableLimits = function () {
|
||||
var display = this.node.attributes.get('displaystyle');
|
||||
var mo = this.baseChild.coreMO().node;
|
||||
return (!display && !!mo.attributes.get('movablelimits'));
|
||||
};
|
||||
class_1.prototype.getOverKU = function (basebox, overbox) {
|
||||
var accent = this.node.attributes.get('accent');
|
||||
var tex = this.font.params;
|
||||
var d = overbox.d * overbox.rscale;
|
||||
var t = tex.rule_thickness * tex.separation_factor;
|
||||
var delta = (this.baseHasAccentOver ? t : 0);
|
||||
var T = (this.isLineAbove ? 3 * tex.rule_thickness : t);
|
||||
var k = (accent ? T : Math.max(tex.big_op_spacing1, tex.big_op_spacing3 - Math.max(0, d))) - delta;
|
||||
return [k, basebox.h * basebox.rscale + k + d];
|
||||
};
|
||||
class_1.prototype.getUnderKV = function (basebox, underbox) {
|
||||
var accent = this.node.attributes.get('accentunder');
|
||||
var tex = this.font.params;
|
||||
var h = underbox.h * underbox.rscale;
|
||||
var t = tex.rule_thickness * tex.separation_factor;
|
||||
var delta = (this.baseHasAccentUnder ? t : 0);
|
||||
var T = (this.isLineBelow ? 3 * tex.rule_thickness : t);
|
||||
var k = (accent ? T : Math.max(tex.big_op_spacing2, tex.big_op_spacing4 - h)) - delta;
|
||||
return [k, -(basebox.d * basebox.rscale + k + h)];
|
||||
};
|
||||
class_1.prototype.getDeltaW = function (boxes, delta) {
|
||||
var e_2, _a, e_3, _b;
|
||||
if (delta === void 0) { delta = [0, 0, 0]; }
|
||||
var align = this.node.attributes.get('align');
|
||||
var widths = boxes.map(function (box) { return box.w * box.rscale; });
|
||||
widths[0] -= (this.baseRemoveIc && !this.baseCore.node.attributes.get('largeop') ? this.baseIc : 0);
|
||||
var w = Math.max.apply(Math, __spreadArray([], __read(widths), false));
|
||||
var dw = [];
|
||||
var m = 0;
|
||||
try {
|
||||
for (var _c = __values(widths.keys()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
||||
var i = _d.value;
|
||||
dw[i] = (align === 'center' ? (w - widths[i]) / 2 :
|
||||
align === 'right' ? w - widths[i] : 0) + delta[i];
|
||||
if (dw[i] < m) {
|
||||
m = -dw[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
if (m) {
|
||||
try {
|
||||
for (var _e = __values(dw.keys()), _f = _e.next(); !_f.done; _f = _e.next()) {
|
||||
var i = _f.value;
|
||||
dw[i] += m;
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
}
|
||||
[1, 2].map(function (i) { return dw[i] += (boxes[i] ? boxes[i].dx * boxes[0].scale : 0); });
|
||||
return dw;
|
||||
};
|
||||
class_1.prototype.getDelta = function (noskew) {
|
||||
if (noskew === void 0) { noskew = false; }
|
||||
var accent = this.node.attributes.get('accent');
|
||||
var _a = this.baseCore.getOuterBBox(), sk = _a.sk, ic = _a.ic;
|
||||
return ((accent && !noskew ? sk : 0) + this.font.skewIcFactor * ic) * this.baseScale;
|
||||
};
|
||||
class_1.prototype.stretchChildren = function () {
|
||||
var e_4, _a, e_5, _b, e_6, _c;
|
||||
var stretchy = [];
|
||||
try {
|
||||
for (var _d = __values(this.childNodes), _e = _d.next(); !_e.done; _e = _d.next()) {
|
||||
var child = _e.value;
|
||||
if (child.canStretch(2)) {
|
||||
stretchy.push(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
||||
}
|
||||
finally { if (e_4) throw e_4.error; }
|
||||
}
|
||||
var count = stretchy.length;
|
||||
var nodeCount = this.childNodes.length;
|
||||
if (count && nodeCount > 1) {
|
||||
var W = 0;
|
||||
var all = (count > 1 && count === nodeCount);
|
||||
try {
|
||||
for (var _f = __values(this.childNodes), _g = _f.next(); !_g.done; _g = _f.next()) {
|
||||
var child = _g.value;
|
||||
var noStretch = (child.stretch.dir === 0);
|
||||
if (all || noStretch) {
|
||||
var _h = child.getOuterBBox(noStretch), w = _h.w, rscale = _h.rscale;
|
||||
if (w * rscale > W)
|
||||
W = w * rscale;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
||||
}
|
||||
finally { if (e_5) throw e_5.error; }
|
||||
}
|
||||
try {
|
||||
for (var stretchy_1 = __values(stretchy), stretchy_1_1 = stretchy_1.next(); !stretchy_1_1.done; stretchy_1_1 = stretchy_1.next()) {
|
||||
var child = stretchy_1_1.value;
|
||||
child.coreMO().getStretchedVariant([W / child.bbox.rscale]);
|
||||
}
|
||||
}
|
||||
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (stretchy_1_1 && !stretchy_1_1.done && (_c = stretchy_1.return)) _c.call(stretchy_1);
|
||||
}
|
||||
finally { if (e_6) throw e_6.error; }
|
||||
}
|
||||
}
|
||||
};
|
||||
return class_1;
|
||||
}(Base)),
|
||||
_a.useIC = true,
|
||||
_a;
|
||||
}
|
||||
exports.CommonScriptbaseMixin = CommonScriptbaseMixin;
|
||||
//# sourceMappingURL=scriptbase.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/scriptbase.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/scriptbase.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/mathjax-full/js/output/common/Wrappers/semantics.d.ts
generated
vendored
Normal file
5
node_modules/mathjax-full/js/output/common/Wrappers/semantics.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { AnyWrapper, WrapperConstructor, Constructor } from '../Wrapper.js';
|
||||
export interface CommonSemantics extends AnyWrapper {
|
||||
}
|
||||
export declare type SemanticsConstructor = Constructor<CommonSemantics>;
|
||||
export declare function CommonSemanticsMixin<T extends WrapperConstructor>(Base: T): SemanticsConstructor & T;
|
||||
38
node_modules/mathjax-full/js/output/common/Wrappers/semantics.js
generated
vendored
Normal file
38
node_modules/mathjax-full/js/output/common/Wrappers/semantics.js
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonSemanticsMixin = void 0;
|
||||
function CommonSemanticsMixin(Base) {
|
||||
return (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.computeBBox = function (bbox, _recompute) {
|
||||
if (_recompute === void 0) { _recompute = false; }
|
||||
if (this.childNodes.length) {
|
||||
var _a = this.childNodes[0].getBBox(), w = _a.w, h = _a.h, d = _a.d;
|
||||
bbox.w = w;
|
||||
bbox.h = h;
|
||||
bbox.d = d;
|
||||
}
|
||||
};
|
||||
return class_1;
|
||||
}(Base));
|
||||
}
|
||||
exports.CommonSemanticsMixin = CommonSemanticsMixin;
|
||||
//# sourceMappingURL=semantics.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/Wrappers/semantics.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/Wrappers/semantics.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"semantics.js","sourceRoot":"","sources":["../../../../ts/output/common/Wrappers/semantics.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA4CA,SAAgB,oBAAoB,CAA+B,IAAO;IAExE;QAAqB,2BAAI;QAAlB;;QAaP,CAAC;QARQ,6BAAW,GAAlB,UAAmB,IAAU,EAAE,UAA2B;YAA3B,2BAAA,EAAA,kBAA2B;YACxD,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACpB,IAAA,KAAY,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,EAAvC,CAAC,OAAA,EAAE,CAAC,OAAA,EAAE,CAAC,OAAgC,CAAC;gBAC/C,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;gBACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;gBACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;aACZ;QACH,CAAC;QACH,cAAC;IAAD,CAAC,AAbM,CAAc,IAAI,GAavB;AAEJ,CAAC;AAjBD,oDAiBC"}
|
||||
2
node_modules/mathjax-full/js/output/common/fonts/tex.d.ts
generated
vendored
Normal file
2
node_modules/mathjax-full/js/output/common/fonts/tex.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import { FontDataClass, CharOptions, VariantData, DelimiterData } from '../FontData.js';
|
||||
export declare function CommonTeXFontMixin<C extends CharOptions, V extends VariantData<C>, D extends DelimiterData, B extends FontDataClass<C, V, D>>(Base: B): FontDataClass<C, V, D> & B;
|
||||
86
node_modules/mathjax-full/js/output/common/fonts/tex.js
generated
vendored
Normal file
86
node_modules/mathjax-full/js/output/common/fonts/tex.js
generated
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || Array.prototype.slice.call(from));
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CommonTeXFontMixin = void 0;
|
||||
function CommonTeXFontMixin(Base) {
|
||||
var _a;
|
||||
return _a = (function (_super) {
|
||||
__extends(class_1, _super);
|
||||
function class_1() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
class_1.prototype.getDelimiterData = function (n) {
|
||||
return this.getChar('-smallop', n) || this.getChar('-size4', n);
|
||||
};
|
||||
return class_1;
|
||||
}(Base)),
|
||||
_a.NAME = 'TeX',
|
||||
_a.defaultVariants = __spreadArray(__spreadArray([], __read(Base.defaultVariants), false), [
|
||||
['-smallop', 'normal'],
|
||||
['-largeop', 'normal'],
|
||||
['-size3', 'normal'],
|
||||
['-size4', 'normal'],
|
||||
['-tex-calligraphic', 'italic'],
|
||||
['-tex-bold-calligraphic', 'bold-italic'],
|
||||
['-tex-oldstyle', 'normal'],
|
||||
['-tex-bold-oldstyle', 'bold'],
|
||||
['-tex-mathit', 'italic'],
|
||||
['-tex-variant', 'normal']
|
||||
], false),
|
||||
_a.defaultCssFonts = __assign(__assign({}, Base.defaultCssFonts), { '-smallop': ['serif', false, false], '-largeop': ['serif', false, false], '-size3': ['serif', false, false], '-size4': ['serif', false, false], '-tex-calligraphic': ['cursive', true, false], '-tex-bold-calligraphic': ['cursive', true, true], '-tex-oldstyle': ['serif', false, false], '-tex-bold-oldstyle': ['serif', false, true], '-tex-mathit': ['serif', true, false] }),
|
||||
_a.defaultSizeVariants = ['normal', '-smallop', '-largeop', '-size3', '-size4', '-tex-variant'],
|
||||
_a.defaultStretchVariants = ['-size4'],
|
||||
_a;
|
||||
}
|
||||
exports.CommonTeXFontMixin = CommonTeXFontMixin;
|
||||
//# sourceMappingURL=tex.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/fonts/tex.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/fonts/tex.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"tex.js","sourceRoot":"","sources":["../../../../ts/output/common/fonts/tex.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,SAAgB,kBAAkB,CAK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AK,EAAE,IAAI,CAAC,EAC5C,aAAa,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,GACrC;QAKe,sBAAmB,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,CAAE;QAK7F,yBAAsB,GAAG,CAAC,QAAQ,CAAE;WASrD;AAEJ,CAAC;AAlED,gDAkEC"}
|
||||
2
node_modules/mathjax-full/js/output/common/fonts/tex/bold-italic.d.ts
generated
vendored
Normal file
2
node_modules/mathjax-full/js/output/common/fonts/tex/bold-italic.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import { CharMap, CharOptions } from '../../FontData.js';
|
||||
export declare const boldItalic: CharMap<CharOptions>;
|
||||
12
node_modules/mathjax-full/js/output/common/fonts/tex/bold-italic.js
generated
vendored
Normal file
12
node_modules/mathjax-full/js/output/common/fonts/tex/bold-italic.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.boldItalic = void 0;
|
||||
exports.boldItalic = {
|
||||
0x2F: [.711, .21, .894],
|
||||
0x131: [.452, .008, .394, { sk: .0319 }],
|
||||
0x237: [.451, .201, .439, { sk: .0958 }],
|
||||
0x2044: [.711, .21, .894],
|
||||
0x2206: [.711, 0, .958, { sk: .192 }],
|
||||
0x29F8: [.711, .21, .894],
|
||||
};
|
||||
//# sourceMappingURL=bold-italic.js.map
|
||||
1
node_modules/mathjax-full/js/output/common/fonts/tex/bold-italic.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/output/common/fonts/tex/bold-italic.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"bold-italic.js","sourceRoot":"","sources":["../../../../../ts/output/common/fonts/tex/bold-italic.ts"],"names":[],"mappings":";;;AAmBa,QAAA,UAAU,GAAyB;IAC5C,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC;IACvB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAC,EAAE,EAAE,KAAK,EAAC,CAAC;IACtC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAC,EAAE,EAAE,KAAK,EAAC,CAAC;IACtC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC;IACzB,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAC,EAAE,EAAE,IAAI,EAAC,CAAC;IACnC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC;CAC5B,CAAC"}
|
||||
2
node_modules/mathjax-full/js/output/common/fonts/tex/bold.d.ts
generated
vendored
Normal file
2
node_modules/mathjax-full/js/output/common/fonts/tex/bold.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import { CharMap, CharOptions } from '../../FontData.js';
|
||||
export declare const bold: CharMap<CharOptions>;
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue