@pretextbook/import 0.11.0 → 0.13.0
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/dist/convert-worker.cjs +1 -1
- package/dist/convert-worker.js +1 -1
- package/dist/engine-routing-ClG81Gp5.cjs +3 -0
- package/dist/engine-routing-UEp8JP8x.js +179 -0
- package/dist/index.cjs +12 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +426 -347
- package/dist/lib/engine-routing.d.ts +65 -0
- package/dist/lib/paste/place-markup.d.ts +26 -4
- package/dist/react/import-wizard.d.ts +9 -3
- package/dist/react.cjs +2 -2
- package/dist/react.js +502 -495
- package/dist/{upload-BnRj1gU1.cjs → upload-B1HDv3IB.cjs} +4 -4
- package/dist/{upload-H_OCZBBn.js → upload-DJuIYze6.js} +65 -64
- package/package.json +1 -1
- package/dist/import-mode-CV7gCDzF.cjs +0 -3
- package/dist/import-mode-DQ8g5P8P.js +0 -122
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { C as
|
|
3
|
-
import { D as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const t =
|
|
1
|
+
import { i as Z, P as Y, f as M, d as J, r as Q, a as ee, b as N, c as O, w as b, s as j, e as te, g as ne, p as re, h as $, j as se, k as ae } from "./upload-DJuIYze6.js";
|
|
2
|
+
import { C as Ze, D as Ye, L as Je, l as Qe, m as et, M as tt, n as nt, o as rt, q as st, t as at, u as ot, v as it, x as ct, y as lt, z as ut, A as dt, B as pt, E as mt, F as ft, G as ht, H as gt, I as xt, J as wt, K as Tt, N as Pt, O as Et, Q as bt, R as vt, S as St, T as It, U as At, V as _t, W as $t, X as kt, Y as yt, Z as Lt, _ as Ft, $ as Ct, a0 as Rt, a1 as Dt, a2 as Mt, a3 as Nt, a4 as Ot, a5 as jt, a6 as Xt, a7 as zt, a8 as qt, a9 as Bt, aa as Kt, ab as Wt, ac as Gt, ad as Ht, ae as Ut, af as Vt, ag as Zt, ah as Yt, ai as Jt, aj as Qt, ak as en, al as tn, am as nn, an as rn } from "./upload-DJuIYze6.js";
|
|
3
|
+
import { D as an, a as on, b as cn, c as ln, d as un, e as dn, f as pn, g as mn, h as fn, i as hn, j as gn, k as xn, l as wn, m as Tn, n as Pn, o as En, p as bn, r as vn, q as Sn, u as In } from "./engine-routing-UEp8JP8x.js";
|
|
4
|
+
const oe = /\$(?![\s$])([^$\n]{1,200})\$/;
|
|
5
|
+
function ie(e) {
|
|
6
|
+
const t = oe.exec(e);
|
|
7
7
|
if (!t)
|
|
8
8
|
return !1;
|
|
9
|
-
const
|
|
10
|
-
return /[\\^_{}]/.test(
|
|
9
|
+
const r = t[1];
|
|
10
|
+
return /[\\^_{}]/.test(r) || /^[A-Za-z]'?$/.test(r.trim());
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const ce = [
|
|
13
13
|
// \begin{...} / \end{...} — unambiguous.
|
|
14
14
|
{ pattern: /\\(?:begin|end)\{[a-zA-Z*]+\}/, weight: 3 },
|
|
15
15
|
// Display math, either delimiter style.
|
|
@@ -22,7 +22,7 @@ const ne = [
|
|
|
22
22
|
{ pattern: /\\[a-zA-Z]+\b/, weight: 1 },
|
|
23
23
|
// Label/ref machinery is a strong hint even without braces nearby.
|
|
24
24
|
{ pattern: /\\(?:label|ref|eqref|cite)\b/, weight: 2 }
|
|
25
|
-
],
|
|
25
|
+
], le = [
|
|
26
26
|
// ATX heading.
|
|
27
27
|
{ pattern: /^#{1,6}\s+\S/m, weight: 3 },
|
|
28
28
|
// Fenced code block.
|
|
@@ -41,25 +41,25 @@ const ne = [
|
|
|
41
41
|
{ pattern: /(?:^|\s)_[^_\s][^_\n]*_(?:\s|[.,;:!?]|$)/, weight: 1 },
|
|
42
42
|
// Inline code span.
|
|
43
43
|
{ pattern: /`[^`\n]+`/, weight: 1 }
|
|
44
|
-
],
|
|
45
|
-
function
|
|
44
|
+
], ue = 2;
|
|
45
|
+
function k(e, t) {
|
|
46
46
|
return t.reduce(
|
|
47
|
-
(
|
|
47
|
+
(r, { pattern: n, weight: s }) => r + (n.test(e) ? s : 0),
|
|
48
48
|
0
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return { latex:
|
|
51
|
+
function de(e) {
|
|
52
|
+
return { latex: k(e, ce) + (ie(e) ? 2 : 0), markdown: k(e, le) };
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Oe(e) {
|
|
55
55
|
const t = e.trim();
|
|
56
56
|
if (!t || t.startsWith("<"))
|
|
57
57
|
return;
|
|
58
|
-
const { latex:
|
|
59
|
-
if (!(Math.max(
|
|
60
|
-
return
|
|
58
|
+
const { latex: r, markdown: n } = de(t);
|
|
59
|
+
if (!(Math.max(r, n) < ue))
|
|
60
|
+
return r >= n ? "latex" : "markdown";
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const pe = {
|
|
63
63
|
png: "image/png",
|
|
64
64
|
jpg: "image/jpeg",
|
|
65
65
|
jpeg: "image/jpeg",
|
|
@@ -73,28 +73,28 @@ const ae = {
|
|
|
73
73
|
webp: "image/webp",
|
|
74
74
|
ico: "image/vnd.microsoft.icon"
|
|
75
75
|
};
|
|
76
|
-
function
|
|
76
|
+
function me(e) {
|
|
77
77
|
const t = e.split(".").pop()?.toLowerCase() ?? "";
|
|
78
|
-
return
|
|
78
|
+
return pe[t] ?? "application/octet-stream";
|
|
79
79
|
}
|
|
80
80
|
const P = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
81
|
-
function
|
|
82
|
-
const t = e.length,
|
|
83
|
-
for (let
|
|
84
|
-
const
|
|
85
|
-
|
|
81
|
+
function fe(e) {
|
|
82
|
+
const t = e.length, r = [];
|
|
83
|
+
for (let n = 0; n < t; n += 3) {
|
|
84
|
+
const s = e[n], o = n + 1 < t, a = n + 2 < t, i = o ? e[n + 1] : 0, c = a ? e[n + 2] : 0;
|
|
85
|
+
r.push(P[s >> 2]), r.push(P[(s & 3) << 4 | i >> 4]), r.push(o ? P[(i & 15) << 2 | c >> 6] : "="), r.push(a ? P[c & 63] : "=");
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return r.join("");
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function X(e) {
|
|
90
90
|
return {
|
|
91
91
|
ref: e.ref,
|
|
92
92
|
fileName: e.fileName,
|
|
93
|
-
contentType:
|
|
94
|
-
data:
|
|
93
|
+
contentType: me(e.fileName),
|
|
94
|
+
data: fe(e.data)
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function z(e) {
|
|
98
98
|
return {
|
|
99
99
|
ref: e.xmlId,
|
|
100
100
|
source: e.content,
|
|
@@ -102,16 +102,16 @@ function M(e) {
|
|
|
102
102
|
isRoot: e.isRoot
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function he(e) {
|
|
106
106
|
return {
|
|
107
107
|
title: e.title,
|
|
108
108
|
docinfo: e.docinfo,
|
|
109
109
|
documentKind: e.documentKind,
|
|
110
|
-
divisions: e.divisions.map(
|
|
111
|
-
assets: e.assets.map(
|
|
110
|
+
divisions: e.divisions.map(z),
|
|
111
|
+
assets: e.assets.map(X)
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function ge(e) {
|
|
115
115
|
return {
|
|
116
116
|
ref: e.ref,
|
|
117
117
|
kind: "file",
|
|
@@ -124,7 +124,7 @@ function ue(e) {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function xe(e) {
|
|
128
128
|
return {
|
|
129
129
|
title: e.title,
|
|
130
130
|
docinfo: e.docinfo,
|
|
@@ -135,55 +135,124 @@ function pe(e) {
|
|
|
135
135
|
source_format: t.sourceFormat,
|
|
136
136
|
is_root: t.isRoot
|
|
137
137
|
})),
|
|
138
|
-
assets_attributes: e.assets.map(
|
|
138
|
+
assets_attributes: e.assets.map(ge)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return
|
|
141
|
+
function je(e) {
|
|
142
|
+
return xe(he(e));
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const { root:
|
|
146
|
-
(
|
|
144
|
+
function Xe(e, t) {
|
|
145
|
+
const { root: r, entries: n } = Z(e, t), s = new Set(n.map((a) => a.xmlId)), o = e.divisions.filter(
|
|
146
|
+
(a) => !s.has(a.xmlId) && !(t.unwrapRoot && a.xmlId === r.xmlId)
|
|
147
147
|
);
|
|
148
148
|
return {
|
|
149
|
-
divisions: [...
|
|
150
|
-
assets: e.assets.map(
|
|
151
|
-
placeholders:
|
|
152
|
-
(
|
|
149
|
+
divisions: [...n, ...o].map(z),
|
|
150
|
+
assets: e.assets.map(X),
|
|
151
|
+
placeholders: n.map(
|
|
152
|
+
(a) => `<plus:${a.type} ref="${a.xmlId}"/>`
|
|
153
153
|
)
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
const
|
|
157
|
-
function
|
|
156
|
+
const y = /<(\/?)p(?=[\s>/])/g;
|
|
157
|
+
function ze(e) {
|
|
158
158
|
let t = 0;
|
|
159
|
-
|
|
160
|
-
let
|
|
161
|
-
for (; (
|
|
162
|
-
t +=
|
|
159
|
+
y.lastIndex = 0;
|
|
160
|
+
let r;
|
|
161
|
+
for (; (r = y.exec(e)) !== null; )
|
|
162
|
+
t += r[1] ? -1 : 1;
|
|
163
163
|
return t > 0;
|
|
164
164
|
}
|
|
165
|
-
const
|
|
166
|
-
`<(${
|
|
165
|
+
const we = new RegExp(
|
|
166
|
+
`<(${Y.join("|")})(?=[\\s>/])`
|
|
167
167
|
);
|
|
168
|
-
function
|
|
169
|
-
return
|
|
168
|
+
function qe(e) {
|
|
169
|
+
return we.exec(e)?.[1];
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Te(e, t, r) {
|
|
172
172
|
return e.split(`
|
|
173
173
|
`).map(
|
|
174
|
-
(
|
|
174
|
+
(n, s) => s === 0 && r ? n : n && t + n
|
|
175
175
|
).join(`
|
|
176
176
|
`);
|
|
177
177
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
178
|
+
const q = new Set(
|
|
179
|
+
`abbr acro ad alert am angles articletitle attr bc c ca cd chord copyleft
|
|
180
|
+
copyright custom dataurl dblbrackets dblprime degree delete dl doubleflat
|
|
181
|
+
doublesharp eg ellipsis em email etal etc fillin flat fn foreign icon idx
|
|
182
|
+
ie init insert kbd langle latex ldblbracket line lq lsq m md mdash midpoint
|
|
183
|
+
minus n natural nb nbsp ndash obelus ol permille pf phonomark pilcrow
|
|
184
|
+
plusminus pm prime ps pubtitle q quantity rangle rdblbracket registered rq
|
|
185
|
+
rsq scaledeg section-mark servicemark sharp solidus sq stale swungdash tag
|
|
186
|
+
tage taxon term tex timeofday times timesignature today trademark ul url
|
|
187
|
+
var viz vs xelatex xetex xref`.trim().split(/\s+/)
|
|
188
|
+
), L = /<!--[\s\S]*?-->/g;
|
|
189
|
+
function F(e, t) {
|
|
190
|
+
L.lastIndex = 0;
|
|
191
|
+
let r = 0, n;
|
|
192
|
+
for (; (n = L.exec(t)) !== null; )
|
|
193
|
+
n.index > r && C(e, t.slice(r, n.index)), e.push({ kind: "comment", text: n[0] }), r = n.index + n[0].length;
|
|
194
|
+
r < t.length && C(e, t.slice(r));
|
|
195
|
+
}
|
|
196
|
+
function C(e, t) {
|
|
197
|
+
e.push({ kind: "text", text: t, meaningful: /\S/.test(t) });
|
|
198
|
+
}
|
|
199
|
+
function Pe(e) {
|
|
200
|
+
const t = [];
|
|
201
|
+
let r = 0;
|
|
202
|
+
for (const n of M(e, () => !0))
|
|
203
|
+
n.start > r && F(t, e.slice(r, n.start)), t.push({
|
|
204
|
+
kind: "element",
|
|
205
|
+
text: n.outer,
|
|
206
|
+
paragraphContent: q.has(n.name)
|
|
207
|
+
}), r = n.end;
|
|
208
|
+
return r < e.length && F(t, e.slice(r)), t;
|
|
209
|
+
}
|
|
210
|
+
function v(e) {
|
|
211
|
+
return e.kind === "comment" || e.kind === "text" && !e.meaningful;
|
|
212
|
+
}
|
|
213
|
+
function Ee(e) {
|
|
214
|
+
const t = e.map((u) => u.text).join("");
|
|
215
|
+
if (!e.some((u) => !v(u)))
|
|
216
|
+
return t;
|
|
217
|
+
let r = 0, n = e.length;
|
|
218
|
+
for (; r < n && v(e[r]); ) r += 1;
|
|
219
|
+
for (; n > r && v(e[n - 1]); ) n -= 1;
|
|
220
|
+
const s = e.slice(0, r).map((u) => u.text).join(""), o = e.slice(r, n).map((u) => u.text).join(""), a = e.slice(n).map((u) => u.text).join(""), i = /^\s*/.exec(o)[0], c = /\s*$/.exec(o)[0], l = o.slice(i.length, o.length - c.length);
|
|
221
|
+
return `${s}${i}<p>${l}</p>${c}${a}`;
|
|
222
|
+
}
|
|
223
|
+
function be(e) {
|
|
224
|
+
const t = [];
|
|
225
|
+
let r = [];
|
|
226
|
+
const n = () => {
|
|
227
|
+
r.length > 0 && (t.push(Ee(r)), r = []);
|
|
228
|
+
};
|
|
229
|
+
for (const s of Pe(e))
|
|
230
|
+
s.kind === "element" && !s.paragraphContent ? (n(), t.push(s.text)) : r.push(s);
|
|
231
|
+
return n(), t.join("");
|
|
232
|
+
}
|
|
233
|
+
function ve(e) {
|
|
234
|
+
const t = M(e, () => !0), [r] = t;
|
|
235
|
+
if (t.length === 1 && r.name === "p" && r.start === 0 && r.end === e.length)
|
|
236
|
+
return { markup: r.inner.trim() };
|
|
237
|
+
const n = t.filter(
|
|
238
|
+
(a) => !q.has(a.name)
|
|
239
|
+
), s = n.find((a) => a.name !== "p"), o = [];
|
|
240
|
+
return s && o.push(
|
|
241
|
+
`Pasted content produced a <${s.name}>, which cannot sit inside a <p>. It was inserted as-is — move it out of the paragraph to make the document valid.`
|
|
242
|
+
), n.some((a) => a.name === "p") && o.push(
|
|
243
|
+
"Pasted content produced more than one paragraph, which cannot sit inside a <p>. It was inserted as-is — split the surrounding paragraph to make the document valid."
|
|
244
|
+
), {
|
|
245
|
+
markup: e,
|
|
246
|
+
warning: o.length > 0 ? o.join(" ") : void 0
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
function Be(e, t) {
|
|
250
|
+
const r = e.trim(), n = t.inline ? ve(r) : { markup: be(r) };
|
|
251
|
+
return t.baseIndent && (n.markup = Te(
|
|
252
|
+
n.markup,
|
|
253
|
+
t.baseIndent,
|
|
254
|
+
t.midLine
|
|
255
|
+
)), n;
|
|
187
256
|
}
|
|
188
257
|
const E = {
|
|
189
258
|
mainSourcePath: "source/main.ptx",
|
|
@@ -191,57 +260,57 @@ const E = {
|
|
|
191
260
|
projectFilePath: "project.ptx",
|
|
192
261
|
docinfoPath: "source/docinfo.ptx"
|
|
193
262
|
};
|
|
194
|
-
function
|
|
195
|
-
return
|
|
263
|
+
function B(e) {
|
|
264
|
+
return N(e, "pretext") ? e : `<pretext>
|
|
196
265
|
${e}
|
|
197
266
|
</pretext>`;
|
|
198
267
|
}
|
|
199
|
-
function
|
|
200
|
-
const
|
|
201
|
-
return e.forEach((
|
|
202
|
-
const c =
|
|
268
|
+
function K(e, t, r) {
|
|
269
|
+
const n = /* @__PURE__ */ new Map(), s = [], o = `${t}-`;
|
|
270
|
+
return e.forEach((a, i) => {
|
|
271
|
+
const c = a.attributes["xml:id"];
|
|
203
272
|
let l;
|
|
204
273
|
if (c) {
|
|
205
|
-
const m =
|
|
206
|
-
l = m.startsWith(
|
|
274
|
+
const m = ne(c);
|
|
275
|
+
l = m.startsWith(o) ? m : `${o}${m}`;
|
|
207
276
|
} else
|
|
208
|
-
l = `${
|
|
277
|
+
l = `${o}${re(i + 1, e.length)}`, r.push({
|
|
209
278
|
action: "anomaly",
|
|
210
279
|
severity: "info",
|
|
211
280
|
kind: "structure",
|
|
212
281
|
category: "missing_xml_id",
|
|
213
|
-
macro:
|
|
282
|
+
macro: a.name,
|
|
214
283
|
occurrences: 1,
|
|
215
|
-
message: `<${
|
|
284
|
+
message: `<${a.name}> at position ${i + 1} has no xml:id; using \`${l}\` as filename.`
|
|
216
285
|
});
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
span:
|
|
222
|
-
slug:
|
|
223
|
-
filename: `${
|
|
286
|
+
const u = n.get(l) ?? 0;
|
|
287
|
+
n.set(l, u + 1);
|
|
288
|
+
const d = u === 0 ? l : `${l}-${u + 1}`;
|
|
289
|
+
s.push({
|
|
290
|
+
span: a,
|
|
291
|
+
slug: d,
|
|
292
|
+
filename: `${d}.ptx`
|
|
224
293
|
});
|
|
225
|
-
}),
|
|
294
|
+
}), s;
|
|
226
295
|
}
|
|
227
|
-
function
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
296
|
+
function Se(e, t, r, n) {
|
|
297
|
+
const s = O(e, "section");
|
|
298
|
+
if (s.length === 0)
|
|
230
299
|
return e;
|
|
231
|
-
const
|
|
300
|
+
const a = K(s, "sec", n).map((i) => {
|
|
232
301
|
const c = `source/${t}/${i.filename}`;
|
|
233
|
-
return
|
|
302
|
+
return r[c] = b(i.span.outer), {
|
|
234
303
|
start: i.span.start,
|
|
235
304
|
end: i.span.end,
|
|
236
305
|
replacement: `<xi:include href="${t}/${i.filename}"/>`
|
|
237
306
|
};
|
|
238
307
|
});
|
|
239
|
-
return
|
|
308
|
+
return j(e, a);
|
|
240
309
|
}
|
|
241
|
-
function
|
|
242
|
-
const
|
|
243
|
-
if (!
|
|
244
|
-
return
|
|
310
|
+
function Ie(e, t, r) {
|
|
311
|
+
const n = N(e, "book");
|
|
312
|
+
if (!n)
|
|
313
|
+
return r.push({
|
|
245
314
|
action: "anomaly",
|
|
246
315
|
severity: "warning",
|
|
247
316
|
kind: "structure",
|
|
@@ -249,136 +318,136 @@ function ge(e, t, n) {
|
|
|
249
318
|
macro: "book",
|
|
250
319
|
occurrences: 1,
|
|
251
320
|
message: "Document was treated as a book but no <book> element found; emitting as a single file."
|
|
252
|
-
}),
|
|
253
|
-
const
|
|
254
|
-
let
|
|
255
|
-
if (t.splitChapters &&
|
|
256
|
-
const
|
|
257
|
-
let m =
|
|
321
|
+
}), W(e, t);
|
|
322
|
+
const s = {}, o = O(n.inner, "chapter");
|
|
323
|
+
let a = n.inner;
|
|
324
|
+
if (t.splitChapters && o.length > 0) {
|
|
325
|
+
const u = K(o, "ch", r).map((d) => {
|
|
326
|
+
let m = d.span.outer;
|
|
258
327
|
if (t.splitSections) {
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
328
|
+
const p = d.span.inner, f = Se(
|
|
329
|
+
p,
|
|
330
|
+
d.slug,
|
|
331
|
+
s,
|
|
332
|
+
r
|
|
264
333
|
);
|
|
265
|
-
m =
|
|
334
|
+
m = d.span.outer.slice(0, d.span.startTagEnd - d.span.start) + f + d.span.outer.slice(d.span.contentEnd - d.span.start);
|
|
266
335
|
}
|
|
267
|
-
const h = `source/${
|
|
268
|
-
return
|
|
269
|
-
start:
|
|
270
|
-
end:
|
|
271
|
-
replacement: `<xi:include href="${
|
|
336
|
+
const h = `source/${d.filename}`;
|
|
337
|
+
return s[h] = b(m), {
|
|
338
|
+
start: d.span.start,
|
|
339
|
+
end: d.span.end,
|
|
340
|
+
replacement: `<xi:include href="${d.filename}"/>`
|
|
272
341
|
};
|
|
273
342
|
});
|
|
274
|
-
|
|
343
|
+
a = j(n.inner, u);
|
|
275
344
|
}
|
|
276
|
-
const i = e.slice(
|
|
277
|
-
return
|
|
278
|
-
|
|
279
|
-
),
|
|
280
|
-
}
|
|
281
|
-
function
|
|
282
|
-
const
|
|
283
|
-
return
|
|
284
|
-
|
|
285
|
-
),
|
|
286
|
-
}
|
|
287
|
-
function
|
|
288
|
-
const
|
|
289
|
-
splitChapters: t.splitChapters ??
|
|
345
|
+
const i = e.slice(n.start, n.startTagEnd) + a + e.slice(n.contentEnd, n.end), c = e.slice(0, n.start) + i + e.slice(n.end);
|
|
346
|
+
return s[t.mainSourcePath] = b(
|
|
347
|
+
te(B(c.trim()))
|
|
348
|
+
), s;
|
|
349
|
+
}
|
|
350
|
+
function W(e, t, r) {
|
|
351
|
+
const n = {};
|
|
352
|
+
return n[t.mainSourcePath] = b(
|
|
353
|
+
B(e.trim())
|
|
354
|
+
), n;
|
|
355
|
+
}
|
|
356
|
+
function Ke(e, t = {}) {
|
|
357
|
+
const r = [], n = t.documentKind ?? J(e), s = {
|
|
358
|
+
splitChapters: t.splitChapters ?? n === "book",
|
|
290
359
|
splitSections: t.splitSections ?? !1,
|
|
291
360
|
mainSourcePath: t.mainSourcePath ?? E.mainSourcePath,
|
|
292
361
|
publicationPath: t.publicationPath ?? E.publicationPath,
|
|
293
362
|
projectFilePath: t.projectFilePath ?? E.projectFilePath,
|
|
294
363
|
docinfoPath: t.docinfoPath ?? E.docinfoPath
|
|
295
|
-
},
|
|
296
|
-
return
|
|
297
|
-
mainSource:
|
|
298
|
-
publication:
|
|
299
|
-
}),
|
|
364
|
+
}, o = n === "book" ? Ie(e, s, r) : W(e, s);
|
|
365
|
+
return o[s.projectFilePath] = Q({
|
|
366
|
+
mainSource: s.mainSourcePath,
|
|
367
|
+
publication: s.publicationPath
|
|
368
|
+
}), o[s.publicationPath] = ee(), { files: o, documentKind: n, warnings: r };
|
|
300
369
|
}
|
|
301
|
-
class
|
|
370
|
+
class Ae extends Error {
|
|
302
371
|
constructor() {
|
|
303
372
|
super("Import cancelled."), this.name = "ConversionCancelledError";
|
|
304
373
|
}
|
|
305
374
|
}
|
|
306
|
-
let
|
|
307
|
-
function
|
|
308
|
-
const
|
|
375
|
+
let _e = 0;
|
|
376
|
+
function $e(e, t, r = {}) {
|
|
377
|
+
const n = `convert-${_e++}`, s = e(), { assets: o = {}, ...a } = r;
|
|
309
378
|
let i;
|
|
310
|
-
const c = new Promise((
|
|
379
|
+
const c = new Promise((u, d) => {
|
|
311
380
|
let m = !1;
|
|
312
|
-
const h = (
|
|
313
|
-
m || (m = !0,
|
|
381
|
+
const h = (p) => {
|
|
382
|
+
m || (m = !0, s.terminate(), p());
|
|
314
383
|
};
|
|
315
|
-
i = () => h(() =>
|
|
316
|
-
const f =
|
|
317
|
-
if (!(!f || f.requestId !==
|
|
384
|
+
i = () => h(() => d(new Ae())), s.addEventListener("message", (p) => {
|
|
385
|
+
const f = p.data;
|
|
386
|
+
if (!(!f || f.requestId !== n)) {
|
|
318
387
|
if (f.type === "result") {
|
|
319
|
-
h(() =>
|
|
388
|
+
h(() => u(f.result));
|
|
320
389
|
return;
|
|
321
390
|
}
|
|
322
|
-
h(() =>
|
|
391
|
+
h(() => d(new Error(f.message)));
|
|
323
392
|
}
|
|
324
|
-
}),
|
|
325
|
-
const f = typeof
|
|
326
|
-
h(() =>
|
|
393
|
+
}), s.addEventListener("error", (p) => {
|
|
394
|
+
const f = typeof p == "object" && p && "message" in p ? String(p.message) : "The import worker failed to start.";
|
|
395
|
+
h(() => d(new Error(f)));
|
|
327
396
|
});
|
|
328
397
|
}), l = [
|
|
329
398
|
...new Set(
|
|
330
|
-
Object.values(
|
|
331
|
-
(
|
|
399
|
+
Object.values(o).map((u) => u.buffer).filter(
|
|
400
|
+
(u) => u instanceof ArrayBuffer
|
|
332
401
|
)
|
|
333
402
|
)
|
|
334
403
|
];
|
|
335
|
-
return
|
|
336
|
-
{ type: "convert", requestId:
|
|
404
|
+
return s.postMessage(
|
|
405
|
+
{ type: "convert", requestId: n, files: t, assets: o, options: a },
|
|
337
406
|
l
|
|
338
407
|
), { result: c, cancel: () => i?.() };
|
|
339
408
|
}
|
|
340
|
-
function
|
|
409
|
+
function We(e) {
|
|
341
410
|
const {
|
|
342
411
|
createWorker: t,
|
|
343
|
-
id:
|
|
344
|
-
label:
|
|
345
|
-
description:
|
|
346
|
-
acceptExtensions:
|
|
412
|
+
id: r = "worker",
|
|
413
|
+
label: n = "Built-in converter",
|
|
414
|
+
description: s = "Create a new project starting with LaTeX, Markdown, or PreTeXt files.",
|
|
415
|
+
acceptExtensions: o
|
|
347
416
|
} = e;
|
|
348
|
-
let
|
|
417
|
+
let a = null;
|
|
349
418
|
const i = async (c, l) => {
|
|
350
|
-
|
|
419
|
+
a?.cancel(), a = $e(t, c, l);
|
|
351
420
|
try {
|
|
352
|
-
return await
|
|
421
|
+
return await a.result;
|
|
353
422
|
} finally {
|
|
354
|
-
|
|
423
|
+
a = null;
|
|
355
424
|
}
|
|
356
425
|
};
|
|
357
426
|
return {
|
|
358
|
-
id:
|
|
359
|
-
label:
|
|
360
|
-
description:
|
|
361
|
-
acceptExtensions:
|
|
427
|
+
id: r,
|
|
428
|
+
label: n,
|
|
429
|
+
description: s,
|
|
430
|
+
acceptExtensions: o,
|
|
362
431
|
prepare: async (c) => {
|
|
363
|
-
const { files: l, assets:
|
|
432
|
+
const { files: l, assets: u } = await $(c);
|
|
364
433
|
return {
|
|
365
434
|
fileName: c.name,
|
|
366
435
|
files: l,
|
|
367
|
-
assets:
|
|
368
|
-
analysis:
|
|
436
|
+
assets: u,
|
|
437
|
+
analysis: se(l)
|
|
369
438
|
};
|
|
370
439
|
},
|
|
371
440
|
convertPrepared: (c, l) => i(c.files, { ...l, assets: c.assets }),
|
|
372
441
|
convertFile: async (c, l) => {
|
|
373
|
-
const { files:
|
|
374
|
-
return i(
|
|
442
|
+
const { files: u, assets: d } = await $(c);
|
|
443
|
+
return i(u, { ...l, assets: d });
|
|
375
444
|
},
|
|
376
445
|
cancel: () => {
|
|
377
|
-
|
|
446
|
+
a?.cancel(), a = null;
|
|
378
447
|
}
|
|
379
448
|
};
|
|
380
449
|
}
|
|
381
|
-
const
|
|
450
|
+
const ke = {
|
|
382
451
|
".docx": "docx",
|
|
383
452
|
".odt": "odt",
|
|
384
453
|
".epub": "epub",
|
|
@@ -394,7 +463,7 @@ const Pe = {
|
|
|
394
463
|
".typ": "typst",
|
|
395
464
|
".xml": "docbook",
|
|
396
465
|
".textile": "textile"
|
|
397
|
-
},
|
|
466
|
+
}, Ge = /* @__PURE__ */ new Set(["docx", "odt", "epub"]), G = [
|
|
398
467
|
".docx",
|
|
399
468
|
".odt",
|
|
400
469
|
".epub",
|
|
@@ -410,33 +479,33 @@ const Pe = {
|
|
|
410
479
|
".md",
|
|
411
480
|
".markdown"
|
|
412
481
|
];
|
|
413
|
-
function
|
|
482
|
+
function H(e) {
|
|
414
483
|
const t = e.lastIndexOf(".");
|
|
415
484
|
return t <= 0 ? "" : e.slice(t).toLowerCase();
|
|
416
485
|
}
|
|
417
|
-
function
|
|
418
|
-
return
|
|
486
|
+
function ye(e) {
|
|
487
|
+
return ke[H(e)];
|
|
419
488
|
}
|
|
420
|
-
function
|
|
489
|
+
function Le(e) {
|
|
421
490
|
const {
|
|
422
491
|
convertToPretext: t,
|
|
423
|
-
id:
|
|
424
|
-
label:
|
|
425
|
-
description:
|
|
426
|
-
acceptExtensions:
|
|
492
|
+
id: r = "pandoc",
|
|
493
|
+
label: n = "Pandoc",
|
|
494
|
+
description: s = "Convert Word, OpenOffice, EPUB, HTML, reStructuredText, and more.",
|
|
495
|
+
acceptExtensions: o = G
|
|
427
496
|
} = e;
|
|
428
497
|
return {
|
|
429
|
-
id:
|
|
430
|
-
label:
|
|
431
|
-
description:
|
|
432
|
-
acceptExtensions:
|
|
433
|
-
convertFile: async (
|
|
434
|
-
const c = await t(
|
|
498
|
+
id: r,
|
|
499
|
+
label: n,
|
|
500
|
+
description: s,
|
|
501
|
+
acceptExtensions: o,
|
|
502
|
+
convertFile: async (a, i) => {
|
|
503
|
+
const c = await t(a, i);
|
|
435
504
|
if (!c.trim())
|
|
436
505
|
throw new Error(
|
|
437
|
-
`Pandoc produced no output for ${
|
|
506
|
+
`Pandoc produced no output for ${a.name}. The file may be empty or in an unexpected format.`
|
|
438
507
|
);
|
|
439
|
-
const l =
|
|
508
|
+
const l = ae(
|
|
440
509
|
{ "source.ptx": c },
|
|
441
510
|
{
|
|
442
511
|
documentKind: i.documentKind,
|
|
@@ -445,220 +514,230 @@ function ve(e) {
|
|
|
445
514
|
splitLevel: i.splitLevel
|
|
446
515
|
}
|
|
447
516
|
);
|
|
448
|
-
return "pretextError" in l || (l.sourceName =
|
|
517
|
+
return "pretextError" in l || (l.sourceName = a.name, l.sourcePath = a.name), l;
|
|
449
518
|
}
|
|
450
519
|
};
|
|
451
520
|
}
|
|
452
|
-
const
|
|
453
|
-
function
|
|
521
|
+
const Fe = 3e4;
|
|
522
|
+
function Ce(e) {
|
|
454
523
|
const t = /<pre>([\s\S]*?)<\/pre>/i.exec(e);
|
|
455
524
|
return (t ? t[1] : e).replace(/<[^>]+>/g, "").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&").trim();
|
|
456
525
|
}
|
|
457
|
-
function
|
|
458
|
-
const
|
|
526
|
+
function Re(e, t, r) {
|
|
527
|
+
const n = De(Ce(t)), s = n ? ` (${D(n)})` : "";
|
|
459
528
|
switch (e) {
|
|
460
529
|
case 400:
|
|
461
|
-
return `The pandoc server will not convert ${
|
|
530
|
+
return `The pandoc server will not convert ${r}${s}.${w(r)}`;
|
|
462
531
|
case 401:
|
|
463
532
|
case 403:
|
|
464
|
-
return `The pandoc server rejected this site's credentials, so ${
|
|
533
|
+
return `The pandoc server rejected this site's credentials, so ${r} was never converted. Nothing is wrong with your file — this is a configuration problem with the service, and worth reporting.${w(r)}`;
|
|
465
534
|
case 404:
|
|
466
|
-
return `The pandoc conversion service could not be found at the address this site is configured to use. Nothing is wrong with your file — this is a configuration problem worth reporting.${
|
|
535
|
+
return `The pandoc conversion service could not be found at the address this site is configured to use. Nothing is wrong with your file — this is a configuration problem worth reporting.${w(r)}`;
|
|
467
536
|
case 413:
|
|
468
|
-
return `${
|
|
537
|
+
return `${r} is too large for the pandoc server to accept. Splitting it into chapters and importing them one at a time should get through.`;
|
|
469
538
|
case 422:
|
|
470
|
-
return `Pandoc could not read ${
|
|
539
|
+
return `Pandoc could not read ${r}${s}. The file may be damaged, or may use features pandoc does not support.`;
|
|
471
540
|
case 503:
|
|
472
|
-
return `The pandoc server is running without its PreTeXt writer, so it cannot convert anything right now. Nothing is wrong with your file — this is a problem with the service, and worth reporting.${
|
|
541
|
+
return `The pandoc server is running without its PreTeXt writer, so it cannot convert anything right now. Nothing is wrong with your file — this is a problem with the service, and worth reporting.${w(r)}`;
|
|
473
542
|
case 504:
|
|
474
|
-
return `Converting ${
|
|
543
|
+
return `Converting ${r} took longer than the pandoc server allows. Splitting it into chapters and importing them one at a time usually works.`;
|
|
475
544
|
default: {
|
|
476
|
-
const
|
|
477
|
-
return `The pandoc server could not convert ${
|
|
545
|
+
const o = n ? `(HTTP ${e}: ${D(n)})` : `(HTTP ${e})`;
|
|
546
|
+
return `The pandoc server could not convert ${r} ${o}.${w(r)}`;
|
|
478
547
|
}
|
|
479
548
|
}
|
|
480
549
|
}
|
|
481
|
-
const
|
|
482
|
-
function
|
|
550
|
+
const R = 300;
|
|
551
|
+
function De(e) {
|
|
483
552
|
return e.replace(/\s+/g, " ").trim();
|
|
484
553
|
}
|
|
485
|
-
function
|
|
486
|
-
return e.length <=
|
|
554
|
+
function D(e) {
|
|
555
|
+
return e.length <= R ? e : `${e.slice(0, R).trimEnd()}…`;
|
|
487
556
|
}
|
|
488
|
-
const
|
|
557
|
+
const Me = /* @__PURE__ */ new Set([
|
|
489
558
|
".tex",
|
|
490
559
|
".ltx",
|
|
491
560
|
".md",
|
|
492
561
|
".markdown"
|
|
493
562
|
]);
|
|
494
|
-
function
|
|
495
|
-
return
|
|
563
|
+
function w(e) {
|
|
564
|
+
return Me.has(H(e)) ? " You can import this file with the built-in converter instead." : "";
|
|
496
565
|
}
|
|
497
|
-
function
|
|
566
|
+
function He(e) {
|
|
498
567
|
const {
|
|
499
568
|
url: t,
|
|
500
|
-
token:
|
|
501
|
-
headers:
|
|
502
|
-
credentials:
|
|
503
|
-
standalone:
|
|
504
|
-
from:
|
|
505
|
-
timeoutMs: i =
|
|
569
|
+
token: r,
|
|
570
|
+
headers: n,
|
|
571
|
+
credentials: s,
|
|
572
|
+
standalone: o = !0,
|
|
573
|
+
from: a,
|
|
574
|
+
timeoutMs: i = Fe,
|
|
506
575
|
fetchImpl: c,
|
|
507
576
|
id: l = "pandoc-remote",
|
|
508
|
-
label:
|
|
509
|
-
description:
|
|
510
|
-
acceptExtensions: m =
|
|
577
|
+
label: u = "Pandoc (server)",
|
|
578
|
+
description: d = "Convert Word, OpenOffice, EPUB, HTML, reStructuredText, and more — no local install needed.",
|
|
579
|
+
acceptExtensions: m = G
|
|
511
580
|
} = e;
|
|
512
|
-
return
|
|
513
|
-
convertToPretext: async (
|
|
581
|
+
return Le({
|
|
582
|
+
convertToPretext: async (p, f) => {
|
|
514
583
|
const S = c ?? globalThis.fetch;
|
|
515
584
|
if (typeof S != "function")
|
|
516
585
|
throw new Error(
|
|
517
586
|
"This environment has no fetch; pass fetchImpl to createRemotePandocEngine."
|
|
518
587
|
);
|
|
519
|
-
const
|
|
520
|
-
if (!
|
|
588
|
+
const I = a ?? ye(p.name);
|
|
589
|
+
if (!I)
|
|
521
590
|
throw new Error(
|
|
522
|
-
`Pandoc cannot determine a format for ${
|
|
591
|
+
`Pandoc cannot determine a format for ${p.name}. Supported extensions: ${m.join(", ")}.`
|
|
523
592
|
);
|
|
524
593
|
const g = new FormData();
|
|
525
|
-
|
|
526
|
-
const
|
|
527
|
-
let
|
|
594
|
+
r && g.set("token", r), g.set("file", p, p.name), g.set("from", I), o && g.set("standalone", "yes");
|
|
595
|
+
const A = new AbortController(), U = setTimeout(() => A.abort(), i);
|
|
596
|
+
let T;
|
|
528
597
|
try {
|
|
529
|
-
|
|
598
|
+
T = await S(t, {
|
|
530
599
|
method: "POST",
|
|
531
600
|
body: g,
|
|
532
|
-
headers:
|
|
533
|
-
credentials:
|
|
534
|
-
signal:
|
|
601
|
+
headers: n,
|
|
602
|
+
credentials: s,
|
|
603
|
+
signal: A.signal
|
|
535
604
|
});
|
|
536
|
-
} catch (
|
|
537
|
-
if (
|
|
605
|
+
} catch (x) {
|
|
606
|
+
if (x instanceof Error && x.name === "AbortError")
|
|
538
607
|
throw new Error(
|
|
539
|
-
`Pandoc conversion of ${
|
|
608
|
+
`Pandoc conversion of ${p.name} timed out after ${Math.round(i / 1e3)}s.`
|
|
540
609
|
);
|
|
541
|
-
const
|
|
542
|
-
throw new Error(`Could not reach the pandoc server: ${
|
|
610
|
+
const V = x instanceof Error ? x.message : String(x);
|
|
611
|
+
throw new Error(`Could not reach the pandoc server: ${V}`);
|
|
543
612
|
} finally {
|
|
544
|
-
clearTimeout(
|
|
613
|
+
clearTimeout(U);
|
|
545
614
|
}
|
|
546
|
-
const _ = await
|
|
547
|
-
if (!
|
|
615
|
+
const _ = await T.text();
|
|
616
|
+
if (!T.ok)
|
|
548
617
|
throw new Error(
|
|
549
|
-
|
|
618
|
+
Re(T.status, _, p.name)
|
|
550
619
|
);
|
|
551
620
|
return _;
|
|
552
621
|
},
|
|
553
622
|
id: l,
|
|
554
|
-
label:
|
|
555
|
-
description:
|
|
623
|
+
label: u,
|
|
624
|
+
description: d,
|
|
556
625
|
acceptExtensions: m
|
|
557
626
|
});
|
|
558
627
|
}
|
|
559
628
|
export {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
629
|
+
Ze as CLEAN_RULES,
|
|
630
|
+
Ae as ConversionCancelledError,
|
|
631
|
+
an as DEFAULT_ACCEPT_EXTENSIONS,
|
|
632
|
+
on as DEFAULT_IMPORT_MODE,
|
|
633
|
+
Fe as DEFAULT_REMOTE_PANDOC_TIMEOUT_MS,
|
|
634
|
+
Ye as DIVISION_LADDER,
|
|
635
|
+
Je as LADDER_OVERFLOW_TAG,
|
|
636
|
+
Qe as LATEX_DIVISION_COMMANDS,
|
|
637
|
+
et as LATEX_FORMAT_MARKERS,
|
|
638
|
+
tt as MARKDOWN_FORMAT_MARKERS,
|
|
639
|
+
nt as MAX_SUGGESTED_SPLIT_LEVEL,
|
|
640
|
+
G as PANDOC_ACCEPT_EXTENSIONS,
|
|
641
|
+
Ge as PANDOC_BINARY_FORMATS,
|
|
642
|
+
ke as PANDOC_EXTENSION_FORMATS,
|
|
643
|
+
Y as PRETEXT_DIVISION_TAGS,
|
|
644
|
+
rt as PRETEXT_ROOT_TAGS,
|
|
645
|
+
st as PROJECT_DESTINATION,
|
|
646
|
+
cn as allAcceptExtensions,
|
|
647
|
+
ln as alternateEngine,
|
|
648
|
+
un as alternateFor,
|
|
649
|
+
se as analyzeImportSources,
|
|
650
|
+
at as applyLatexFixes,
|
|
651
|
+
dn as assetsForImportMode,
|
|
652
|
+
ot as attachLatexRoots,
|
|
653
|
+
it as attachMarkdownRoots,
|
|
654
|
+
ct as buildDivisionPool,
|
|
655
|
+
lt as buildNativeDivisionPool,
|
|
656
|
+
Ke as buildPretextProjectFiles,
|
|
657
|
+
ut as carryOverProjectFiles,
|
|
658
|
+
dt as cleanLatex,
|
|
659
|
+
pt as cleanLatexInChunks,
|
|
660
|
+
mt as cleanLatexText,
|
|
661
|
+
ft as convertLatexToPretext,
|
|
662
|
+
ht as convertMarkdownToPretext,
|
|
663
|
+
gt as convertSourceToPretext,
|
|
664
|
+
Le as createPandocEngine,
|
|
665
|
+
He as createRemotePandocEngine,
|
|
666
|
+
We as createWorkerEngine,
|
|
667
|
+
xt as dedupeXmlIds,
|
|
668
|
+
wt as defaultAttachLevel,
|
|
669
|
+
Tt as defaultManifestTarget,
|
|
670
|
+
Re as describeRemotePandocFailure,
|
|
671
|
+
J as detectDocumentKind,
|
|
672
|
+
Oe as detectSnippetFormat,
|
|
673
|
+
Pt as detectSourceFormat,
|
|
674
|
+
pn as diffHunks,
|
|
675
|
+
mn as diffLines,
|
|
676
|
+
fn as diffStats,
|
|
677
|
+
Et as divisionChildRefs,
|
|
678
|
+
bt as divisionsAtLevel,
|
|
679
|
+
hn as engineAccepts,
|
|
680
|
+
gn as engineExtensions,
|
|
681
|
+
vt as expandPretextIncludes,
|
|
682
|
+
Ce as extractPandocErrorDetail,
|
|
608
683
|
$ as extractUpload,
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
684
|
+
xn as fileChangesForImport,
|
|
685
|
+
H as fileExtension,
|
|
686
|
+
St as filePrefixForDivision,
|
|
687
|
+
wn as filesForImportMode,
|
|
688
|
+
It as findLatexFixes,
|
|
689
|
+
At as findLatexHeaders,
|
|
690
|
+
_t as findProjectManifest,
|
|
691
|
+
qe as firstDivisionTag,
|
|
692
|
+
$t as fixesToWarnings,
|
|
693
|
+
Tn as formatWarningLine,
|
|
694
|
+
kt as getConversionErrorMessage,
|
|
695
|
+
yt as getLatexCleanDiagnostics,
|
|
696
|
+
Lt as handleImportUploadFile,
|
|
697
|
+
Pn as hasNativeImportMode,
|
|
698
|
+
ae as importProjectFromFiles,
|
|
699
|
+
Ft as isDivisionTag,
|
|
700
|
+
ze as isInlineContext,
|
|
701
|
+
Ct as ladderDepth,
|
|
702
|
+
Rt as latexDivisionHierarchy,
|
|
703
|
+
Dt as latexFixesToCodeActions,
|
|
704
|
+
En as matchesExtension,
|
|
705
|
+
Mt as mergeChunksAtLevel,
|
|
706
|
+
Nt as normalizePretextSource,
|
|
707
|
+
Ot as outlineDivisions,
|
|
708
|
+
ye as pandocFormatForFileName,
|
|
709
|
+
jt as parseLatexDivisions,
|
|
710
|
+
Xt as parseProjectManifest,
|
|
711
|
+
Be as placeConvertedMarkup,
|
|
712
|
+
zt as prepareInsertSource,
|
|
713
|
+
bn as projectForImportMode,
|
|
714
|
+
qt as pruneDivisions,
|
|
715
|
+
Bt as rebuildImport,
|
|
716
|
+
xe as recordsToPlusPayload,
|
|
717
|
+
Te as reindentForContext,
|
|
718
|
+
Kt as relayoutImport,
|
|
719
|
+
Q as renderProjectPtx,
|
|
720
|
+
Wt as renderProjectPtxFromManifest,
|
|
721
|
+
ee as renderPublicationPtx,
|
|
722
|
+
Gt as reselectImport,
|
|
723
|
+
vn as resolveImportMode,
|
|
724
|
+
Ht as resolveImportSplitLevel,
|
|
725
|
+
Ut as resolveSplitLevel,
|
|
726
|
+
Vt as retargetFragment,
|
|
727
|
+
Zt as retargetFragmentToDepth,
|
|
728
|
+
Yt as retargetImport,
|
|
729
|
+
Sn as routeEngine,
|
|
730
|
+
$e as runConversionInWorker,
|
|
731
|
+
Jt as sanitizeRef,
|
|
732
|
+
de as scoreSnippetFormats,
|
|
733
|
+
Qt as serializeForDestination,
|
|
734
|
+
en as serializeInsertFiles,
|
|
735
|
+
Xe as serializeInsertToRecords,
|
|
736
|
+
tn as serializeProjectToFiles,
|
|
737
|
+
je as serializeProjectToPlusPayload,
|
|
738
|
+
he as serializeProjectToRecords,
|
|
739
|
+
nn as shiftLadderTag,
|
|
740
|
+
rn as suggestSplitLevel,
|
|
741
|
+
In as unsupportedFileMessage,
|
|
742
|
+
be as wrapLooseParagraphs
|
|
664
743
|
};
|