@algorisys/yappydraw 0.8.253
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +45 -0
- package/chunks/AllPackages-DNX4gUvL.js +6879 -0
- package/chunks/BaseConfiguration-iE_YypNt.js +4401 -0
- package/chunks/Entities-XwxJEcR3.js +467 -0
- package/chunks/Factory--zguTNZ7.js +2768 -0
- package/chunks/InputJax-BYq2tqUz.js +42 -0
- package/chunks/MathItem-DD5NNBjZ.js +76 -0
- package/chunks/Options-BStFr0zv.js +199 -0
- package/chunks/PrioritizedList-TjDg4i-s.js +39 -0
- package/chunks/Styles-DdTYCumM.js +397 -0
- package/chunks/TeXAtom-Bp5xoo7F.js +2175 -0
- package/chunks/ai-providers-CycU8sO1.js +229 -0
- package/chunks/canva-ai-BREIRXSl.js +285 -0
- package/chunks/design-generator-C89SKTqv.js +149 -0
- package/chunks/drawing-engine-DLFI-cNg.js +903 -0
- package/chunks/drawings-store-C-PoHakg.js +109 -0
- package/chunks/ds-operations-D5B9Z5vO.js +253 -0
- package/chunks/export-game-DOlM1w0F.js +104 -0
- package/chunks/game-runtime-Hn9umSvi.js +346 -0
- package/chunks/gifenc.esm-48qFK9lH.js +278 -0
- package/chunks/html-DxnOvKy4.js +1694 -0
- package/chunks/image-utils-CJQBaGoQ.js +37 -0
- package/chunks/index-Bm3Inzn8.js +62744 -0
- package/chunks/lengths-DNFHULBn.js +70 -0
- package/chunks/liteAdaptor-BZby1Qz2.js +919 -0
- package/chunks/lucide-solid-D_6t_rbY.js +35452 -0
- package/chunks/markdown-to-slides-_1GIcD8M.js +96 -0
- package/chunks/mathjax-CnUrFnFS.js +117 -0
- package/chunks/mathjax-D6cR72fZ.js +26 -0
- package/chunks/morph-animator-7qX2s9j_.js +25 -0
- package/chunks/onboarding-tour-CthiVc3W.js +192 -0
- package/chunks/rocket-settings-CU8w9S9I.js +100 -0
- package/chunks/search-CnWoMV6A.js +384 -0
- package/chunks/slide-generator-BG0Oacui.js +553 -0
- package/chunks/svg-BvVc02XL.js +12498 -0
- package/chunks/tex-Cfi4Kfun.js +442 -0
- package/chunks/tinyfly-engine-Wfa50sVI.js +1804 -0
- package/chunks/turntable-ai-Bfq-oSsD.js +120 -0
- package/chunks/yappy-NspTXSPk.css +1 -0
- package/package.json +21 -0
- package/yappy.d.ts +34 -0
- package/yappy.js +9 -0
|
@@ -0,0 +1,4401 @@
|
|
|
1
|
+
import { a as At, c as oe, b as ue, d as Zt, e as se } from "./Factory--zguTNZ7.js";
|
|
2
|
+
import { r as wt } from "./Options-BStFr0zv.js";
|
|
3
|
+
import { r as Qt } from "./PrioritizedList-TjDg4i-s.js";
|
|
4
|
+
import { r as Mt } from "./Entities-XwxJEcR3.js";
|
|
5
|
+
import { r as te } from "./lengths-DNFHULBn.js";
|
|
6
|
+
var ct = {}, kt;
|
|
7
|
+
function pt() {
|
|
8
|
+
if (kt) return ct;
|
|
9
|
+
kt = 1;
|
|
10
|
+
var M = ct && ct.__values || function(d) {
|
|
11
|
+
var c = typeof Symbol == "function" && Symbol.iterator, h = c && d[c], e = 0;
|
|
12
|
+
if (h) return h.call(d);
|
|
13
|
+
if (d && typeof d.length == "number") return {
|
|
14
|
+
next: function() {
|
|
15
|
+
return d && e >= d.length && (d = void 0), { value: d && d[e++], done: !d };
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
throw new TypeError(c ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
19
|
+
}, _ = ct && ct.__read || function(d, c) {
|
|
20
|
+
var h = typeof Symbol == "function" && d[Symbol.iterator];
|
|
21
|
+
if (!h) return d;
|
|
22
|
+
var e = h.call(d), r, n = [], a;
|
|
23
|
+
try {
|
|
24
|
+
for (; (c === void 0 || c-- > 0) && !(r = e.next()).done; ) n.push(r.value);
|
|
25
|
+
} catch (i) {
|
|
26
|
+
a = { error: i };
|
|
27
|
+
} finally {
|
|
28
|
+
try {
|
|
29
|
+
r && !r.done && (h = e.return) && h.call(e);
|
|
30
|
+
} finally {
|
|
31
|
+
if (a) throw a.error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return n;
|
|
35
|
+
}, X = ct && ct.__spreadArray || function(d, c, h) {
|
|
36
|
+
if (h || arguments.length === 2) for (var e = 0, r = c.length, n; e < r; e++)
|
|
37
|
+
(n || !(e in c)) && (n || (n = Array.prototype.slice.call(c, 0, e)), n[e] = c[e]);
|
|
38
|
+
return d.concat(n || Array.prototype.slice.call(c));
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(ct, "__esModule", { value: !0 });
|
|
41
|
+
var j = At(), E = oe(), m;
|
|
42
|
+
return (function(d) {
|
|
43
|
+
var c = /* @__PURE__ */ new Map([
|
|
44
|
+
["autoOP", !0],
|
|
45
|
+
["fnOP", !0],
|
|
46
|
+
["movesupsub", !0],
|
|
47
|
+
["subsupOK", !0],
|
|
48
|
+
["texprimestyle", !0],
|
|
49
|
+
["useHeight", !0],
|
|
50
|
+
["variantForm", !0],
|
|
51
|
+
["withDelims", !0],
|
|
52
|
+
["mathaccent", !0],
|
|
53
|
+
["open", !0],
|
|
54
|
+
["close", !0]
|
|
55
|
+
]);
|
|
56
|
+
function h(I) {
|
|
57
|
+
return String.fromCodePoint(parseInt(I, 16));
|
|
58
|
+
}
|
|
59
|
+
d.createEntity = h;
|
|
60
|
+
function e(I) {
|
|
61
|
+
return I.childNodes;
|
|
62
|
+
}
|
|
63
|
+
d.getChildren = e;
|
|
64
|
+
function r(I) {
|
|
65
|
+
return I.getText();
|
|
66
|
+
}
|
|
67
|
+
d.getText = r;
|
|
68
|
+
function n(I, F) {
|
|
69
|
+
var R, $;
|
|
70
|
+
try {
|
|
71
|
+
for (var J = M(F), S = J.next(); !S.done; S = J.next()) {
|
|
72
|
+
var b = S.value;
|
|
73
|
+
I.appendChild(b);
|
|
74
|
+
}
|
|
75
|
+
} catch (g) {
|
|
76
|
+
R = { error: g };
|
|
77
|
+
} finally {
|
|
78
|
+
try {
|
|
79
|
+
S && !S.done && ($ = J.return) && $.call(J);
|
|
80
|
+
} finally {
|
|
81
|
+
if (R) throw R.error;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
d.appendChildren = n;
|
|
86
|
+
function a(I, F, R) {
|
|
87
|
+
I.attributes.set(F, R);
|
|
88
|
+
}
|
|
89
|
+
d.setAttribute = a;
|
|
90
|
+
function i(I, F, R) {
|
|
91
|
+
I.setProperty(F, R);
|
|
92
|
+
}
|
|
93
|
+
d.setProperty = i;
|
|
94
|
+
function v(I, F) {
|
|
95
|
+
var R, $;
|
|
96
|
+
try {
|
|
97
|
+
for (var J = M(Object.keys(F)), S = J.next(); !S.done; S = J.next()) {
|
|
98
|
+
var b = S.value, g = F[b];
|
|
99
|
+
b === "texClass" ? (I.texClass = g, I.setProperty(b, g)) : b === "movablelimits" ? (I.setProperty("movablelimits", g), (I.isKind("mo") || I.isKind("mstyle")) && I.attributes.set("movablelimits", g)) : b === "inferred" || (c.has(b) ? I.setProperty(b, g) : I.attributes.set(b, g));
|
|
100
|
+
}
|
|
101
|
+
} catch (T) {
|
|
102
|
+
R = { error: T };
|
|
103
|
+
} finally {
|
|
104
|
+
try {
|
|
105
|
+
S && !S.done && ($ = J.return) && $.call(J);
|
|
106
|
+
} finally {
|
|
107
|
+
if (R) throw R.error;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
d.setProperties = v;
|
|
112
|
+
function p(I, F) {
|
|
113
|
+
return I.getProperty(F);
|
|
114
|
+
}
|
|
115
|
+
d.getProperty = p;
|
|
116
|
+
function y(I, F) {
|
|
117
|
+
return I.attributes.get(F);
|
|
118
|
+
}
|
|
119
|
+
d.getAttribute = y;
|
|
120
|
+
function f(I) {
|
|
121
|
+
for (var F = [], R = 1; R < arguments.length; R++)
|
|
122
|
+
F[R - 1] = arguments[R];
|
|
123
|
+
I.removeProperty.apply(I, X([], _(F), !1));
|
|
124
|
+
}
|
|
125
|
+
d.removeProperties = f;
|
|
126
|
+
function A(I, F) {
|
|
127
|
+
return I.childNodes[F];
|
|
128
|
+
}
|
|
129
|
+
d.getChildAt = A;
|
|
130
|
+
function x(I, F, R) {
|
|
131
|
+
var $ = I.childNodes;
|
|
132
|
+
$[F] = R, R && (R.parent = I);
|
|
133
|
+
}
|
|
134
|
+
d.setChild = x;
|
|
135
|
+
function C(I, F) {
|
|
136
|
+
for (var R = I.childNodes, $ = 0; $ < R.length; $++)
|
|
137
|
+
x(F, $, R[$]);
|
|
138
|
+
}
|
|
139
|
+
d.copyChildren = C;
|
|
140
|
+
function t(I, F) {
|
|
141
|
+
F.attributes = I.attributes, v(F, I.getAllProperties());
|
|
142
|
+
}
|
|
143
|
+
d.copyAttributes = t;
|
|
144
|
+
function u(I, F) {
|
|
145
|
+
return I.isKind(F);
|
|
146
|
+
}
|
|
147
|
+
d.isType = u;
|
|
148
|
+
function o(I) {
|
|
149
|
+
return I.isEmbellished;
|
|
150
|
+
}
|
|
151
|
+
d.isEmbellished = o;
|
|
152
|
+
function s(I) {
|
|
153
|
+
return I.texClass;
|
|
154
|
+
}
|
|
155
|
+
d.getTexClass = s;
|
|
156
|
+
function l(I) {
|
|
157
|
+
return I.coreMO();
|
|
158
|
+
}
|
|
159
|
+
d.getCoreMO = l;
|
|
160
|
+
function O(I) {
|
|
161
|
+
return I instanceof j.AbstractMmlNode || I instanceof j.AbstractMmlEmptyNode;
|
|
162
|
+
}
|
|
163
|
+
d.isNode = O;
|
|
164
|
+
function k(I) {
|
|
165
|
+
return I.isInferred;
|
|
166
|
+
}
|
|
167
|
+
d.isInferred = k;
|
|
168
|
+
function N(I) {
|
|
169
|
+
var F, R;
|
|
170
|
+
if (!u(I, "mo"))
|
|
171
|
+
return null;
|
|
172
|
+
var $ = I, J = $.getForms();
|
|
173
|
+
try {
|
|
174
|
+
for (var S = M(J), b = S.next(); !b.done; b = S.next()) {
|
|
175
|
+
var g = b.value, T = E.MmlMo.OPTABLE[g][$.getText()];
|
|
176
|
+
if (T)
|
|
177
|
+
return T;
|
|
178
|
+
}
|
|
179
|
+
} catch (L) {
|
|
180
|
+
F = { error: L };
|
|
181
|
+
} finally {
|
|
182
|
+
try {
|
|
183
|
+
b && !b.done && (R = S.return) && R.call(S);
|
|
184
|
+
} finally {
|
|
185
|
+
if (F) throw F.error;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
d.getForm = N;
|
|
191
|
+
})(m || (m = {})), ct.default = m, ct;
|
|
192
|
+
}
|
|
193
|
+
var nt = {}, ft = {}, Tt = {}, Lt;
|
|
194
|
+
function St() {
|
|
195
|
+
if (Lt) return Tt;
|
|
196
|
+
Lt = 1, Object.defineProperty(Tt, "__esModule", { value: !0 });
|
|
197
|
+
var M = (function() {
|
|
198
|
+
function _(X, j) {
|
|
199
|
+
for (var E = [], m = 2; m < arguments.length; m++)
|
|
200
|
+
E[m - 2] = arguments[m];
|
|
201
|
+
this.id = X, this.message = _.processString(j, E);
|
|
202
|
+
}
|
|
203
|
+
return _.processString = function(X, j) {
|
|
204
|
+
for (var E = X.split(_.pattern), m = 1, d = E.length; m < d; m += 2) {
|
|
205
|
+
var c = E[m].charAt(0);
|
|
206
|
+
if (c >= "0" && c <= "9")
|
|
207
|
+
E[m] = j[parseInt(E[m], 10) - 1], typeof E[m] == "number" && (E[m] = E[m].toString());
|
|
208
|
+
else if (c === "{")
|
|
209
|
+
if (c = E[m].substr(1), c >= "0" && c <= "9")
|
|
210
|
+
E[m] = j[parseInt(E[m].substr(1, E[m].length - 2), 10) - 1], typeof E[m] == "number" && (E[m] = E[m].toString());
|
|
211
|
+
else {
|
|
212
|
+
var h = E[m].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);
|
|
213
|
+
h && (E[m] = "%" + E[m]);
|
|
214
|
+
}
|
|
215
|
+
E[m] == null && (E[m] = "???");
|
|
216
|
+
}
|
|
217
|
+
return E.join("");
|
|
218
|
+
}, _.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g, _;
|
|
219
|
+
})();
|
|
220
|
+
return Tt.default = M, Tt;
|
|
221
|
+
}
|
|
222
|
+
var Ft;
|
|
223
|
+
function Ct() {
|
|
224
|
+
if (Ft) return ft;
|
|
225
|
+
Ft = 1;
|
|
226
|
+
var M = ft && ft.__read || function(e, r) {
|
|
227
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
228
|
+
if (!n) return e;
|
|
229
|
+
var a = n.call(e), i, v = [], p;
|
|
230
|
+
try {
|
|
231
|
+
for (; (r === void 0 || r-- > 0) && !(i = a.next()).done; ) v.push(i.value);
|
|
232
|
+
} catch (y) {
|
|
233
|
+
p = { error: y };
|
|
234
|
+
} finally {
|
|
235
|
+
try {
|
|
236
|
+
i && !i.done && (n = a.return) && n.call(a);
|
|
237
|
+
} finally {
|
|
238
|
+
if (p) throw p.error;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return v;
|
|
242
|
+
}, _ = ft && ft.__values || function(e) {
|
|
243
|
+
var r = typeof Symbol == "function" && Symbol.iterator, n = r && e[r], a = 0;
|
|
244
|
+
if (n) return n.call(e);
|
|
245
|
+
if (e && typeof e.length == "number") return {
|
|
246
|
+
next: function() {
|
|
247
|
+
return e && a >= e.length && (e = void 0), { value: e && e[a++], done: !e };
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
251
|
+
}, X = ft && ft.__importDefault || function(e) {
|
|
252
|
+
return e && e.__esModule ? e : { default: e };
|
|
253
|
+
};
|
|
254
|
+
Object.defineProperty(ft, "__esModule", { value: !0 });
|
|
255
|
+
var j = At(), E = X(pt()), m = X(Et()), d = X(St()), c = Mt(), h;
|
|
256
|
+
return (function(e) {
|
|
257
|
+
var r = 7.2, n = 72, a = {
|
|
258
|
+
em: function(P) {
|
|
259
|
+
return P;
|
|
260
|
+
},
|
|
261
|
+
ex: function(P) {
|
|
262
|
+
return P * 0.43;
|
|
263
|
+
},
|
|
264
|
+
pt: function(P) {
|
|
265
|
+
return P / 10;
|
|
266
|
+
},
|
|
267
|
+
pc: function(P) {
|
|
268
|
+
return P * 1.2;
|
|
269
|
+
},
|
|
270
|
+
px: function(P) {
|
|
271
|
+
return P * r / n;
|
|
272
|
+
},
|
|
273
|
+
in: function(P) {
|
|
274
|
+
return P * r;
|
|
275
|
+
},
|
|
276
|
+
cm: function(P) {
|
|
277
|
+
return P * r / 2.54;
|
|
278
|
+
},
|
|
279
|
+
mm: function(P) {
|
|
280
|
+
return P * r / 25.4;
|
|
281
|
+
},
|
|
282
|
+
mu: function(P) {
|
|
283
|
+
return P / 18;
|
|
284
|
+
}
|
|
285
|
+
}, i = "([-+]?([.,]\\d+|\\d+([.,]\\d*)?))", v = "(pt|em|ex|mu|px|mm|cm|in|pc)", p = RegExp("^\\s*" + i + "\\s*" + v + "\\s*$"), y = RegExp("^\\s*" + i + "\\s*" + v + " ?");
|
|
286
|
+
function f(P, w) {
|
|
287
|
+
w === void 0 && (w = !1);
|
|
288
|
+
var B = P.match(w ? y : p);
|
|
289
|
+
return B ? A([B[1].replace(/,/, "."), B[4], B[0].length]) : [null, null, 0];
|
|
290
|
+
}
|
|
291
|
+
e.matchDimen = f;
|
|
292
|
+
function A(P) {
|
|
293
|
+
var w = M(P, 3), B = w[0], K = w[1], D = w[2];
|
|
294
|
+
if (K !== "mu")
|
|
295
|
+
return [B, K, D];
|
|
296
|
+
var U = C(a[K](parseFloat(B || "1")));
|
|
297
|
+
return [U.slice(0, -2), "em", D];
|
|
298
|
+
}
|
|
299
|
+
function x(P) {
|
|
300
|
+
var w = M(f(P), 2), B = w[0], K = w[1], D = parseFloat(B || "1"), U = a[K];
|
|
301
|
+
return U ? U(D) : 0;
|
|
302
|
+
}
|
|
303
|
+
e.dimen2em = x;
|
|
304
|
+
function C(P) {
|
|
305
|
+
return Math.abs(P) < 6e-4 ? "0em" : P.toFixed(3).replace(/\.?0+$/, "") + "em";
|
|
306
|
+
}
|
|
307
|
+
e.Em = C;
|
|
308
|
+
function t() {
|
|
309
|
+
for (var P = [], w = 0; w < arguments.length; w++)
|
|
310
|
+
P[w] = arguments[w];
|
|
311
|
+
return P.map(function(B) {
|
|
312
|
+
return C(B);
|
|
313
|
+
}).join(" ");
|
|
314
|
+
}
|
|
315
|
+
e.cols = t;
|
|
316
|
+
function u(P, w, B, K, D, U) {
|
|
317
|
+
D === void 0 && (D = ""), U === void 0 && (U = "");
|
|
318
|
+
var H = P.nodeFactory, G = H.create("node", "mrow", [], { open: w, close: K, texClass: j.TEXCLASS.INNER }), z;
|
|
319
|
+
if (D)
|
|
320
|
+
z = new m.default("\\" + D + "l" + w, P.parser.stack.env, P).mml();
|
|
321
|
+
else {
|
|
322
|
+
var Y = H.create("text", w);
|
|
323
|
+
z = H.create("node", "mo", [], { fence: !0, stretchy: !0, symmetric: !0, texClass: j.TEXCLASS.OPEN }, Y);
|
|
324
|
+
}
|
|
325
|
+
if (E.default.appendChildren(G, [z, B]), D)
|
|
326
|
+
z = new m.default("\\" + D + "r" + K, P.parser.stack.env, P).mml();
|
|
327
|
+
else {
|
|
328
|
+
var ot = H.create("text", K);
|
|
329
|
+
z = H.create("node", "mo", [], { fence: !0, stretchy: !0, symmetric: !0, texClass: j.TEXCLASS.CLOSE }, ot);
|
|
330
|
+
}
|
|
331
|
+
return U && z.attributes.set("mathcolor", U), E.default.appendChildren(G, [z]), G;
|
|
332
|
+
}
|
|
333
|
+
e.fenced = u;
|
|
334
|
+
function o(P, w, B, K) {
|
|
335
|
+
var D = P.nodeFactory.create("node", "mrow", [], { open: w, close: K, texClass: j.TEXCLASS.ORD });
|
|
336
|
+
return w && E.default.appendChildren(D, [s(P, w, "l")]), E.default.isType(B, "mrow") ? E.default.appendChildren(D, E.default.getChildren(B)) : E.default.appendChildren(D, [B]), K && E.default.appendChildren(D, [s(P, K, "r")]), D;
|
|
337
|
+
}
|
|
338
|
+
e.fixedFence = o;
|
|
339
|
+
function s(P, w, B) {
|
|
340
|
+
(w === "{" || w === "}") && (w = "\\" + w);
|
|
341
|
+
var K = "{\\bigg" + B + " " + w + "}", D = "{\\big" + B + " " + w + "}";
|
|
342
|
+
return new m.default("\\mathchoice" + K + D + D + D, {}, P).mml();
|
|
343
|
+
}
|
|
344
|
+
e.mathPalette = s;
|
|
345
|
+
function l(P, w) {
|
|
346
|
+
for (var B = 0, K = w.length; B < K; B++) {
|
|
347
|
+
var D = w[B];
|
|
348
|
+
if (D && !E.default.isType(D, "mspace") && (!E.default.isType(D, "TeXAtom") || E.default.getChildren(D)[0] && E.default.getChildren(E.default.getChildren(D)[0]).length)) {
|
|
349
|
+
if (E.default.isEmbellished(D) || E.default.isType(D, "TeXAtom") && E.default.getTexClass(D) === j.TEXCLASS.REL) {
|
|
350
|
+
var U = P.nodeFactory.create("node", "mi");
|
|
351
|
+
w.unshift(U);
|
|
352
|
+
}
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
e.fixInitialMO = l;
|
|
358
|
+
function O(P, w, B, K) {
|
|
359
|
+
if (P.configuration.options.internalMath)
|
|
360
|
+
return P.configuration.options.internalMath(P, w, B, K);
|
|
361
|
+
var D = K || P.stack.env.font, U = D ? { mathvariant: D } : {}, H = [], G = 0, z = 0, Y, ot, Q = "", gt = 0;
|
|
362
|
+
if (w.match(/\\?[${}\\]|\\\(|\\(eq)?ref\s*\{/)) {
|
|
363
|
+
for (; G < w.length; )
|
|
364
|
+
if (Y = w.charAt(G++), Y === "$")
|
|
365
|
+
Q === "$" && gt === 0 ? (ot = P.create("node", "TeXAtom", [new m.default(w.slice(z, G - 1), {}, P.configuration).mml()]), H.push(ot), Q = "", z = G) : Q === "" && (z < G - 1 && H.push(k(P, w.slice(z, G - 1), U)), Q = "$", z = G);
|
|
366
|
+
else if (Y === "{" && Q !== "")
|
|
367
|
+
gt++;
|
|
368
|
+
else if (Y === "}")
|
|
369
|
+
if (Q === "}" && gt === 0) {
|
|
370
|
+
var ae = new m.default(w.slice(z, G), {}, P.configuration).mml();
|
|
371
|
+
ot = P.create("node", "TeXAtom", [ae], U), H.push(ot), Q = "", z = G;
|
|
372
|
+
} else Q !== "" && gt && gt--;
|
|
373
|
+
else if (Y === "\\")
|
|
374
|
+
if (Q === "" && w.substr(G).match(/^(eq)?ref\s*\{/)) {
|
|
375
|
+
var ie = RegExp["$&"].length;
|
|
376
|
+
z < G - 1 && H.push(k(P, w.slice(z, G - 1), U)), Q = "}", z = G - 1, G += ie;
|
|
377
|
+
} else
|
|
378
|
+
Y = w.charAt(G++), Y === "(" && Q === "" ? (z < G - 2 && H.push(k(P, w.slice(z, G - 2), U)), Q = ")", z = G) : Y === ")" && Q === ")" && gt === 0 ? (ot = P.create("node", "TeXAtom", [new m.default(w.slice(z, G - 2), {}, P.configuration).mml()]), H.push(ot), Q = "", z = G) : Y.match(/[${}\\]/) && Q === "" && (G--, w = w.substr(0, G - 1) + w.substr(G));
|
|
379
|
+
if (Q !== "")
|
|
380
|
+
throw new d.default("MathNotTerminated", "Math not terminated in text box");
|
|
381
|
+
}
|
|
382
|
+
return z < w.length && H.push(k(P, w.slice(z), U)), B != null ? H = [P.create("node", "mstyle", H, { displaystyle: !1, scriptlevel: B })] : H.length > 1 && (H = [P.create("node", "mrow", H)]), H;
|
|
383
|
+
}
|
|
384
|
+
e.internalMath = O;
|
|
385
|
+
function k(P, w, B) {
|
|
386
|
+
w = w.replace(/^\s+/, c.entities.nbsp).replace(/\s+$/, c.entities.nbsp);
|
|
387
|
+
var K = P.create("text", w);
|
|
388
|
+
return P.create("node", "mtext", [], B, K);
|
|
389
|
+
}
|
|
390
|
+
e.internalText = k;
|
|
391
|
+
function N(P, w, B, K, D) {
|
|
392
|
+
if (e.checkMovableLimits(w), E.default.isType(w, "munderover") && E.default.isEmbellished(w)) {
|
|
393
|
+
E.default.setProperties(E.default.getCoreMO(w), { lspace: 0, rspace: 0 });
|
|
394
|
+
var U = P.create("node", "mo", [], { rspace: 0 });
|
|
395
|
+
w = P.create("node", "mrow", [U, w]);
|
|
396
|
+
}
|
|
397
|
+
var H = P.create("node", "munderover", [w]);
|
|
398
|
+
E.default.setChild(H, K === "over" ? H.over : H.under, B);
|
|
399
|
+
var G = H;
|
|
400
|
+
return D && (G = P.create("node", "TeXAtom", [H], { texClass: j.TEXCLASS.OP, movesupsub: !0 })), E.default.setProperty(G, "subsupOK", !0), G;
|
|
401
|
+
}
|
|
402
|
+
e.underOver = N;
|
|
403
|
+
function I(P) {
|
|
404
|
+
var w = E.default.isType(P, "mo") ? E.default.getForm(P) : null;
|
|
405
|
+
(E.default.getProperty(P, "movablelimits") || w && w[3] && w[3].movablelimits) && E.default.setProperties(P, { movablelimits: !1 });
|
|
406
|
+
}
|
|
407
|
+
e.checkMovableLimits = I;
|
|
408
|
+
function F(P) {
|
|
409
|
+
if (typeof P != "string")
|
|
410
|
+
return P;
|
|
411
|
+
var w = P.trim();
|
|
412
|
+
return w.match(/\\$/) && P.match(/ $/) && (w += " "), w;
|
|
413
|
+
}
|
|
414
|
+
e.trimSpaces = F;
|
|
415
|
+
function R(P, w) {
|
|
416
|
+
return w = e.trimSpaces(w || ""), w === "t" ? P.arraydef.align = "baseline 1" : w === "b" ? P.arraydef.align = "baseline -1" : w === "c" ? P.arraydef.align = "axis" : w && (P.arraydef.align = w), P;
|
|
417
|
+
}
|
|
418
|
+
e.setArrayAlign = R;
|
|
419
|
+
function $(P, w, B) {
|
|
420
|
+
for (var K = "", D = "", U = 0; U < B.length; ) {
|
|
421
|
+
var H = B.charAt(U++);
|
|
422
|
+
if (H === "\\")
|
|
423
|
+
K += H + B.charAt(U++);
|
|
424
|
+
else if (H === "#")
|
|
425
|
+
if (H = B.charAt(U++), H === "#")
|
|
426
|
+
K += H;
|
|
427
|
+
else {
|
|
428
|
+
if (!H.match(/[1-9]/) || parseInt(H, 10) > w.length)
|
|
429
|
+
throw new d.default("IllegalMacroParam", "Illegal macro parameter reference");
|
|
430
|
+
D = J(P, J(P, D, K), w[parseInt(H, 10) - 1]), K = "";
|
|
431
|
+
}
|
|
432
|
+
else
|
|
433
|
+
K += H;
|
|
434
|
+
}
|
|
435
|
+
return J(P, D, K);
|
|
436
|
+
}
|
|
437
|
+
e.substituteArgs = $;
|
|
438
|
+
function J(P, w, B) {
|
|
439
|
+
if (B.match(/^[a-z]/i) && w.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i) && (w += " "), w.length + B.length > P.configuration.options.maxBuffer)
|
|
440
|
+
throw new d.default("MaxBufferSize", "MathJax internal buffer size exceeded; is there a recursive macro call?");
|
|
441
|
+
return w + B;
|
|
442
|
+
}
|
|
443
|
+
e.addArgs = J;
|
|
444
|
+
function S(P, w) {
|
|
445
|
+
if (w === void 0 && (w = !0), !(++P.macroCount <= P.configuration.options.maxMacros))
|
|
446
|
+
throw w ? new d.default("MaxMacroSub1", "MathJax maximum macro substitution count exceeded; is here a recursive macro call?") : new d.default("MaxMacroSub2", "MathJax maximum substitution count exceeded; is there a recursive latex environment?");
|
|
447
|
+
}
|
|
448
|
+
e.checkMaxMacros = S;
|
|
449
|
+
function b(P) {
|
|
450
|
+
if (P.stack.global.eqnenv)
|
|
451
|
+
throw new d.default("ErroneousNestingEq", "Erroneous nesting of equation structures");
|
|
452
|
+
P.stack.global.eqnenv = !0;
|
|
453
|
+
}
|
|
454
|
+
e.checkEqnEnv = b;
|
|
455
|
+
function g(P, w) {
|
|
456
|
+
var B = P.copy(), K = w.configuration;
|
|
457
|
+
return B.walkTree(function(D) {
|
|
458
|
+
var U, H;
|
|
459
|
+
K.addNode(D.kind, D);
|
|
460
|
+
var G = (D.getProperty("in-lists") || "").split(/,/);
|
|
461
|
+
try {
|
|
462
|
+
for (var z = _(G), Y = z.next(); !Y.done; Y = z.next()) {
|
|
463
|
+
var ot = Y.value;
|
|
464
|
+
ot && K.addNode(ot, D);
|
|
465
|
+
}
|
|
466
|
+
} catch (Q) {
|
|
467
|
+
U = { error: Q };
|
|
468
|
+
} finally {
|
|
469
|
+
try {
|
|
470
|
+
Y && !Y.done && (H = z.return) && H.call(z);
|
|
471
|
+
} finally {
|
|
472
|
+
if (U) throw U.error;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}), B;
|
|
476
|
+
}
|
|
477
|
+
e.copyNode = g;
|
|
478
|
+
function T(P, w, B) {
|
|
479
|
+
return B;
|
|
480
|
+
}
|
|
481
|
+
e.MmlFilterAttribute = T;
|
|
482
|
+
function L(P) {
|
|
483
|
+
var w = P.stack.env.font;
|
|
484
|
+
return w ? { mathvariant: w } : {};
|
|
485
|
+
}
|
|
486
|
+
e.getFontDef = L;
|
|
487
|
+
function V(P, w, B) {
|
|
488
|
+
var K, D;
|
|
489
|
+
w === void 0 && (w = null), B === void 0 && (B = !1);
|
|
490
|
+
var U = rt(P);
|
|
491
|
+
if (w)
|
|
492
|
+
try {
|
|
493
|
+
for (var H = _(Object.keys(U)), G = H.next(); !G.done; G = H.next()) {
|
|
494
|
+
var z = G.value;
|
|
495
|
+
if (!w.hasOwnProperty(z)) {
|
|
496
|
+
if (B)
|
|
497
|
+
throw new d.default("InvalidOption", "Invalid option: %1", z);
|
|
498
|
+
delete U[z];
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
} catch (Y) {
|
|
502
|
+
K = { error: Y };
|
|
503
|
+
} finally {
|
|
504
|
+
try {
|
|
505
|
+
G && !G.done && (D = H.return) && D.call(H);
|
|
506
|
+
} finally {
|
|
507
|
+
if (K) throw K.error;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
return U;
|
|
511
|
+
}
|
|
512
|
+
e.keyvalOptions = V;
|
|
513
|
+
function rt(P) {
|
|
514
|
+
for (var w, B, K = {}, D = P, U, H, G; D; )
|
|
515
|
+
w = M(_t(D, ["=", ","]), 3), H = w[0], U = w[1], D = w[2], U === "=" ? (B = M(_t(D, [","]), 3), G = B[0], U = B[1], D = B[2], G = G === "false" || G === "true" ? JSON.parse(G) : G, K[H] = G) : H && (K[H] = !0);
|
|
516
|
+
return K;
|
|
517
|
+
}
|
|
518
|
+
function lt(P, w) {
|
|
519
|
+
for (; w > 0; )
|
|
520
|
+
P = P.trim().slice(1, -1), w--;
|
|
521
|
+
return P.trim();
|
|
522
|
+
}
|
|
523
|
+
function _t(P, w) {
|
|
524
|
+
for (var B = P.length, K = 0, D = "", U = 0, H = 0, G = !0, z = !1; U < B; ) {
|
|
525
|
+
var Y = P[U++];
|
|
526
|
+
switch (Y) {
|
|
527
|
+
case " ":
|
|
528
|
+
break;
|
|
529
|
+
case "{":
|
|
530
|
+
G ? H++ : (z = !1, H > K && (H = K)), K++;
|
|
531
|
+
break;
|
|
532
|
+
case "}":
|
|
533
|
+
K && K--, (G || z) && (H--, z = !0), G = !1;
|
|
534
|
+
break;
|
|
535
|
+
default:
|
|
536
|
+
if (!K && w.indexOf(Y) !== -1)
|
|
537
|
+
return [z ? "true" : lt(D, H), Y, P.slice(U)];
|
|
538
|
+
G = !1, z = !1;
|
|
539
|
+
}
|
|
540
|
+
D += Y;
|
|
541
|
+
}
|
|
542
|
+
if (K)
|
|
543
|
+
throw new d.default("ExtraOpenMissingClose", "Extra open brace or missing close brace");
|
|
544
|
+
return [z ? "true" : lt(D, H), "", P.slice(U)];
|
|
545
|
+
}
|
|
546
|
+
})(h || (h = {})), ft.default = h, ft;
|
|
547
|
+
}
|
|
548
|
+
var at = {}, Nt;
|
|
549
|
+
function le() {
|
|
550
|
+
if (Nt) return at;
|
|
551
|
+
Nt = 1;
|
|
552
|
+
var M = at && at.__values || function(d) {
|
|
553
|
+
var c = typeof Symbol == "function" && Symbol.iterator, h = c && d[c], e = 0;
|
|
554
|
+
if (h) return h.call(d);
|
|
555
|
+
if (d && typeof d.length == "number") return {
|
|
556
|
+
next: function() {
|
|
557
|
+
return d && e >= d.length && (d = void 0), { value: d && d[e++], done: !d };
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
throw new TypeError(c ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
561
|
+
}, _ = at && at.__read || function(d, c) {
|
|
562
|
+
var h = typeof Symbol == "function" && d[Symbol.iterator];
|
|
563
|
+
if (!h) return d;
|
|
564
|
+
var e = h.call(d), r, n = [], a;
|
|
565
|
+
try {
|
|
566
|
+
for (; (c === void 0 || c-- > 0) && !(r = e.next()).done; ) n.push(r.value);
|
|
567
|
+
} catch (i) {
|
|
568
|
+
a = { error: i };
|
|
569
|
+
} finally {
|
|
570
|
+
try {
|
|
571
|
+
r && !r.done && (h = e.return) && h.call(e);
|
|
572
|
+
} finally {
|
|
573
|
+
if (a) throw a.error;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
return n;
|
|
577
|
+
}, X = at && at.__spreadArray || function(d, c, h) {
|
|
578
|
+
if (h || arguments.length === 2) for (var e = 0, r = c.length, n; e < r; e++)
|
|
579
|
+
(n || !(e in c)) && (n || (n = Array.prototype.slice.call(c, 0, e)), n[e] = c[e]);
|
|
580
|
+
return d.concat(n || Array.prototype.slice.call(c));
|
|
581
|
+
}, j = at && at.__importDefault || function(d) {
|
|
582
|
+
return d && d.__esModule ? d : { default: d };
|
|
583
|
+
};
|
|
584
|
+
Object.defineProperty(at, "__esModule", { value: !0 });
|
|
585
|
+
var E = j(pt()), m = (function() {
|
|
586
|
+
function d(c, h, e) {
|
|
587
|
+
this._factory = c, this._env = h, this.global = {}, this.stack = [], this.global = { isInner: e }, this.stack = [this._factory.create("start", this.global)], h && (this.stack[0].env = h), this.env = this.stack[0].env;
|
|
588
|
+
}
|
|
589
|
+
return Object.defineProperty(d.prototype, "env", {
|
|
590
|
+
get: function() {
|
|
591
|
+
return this._env;
|
|
592
|
+
},
|
|
593
|
+
set: function(c) {
|
|
594
|
+
this._env = c;
|
|
595
|
+
},
|
|
596
|
+
enumerable: !1,
|
|
597
|
+
configurable: !0
|
|
598
|
+
}), d.prototype.Push = function() {
|
|
599
|
+
for (var c, h, e = [], r = 0; r < arguments.length; r++)
|
|
600
|
+
e[r] = arguments[r];
|
|
601
|
+
try {
|
|
602
|
+
for (var n = M(e), a = n.next(); !a.done; a = n.next()) {
|
|
603
|
+
var i = a.value;
|
|
604
|
+
if (i) {
|
|
605
|
+
var v = E.default.isNode(i) ? this._factory.create("mml", i) : i;
|
|
606
|
+
v.global = this.global;
|
|
607
|
+
var p = _(this.stack.length ? this.Top().checkItem(v) : [null, !0], 2), y = p[0], f = p[1];
|
|
608
|
+
if (f) {
|
|
609
|
+
if (y) {
|
|
610
|
+
this.Pop(), this.Push.apply(this, X([], _(y), !1));
|
|
611
|
+
continue;
|
|
612
|
+
}
|
|
613
|
+
this.stack.push(v), v.env ? (v.copyEnv && Object.assign(v.env, this.env), this.env = v.env) : v.env = this.env;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
} catch (A) {
|
|
618
|
+
c = { error: A };
|
|
619
|
+
} finally {
|
|
620
|
+
try {
|
|
621
|
+
a && !a.done && (h = n.return) && h.call(n);
|
|
622
|
+
} finally {
|
|
623
|
+
if (c) throw c.error;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}, d.prototype.Pop = function() {
|
|
627
|
+
var c = this.stack.pop();
|
|
628
|
+
return c.isOpen || delete c.env, this.env = this.stack.length ? this.Top().env : {}, c;
|
|
629
|
+
}, d.prototype.Top = function(c) {
|
|
630
|
+
return c === void 0 && (c = 1), this.stack.length < c ? null : this.stack[this.stack.length - c];
|
|
631
|
+
}, d.prototype.Prev = function(c) {
|
|
632
|
+
var h = this.Top();
|
|
633
|
+
return c ? h.First : h.Pop();
|
|
634
|
+
}, d.prototype.toString = function() {
|
|
635
|
+
return `stack[
|
|
636
|
+
` + this.stack.join(`
|
|
637
|
+
`) + `
|
|
638
|
+
]`;
|
|
639
|
+
}, d;
|
|
640
|
+
})();
|
|
641
|
+
return at.default = m, at;
|
|
642
|
+
}
|
|
643
|
+
var Rt;
|
|
644
|
+
function Et() {
|
|
645
|
+
if (Rt) return nt;
|
|
646
|
+
Rt = 1;
|
|
647
|
+
var M = nt && nt.__values || function(e) {
|
|
648
|
+
var r = typeof Symbol == "function" && Symbol.iterator, n = r && e[r], a = 0;
|
|
649
|
+
if (n) return n.call(e);
|
|
650
|
+
if (e && typeof e.length == "number") return {
|
|
651
|
+
next: function() {
|
|
652
|
+
return e && a >= e.length && (e = void 0), { value: e && e[a++], done: !e };
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
656
|
+
}, _ = nt && nt.__read || function(e, r) {
|
|
657
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
658
|
+
if (!n) return e;
|
|
659
|
+
var a = n.call(e), i, v = [], p;
|
|
660
|
+
try {
|
|
661
|
+
for (; (r === void 0 || r-- > 0) && !(i = a.next()).done; ) v.push(i.value);
|
|
662
|
+
} catch (y) {
|
|
663
|
+
p = { error: y };
|
|
664
|
+
} finally {
|
|
665
|
+
try {
|
|
666
|
+
i && !i.done && (n = a.return) && n.call(a);
|
|
667
|
+
} finally {
|
|
668
|
+
if (p) throw p.error;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return v;
|
|
672
|
+
}, X = nt && nt.__spreadArray || function(e, r, n) {
|
|
673
|
+
if (n || arguments.length === 2) for (var a = 0, i = r.length, v; a < i; a++)
|
|
674
|
+
(v || !(a in r)) && (v || (v = Array.prototype.slice.call(r, 0, a)), v[a] = r[a]);
|
|
675
|
+
return e.concat(v || Array.prototype.slice.call(r));
|
|
676
|
+
}, j = nt && nt.__importDefault || function(e) {
|
|
677
|
+
return e && e.__esModule ? e : { default: e };
|
|
678
|
+
};
|
|
679
|
+
Object.defineProperty(nt, "__esModule", { value: !0 });
|
|
680
|
+
var E = j(Ct()), m = j(le()), d = j(St()), c = At(), h = (function() {
|
|
681
|
+
function e(r, n, a) {
|
|
682
|
+
var i, v;
|
|
683
|
+
this._string = r, this.configuration = a, this.macroCount = 0, this.i = 0, this.currentCS = "";
|
|
684
|
+
var p = n.hasOwnProperty("isInner"), y = n.isInner;
|
|
685
|
+
delete n.isInner;
|
|
686
|
+
var f;
|
|
687
|
+
if (n) {
|
|
688
|
+
f = {};
|
|
689
|
+
try {
|
|
690
|
+
for (var A = M(Object.keys(n)), x = A.next(); !x.done; x = A.next()) {
|
|
691
|
+
var C = x.value;
|
|
692
|
+
f[C] = n[C];
|
|
693
|
+
}
|
|
694
|
+
} catch (t) {
|
|
695
|
+
i = { error: t };
|
|
696
|
+
} finally {
|
|
697
|
+
try {
|
|
698
|
+
x && !x.done && (v = A.return) && v.call(A);
|
|
699
|
+
} finally {
|
|
700
|
+
if (i) throw i.error;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
this.configuration.pushParser(this), this.stack = new m.default(this.itemFactory, f, p ? y : !0), this.Parse(), this.Push(this.itemFactory.create("stop"));
|
|
705
|
+
}
|
|
706
|
+
return Object.defineProperty(e.prototype, "options", {
|
|
707
|
+
get: function() {
|
|
708
|
+
return this.configuration.options;
|
|
709
|
+
},
|
|
710
|
+
enumerable: !1,
|
|
711
|
+
configurable: !0
|
|
712
|
+
}), Object.defineProperty(e.prototype, "itemFactory", {
|
|
713
|
+
get: function() {
|
|
714
|
+
return this.configuration.itemFactory;
|
|
715
|
+
},
|
|
716
|
+
enumerable: !1,
|
|
717
|
+
configurable: !0
|
|
718
|
+
}), Object.defineProperty(e.prototype, "tags", {
|
|
719
|
+
get: function() {
|
|
720
|
+
return this.configuration.tags;
|
|
721
|
+
},
|
|
722
|
+
enumerable: !1,
|
|
723
|
+
configurable: !0
|
|
724
|
+
}), Object.defineProperty(e.prototype, "string", {
|
|
725
|
+
get: function() {
|
|
726
|
+
return this._string;
|
|
727
|
+
},
|
|
728
|
+
set: function(r) {
|
|
729
|
+
this._string = r;
|
|
730
|
+
},
|
|
731
|
+
enumerable: !1,
|
|
732
|
+
configurable: !0
|
|
733
|
+
}), e.prototype.parse = function(r, n) {
|
|
734
|
+
return this.configuration.handlers.get(r).parse(n);
|
|
735
|
+
}, e.prototype.lookup = function(r, n) {
|
|
736
|
+
return this.configuration.handlers.get(r).lookup(n);
|
|
737
|
+
}, e.prototype.contains = function(r, n) {
|
|
738
|
+
return this.configuration.handlers.get(r).contains(n);
|
|
739
|
+
}, e.prototype.toString = function() {
|
|
740
|
+
var r, n, a = "";
|
|
741
|
+
try {
|
|
742
|
+
for (var i = M(Array.from(this.configuration.handlers.keys())), v = i.next(); !v.done; v = i.next()) {
|
|
743
|
+
var p = v.value;
|
|
744
|
+
a += p + ": " + this.configuration.handlers.get(p) + `
|
|
745
|
+
`;
|
|
746
|
+
}
|
|
747
|
+
} catch (y) {
|
|
748
|
+
r = { error: y };
|
|
749
|
+
} finally {
|
|
750
|
+
try {
|
|
751
|
+
v && !v.done && (n = i.return) && n.call(i);
|
|
752
|
+
} finally {
|
|
753
|
+
if (r) throw r.error;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
return a;
|
|
757
|
+
}, e.prototype.Parse = function() {
|
|
758
|
+
for (var r; this.i < this.string.length; )
|
|
759
|
+
r = this.getCodePoint(), this.i += r.length, this.parse("character", [this, r]);
|
|
760
|
+
}, e.prototype.Push = function(r) {
|
|
761
|
+
r instanceof c.AbstractMmlNode && r.isInferred ? this.PushAll(r.childNodes) : this.stack.Push(r);
|
|
762
|
+
}, e.prototype.PushAll = function(r) {
|
|
763
|
+
var n, a;
|
|
764
|
+
try {
|
|
765
|
+
for (var i = M(r), v = i.next(); !v.done; v = i.next()) {
|
|
766
|
+
var p = v.value;
|
|
767
|
+
this.stack.Push(p);
|
|
768
|
+
}
|
|
769
|
+
} catch (y) {
|
|
770
|
+
n = { error: y };
|
|
771
|
+
} finally {
|
|
772
|
+
try {
|
|
773
|
+
v && !v.done && (a = i.return) && a.call(i);
|
|
774
|
+
} finally {
|
|
775
|
+
if (n) throw n.error;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}, e.prototype.mml = function() {
|
|
779
|
+
if (!this.stack.Top().isKind("mml"))
|
|
780
|
+
return null;
|
|
781
|
+
var r = this.stack.Top().First;
|
|
782
|
+
return this.configuration.popParser(), r;
|
|
783
|
+
}, e.prototype.convertDelimiter = function(r) {
|
|
784
|
+
var n = this.lookup("delimiter", r);
|
|
785
|
+
return n ? n.char : null;
|
|
786
|
+
}, e.prototype.getCodePoint = function() {
|
|
787
|
+
var r = this.string.codePointAt(this.i);
|
|
788
|
+
return r === void 0 ? "" : String.fromCodePoint(r);
|
|
789
|
+
}, e.prototype.nextIsSpace = function() {
|
|
790
|
+
return !!this.string.charAt(this.i).match(/\s/);
|
|
791
|
+
}, e.prototype.GetNext = function() {
|
|
792
|
+
for (; this.nextIsSpace(); )
|
|
793
|
+
this.i++;
|
|
794
|
+
return this.getCodePoint();
|
|
795
|
+
}, e.prototype.GetCS = function() {
|
|
796
|
+
var r = this.string.slice(this.i).match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);
|
|
797
|
+
return r ? (this.i += r[0].length, r[2] || r[1]) : (this.i++, " ");
|
|
798
|
+
}, e.prototype.GetArgument = function(r, n) {
|
|
799
|
+
switch (this.GetNext()) {
|
|
800
|
+
case "":
|
|
801
|
+
if (!n)
|
|
802
|
+
throw new d.default("MissingArgFor", "Missing argument for %1", this.currentCS);
|
|
803
|
+
return null;
|
|
804
|
+
case "}":
|
|
805
|
+
if (!n)
|
|
806
|
+
throw new d.default("ExtraCloseMissingOpen", "Extra close brace or missing open brace");
|
|
807
|
+
return null;
|
|
808
|
+
case "\\":
|
|
809
|
+
return this.i++, "\\" + this.GetCS();
|
|
810
|
+
case "{":
|
|
811
|
+
for (var a = ++this.i, i = 1; this.i < this.string.length; )
|
|
812
|
+
switch (this.string.charAt(this.i++)) {
|
|
813
|
+
case "\\":
|
|
814
|
+
this.i++;
|
|
815
|
+
break;
|
|
816
|
+
case "{":
|
|
817
|
+
i++;
|
|
818
|
+
break;
|
|
819
|
+
case "}":
|
|
820
|
+
if (--i === 0)
|
|
821
|
+
return this.string.slice(a, this.i - 1);
|
|
822
|
+
break;
|
|
823
|
+
}
|
|
824
|
+
throw new d.default("MissingCloseBrace", "Missing close brace");
|
|
825
|
+
}
|
|
826
|
+
var v = this.getCodePoint();
|
|
827
|
+
return this.i += v.length, v;
|
|
828
|
+
}, e.prototype.GetBrackets = function(r, n) {
|
|
829
|
+
if (this.GetNext() !== "[")
|
|
830
|
+
return n;
|
|
831
|
+
for (var a = ++this.i, i = 0; this.i < this.string.length; )
|
|
832
|
+
switch (this.string.charAt(this.i++)) {
|
|
833
|
+
case "{":
|
|
834
|
+
i++;
|
|
835
|
+
break;
|
|
836
|
+
case "\\":
|
|
837
|
+
this.i++;
|
|
838
|
+
break;
|
|
839
|
+
case "}":
|
|
840
|
+
if (i-- <= 0)
|
|
841
|
+
throw new d.default("ExtraCloseLooking", "Extra close brace while looking for %1", "']'");
|
|
842
|
+
break;
|
|
843
|
+
case "]":
|
|
844
|
+
if (i === 0)
|
|
845
|
+
return this.string.slice(a, this.i - 1);
|
|
846
|
+
break;
|
|
847
|
+
}
|
|
848
|
+
throw new d.default("MissingCloseBracket", "Could not find closing ']' for argument to %1", this.currentCS);
|
|
849
|
+
}, e.prototype.GetDelimiter = function(r, n) {
|
|
850
|
+
var a = this.GetNext();
|
|
851
|
+
if (this.i += a.length, this.i <= this.string.length && (a === "\\" ? a += this.GetCS() : a === "{" && n && (this.i--, a = this.GetArgument(r).trim()), this.contains("delimiter", a)))
|
|
852
|
+
return this.convertDelimiter(a);
|
|
853
|
+
throw new d.default("MissingOrUnrecognizedDelim", "Missing or unrecognized delimiter for %1", this.currentCS);
|
|
854
|
+
}, e.prototype.GetDimen = function(r) {
|
|
855
|
+
if (this.GetNext() === "{") {
|
|
856
|
+
var n = this.GetArgument(r), a = _(E.default.matchDimen(n), 2), i = a[0], v = a[1];
|
|
857
|
+
if (i)
|
|
858
|
+
return i + v;
|
|
859
|
+
} else {
|
|
860
|
+
var n = this.string.slice(this.i), p = _(E.default.matchDimen(n, !0), 3), i = p[0], v = p[1], y = p[2];
|
|
861
|
+
if (i)
|
|
862
|
+
return this.i += y, i + v;
|
|
863
|
+
}
|
|
864
|
+
throw new d.default("MissingDimOrUnits", "Missing dimension or its units for %1", this.currentCS);
|
|
865
|
+
}, e.prototype.GetUpTo = function(r, n) {
|
|
866
|
+
for (; this.nextIsSpace(); )
|
|
867
|
+
this.i++;
|
|
868
|
+
for (var a = this.i, i = 0; this.i < this.string.length; ) {
|
|
869
|
+
var v = this.i, p = this.GetNext();
|
|
870
|
+
switch (this.i += p.length, p) {
|
|
871
|
+
case "\\":
|
|
872
|
+
p += this.GetCS();
|
|
873
|
+
break;
|
|
874
|
+
case "{":
|
|
875
|
+
i++;
|
|
876
|
+
break;
|
|
877
|
+
case "}":
|
|
878
|
+
if (i === 0)
|
|
879
|
+
throw new d.default("ExtraCloseLooking", "Extra close brace while looking for %1", n);
|
|
880
|
+
i--;
|
|
881
|
+
break;
|
|
882
|
+
}
|
|
883
|
+
if (i === 0 && p === n)
|
|
884
|
+
return this.string.slice(a, v);
|
|
885
|
+
}
|
|
886
|
+
throw new d.default("TokenNotFoundForCommand", "Could not find %1 for %2", n, this.currentCS);
|
|
887
|
+
}, e.prototype.ParseArg = function(r) {
|
|
888
|
+
return new e(this.GetArgument(r), this.stack.env, this.configuration).mml();
|
|
889
|
+
}, e.prototype.ParseUpTo = function(r, n) {
|
|
890
|
+
return new e(this.GetUpTo(r, n), this.stack.env, this.configuration).mml();
|
|
891
|
+
}, e.prototype.GetDelimiterArg = function(r) {
|
|
892
|
+
var n = E.default.trimSpaces(this.GetArgument(r));
|
|
893
|
+
if (n === "")
|
|
894
|
+
return null;
|
|
895
|
+
if (this.contains("delimiter", n))
|
|
896
|
+
return n;
|
|
897
|
+
throw new d.default("MissingOrUnrecognizedDelim", "Missing or unrecognized delimiter for %1", this.currentCS);
|
|
898
|
+
}, e.prototype.GetStar = function() {
|
|
899
|
+
var r = this.GetNext() === "*";
|
|
900
|
+
return r && this.i++, r;
|
|
901
|
+
}, e.prototype.create = function(r) {
|
|
902
|
+
for (var n, a = [], i = 1; i < arguments.length; i++)
|
|
903
|
+
a[i - 1] = arguments[i];
|
|
904
|
+
return (n = this.configuration.nodeFactory).create.apply(n, X([r], _(a), !1));
|
|
905
|
+
}, e;
|
|
906
|
+
})();
|
|
907
|
+
return nt.default = h, nt;
|
|
908
|
+
}
|
|
909
|
+
var it = {}, bt = {}, tt = {}, jt;
|
|
910
|
+
function ee() {
|
|
911
|
+
if (jt) return tt;
|
|
912
|
+
jt = 1;
|
|
913
|
+
var M = tt && tt.__extends || /* @__PURE__ */ (function() {
|
|
914
|
+
var h = function(e, r) {
|
|
915
|
+
return h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, a) {
|
|
916
|
+
n.__proto__ = a;
|
|
917
|
+
} || function(n, a) {
|
|
918
|
+
for (var i in a) Object.prototype.hasOwnProperty.call(a, i) && (n[i] = a[i]);
|
|
919
|
+
}, h(e, r);
|
|
920
|
+
};
|
|
921
|
+
return function(e, r) {
|
|
922
|
+
if (typeof r != "function" && r !== null)
|
|
923
|
+
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
|
924
|
+
h(e, r);
|
|
925
|
+
function n() {
|
|
926
|
+
this.constructor = e;
|
|
927
|
+
}
|
|
928
|
+
e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n());
|
|
929
|
+
};
|
|
930
|
+
})(), _ = tt && tt.__read || function(h, e) {
|
|
931
|
+
var r = typeof Symbol == "function" && h[Symbol.iterator];
|
|
932
|
+
if (!r) return h;
|
|
933
|
+
var n = r.call(h), a, i = [], v;
|
|
934
|
+
try {
|
|
935
|
+
for (; (e === void 0 || e-- > 0) && !(a = n.next()).done; ) i.push(a.value);
|
|
936
|
+
} catch (p) {
|
|
937
|
+
v = { error: p };
|
|
938
|
+
} finally {
|
|
939
|
+
try {
|
|
940
|
+
a && !a.done && (r = n.return) && r.call(n);
|
|
941
|
+
} finally {
|
|
942
|
+
if (v) throw v.error;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
return i;
|
|
946
|
+
}, X = tt && tt.__spreadArray || function(h, e, r) {
|
|
947
|
+
if (r || arguments.length === 2) for (var n = 0, a = e.length, i; n < a; n++)
|
|
948
|
+
(i || !(n in e)) && (i || (i = Array.prototype.slice.call(e, 0, n)), i[n] = e[n]);
|
|
949
|
+
return h.concat(i || Array.prototype.slice.call(e));
|
|
950
|
+
}, j = tt && tt.__values || function(h) {
|
|
951
|
+
var e = typeof Symbol == "function" && Symbol.iterator, r = e && h[e], n = 0;
|
|
952
|
+
if (r) return r.call(h);
|
|
953
|
+
if (h && typeof h.length == "number") return {
|
|
954
|
+
next: function() {
|
|
955
|
+
return h && n >= h.length && (h = void 0), { value: h && h[n++], done: !h };
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
959
|
+
}, E = tt && tt.__importDefault || function(h) {
|
|
960
|
+
return h && h.__esModule ? h : { default: h };
|
|
961
|
+
};
|
|
962
|
+
Object.defineProperty(tt, "__esModule", { value: !0 }), tt.BaseItem = tt.MmlStack = void 0;
|
|
963
|
+
var m = E(St()), d = (function() {
|
|
964
|
+
function h(e) {
|
|
965
|
+
this._nodes = e;
|
|
966
|
+
}
|
|
967
|
+
return Object.defineProperty(h.prototype, "nodes", {
|
|
968
|
+
get: function() {
|
|
969
|
+
return this._nodes;
|
|
970
|
+
},
|
|
971
|
+
enumerable: !1,
|
|
972
|
+
configurable: !0
|
|
973
|
+
}), h.prototype.Push = function() {
|
|
974
|
+
for (var e, r = [], n = 0; n < arguments.length; n++)
|
|
975
|
+
r[n] = arguments[n];
|
|
976
|
+
(e = this._nodes).push.apply(e, X([], _(r), !1));
|
|
977
|
+
}, h.prototype.Pop = function() {
|
|
978
|
+
return this._nodes.pop();
|
|
979
|
+
}, Object.defineProperty(h.prototype, "First", {
|
|
980
|
+
get: function() {
|
|
981
|
+
return this._nodes[this.Size() - 1];
|
|
982
|
+
},
|
|
983
|
+
set: function(e) {
|
|
984
|
+
this._nodes[this.Size() - 1] = e;
|
|
985
|
+
},
|
|
986
|
+
enumerable: !1,
|
|
987
|
+
configurable: !0
|
|
988
|
+
}), Object.defineProperty(h.prototype, "Last", {
|
|
989
|
+
get: function() {
|
|
990
|
+
return this._nodes[0];
|
|
991
|
+
},
|
|
992
|
+
set: function(e) {
|
|
993
|
+
this._nodes[0] = e;
|
|
994
|
+
},
|
|
995
|
+
enumerable: !1,
|
|
996
|
+
configurable: !0
|
|
997
|
+
}), h.prototype.Peek = function(e) {
|
|
998
|
+
return e == null && (e = 1), this._nodes.slice(this.Size() - e);
|
|
999
|
+
}, h.prototype.Size = function() {
|
|
1000
|
+
return this._nodes.length;
|
|
1001
|
+
}, h.prototype.Clear = function() {
|
|
1002
|
+
this._nodes = [];
|
|
1003
|
+
}, h.prototype.toMml = function(e, r) {
|
|
1004
|
+
return e === void 0 && (e = !0), this._nodes.length === 1 && !r ? this.First : this.create("node", e ? "inferredMrow" : "mrow", this._nodes, {});
|
|
1005
|
+
}, h.prototype.create = function(e) {
|
|
1006
|
+
for (var r, n = [], a = 1; a < arguments.length; a++)
|
|
1007
|
+
n[a - 1] = arguments[a];
|
|
1008
|
+
return (r = this.factory.configuration.nodeFactory).create.apply(r, X([e], _(n), !1));
|
|
1009
|
+
}, h;
|
|
1010
|
+
})();
|
|
1011
|
+
tt.MmlStack = d;
|
|
1012
|
+
var c = (function(h) {
|
|
1013
|
+
M(e, h);
|
|
1014
|
+
function e(r) {
|
|
1015
|
+
for (var n = [], a = 1; a < arguments.length; a++)
|
|
1016
|
+
n[a - 1] = arguments[a];
|
|
1017
|
+
var i = h.call(this, n) || this;
|
|
1018
|
+
return i.factory = r, i.global = {}, i._properties = {}, i.isOpen && (i._env = {}), i;
|
|
1019
|
+
}
|
|
1020
|
+
return Object.defineProperty(e.prototype, "kind", {
|
|
1021
|
+
get: function() {
|
|
1022
|
+
return "base";
|
|
1023
|
+
},
|
|
1024
|
+
enumerable: !1,
|
|
1025
|
+
configurable: !0
|
|
1026
|
+
}), Object.defineProperty(e.prototype, "env", {
|
|
1027
|
+
get: function() {
|
|
1028
|
+
return this._env;
|
|
1029
|
+
},
|
|
1030
|
+
set: function(r) {
|
|
1031
|
+
this._env = r;
|
|
1032
|
+
},
|
|
1033
|
+
enumerable: !1,
|
|
1034
|
+
configurable: !0
|
|
1035
|
+
}), Object.defineProperty(e.prototype, "copyEnv", {
|
|
1036
|
+
get: function() {
|
|
1037
|
+
return !0;
|
|
1038
|
+
},
|
|
1039
|
+
enumerable: !1,
|
|
1040
|
+
configurable: !0
|
|
1041
|
+
}), e.prototype.getProperty = function(r) {
|
|
1042
|
+
return this._properties[r];
|
|
1043
|
+
}, e.prototype.setProperty = function(r, n) {
|
|
1044
|
+
return this._properties[r] = n, this;
|
|
1045
|
+
}, Object.defineProperty(e.prototype, "isOpen", {
|
|
1046
|
+
get: function() {
|
|
1047
|
+
return !1;
|
|
1048
|
+
},
|
|
1049
|
+
enumerable: !1,
|
|
1050
|
+
configurable: !0
|
|
1051
|
+
}), Object.defineProperty(e.prototype, "isClose", {
|
|
1052
|
+
get: function() {
|
|
1053
|
+
return !1;
|
|
1054
|
+
},
|
|
1055
|
+
enumerable: !1,
|
|
1056
|
+
configurable: !0
|
|
1057
|
+
}), Object.defineProperty(e.prototype, "isFinal", {
|
|
1058
|
+
get: function() {
|
|
1059
|
+
return !1;
|
|
1060
|
+
},
|
|
1061
|
+
enumerable: !1,
|
|
1062
|
+
configurable: !0
|
|
1063
|
+
}), e.prototype.isKind = function(r) {
|
|
1064
|
+
return r === this.kind;
|
|
1065
|
+
}, e.prototype.checkItem = function(r) {
|
|
1066
|
+
if (r.isKind("over") && this.isOpen && (r.setProperty("num", this.toMml(!1)), this.Clear()), r.isKind("cell") && this.isOpen) {
|
|
1067
|
+
if (r.getProperty("linebreak"))
|
|
1068
|
+
return e.fail;
|
|
1069
|
+
throw new m.default("Misplaced", "Misplaced %1", r.getName());
|
|
1070
|
+
}
|
|
1071
|
+
if (r.isClose && this.getErrors(r.kind)) {
|
|
1072
|
+
var n = _(this.getErrors(r.kind), 2), a = n[0], i = n[1];
|
|
1073
|
+
throw new m.default(a, i, r.getName());
|
|
1074
|
+
}
|
|
1075
|
+
return r.isFinal ? (this.Push(r.First), e.fail) : e.success;
|
|
1076
|
+
}, e.prototype.clearEnv = function() {
|
|
1077
|
+
var r, n;
|
|
1078
|
+
try {
|
|
1079
|
+
for (var a = j(Object.keys(this.env)), i = a.next(); !i.done; i = a.next()) {
|
|
1080
|
+
var v = i.value;
|
|
1081
|
+
delete this.env[v];
|
|
1082
|
+
}
|
|
1083
|
+
} catch (p) {
|
|
1084
|
+
r = { error: p };
|
|
1085
|
+
} finally {
|
|
1086
|
+
try {
|
|
1087
|
+
i && !i.done && (n = a.return) && n.call(a);
|
|
1088
|
+
} finally {
|
|
1089
|
+
if (r) throw r.error;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}, e.prototype.setProperties = function(r) {
|
|
1093
|
+
return Object.assign(this._properties, r), this;
|
|
1094
|
+
}, e.prototype.getName = function() {
|
|
1095
|
+
return this.getProperty("name");
|
|
1096
|
+
}, e.prototype.toString = function() {
|
|
1097
|
+
return this.kind + "[" + this.nodes.join("; ") + "]";
|
|
1098
|
+
}, e.prototype.getErrors = function(r) {
|
|
1099
|
+
var n = this.constructor;
|
|
1100
|
+
return (n.errors || {})[r] || e.errors[r];
|
|
1101
|
+
}, e.fail = [null, !1], e.success = [null, !0], e.errors = {
|
|
1102
|
+
end: ["MissingBeginExtraEnd", "Missing \\begin{%1} or extra \\end{%1}"],
|
|
1103
|
+
close: ["ExtraCloseMissingOpen", "Extra close brace or missing open brace"],
|
|
1104
|
+
right: ["MissingLeftExtraRight", "Missing \\left or extra \\right"],
|
|
1105
|
+
middle: ["ExtraMiddle", "Extra \\middle"]
|
|
1106
|
+
}, e;
|
|
1107
|
+
})(d);
|
|
1108
|
+
return tt.BaseItem = c, tt;
|
|
1109
|
+
}
|
|
1110
|
+
var Bt;
|
|
1111
|
+
function ce() {
|
|
1112
|
+
if (Bt) return bt;
|
|
1113
|
+
Bt = 1;
|
|
1114
|
+
var M = bt && bt.__extends || /* @__PURE__ */ (function() {
|
|
1115
|
+
var d = function(c, h) {
|
|
1116
|
+
return d = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
|
1117
|
+
e.__proto__ = r;
|
|
1118
|
+
} || function(e, r) {
|
|
1119
|
+
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
1120
|
+
}, d(c, h);
|
|
1121
|
+
};
|
|
1122
|
+
return function(c, h) {
|
|
1123
|
+
if (typeof h != "function" && h !== null)
|
|
1124
|
+
throw new TypeError("Class extends value " + String(h) + " is not a constructor or null");
|
|
1125
|
+
d(c, h);
|
|
1126
|
+
function e() {
|
|
1127
|
+
this.constructor = c;
|
|
1128
|
+
}
|
|
1129
|
+
c.prototype = h === null ? Object.create(h) : (e.prototype = h.prototype, new e());
|
|
1130
|
+
};
|
|
1131
|
+
})(), _;
|
|
1132
|
+
Object.defineProperty(bt, "__esModule", { value: !0 });
|
|
1133
|
+
var X = ee(), j = ue(), E = (function(d) {
|
|
1134
|
+
M(c, d);
|
|
1135
|
+
function c() {
|
|
1136
|
+
return d !== null && d.apply(this, arguments) || this;
|
|
1137
|
+
}
|
|
1138
|
+
return c;
|
|
1139
|
+
})(X.BaseItem), m = (function(d) {
|
|
1140
|
+
M(c, d);
|
|
1141
|
+
function c() {
|
|
1142
|
+
var h = d !== null && d.apply(this, arguments) || this;
|
|
1143
|
+
return h.defaultKind = "dummy", h.configuration = null, h;
|
|
1144
|
+
}
|
|
1145
|
+
return c.DefaultStackItems = (_ = {}, _[E.prototype.kind] = E, _), c;
|
|
1146
|
+
})(j.AbstractFactory);
|
|
1147
|
+
return bt.default = m, bt;
|
|
1148
|
+
}
|
|
1149
|
+
var ut = {}, Dt;
|
|
1150
|
+
function fe() {
|
|
1151
|
+
if (Dt) return ut;
|
|
1152
|
+
Dt = 1;
|
|
1153
|
+
var M = ut && ut.__read || function(m, d) {
|
|
1154
|
+
var c = typeof Symbol == "function" && m[Symbol.iterator];
|
|
1155
|
+
if (!c) return m;
|
|
1156
|
+
var h = c.call(m), e, r = [], n;
|
|
1157
|
+
try {
|
|
1158
|
+
for (; (d === void 0 || d-- > 0) && !(e = h.next()).done; ) r.push(e.value);
|
|
1159
|
+
} catch (a) {
|
|
1160
|
+
n = { error: a };
|
|
1161
|
+
} finally {
|
|
1162
|
+
try {
|
|
1163
|
+
e && !e.done && (c = h.return) && c.call(h);
|
|
1164
|
+
} finally {
|
|
1165
|
+
if (n) throw n.error;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
return r;
|
|
1169
|
+
}, _ = ut && ut.__spreadArray || function(m, d, c) {
|
|
1170
|
+
if (c || arguments.length === 2) for (var h = 0, e = d.length, r; h < e; h++)
|
|
1171
|
+
(r || !(h in d)) && (r || (r = Array.prototype.slice.call(d, 0, h)), r[h] = d[h]);
|
|
1172
|
+
return m.concat(r || Array.prototype.slice.call(d));
|
|
1173
|
+
}, X = ut && ut.__importDefault || function(m) {
|
|
1174
|
+
return m && m.__esModule ? m : { default: m };
|
|
1175
|
+
};
|
|
1176
|
+
Object.defineProperty(ut, "__esModule", { value: !0 }), ut.NodeFactory = void 0;
|
|
1177
|
+
var j = X(pt()), E = (function() {
|
|
1178
|
+
function m() {
|
|
1179
|
+
this.mmlFactory = null, this.factory = {
|
|
1180
|
+
node: m.createNode,
|
|
1181
|
+
token: m.createToken,
|
|
1182
|
+
text: m.createText,
|
|
1183
|
+
error: m.createError
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
return m.createNode = function(d, c, h, e, r) {
|
|
1187
|
+
h === void 0 && (h = []), e === void 0 && (e = {});
|
|
1188
|
+
var n = d.mmlFactory.create(c);
|
|
1189
|
+
return n.setChildren(h), r && n.appendChild(r), j.default.setProperties(n, e), n;
|
|
1190
|
+
}, m.createToken = function(d, c, h, e) {
|
|
1191
|
+
h === void 0 && (h = {}), e === void 0 && (e = "");
|
|
1192
|
+
var r = d.create("text", e);
|
|
1193
|
+
return d.create("node", c, [], h, r);
|
|
1194
|
+
}, m.createText = function(d, c) {
|
|
1195
|
+
return c == null ? null : d.mmlFactory.create("text").setText(c);
|
|
1196
|
+
}, m.createError = function(d, c) {
|
|
1197
|
+
var h = d.create("text", c), e = d.create("node", "mtext", [], {}, h), r = d.create("node", "merror", [e], { "data-mjx-error": c });
|
|
1198
|
+
return r;
|
|
1199
|
+
}, m.prototype.setMmlFactory = function(d) {
|
|
1200
|
+
this.mmlFactory = d;
|
|
1201
|
+
}, m.prototype.set = function(d, c) {
|
|
1202
|
+
this.factory[d] = c;
|
|
1203
|
+
}, m.prototype.setCreators = function(d) {
|
|
1204
|
+
for (var c in d)
|
|
1205
|
+
this.set(c, d[c]);
|
|
1206
|
+
}, m.prototype.create = function(d) {
|
|
1207
|
+
for (var c = [], h = 1; h < arguments.length; h++)
|
|
1208
|
+
c[h - 1] = arguments[h];
|
|
1209
|
+
var e = this.factory[d] || this.factory.node, r = e.apply(void 0, _([this, c[0]], M(c.slice(1)), !1));
|
|
1210
|
+
return d === "node" && this.configuration.addNode(c[0], r), r;
|
|
1211
|
+
}, m.prototype.get = function(d) {
|
|
1212
|
+
return this.factory[d];
|
|
1213
|
+
}, m;
|
|
1214
|
+
})();
|
|
1215
|
+
return ut.NodeFactory = E, ut;
|
|
1216
|
+
}
|
|
1217
|
+
var qt;
|
|
1218
|
+
function Ce() {
|
|
1219
|
+
if (qt) return it;
|
|
1220
|
+
qt = 1;
|
|
1221
|
+
var M = it && it.__read || function(e, r) {
|
|
1222
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1223
|
+
if (!n) return e;
|
|
1224
|
+
var a = n.call(e), i, v = [], p;
|
|
1225
|
+
try {
|
|
1226
|
+
for (; (r === void 0 || r-- > 0) && !(i = a.next()).done; ) v.push(i.value);
|
|
1227
|
+
} catch (y) {
|
|
1228
|
+
p = { error: y };
|
|
1229
|
+
} finally {
|
|
1230
|
+
try {
|
|
1231
|
+
i && !i.done && (n = a.return) && n.call(a);
|
|
1232
|
+
} finally {
|
|
1233
|
+
if (p) throw p.error;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
return v;
|
|
1237
|
+
}, _ = it && it.__spreadArray || function(e, r, n) {
|
|
1238
|
+
if (n || arguments.length === 2) for (var a = 0, i = r.length, v; a < i; a++)
|
|
1239
|
+
(v || !(a in r)) && (v || (v = Array.prototype.slice.call(r, 0, a)), v[a] = r[a]);
|
|
1240
|
+
return e.concat(v || Array.prototype.slice.call(r));
|
|
1241
|
+
}, X = it && it.__values || function(e) {
|
|
1242
|
+
var r = typeof Symbol == "function" && Symbol.iterator, n = r && e[r], a = 0;
|
|
1243
|
+
if (n) return n.call(e);
|
|
1244
|
+
if (e && typeof e.length == "number") return {
|
|
1245
|
+
next: function() {
|
|
1246
|
+
return e && a >= e.length && (e = void 0), { value: e && e[a++], done: !e };
|
|
1247
|
+
}
|
|
1248
|
+
};
|
|
1249
|
+
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1250
|
+
}, j = it && it.__importDefault || function(e) {
|
|
1251
|
+
return e && e.__esModule ? e : { default: e };
|
|
1252
|
+
};
|
|
1253
|
+
Object.defineProperty(it, "__esModule", { value: !0 });
|
|
1254
|
+
var E = j(ce()), m = fe(), d = j(pt()), c = wt(), h = (function() {
|
|
1255
|
+
function e(r, n) {
|
|
1256
|
+
n === void 0 && (n = []), this.options = {}, this.packageData = /* @__PURE__ */ new Map(), this.parsers = [], this.root = null, this.nodeLists = {}, this.error = !1, this.handlers = r.handlers, this.nodeFactory = new m.NodeFactory(), this.nodeFactory.configuration = this, this.nodeFactory.setCreators(r.nodes), this.itemFactory = new E.default(r.items), this.itemFactory.configuration = this, c.defaultOptions.apply(void 0, _([this.options], M(n), !1)), (0, c.defaultOptions)(this.options, r.options);
|
|
1257
|
+
}
|
|
1258
|
+
return e.prototype.pushParser = function(r) {
|
|
1259
|
+
this.parsers.unshift(r);
|
|
1260
|
+
}, e.prototype.popParser = function() {
|
|
1261
|
+
this.parsers.shift();
|
|
1262
|
+
}, Object.defineProperty(e.prototype, "parser", {
|
|
1263
|
+
get: function() {
|
|
1264
|
+
return this.parsers[0];
|
|
1265
|
+
},
|
|
1266
|
+
enumerable: !1,
|
|
1267
|
+
configurable: !0
|
|
1268
|
+
}), e.prototype.clear = function() {
|
|
1269
|
+
this.parsers = [], this.root = null, this.nodeLists = {}, this.error = !1, this.tags.resetTag();
|
|
1270
|
+
}, e.prototype.addNode = function(r, n) {
|
|
1271
|
+
var a = this.nodeLists[r];
|
|
1272
|
+
if (a || (a = this.nodeLists[r] = []), a.push(n), n.kind !== r) {
|
|
1273
|
+
var i = d.default.getProperty(n, "in-lists") || "", v = (i ? i.split(/,/) : []).concat(r).join(",");
|
|
1274
|
+
d.default.setProperty(n, "in-lists", v);
|
|
1275
|
+
}
|
|
1276
|
+
}, e.prototype.getList = function(r) {
|
|
1277
|
+
var n, a, i = this.nodeLists[r] || [], v = [];
|
|
1278
|
+
try {
|
|
1279
|
+
for (var p = X(i), y = p.next(); !y.done; y = p.next()) {
|
|
1280
|
+
var f = y.value;
|
|
1281
|
+
this.inTree(f) && v.push(f);
|
|
1282
|
+
}
|
|
1283
|
+
} catch (A) {
|
|
1284
|
+
n = { error: A };
|
|
1285
|
+
} finally {
|
|
1286
|
+
try {
|
|
1287
|
+
y && !y.done && (a = p.return) && a.call(p);
|
|
1288
|
+
} finally {
|
|
1289
|
+
if (n) throw n.error;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
return this.nodeLists[r] = v, v;
|
|
1293
|
+
}, e.prototype.removeFromList = function(r, n) {
|
|
1294
|
+
var a, i, v = this.nodeLists[r] || [];
|
|
1295
|
+
try {
|
|
1296
|
+
for (var p = X(n), y = p.next(); !y.done; y = p.next()) {
|
|
1297
|
+
var f = y.value, A = v.indexOf(f);
|
|
1298
|
+
A >= 0 && v.splice(A, 1);
|
|
1299
|
+
}
|
|
1300
|
+
} catch (x) {
|
|
1301
|
+
a = { error: x };
|
|
1302
|
+
} finally {
|
|
1303
|
+
try {
|
|
1304
|
+
y && !y.done && (i = p.return) && i.call(p);
|
|
1305
|
+
} finally {
|
|
1306
|
+
if (a) throw a.error;
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
}, e.prototype.inTree = function(r) {
|
|
1310
|
+
for (; r && r !== this.root; )
|
|
1311
|
+
r = r.parent;
|
|
1312
|
+
return !!r;
|
|
1313
|
+
}, e;
|
|
1314
|
+
})();
|
|
1315
|
+
return it.default = h, it;
|
|
1316
|
+
}
|
|
1317
|
+
var dt = {}, Xt;
|
|
1318
|
+
function xt() {
|
|
1319
|
+
return Xt || (Xt = 1, (function(M) {
|
|
1320
|
+
var _ = dt && dt.__extends || /* @__PURE__ */ (function() {
|
|
1321
|
+
var r = function(n, a) {
|
|
1322
|
+
return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, v) {
|
|
1323
|
+
i.__proto__ = v;
|
|
1324
|
+
} || function(i, v) {
|
|
1325
|
+
for (var p in v) Object.prototype.hasOwnProperty.call(v, p) && (i[p] = v[p]);
|
|
1326
|
+
}, r(n, a);
|
|
1327
|
+
};
|
|
1328
|
+
return function(n, a) {
|
|
1329
|
+
if (typeof a != "function" && a !== null)
|
|
1330
|
+
throw new TypeError("Class extends value " + String(a) + " is not a constructor or null");
|
|
1331
|
+
r(n, a);
|
|
1332
|
+
function i() {
|
|
1333
|
+
this.constructor = n;
|
|
1334
|
+
}
|
|
1335
|
+
n.prototype = a === null ? Object.create(a) : (i.prototype = a.prototype, new i());
|
|
1336
|
+
};
|
|
1337
|
+
})(), X = dt && dt.__values || function(r) {
|
|
1338
|
+
var n = typeof Symbol == "function" && Symbol.iterator, a = n && r[n], i = 0;
|
|
1339
|
+
if (a) return a.call(r);
|
|
1340
|
+
if (r && typeof r.length == "number") return {
|
|
1341
|
+
next: function() {
|
|
1342
|
+
return r && i >= r.length && (r = void 0), { value: r && r[i++], done: !r };
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1345
|
+
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1346
|
+
}, j = dt && dt.__importDefault || function(r) {
|
|
1347
|
+
return r && r.__esModule ? r : { default: r };
|
|
1348
|
+
};
|
|
1349
|
+
Object.defineProperty(M, "__esModule", { value: !0 }), M.TagsFactory = M.AllTags = M.NoTags = M.AbstractTags = M.TagInfo = M.Label = void 0;
|
|
1350
|
+
var E = j(Et()), m = /* @__PURE__ */ (function() {
|
|
1351
|
+
function r(n, a) {
|
|
1352
|
+
n === void 0 && (n = "???"), a === void 0 && (a = ""), this.tag = n, this.id = a;
|
|
1353
|
+
}
|
|
1354
|
+
return r;
|
|
1355
|
+
})();
|
|
1356
|
+
M.Label = m;
|
|
1357
|
+
var d = /* @__PURE__ */ (function() {
|
|
1358
|
+
function r(n, a, i, v, p, y, f, A) {
|
|
1359
|
+
n === void 0 && (n = ""), a === void 0 && (a = !1), i === void 0 && (i = !1), v === void 0 && (v = null), p === void 0 && (p = ""), y === void 0 && (y = ""), f === void 0 && (f = !1), A === void 0 && (A = ""), this.env = n, this.taggable = a, this.defaultTags = i, this.tag = v, this.tagId = p, this.tagFormat = y, this.noTag = f, this.labelId = A;
|
|
1360
|
+
}
|
|
1361
|
+
return r;
|
|
1362
|
+
})();
|
|
1363
|
+
M.TagInfo = d;
|
|
1364
|
+
var c = (function() {
|
|
1365
|
+
function r() {
|
|
1366
|
+
this.counter = 0, this.allCounter = 0, this.configuration = null, this.ids = {}, this.allIds = {}, this.labels = {}, this.allLabels = {}, this.redo = !1, this.refUpdate = !1, this.currentTag = new d(), this.history = [], this.stack = [], this.enTag = function(n, a) {
|
|
1367
|
+
var i = this.configuration.nodeFactory, v = i.create("node", "mtd", [n]), p = i.create("node", "mlabeledtr", [a, v]), y = i.create("node", "mtable", [p], {
|
|
1368
|
+
side: this.configuration.options.tagSide,
|
|
1369
|
+
minlabelspacing: this.configuration.options.tagIndent,
|
|
1370
|
+
displaystyle: !0
|
|
1371
|
+
});
|
|
1372
|
+
return y;
|
|
1373
|
+
};
|
|
1374
|
+
}
|
|
1375
|
+
return r.prototype.start = function(n, a, i) {
|
|
1376
|
+
this.currentTag && this.stack.push(this.currentTag), this.currentTag = new d(n, a, i);
|
|
1377
|
+
}, Object.defineProperty(r.prototype, "env", {
|
|
1378
|
+
get: function() {
|
|
1379
|
+
return this.currentTag.env;
|
|
1380
|
+
},
|
|
1381
|
+
enumerable: !1,
|
|
1382
|
+
configurable: !0
|
|
1383
|
+
}), r.prototype.end = function() {
|
|
1384
|
+
this.history.push(this.currentTag), this.currentTag = this.stack.pop();
|
|
1385
|
+
}, r.prototype.tag = function(n, a) {
|
|
1386
|
+
this.currentTag.tag = n, this.currentTag.tagFormat = a ? n : this.formatTag(n), this.currentTag.noTag = !1;
|
|
1387
|
+
}, r.prototype.notag = function() {
|
|
1388
|
+
this.tag("", !0), this.currentTag.noTag = !0;
|
|
1389
|
+
}, Object.defineProperty(r.prototype, "noTag", {
|
|
1390
|
+
get: function() {
|
|
1391
|
+
return this.currentTag.noTag;
|
|
1392
|
+
},
|
|
1393
|
+
enumerable: !1,
|
|
1394
|
+
configurable: !0
|
|
1395
|
+
}), Object.defineProperty(r.prototype, "label", {
|
|
1396
|
+
get: function() {
|
|
1397
|
+
return this.currentTag.labelId;
|
|
1398
|
+
},
|
|
1399
|
+
set: function(n) {
|
|
1400
|
+
this.currentTag.labelId = n;
|
|
1401
|
+
},
|
|
1402
|
+
enumerable: !1,
|
|
1403
|
+
configurable: !0
|
|
1404
|
+
}), r.prototype.formatUrl = function(n, a) {
|
|
1405
|
+
return a + "#" + encodeURIComponent(n);
|
|
1406
|
+
}, r.prototype.formatTag = function(n) {
|
|
1407
|
+
return "(" + n + ")";
|
|
1408
|
+
}, r.prototype.formatId = function(n) {
|
|
1409
|
+
return "mjx-eqn:" + n.replace(/\s/g, "_");
|
|
1410
|
+
}, r.prototype.formatNumber = function(n) {
|
|
1411
|
+
return n.toString();
|
|
1412
|
+
}, r.prototype.autoTag = function() {
|
|
1413
|
+
this.currentTag.tag == null && (this.counter++, this.tag(this.formatNumber(this.counter), !1));
|
|
1414
|
+
}, r.prototype.clearTag = function() {
|
|
1415
|
+
this.label = "", this.tag(null, !0), this.currentTag.tagId = "";
|
|
1416
|
+
}, r.prototype.getTag = function(n) {
|
|
1417
|
+
if (n === void 0 && (n = !1), n)
|
|
1418
|
+
return this.autoTag(), this.makeTag();
|
|
1419
|
+
var a = this.currentTag;
|
|
1420
|
+
return a.taggable && !a.noTag && (a.defaultTags && this.autoTag(), a.tag) ? this.makeTag() : null;
|
|
1421
|
+
}, r.prototype.resetTag = function() {
|
|
1422
|
+
this.history = [], this.redo = !1, this.refUpdate = !1, this.clearTag();
|
|
1423
|
+
}, r.prototype.reset = function(n) {
|
|
1424
|
+
n === void 0 && (n = 0), this.resetTag(), this.counter = this.allCounter = n, this.allLabels = {}, this.allIds = {};
|
|
1425
|
+
}, r.prototype.startEquation = function(n) {
|
|
1426
|
+
this.history = [], this.stack = [], this.clearTag(), this.currentTag = new d("", void 0, void 0), this.labels = {}, this.ids = {}, this.counter = this.allCounter, this.redo = !1;
|
|
1427
|
+
var a = n.inputData.recompile;
|
|
1428
|
+
a && (this.refUpdate = !0, this.counter = a.counter);
|
|
1429
|
+
}, r.prototype.finishEquation = function(n) {
|
|
1430
|
+
this.redo && (n.inputData.recompile = {
|
|
1431
|
+
state: n.state(),
|
|
1432
|
+
counter: this.allCounter
|
|
1433
|
+
}), this.refUpdate || (this.allCounter = this.counter), Object.assign(this.allIds, this.ids), Object.assign(this.allLabels, this.labels);
|
|
1434
|
+
}, r.prototype.finalize = function(n, a) {
|
|
1435
|
+
if (!a.display || this.currentTag.env || this.currentTag.tag == null)
|
|
1436
|
+
return n;
|
|
1437
|
+
var i = this.makeTag(), v = this.enTag(n, i);
|
|
1438
|
+
return v;
|
|
1439
|
+
}, r.prototype.makeId = function() {
|
|
1440
|
+
this.currentTag.tagId = this.formatId(this.configuration.options.useLabelIds ? this.label || this.currentTag.tag : this.currentTag.tag);
|
|
1441
|
+
}, r.prototype.makeTag = function() {
|
|
1442
|
+
this.makeId(), this.label && (this.labels[this.label] = new m(this.currentTag.tag, this.currentTag.tagId));
|
|
1443
|
+
var n = new E.default("\\text{" + this.currentTag.tagFormat + "}", {}, this.configuration).mml();
|
|
1444
|
+
return this.configuration.nodeFactory.create("node", "mtd", [n], { id: this.currentTag.tagId });
|
|
1445
|
+
}, r;
|
|
1446
|
+
})();
|
|
1447
|
+
M.AbstractTags = c;
|
|
1448
|
+
var h = (function(r) {
|
|
1449
|
+
_(n, r);
|
|
1450
|
+
function n() {
|
|
1451
|
+
return r !== null && r.apply(this, arguments) || this;
|
|
1452
|
+
}
|
|
1453
|
+
return n.prototype.autoTag = function() {
|
|
1454
|
+
}, n.prototype.getTag = function() {
|
|
1455
|
+
return this.currentTag.tag ? r.prototype.getTag.call(this) : null;
|
|
1456
|
+
}, n;
|
|
1457
|
+
})(c);
|
|
1458
|
+
M.NoTags = h;
|
|
1459
|
+
var e = (function(r) {
|
|
1460
|
+
_(n, r);
|
|
1461
|
+
function n() {
|
|
1462
|
+
return r !== null && r.apply(this, arguments) || this;
|
|
1463
|
+
}
|
|
1464
|
+
return n.prototype.finalize = function(a, i) {
|
|
1465
|
+
if (!i.display || this.history.find(function(p) {
|
|
1466
|
+
return p.taggable;
|
|
1467
|
+
}))
|
|
1468
|
+
return a;
|
|
1469
|
+
var v = this.getTag(!0);
|
|
1470
|
+
return this.enTag(a, v);
|
|
1471
|
+
}, n;
|
|
1472
|
+
})(c);
|
|
1473
|
+
M.AllTags = e, (function(r) {
|
|
1474
|
+
var n = /* @__PURE__ */ new Map([
|
|
1475
|
+
["none", h],
|
|
1476
|
+
["all", e]
|
|
1477
|
+
]), a = "none";
|
|
1478
|
+
r.OPTIONS = {
|
|
1479
|
+
tags: a,
|
|
1480
|
+
tagSide: "right",
|
|
1481
|
+
tagIndent: "0.8em",
|
|
1482
|
+
useLabelIds: !0,
|
|
1483
|
+
ignoreDuplicateLabels: !1
|
|
1484
|
+
}, r.add = function(i, v) {
|
|
1485
|
+
n.set(i, v);
|
|
1486
|
+
}, r.addTags = function(i) {
|
|
1487
|
+
var v, p;
|
|
1488
|
+
try {
|
|
1489
|
+
for (var y = X(Object.keys(i)), f = y.next(); !f.done; f = y.next()) {
|
|
1490
|
+
var A = f.value;
|
|
1491
|
+
r.add(A, i[A]);
|
|
1492
|
+
}
|
|
1493
|
+
} catch (x) {
|
|
1494
|
+
v = { error: x };
|
|
1495
|
+
} finally {
|
|
1496
|
+
try {
|
|
1497
|
+
f && !f.done && (p = y.return) && p.call(y);
|
|
1498
|
+
} finally {
|
|
1499
|
+
if (v) throw v.error;
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
}, r.create = function(i) {
|
|
1503
|
+
var v = n.get(i) || n.get(a);
|
|
1504
|
+
if (!v)
|
|
1505
|
+
throw Error("Unknown tags class");
|
|
1506
|
+
return new v();
|
|
1507
|
+
}, r.setDefault = function(i) {
|
|
1508
|
+
a = i;
|
|
1509
|
+
}, r.getDefault = function() {
|
|
1510
|
+
return r.create(a);
|
|
1511
|
+
};
|
|
1512
|
+
})(M.TagsFactory || (M.TagsFactory = {}));
|
|
1513
|
+
})(dt)), dt;
|
|
1514
|
+
}
|
|
1515
|
+
var mt = {}, vt = {}, Vt;
|
|
1516
|
+
function Pt() {
|
|
1517
|
+
return Vt || (Vt = 1, (function(M) {
|
|
1518
|
+
var _ = vt && vt.__values || function(h) {
|
|
1519
|
+
var e = typeof Symbol == "function" && Symbol.iterator, r = e && h[e], n = 0;
|
|
1520
|
+
if (r) return r.call(h);
|
|
1521
|
+
if (h && typeof h.length == "number") return {
|
|
1522
|
+
next: function() {
|
|
1523
|
+
return h && n >= h.length && (h = void 0), { value: h && h[n++], done: !h };
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1527
|
+
}, X = vt && vt.__read || function(h, e) {
|
|
1528
|
+
var r = typeof Symbol == "function" && h[Symbol.iterator];
|
|
1529
|
+
if (!r) return h;
|
|
1530
|
+
var n = r.call(h), a, i = [], v;
|
|
1531
|
+
try {
|
|
1532
|
+
for (; (e === void 0 || e-- > 0) && !(a = n.next()).done; ) i.push(a.value);
|
|
1533
|
+
} catch (p) {
|
|
1534
|
+
v = { error: p };
|
|
1535
|
+
} finally {
|
|
1536
|
+
try {
|
|
1537
|
+
a && !a.done && (r = n.return) && r.call(n);
|
|
1538
|
+
} finally {
|
|
1539
|
+
if (v) throw v.error;
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
return i;
|
|
1543
|
+
};
|
|
1544
|
+
Object.defineProperty(M, "__esModule", { value: !0 }), M.SubHandlers = M.SubHandler = M.MapHandler = void 0;
|
|
1545
|
+
var j = Qt(), E = Zt(), m;
|
|
1546
|
+
(function(h) {
|
|
1547
|
+
var e = /* @__PURE__ */ new Map();
|
|
1548
|
+
h.register = function(r) {
|
|
1549
|
+
e.set(r.name, r);
|
|
1550
|
+
}, h.getMap = function(r) {
|
|
1551
|
+
return e.get(r);
|
|
1552
|
+
};
|
|
1553
|
+
})(m = M.MapHandler || (M.MapHandler = {}));
|
|
1554
|
+
var d = (function() {
|
|
1555
|
+
function h() {
|
|
1556
|
+
this._configuration = new j.PrioritizedList(), this._fallback = new E.FunctionList();
|
|
1557
|
+
}
|
|
1558
|
+
return h.prototype.add = function(e, r, n) {
|
|
1559
|
+
var a, i;
|
|
1560
|
+
n === void 0 && (n = j.PrioritizedList.DEFAULTPRIORITY);
|
|
1561
|
+
try {
|
|
1562
|
+
for (var v = _(e.slice().reverse()), p = v.next(); !p.done; p = v.next()) {
|
|
1563
|
+
var y = p.value, f = m.getMap(y);
|
|
1564
|
+
if (!f) {
|
|
1565
|
+
this.warn("Configuration " + y + " not found! Omitted.");
|
|
1566
|
+
return;
|
|
1567
|
+
}
|
|
1568
|
+
this._configuration.add(f, n);
|
|
1569
|
+
}
|
|
1570
|
+
} catch (A) {
|
|
1571
|
+
a = { error: A };
|
|
1572
|
+
} finally {
|
|
1573
|
+
try {
|
|
1574
|
+
p && !p.done && (i = v.return) && i.call(v);
|
|
1575
|
+
} finally {
|
|
1576
|
+
if (a) throw a.error;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
r && this._fallback.add(r, n);
|
|
1580
|
+
}, h.prototype.parse = function(e) {
|
|
1581
|
+
var r, n;
|
|
1582
|
+
try {
|
|
1583
|
+
for (var a = _(this._configuration), i = a.next(); !i.done; i = a.next()) {
|
|
1584
|
+
var v = i.value.item, p = v.parse(e);
|
|
1585
|
+
if (p)
|
|
1586
|
+
return p;
|
|
1587
|
+
}
|
|
1588
|
+
} catch (x) {
|
|
1589
|
+
r = { error: x };
|
|
1590
|
+
} finally {
|
|
1591
|
+
try {
|
|
1592
|
+
i && !i.done && (n = a.return) && n.call(a);
|
|
1593
|
+
} finally {
|
|
1594
|
+
if (r) throw r.error;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
var y = X(e, 2), f = y[0], A = y[1];
|
|
1598
|
+
Array.from(this._fallback)[0].item(f, A);
|
|
1599
|
+
}, h.prototype.lookup = function(e) {
|
|
1600
|
+
var r = this.applicable(e);
|
|
1601
|
+
return r ? r.lookup(e) : null;
|
|
1602
|
+
}, h.prototype.contains = function(e) {
|
|
1603
|
+
return !!this.applicable(e);
|
|
1604
|
+
}, h.prototype.toString = function() {
|
|
1605
|
+
var e, r, n = [];
|
|
1606
|
+
try {
|
|
1607
|
+
for (var a = _(this._configuration), i = a.next(); !i.done; i = a.next()) {
|
|
1608
|
+
var v = i.value.item;
|
|
1609
|
+
n.push(v.name);
|
|
1610
|
+
}
|
|
1611
|
+
} catch (p) {
|
|
1612
|
+
e = { error: p };
|
|
1613
|
+
} finally {
|
|
1614
|
+
try {
|
|
1615
|
+
i && !i.done && (r = a.return) && r.call(a);
|
|
1616
|
+
} finally {
|
|
1617
|
+
if (e) throw e.error;
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
return n.join(", ");
|
|
1621
|
+
}, h.prototype.applicable = function(e) {
|
|
1622
|
+
var r, n;
|
|
1623
|
+
try {
|
|
1624
|
+
for (var a = _(this._configuration), i = a.next(); !i.done; i = a.next()) {
|
|
1625
|
+
var v = i.value.item;
|
|
1626
|
+
if (v.contains(e))
|
|
1627
|
+
return v;
|
|
1628
|
+
}
|
|
1629
|
+
} catch (p) {
|
|
1630
|
+
r = { error: p };
|
|
1631
|
+
} finally {
|
|
1632
|
+
try {
|
|
1633
|
+
i && !i.done && (n = a.return) && n.call(a);
|
|
1634
|
+
} finally {
|
|
1635
|
+
if (r) throw r.error;
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
return null;
|
|
1639
|
+
}, h.prototype.retrieve = function(e) {
|
|
1640
|
+
var r, n;
|
|
1641
|
+
try {
|
|
1642
|
+
for (var a = _(this._configuration), i = a.next(); !i.done; i = a.next()) {
|
|
1643
|
+
var v = i.value.item;
|
|
1644
|
+
if (v.name === e)
|
|
1645
|
+
return v;
|
|
1646
|
+
}
|
|
1647
|
+
} catch (p) {
|
|
1648
|
+
r = { error: p };
|
|
1649
|
+
} finally {
|
|
1650
|
+
try {
|
|
1651
|
+
i && !i.done && (n = a.return) && n.call(a);
|
|
1652
|
+
} finally {
|
|
1653
|
+
if (r) throw r.error;
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
return null;
|
|
1657
|
+
}, h.prototype.warn = function(e) {
|
|
1658
|
+
console.log("TexParser Warning: " + e);
|
|
1659
|
+
}, h;
|
|
1660
|
+
})();
|
|
1661
|
+
M.SubHandler = d;
|
|
1662
|
+
var c = (function() {
|
|
1663
|
+
function h() {
|
|
1664
|
+
this.map = /* @__PURE__ */ new Map();
|
|
1665
|
+
}
|
|
1666
|
+
return h.prototype.add = function(e, r, n) {
|
|
1667
|
+
var a, i;
|
|
1668
|
+
n === void 0 && (n = j.PrioritizedList.DEFAULTPRIORITY);
|
|
1669
|
+
try {
|
|
1670
|
+
for (var v = _(Object.keys(e)), p = v.next(); !p.done; p = v.next()) {
|
|
1671
|
+
var y = p.value, f = y, A = this.get(f);
|
|
1672
|
+
A || (A = new d(), this.set(f, A)), A.add(e[f], r[f], n);
|
|
1673
|
+
}
|
|
1674
|
+
} catch (x) {
|
|
1675
|
+
a = { error: x };
|
|
1676
|
+
} finally {
|
|
1677
|
+
try {
|
|
1678
|
+
p && !p.done && (i = v.return) && i.call(v);
|
|
1679
|
+
} finally {
|
|
1680
|
+
if (a) throw a.error;
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
}, h.prototype.set = function(e, r) {
|
|
1684
|
+
this.map.set(e, r);
|
|
1685
|
+
}, h.prototype.get = function(e) {
|
|
1686
|
+
return this.map.get(e);
|
|
1687
|
+
}, h.prototype.retrieve = function(e) {
|
|
1688
|
+
var r, n;
|
|
1689
|
+
try {
|
|
1690
|
+
for (var a = _(this.map.values()), i = a.next(); !i.done; i = a.next()) {
|
|
1691
|
+
var v = i.value, p = v.retrieve(e);
|
|
1692
|
+
if (p)
|
|
1693
|
+
return p;
|
|
1694
|
+
}
|
|
1695
|
+
} catch (y) {
|
|
1696
|
+
r = { error: y };
|
|
1697
|
+
} finally {
|
|
1698
|
+
try {
|
|
1699
|
+
i && !i.done && (n = a.return) && n.call(a);
|
|
1700
|
+
} finally {
|
|
1701
|
+
if (r) throw r.error;
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
return null;
|
|
1705
|
+
}, h.prototype.keys = function() {
|
|
1706
|
+
return this.map.keys();
|
|
1707
|
+
}, h;
|
|
1708
|
+
})();
|
|
1709
|
+
M.SubHandlers = c;
|
|
1710
|
+
})(vt)), vt;
|
|
1711
|
+
}
|
|
1712
|
+
var Ht;
|
|
1713
|
+
function he() {
|
|
1714
|
+
return Ht || (Ht = 1, (function(M) {
|
|
1715
|
+
var _ = mt && mt.__values || function(n) {
|
|
1716
|
+
var a = typeof Symbol == "function" && Symbol.iterator, i = a && n[a], v = 0;
|
|
1717
|
+
if (i) return i.call(n);
|
|
1718
|
+
if (n && typeof n.length == "number") return {
|
|
1719
|
+
next: function() {
|
|
1720
|
+
return n && v >= n.length && (n = void 0), { value: n && n[v++], done: !n };
|
|
1721
|
+
}
|
|
1722
|
+
};
|
|
1723
|
+
throw new TypeError(a ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1724
|
+
}, X = mt && mt.__read || function(n, a) {
|
|
1725
|
+
var i = typeof Symbol == "function" && n[Symbol.iterator];
|
|
1726
|
+
if (!i) return n;
|
|
1727
|
+
var v = i.call(n), p, y = [], f;
|
|
1728
|
+
try {
|
|
1729
|
+
for (; (a === void 0 || a-- > 0) && !(p = v.next()).done; ) y.push(p.value);
|
|
1730
|
+
} catch (A) {
|
|
1731
|
+
f = { error: A };
|
|
1732
|
+
} finally {
|
|
1733
|
+
try {
|
|
1734
|
+
p && !p.done && (i = v.return) && i.call(v);
|
|
1735
|
+
} finally {
|
|
1736
|
+
if (f) throw f.error;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
return y;
|
|
1740
|
+
};
|
|
1741
|
+
Object.defineProperty(M, "__esModule", { value: !0 }), M.ParserConfiguration = M.ConfigurationHandler = M.Configuration = void 0;
|
|
1742
|
+
var j = wt(), E = Pt(), m = Zt(), d = Qt(), c = xt(), h = (function() {
|
|
1743
|
+
function n(a, i, v, p, y, f, A, x, C, t, u, o, s) {
|
|
1744
|
+
i === void 0 && (i = {}), v === void 0 && (v = {}), p === void 0 && (p = {}), y === void 0 && (y = {}), f === void 0 && (f = {}), A === void 0 && (A = {}), x === void 0 && (x = []), C === void 0 && (C = []), t === void 0 && (t = null), u === void 0 && (u = null), this.name = a, this.handler = i, this.fallback = v, this.items = p, this.tags = y, this.options = f, this.nodes = A, this.preprocessors = x, this.postprocessors = C, this.initMethod = t, this.configMethod = u, this.priority = o, this.parser = s, this.handler = Object.assign({ character: [], delimiter: [], macro: [], environment: [] }, i);
|
|
1745
|
+
}
|
|
1746
|
+
return n.makeProcessor = function(a, i) {
|
|
1747
|
+
return Array.isArray(a) ? a : [a, i];
|
|
1748
|
+
}, n._create = function(a, i) {
|
|
1749
|
+
var v = this;
|
|
1750
|
+
i === void 0 && (i = {});
|
|
1751
|
+
var p = i.priority || d.PrioritizedList.DEFAULTPRIORITY, y = i.init ? this.makeProcessor(i.init, p) : null, f = i.config ? this.makeProcessor(i.config, p) : null, A = (i.preprocessors || []).map(function(t) {
|
|
1752
|
+
return v.makeProcessor(t, p);
|
|
1753
|
+
}), x = (i.postprocessors || []).map(function(t) {
|
|
1754
|
+
return v.makeProcessor(t, p);
|
|
1755
|
+
}), C = i.parser || "tex";
|
|
1756
|
+
return new n(a, i.handler || {}, i.fallback || {}, i.items || {}, i.tags || {}, i.options || {}, i.nodes || {}, A, x, y, f, p, C);
|
|
1757
|
+
}, n.create = function(a, i) {
|
|
1758
|
+
i === void 0 && (i = {});
|
|
1759
|
+
var v = n._create(a, i);
|
|
1760
|
+
return e.set(a, v), v;
|
|
1761
|
+
}, n.local = function(a) {
|
|
1762
|
+
return a === void 0 && (a = {}), n._create("", a);
|
|
1763
|
+
}, Object.defineProperty(n.prototype, "init", {
|
|
1764
|
+
get: function() {
|
|
1765
|
+
return this.initMethod ? this.initMethod[0] : null;
|
|
1766
|
+
},
|
|
1767
|
+
enumerable: !1,
|
|
1768
|
+
configurable: !0
|
|
1769
|
+
}), Object.defineProperty(n.prototype, "config", {
|
|
1770
|
+
get: function() {
|
|
1771
|
+
return this.configMethod ? this.configMethod[0] : null;
|
|
1772
|
+
},
|
|
1773
|
+
enumerable: !1,
|
|
1774
|
+
configurable: !0
|
|
1775
|
+
}), n;
|
|
1776
|
+
})();
|
|
1777
|
+
M.Configuration = h;
|
|
1778
|
+
var e;
|
|
1779
|
+
(function(n) {
|
|
1780
|
+
var a = /* @__PURE__ */ new Map();
|
|
1781
|
+
n.set = function(i, v) {
|
|
1782
|
+
a.set(i, v);
|
|
1783
|
+
}, n.get = function(i) {
|
|
1784
|
+
return a.get(i);
|
|
1785
|
+
}, n.keys = function() {
|
|
1786
|
+
return a.keys();
|
|
1787
|
+
};
|
|
1788
|
+
})(e = M.ConfigurationHandler || (M.ConfigurationHandler = {}));
|
|
1789
|
+
var r = (function() {
|
|
1790
|
+
function n(a, i) {
|
|
1791
|
+
var v, p, y, f;
|
|
1792
|
+
i === void 0 && (i = ["tex"]), this.initMethod = new m.FunctionList(), this.configMethod = new m.FunctionList(), this.configurations = new d.PrioritizedList(), this.parsers = [], this.handlers = new E.SubHandlers(), this.items = {}, this.tags = {}, this.options = {}, this.nodes = {}, this.parsers = i;
|
|
1793
|
+
try {
|
|
1794
|
+
for (var A = _(a.slice().reverse()), x = A.next(); !x.done; x = A.next()) {
|
|
1795
|
+
var C = x.value;
|
|
1796
|
+
this.addPackage(C);
|
|
1797
|
+
}
|
|
1798
|
+
} catch (O) {
|
|
1799
|
+
v = { error: O };
|
|
1800
|
+
} finally {
|
|
1801
|
+
try {
|
|
1802
|
+
x && !x.done && (p = A.return) && p.call(A);
|
|
1803
|
+
} finally {
|
|
1804
|
+
if (v) throw v.error;
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
try {
|
|
1808
|
+
for (var t = _(this.configurations), u = t.next(); !u.done; u = t.next()) {
|
|
1809
|
+
var o = u.value, s = o.item, l = o.priority;
|
|
1810
|
+
this.append(s, l);
|
|
1811
|
+
}
|
|
1812
|
+
} catch (O) {
|
|
1813
|
+
y = { error: O };
|
|
1814
|
+
} finally {
|
|
1815
|
+
try {
|
|
1816
|
+
u && !u.done && (f = t.return) && f.call(t);
|
|
1817
|
+
} finally {
|
|
1818
|
+
if (y) throw y.error;
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
return n.prototype.init = function() {
|
|
1823
|
+
this.initMethod.execute(this);
|
|
1824
|
+
}, n.prototype.config = function(a) {
|
|
1825
|
+
var i, v;
|
|
1826
|
+
this.configMethod.execute(this, a);
|
|
1827
|
+
try {
|
|
1828
|
+
for (var p = _(this.configurations), y = p.next(); !y.done; y = p.next()) {
|
|
1829
|
+
var f = y.value;
|
|
1830
|
+
this.addFilters(a, f.item);
|
|
1831
|
+
}
|
|
1832
|
+
} catch (A) {
|
|
1833
|
+
i = { error: A };
|
|
1834
|
+
} finally {
|
|
1835
|
+
try {
|
|
1836
|
+
y && !y.done && (v = p.return) && v.call(p);
|
|
1837
|
+
} finally {
|
|
1838
|
+
if (i) throw i.error;
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
}, n.prototype.addPackage = function(a) {
|
|
1842
|
+
var i = typeof a == "string" ? a : a[0], v = this.getPackage(i);
|
|
1843
|
+
v && this.configurations.add(v, typeof a == "string" ? v.priority : a[1]);
|
|
1844
|
+
}, n.prototype.add = function(a, i, v) {
|
|
1845
|
+
var p, y;
|
|
1846
|
+
v === void 0 && (v = {});
|
|
1847
|
+
var f = this.getPackage(a);
|
|
1848
|
+
this.append(f), this.configurations.add(f, f.priority), this.init();
|
|
1849
|
+
var A = i.parseOptions;
|
|
1850
|
+
A.nodeFactory.setCreators(f.nodes);
|
|
1851
|
+
try {
|
|
1852
|
+
for (var x = _(Object.keys(f.items)), C = x.next(); !C.done; C = x.next()) {
|
|
1853
|
+
var t = C.value;
|
|
1854
|
+
A.itemFactory.setNodeClass(t, f.items[t]);
|
|
1855
|
+
}
|
|
1856
|
+
} catch (u) {
|
|
1857
|
+
p = { error: u };
|
|
1858
|
+
} finally {
|
|
1859
|
+
try {
|
|
1860
|
+
C && !C.done && (y = x.return) && y.call(x);
|
|
1861
|
+
} finally {
|
|
1862
|
+
if (p) throw p.error;
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
c.TagsFactory.addTags(f.tags), (0, j.defaultOptions)(A.options, f.options), (0, j.userOptions)(A.options, v), this.addFilters(i, f), f.config && f.config(this, i);
|
|
1866
|
+
}, n.prototype.getPackage = function(a) {
|
|
1867
|
+
var i = e.get(a);
|
|
1868
|
+
if (i && this.parsers.indexOf(i.parser) < 0)
|
|
1869
|
+
throw Error("Package ".concat(a, " doesn't target the proper parser"));
|
|
1870
|
+
return i;
|
|
1871
|
+
}, n.prototype.append = function(a, i) {
|
|
1872
|
+
i = i || a.priority, a.initMethod && this.initMethod.add(a.initMethod[0], a.initMethod[1]), a.configMethod && this.configMethod.add(a.configMethod[0], a.configMethod[1]), this.handlers.add(a.handler, a.fallback, i), Object.assign(this.items, a.items), Object.assign(this.tags, a.tags), (0, j.defaultOptions)(this.options, a.options), Object.assign(this.nodes, a.nodes);
|
|
1873
|
+
}, n.prototype.addFilters = function(a, i) {
|
|
1874
|
+
var v, p, y, f;
|
|
1875
|
+
try {
|
|
1876
|
+
for (var A = _(i.preprocessors), x = A.next(); !x.done; x = A.next()) {
|
|
1877
|
+
var C = X(x.value, 2), t = C[0], u = C[1];
|
|
1878
|
+
a.preFilters.add(t, u);
|
|
1879
|
+
}
|
|
1880
|
+
} catch (k) {
|
|
1881
|
+
v = { error: k };
|
|
1882
|
+
} finally {
|
|
1883
|
+
try {
|
|
1884
|
+
x && !x.done && (p = A.return) && p.call(A);
|
|
1885
|
+
} finally {
|
|
1886
|
+
if (v) throw v.error;
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
try {
|
|
1890
|
+
for (var o = _(i.postprocessors), s = o.next(); !s.done; s = o.next()) {
|
|
1891
|
+
var l = X(s.value, 2), O = l[0], u = l[1];
|
|
1892
|
+
a.postFilters.add(O, u);
|
|
1893
|
+
}
|
|
1894
|
+
} catch (k) {
|
|
1895
|
+
y = { error: k };
|
|
1896
|
+
} finally {
|
|
1897
|
+
try {
|
|
1898
|
+
s && !s.done && (f = o.return) && f.call(o);
|
|
1899
|
+
} finally {
|
|
1900
|
+
if (y) throw y.error;
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
}, n;
|
|
1904
|
+
})();
|
|
1905
|
+
M.ParserConfiguration = r;
|
|
1906
|
+
})(mt)), mt;
|
|
1907
|
+
}
|
|
1908
|
+
var Z = {}, W = {}, yt = {}, Gt;
|
|
1909
|
+
function de() {
|
|
1910
|
+
if (Gt) return yt;
|
|
1911
|
+
Gt = 1, Object.defineProperty(yt, "__esModule", { value: !0 }), yt.Macro = yt.Symbol = void 0;
|
|
1912
|
+
var M = (function() {
|
|
1913
|
+
function X(j, E, m) {
|
|
1914
|
+
this._symbol = j, this._char = E, this._attributes = m;
|
|
1915
|
+
}
|
|
1916
|
+
return Object.defineProperty(X.prototype, "symbol", {
|
|
1917
|
+
get: function() {
|
|
1918
|
+
return this._symbol;
|
|
1919
|
+
},
|
|
1920
|
+
enumerable: !1,
|
|
1921
|
+
configurable: !0
|
|
1922
|
+
}), Object.defineProperty(X.prototype, "char", {
|
|
1923
|
+
get: function() {
|
|
1924
|
+
return this._char;
|
|
1925
|
+
},
|
|
1926
|
+
enumerable: !1,
|
|
1927
|
+
configurable: !0
|
|
1928
|
+
}), Object.defineProperty(X.prototype, "attributes", {
|
|
1929
|
+
get: function() {
|
|
1930
|
+
return this._attributes;
|
|
1931
|
+
},
|
|
1932
|
+
enumerable: !1,
|
|
1933
|
+
configurable: !0
|
|
1934
|
+
}), X;
|
|
1935
|
+
})();
|
|
1936
|
+
yt.Symbol = M;
|
|
1937
|
+
var _ = (function() {
|
|
1938
|
+
function X(j, E, m) {
|
|
1939
|
+
m === void 0 && (m = []), this._symbol = j, this._func = E, this._args = m;
|
|
1940
|
+
}
|
|
1941
|
+
return Object.defineProperty(X.prototype, "symbol", {
|
|
1942
|
+
get: function() {
|
|
1943
|
+
return this._symbol;
|
|
1944
|
+
},
|
|
1945
|
+
enumerable: !1,
|
|
1946
|
+
configurable: !0
|
|
1947
|
+
}), Object.defineProperty(X.prototype, "func", {
|
|
1948
|
+
get: function() {
|
|
1949
|
+
return this._func;
|
|
1950
|
+
},
|
|
1951
|
+
enumerable: !1,
|
|
1952
|
+
configurable: !0
|
|
1953
|
+
}), Object.defineProperty(X.prototype, "args", {
|
|
1954
|
+
get: function() {
|
|
1955
|
+
return this._args;
|
|
1956
|
+
},
|
|
1957
|
+
enumerable: !1,
|
|
1958
|
+
configurable: !0
|
|
1959
|
+
}), X;
|
|
1960
|
+
})();
|
|
1961
|
+
return yt.Macro = _, yt;
|
|
1962
|
+
}
|
|
1963
|
+
var Kt;
|
|
1964
|
+
function re() {
|
|
1965
|
+
if (Kt) return W;
|
|
1966
|
+
Kt = 1;
|
|
1967
|
+
var M = W && W.__extends || /* @__PURE__ */ (function() {
|
|
1968
|
+
var p = function(y, f) {
|
|
1969
|
+
return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(A, x) {
|
|
1970
|
+
A.__proto__ = x;
|
|
1971
|
+
} || function(A, x) {
|
|
1972
|
+
for (var C in x) Object.prototype.hasOwnProperty.call(x, C) && (A[C] = x[C]);
|
|
1973
|
+
}, p(y, f);
|
|
1974
|
+
};
|
|
1975
|
+
return function(y, f) {
|
|
1976
|
+
if (typeof f != "function" && f !== null)
|
|
1977
|
+
throw new TypeError("Class extends value " + String(f) + " is not a constructor or null");
|
|
1978
|
+
p(y, f);
|
|
1979
|
+
function A() {
|
|
1980
|
+
this.constructor = y;
|
|
1981
|
+
}
|
|
1982
|
+
y.prototype = f === null ? Object.create(f) : (A.prototype = f.prototype, new A());
|
|
1983
|
+
};
|
|
1984
|
+
})(), _ = W && W.__read || function(p, y) {
|
|
1985
|
+
var f = typeof Symbol == "function" && p[Symbol.iterator];
|
|
1986
|
+
if (!f) return p;
|
|
1987
|
+
var A = f.call(p), x, C = [], t;
|
|
1988
|
+
try {
|
|
1989
|
+
for (; (y === void 0 || y-- > 0) && !(x = A.next()).done; ) C.push(x.value);
|
|
1990
|
+
} catch (u) {
|
|
1991
|
+
t = { error: u };
|
|
1992
|
+
} finally {
|
|
1993
|
+
try {
|
|
1994
|
+
x && !x.done && (f = A.return) && f.call(A);
|
|
1995
|
+
} finally {
|
|
1996
|
+
if (t) throw t.error;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
return C;
|
|
2000
|
+
}, X = W && W.__values || function(p) {
|
|
2001
|
+
var y = typeof Symbol == "function" && Symbol.iterator, f = y && p[y], A = 0;
|
|
2002
|
+
if (f) return f.call(p);
|
|
2003
|
+
if (p && typeof p.length == "number") return {
|
|
2004
|
+
next: function() {
|
|
2005
|
+
return p && A >= p.length && (p = void 0), { value: p && p[A++], done: !p };
|
|
2006
|
+
}
|
|
2007
|
+
};
|
|
2008
|
+
throw new TypeError(y ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2009
|
+
}, j = W && W.__spreadArray || function(p, y, f) {
|
|
2010
|
+
if (f || arguments.length === 2) for (var A = 0, x = y.length, C; A < x; A++)
|
|
2011
|
+
(C || !(A in y)) && (C || (C = Array.prototype.slice.call(y, 0, A)), C[A] = y[A]);
|
|
2012
|
+
return p.concat(C || Array.prototype.slice.call(y));
|
|
2013
|
+
};
|
|
2014
|
+
Object.defineProperty(W, "__esModule", { value: !0 }), W.EnvironmentMap = W.CommandMap = W.MacroMap = W.DelimiterMap = W.CharacterMap = W.AbstractParseMap = W.RegExpMap = W.AbstractSymbolMap = W.parseResult = void 0;
|
|
2015
|
+
var E = de(), m = Pt();
|
|
2016
|
+
function d(p) {
|
|
2017
|
+
return p === void 0 ? !0 : p;
|
|
2018
|
+
}
|
|
2019
|
+
W.parseResult = d;
|
|
2020
|
+
var c = (function() {
|
|
2021
|
+
function p(y, f) {
|
|
2022
|
+
this._name = y, this._parser = f, m.MapHandler.register(this);
|
|
2023
|
+
}
|
|
2024
|
+
return Object.defineProperty(p.prototype, "name", {
|
|
2025
|
+
get: function() {
|
|
2026
|
+
return this._name;
|
|
2027
|
+
},
|
|
2028
|
+
enumerable: !1,
|
|
2029
|
+
configurable: !0
|
|
2030
|
+
}), p.prototype.parserFor = function(y) {
|
|
2031
|
+
return this.contains(y) ? this.parser : null;
|
|
2032
|
+
}, p.prototype.parse = function(y) {
|
|
2033
|
+
var f = _(y, 2), A = f[0], x = f[1], C = this.parserFor(x), t = this.lookup(x);
|
|
2034
|
+
return C && t ? d(C(A, t)) : null;
|
|
2035
|
+
}, Object.defineProperty(p.prototype, "parser", {
|
|
2036
|
+
get: function() {
|
|
2037
|
+
return this._parser;
|
|
2038
|
+
},
|
|
2039
|
+
set: function(y) {
|
|
2040
|
+
this._parser = y;
|
|
2041
|
+
},
|
|
2042
|
+
enumerable: !1,
|
|
2043
|
+
configurable: !0
|
|
2044
|
+
}), p;
|
|
2045
|
+
})();
|
|
2046
|
+
W.AbstractSymbolMap = c;
|
|
2047
|
+
var h = (function(p) {
|
|
2048
|
+
M(y, p);
|
|
2049
|
+
function y(f, A, x) {
|
|
2050
|
+
var C = p.call(this, f, A) || this;
|
|
2051
|
+
return C._regExp = x, C;
|
|
2052
|
+
}
|
|
2053
|
+
return y.prototype.contains = function(f) {
|
|
2054
|
+
return this._regExp.test(f);
|
|
2055
|
+
}, y.prototype.lookup = function(f) {
|
|
2056
|
+
return this.contains(f) ? f : null;
|
|
2057
|
+
}, y;
|
|
2058
|
+
})(c);
|
|
2059
|
+
W.RegExpMap = h;
|
|
2060
|
+
var e = (function(p) {
|
|
2061
|
+
M(y, p);
|
|
2062
|
+
function y() {
|
|
2063
|
+
var f = p !== null && p.apply(this, arguments) || this;
|
|
2064
|
+
return f.map = /* @__PURE__ */ new Map(), f;
|
|
2065
|
+
}
|
|
2066
|
+
return y.prototype.lookup = function(f) {
|
|
2067
|
+
return this.map.get(f);
|
|
2068
|
+
}, y.prototype.contains = function(f) {
|
|
2069
|
+
return this.map.has(f);
|
|
2070
|
+
}, y.prototype.add = function(f, A) {
|
|
2071
|
+
this.map.set(f, A);
|
|
2072
|
+
}, y.prototype.remove = function(f) {
|
|
2073
|
+
this.map.delete(f);
|
|
2074
|
+
}, y;
|
|
2075
|
+
})(c);
|
|
2076
|
+
W.AbstractParseMap = e;
|
|
2077
|
+
var r = (function(p) {
|
|
2078
|
+
M(y, p);
|
|
2079
|
+
function y(f, A, x) {
|
|
2080
|
+
var C, t, u = p.call(this, f, A) || this;
|
|
2081
|
+
try {
|
|
2082
|
+
for (var o = X(Object.keys(x)), s = o.next(); !s.done; s = o.next()) {
|
|
2083
|
+
var l = s.value, O = x[l], k = _(typeof O == "string" ? [O, null] : O, 2), N = k[0], I = k[1], F = new E.Symbol(l, N, I);
|
|
2084
|
+
u.add(l, F);
|
|
2085
|
+
}
|
|
2086
|
+
} catch (R) {
|
|
2087
|
+
C = { error: R };
|
|
2088
|
+
} finally {
|
|
2089
|
+
try {
|
|
2090
|
+
s && !s.done && (t = o.return) && t.call(o);
|
|
2091
|
+
} finally {
|
|
2092
|
+
if (C) throw C.error;
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
return u;
|
|
2096
|
+
}
|
|
2097
|
+
return y;
|
|
2098
|
+
})(e);
|
|
2099
|
+
W.CharacterMap = r;
|
|
2100
|
+
var n = (function(p) {
|
|
2101
|
+
M(y, p);
|
|
2102
|
+
function y() {
|
|
2103
|
+
return p !== null && p.apply(this, arguments) || this;
|
|
2104
|
+
}
|
|
2105
|
+
return y.prototype.parse = function(f) {
|
|
2106
|
+
var A = _(f, 2), x = A[0], C = A[1];
|
|
2107
|
+
return p.prototype.parse.call(this, [x, "\\" + C]);
|
|
2108
|
+
}, y;
|
|
2109
|
+
})(r);
|
|
2110
|
+
W.DelimiterMap = n;
|
|
2111
|
+
var a = (function(p) {
|
|
2112
|
+
M(y, p);
|
|
2113
|
+
function y(f, A, x) {
|
|
2114
|
+
var C, t, u = p.call(this, f, null) || this;
|
|
2115
|
+
try {
|
|
2116
|
+
for (var o = X(Object.keys(A)), s = o.next(); !s.done; s = o.next()) {
|
|
2117
|
+
var l = s.value, O = A[l], k = _(typeof O == "string" ? [O] : O), N = k[0], I = k.slice(1), F = new E.Macro(l, x[N], I);
|
|
2118
|
+
u.add(l, F);
|
|
2119
|
+
}
|
|
2120
|
+
} catch (R) {
|
|
2121
|
+
C = { error: R };
|
|
2122
|
+
} finally {
|
|
2123
|
+
try {
|
|
2124
|
+
s && !s.done && (t = o.return) && t.call(o);
|
|
2125
|
+
} finally {
|
|
2126
|
+
if (C) throw C.error;
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
return u;
|
|
2130
|
+
}
|
|
2131
|
+
return y.prototype.parserFor = function(f) {
|
|
2132
|
+
var A = this.lookup(f);
|
|
2133
|
+
return A ? A.func : null;
|
|
2134
|
+
}, y.prototype.parse = function(f) {
|
|
2135
|
+
var A = _(f, 2), x = A[0], C = A[1], t = this.lookup(C), u = this.parserFor(C);
|
|
2136
|
+
return !t || !u ? null : d(u.apply(void 0, j([x, t.symbol], _(t.args), !1)));
|
|
2137
|
+
}, y;
|
|
2138
|
+
})(e);
|
|
2139
|
+
W.MacroMap = a;
|
|
2140
|
+
var i = (function(p) {
|
|
2141
|
+
M(y, p);
|
|
2142
|
+
function y() {
|
|
2143
|
+
return p !== null && p.apply(this, arguments) || this;
|
|
2144
|
+
}
|
|
2145
|
+
return y.prototype.parse = function(f) {
|
|
2146
|
+
var A = _(f, 2), x = A[0], C = A[1], t = this.lookup(C), u = this.parserFor(C);
|
|
2147
|
+
if (!t || !u)
|
|
2148
|
+
return null;
|
|
2149
|
+
var o = x.currentCS;
|
|
2150
|
+
x.currentCS = "\\" + C;
|
|
2151
|
+
var s = u.apply(void 0, j([x, "\\" + t.symbol], _(t.args), !1));
|
|
2152
|
+
return x.currentCS = o, d(s);
|
|
2153
|
+
}, y;
|
|
2154
|
+
})(a);
|
|
2155
|
+
W.CommandMap = i;
|
|
2156
|
+
var v = (function(p) {
|
|
2157
|
+
M(y, p);
|
|
2158
|
+
function y(f, A, x, C) {
|
|
2159
|
+
var t = p.call(this, f, x, C) || this;
|
|
2160
|
+
return t.parser = A, t;
|
|
2161
|
+
}
|
|
2162
|
+
return y.prototype.parse = function(f) {
|
|
2163
|
+
var A = _(f, 2), x = A[0], C = A[1], t = this.lookup(C), u = this.parserFor(C);
|
|
2164
|
+
return !t || !u ? null : d(this.parser(x, t.symbol, u, t.args));
|
|
2165
|
+
}, y;
|
|
2166
|
+
})(a);
|
|
2167
|
+
return W.EnvironmentMap = v, W;
|
|
2168
|
+
}
|
|
2169
|
+
var q = {}, Ut;
|
|
2170
|
+
function ne() {
|
|
2171
|
+
if (Ut) return q;
|
|
2172
|
+
Ut = 1;
|
|
2173
|
+
var M = q && q.__extends || /* @__PURE__ */ (function() {
|
|
2174
|
+
var S = function(b, g) {
|
|
2175
|
+
return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, L) {
|
|
2176
|
+
T.__proto__ = L;
|
|
2177
|
+
} || function(T, L) {
|
|
2178
|
+
for (var V in L) Object.prototype.hasOwnProperty.call(L, V) && (T[V] = L[V]);
|
|
2179
|
+
}, S(b, g);
|
|
2180
|
+
};
|
|
2181
|
+
return function(b, g) {
|
|
2182
|
+
if (typeof g != "function" && g !== null)
|
|
2183
|
+
throw new TypeError("Class extends value " + String(g) + " is not a constructor or null");
|
|
2184
|
+
S(b, g);
|
|
2185
|
+
function T() {
|
|
2186
|
+
this.constructor = b;
|
|
2187
|
+
}
|
|
2188
|
+
b.prototype = g === null ? Object.create(g) : (T.prototype = g.prototype, new T());
|
|
2189
|
+
};
|
|
2190
|
+
})(), _ = q && q.__read || function(S, b) {
|
|
2191
|
+
var g = typeof Symbol == "function" && S[Symbol.iterator];
|
|
2192
|
+
if (!g) return S;
|
|
2193
|
+
var T = g.call(S), L, V = [], rt;
|
|
2194
|
+
try {
|
|
2195
|
+
for (; (b === void 0 || b-- > 0) && !(L = T.next()).done; ) V.push(L.value);
|
|
2196
|
+
} catch (lt) {
|
|
2197
|
+
rt = { error: lt };
|
|
2198
|
+
} finally {
|
|
2199
|
+
try {
|
|
2200
|
+
L && !L.done && (g = T.return) && g.call(T);
|
|
2201
|
+
} finally {
|
|
2202
|
+
if (rt) throw rt.error;
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
return V;
|
|
2206
|
+
}, X = q && q.__spreadArray || function(S, b, g) {
|
|
2207
|
+
if (g || arguments.length === 2) for (var T = 0, L = b.length, V; T < L; T++)
|
|
2208
|
+
(V || !(T in b)) && (V || (V = Array.prototype.slice.call(b, 0, T)), V[T] = b[T]);
|
|
2209
|
+
return S.concat(V || Array.prototype.slice.call(b));
|
|
2210
|
+
}, j = q && q.__importDefault || function(S) {
|
|
2211
|
+
return S && S.__esModule ? S : { default: S };
|
|
2212
|
+
};
|
|
2213
|
+
Object.defineProperty(q, "__esModule", { value: !0 }), q.EquationItem = q.EqnArrayItem = q.ArrayItem = q.DotsItem = q.NonscriptItem = q.NotItem = q.FnItem = q.MmlItem = q.CellItem = q.PositionItem = q.StyleItem = q.EndItem = q.BeginItem = q.RightItem = q.Middle = q.LeftItem = q.OverItem = q.SubsupItem = q.PrimeItem = q.CloseItem = q.OpenItem = q.StopItem = q.StartItem = void 0;
|
|
2214
|
+
var E = Pt(), m = Mt(), d = At(), c = j(St()), h = j(Ct()), e = j(pt()), r = ee(), n = (function(S) {
|
|
2215
|
+
M(b, S);
|
|
2216
|
+
function b(g, T) {
|
|
2217
|
+
var L = S.call(this, g) || this;
|
|
2218
|
+
return L.global = T, L;
|
|
2219
|
+
}
|
|
2220
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2221
|
+
get: function() {
|
|
2222
|
+
return "start";
|
|
2223
|
+
},
|
|
2224
|
+
enumerable: !1,
|
|
2225
|
+
configurable: !0
|
|
2226
|
+
}), Object.defineProperty(b.prototype, "isOpen", {
|
|
2227
|
+
get: function() {
|
|
2228
|
+
return !0;
|
|
2229
|
+
},
|
|
2230
|
+
enumerable: !1,
|
|
2231
|
+
configurable: !0
|
|
2232
|
+
}), b.prototype.checkItem = function(g) {
|
|
2233
|
+
if (g.isKind("stop")) {
|
|
2234
|
+
var T = this.toMml();
|
|
2235
|
+
return this.global.isInner || (T = this.factory.configuration.tags.finalize(T, this.env)), [[this.factory.create("mml", T)], !0];
|
|
2236
|
+
}
|
|
2237
|
+
return S.prototype.checkItem.call(this, g);
|
|
2238
|
+
}, b;
|
|
2239
|
+
})(r.BaseItem);
|
|
2240
|
+
q.StartItem = n;
|
|
2241
|
+
var a = (function(S) {
|
|
2242
|
+
M(b, S);
|
|
2243
|
+
function b() {
|
|
2244
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2245
|
+
}
|
|
2246
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2247
|
+
get: function() {
|
|
2248
|
+
return "stop";
|
|
2249
|
+
},
|
|
2250
|
+
enumerable: !1,
|
|
2251
|
+
configurable: !0
|
|
2252
|
+
}), Object.defineProperty(b.prototype, "isClose", {
|
|
2253
|
+
get: function() {
|
|
2254
|
+
return !0;
|
|
2255
|
+
},
|
|
2256
|
+
enumerable: !1,
|
|
2257
|
+
configurable: !0
|
|
2258
|
+
}), b;
|
|
2259
|
+
})(r.BaseItem);
|
|
2260
|
+
q.StopItem = a;
|
|
2261
|
+
var i = (function(S) {
|
|
2262
|
+
M(b, S);
|
|
2263
|
+
function b() {
|
|
2264
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2265
|
+
}
|
|
2266
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2267
|
+
get: function() {
|
|
2268
|
+
return "open";
|
|
2269
|
+
},
|
|
2270
|
+
enumerable: !1,
|
|
2271
|
+
configurable: !0
|
|
2272
|
+
}), Object.defineProperty(b.prototype, "isOpen", {
|
|
2273
|
+
get: function() {
|
|
2274
|
+
return !0;
|
|
2275
|
+
},
|
|
2276
|
+
enumerable: !1,
|
|
2277
|
+
configurable: !0
|
|
2278
|
+
}), b.prototype.checkItem = function(g) {
|
|
2279
|
+
if (g.isKind("close")) {
|
|
2280
|
+
var T = this.toMml(), L = this.create("node", "TeXAtom", [T]);
|
|
2281
|
+
return [[this.factory.create("mml", L)], !0];
|
|
2282
|
+
}
|
|
2283
|
+
return S.prototype.checkItem.call(this, g);
|
|
2284
|
+
}, b.errors = Object.assign(Object.create(r.BaseItem.errors), {
|
|
2285
|
+
stop: [
|
|
2286
|
+
"ExtraOpenMissingClose",
|
|
2287
|
+
"Extra open brace or missing close brace"
|
|
2288
|
+
]
|
|
2289
|
+
}), b;
|
|
2290
|
+
})(r.BaseItem);
|
|
2291
|
+
q.OpenItem = i;
|
|
2292
|
+
var v = (function(S) {
|
|
2293
|
+
M(b, S);
|
|
2294
|
+
function b() {
|
|
2295
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2296
|
+
}
|
|
2297
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2298
|
+
get: function() {
|
|
2299
|
+
return "close";
|
|
2300
|
+
},
|
|
2301
|
+
enumerable: !1,
|
|
2302
|
+
configurable: !0
|
|
2303
|
+
}), Object.defineProperty(b.prototype, "isClose", {
|
|
2304
|
+
get: function() {
|
|
2305
|
+
return !0;
|
|
2306
|
+
},
|
|
2307
|
+
enumerable: !1,
|
|
2308
|
+
configurable: !0
|
|
2309
|
+
}), b;
|
|
2310
|
+
})(r.BaseItem);
|
|
2311
|
+
q.CloseItem = v;
|
|
2312
|
+
var p = (function(S) {
|
|
2313
|
+
M(b, S);
|
|
2314
|
+
function b() {
|
|
2315
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2316
|
+
}
|
|
2317
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2318
|
+
get: function() {
|
|
2319
|
+
return "prime";
|
|
2320
|
+
},
|
|
2321
|
+
enumerable: !1,
|
|
2322
|
+
configurable: !0
|
|
2323
|
+
}), b.prototype.checkItem = function(g) {
|
|
2324
|
+
var T = _(this.Peek(2), 2), L = T[0], V = T[1];
|
|
2325
|
+
if (!e.default.isType(L, "msubsup") || e.default.isType(L, "msup")) {
|
|
2326
|
+
var rt = this.create("node", "msup", [L, V]);
|
|
2327
|
+
return [[rt, g], !0];
|
|
2328
|
+
}
|
|
2329
|
+
return e.default.setChild(L, L.sup, V), [[L, g], !0];
|
|
2330
|
+
}, b;
|
|
2331
|
+
})(r.BaseItem);
|
|
2332
|
+
q.PrimeItem = p;
|
|
2333
|
+
var y = (function(S) {
|
|
2334
|
+
M(b, S);
|
|
2335
|
+
function b() {
|
|
2336
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2337
|
+
}
|
|
2338
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2339
|
+
get: function() {
|
|
2340
|
+
return "subsup";
|
|
2341
|
+
},
|
|
2342
|
+
enumerable: !1,
|
|
2343
|
+
configurable: !0
|
|
2344
|
+
}), b.prototype.checkItem = function(g) {
|
|
2345
|
+
if (g.isKind("open") || g.isKind("left"))
|
|
2346
|
+
return r.BaseItem.success;
|
|
2347
|
+
var T = this.First, L = this.getProperty("position");
|
|
2348
|
+
if (g.isKind("mml")) {
|
|
2349
|
+
if (this.getProperty("primes"))
|
|
2350
|
+
if (L !== 2)
|
|
2351
|
+
e.default.setChild(T, 2, this.getProperty("primes"));
|
|
2352
|
+
else {
|
|
2353
|
+
e.default.setProperty(this.getProperty("primes"), "variantForm", !0);
|
|
2354
|
+
var V = this.create("node", "mrow", [this.getProperty("primes"), g.First]);
|
|
2355
|
+
g.First = V;
|
|
2356
|
+
}
|
|
2357
|
+
e.default.setChild(T, L, g.First), this.getProperty("movesupsub") != null && e.default.setProperty(T, "movesupsub", this.getProperty("movesupsub"));
|
|
2358
|
+
var rt = this.factory.create("mml", T);
|
|
2359
|
+
return [[rt], !0];
|
|
2360
|
+
}
|
|
2361
|
+
if (S.prototype.checkItem.call(this, g)[1]) {
|
|
2362
|
+
var lt = this.getErrors(["", "sub", "sup"][L]);
|
|
2363
|
+
throw new (c.default.bind.apply(c.default, X([void 0, lt[0], lt[1]], _(lt.splice(2)), !1)))();
|
|
2364
|
+
}
|
|
2365
|
+
return null;
|
|
2366
|
+
}, b.errors = Object.assign(Object.create(r.BaseItem.errors), {
|
|
2367
|
+
stop: [
|
|
2368
|
+
"MissingScript",
|
|
2369
|
+
"Missing superscript or subscript argument"
|
|
2370
|
+
],
|
|
2371
|
+
sup: [
|
|
2372
|
+
"MissingOpenForSup",
|
|
2373
|
+
"Missing open brace for superscript"
|
|
2374
|
+
],
|
|
2375
|
+
sub: [
|
|
2376
|
+
"MissingOpenForSub",
|
|
2377
|
+
"Missing open brace for subscript"
|
|
2378
|
+
]
|
|
2379
|
+
}), b;
|
|
2380
|
+
})(r.BaseItem);
|
|
2381
|
+
q.SubsupItem = y;
|
|
2382
|
+
var f = (function(S) {
|
|
2383
|
+
M(b, S);
|
|
2384
|
+
function b(g) {
|
|
2385
|
+
var T = S.call(this, g) || this;
|
|
2386
|
+
return T.setProperty("name", "\\over"), T;
|
|
2387
|
+
}
|
|
2388
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2389
|
+
get: function() {
|
|
2390
|
+
return "over";
|
|
2391
|
+
},
|
|
2392
|
+
enumerable: !1,
|
|
2393
|
+
configurable: !0
|
|
2394
|
+
}), Object.defineProperty(b.prototype, "isClose", {
|
|
2395
|
+
get: function() {
|
|
2396
|
+
return !0;
|
|
2397
|
+
},
|
|
2398
|
+
enumerable: !1,
|
|
2399
|
+
configurable: !0
|
|
2400
|
+
}), b.prototype.checkItem = function(g) {
|
|
2401
|
+
if (g.isKind("over"))
|
|
2402
|
+
throw new c.default("AmbiguousUseOf", "Ambiguous use of %1", g.getName());
|
|
2403
|
+
if (g.isClose) {
|
|
2404
|
+
var T = this.create("node", "mfrac", [this.getProperty("num"), this.toMml(!1)]);
|
|
2405
|
+
return this.getProperty("thickness") != null && e.default.setAttribute(T, "linethickness", this.getProperty("thickness")), (this.getProperty("open") || this.getProperty("close")) && (e.default.setProperty(T, "withDelims", !0), T = h.default.fixedFence(this.factory.configuration, this.getProperty("open"), T, this.getProperty("close"))), [[this.factory.create("mml", T), g], !0];
|
|
2406
|
+
}
|
|
2407
|
+
return S.prototype.checkItem.call(this, g);
|
|
2408
|
+
}, b.prototype.toString = function() {
|
|
2409
|
+
return "over[" + this.getProperty("num") + " / " + this.nodes.join("; ") + "]";
|
|
2410
|
+
}, b;
|
|
2411
|
+
})(r.BaseItem);
|
|
2412
|
+
q.OverItem = f;
|
|
2413
|
+
var A = (function(S) {
|
|
2414
|
+
M(b, S);
|
|
2415
|
+
function b(g, T) {
|
|
2416
|
+
var L = S.call(this, g) || this;
|
|
2417
|
+
return L.setProperty("delim", T), L;
|
|
2418
|
+
}
|
|
2419
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2420
|
+
get: function() {
|
|
2421
|
+
return "left";
|
|
2422
|
+
},
|
|
2423
|
+
enumerable: !1,
|
|
2424
|
+
configurable: !0
|
|
2425
|
+
}), Object.defineProperty(b.prototype, "isOpen", {
|
|
2426
|
+
get: function() {
|
|
2427
|
+
return !0;
|
|
2428
|
+
},
|
|
2429
|
+
enumerable: !1,
|
|
2430
|
+
configurable: !0
|
|
2431
|
+
}), b.prototype.checkItem = function(g) {
|
|
2432
|
+
if (g.isKind("right"))
|
|
2433
|
+
return [[this.factory.create("mml", h.default.fenced(this.factory.configuration, this.getProperty("delim"), this.toMml(), g.getProperty("delim"), "", g.getProperty("color")))], !0];
|
|
2434
|
+
if (g.isKind("middle")) {
|
|
2435
|
+
var T = { stretchy: !0 };
|
|
2436
|
+
return g.getProperty("color") && (T.mathcolor = g.getProperty("color")), this.Push(this.create("node", "TeXAtom", [], { texClass: d.TEXCLASS.CLOSE }), this.create("token", "mo", T, g.getProperty("delim")), this.create("node", "TeXAtom", [], { texClass: d.TEXCLASS.OPEN })), this.env = {}, [[this], !0];
|
|
2437
|
+
}
|
|
2438
|
+
return S.prototype.checkItem.call(this, g);
|
|
2439
|
+
}, b.errors = Object.assign(Object.create(r.BaseItem.errors), {
|
|
2440
|
+
stop: [
|
|
2441
|
+
"ExtraLeftMissingRight",
|
|
2442
|
+
"Extra \\left or missing \\right"
|
|
2443
|
+
]
|
|
2444
|
+
}), b;
|
|
2445
|
+
})(r.BaseItem);
|
|
2446
|
+
q.LeftItem = A;
|
|
2447
|
+
var x = (function(S) {
|
|
2448
|
+
M(b, S);
|
|
2449
|
+
function b(g, T, L) {
|
|
2450
|
+
var V = S.call(this, g) || this;
|
|
2451
|
+
return V.setProperty("delim", T), L && V.setProperty("color", L), V;
|
|
2452
|
+
}
|
|
2453
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2454
|
+
get: function() {
|
|
2455
|
+
return "middle";
|
|
2456
|
+
},
|
|
2457
|
+
enumerable: !1,
|
|
2458
|
+
configurable: !0
|
|
2459
|
+
}), Object.defineProperty(b.prototype, "isClose", {
|
|
2460
|
+
get: function() {
|
|
2461
|
+
return !0;
|
|
2462
|
+
},
|
|
2463
|
+
enumerable: !1,
|
|
2464
|
+
configurable: !0
|
|
2465
|
+
}), b;
|
|
2466
|
+
})(r.BaseItem);
|
|
2467
|
+
q.Middle = x;
|
|
2468
|
+
var C = (function(S) {
|
|
2469
|
+
M(b, S);
|
|
2470
|
+
function b(g, T, L) {
|
|
2471
|
+
var V = S.call(this, g) || this;
|
|
2472
|
+
return V.setProperty("delim", T), L && V.setProperty("color", L), V;
|
|
2473
|
+
}
|
|
2474
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2475
|
+
get: function() {
|
|
2476
|
+
return "right";
|
|
2477
|
+
},
|
|
2478
|
+
enumerable: !1,
|
|
2479
|
+
configurable: !0
|
|
2480
|
+
}), Object.defineProperty(b.prototype, "isClose", {
|
|
2481
|
+
get: function() {
|
|
2482
|
+
return !0;
|
|
2483
|
+
},
|
|
2484
|
+
enumerable: !1,
|
|
2485
|
+
configurable: !0
|
|
2486
|
+
}), b;
|
|
2487
|
+
})(r.BaseItem);
|
|
2488
|
+
q.RightItem = C;
|
|
2489
|
+
var t = (function(S) {
|
|
2490
|
+
M(b, S);
|
|
2491
|
+
function b() {
|
|
2492
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2493
|
+
}
|
|
2494
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2495
|
+
get: function() {
|
|
2496
|
+
return "begin";
|
|
2497
|
+
},
|
|
2498
|
+
enumerable: !1,
|
|
2499
|
+
configurable: !0
|
|
2500
|
+
}), Object.defineProperty(b.prototype, "isOpen", {
|
|
2501
|
+
get: function() {
|
|
2502
|
+
return !0;
|
|
2503
|
+
},
|
|
2504
|
+
enumerable: !1,
|
|
2505
|
+
configurable: !0
|
|
2506
|
+
}), b.prototype.checkItem = function(g) {
|
|
2507
|
+
if (g.isKind("end")) {
|
|
2508
|
+
if (g.getName() !== this.getName())
|
|
2509
|
+
throw new c.default("EnvBadEnd", "\\begin{%1} ended with \\end{%2}", this.getName(), g.getName());
|
|
2510
|
+
return this.getProperty("end") ? r.BaseItem.fail : [[this.factory.create("mml", this.toMml())], !0];
|
|
2511
|
+
}
|
|
2512
|
+
if (g.isKind("stop"))
|
|
2513
|
+
throw new c.default("EnvMissingEnd", "Missing \\end{%1}", this.getName());
|
|
2514
|
+
return S.prototype.checkItem.call(this, g);
|
|
2515
|
+
}, b;
|
|
2516
|
+
})(r.BaseItem);
|
|
2517
|
+
q.BeginItem = t;
|
|
2518
|
+
var u = (function(S) {
|
|
2519
|
+
M(b, S);
|
|
2520
|
+
function b() {
|
|
2521
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2522
|
+
}
|
|
2523
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2524
|
+
get: function() {
|
|
2525
|
+
return "end";
|
|
2526
|
+
},
|
|
2527
|
+
enumerable: !1,
|
|
2528
|
+
configurable: !0
|
|
2529
|
+
}), Object.defineProperty(b.prototype, "isClose", {
|
|
2530
|
+
get: function() {
|
|
2531
|
+
return !0;
|
|
2532
|
+
},
|
|
2533
|
+
enumerable: !1,
|
|
2534
|
+
configurable: !0
|
|
2535
|
+
}), b;
|
|
2536
|
+
})(r.BaseItem);
|
|
2537
|
+
q.EndItem = u;
|
|
2538
|
+
var o = (function(S) {
|
|
2539
|
+
M(b, S);
|
|
2540
|
+
function b() {
|
|
2541
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2542
|
+
}
|
|
2543
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2544
|
+
get: function() {
|
|
2545
|
+
return "style";
|
|
2546
|
+
},
|
|
2547
|
+
enumerable: !1,
|
|
2548
|
+
configurable: !0
|
|
2549
|
+
}), b.prototype.checkItem = function(g) {
|
|
2550
|
+
if (!g.isClose)
|
|
2551
|
+
return S.prototype.checkItem.call(this, g);
|
|
2552
|
+
var T = this.create("node", "mstyle", this.nodes, this.getProperty("styles"));
|
|
2553
|
+
return [[this.factory.create("mml", T), g], !0];
|
|
2554
|
+
}, b;
|
|
2555
|
+
})(r.BaseItem);
|
|
2556
|
+
q.StyleItem = o;
|
|
2557
|
+
var s = (function(S) {
|
|
2558
|
+
M(b, S);
|
|
2559
|
+
function b() {
|
|
2560
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2561
|
+
}
|
|
2562
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2563
|
+
get: function() {
|
|
2564
|
+
return "position";
|
|
2565
|
+
},
|
|
2566
|
+
enumerable: !1,
|
|
2567
|
+
configurable: !0
|
|
2568
|
+
}), b.prototype.checkItem = function(g) {
|
|
2569
|
+
if (g.isClose)
|
|
2570
|
+
throw new c.default("MissingBoxFor", "Missing box for %1", this.getName());
|
|
2571
|
+
if (g.isFinal) {
|
|
2572
|
+
var T = g.toMml();
|
|
2573
|
+
switch (this.getProperty("move")) {
|
|
2574
|
+
case "vertical":
|
|
2575
|
+
return T = this.create("node", "mpadded", [T], {
|
|
2576
|
+
height: this.getProperty("dh"),
|
|
2577
|
+
depth: this.getProperty("dd"),
|
|
2578
|
+
voffset: this.getProperty("dh")
|
|
2579
|
+
}), [[this.factory.create("mml", T)], !0];
|
|
2580
|
+
case "horizontal":
|
|
2581
|
+
return [[
|
|
2582
|
+
this.factory.create("mml", this.getProperty("left")),
|
|
2583
|
+
g,
|
|
2584
|
+
this.factory.create("mml", this.getProperty("right"))
|
|
2585
|
+
], !0];
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
return S.prototype.checkItem.call(this, g);
|
|
2589
|
+
}, b;
|
|
2590
|
+
})(r.BaseItem);
|
|
2591
|
+
q.PositionItem = s;
|
|
2592
|
+
var l = (function(S) {
|
|
2593
|
+
M(b, S);
|
|
2594
|
+
function b() {
|
|
2595
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2596
|
+
}
|
|
2597
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2598
|
+
get: function() {
|
|
2599
|
+
return "cell";
|
|
2600
|
+
},
|
|
2601
|
+
enumerable: !1,
|
|
2602
|
+
configurable: !0
|
|
2603
|
+
}), Object.defineProperty(b.prototype, "isClose", {
|
|
2604
|
+
get: function() {
|
|
2605
|
+
return !0;
|
|
2606
|
+
},
|
|
2607
|
+
enumerable: !1,
|
|
2608
|
+
configurable: !0
|
|
2609
|
+
}), b;
|
|
2610
|
+
})(r.BaseItem);
|
|
2611
|
+
q.CellItem = l;
|
|
2612
|
+
var O = (function(S) {
|
|
2613
|
+
M(b, S);
|
|
2614
|
+
function b() {
|
|
2615
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2616
|
+
}
|
|
2617
|
+
return Object.defineProperty(b.prototype, "isFinal", {
|
|
2618
|
+
get: function() {
|
|
2619
|
+
return !0;
|
|
2620
|
+
},
|
|
2621
|
+
enumerable: !1,
|
|
2622
|
+
configurable: !0
|
|
2623
|
+
}), Object.defineProperty(b.prototype, "kind", {
|
|
2624
|
+
get: function() {
|
|
2625
|
+
return "mml";
|
|
2626
|
+
},
|
|
2627
|
+
enumerable: !1,
|
|
2628
|
+
configurable: !0
|
|
2629
|
+
}), b;
|
|
2630
|
+
})(r.BaseItem);
|
|
2631
|
+
q.MmlItem = O;
|
|
2632
|
+
var k = (function(S) {
|
|
2633
|
+
M(b, S);
|
|
2634
|
+
function b() {
|
|
2635
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2636
|
+
}
|
|
2637
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2638
|
+
get: function() {
|
|
2639
|
+
return "fn";
|
|
2640
|
+
},
|
|
2641
|
+
enumerable: !1,
|
|
2642
|
+
configurable: !0
|
|
2643
|
+
}), b.prototype.checkItem = function(g) {
|
|
2644
|
+
var T = this.First;
|
|
2645
|
+
if (T) {
|
|
2646
|
+
if (g.isOpen)
|
|
2647
|
+
return r.BaseItem.success;
|
|
2648
|
+
if (!g.isKind("fn")) {
|
|
2649
|
+
var L = g.First;
|
|
2650
|
+
if (!g.isKind("mml") || !L)
|
|
2651
|
+
return [[T, g], !0];
|
|
2652
|
+
if (e.default.isType(L, "mstyle") && L.childNodes.length && e.default.isType(L.childNodes[0].childNodes[0], "mspace") || e.default.isType(L, "mspace"))
|
|
2653
|
+
return [[T, g], !0];
|
|
2654
|
+
e.default.isEmbellished(L) && (L = e.default.getCoreMO(L));
|
|
2655
|
+
var V = e.default.getForm(L);
|
|
2656
|
+
if (V != null && [0, 0, 1, 1, 0, 1, 1, 0, 0, 0][V[2]])
|
|
2657
|
+
return [[T, g], !0];
|
|
2658
|
+
}
|
|
2659
|
+
var rt = this.create("token", "mo", { texClass: d.TEXCLASS.NONE }, m.entities.ApplyFunction);
|
|
2660
|
+
return [[T, rt, g], !0];
|
|
2661
|
+
}
|
|
2662
|
+
return S.prototype.checkItem.apply(this, arguments);
|
|
2663
|
+
}, b;
|
|
2664
|
+
})(r.BaseItem);
|
|
2665
|
+
q.FnItem = k;
|
|
2666
|
+
var N = (function(S) {
|
|
2667
|
+
M(b, S);
|
|
2668
|
+
function b() {
|
|
2669
|
+
var g = S !== null && S.apply(this, arguments) || this;
|
|
2670
|
+
return g.remap = E.MapHandler.getMap("not_remap"), g;
|
|
2671
|
+
}
|
|
2672
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2673
|
+
get: function() {
|
|
2674
|
+
return "not";
|
|
2675
|
+
},
|
|
2676
|
+
enumerable: !1,
|
|
2677
|
+
configurable: !0
|
|
2678
|
+
}), b.prototype.checkItem = function(g) {
|
|
2679
|
+
var T, L, V;
|
|
2680
|
+
if (g.isKind("open") || g.isKind("left"))
|
|
2681
|
+
return r.BaseItem.success;
|
|
2682
|
+
if (g.isKind("mml") && (e.default.isType(g.First, "mo") || e.default.isType(g.First, "mi") || e.default.isType(g.First, "mtext")) && (T = g.First, L = e.default.getText(T), L.length === 1 && !e.default.getProperty(T, "movesupsub") && e.default.getChildren(T).length === 1))
|
|
2683
|
+
return this.remap.contains(L) ? (V = this.create("text", this.remap.lookup(L).char), e.default.setChild(T, 0, V)) : (V = this.create("text", "̸"), e.default.appendChildren(T, [V])), [[g], !0];
|
|
2684
|
+
V = this.create("text", "⧸");
|
|
2685
|
+
var rt = this.create("node", "mtext", [], {}, V), lt = this.create("node", "mpadded", [rt], { width: 0 });
|
|
2686
|
+
return T = this.create("node", "TeXAtom", [lt], { texClass: d.TEXCLASS.REL }), [[T, g], !0];
|
|
2687
|
+
}, b;
|
|
2688
|
+
})(r.BaseItem);
|
|
2689
|
+
q.NotItem = N;
|
|
2690
|
+
var I = (function(S) {
|
|
2691
|
+
M(b, S);
|
|
2692
|
+
function b() {
|
|
2693
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2694
|
+
}
|
|
2695
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2696
|
+
get: function() {
|
|
2697
|
+
return "nonscript";
|
|
2698
|
+
},
|
|
2699
|
+
enumerable: !1,
|
|
2700
|
+
configurable: !0
|
|
2701
|
+
}), b.prototype.checkItem = function(g) {
|
|
2702
|
+
if (g.isKind("mml") && g.Size() === 1) {
|
|
2703
|
+
var T = g.First;
|
|
2704
|
+
if (T.isKind("mstyle") && T.notParent && (T = e.default.getChildren(e.default.getChildren(T)[0])[0]), T.isKind("mspace")) {
|
|
2705
|
+
if (T !== g.First) {
|
|
2706
|
+
var L = this.create("node", "mrow", [g.Pop()]);
|
|
2707
|
+
g.Push(L);
|
|
2708
|
+
}
|
|
2709
|
+
this.factory.configuration.addNode("nonscript", g.First);
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
return [[g], !0];
|
|
2713
|
+
}, b;
|
|
2714
|
+
})(r.BaseItem);
|
|
2715
|
+
q.NonscriptItem = I;
|
|
2716
|
+
var F = (function(S) {
|
|
2717
|
+
M(b, S);
|
|
2718
|
+
function b() {
|
|
2719
|
+
return S !== null && S.apply(this, arguments) || this;
|
|
2720
|
+
}
|
|
2721
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2722
|
+
get: function() {
|
|
2723
|
+
return "dots";
|
|
2724
|
+
},
|
|
2725
|
+
enumerable: !1,
|
|
2726
|
+
configurable: !0
|
|
2727
|
+
}), b.prototype.checkItem = function(g) {
|
|
2728
|
+
if (g.isKind("open") || g.isKind("left"))
|
|
2729
|
+
return r.BaseItem.success;
|
|
2730
|
+
var T = this.getProperty("ldots"), L = g.First;
|
|
2731
|
+
if (g.isKind("mml") && e.default.isEmbellished(L)) {
|
|
2732
|
+
var V = e.default.getTexClass(e.default.getCoreMO(L));
|
|
2733
|
+
(V === d.TEXCLASS.BIN || V === d.TEXCLASS.REL) && (T = this.getProperty("cdots"));
|
|
2734
|
+
}
|
|
2735
|
+
return [[T, g], !0];
|
|
2736
|
+
}, b;
|
|
2737
|
+
})(r.BaseItem);
|
|
2738
|
+
q.DotsItem = F;
|
|
2739
|
+
var R = (function(S) {
|
|
2740
|
+
M(b, S);
|
|
2741
|
+
function b() {
|
|
2742
|
+
var g = S !== null && S.apply(this, arguments) || this;
|
|
2743
|
+
return g.table = [], g.row = [], g.frame = [], g.hfill = [], g.arraydef = {}, g.dashed = !1, g;
|
|
2744
|
+
}
|
|
2745
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2746
|
+
get: function() {
|
|
2747
|
+
return "array";
|
|
2748
|
+
},
|
|
2749
|
+
enumerable: !1,
|
|
2750
|
+
configurable: !0
|
|
2751
|
+
}), Object.defineProperty(b.prototype, "isOpen", {
|
|
2752
|
+
get: function() {
|
|
2753
|
+
return !0;
|
|
2754
|
+
},
|
|
2755
|
+
enumerable: !1,
|
|
2756
|
+
configurable: !0
|
|
2757
|
+
}), Object.defineProperty(b.prototype, "copyEnv", {
|
|
2758
|
+
get: function() {
|
|
2759
|
+
return !1;
|
|
2760
|
+
},
|
|
2761
|
+
enumerable: !1,
|
|
2762
|
+
configurable: !0
|
|
2763
|
+
}), b.prototype.checkItem = function(g) {
|
|
2764
|
+
if (g.isClose && !g.isKind("over")) {
|
|
2765
|
+
if (g.getProperty("isEntry"))
|
|
2766
|
+
return this.EndEntry(), this.clearEnv(), r.BaseItem.fail;
|
|
2767
|
+
if (g.getProperty("isCR"))
|
|
2768
|
+
return this.EndEntry(), this.EndRow(), this.clearEnv(), r.BaseItem.fail;
|
|
2769
|
+
this.EndTable(), this.clearEnv();
|
|
2770
|
+
var T = this.factory.create("mml", this.createMml());
|
|
2771
|
+
if (this.getProperty("requireClose")) {
|
|
2772
|
+
if (g.isKind("close"))
|
|
2773
|
+
return [[T], !0];
|
|
2774
|
+
throw new c.default("MissingCloseBrace", "Missing close brace");
|
|
2775
|
+
}
|
|
2776
|
+
return [[T, g], !0];
|
|
2777
|
+
}
|
|
2778
|
+
return S.prototype.checkItem.call(this, g);
|
|
2779
|
+
}, b.prototype.createMml = function() {
|
|
2780
|
+
var g = this.arraydef.scriptlevel;
|
|
2781
|
+
delete this.arraydef.scriptlevel;
|
|
2782
|
+
var T = this.create("node", "mtable", this.table, this.arraydef);
|
|
2783
|
+
return g && T.setProperty("scriptlevel", g), this.frame.length === 4 ? e.default.setAttribute(T, "frame", this.dashed ? "dashed" : "solid") : this.frame.length && (this.arraydef.rowlines && (this.arraydef.rowlines = this.arraydef.rowlines.replace(/none( none)+$/, "none")), e.default.setAttribute(T, "frame", ""), T = this.create("node", "menclose", [T], { notation: this.frame.join(" ") }), ((this.arraydef.columnlines || "none") !== "none" || (this.arraydef.rowlines || "none") !== "none") && e.default.setAttribute(T, "data-padding", 0)), (this.getProperty("open") || this.getProperty("close")) && (T = h.default.fenced(this.factory.configuration, this.getProperty("open"), T, this.getProperty("close"))), T;
|
|
2784
|
+
}, b.prototype.EndEntry = function() {
|
|
2785
|
+
var g = this.create("node", "mtd", this.nodes);
|
|
2786
|
+
this.hfill.length && (this.hfill[0] === 0 && e.default.setAttribute(g, "columnalign", "right"), this.hfill[this.hfill.length - 1] === this.Size() && e.default.setAttribute(g, "columnalign", e.default.getAttribute(g, "columnalign") ? "center" : "left")), this.row.push(g), this.Clear(), this.hfill = [];
|
|
2787
|
+
}, b.prototype.EndRow = function() {
|
|
2788
|
+
var g;
|
|
2789
|
+
this.getProperty("isNumbered") && this.row.length === 3 ? (this.row.unshift(this.row.pop()), g = this.create("node", "mlabeledtr", this.row)) : g = this.create("node", "mtr", this.row), this.table.push(g), this.row = [];
|
|
2790
|
+
}, b.prototype.EndTable = function() {
|
|
2791
|
+
(this.Size() || this.row.length) && (this.EndEntry(), this.EndRow()), this.checkLines();
|
|
2792
|
+
}, b.prototype.checkLines = function() {
|
|
2793
|
+
if (this.arraydef.rowlines) {
|
|
2794
|
+
var g = this.arraydef.rowlines.split(/ /);
|
|
2795
|
+
g.length === this.table.length ? (this.frame.push("bottom"), g.pop(), this.arraydef.rowlines = g.join(" ")) : g.length < this.table.length - 1 && (this.arraydef.rowlines += " none");
|
|
2796
|
+
}
|
|
2797
|
+
if (this.getProperty("rowspacing")) {
|
|
2798
|
+
for (var T = this.arraydef.rowspacing.split(/ /); T.length < this.table.length; )
|
|
2799
|
+
T.push(this.getProperty("rowspacing") + "em");
|
|
2800
|
+
this.arraydef.rowspacing = T.join(" ");
|
|
2801
|
+
}
|
|
2802
|
+
}, b.prototype.addRowSpacing = function(g) {
|
|
2803
|
+
if (this.arraydef.rowspacing) {
|
|
2804
|
+
var T = this.arraydef.rowspacing.split(/ /);
|
|
2805
|
+
if (!this.getProperty("rowspacing")) {
|
|
2806
|
+
var L = h.default.dimen2em(T[0]);
|
|
2807
|
+
this.setProperty("rowspacing", L);
|
|
2808
|
+
}
|
|
2809
|
+
for (var V = this.getProperty("rowspacing"); T.length < this.table.length; )
|
|
2810
|
+
T.push(h.default.Em(V));
|
|
2811
|
+
T[this.table.length - 1] = h.default.Em(Math.max(0, V + h.default.dimen2em(g))), this.arraydef.rowspacing = T.join(" ");
|
|
2812
|
+
}
|
|
2813
|
+
}, b;
|
|
2814
|
+
})(r.BaseItem);
|
|
2815
|
+
q.ArrayItem = R;
|
|
2816
|
+
var $ = (function(S) {
|
|
2817
|
+
M(b, S);
|
|
2818
|
+
function b(g) {
|
|
2819
|
+
for (var T = [], L = 1; L < arguments.length; L++)
|
|
2820
|
+
T[L - 1] = arguments[L];
|
|
2821
|
+
var V = S.call(this, g) || this;
|
|
2822
|
+
return V.maxrow = 0, V.factory.configuration.tags.start(T[0], T[2], T[1]), V;
|
|
2823
|
+
}
|
|
2824
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2825
|
+
get: function() {
|
|
2826
|
+
return "eqnarray";
|
|
2827
|
+
},
|
|
2828
|
+
enumerable: !1,
|
|
2829
|
+
configurable: !0
|
|
2830
|
+
}), b.prototype.EndEntry = function() {
|
|
2831
|
+
this.row.length && h.default.fixInitialMO(this.factory.configuration, this.nodes);
|
|
2832
|
+
var g = this.create("node", "mtd", this.nodes);
|
|
2833
|
+
this.row.push(g), this.Clear();
|
|
2834
|
+
}, b.prototype.EndRow = function() {
|
|
2835
|
+
this.row.length > this.maxrow && (this.maxrow = this.row.length);
|
|
2836
|
+
var g = "mtr", T = this.factory.configuration.tags.getTag();
|
|
2837
|
+
T && (this.row = [T].concat(this.row), g = "mlabeledtr"), this.factory.configuration.tags.clearTag();
|
|
2838
|
+
var L = this.create("node", g, this.row);
|
|
2839
|
+
this.table.push(L), this.row = [];
|
|
2840
|
+
}, b.prototype.EndTable = function() {
|
|
2841
|
+
S.prototype.EndTable.call(this), this.factory.configuration.tags.end(), this.extendArray("columnalign", this.maxrow), this.extendArray("columnwidth", this.maxrow), this.extendArray("columnspacing", this.maxrow - 1);
|
|
2842
|
+
}, b.prototype.extendArray = function(g, T) {
|
|
2843
|
+
if (this.arraydef[g]) {
|
|
2844
|
+
var L = this.arraydef[g].split(/ /), V = X([], _(L), !1);
|
|
2845
|
+
if (V.length > 1) {
|
|
2846
|
+
for (; V.length < T; )
|
|
2847
|
+
V.push.apply(V, X([], _(L), !1));
|
|
2848
|
+
this.arraydef[g] = V.slice(0, T).join(" ");
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
}, b;
|
|
2852
|
+
})(R);
|
|
2853
|
+
q.EqnArrayItem = $;
|
|
2854
|
+
var J = (function(S) {
|
|
2855
|
+
M(b, S);
|
|
2856
|
+
function b(g) {
|
|
2857
|
+
for (var T = [], L = 1; L < arguments.length; L++)
|
|
2858
|
+
T[L - 1] = arguments[L];
|
|
2859
|
+
var V = S.call(this, g) || this;
|
|
2860
|
+
return V.factory.configuration.tags.start("equation", !0, T[0]), V;
|
|
2861
|
+
}
|
|
2862
|
+
return Object.defineProperty(b.prototype, "kind", {
|
|
2863
|
+
get: function() {
|
|
2864
|
+
return "equation";
|
|
2865
|
+
},
|
|
2866
|
+
enumerable: !1,
|
|
2867
|
+
configurable: !0
|
|
2868
|
+
}), Object.defineProperty(b.prototype, "isOpen", {
|
|
2869
|
+
get: function() {
|
|
2870
|
+
return !0;
|
|
2871
|
+
},
|
|
2872
|
+
enumerable: !1,
|
|
2873
|
+
configurable: !0
|
|
2874
|
+
}), b.prototype.checkItem = function(g) {
|
|
2875
|
+
if (g.isKind("end")) {
|
|
2876
|
+
var T = this.toMml(), L = this.factory.configuration.tags.getTag();
|
|
2877
|
+
return this.factory.configuration.tags.end(), [[L ? this.factory.configuration.tags.enTag(T, L) : T, g], !0];
|
|
2878
|
+
}
|
|
2879
|
+
if (g.isKind("stop"))
|
|
2880
|
+
throw new c.default("EnvMissingEnd", "Missing \\end{%1}", this.getName());
|
|
2881
|
+
return S.prototype.checkItem.call(this, g);
|
|
2882
|
+
}, b;
|
|
2883
|
+
})(r.BaseItem);
|
|
2884
|
+
return q.EquationItem = J, q;
|
|
2885
|
+
}
|
|
2886
|
+
var st = {}, Ot = {}, zt;
|
|
2887
|
+
function It() {
|
|
2888
|
+
return zt || (zt = 1, (function(M) {
|
|
2889
|
+
Object.defineProperty(M, "__esModule", { value: !0 }), M.TexConstant = void 0, (function(_) {
|
|
2890
|
+
_.Variant = {
|
|
2891
|
+
NORMAL: "normal",
|
|
2892
|
+
BOLD: "bold",
|
|
2893
|
+
ITALIC: "italic",
|
|
2894
|
+
BOLDITALIC: "bold-italic",
|
|
2895
|
+
DOUBLESTRUCK: "double-struck",
|
|
2896
|
+
FRAKTUR: "fraktur",
|
|
2897
|
+
BOLDFRAKTUR: "bold-fraktur",
|
|
2898
|
+
SCRIPT: "script",
|
|
2899
|
+
BOLDSCRIPT: "bold-script",
|
|
2900
|
+
SANSSERIF: "sans-serif",
|
|
2901
|
+
BOLDSANSSERIF: "bold-sans-serif",
|
|
2902
|
+
SANSSERIFITALIC: "sans-serif-italic",
|
|
2903
|
+
SANSSERIFBOLDITALIC: "sans-serif-bold-italic",
|
|
2904
|
+
MONOSPACE: "monospace",
|
|
2905
|
+
INITIAL: "inital",
|
|
2906
|
+
TAILED: "tailed",
|
|
2907
|
+
LOOPED: "looped",
|
|
2908
|
+
STRETCHED: "stretched",
|
|
2909
|
+
CALLIGRAPHIC: "-tex-calligraphic",
|
|
2910
|
+
BOLDCALLIGRAPHIC: "-tex-bold-calligraphic",
|
|
2911
|
+
OLDSTYLE: "-tex-oldstyle",
|
|
2912
|
+
BOLDOLDSTYLE: "-tex-bold-oldstyle",
|
|
2913
|
+
MATHITALIC: "-tex-mathit"
|
|
2914
|
+
}, _.Form = {
|
|
2915
|
+
PREFIX: "prefix",
|
|
2916
|
+
INFIX: "infix",
|
|
2917
|
+
POSTFIX: "postfix"
|
|
2918
|
+
}, _.LineBreak = {
|
|
2919
|
+
AUTO: "auto",
|
|
2920
|
+
NEWLINE: "newline",
|
|
2921
|
+
NOBREAK: "nobreak",
|
|
2922
|
+
GOODBREAK: "goodbreak",
|
|
2923
|
+
BADBREAK: "badbreak"
|
|
2924
|
+
}, _.LineBreakStyle = {
|
|
2925
|
+
BEFORE: "before",
|
|
2926
|
+
AFTER: "after",
|
|
2927
|
+
DUPLICATE: "duplicate",
|
|
2928
|
+
INFIXLINBREAKSTYLE: "infixlinebreakstyle"
|
|
2929
|
+
}, _.IndentAlign = {
|
|
2930
|
+
LEFT: "left",
|
|
2931
|
+
CENTER: "center",
|
|
2932
|
+
RIGHT: "right",
|
|
2933
|
+
AUTO: "auto",
|
|
2934
|
+
ID: "id",
|
|
2935
|
+
INDENTALIGN: "indentalign"
|
|
2936
|
+
}, _.IndentShift = {
|
|
2937
|
+
INDENTSHIFT: "indentshift"
|
|
2938
|
+
}, _.LineThickness = {
|
|
2939
|
+
THIN: "thin",
|
|
2940
|
+
MEDIUM: "medium",
|
|
2941
|
+
THICK: "thick"
|
|
2942
|
+
}, _.Notation = {
|
|
2943
|
+
LONGDIV: "longdiv",
|
|
2944
|
+
ACTUARIAL: "actuarial",
|
|
2945
|
+
PHASORANGLE: "phasorangle",
|
|
2946
|
+
RADICAL: "radical",
|
|
2947
|
+
BOX: "box",
|
|
2948
|
+
ROUNDEDBOX: "roundedbox",
|
|
2949
|
+
CIRCLE: "circle",
|
|
2950
|
+
LEFT: "left",
|
|
2951
|
+
RIGHT: "right",
|
|
2952
|
+
TOP: "top",
|
|
2953
|
+
BOTTOM: "bottom",
|
|
2954
|
+
UPDIAGONALSTRIKE: "updiagonalstrike",
|
|
2955
|
+
DOWNDIAGONALSTRIKE: "downdiagonalstrike",
|
|
2956
|
+
VERTICALSTRIKE: "verticalstrike",
|
|
2957
|
+
HORIZONTALSTRIKE: "horizontalstrike",
|
|
2958
|
+
NORTHEASTARROW: "northeastarrow",
|
|
2959
|
+
MADRUWB: "madruwb",
|
|
2960
|
+
UPDIAGONALARROW: "updiagonalarrow"
|
|
2961
|
+
}, _.Align = {
|
|
2962
|
+
TOP: "top",
|
|
2963
|
+
BOTTOM: "bottom",
|
|
2964
|
+
CENTER: "center",
|
|
2965
|
+
BASELINE: "baseline",
|
|
2966
|
+
AXIS: "axis",
|
|
2967
|
+
LEFT: "left",
|
|
2968
|
+
RIGHT: "right"
|
|
2969
|
+
}, _.Lines = {
|
|
2970
|
+
NONE: "none",
|
|
2971
|
+
SOLID: "solid",
|
|
2972
|
+
DASHED: "dashed"
|
|
2973
|
+
}, _.Side = {
|
|
2974
|
+
LEFT: "left",
|
|
2975
|
+
RIGHT: "right",
|
|
2976
|
+
LEFTOVERLAP: "leftoverlap",
|
|
2977
|
+
RIGHTOVERLAP: "rightoverlap"
|
|
2978
|
+
}, _.Width = {
|
|
2979
|
+
AUTO: "auto",
|
|
2980
|
+
FIT: "fit"
|
|
2981
|
+
}, _.Actiontype = {
|
|
2982
|
+
TOGGLE: "toggle",
|
|
2983
|
+
STATUSLINE: "statusline",
|
|
2984
|
+
TOOLTIP: "tooltip",
|
|
2985
|
+
INPUT: "input"
|
|
2986
|
+
}, _.Overflow = {
|
|
2987
|
+
LINBREAK: "linebreak",
|
|
2988
|
+
SCROLL: "scroll",
|
|
2989
|
+
ELIDE: "elide",
|
|
2990
|
+
TRUNCATE: "truncate",
|
|
2991
|
+
SCALE: "scale"
|
|
2992
|
+
}, _.Unit = {
|
|
2993
|
+
EM: "em",
|
|
2994
|
+
EX: "ex",
|
|
2995
|
+
PX: "px",
|
|
2996
|
+
IN: "in",
|
|
2997
|
+
CM: "cm",
|
|
2998
|
+
MM: "mm",
|
|
2999
|
+
PT: "pt",
|
|
3000
|
+
PC: "pc"
|
|
3001
|
+
};
|
|
3002
|
+
})(M.TexConstant || (M.TexConstant = {}));
|
|
3003
|
+
})(Ot)), Ot;
|
|
3004
|
+
}
|
|
3005
|
+
var et = {}, $t;
|
|
3006
|
+
function pe() {
|
|
3007
|
+
if ($t) return et;
|
|
3008
|
+
$t = 1;
|
|
3009
|
+
var M = et && et.__assign || function() {
|
|
3010
|
+
return M = Object.assign || function(t) {
|
|
3011
|
+
for (var u, o = 1, s = arguments.length; o < s; o++) {
|
|
3012
|
+
u = arguments[o];
|
|
3013
|
+
for (var l in u) Object.prototype.hasOwnProperty.call(u, l) && (t[l] = u[l]);
|
|
3014
|
+
}
|
|
3015
|
+
return t;
|
|
3016
|
+
}, M.apply(this, arguments);
|
|
3017
|
+
}, _ = et && et.__createBinding || (Object.create ? (function(t, u, o, s) {
|
|
3018
|
+
s === void 0 && (s = o);
|
|
3019
|
+
var l = Object.getOwnPropertyDescriptor(u, o);
|
|
3020
|
+
(!l || ("get" in l ? !u.__esModule : l.writable || l.configurable)) && (l = { enumerable: !0, get: function() {
|
|
3021
|
+
return u[o];
|
|
3022
|
+
} }), Object.defineProperty(t, s, l);
|
|
3023
|
+
}) : (function(t, u, o, s) {
|
|
3024
|
+
s === void 0 && (s = o), t[s] = u[o];
|
|
3025
|
+
})), X = et && et.__setModuleDefault || (Object.create ? (function(t, u) {
|
|
3026
|
+
Object.defineProperty(t, "default", { enumerable: !0, value: u });
|
|
3027
|
+
}) : function(t, u) {
|
|
3028
|
+
t.default = u;
|
|
3029
|
+
}), j = et && et.__importStar || function(t) {
|
|
3030
|
+
if (t && t.__esModule) return t;
|
|
3031
|
+
var u = {};
|
|
3032
|
+
if (t != null) for (var o in t) o !== "default" && Object.prototype.hasOwnProperty.call(t, o) && _(u, t, o);
|
|
3033
|
+
return X(u, t), u;
|
|
3034
|
+
}, E = et && et.__read || function(t, u) {
|
|
3035
|
+
var o = typeof Symbol == "function" && t[Symbol.iterator];
|
|
3036
|
+
if (!o) return t;
|
|
3037
|
+
var s = o.call(t), l, O = [], k;
|
|
3038
|
+
try {
|
|
3039
|
+
for (; (u === void 0 || u-- > 0) && !(l = s.next()).done; ) O.push(l.value);
|
|
3040
|
+
} catch (N) {
|
|
3041
|
+
k = { error: N };
|
|
3042
|
+
} finally {
|
|
3043
|
+
try {
|
|
3044
|
+
l && !l.done && (o = s.return) && o.call(s);
|
|
3045
|
+
} finally {
|
|
3046
|
+
if (k) throw k.error;
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
return O;
|
|
3050
|
+
}, m = et && et.__importDefault || function(t) {
|
|
3051
|
+
return t && t.__esModule ? t : { default: t };
|
|
3052
|
+
};
|
|
3053
|
+
Object.defineProperty(et, "__esModule", { value: !0 });
|
|
3054
|
+
var d = j(ne()), c = m(pt()), h = m(St()), e = m(Et()), r = It(), n = m(Ct()), a = At(), i = xt(), v = te(), p = Mt(), y = wt(), f = {}, A = 1.2 / 0.85, x = {
|
|
3055
|
+
fontfamily: 1,
|
|
3056
|
+
fontsize: 1,
|
|
3057
|
+
fontweight: 1,
|
|
3058
|
+
fontstyle: 1,
|
|
3059
|
+
color: 1,
|
|
3060
|
+
background: 1,
|
|
3061
|
+
id: 1,
|
|
3062
|
+
class: 1,
|
|
3063
|
+
href: 1,
|
|
3064
|
+
style: 1
|
|
3065
|
+
};
|
|
3066
|
+
f.Open = function(t, u) {
|
|
3067
|
+
t.Push(t.itemFactory.create("open"));
|
|
3068
|
+
}, f.Close = function(t, u) {
|
|
3069
|
+
t.Push(t.itemFactory.create("close"));
|
|
3070
|
+
}, f.Tilde = function(t, u) {
|
|
3071
|
+
t.Push(t.create("token", "mtext", {}, p.entities.nbsp));
|
|
3072
|
+
}, f.Space = function(t, u) {
|
|
3073
|
+
}, f.Superscript = function(t, u) {
|
|
3074
|
+
var o;
|
|
3075
|
+
t.GetNext().match(/\d/) && (t.string = t.string.substr(0, t.i + 1) + " " + t.string.substr(t.i + 1));
|
|
3076
|
+
var s, l, O = t.stack.Top();
|
|
3077
|
+
O.isKind("prime") ? (o = E(O.Peek(2), 2), l = o[0], s = o[1], t.stack.Pop()) : (l = t.stack.Prev(), l || (l = t.create("token", "mi", {}, "")));
|
|
3078
|
+
var k = c.default.getProperty(l, "movesupsub"), N = c.default.isType(l, "msubsup") ? l.sup : l.over;
|
|
3079
|
+
if (c.default.isType(l, "msubsup") && !c.default.isType(l, "msup") && c.default.getChildAt(l, l.sup) || c.default.isType(l, "munderover") && !c.default.isType(l, "mover") && c.default.getChildAt(l, l.over) && !c.default.getProperty(l, "subsupOK"))
|
|
3080
|
+
throw new h.default("DoubleExponent", "Double exponent: use braces to clarify");
|
|
3081
|
+
(!c.default.isType(l, "msubsup") || c.default.isType(l, "msup")) && (k ? ((!c.default.isType(l, "munderover") || c.default.isType(l, "mover") || c.default.getChildAt(l, l.over)) && (l = t.create("node", "munderover", [l], { movesupsub: !0 })), N = l.over) : (l = t.create("node", "msubsup", [l]), N = l.sup)), t.Push(t.itemFactory.create("subsup", l).setProperties({
|
|
3082
|
+
position: N,
|
|
3083
|
+
primes: s,
|
|
3084
|
+
movesupsub: k
|
|
3085
|
+
}));
|
|
3086
|
+
}, f.Subscript = function(t, u) {
|
|
3087
|
+
var o;
|
|
3088
|
+
t.GetNext().match(/\d/) && (t.string = t.string.substr(0, t.i + 1) + " " + t.string.substr(t.i + 1));
|
|
3089
|
+
var s, l, O = t.stack.Top();
|
|
3090
|
+
O.isKind("prime") ? (o = E(O.Peek(2), 2), l = o[0], s = o[1], t.stack.Pop()) : (l = t.stack.Prev(), l || (l = t.create("token", "mi", {}, "")));
|
|
3091
|
+
var k = c.default.getProperty(l, "movesupsub"), N = c.default.isType(l, "msubsup") ? l.sub : l.under;
|
|
3092
|
+
if (c.default.isType(l, "msubsup") && !c.default.isType(l, "msup") && c.default.getChildAt(l, l.sub) || c.default.isType(l, "munderover") && !c.default.isType(l, "mover") && c.default.getChildAt(l, l.under) && !c.default.getProperty(l, "subsupOK"))
|
|
3093
|
+
throw new h.default("DoubleSubscripts", "Double subscripts: use braces to clarify");
|
|
3094
|
+
(!c.default.isType(l, "msubsup") || c.default.isType(l, "msup")) && (k ? ((!c.default.isType(l, "munderover") || c.default.isType(l, "mover") || c.default.getChildAt(l, l.under)) && (l = t.create("node", "munderover", [l], { movesupsub: !0 })), N = l.under) : (l = t.create("node", "msubsup", [l]), N = l.sub)), t.Push(t.itemFactory.create("subsup", l).setProperties({
|
|
3095
|
+
position: N,
|
|
3096
|
+
primes: s,
|
|
3097
|
+
movesupsub: k
|
|
3098
|
+
}));
|
|
3099
|
+
}, f.Prime = function(t, u) {
|
|
3100
|
+
var o = t.stack.Prev();
|
|
3101
|
+
if (o || (o = t.create("node", "mi")), c.default.isType(o, "msubsup") && !c.default.isType(o, "msup") && c.default.getChildAt(o, o.sup))
|
|
3102
|
+
throw new h.default("DoubleExponentPrime", "Prime causes double exponent: use braces to clarify");
|
|
3103
|
+
var s = "";
|
|
3104
|
+
t.i--;
|
|
3105
|
+
do
|
|
3106
|
+
s += p.entities.prime, t.i++, u = t.GetNext();
|
|
3107
|
+
while (u === "'" || u === p.entities.rsquo);
|
|
3108
|
+
s = ["", "′", "″", "‴", "⁗"][s.length] || s;
|
|
3109
|
+
var l = t.create("token", "mo", { variantForm: !0 }, s);
|
|
3110
|
+
t.Push(t.itemFactory.create("prime", o, l));
|
|
3111
|
+
}, f.Comment = function(t, u) {
|
|
3112
|
+
for (; t.i < t.string.length && t.string.charAt(t.i) !== `
|
|
3113
|
+
`; )
|
|
3114
|
+
t.i++;
|
|
3115
|
+
}, f.Hash = function(t, u) {
|
|
3116
|
+
throw new h.default("CantUseHash1", "You can't use 'macro parameter character #' in math mode");
|
|
3117
|
+
}, f.MathFont = function(t, u, o) {
|
|
3118
|
+
var s = t.GetArgument(u), l = new e.default(s, M(M({}, t.stack.env), { font: o, multiLetterIdentifiers: /^[a-zA-Z]+/, noAutoOP: !0 }), t.configuration).mml();
|
|
3119
|
+
t.Push(t.create("node", "TeXAtom", [l]));
|
|
3120
|
+
}, f.SetFont = function(t, u, o) {
|
|
3121
|
+
t.stack.env.font = o;
|
|
3122
|
+
}, f.SetStyle = function(t, u, o, s, l) {
|
|
3123
|
+
t.stack.env.style = o, t.stack.env.level = l, t.Push(t.itemFactory.create("style").setProperty("styles", { displaystyle: s, scriptlevel: l }));
|
|
3124
|
+
}, f.SetSize = function(t, u, o) {
|
|
3125
|
+
t.stack.env.size = o, t.Push(t.itemFactory.create("style").setProperty("styles", { mathsize: (0, v.em)(o) }));
|
|
3126
|
+
}, f.Spacer = function(t, u, o) {
|
|
3127
|
+
var s = t.create("node", "mspace", [], { width: (0, v.em)(o) }), l = t.create("node", "mstyle", [s], { scriptlevel: 0 });
|
|
3128
|
+
t.Push(l);
|
|
3129
|
+
}, f.LeftRight = function(t, u) {
|
|
3130
|
+
var o = u.substr(1);
|
|
3131
|
+
t.Push(t.itemFactory.create(o, t.GetDelimiter(u), t.stack.env.color));
|
|
3132
|
+
}, f.NamedFn = function(t, u, o) {
|
|
3133
|
+
o || (o = u.substr(1));
|
|
3134
|
+
var s = t.create("token", "mi", { texClass: a.TEXCLASS.OP }, o);
|
|
3135
|
+
t.Push(t.itemFactory.create("fn", s));
|
|
3136
|
+
}, f.NamedOp = function(t, u, o) {
|
|
3137
|
+
o || (o = u.substr(1)), o = o.replace(/ /, " ");
|
|
3138
|
+
var s = t.create("token", "mo", {
|
|
3139
|
+
movablelimits: !0,
|
|
3140
|
+
movesupsub: !0,
|
|
3141
|
+
form: r.TexConstant.Form.PREFIX,
|
|
3142
|
+
texClass: a.TEXCLASS.OP
|
|
3143
|
+
}, o);
|
|
3144
|
+
t.Push(s);
|
|
3145
|
+
}, f.Limits = function(t, u, o) {
|
|
3146
|
+
var s = t.stack.Prev(!0);
|
|
3147
|
+
if (!s || c.default.getTexClass(c.default.getCoreMO(s)) !== a.TEXCLASS.OP && c.default.getProperty(s, "movesupsub") == null)
|
|
3148
|
+
throw new h.default("MisplacedLimits", "%1 is allowed only on operators", t.currentCS);
|
|
3149
|
+
var l = t.stack.Top(), O;
|
|
3150
|
+
c.default.isType(s, "munderover") && !o ? (O = t.create("node", "msubsup"), c.default.copyChildren(s, O), s = l.Last = O) : c.default.isType(s, "msubsup") && o && (O = t.create("node", "munderover"), c.default.copyChildren(s, O), s = l.Last = O), c.default.setProperty(s, "movesupsub", !!o), c.default.setProperties(c.default.getCoreMO(s), { movablelimits: !1 }), (c.default.getAttribute(s, "movablelimits") || c.default.getProperty(s, "movablelimits")) && c.default.setProperties(s, { movablelimits: !1 });
|
|
3151
|
+
}, f.Over = function(t, u, o, s) {
|
|
3152
|
+
var l = t.itemFactory.create("over").setProperty("name", t.currentCS);
|
|
3153
|
+
o || s ? (l.setProperty("open", o), l.setProperty("close", s)) : u.match(/withdelims$/) && (l.setProperty("open", t.GetDelimiter(u)), l.setProperty("close", t.GetDelimiter(u))), u.match(/^\\above/) ? l.setProperty("thickness", t.GetDimen(u)) : (u.match(/^\\atop/) || o || s) && l.setProperty("thickness", 0), t.Push(l);
|
|
3154
|
+
}, f.Frac = function(t, u) {
|
|
3155
|
+
var o = t.ParseArg(u), s = t.ParseArg(u), l = t.create("node", "mfrac", [o, s]);
|
|
3156
|
+
t.Push(l);
|
|
3157
|
+
}, f.Sqrt = function(t, u) {
|
|
3158
|
+
var o = t.GetBrackets(u), s = t.GetArgument(u);
|
|
3159
|
+
s === "\\frac" && (s += "{" + t.GetArgument(s) + "}{" + t.GetArgument(s) + "}");
|
|
3160
|
+
var l = new e.default(s, t.stack.env, t.configuration).mml();
|
|
3161
|
+
o ? l = t.create("node", "mroot", [l, C(t, o)]) : l = t.create("node", "msqrt", [l]), t.Push(l);
|
|
3162
|
+
};
|
|
3163
|
+
function C(t, u) {
|
|
3164
|
+
var o = t.stack.env, s = o.inRoot;
|
|
3165
|
+
o.inRoot = !0;
|
|
3166
|
+
var l = new e.default(u, o, t.configuration), O = l.mml(), k = l.stack.global;
|
|
3167
|
+
if (k.leftRoot || k.upRoot) {
|
|
3168
|
+
var N = {};
|
|
3169
|
+
k.leftRoot && (N.width = k.leftRoot), k.upRoot && (N.voffset = k.upRoot, N.height = k.upRoot), O = t.create("node", "mpadded", [O], N);
|
|
3170
|
+
}
|
|
3171
|
+
return o.inRoot = s, O;
|
|
3172
|
+
}
|
|
3173
|
+
return f.Root = function(t, u) {
|
|
3174
|
+
var o = t.GetUpTo(u, "\\of"), s = t.ParseArg(u), l = t.create("node", "mroot", [s, C(t, o)]);
|
|
3175
|
+
t.Push(l);
|
|
3176
|
+
}, f.MoveRoot = function(t, u, o) {
|
|
3177
|
+
if (!t.stack.env.inRoot)
|
|
3178
|
+
throw new h.default("MisplacedMoveRoot", "%1 can appear only within a root", t.currentCS);
|
|
3179
|
+
if (t.stack.global[o])
|
|
3180
|
+
throw new h.default("MultipleMoveRoot", "Multiple use of %1", t.currentCS);
|
|
3181
|
+
var s = t.GetArgument(u);
|
|
3182
|
+
if (!s.match(/-?[0-9]+/))
|
|
3183
|
+
throw new h.default("IntegerArg", "The argument to %1 must be an integer", t.currentCS);
|
|
3184
|
+
s = parseInt(s, 10) / 15 + "em", s.substr(0, 1) !== "-" && (s = "+" + s), t.stack.global[o] = s;
|
|
3185
|
+
}, f.Accent = function(t, u, o, s) {
|
|
3186
|
+
var l = t.ParseArg(u), O = M(M({}, n.default.getFontDef(t)), { accent: !0, mathaccent: !0 }), k = c.default.createEntity(o), N = t.create("token", "mo", O, k), I = N;
|
|
3187
|
+
c.default.setAttribute(I, "stretchy", !!s);
|
|
3188
|
+
var F = c.default.isEmbellished(l) ? c.default.getCoreMO(l) : l;
|
|
3189
|
+
(c.default.isType(F, "mo") || c.default.getProperty(F, "movablelimits")) && c.default.setProperties(F, { movablelimits: !1 });
|
|
3190
|
+
var R = t.create("node", "munderover");
|
|
3191
|
+
c.default.setChild(R, 0, l), c.default.setChild(R, 1, null), c.default.setChild(R, 2, I);
|
|
3192
|
+
var $ = t.create("node", "TeXAtom", [R]);
|
|
3193
|
+
t.Push($);
|
|
3194
|
+
}, f.UnderOver = function(t, u, o, s) {
|
|
3195
|
+
var l = c.default.createEntity(o), O = t.create("token", "mo", { stretchy: !0, accent: !0 }, l), k = u.charAt(1) === "o" ? "over" : "under", N = t.ParseArg(u);
|
|
3196
|
+
t.Push(n.default.underOver(t, N, O, k, s));
|
|
3197
|
+
}, f.Overset = function(t, u) {
|
|
3198
|
+
var o = t.ParseArg(u), s = t.ParseArg(u);
|
|
3199
|
+
n.default.checkMovableLimits(s), o.isKind("mo") && c.default.setAttribute(o, "accent", !1);
|
|
3200
|
+
var l = t.create("node", "mover", [s, o]);
|
|
3201
|
+
t.Push(l);
|
|
3202
|
+
}, f.Underset = function(t, u) {
|
|
3203
|
+
var o = t.ParseArg(u), s = t.ParseArg(u);
|
|
3204
|
+
n.default.checkMovableLimits(s), o.isKind("mo") && c.default.setAttribute(o, "accent", !1);
|
|
3205
|
+
var l = t.create("node", "munder", [s, o], { accentunder: !1 });
|
|
3206
|
+
t.Push(l);
|
|
3207
|
+
}, f.Overunderset = function(t, u) {
|
|
3208
|
+
var o = t.ParseArg(u), s = t.ParseArg(u), l = t.ParseArg(u);
|
|
3209
|
+
n.default.checkMovableLimits(l), o.isKind("mo") && c.default.setAttribute(o, "accent", !1), s.isKind("mo") && c.default.setAttribute(s, "accent", !1);
|
|
3210
|
+
var O = t.create("node", "munderover", [l, s, o], { accent: !1, accentunder: !1 });
|
|
3211
|
+
t.Push(O);
|
|
3212
|
+
}, f.TeXAtom = function(t, u, o) {
|
|
3213
|
+
var s = { texClass: o }, l, O, k;
|
|
3214
|
+
if (o === a.TEXCLASS.OP) {
|
|
3215
|
+
s.movesupsub = s.movablelimits = !0;
|
|
3216
|
+
var N = t.GetArgument(u), I = N.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);
|
|
3217
|
+
I ? (s.mathvariant = r.TexConstant.Variant.NORMAL, O = t.create("token", "mi", s, I[1])) : (k = new e.default(N, t.stack.env, t.configuration).mml(), O = t.create("node", "TeXAtom", [k], s)), l = t.itemFactory.create("fn", O);
|
|
3218
|
+
} else
|
|
3219
|
+
k = t.ParseArg(u), l = t.create("node", "TeXAtom", [k], s);
|
|
3220
|
+
t.Push(l);
|
|
3221
|
+
}, f.MmlToken = function(t, u) {
|
|
3222
|
+
var o = t.GetArgument(u), s = t.GetBrackets(u, "").replace(/^\s+/, ""), l = t.GetArgument(u), O = {}, k = [], N;
|
|
3223
|
+
try {
|
|
3224
|
+
N = t.create("node", o);
|
|
3225
|
+
} catch {
|
|
3226
|
+
N = null;
|
|
3227
|
+
}
|
|
3228
|
+
if (!N || !N.isToken)
|
|
3229
|
+
throw new h.default("NotMathMLToken", "%1 is not a token element", o);
|
|
3230
|
+
for (; s !== ""; ) {
|
|
3231
|
+
var I = s.match(/^([a-z]+)\s*=\s*('[^']*'|"[^"]*"|[^ ,]*)\s*,?\s*/i);
|
|
3232
|
+
if (!I)
|
|
3233
|
+
throw new h.default("InvalidMathMLAttr", "Invalid MathML attribute: %1", s);
|
|
3234
|
+
if (!N.attributes.hasDefault(I[1]) && !x[I[1]])
|
|
3235
|
+
throw new h.default("UnknownAttrForElement", "%1 is not a recognized attribute for %2", I[1], o);
|
|
3236
|
+
var F = n.default.MmlFilterAttribute(t, I[1], I[2].replace(/^(['"])(.*)\1$/, "$2"));
|
|
3237
|
+
F && (F.toLowerCase() === "true" ? F = !0 : F.toLowerCase() === "false" && (F = !1), O[I[1]] = F, k.push(I[1])), s = s.substr(I[0].length);
|
|
3238
|
+
}
|
|
3239
|
+
k.length && (O["mjx-keep-attrs"] = k.join(" "));
|
|
3240
|
+
var R = t.create("text", l);
|
|
3241
|
+
N.appendChild(R), c.default.setProperties(N, O), t.Push(N);
|
|
3242
|
+
}, f.Strut = function(t, u) {
|
|
3243
|
+
var o = t.create("node", "mrow"), s = t.create("node", "mpadded", [o], { height: "8.6pt", depth: "3pt", width: 0 });
|
|
3244
|
+
t.Push(s);
|
|
3245
|
+
}, f.Phantom = function(t, u, o, s) {
|
|
3246
|
+
var l = t.create("node", "mphantom", [t.ParseArg(u)]);
|
|
3247
|
+
(o || s) && (l = t.create("node", "mpadded", [l]), s && (c.default.setAttribute(l, "height", 0), c.default.setAttribute(l, "depth", 0)), o && c.default.setAttribute(l, "width", 0));
|
|
3248
|
+
var O = t.create("node", "TeXAtom", [l]);
|
|
3249
|
+
t.Push(O);
|
|
3250
|
+
}, f.Smash = function(t, u) {
|
|
3251
|
+
var o = n.default.trimSpaces(t.GetBrackets(u, "")), s = t.create("node", "mpadded", [t.ParseArg(u)]);
|
|
3252
|
+
switch (o) {
|
|
3253
|
+
case "b":
|
|
3254
|
+
c.default.setAttribute(s, "depth", 0);
|
|
3255
|
+
break;
|
|
3256
|
+
case "t":
|
|
3257
|
+
c.default.setAttribute(s, "height", 0);
|
|
3258
|
+
break;
|
|
3259
|
+
default:
|
|
3260
|
+
c.default.setAttribute(s, "height", 0), c.default.setAttribute(s, "depth", 0);
|
|
3261
|
+
}
|
|
3262
|
+
var l = t.create("node", "TeXAtom", [s]);
|
|
3263
|
+
t.Push(l);
|
|
3264
|
+
}, f.Lap = function(t, u) {
|
|
3265
|
+
var o = t.create("node", "mpadded", [t.ParseArg(u)], { width: 0 });
|
|
3266
|
+
u === "\\llap" && c.default.setAttribute(o, "lspace", "-1width");
|
|
3267
|
+
var s = t.create("node", "TeXAtom", [o]);
|
|
3268
|
+
t.Push(s);
|
|
3269
|
+
}, f.RaiseLower = function(t, u) {
|
|
3270
|
+
var o = t.GetDimen(u), s = t.itemFactory.create("position").setProperties({ name: t.currentCS, move: "vertical" });
|
|
3271
|
+
o.charAt(0) === "-" && (o = o.slice(1), u = u.substr(1) === "raise" ? "\\lower" : "\\raise"), u === "\\lower" ? (s.setProperty("dh", "-" + o), s.setProperty("dd", "+" + o)) : (s.setProperty("dh", "+" + o), s.setProperty("dd", "-" + o)), t.Push(s);
|
|
3272
|
+
}, f.MoveLeftRight = function(t, u) {
|
|
3273
|
+
var o = t.GetDimen(u), s = o.charAt(0) === "-" ? o.slice(1) : "-" + o;
|
|
3274
|
+
if (u === "\\moveleft") {
|
|
3275
|
+
var l = o;
|
|
3276
|
+
o = s, s = l;
|
|
3277
|
+
}
|
|
3278
|
+
t.Push(t.itemFactory.create("position").setProperties({
|
|
3279
|
+
name: t.currentCS,
|
|
3280
|
+
move: "horizontal",
|
|
3281
|
+
left: t.create("node", "mspace", [], { width: o }),
|
|
3282
|
+
right: t.create("node", "mspace", [], { width: s })
|
|
3283
|
+
}));
|
|
3284
|
+
}, f.Hskip = function(t, u) {
|
|
3285
|
+
var o = t.create("node", "mspace", [], { width: t.GetDimen(u) });
|
|
3286
|
+
t.Push(o);
|
|
3287
|
+
}, f.Nonscript = function(t, u) {
|
|
3288
|
+
t.Push(t.itemFactory.create("nonscript"));
|
|
3289
|
+
}, f.Rule = function(t, u, o) {
|
|
3290
|
+
var s = t.GetDimen(u), l = t.GetDimen(u), O = t.GetDimen(u), k = { width: s, height: l, depth: O };
|
|
3291
|
+
o !== "blank" && (k.mathbackground = t.stack.env.color || "black");
|
|
3292
|
+
var N = t.create("node", "mspace", [], k);
|
|
3293
|
+
t.Push(N);
|
|
3294
|
+
}, f.rule = function(t, u) {
|
|
3295
|
+
var o = t.GetBrackets(u), s = t.GetDimen(u), l = t.GetDimen(u), O = t.create("node", "mspace", [], {
|
|
3296
|
+
width: s,
|
|
3297
|
+
height: l,
|
|
3298
|
+
mathbackground: t.stack.env.color || "black"
|
|
3299
|
+
});
|
|
3300
|
+
o && (O = t.create("node", "mpadded", [O], { voffset: o }), o.match(/^\-/) ? (c.default.setAttribute(O, "height", o), c.default.setAttribute(O, "depth", "+" + o.substr(1))) : c.default.setAttribute(O, "height", "+" + o)), t.Push(O);
|
|
3301
|
+
}, f.MakeBig = function(t, u, o, s) {
|
|
3302
|
+
s *= A;
|
|
3303
|
+
var l = String(s).replace(/(\.\d\d\d).+/, "$1") + "em", O = t.GetDelimiter(u, !0), k = t.create("token", "mo", {
|
|
3304
|
+
minsize: l,
|
|
3305
|
+
maxsize: l,
|
|
3306
|
+
fence: !0,
|
|
3307
|
+
stretchy: !0,
|
|
3308
|
+
symmetric: !0
|
|
3309
|
+
}, O), N = t.create("node", "TeXAtom", [k], { texClass: o });
|
|
3310
|
+
t.Push(N);
|
|
3311
|
+
}, f.BuildRel = function(t, u) {
|
|
3312
|
+
var o = t.ParseUpTo(u, "\\over"), s = t.ParseArg(u), l = t.create("node", "munderover");
|
|
3313
|
+
c.default.setChild(l, 0, s), c.default.setChild(l, 1, null), c.default.setChild(l, 2, o);
|
|
3314
|
+
var O = t.create("node", "TeXAtom", [l], { texClass: a.TEXCLASS.REL });
|
|
3315
|
+
t.Push(O);
|
|
3316
|
+
}, f.HBox = function(t, u, o, s) {
|
|
3317
|
+
t.PushAll(n.default.internalMath(t, t.GetArgument(u), o, s));
|
|
3318
|
+
}, f.FBox = function(t, u) {
|
|
3319
|
+
var o = n.default.internalMath(t, t.GetArgument(u)), s = t.create("node", "menclose", o, { notation: "box" });
|
|
3320
|
+
t.Push(s);
|
|
3321
|
+
}, f.FrameBox = function(t, u) {
|
|
3322
|
+
var o = t.GetBrackets(u), s = t.GetBrackets(u) || "c", l = n.default.internalMath(t, t.GetArgument(u));
|
|
3323
|
+
o && (l = [t.create("node", "mpadded", l, {
|
|
3324
|
+
width: o,
|
|
3325
|
+
"data-align": (0, y.lookup)(s, { l: "left", r: "right" }, "center")
|
|
3326
|
+
})]);
|
|
3327
|
+
var O = t.create("node", "TeXAtom", [t.create("node", "menclose", l, { notation: "box" })], { texClass: a.TEXCLASS.ORD });
|
|
3328
|
+
t.Push(O);
|
|
3329
|
+
}, f.Not = function(t, u) {
|
|
3330
|
+
t.Push(t.itemFactory.create("not"));
|
|
3331
|
+
}, f.Dots = function(t, u) {
|
|
3332
|
+
var o = c.default.createEntity("2026"), s = c.default.createEntity("22EF"), l = t.create("token", "mo", { stretchy: !1 }, o), O = t.create("token", "mo", { stretchy: !1 }, s);
|
|
3333
|
+
t.Push(t.itemFactory.create("dots").setProperties({
|
|
3334
|
+
ldots: l,
|
|
3335
|
+
cdots: O
|
|
3336
|
+
}));
|
|
3337
|
+
}, f.Matrix = function(t, u, o, s, l, O, k, N, I, F) {
|
|
3338
|
+
var R = t.GetNext();
|
|
3339
|
+
if (R === "")
|
|
3340
|
+
throw new h.default("MissingArgFor", "Missing argument for %1", t.currentCS);
|
|
3341
|
+
R === "{" ? t.i++ : (t.string = R + "}" + t.string.slice(t.i + 1), t.i = 0);
|
|
3342
|
+
var $ = t.itemFactory.create("array").setProperty("requireClose", !0);
|
|
3343
|
+
$.arraydef = {
|
|
3344
|
+
rowspacing: k || "4pt",
|
|
3345
|
+
columnspacing: O || "1em"
|
|
3346
|
+
}, I && $.setProperty("isCases", !0), F && ($.setProperty("isNumbered", !0), $.arraydef.side = F), (o || s) && ($.setProperty("open", o), $.setProperty("close", s)), N === "D" && ($.arraydef.displaystyle = !0), l != null && ($.arraydef.columnalign = l), t.Push($);
|
|
3347
|
+
}, f.Entry = function(t, u) {
|
|
3348
|
+
t.Push(t.itemFactory.create("cell").setProperties({ isEntry: !0, name: u }));
|
|
3349
|
+
var o = t.stack.Top(), s = o.getProperty("casesEnv"), l = o.getProperty("isCases");
|
|
3350
|
+
if (!(!l && !s)) {
|
|
3351
|
+
for (var O = t.string, k = 0, N = -1, I = t.i, F = O.length, R = s ? new RegExp("^\\\\end\\s*\\{".concat(s.replace(/\*/, "\\*"), "\\}")) : null; I < F; ) {
|
|
3352
|
+
var $ = O.charAt(I);
|
|
3353
|
+
if ($ === "{")
|
|
3354
|
+
k++, I++;
|
|
3355
|
+
else if ($ === "}")
|
|
3356
|
+
k === 0 ? F = 0 : (k--, k === 0 && N < 0 && (N = I - t.i), I++);
|
|
3357
|
+
else {
|
|
3358
|
+
if ($ === "&" && k === 0)
|
|
3359
|
+
throw new h.default("ExtraAlignTab", "Extra alignment tab in \\cases text");
|
|
3360
|
+
if ($ === "\\") {
|
|
3361
|
+
var J = O.substr(I);
|
|
3362
|
+
J.match(/^((\\cr)[^a-zA-Z]|\\\\)/) || R && J.match(R) ? F = 0 : I += 2;
|
|
3363
|
+
} else
|
|
3364
|
+
I++;
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
var S = O.substr(t.i, I - t.i);
|
|
3368
|
+
if (!S.match(/^\s*\\text[^a-zA-Z]/) || N !== S.replace(/\s+$/, "").length - 1) {
|
|
3369
|
+
var b = n.default.internalMath(t, n.default.trimSpaces(S), 0);
|
|
3370
|
+
t.PushAll(b), t.i = I;
|
|
3371
|
+
}
|
|
3372
|
+
}
|
|
3373
|
+
}, f.Cr = function(t, u) {
|
|
3374
|
+
t.Push(t.itemFactory.create("cell").setProperties({ isCR: !0, name: u }));
|
|
3375
|
+
}, f.CrLaTeX = function(t, u, o) {
|
|
3376
|
+
o === void 0 && (o = !1);
|
|
3377
|
+
var s;
|
|
3378
|
+
if (!o && (t.string.charAt(t.i) === "*" && t.i++, t.string.charAt(t.i) === "[")) {
|
|
3379
|
+
var l = t.GetBrackets(u, ""), O = E(n.default.matchDimen(l), 2), k = O[0], N = O[1];
|
|
3380
|
+
if (l && !k)
|
|
3381
|
+
throw new h.default("BracketMustBeDimension", "Bracket argument to %1 must be a dimension", t.currentCS);
|
|
3382
|
+
s = k + N;
|
|
3383
|
+
}
|
|
3384
|
+
t.Push(t.itemFactory.create("cell").setProperties({ isCR: !0, name: u, linebreak: !0 }));
|
|
3385
|
+
var I = t.stack.Top(), F;
|
|
3386
|
+
I instanceof d.ArrayItem ? s && I.addRowSpacing(s) : (s && (F = t.create("node", "mspace", [], { depth: s }), t.Push(F)), F = t.create("node", "mspace", [], { linebreak: r.TexConstant.LineBreak.NEWLINE }), t.Push(F));
|
|
3387
|
+
}, f.HLine = function(t, u, o) {
|
|
3388
|
+
o == null && (o = "solid");
|
|
3389
|
+
var s = t.stack.Top();
|
|
3390
|
+
if (!(s instanceof d.ArrayItem) || s.Size())
|
|
3391
|
+
throw new h.default("Misplaced", "Misplaced %1", t.currentCS);
|
|
3392
|
+
if (!s.table.length)
|
|
3393
|
+
s.frame.push("top");
|
|
3394
|
+
else {
|
|
3395
|
+
for (var l = s.arraydef.rowlines ? s.arraydef.rowlines.split(/ /) : []; l.length < s.table.length; )
|
|
3396
|
+
l.push("none");
|
|
3397
|
+
l[s.table.length - 1] = o, s.arraydef.rowlines = l.join(" ");
|
|
3398
|
+
}
|
|
3399
|
+
}, f.HFill = function(t, u) {
|
|
3400
|
+
var o = t.stack.Top();
|
|
3401
|
+
if (o instanceof d.ArrayItem)
|
|
3402
|
+
o.hfill.push(o.Size());
|
|
3403
|
+
else
|
|
3404
|
+
throw new h.default("UnsupportedHFill", "Unsupported use of %1", t.currentCS);
|
|
3405
|
+
}, f.BeginEnd = function(t, u) {
|
|
3406
|
+
var o = t.GetArgument(u);
|
|
3407
|
+
if (o.match(/\\/i))
|
|
3408
|
+
throw new h.default("InvalidEnv", "Invalid environment name '%1'", o);
|
|
3409
|
+
var s = t.configuration.handlers.get("environment").lookup(o);
|
|
3410
|
+
if (s && u === "\\end") {
|
|
3411
|
+
if (!s.args[0]) {
|
|
3412
|
+
var l = t.itemFactory.create("end").setProperty("name", o);
|
|
3413
|
+
t.Push(l);
|
|
3414
|
+
return;
|
|
3415
|
+
}
|
|
3416
|
+
t.stack.env.closing = o;
|
|
3417
|
+
}
|
|
3418
|
+
n.default.checkMaxMacros(t, !1), t.parse("environment", [t, o]);
|
|
3419
|
+
}, f.Array = function(t, u, o, s, l, O, k, N, I) {
|
|
3420
|
+
l || (l = t.GetArgument("\\begin{" + u.getName() + "}"));
|
|
3421
|
+
var F = ("c" + l).replace(/[^clr|:]/g, "").replace(/[^|:]([|:])+/g, "$1");
|
|
3422
|
+
l = l.replace(/[^clr]/g, "").split("").join(" "), l = l.replace(/l/g, "left").replace(/r/g, "right").replace(/c/g, "center");
|
|
3423
|
+
var R = t.itemFactory.create("array");
|
|
3424
|
+
return R.arraydef = {
|
|
3425
|
+
columnalign: l,
|
|
3426
|
+
columnspacing: O || "1em",
|
|
3427
|
+
rowspacing: k || "4pt"
|
|
3428
|
+
}, F.match(/[|:]/) && (F.charAt(0).match(/[|:]/) && (R.frame.push("left"), R.dashed = F.charAt(0) === ":"), F.charAt(F.length - 1).match(/[|:]/) && R.frame.push("right"), F = F.substr(1, F.length - 2), R.arraydef.columnlines = F.split("").join(" ").replace(/[^|: ]/g, "none").replace(/\|/g, "solid").replace(/:/g, "dashed")), o && R.setProperty("open", t.convertDelimiter(o)), s && R.setProperty("close", t.convertDelimiter(s)), (N || "").charAt(1) === "'" && (R.arraydef["data-cramped"] = !0, N = N.charAt(0)), N === "D" ? R.arraydef.displaystyle = !0 : N && (R.arraydef.displaystyle = !1), N === "S" && (R.arraydef.scriptlevel = 1), I && (R.arraydef.useHeight = !1), t.Push(u), R;
|
|
3429
|
+
}, f.AlignedArray = function(t, u) {
|
|
3430
|
+
var o = t.GetBrackets("\\begin{" + u.getName() + "}"), s = f.Array(t, u);
|
|
3431
|
+
return n.default.setArrayAlign(s, o);
|
|
3432
|
+
}, f.Equation = function(t, u, o) {
|
|
3433
|
+
return t.Push(u), n.default.checkEqnEnv(t), t.itemFactory.create("equation", o).setProperty("name", u.getName());
|
|
3434
|
+
}, f.EqnArray = function(t, u, o, s, l, O) {
|
|
3435
|
+
t.Push(u), s && n.default.checkEqnEnv(t), l = l.replace(/[^clr]/g, "").split("").join(" "), l = l.replace(/l/g, "left").replace(/r/g, "right").replace(/c/g, "center");
|
|
3436
|
+
var k = t.itemFactory.create("eqnarray", u.getName(), o, s, t.stack.global);
|
|
3437
|
+
return k.arraydef = {
|
|
3438
|
+
displaystyle: !0,
|
|
3439
|
+
columnalign: l,
|
|
3440
|
+
columnspacing: O || "1em",
|
|
3441
|
+
rowspacing: "3pt",
|
|
3442
|
+
side: t.options.tagSide,
|
|
3443
|
+
minlabelspacing: t.options.tagIndent
|
|
3444
|
+
}, k;
|
|
3445
|
+
}, f.HandleNoTag = function(t, u) {
|
|
3446
|
+
t.tags.notag();
|
|
3447
|
+
}, f.HandleLabel = function(t, u) {
|
|
3448
|
+
var o = t.GetArgument(u);
|
|
3449
|
+
if (o !== "" && !t.tags.refUpdate) {
|
|
3450
|
+
if (t.tags.label)
|
|
3451
|
+
throw new h.default("MultipleCommand", "Multiple %1", t.currentCS);
|
|
3452
|
+
if (t.tags.label = o, (t.tags.allLabels[o] || t.tags.labels[o]) && !t.options.ignoreDuplicateLabels)
|
|
3453
|
+
throw new h.default("MultipleLabel", "Label '%1' multiply defined", o);
|
|
3454
|
+
t.tags.labels[o] = new i.Label();
|
|
3455
|
+
}
|
|
3456
|
+
}, f.HandleRef = function(t, u, o) {
|
|
3457
|
+
var s = t.GetArgument(u), l = t.tags.allLabels[s] || t.tags.labels[s];
|
|
3458
|
+
l || (t.tags.refUpdate || (t.tags.redo = !0), l = new i.Label());
|
|
3459
|
+
var O = l.tag;
|
|
3460
|
+
o && (O = t.tags.formatTag(O));
|
|
3461
|
+
var k = t.create("node", "mrow", n.default.internalMath(t, O), {
|
|
3462
|
+
href: t.tags.formatUrl(l.id, t.options.baseURL),
|
|
3463
|
+
class: "MathJax_ref"
|
|
3464
|
+
});
|
|
3465
|
+
t.Push(k);
|
|
3466
|
+
}, f.Macro = function(t, u, o, s, l) {
|
|
3467
|
+
if (s) {
|
|
3468
|
+
var O = [];
|
|
3469
|
+
if (l != null) {
|
|
3470
|
+
var k = t.GetBrackets(u);
|
|
3471
|
+
O.push(k ?? l);
|
|
3472
|
+
}
|
|
3473
|
+
for (var N = O.length; N < s; N++)
|
|
3474
|
+
O.push(t.GetArgument(u));
|
|
3475
|
+
o = n.default.substituteArgs(t, O, o);
|
|
3476
|
+
}
|
|
3477
|
+
t.string = n.default.addArgs(t, o, t.string.slice(t.i)), t.i = 0, n.default.checkMaxMacros(t);
|
|
3478
|
+
}, f.MathChoice = function(t, u) {
|
|
3479
|
+
var o = t.ParseArg(u), s = t.ParseArg(u), l = t.ParseArg(u), O = t.ParseArg(u);
|
|
3480
|
+
t.Push(t.create("node", "MathChoice", [o, s, l, O]));
|
|
3481
|
+
}, et.default = f, et;
|
|
3482
|
+
}
|
|
3483
|
+
var ht = {}, Wt;
|
|
3484
|
+
function me() {
|
|
3485
|
+
if (Wt) return ht;
|
|
3486
|
+
Wt = 1;
|
|
3487
|
+
var M = ht && ht.__read || function(c, h) {
|
|
3488
|
+
var e = typeof Symbol == "function" && c[Symbol.iterator];
|
|
3489
|
+
if (!e) return c;
|
|
3490
|
+
var r = e.call(c), n, a = [], i;
|
|
3491
|
+
try {
|
|
3492
|
+
for (; (h === void 0 || h-- > 0) && !(n = r.next()).done; ) a.push(n.value);
|
|
3493
|
+
} catch (v) {
|
|
3494
|
+
i = { error: v };
|
|
3495
|
+
} finally {
|
|
3496
|
+
try {
|
|
3497
|
+
n && !n.done && (e = r.return) && e.call(r);
|
|
3498
|
+
} finally {
|
|
3499
|
+
if (i) throw i.error;
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
return a;
|
|
3503
|
+
}, _ = ht && ht.__spreadArray || function(c, h, e) {
|
|
3504
|
+
if (e || arguments.length === 2) for (var r = 0, n = h.length, a; r < n; r++)
|
|
3505
|
+
(a || !(r in h)) && (a || (a = Array.prototype.slice.call(h, 0, r)), a[r] = h[r]);
|
|
3506
|
+
return c.concat(a || Array.prototype.slice.call(h));
|
|
3507
|
+
}, X = ht && ht.__importDefault || function(c) {
|
|
3508
|
+
return c && c.__esModule ? c : { default: c };
|
|
3509
|
+
};
|
|
3510
|
+
Object.defineProperty(ht, "__esModule", { value: !0 });
|
|
3511
|
+
var j = X(pt()), E = It(), m = X(Ct()), d;
|
|
3512
|
+
return (function(c) {
|
|
3513
|
+
function h(y, f) {
|
|
3514
|
+
var A = m.default.getFontDef(y), x = y.stack.env;
|
|
3515
|
+
x.multiLetterIdentifiers && x.font !== "" && (f = y.string.substr(y.i - 1).match(x.multiLetterIdentifiers)[0], y.i += f.length - 1, A.mathvariant === E.TexConstant.Variant.NORMAL && x.noAutoOP && f.length > 1 && (A.autoOP = !1));
|
|
3516
|
+
var C = y.create("token", "mi", A, f);
|
|
3517
|
+
y.Push(C);
|
|
3518
|
+
}
|
|
3519
|
+
c.variable = h;
|
|
3520
|
+
function e(y, f) {
|
|
3521
|
+
var A, x = y.configuration.options.digits, C = y.string.slice(y.i - 1).match(x), t = m.default.getFontDef(y);
|
|
3522
|
+
C ? (A = y.create("token", "mn", t, C[0].replace(/[{}]/g, "")), y.i += C[0].length - 1) : A = y.create("token", "mo", t, f), y.Push(A);
|
|
3523
|
+
}
|
|
3524
|
+
c.digit = e;
|
|
3525
|
+
function r(y, f) {
|
|
3526
|
+
var A = y.GetCS();
|
|
3527
|
+
y.parse("macro", [y, A]);
|
|
3528
|
+
}
|
|
3529
|
+
c.controlSequence = r;
|
|
3530
|
+
function n(y, f) {
|
|
3531
|
+
var A = f.attributes || { mathvariant: E.TexConstant.Variant.ITALIC }, x = y.create("token", "mi", A, f.char);
|
|
3532
|
+
y.Push(x);
|
|
3533
|
+
}
|
|
3534
|
+
c.mathchar0mi = n;
|
|
3535
|
+
function a(y, f) {
|
|
3536
|
+
var A = f.attributes || {};
|
|
3537
|
+
A.stretchy = !1;
|
|
3538
|
+
var x = y.create("token", "mo", A, f.char);
|
|
3539
|
+
j.default.setProperty(x, "fixStretchy", !0), y.configuration.addNode("fixStretchy", x), y.Push(x);
|
|
3540
|
+
}
|
|
3541
|
+
c.mathchar0mo = a;
|
|
3542
|
+
function i(y, f) {
|
|
3543
|
+
var A = f.attributes || { mathvariant: E.TexConstant.Variant.NORMAL };
|
|
3544
|
+
y.stack.env.font && (A.mathvariant = y.stack.env.font);
|
|
3545
|
+
var x = y.create("token", "mi", A, f.char);
|
|
3546
|
+
y.Push(x);
|
|
3547
|
+
}
|
|
3548
|
+
c.mathchar7 = i;
|
|
3549
|
+
function v(y, f) {
|
|
3550
|
+
var A = f.attributes || {};
|
|
3551
|
+
A = Object.assign({ fence: !1, stretchy: !1 }, A);
|
|
3552
|
+
var x = y.create("token", "mo", A, f.char);
|
|
3553
|
+
y.Push(x);
|
|
3554
|
+
}
|
|
3555
|
+
c.delimiter = v;
|
|
3556
|
+
function p(y, f, A, x) {
|
|
3557
|
+
var C = x[0], t = y.itemFactory.create("begin").setProperties({ name: f, end: C });
|
|
3558
|
+
t = A.apply(void 0, _([y, t], M(x.slice(1)), !1)), y.Push(t);
|
|
3559
|
+
}
|
|
3560
|
+
c.environment = p;
|
|
3561
|
+
})(d || (d = {})), ht.default = d, ht;
|
|
3562
|
+
}
|
|
3563
|
+
var Yt;
|
|
3564
|
+
function ve() {
|
|
3565
|
+
if (Yt) return st;
|
|
3566
|
+
Yt = 1;
|
|
3567
|
+
var M = st && st.__createBinding || (Object.create ? (function(n, a, i, v) {
|
|
3568
|
+
v === void 0 && (v = i);
|
|
3569
|
+
var p = Object.getOwnPropertyDescriptor(a, i);
|
|
3570
|
+
(!p || ("get" in p ? !a.__esModule : p.writable || p.configurable)) && (p = { enumerable: !0, get: function() {
|
|
3571
|
+
return a[i];
|
|
3572
|
+
} }), Object.defineProperty(n, v, p);
|
|
3573
|
+
}) : (function(n, a, i, v) {
|
|
3574
|
+
v === void 0 && (v = i), n[v] = a[i];
|
|
3575
|
+
})), _ = st && st.__setModuleDefault || (Object.create ? (function(n, a) {
|
|
3576
|
+
Object.defineProperty(n, "default", { enumerable: !0, value: a });
|
|
3577
|
+
}) : function(n, a) {
|
|
3578
|
+
n.default = a;
|
|
3579
|
+
}), X = st && st.__importStar || function(n) {
|
|
3580
|
+
if (n && n.__esModule) return n;
|
|
3581
|
+
var a = {};
|
|
3582
|
+
if (n != null) for (var i in n) i !== "default" && Object.prototype.hasOwnProperty.call(n, i) && M(a, n, i);
|
|
3583
|
+
return _(a, n), a;
|
|
3584
|
+
}, j = st && st.__importDefault || function(n) {
|
|
3585
|
+
return n && n.__esModule ? n : { default: n };
|
|
3586
|
+
};
|
|
3587
|
+
Object.defineProperty(st, "__esModule", { value: !0 });
|
|
3588
|
+
var E = X(re()), m = It(), d = j(pe()), c = j(me()), h = j(Ct()), e = At(), r = te();
|
|
3589
|
+
return new E.RegExpMap("letter", c.default.variable, /[a-z]/i), new E.RegExpMap("digit", c.default.digit, /[0-9.,]/), new E.RegExpMap("command", c.default.controlSequence, /^\\/), new E.MacroMap("special", {
|
|
3590
|
+
"{": "Open",
|
|
3591
|
+
"}": "Close",
|
|
3592
|
+
"~": "Tilde",
|
|
3593
|
+
"^": "Superscript",
|
|
3594
|
+
_: "Subscript",
|
|
3595
|
+
" ": "Space",
|
|
3596
|
+
" ": "Space",
|
|
3597
|
+
"\r": "Space",
|
|
3598
|
+
"\n": "Space",
|
|
3599
|
+
"'": "Prime",
|
|
3600
|
+
"%": "Comment",
|
|
3601
|
+
"&": "Entry",
|
|
3602
|
+
"#": "Hash",
|
|
3603
|
+
" ": "Space",
|
|
3604
|
+
"’": "Prime"
|
|
3605
|
+
}, d.default), new E.CharacterMap("mathchar0mi", c.default.mathchar0mi, {
|
|
3606
|
+
alpha: "α",
|
|
3607
|
+
beta: "β",
|
|
3608
|
+
gamma: "γ",
|
|
3609
|
+
delta: "δ",
|
|
3610
|
+
epsilon: "ϵ",
|
|
3611
|
+
zeta: "ζ",
|
|
3612
|
+
eta: "η",
|
|
3613
|
+
theta: "θ",
|
|
3614
|
+
iota: "ι",
|
|
3615
|
+
kappa: "κ",
|
|
3616
|
+
lambda: "λ",
|
|
3617
|
+
mu: "μ",
|
|
3618
|
+
nu: "ν",
|
|
3619
|
+
xi: "ξ",
|
|
3620
|
+
omicron: "ο",
|
|
3621
|
+
pi: "π",
|
|
3622
|
+
rho: "ρ",
|
|
3623
|
+
sigma: "σ",
|
|
3624
|
+
tau: "τ",
|
|
3625
|
+
upsilon: "υ",
|
|
3626
|
+
phi: "ϕ",
|
|
3627
|
+
chi: "χ",
|
|
3628
|
+
psi: "ψ",
|
|
3629
|
+
omega: "ω",
|
|
3630
|
+
varepsilon: "ε",
|
|
3631
|
+
vartheta: "ϑ",
|
|
3632
|
+
varpi: "ϖ",
|
|
3633
|
+
varrho: "ϱ",
|
|
3634
|
+
varsigma: "ς",
|
|
3635
|
+
varphi: "φ",
|
|
3636
|
+
S: ["§", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3637
|
+
aleph: ["ℵ", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3638
|
+
hbar: ["ℏ", { variantForm: !0 }],
|
|
3639
|
+
imath: "ı",
|
|
3640
|
+
jmath: "ȷ",
|
|
3641
|
+
ell: "ℓ",
|
|
3642
|
+
wp: ["℘", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3643
|
+
Re: ["ℜ", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3644
|
+
Im: ["ℑ", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3645
|
+
partial: ["∂", { mathvariant: m.TexConstant.Variant.ITALIC }],
|
|
3646
|
+
infty: ["∞", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3647
|
+
prime: ["′", { variantForm: !0 }],
|
|
3648
|
+
emptyset: ["∅", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3649
|
+
nabla: ["∇", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3650
|
+
top: ["⊤", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3651
|
+
bot: ["⊥", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3652
|
+
angle: ["∠", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3653
|
+
triangle: ["△", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3654
|
+
backslash: ["∖", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3655
|
+
forall: ["∀", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3656
|
+
exists: ["∃", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3657
|
+
neg: ["¬", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3658
|
+
lnot: ["¬", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3659
|
+
flat: ["♭", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3660
|
+
natural: ["♮", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3661
|
+
sharp: ["♯", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3662
|
+
clubsuit: ["♣", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3663
|
+
diamondsuit: ["♢", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3664
|
+
heartsuit: ["♡", { mathvariant: m.TexConstant.Variant.NORMAL }],
|
|
3665
|
+
spadesuit: ["♠", { mathvariant: m.TexConstant.Variant.NORMAL }]
|
|
3666
|
+
}), new E.CharacterMap("mathchar0mo", c.default.mathchar0mo, {
|
|
3667
|
+
surd: "√",
|
|
3668
|
+
coprod: ["∐", {
|
|
3669
|
+
texClass: e.TEXCLASS.OP,
|
|
3670
|
+
movesupsub: !0
|
|
3671
|
+
}],
|
|
3672
|
+
bigvee: ["⋁", {
|
|
3673
|
+
texClass: e.TEXCLASS.OP,
|
|
3674
|
+
movesupsub: !0
|
|
3675
|
+
}],
|
|
3676
|
+
bigwedge: ["⋀", {
|
|
3677
|
+
texClass: e.TEXCLASS.OP,
|
|
3678
|
+
movesupsub: !0
|
|
3679
|
+
}],
|
|
3680
|
+
biguplus: ["⨄", {
|
|
3681
|
+
texClass: e.TEXCLASS.OP,
|
|
3682
|
+
movesupsub: !0
|
|
3683
|
+
}],
|
|
3684
|
+
bigcap: ["⋂", {
|
|
3685
|
+
texClass: e.TEXCLASS.OP,
|
|
3686
|
+
movesupsub: !0
|
|
3687
|
+
}],
|
|
3688
|
+
bigcup: ["⋃", {
|
|
3689
|
+
texClass: e.TEXCLASS.OP,
|
|
3690
|
+
movesupsub: !0
|
|
3691
|
+
}],
|
|
3692
|
+
int: ["∫", { texClass: e.TEXCLASS.OP }],
|
|
3693
|
+
intop: ["∫", {
|
|
3694
|
+
texClass: e.TEXCLASS.OP,
|
|
3695
|
+
movesupsub: !0,
|
|
3696
|
+
movablelimits: !0
|
|
3697
|
+
}],
|
|
3698
|
+
iint: ["∬", { texClass: e.TEXCLASS.OP }],
|
|
3699
|
+
iiint: ["∭", { texClass: e.TEXCLASS.OP }],
|
|
3700
|
+
prod: ["∏", {
|
|
3701
|
+
texClass: e.TEXCLASS.OP,
|
|
3702
|
+
movesupsub: !0
|
|
3703
|
+
}],
|
|
3704
|
+
sum: ["∑", {
|
|
3705
|
+
texClass: e.TEXCLASS.OP,
|
|
3706
|
+
movesupsub: !0
|
|
3707
|
+
}],
|
|
3708
|
+
bigotimes: ["⨂", {
|
|
3709
|
+
texClass: e.TEXCLASS.OP,
|
|
3710
|
+
movesupsub: !0
|
|
3711
|
+
}],
|
|
3712
|
+
bigoplus: ["⨁", {
|
|
3713
|
+
texClass: e.TEXCLASS.OP,
|
|
3714
|
+
movesupsub: !0
|
|
3715
|
+
}],
|
|
3716
|
+
bigodot: ["⨀", {
|
|
3717
|
+
texClass: e.TEXCLASS.OP,
|
|
3718
|
+
movesupsub: !0
|
|
3719
|
+
}],
|
|
3720
|
+
oint: ["∮", { texClass: e.TEXCLASS.OP }],
|
|
3721
|
+
bigsqcup: ["⨆", {
|
|
3722
|
+
texClass: e.TEXCLASS.OP,
|
|
3723
|
+
movesupsub: !0
|
|
3724
|
+
}],
|
|
3725
|
+
smallint: ["∫", { largeop: !1 }],
|
|
3726
|
+
triangleleft: "◃",
|
|
3727
|
+
triangleright: "▹",
|
|
3728
|
+
bigtriangleup: "△",
|
|
3729
|
+
bigtriangledown: "▽",
|
|
3730
|
+
wedge: "∧",
|
|
3731
|
+
land: "∧",
|
|
3732
|
+
vee: "∨",
|
|
3733
|
+
lor: "∨",
|
|
3734
|
+
cap: "∩",
|
|
3735
|
+
cup: "∪",
|
|
3736
|
+
ddagger: "‡",
|
|
3737
|
+
dagger: "†",
|
|
3738
|
+
sqcap: "⊓",
|
|
3739
|
+
sqcup: "⊔",
|
|
3740
|
+
uplus: "⊎",
|
|
3741
|
+
amalg: "⨿",
|
|
3742
|
+
diamond: "⋄",
|
|
3743
|
+
bullet: "∙",
|
|
3744
|
+
wr: "≀",
|
|
3745
|
+
div: "÷",
|
|
3746
|
+
divsymbol: "÷",
|
|
3747
|
+
odot: ["⊙", { largeop: !1 }],
|
|
3748
|
+
oslash: ["⊘", { largeop: !1 }],
|
|
3749
|
+
otimes: ["⊗", { largeop: !1 }],
|
|
3750
|
+
ominus: ["⊖", { largeop: !1 }],
|
|
3751
|
+
oplus: ["⊕", { largeop: !1 }],
|
|
3752
|
+
mp: "∓",
|
|
3753
|
+
pm: "±",
|
|
3754
|
+
circ: "∘",
|
|
3755
|
+
bigcirc: "◯",
|
|
3756
|
+
setminus: "∖",
|
|
3757
|
+
cdot: "⋅",
|
|
3758
|
+
ast: "∗",
|
|
3759
|
+
times: "×",
|
|
3760
|
+
star: "⋆",
|
|
3761
|
+
propto: "∝",
|
|
3762
|
+
sqsubseteq: "⊑",
|
|
3763
|
+
sqsupseteq: "⊒",
|
|
3764
|
+
parallel: "∥",
|
|
3765
|
+
mid: "∣",
|
|
3766
|
+
dashv: "⊣",
|
|
3767
|
+
vdash: "⊢",
|
|
3768
|
+
leq: "≤",
|
|
3769
|
+
le: "≤",
|
|
3770
|
+
geq: "≥",
|
|
3771
|
+
ge: "≥",
|
|
3772
|
+
lt: "<",
|
|
3773
|
+
gt: ">",
|
|
3774
|
+
succ: "≻",
|
|
3775
|
+
prec: "≺",
|
|
3776
|
+
approx: "≈",
|
|
3777
|
+
succeq: "⪰",
|
|
3778
|
+
preceq: "⪯",
|
|
3779
|
+
supset: "⊃",
|
|
3780
|
+
subset: "⊂",
|
|
3781
|
+
supseteq: "⊇",
|
|
3782
|
+
subseteq: "⊆",
|
|
3783
|
+
in: "∈",
|
|
3784
|
+
ni: "∋",
|
|
3785
|
+
notin: "∉",
|
|
3786
|
+
owns: "∋",
|
|
3787
|
+
gg: "≫",
|
|
3788
|
+
ll: "≪",
|
|
3789
|
+
sim: "∼",
|
|
3790
|
+
simeq: "≃",
|
|
3791
|
+
perp: "⊥",
|
|
3792
|
+
equiv: "≡",
|
|
3793
|
+
asymp: "≍",
|
|
3794
|
+
smile: "⌣",
|
|
3795
|
+
frown: "⌢",
|
|
3796
|
+
ne: "≠",
|
|
3797
|
+
neq: "≠",
|
|
3798
|
+
cong: "≅",
|
|
3799
|
+
doteq: "≐",
|
|
3800
|
+
bowtie: "⋈",
|
|
3801
|
+
models: "⊨",
|
|
3802
|
+
notChar: "⧸",
|
|
3803
|
+
Leftrightarrow: "⇔",
|
|
3804
|
+
Leftarrow: "⇐",
|
|
3805
|
+
Rightarrow: "⇒",
|
|
3806
|
+
leftrightarrow: "↔",
|
|
3807
|
+
leftarrow: "←",
|
|
3808
|
+
gets: "←",
|
|
3809
|
+
rightarrow: "→",
|
|
3810
|
+
to: ["→", { accent: !1 }],
|
|
3811
|
+
mapsto: "↦",
|
|
3812
|
+
leftharpoonup: "↼",
|
|
3813
|
+
leftharpoondown: "↽",
|
|
3814
|
+
rightharpoonup: "⇀",
|
|
3815
|
+
rightharpoondown: "⇁",
|
|
3816
|
+
nearrow: "↗",
|
|
3817
|
+
searrow: "↘",
|
|
3818
|
+
nwarrow: "↖",
|
|
3819
|
+
swarrow: "↙",
|
|
3820
|
+
rightleftharpoons: "⇌",
|
|
3821
|
+
hookrightarrow: "↪",
|
|
3822
|
+
hookleftarrow: "↩",
|
|
3823
|
+
longleftarrow: "⟵",
|
|
3824
|
+
Longleftarrow: "⟸",
|
|
3825
|
+
longrightarrow: "⟶",
|
|
3826
|
+
Longrightarrow: "⟹",
|
|
3827
|
+
Longleftrightarrow: "⟺",
|
|
3828
|
+
longleftrightarrow: "⟷",
|
|
3829
|
+
longmapsto: "⟼",
|
|
3830
|
+
ldots: "…",
|
|
3831
|
+
cdots: "⋯",
|
|
3832
|
+
vdots: "⋮",
|
|
3833
|
+
ddots: "⋱",
|
|
3834
|
+
dotsc: "…",
|
|
3835
|
+
dotsb: "⋯",
|
|
3836
|
+
dotsm: "⋯",
|
|
3837
|
+
dotsi: "⋯",
|
|
3838
|
+
dotso: "…",
|
|
3839
|
+
ldotp: [".", { texClass: e.TEXCLASS.PUNCT }],
|
|
3840
|
+
cdotp: ["⋅", { texClass: e.TEXCLASS.PUNCT }],
|
|
3841
|
+
colon: [":", { texClass: e.TEXCLASS.PUNCT }]
|
|
3842
|
+
}), new E.CharacterMap("mathchar7", c.default.mathchar7, {
|
|
3843
|
+
Gamma: "Γ",
|
|
3844
|
+
Delta: "Δ",
|
|
3845
|
+
Theta: "Θ",
|
|
3846
|
+
Lambda: "Λ",
|
|
3847
|
+
Xi: "Ξ",
|
|
3848
|
+
Pi: "Π",
|
|
3849
|
+
Sigma: "Σ",
|
|
3850
|
+
Upsilon: "Υ",
|
|
3851
|
+
Phi: "Φ",
|
|
3852
|
+
Psi: "Ψ",
|
|
3853
|
+
Omega: "Ω",
|
|
3854
|
+
_: "_",
|
|
3855
|
+
"#": "#",
|
|
3856
|
+
$: "$",
|
|
3857
|
+
"%": "%",
|
|
3858
|
+
"&": "&",
|
|
3859
|
+
And: "&"
|
|
3860
|
+
}), new E.DelimiterMap("delimiter", c.default.delimiter, {
|
|
3861
|
+
"(": "(",
|
|
3862
|
+
")": ")",
|
|
3863
|
+
"[": "[",
|
|
3864
|
+
"]": "]",
|
|
3865
|
+
"<": "⟨",
|
|
3866
|
+
">": "⟩",
|
|
3867
|
+
"\\lt": "⟨",
|
|
3868
|
+
"\\gt": "⟩",
|
|
3869
|
+
"/": "/",
|
|
3870
|
+
"|": ["|", { texClass: e.TEXCLASS.ORD }],
|
|
3871
|
+
".": "",
|
|
3872
|
+
"\\\\": "\\",
|
|
3873
|
+
"\\lmoustache": "⎰",
|
|
3874
|
+
"\\rmoustache": "⎱",
|
|
3875
|
+
"\\lgroup": "⟮",
|
|
3876
|
+
"\\rgroup": "⟯",
|
|
3877
|
+
"\\arrowvert": "⏐",
|
|
3878
|
+
"\\Arrowvert": "‖",
|
|
3879
|
+
"\\bracevert": "⎪",
|
|
3880
|
+
"\\Vert": ["‖", { texClass: e.TEXCLASS.ORD }],
|
|
3881
|
+
"\\|": ["‖", { texClass: e.TEXCLASS.ORD }],
|
|
3882
|
+
"\\vert": ["|", { texClass: e.TEXCLASS.ORD }],
|
|
3883
|
+
"\\uparrow": "↑",
|
|
3884
|
+
"\\downarrow": "↓",
|
|
3885
|
+
"\\updownarrow": "↕",
|
|
3886
|
+
"\\Uparrow": "⇑",
|
|
3887
|
+
"\\Downarrow": "⇓",
|
|
3888
|
+
"\\Updownarrow": "⇕",
|
|
3889
|
+
"\\backslash": "\\",
|
|
3890
|
+
"\\rangle": "⟩",
|
|
3891
|
+
"\\langle": "⟨",
|
|
3892
|
+
"\\rbrace": "}",
|
|
3893
|
+
"\\lbrace": "{",
|
|
3894
|
+
"\\}": "}",
|
|
3895
|
+
"\\{": "{",
|
|
3896
|
+
"\\rceil": "⌉",
|
|
3897
|
+
"\\lceil": "⌈",
|
|
3898
|
+
"\\rfloor": "⌋",
|
|
3899
|
+
"\\lfloor": "⌊",
|
|
3900
|
+
"\\lbrack": "[",
|
|
3901
|
+
"\\rbrack": "]"
|
|
3902
|
+
}), new E.CommandMap("macros", {
|
|
3903
|
+
displaystyle: ["SetStyle", "D", !0, 0],
|
|
3904
|
+
textstyle: ["SetStyle", "T", !1, 0],
|
|
3905
|
+
scriptstyle: ["SetStyle", "S", !1, 1],
|
|
3906
|
+
scriptscriptstyle: ["SetStyle", "SS", !1, 2],
|
|
3907
|
+
rm: ["SetFont", m.TexConstant.Variant.NORMAL],
|
|
3908
|
+
mit: ["SetFont", m.TexConstant.Variant.ITALIC],
|
|
3909
|
+
oldstyle: ["SetFont", m.TexConstant.Variant.OLDSTYLE],
|
|
3910
|
+
cal: ["SetFont", m.TexConstant.Variant.CALLIGRAPHIC],
|
|
3911
|
+
it: ["SetFont", m.TexConstant.Variant.MATHITALIC],
|
|
3912
|
+
bf: ["SetFont", m.TexConstant.Variant.BOLD],
|
|
3913
|
+
bbFont: ["SetFont", m.TexConstant.Variant.DOUBLESTRUCK],
|
|
3914
|
+
scr: ["SetFont", m.TexConstant.Variant.SCRIPT],
|
|
3915
|
+
frak: ["SetFont", m.TexConstant.Variant.FRAKTUR],
|
|
3916
|
+
sf: ["SetFont", m.TexConstant.Variant.SANSSERIF],
|
|
3917
|
+
tt: ["SetFont", m.TexConstant.Variant.MONOSPACE],
|
|
3918
|
+
mathrm: ["MathFont", m.TexConstant.Variant.NORMAL],
|
|
3919
|
+
mathup: ["MathFont", m.TexConstant.Variant.NORMAL],
|
|
3920
|
+
mathnormal: ["MathFont", ""],
|
|
3921
|
+
mathbf: ["MathFont", m.TexConstant.Variant.BOLD],
|
|
3922
|
+
mathbfup: ["MathFont", m.TexConstant.Variant.BOLD],
|
|
3923
|
+
mathit: ["MathFont", m.TexConstant.Variant.MATHITALIC],
|
|
3924
|
+
mathbfit: ["MathFont", m.TexConstant.Variant.BOLDITALIC],
|
|
3925
|
+
mathbb: ["MathFont", m.TexConstant.Variant.DOUBLESTRUCK],
|
|
3926
|
+
Bbb: ["MathFont", m.TexConstant.Variant.DOUBLESTRUCK],
|
|
3927
|
+
mathfrak: ["MathFont", m.TexConstant.Variant.FRAKTUR],
|
|
3928
|
+
mathbffrak: ["MathFont", m.TexConstant.Variant.BOLDFRAKTUR],
|
|
3929
|
+
mathscr: ["MathFont", m.TexConstant.Variant.SCRIPT],
|
|
3930
|
+
mathbfscr: ["MathFont", m.TexConstant.Variant.BOLDSCRIPT],
|
|
3931
|
+
mathsf: ["MathFont", m.TexConstant.Variant.SANSSERIF],
|
|
3932
|
+
mathsfup: ["MathFont", m.TexConstant.Variant.SANSSERIF],
|
|
3933
|
+
mathbfsf: ["MathFont", m.TexConstant.Variant.BOLDSANSSERIF],
|
|
3934
|
+
mathbfsfup: ["MathFont", m.TexConstant.Variant.BOLDSANSSERIF],
|
|
3935
|
+
mathsfit: ["MathFont", m.TexConstant.Variant.SANSSERIFITALIC],
|
|
3936
|
+
mathbfsfit: ["MathFont", m.TexConstant.Variant.SANSSERIFBOLDITALIC],
|
|
3937
|
+
mathtt: ["MathFont", m.TexConstant.Variant.MONOSPACE],
|
|
3938
|
+
mathcal: ["MathFont", m.TexConstant.Variant.CALLIGRAPHIC],
|
|
3939
|
+
mathbfcal: ["MathFont", m.TexConstant.Variant.BOLDCALLIGRAPHIC],
|
|
3940
|
+
symrm: ["MathFont", m.TexConstant.Variant.NORMAL],
|
|
3941
|
+
symup: ["MathFont", m.TexConstant.Variant.NORMAL],
|
|
3942
|
+
symnormal: ["MathFont", ""],
|
|
3943
|
+
symbf: ["MathFont", m.TexConstant.Variant.BOLD],
|
|
3944
|
+
symbfup: ["MathFont", m.TexConstant.Variant.BOLD],
|
|
3945
|
+
symit: ["MathFont", m.TexConstant.Variant.ITALIC],
|
|
3946
|
+
symbfit: ["MathFont", m.TexConstant.Variant.BOLDITALIC],
|
|
3947
|
+
symbb: ["MathFont", m.TexConstant.Variant.DOUBLESTRUCK],
|
|
3948
|
+
symfrak: ["MathFont", m.TexConstant.Variant.FRAKTUR],
|
|
3949
|
+
symbffrak: ["MathFont", m.TexConstant.Variant.BOLDFRAKTUR],
|
|
3950
|
+
symscr: ["MathFont", m.TexConstant.Variant.SCRIPT],
|
|
3951
|
+
symbfscr: ["MathFont", m.TexConstant.Variant.BOLDSCRIPT],
|
|
3952
|
+
symsf: ["MathFont", m.TexConstant.Variant.SANSSERIF],
|
|
3953
|
+
symsfup: ["MathFont", m.TexConstant.Variant.SANSSERIF],
|
|
3954
|
+
symbfsf: ["MathFont", m.TexConstant.Variant.BOLDSANSSERIF],
|
|
3955
|
+
symbfsfup: ["MathFont", m.TexConstant.Variant.BOLDSANSSERIF],
|
|
3956
|
+
symsfit: ["MathFont", m.TexConstant.Variant.SANSSERIFITALIC],
|
|
3957
|
+
symbfsfit: ["MathFont", m.TexConstant.Variant.SANSSERIFBOLDITALIC],
|
|
3958
|
+
symtt: ["MathFont", m.TexConstant.Variant.MONOSPACE],
|
|
3959
|
+
symcal: ["MathFont", m.TexConstant.Variant.CALLIGRAPHIC],
|
|
3960
|
+
symbfcal: ["MathFont", m.TexConstant.Variant.BOLDCALLIGRAPHIC],
|
|
3961
|
+
textrm: ["HBox", null, m.TexConstant.Variant.NORMAL],
|
|
3962
|
+
textup: ["HBox", null, m.TexConstant.Variant.NORMAL],
|
|
3963
|
+
textnormal: ["HBox"],
|
|
3964
|
+
textit: ["HBox", null, m.TexConstant.Variant.ITALIC],
|
|
3965
|
+
textbf: ["HBox", null, m.TexConstant.Variant.BOLD],
|
|
3966
|
+
textsf: ["HBox", null, m.TexConstant.Variant.SANSSERIF],
|
|
3967
|
+
texttt: ["HBox", null, m.TexConstant.Variant.MONOSPACE],
|
|
3968
|
+
tiny: ["SetSize", 0.5],
|
|
3969
|
+
Tiny: ["SetSize", 0.6],
|
|
3970
|
+
scriptsize: ["SetSize", 0.7],
|
|
3971
|
+
small: ["SetSize", 0.85],
|
|
3972
|
+
normalsize: ["SetSize", 1],
|
|
3973
|
+
large: ["SetSize", 1.2],
|
|
3974
|
+
Large: ["SetSize", 1.44],
|
|
3975
|
+
LARGE: ["SetSize", 1.73],
|
|
3976
|
+
huge: ["SetSize", 2.07],
|
|
3977
|
+
Huge: ["SetSize", 2.49],
|
|
3978
|
+
arcsin: "NamedFn",
|
|
3979
|
+
arccos: "NamedFn",
|
|
3980
|
+
arctan: "NamedFn",
|
|
3981
|
+
arg: "NamedFn",
|
|
3982
|
+
cos: "NamedFn",
|
|
3983
|
+
cosh: "NamedFn",
|
|
3984
|
+
cot: "NamedFn",
|
|
3985
|
+
coth: "NamedFn",
|
|
3986
|
+
csc: "NamedFn",
|
|
3987
|
+
deg: "NamedFn",
|
|
3988
|
+
det: "NamedOp",
|
|
3989
|
+
dim: "NamedFn",
|
|
3990
|
+
exp: "NamedFn",
|
|
3991
|
+
gcd: "NamedOp",
|
|
3992
|
+
hom: "NamedFn",
|
|
3993
|
+
inf: "NamedOp",
|
|
3994
|
+
ker: "NamedFn",
|
|
3995
|
+
lg: "NamedFn",
|
|
3996
|
+
lim: "NamedOp",
|
|
3997
|
+
liminf: ["NamedOp", "lim inf"],
|
|
3998
|
+
limsup: ["NamedOp", "lim sup"],
|
|
3999
|
+
ln: "NamedFn",
|
|
4000
|
+
log: "NamedFn",
|
|
4001
|
+
max: "NamedOp",
|
|
4002
|
+
min: "NamedOp",
|
|
4003
|
+
Pr: "NamedOp",
|
|
4004
|
+
sec: "NamedFn",
|
|
4005
|
+
sin: "NamedFn",
|
|
4006
|
+
sinh: "NamedFn",
|
|
4007
|
+
sup: "NamedOp",
|
|
4008
|
+
tan: "NamedFn",
|
|
4009
|
+
tanh: "NamedFn",
|
|
4010
|
+
limits: ["Limits", 1],
|
|
4011
|
+
nolimits: ["Limits", 0],
|
|
4012
|
+
overline: ["UnderOver", "2015"],
|
|
4013
|
+
underline: ["UnderOver", "2015"],
|
|
4014
|
+
overbrace: ["UnderOver", "23DE", 1],
|
|
4015
|
+
underbrace: ["UnderOver", "23DF", 1],
|
|
4016
|
+
overparen: ["UnderOver", "23DC"],
|
|
4017
|
+
underparen: ["UnderOver", "23DD"],
|
|
4018
|
+
overrightarrow: ["UnderOver", "2192"],
|
|
4019
|
+
underrightarrow: ["UnderOver", "2192"],
|
|
4020
|
+
overleftarrow: ["UnderOver", "2190"],
|
|
4021
|
+
underleftarrow: ["UnderOver", "2190"],
|
|
4022
|
+
overleftrightarrow: ["UnderOver", "2194"],
|
|
4023
|
+
underleftrightarrow: ["UnderOver", "2194"],
|
|
4024
|
+
overset: "Overset",
|
|
4025
|
+
underset: "Underset",
|
|
4026
|
+
overunderset: "Overunderset",
|
|
4027
|
+
stackrel: ["Macro", "\\mathrel{\\mathop{#2}\\limits^{#1}}", 2],
|
|
4028
|
+
stackbin: ["Macro", "\\mathbin{\\mathop{#2}\\limits^{#1}}", 2],
|
|
4029
|
+
over: "Over",
|
|
4030
|
+
overwithdelims: "Over",
|
|
4031
|
+
atop: "Over",
|
|
4032
|
+
atopwithdelims: "Over",
|
|
4033
|
+
above: "Over",
|
|
4034
|
+
abovewithdelims: "Over",
|
|
4035
|
+
brace: ["Over", "{", "}"],
|
|
4036
|
+
brack: ["Over", "[", "]"],
|
|
4037
|
+
choose: ["Over", "(", ")"],
|
|
4038
|
+
frac: "Frac",
|
|
4039
|
+
sqrt: "Sqrt",
|
|
4040
|
+
root: "Root",
|
|
4041
|
+
uproot: ["MoveRoot", "upRoot"],
|
|
4042
|
+
leftroot: ["MoveRoot", "leftRoot"],
|
|
4043
|
+
left: "LeftRight",
|
|
4044
|
+
right: "LeftRight",
|
|
4045
|
+
middle: "LeftRight",
|
|
4046
|
+
llap: "Lap",
|
|
4047
|
+
rlap: "Lap",
|
|
4048
|
+
raise: "RaiseLower",
|
|
4049
|
+
lower: "RaiseLower",
|
|
4050
|
+
moveleft: "MoveLeftRight",
|
|
4051
|
+
moveright: "MoveLeftRight",
|
|
4052
|
+
",": ["Spacer", r.MATHSPACE.thinmathspace],
|
|
4053
|
+
":": ["Spacer", r.MATHSPACE.mediummathspace],
|
|
4054
|
+
">": ["Spacer", r.MATHSPACE.mediummathspace],
|
|
4055
|
+
";": ["Spacer", r.MATHSPACE.thickmathspace],
|
|
4056
|
+
"!": ["Spacer", r.MATHSPACE.negativethinmathspace],
|
|
4057
|
+
enspace: ["Spacer", 0.5],
|
|
4058
|
+
quad: ["Spacer", 1],
|
|
4059
|
+
qquad: ["Spacer", 2],
|
|
4060
|
+
thinspace: ["Spacer", r.MATHSPACE.thinmathspace],
|
|
4061
|
+
negthinspace: ["Spacer", r.MATHSPACE.negativethinmathspace],
|
|
4062
|
+
hskip: "Hskip",
|
|
4063
|
+
hspace: "Hskip",
|
|
4064
|
+
kern: "Hskip",
|
|
4065
|
+
mskip: "Hskip",
|
|
4066
|
+
mspace: "Hskip",
|
|
4067
|
+
mkern: "Hskip",
|
|
4068
|
+
rule: "rule",
|
|
4069
|
+
Rule: ["Rule"],
|
|
4070
|
+
Space: ["Rule", "blank"],
|
|
4071
|
+
nonscript: "Nonscript",
|
|
4072
|
+
big: ["MakeBig", e.TEXCLASS.ORD, 0.85],
|
|
4073
|
+
Big: ["MakeBig", e.TEXCLASS.ORD, 1.15],
|
|
4074
|
+
bigg: ["MakeBig", e.TEXCLASS.ORD, 1.45],
|
|
4075
|
+
Bigg: ["MakeBig", e.TEXCLASS.ORD, 1.75],
|
|
4076
|
+
bigl: ["MakeBig", e.TEXCLASS.OPEN, 0.85],
|
|
4077
|
+
Bigl: ["MakeBig", e.TEXCLASS.OPEN, 1.15],
|
|
4078
|
+
biggl: ["MakeBig", e.TEXCLASS.OPEN, 1.45],
|
|
4079
|
+
Biggl: ["MakeBig", e.TEXCLASS.OPEN, 1.75],
|
|
4080
|
+
bigr: ["MakeBig", e.TEXCLASS.CLOSE, 0.85],
|
|
4081
|
+
Bigr: ["MakeBig", e.TEXCLASS.CLOSE, 1.15],
|
|
4082
|
+
biggr: ["MakeBig", e.TEXCLASS.CLOSE, 1.45],
|
|
4083
|
+
Biggr: ["MakeBig", e.TEXCLASS.CLOSE, 1.75],
|
|
4084
|
+
bigm: ["MakeBig", e.TEXCLASS.REL, 0.85],
|
|
4085
|
+
Bigm: ["MakeBig", e.TEXCLASS.REL, 1.15],
|
|
4086
|
+
biggm: ["MakeBig", e.TEXCLASS.REL, 1.45],
|
|
4087
|
+
Biggm: ["MakeBig", e.TEXCLASS.REL, 1.75],
|
|
4088
|
+
mathord: ["TeXAtom", e.TEXCLASS.ORD],
|
|
4089
|
+
mathop: ["TeXAtom", e.TEXCLASS.OP],
|
|
4090
|
+
mathopen: ["TeXAtom", e.TEXCLASS.OPEN],
|
|
4091
|
+
mathclose: ["TeXAtom", e.TEXCLASS.CLOSE],
|
|
4092
|
+
mathbin: ["TeXAtom", e.TEXCLASS.BIN],
|
|
4093
|
+
mathrel: ["TeXAtom", e.TEXCLASS.REL],
|
|
4094
|
+
mathpunct: ["TeXAtom", e.TEXCLASS.PUNCT],
|
|
4095
|
+
mathinner: ["TeXAtom", e.TEXCLASS.INNER],
|
|
4096
|
+
vcenter: ["TeXAtom", e.TEXCLASS.VCENTER],
|
|
4097
|
+
buildrel: "BuildRel",
|
|
4098
|
+
hbox: ["HBox", 0],
|
|
4099
|
+
text: "HBox",
|
|
4100
|
+
mbox: ["HBox", 0],
|
|
4101
|
+
fbox: "FBox",
|
|
4102
|
+
boxed: ["Macro", "\\fbox{$\\displaystyle{#1}$}", 1],
|
|
4103
|
+
framebox: "FrameBox",
|
|
4104
|
+
strut: "Strut",
|
|
4105
|
+
mathstrut: ["Macro", "\\vphantom{(}"],
|
|
4106
|
+
phantom: "Phantom",
|
|
4107
|
+
vphantom: ["Phantom", 1, 0],
|
|
4108
|
+
hphantom: ["Phantom", 0, 1],
|
|
4109
|
+
smash: "Smash",
|
|
4110
|
+
acute: ["Accent", "00B4"],
|
|
4111
|
+
grave: ["Accent", "0060"],
|
|
4112
|
+
ddot: ["Accent", "00A8"],
|
|
4113
|
+
tilde: ["Accent", "007E"],
|
|
4114
|
+
bar: ["Accent", "00AF"],
|
|
4115
|
+
breve: ["Accent", "02D8"],
|
|
4116
|
+
check: ["Accent", "02C7"],
|
|
4117
|
+
hat: ["Accent", "005E"],
|
|
4118
|
+
vec: ["Accent", "2192"],
|
|
4119
|
+
dot: ["Accent", "02D9"],
|
|
4120
|
+
widetilde: ["Accent", "007E", 1],
|
|
4121
|
+
widehat: ["Accent", "005E", 1],
|
|
4122
|
+
matrix: "Matrix",
|
|
4123
|
+
array: "Matrix",
|
|
4124
|
+
pmatrix: ["Matrix", "(", ")"],
|
|
4125
|
+
cases: [
|
|
4126
|
+
"Matrix",
|
|
4127
|
+
"{",
|
|
4128
|
+
"",
|
|
4129
|
+
"left left",
|
|
4130
|
+
null,
|
|
4131
|
+
".1em",
|
|
4132
|
+
null,
|
|
4133
|
+
!0
|
|
4134
|
+
],
|
|
4135
|
+
eqalign: [
|
|
4136
|
+
"Matrix",
|
|
4137
|
+
null,
|
|
4138
|
+
null,
|
|
4139
|
+
"right left",
|
|
4140
|
+
(0, r.em)(r.MATHSPACE.thickmathspace),
|
|
4141
|
+
".5em",
|
|
4142
|
+
"D"
|
|
4143
|
+
],
|
|
4144
|
+
displaylines: ["Matrix", null, null, "center", null, ".5em", "D"],
|
|
4145
|
+
cr: "Cr",
|
|
4146
|
+
"\\": "CrLaTeX",
|
|
4147
|
+
newline: ["CrLaTeX", !0],
|
|
4148
|
+
hline: ["HLine", "solid"],
|
|
4149
|
+
hdashline: ["HLine", "dashed"],
|
|
4150
|
+
eqalignno: [
|
|
4151
|
+
"Matrix",
|
|
4152
|
+
null,
|
|
4153
|
+
null,
|
|
4154
|
+
"right left",
|
|
4155
|
+
(0, r.em)(r.MATHSPACE.thickmathspace),
|
|
4156
|
+
".5em",
|
|
4157
|
+
"D",
|
|
4158
|
+
null,
|
|
4159
|
+
"right"
|
|
4160
|
+
],
|
|
4161
|
+
leqalignno: [
|
|
4162
|
+
"Matrix",
|
|
4163
|
+
null,
|
|
4164
|
+
null,
|
|
4165
|
+
"right left",
|
|
4166
|
+
(0, r.em)(r.MATHSPACE.thickmathspace),
|
|
4167
|
+
".5em",
|
|
4168
|
+
"D",
|
|
4169
|
+
null,
|
|
4170
|
+
"left"
|
|
4171
|
+
],
|
|
4172
|
+
hfill: "HFill",
|
|
4173
|
+
hfil: "HFill",
|
|
4174
|
+
hfilll: "HFill",
|
|
4175
|
+
bmod: ["Macro", '\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],
|
|
4176
|
+
pmod: ["Macro", "\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}", 1],
|
|
4177
|
+
mod: [
|
|
4178
|
+
"Macro",
|
|
4179
|
+
"\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",
|
|
4180
|
+
1
|
|
4181
|
+
],
|
|
4182
|
+
pod: ["Macro", "\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)", 1],
|
|
4183
|
+
iff: ["Macro", "\\;\\Longleftrightarrow\\;"],
|
|
4184
|
+
skew: ["Macro", "{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}", 3],
|
|
4185
|
+
pmb: ["Macro", "\\rlap{#1}\\kern1px{#1}", 1],
|
|
4186
|
+
TeX: ["Macro", "T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],
|
|
4187
|
+
LaTeX: ["Macro", "L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"],
|
|
4188
|
+
" ": ["Macro", "\\text{ }"],
|
|
4189
|
+
not: "Not",
|
|
4190
|
+
dots: "Dots",
|
|
4191
|
+
space: "Tilde",
|
|
4192
|
+
" ": "Tilde",
|
|
4193
|
+
begin: "BeginEnd",
|
|
4194
|
+
end: "BeginEnd",
|
|
4195
|
+
label: "HandleLabel",
|
|
4196
|
+
ref: "HandleRef",
|
|
4197
|
+
nonumber: "HandleNoTag",
|
|
4198
|
+
mathchoice: "MathChoice",
|
|
4199
|
+
mmlToken: "MmlToken"
|
|
4200
|
+
}, d.default), new E.EnvironmentMap("environment", c.default.environment, {
|
|
4201
|
+
array: ["AlignedArray"],
|
|
4202
|
+
equation: ["Equation", null, !0],
|
|
4203
|
+
eqnarray: [
|
|
4204
|
+
"EqnArray",
|
|
4205
|
+
null,
|
|
4206
|
+
!0,
|
|
4207
|
+
!0,
|
|
4208
|
+
"rcl",
|
|
4209
|
+
h.default.cols(0, r.MATHSPACE.thickmathspace),
|
|
4210
|
+
".5em"
|
|
4211
|
+
]
|
|
4212
|
+
}, d.default), new E.CharacterMap("not_remap", null, {
|
|
4213
|
+
"←": "↚",
|
|
4214
|
+
"→": "↛",
|
|
4215
|
+
"↔": "↮",
|
|
4216
|
+
"⇐": "⇍",
|
|
4217
|
+
"⇒": "⇏",
|
|
4218
|
+
"⇔": "⇎",
|
|
4219
|
+
"∈": "∉",
|
|
4220
|
+
"∋": "∌",
|
|
4221
|
+
"∣": "∤",
|
|
4222
|
+
"∥": "∦",
|
|
4223
|
+
"∼": "≁",
|
|
4224
|
+
"~": "≁",
|
|
4225
|
+
"≃": "≄",
|
|
4226
|
+
"≅": "≇",
|
|
4227
|
+
"≈": "≉",
|
|
4228
|
+
"≍": "≭",
|
|
4229
|
+
"=": "≠",
|
|
4230
|
+
"≡": "≢",
|
|
4231
|
+
"<": "≮",
|
|
4232
|
+
">": "≯",
|
|
4233
|
+
"≤": "≰",
|
|
4234
|
+
"≥": "≱",
|
|
4235
|
+
"≲": "≴",
|
|
4236
|
+
"≳": "≵",
|
|
4237
|
+
"≶": "≸",
|
|
4238
|
+
"≷": "≹",
|
|
4239
|
+
"≺": "⊀",
|
|
4240
|
+
"≻": "⊁",
|
|
4241
|
+
"⊂": "⊄",
|
|
4242
|
+
"⊃": "⊅",
|
|
4243
|
+
"⊆": "⊈",
|
|
4244
|
+
"⊇": "⊉",
|
|
4245
|
+
"⊢": "⊬",
|
|
4246
|
+
"⊨": "⊭",
|
|
4247
|
+
"⊩": "⊮",
|
|
4248
|
+
"⊫": "⊯",
|
|
4249
|
+
"≼": "⋠",
|
|
4250
|
+
"≽": "⋡",
|
|
4251
|
+
"⊑": "⋢",
|
|
4252
|
+
"⊒": "⋣",
|
|
4253
|
+
"⊲": "⋪",
|
|
4254
|
+
"⊳": "⋫",
|
|
4255
|
+
"⊴": "⋬",
|
|
4256
|
+
"⊵": "⋭",
|
|
4257
|
+
"∃": "∄"
|
|
4258
|
+
}), st;
|
|
4259
|
+
}
|
|
4260
|
+
var Jt;
|
|
4261
|
+
function Te() {
|
|
4262
|
+
if (Jt) return Z;
|
|
4263
|
+
Jt = 1;
|
|
4264
|
+
var M = Z && Z.__extends || /* @__PURE__ */ (function() {
|
|
4265
|
+
var C = function(t, u) {
|
|
4266
|
+
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, s) {
|
|
4267
|
+
o.__proto__ = s;
|
|
4268
|
+
} || function(o, s) {
|
|
4269
|
+
for (var l in s) Object.prototype.hasOwnProperty.call(s, l) && (o[l] = s[l]);
|
|
4270
|
+
}, C(t, u);
|
|
4271
|
+
};
|
|
4272
|
+
return function(t, u) {
|
|
4273
|
+
if (typeof u != "function" && u !== null)
|
|
4274
|
+
throw new TypeError("Class extends value " + String(u) + " is not a constructor or null");
|
|
4275
|
+
C(t, u);
|
|
4276
|
+
function o() {
|
|
4277
|
+
this.constructor = t;
|
|
4278
|
+
}
|
|
4279
|
+
t.prototype = u === null ? Object.create(u) : (o.prototype = u.prototype, new o());
|
|
4280
|
+
};
|
|
4281
|
+
})(), _ = Z && Z.__createBinding || (Object.create ? (function(C, t, u, o) {
|
|
4282
|
+
o === void 0 && (o = u);
|
|
4283
|
+
var s = Object.getOwnPropertyDescriptor(t, u);
|
|
4284
|
+
(!s || ("get" in s ? !t.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: function() {
|
|
4285
|
+
return t[u];
|
|
4286
|
+
} }), Object.defineProperty(C, o, s);
|
|
4287
|
+
}) : (function(C, t, u, o) {
|
|
4288
|
+
o === void 0 && (o = u), C[o] = t[u];
|
|
4289
|
+
})), X = Z && Z.__setModuleDefault || (Object.create ? (function(C, t) {
|
|
4290
|
+
Object.defineProperty(C, "default", { enumerable: !0, value: t });
|
|
4291
|
+
}) : function(C, t) {
|
|
4292
|
+
C.default = t;
|
|
4293
|
+
}), j = Z && Z.__importStar || function(C) {
|
|
4294
|
+
if (C && C.__esModule) return C;
|
|
4295
|
+
var t = {};
|
|
4296
|
+
if (C != null) for (var u in C) u !== "default" && Object.prototype.hasOwnProperty.call(C, u) && _(t, C, u);
|
|
4297
|
+
return X(t, C), t;
|
|
4298
|
+
}, E = Z && Z.__values || function(C) {
|
|
4299
|
+
var t = typeof Symbol == "function" && Symbol.iterator, u = t && C[t], o = 0;
|
|
4300
|
+
if (u) return u.call(C);
|
|
4301
|
+
if (C && typeof C.length == "number") return {
|
|
4302
|
+
next: function() {
|
|
4303
|
+
return C && o >= C.length && (C = void 0), { value: C && C[o++], done: !C };
|
|
4304
|
+
}
|
|
4305
|
+
};
|
|
4306
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
4307
|
+
}, m = Z && Z.__importDefault || function(C) {
|
|
4308
|
+
return C && C.__esModule ? C : { default: C };
|
|
4309
|
+
}, d;
|
|
4310
|
+
Object.defineProperty(Z, "__esModule", { value: !0 }), Z.BaseConfiguration = Z.BaseTags = Z.Other = void 0;
|
|
4311
|
+
var c = he(), h = Pt(), e = m(St()), r = m(pt()), n = re(), a = j(ne()), i = xt();
|
|
4312
|
+
ve();
|
|
4313
|
+
var v = se();
|
|
4314
|
+
new n.CharacterMap("remap", null, {
|
|
4315
|
+
"-": "−",
|
|
4316
|
+
"*": "∗",
|
|
4317
|
+
"`": "‘"
|
|
4318
|
+
});
|
|
4319
|
+
function p(C, t) {
|
|
4320
|
+
var u = C.stack.env.font, o = u ? { mathvariant: C.stack.env.font } : {}, s = h.MapHandler.getMap("remap").lookup(t), l = (0, v.getRange)(t), O = l ? l[3] : "mo", k = C.create("token", O, o, s ? s.char : t);
|
|
4321
|
+
l[4] && k.attributes.set("mathvariant", l[4]), O === "mo" && (r.default.setProperty(k, "fixStretchy", !0), C.configuration.addNode("fixStretchy", k)), C.Push(k);
|
|
4322
|
+
}
|
|
4323
|
+
Z.Other = p;
|
|
4324
|
+
function y(C, t) {
|
|
4325
|
+
throw new e.default("UndefinedControlSequence", "Undefined control sequence %1", "\\" + t);
|
|
4326
|
+
}
|
|
4327
|
+
function f(C, t) {
|
|
4328
|
+
throw new e.default("UnknownEnv", "Unknown environment '%1'", t);
|
|
4329
|
+
}
|
|
4330
|
+
function A(C) {
|
|
4331
|
+
var t, u, o = C.data;
|
|
4332
|
+
try {
|
|
4333
|
+
for (var s = E(o.getList("nonscript")), l = s.next(); !l.done; l = s.next()) {
|
|
4334
|
+
var O = l.value;
|
|
4335
|
+
if (O.attributes.get("scriptlevel") > 0) {
|
|
4336
|
+
var k = O.parent;
|
|
4337
|
+
if (k.childNodes.splice(k.childIndex(O), 1), o.removeFromList(O.kind, [O]), O.isKind("mrow")) {
|
|
4338
|
+
var N = O.childNodes[0];
|
|
4339
|
+
o.removeFromList("mstyle", [N]), o.removeFromList("mspace", N.childNodes[0].childNodes);
|
|
4340
|
+
}
|
|
4341
|
+
} else O.isKind("mrow") && (O.parent.replaceChild(O.childNodes[0], O), o.removeFromList("mrow", [O]));
|
|
4342
|
+
}
|
|
4343
|
+
} catch (I) {
|
|
4344
|
+
t = { error: I };
|
|
4345
|
+
} finally {
|
|
4346
|
+
try {
|
|
4347
|
+
l && !l.done && (u = s.return) && u.call(s);
|
|
4348
|
+
} finally {
|
|
4349
|
+
if (t) throw t.error;
|
|
4350
|
+
}
|
|
4351
|
+
}
|
|
4352
|
+
}
|
|
4353
|
+
var x = (function(C) {
|
|
4354
|
+
M(t, C);
|
|
4355
|
+
function t() {
|
|
4356
|
+
return C !== null && C.apply(this, arguments) || this;
|
|
4357
|
+
}
|
|
4358
|
+
return t;
|
|
4359
|
+
})(i.AbstractTags);
|
|
4360
|
+
return Z.BaseTags = x, Z.BaseConfiguration = c.Configuration.create("base", {
|
|
4361
|
+
handler: {
|
|
4362
|
+
character: ["command", "special", "letter", "digit"],
|
|
4363
|
+
delimiter: ["delimiter"],
|
|
4364
|
+
macro: ["delimiter", "macros", "mathchar0mi", "mathchar0mo", "mathchar7"],
|
|
4365
|
+
environment: ["environment"]
|
|
4366
|
+
},
|
|
4367
|
+
fallback: {
|
|
4368
|
+
character: p,
|
|
4369
|
+
macro: y,
|
|
4370
|
+
environment: f
|
|
4371
|
+
},
|
|
4372
|
+
items: (d = {}, d[a.StartItem.prototype.kind] = a.StartItem, d[a.StopItem.prototype.kind] = a.StopItem, d[a.OpenItem.prototype.kind] = a.OpenItem, d[a.CloseItem.prototype.kind] = a.CloseItem, d[a.PrimeItem.prototype.kind] = a.PrimeItem, d[a.SubsupItem.prototype.kind] = a.SubsupItem, d[a.OverItem.prototype.kind] = a.OverItem, d[a.LeftItem.prototype.kind] = a.LeftItem, d[a.Middle.prototype.kind] = a.Middle, d[a.RightItem.prototype.kind] = a.RightItem, d[a.BeginItem.prototype.kind] = a.BeginItem, d[a.EndItem.prototype.kind] = a.EndItem, d[a.StyleItem.prototype.kind] = a.StyleItem, d[a.PositionItem.prototype.kind] = a.PositionItem, d[a.CellItem.prototype.kind] = a.CellItem, d[a.MmlItem.prototype.kind] = a.MmlItem, d[a.FnItem.prototype.kind] = a.FnItem, d[a.NotItem.prototype.kind] = a.NotItem, d[a.NonscriptItem.prototype.kind] = a.NonscriptItem, d[a.DotsItem.prototype.kind] = a.DotsItem, d[a.ArrayItem.prototype.kind] = a.ArrayItem, d[a.EqnArrayItem.prototype.kind] = a.EqnArrayItem, d[a.EquationItem.prototype.kind] = a.EquationItem, d),
|
|
4373
|
+
options: {
|
|
4374
|
+
maxMacros: 1e3,
|
|
4375
|
+
baseURL: typeof document > "u" || document.getElementsByTagName("base").length === 0 ? "" : String(document.location).replace(/#.*$/, "")
|
|
4376
|
+
},
|
|
4377
|
+
tags: {
|
|
4378
|
+
base: x
|
|
4379
|
+
},
|
|
4380
|
+
postprocessors: [[A, -4]]
|
|
4381
|
+
}), Z;
|
|
4382
|
+
}
|
|
4383
|
+
export {
|
|
4384
|
+
Et as a,
|
|
4385
|
+
St as b,
|
|
4386
|
+
Ce as c,
|
|
4387
|
+
xt as d,
|
|
4388
|
+
he as e,
|
|
4389
|
+
Te as f,
|
|
4390
|
+
re as g,
|
|
4391
|
+
pe as h,
|
|
4392
|
+
ne as i,
|
|
4393
|
+
Ct as j,
|
|
4394
|
+
It as k,
|
|
4395
|
+
me as l,
|
|
4396
|
+
de as m,
|
|
4397
|
+
fe as n,
|
|
4398
|
+
ee as o,
|
|
4399
|
+
le as p,
|
|
4400
|
+
pt as r
|
|
4401
|
+
};
|