@pretextbook/import 0.8.0 → 0.9.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/react.js CHANGED
@@ -1,50 +1,50 @@
1
- import Te, { useState as h, useRef as ue, useEffect as ke, useMemo as ae } from "react";
2
- import { S as Ne, $ as Se, j as Pe, T as Ce, g as Re, h as ye, E as _e, A as Ae } from "./upload-BmErkg8I.js";
3
- import { f as Fe, e as he } from "./import-mode-BCGuSwkM.js";
4
- var de = { exports: {} }, re = {};
5
- var be;
6
- function Oe() {
7
- if (be) return re;
8
- be = 1;
9
- var s = /* @__PURE__ */ Symbol.for("react.transitional.element"), d = /* @__PURE__ */ Symbol.for("react.fragment");
10
- function x(b, g, c) {
11
- var v = null;
12
- if (c !== void 0 && (v = "" + c), g.key !== void 0 && (v = "" + g.key), "key" in g) {
13
- c = {};
14
- for (var N in g)
15
- N !== "key" && (c[N] = g[N]);
16
- } else c = g;
17
- return g = c.ref, {
1
+ import Ce, { useState as p, useRef as ie, useEffect as Re, useMemo as ae } from "react";
2
+ import { S as Ee, $ as Ae, j as Fe, T as Oe, g as Le, h as ke, E as De, A as Ie } from "./upload-BmErkg8I.js";
3
+ import { D as $e, f as Me, h as Xe, r as ze, e as je } from "./import-mode-BaaBvzcy.js";
4
+ var ce = { exports: {} }, re = {};
5
+ var ve;
6
+ function Ue() {
7
+ if (ve) return re;
8
+ ve = 1;
9
+ var s = /* @__PURE__ */ Symbol.for("react.transitional.element"), u = /* @__PURE__ */ Symbol.for("react.fragment");
10
+ function x(h, j, d) {
11
+ var y = null;
12
+ if (d !== void 0 && (y = "" + d), j.key !== void 0 && (y = "" + j.key), "key" in j) {
13
+ d = {};
14
+ for (var S in j)
15
+ S !== "key" && (d[S] = j[S]);
16
+ } else d = j;
17
+ return j = d.ref, {
18
18
  $$typeof: s,
19
- type: b,
20
- key: v,
21
- ref: g !== void 0 ? g : null,
22
- props: c
19
+ type: h,
20
+ key: y,
21
+ ref: j !== void 0 ? j : null,
22
+ props: d
23
23
  };
24
24
  }
25
- return re.Fragment = d, re.jsx = x, re.jsxs = x, re;
25
+ return re.Fragment = u, re.jsx = x, re.jsxs = x, re;
26
26
  }
27
27
  var se = {};
28
- var ge;
29
- function Le() {
30
- return ge || (ge = 1, process.env.NODE_ENV !== "production" && (function() {
28
+ var Ne;
29
+ function Ye() {
30
+ return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && (function() {
31
31
  function s(t) {
32
32
  if (t == null) return null;
33
33
  if (typeof t == "function")
34
- return t.$$typeof === Y ? null : t.displayName || t.name || null;
34
+ return t.$$typeof === Z ? null : t.displayName || t.name || null;
35
35
  if (typeof t == "string") return t;
36
36
  switch (t) {
37
- case L:
37
+ case F:
38
38
  return "Fragment";
39
- case W:
39
+ case X:
40
40
  return "Profiler";
41
- case P:
41
+ case C:
42
42
  return "StrictMode";
43
- case ne:
43
+ case de:
44
44
  return "Suspense";
45
- case me:
45
+ case ne:
46
46
  return "SuspenseList";
47
- case le:
47
+ case ue:
48
48
  return "Activity";
49
49
  }
50
50
  if (typeof t == "object")
@@ -53,16 +53,16 @@ function Le() {
53
53
  ), t.$$typeof) {
54
54
  case A:
55
55
  return "Portal";
56
- case S:
56
+ case _:
57
57
  return t.displayName || "Context";
58
- case p:
58
+ case g:
59
59
  return (t._context.displayName || "Context") + ".Consumer";
60
- case F:
60
+ case B:
61
61
  var a = t.render;
62
62
  return t = t.displayName, t || (t = a.displayName || a.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
63
- case H:
63
+ case W:
64
64
  return a = t.displayName || null, a !== null ? a : s(t.type) || "Memo";
65
- case z:
65
+ case K:
66
66
  a = t._payload, t = t._init;
67
67
  try {
68
68
  return s(t(a));
@@ -71,29 +71,29 @@ function Le() {
71
71
  }
72
72
  return null;
73
73
  }
74
- function d(t) {
74
+ function u(t) {
75
75
  return "" + t;
76
76
  }
77
77
  function x(t) {
78
78
  try {
79
- d(t);
79
+ u(t);
80
80
  var a = !1;
81
81
  } catch {
82
82
  a = !0;
83
83
  }
84
84
  if (a) {
85
85
  a = console;
86
- var m = a.error, u = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
87
- return m.call(
86
+ var i = a.error, f = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
87
+ return i.call(
88
88
  a,
89
89
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
90
- u
91
- ), d(t);
90
+ f
91
+ ), u(t);
92
92
  }
93
93
  }
94
- function b(t) {
95
- if (t === L) return "<>";
96
- if (typeof t == "object" && t !== null && t.$$typeof === z)
94
+ function h(t) {
95
+ if (t === F) return "<>";
96
+ if (typeof t == "object" && t !== null && t.$$typeof === K)
97
97
  return "<...>";
98
98
  try {
99
99
  var a = s(t);
@@ -102,49 +102,49 @@ function Le() {
102
102
  return "<...>";
103
103
  }
104
104
  }
105
- function g() {
106
- var t = K.A;
105
+ function j() {
106
+ var t = z.A;
107
107
  return t === null ? null : t.getOwner();
108
108
  }
109
- function c() {
109
+ function d() {
110
110
  return Error("react-stack-top-frame");
111
111
  }
112
- function v(t) {
113
- if (Z.call(t, "key")) {
112
+ function y(t) {
113
+ if (Q.call(t, "key")) {
114
114
  var a = Object.getOwnPropertyDescriptor(t, "key").get;
115
115
  if (a && a.isReactWarning) return !1;
116
116
  }
117
117
  return t.key !== void 0;
118
118
  }
119
- function N(t, a) {
120
- function m() {
121
- D || (D = !0, console.error(
119
+ function S(t, a) {
120
+ function i() {
121
+ ee || (ee = !0, console.error(
122
122
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
123
123
  a
124
124
  ));
125
125
  }
126
- m.isReactWarning = !0, Object.defineProperty(t, "key", {
127
- get: m,
126
+ i.isReactWarning = !0, Object.defineProperty(t, "key", {
127
+ get: i,
128
128
  configurable: !0
129
129
  });
130
130
  }
131
- function f() {
131
+ function w() {
132
132
  var t = s(this.type);
133
- return q[t] || (q[t] = !0, console.error(
133
+ return V[t] || (V[t] = !0, console.error(
134
134
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
135
135
  )), t = this.props.ref, t !== void 0 ? t : null;
136
136
  }
137
- function _(t, a, m, u, $, V) {
138
- var j = m.ref;
137
+ function P(t, a, i, f, O, $) {
138
+ var m = i.ref;
139
139
  return t = {
140
140
  $$typeof: k,
141
141
  type: t,
142
142
  key: a,
143
- props: m,
144
- _owner: u
145
- }, (j !== void 0 ? j : null) !== null ? Object.defineProperty(t, "ref", {
143
+ props: i,
144
+ _owner: f
145
+ }, (m !== void 0 ? m : null) !== null ? Object.defineProperty(t, "ref", {
146
146
  enumerable: !1,
147
- get: f
147
+ get: w
148
148
  }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
149
149
  configurable: !1,
150
150
  enumerable: !1,
@@ -159,69 +159,69 @@ function Le() {
159
159
  configurable: !1,
160
160
  enumerable: !1,
161
161
  writable: !0,
162
- value: $
162
+ value: O
163
163
  }), Object.defineProperty(t, "_debugTask", {
164
164
  configurable: !1,
165
165
  enumerable: !1,
166
166
  writable: !0,
167
- value: V
167
+ value: $
168
168
  }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
169
169
  }
170
- function w(t, a, m, u, $, V) {
171
- var j = a.children;
172
- if (j !== void 0)
173
- if (u)
174
- if (Q(j)) {
175
- for (u = 0; u < j.length; u++)
176
- R(j[u]);
177
- Object.freeze && Object.freeze(j);
170
+ function v(t, a, i, f, O, $) {
171
+ var m = a.children;
172
+ if (m !== void 0)
173
+ if (f)
174
+ if (U(m)) {
175
+ for (f = 0; f < m.length; f++)
176
+ b(m[f]);
177
+ Object.freeze && Object.freeze(m);
178
178
  } else
179
179
  console.error(
180
180
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
181
181
  );
182
- else R(j);
183
- if (Z.call(a, "key")) {
184
- j = s(t);
185
- var M = Object.keys(a).filter(function(te) {
186
- return te !== "key";
182
+ else b(m);
183
+ if (Q.call(a, "key")) {
184
+ m = s(t);
185
+ var R = Object.keys(a).filter(function(me) {
186
+ return me !== "key";
187
187
  });
188
- u = 0 < M.length ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}", C[j + u] || (M = 0 < M.length ? "{" + M.join(": ..., ") + ": ...}" : "{}", console.error(
188
+ f = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", J[m + f] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
189
189
  `A props object containing a "key" prop is being spread into JSX:
190
190
  let props = %s;
191
191
  <%s {...props} />
192
192
  React keys must be passed directly to JSX without using spread:
193
193
  let props = %s;
194
194
  <%s key={someKey} {...props} />`,
195
- u,
196
- j,
197
- M,
198
- j
199
- ), C[j + u] = !0);
195
+ f,
196
+ m,
197
+ R,
198
+ m
199
+ ), J[m + f] = !0);
200
200
  }
201
- if (j = null, m !== void 0 && (x(m), j = "" + m), v(a) && (x(a.key), j = "" + a.key), "key" in a) {
202
- m = {};
203
- for (var G in a)
204
- G !== "key" && (m[G] = a[G]);
205
- } else m = a;
206
- return j && N(
207
- m,
201
+ if (m = null, i !== void 0 && (x(i), m = "" + i), y(a) && (x(a.key), m = "" + a.key), "key" in a) {
202
+ i = {};
203
+ for (var H in a)
204
+ H !== "key" && (i[H] = a[H]);
205
+ } else i = a;
206
+ return m && S(
207
+ i,
208
208
  typeof t == "function" ? t.displayName || t.name || "Unknown" : t
209
- ), _(
209
+ ), P(
210
210
  t,
211
- j,
212
211
  m,
213
- g(),
214
- $,
215
- V
212
+ i,
213
+ j(),
214
+ O,
215
+ $
216
216
  );
217
217
  }
218
- function R(t) {
219
- O(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === z && (t._payload.status === "fulfilled" ? O(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
218
+ function b(t) {
219
+ D(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === K && (t._payload.status === "fulfilled" ? D(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
220
220
  }
221
- function O(t) {
221
+ function D(t) {
222
222
  return typeof t == "object" && t !== null && t.$$typeof === k;
223
223
  }
224
- var E = Te, k = /* @__PURE__ */ Symbol.for("react.transitional.element"), A = /* @__PURE__ */ Symbol.for("react.portal"), L = /* @__PURE__ */ Symbol.for("react.fragment"), P = /* @__PURE__ */ Symbol.for("react.strict_mode"), W = /* @__PURE__ */ Symbol.for("react.profiler"), p = /* @__PURE__ */ Symbol.for("react.consumer"), S = /* @__PURE__ */ Symbol.for("react.context"), F = /* @__PURE__ */ Symbol.for("react.forward_ref"), ne = /* @__PURE__ */ Symbol.for("react.suspense"), me = /* @__PURE__ */ Symbol.for("react.suspense_list"), H = /* @__PURE__ */ Symbol.for("react.memo"), z = /* @__PURE__ */ Symbol.for("react.lazy"), le = /* @__PURE__ */ Symbol.for("react.activity"), Y = /* @__PURE__ */ Symbol.for("react.client.reference"), K = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, Q = Array.isArray, U = console.createTask ? console.createTask : function() {
224
+ var E = Ce, k = /* @__PURE__ */ Symbol.for("react.transitional.element"), A = /* @__PURE__ */ Symbol.for("react.portal"), F = /* @__PURE__ */ Symbol.for("react.fragment"), C = /* @__PURE__ */ Symbol.for("react.strict_mode"), X = /* @__PURE__ */ Symbol.for("react.profiler"), g = /* @__PURE__ */ Symbol.for("react.consumer"), _ = /* @__PURE__ */ Symbol.for("react.context"), B = /* @__PURE__ */ Symbol.for("react.forward_ref"), de = /* @__PURE__ */ Symbol.for("react.suspense"), ne = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), K = /* @__PURE__ */ Symbol.for("react.lazy"), ue = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), z = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, U = Array.isArray, q = console.createTask ? console.createTask : function() {
225
225
  return null;
226
226
  };
227
227
  E = {
@@ -229,55 +229,55 @@ React keys must be passed directly to JSX without using spread:
229
229
  return t();
230
230
  }
231
231
  };
232
- var D, q = {}, ee = E.react_stack_bottom_frame.bind(
232
+ var ee, V = {}, G = E.react_stack_bottom_frame.bind(
233
233
  E,
234
- c
235
- )(), I = U(b(c)), C = {};
236
- se.Fragment = L, se.jsx = function(t, a, m) {
237
- var u = 1e4 > K.recentlyCreatedOwnerStacks++;
238
- return w(
234
+ d
235
+ )(), I = q(h(d)), J = {};
236
+ se.Fragment = F, se.jsx = function(t, a, i) {
237
+ var f = 1e4 > z.recentlyCreatedOwnerStacks++;
238
+ return v(
239
239
  t,
240
240
  a,
241
- m,
241
+ i,
242
242
  !1,
243
- u ? Error("react-stack-top-frame") : ee,
244
- u ? U(b(t)) : I
243
+ f ? Error("react-stack-top-frame") : G,
244
+ f ? q(h(t)) : I
245
245
  );
246
- }, se.jsxs = function(t, a, m) {
247
- var u = 1e4 > K.recentlyCreatedOwnerStacks++;
248
- return w(
246
+ }, se.jsxs = function(t, a, i) {
247
+ var f = 1e4 > z.recentlyCreatedOwnerStacks++;
248
+ return v(
249
249
  t,
250
250
  a,
251
- m,
251
+ i,
252
252
  !0,
253
- u ? Error("react-stack-top-frame") : ee,
254
- u ? U(b(t)) : I
253
+ f ? Error("react-stack-top-frame") : G,
254
+ f ? q(h(t)) : I
255
255
  );
256
256
  };
257
257
  })()), se;
258
258
  }
259
- var je;
260
- function De() {
261
- return je || (je = 1, process.env.NODE_ENV === "production" ? de.exports = Oe() : de.exports = Le()), de.exports;
259
+ var ye;
260
+ function Be() {
261
+ return ye || (ye = 1, process.env.NODE_ENV === "production" ? ce.exports = Ue() : ce.exports = Ye()), ce.exports;
262
262
  }
263
- var e = De();
264
- function Ie() {
265
- const [s, d] = h(0), x = ue(Date.now());
266
- return ke(() => {
267
- const b = setInterval(() => {
268
- d(Math.floor((Date.now() - x.current) / 1e3));
263
+ var e = Be();
264
+ function We() {
265
+ const [s, u] = p(0), x = ie(Date.now());
266
+ return Re(() => {
267
+ const h = setInterval(() => {
268
+ u(Math.floor((Date.now() - x.current) / 1e3));
269
269
  }, 1e3);
270
- return () => clearInterval(b);
270
+ return () => clearInterval(h);
271
271
  }, []), s;
272
272
  }
273
- function $e(s) {
273
+ function Ke(s) {
274
274
  return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`;
275
275
  }
276
- function Me({
276
+ function qe({
277
277
  message: s = "Processing your file…",
278
- onCancel: d
278
+ onCancel: u
279
279
  }) {
280
- const x = Ie();
280
+ const x = We();
281
281
  return /* @__PURE__ */ e.jsxs(
282
282
  "div",
283
283
  {
@@ -287,13 +287,13 @@ function Me({
287
287
  children: [
288
288
  /* @__PURE__ */ e.jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-blue-700 border-t-transparent" }),
289
289
  /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: s }),
290
- /* @__PURE__ */ e.jsx("p", { className: "text-xs tabular-nums text-slate-500", children: $e(x) }),
290
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs tabular-nums text-slate-500", children: Ke(x) }),
291
291
  x >= 10 ? /* @__PURE__ */ e.jsx("p", { className: "max-w-xs text-center text-xs text-slate-500", children: "Large documents can take a while. You can keep working in other tabs." }) : null,
292
- d ? /* @__PURE__ */ e.jsx(
292
+ u ? /* @__PURE__ */ e.jsx(
293
293
  "button",
294
294
  {
295
295
  type: "button",
296
- onClick: d,
296
+ onClick: u,
297
297
  className: "mt-2 rounded border border-slate-300 px-3 py-1.5 text-xs font-medium text-slate-700 hover:bg-slate-50",
298
298
  children: "Cancel"
299
299
  }
@@ -302,7 +302,7 @@ function Me({
302
302
  }
303
303
  );
304
304
  }
305
- const we = [
305
+ const Te = [
306
306
  ".tex",
307
307
  ".md",
308
308
  ".markdown",
@@ -312,27 +312,27 @@ const we = [
312
312
  ".gz",
313
313
  ".tar.gz",
314
314
  ".tgz"
315
- ], Xe = {
315
+ ], Ve = {
316
316
  id: "builtin",
317
317
  label: "Built-in converter",
318
318
  description: "Create a new project starting with LaTeX, Markdown, or PreTeXt files.",
319
- acceptExtensions: we,
320
- convertFile: Ne,
319
+ acceptExtensions: Te,
320
+ convertFile: Ee,
321
321
  prepare: async (s) => {
322
- const { files: d, assets: x } = await Re(s);
322
+ const { files: u, assets: x } = await Le(s);
323
323
  return {
324
324
  fileName: s.name,
325
- files: d,
325
+ files: u,
326
326
  assets: x,
327
- analysis: ye(d)
327
+ analysis: ke(u)
328
328
  };
329
329
  },
330
- convertPrepared: (s, d) => Ce(s.files, {
331
- ...d,
330
+ convertPrepared: (s, u) => Oe(s.files, {
331
+ ...u,
332
332
  assets: s.assets
333
333
  })
334
334
  };
335
- function xe() {
335
+ function fe() {
336
336
  return new Promise((s) => {
337
337
  if (typeof requestAnimationFrame != "function") {
338
338
  setTimeout(s, 0);
@@ -341,138 +341,141 @@ function xe() {
341
341
  requestAnimationFrame(() => setTimeout(s, 0));
342
342
  });
343
343
  }
344
- const ve = {
344
+ const we = {
345
345
  pretext: "PreTeXt",
346
346
  latex: "LaTeX",
347
347
  markdown: "Markdown"
348
348
  };
349
- function ze(s) {
350
- const d = s.reason === "manifest-target" ? `project.ptx target “${s.targetName}”` : s.reason === "latex-root" ? "LaTeX document" : s.reason === "pretext-root" ? "PreTeXt document" : s.reason === "markdown-root" ? "Markdown document" : "possible document";
351
- return s.title ? `${s.title} — ${d}` : d;
349
+ function Ge(s) {
350
+ const u = s.reason === "manifest-target" ? `project.ptx target “${s.targetName}”` : s.reason === "latex-root" ? "LaTeX document" : s.reason === "pretext-root" ? "PreTeXt document" : s.reason === "markdown-root" ? "Markdown document" : "possible document";
351
+ return s.title ? `${s.title} — ${u}` : u;
352
352
  }
353
- function Ye(s) {
353
+ function Je(s) {
354
354
  return s.candidates.filter(
355
355
  (x) => x.reason === "manifest-target"
356
356
  ).length > 1 ? !0 : s.manifest && s.primary?.reason === "manifest-target" ? !1 : s.formats.length > 1 || s.candidates.length > 1 || s.extraRoots.length > 0;
357
357
  }
358
- function Ge({
358
+ function st({
359
359
  onConfirm: s,
360
- onCancel: d,
360
+ onCancel: u,
361
361
  importOptions: x,
362
- defaultDocumentKind: b = "auto",
363
- engines: g
362
+ defaultDocumentKind: h = "auto",
363
+ defaultImportMode: j = $e,
364
+ lockImportMode: d = !1,
365
+ onImportModeChange: y,
366
+ engines: S
364
367
  }) {
365
- const c = g && g.length > 0 ? g : [Xe], v = ue(null), [N, f] = h({ name: "upload" }), [_, w] = h(!1), [R, O] = h(b), [E, k] = h(null), [A, L] = h(/* @__PURE__ */ new Set()), [P, W] = h(c[0].id), [p, S] = h("converted"), [F, ne] = h(!1), [me, H] = h(/* @__PURE__ */ new Set()), [z, le] = h(null), [Y, K] = h(
368
+ const w = S && S.length > 0 ? S : [Ve], P = ie(null), [v, b] = p({ name: "upload" }), [D, E] = p(!1), [k, A] = p(h), [F, C] = p(null), [X, g] = p(/* @__PURE__ */ new Set()), [_, B] = p(w[0].id), [de, ne] = p(j), [W, K] = p(!1), [ue, Z] = p(/* @__PURE__ */ new Set()), [z, Q] = p(null), [U, q] = p(
366
369
  "auto"
367
- ), [Z, Q] = h(null), [U, D] = h({}), [q, ee] = h(!1), I = ue(!1), C = c.find((r) => r.id === P) ?? c[0], t = C.acceptExtensions ?? we, a = N.name === "review" ? N.result : null, m = ae(
368
- () => a && E !== null ? Se(a, E) : a,
369
- [a, E]
370
- ), u = ae(
370
+ ), [ee, V] = p(null), [G, I] = p({}), [J, t] = p(!1), a = ie(!1), i = w.find((r) => r.id === _) ?? w[0], f = i.acceptExtensions ?? Te, O = v.name === "review" ? v.result : null, $ = ae(
371
+ () => O && F !== null ? Ae(O, F) : O,
372
+ [O, F]
373
+ ), m = ae(
371
374
  () => new Map(
372
- m ? Fe(m).map((r) => [r.path, r]) : []
375
+ $ ? Me($).map((r) => [r.path, r]) : []
373
376
  ),
374
- [m]
375
- ), $ = () => x ?? {
376
- documentKind: R === "auto" ? void 0 : R
377
- }, V = (r) => ye(r.files, {
378
- sourceFormat: Y === "auto" ? void 0 : Y,
379
- mainFile: Z ?? void 0
380
- }), j = (r) => {
381
- I.current = !0, C.cancel?.(), f(
377
+ [$]
378
+ ), R = () => x ?? {
379
+ documentKind: k === "auto" ? void 0 : k
380
+ }, H = (r) => ke(r.files, {
381
+ sourceFormat: U === "auto" ? void 0 : U,
382
+ mainFile: ee ?? void 0
383
+ }), me = (r) => {
384
+ a.current = !0, i.cancel?.(), b(
382
385
  r ? { name: "sources", prepared: r } : { name: "upload" }
383
386
  );
384
- }, M = async (r) => {
385
- I.current = !1, f({ name: "processing" }), await xe();
387
+ }, Se = async (r) => {
388
+ a.current = !1, b({ name: "processing" }), await fe();
386
389
  try {
387
- const l = V(r).extraRoots.map((i) => ({
388
- path: i.path,
389
- include: U[i.path]?.include ?? !0,
390
- level: U[i.path]?.level
391
- })), y = await C.convertPrepared(r, {
392
- ...$(),
393
- sourceFormat: Y === "auto" ? void 0 : Y,
394
- mainFile: Z ?? void 0,
390
+ const l = H(r).extraRoots.map((c) => ({
391
+ path: c.path,
392
+ include: G[c.path]?.include ?? !0,
393
+ level: G[c.path]?.level
394
+ })), N = await i.convertPrepared(r, {
395
+ ...R(),
396
+ sourceFormat: U === "auto" ? void 0 : U,
397
+ mainFile: ee ?? void 0,
395
398
  attachRoots: l
396
399
  });
397
- "pretextError" in y ? f({ name: "error", message: y.pretextError }) : f({ name: "review", result: y });
400
+ "pretextError" in N ? b({ name: "error", message: N.pretextError }) : b({ name: "review", result: N });
398
401
  } catch (o) {
399
- if (I.current)
402
+ if (a.current)
400
403
  return;
401
- f({
404
+ b({
402
405
  name: "error",
403
406
  message: o instanceof Error ? o.message : "An unexpected error occurred."
404
407
  });
405
408
  }
406
- }, G = async (r) => {
407
- I.current = !1, f({ name: "processing" }), await xe();
409
+ }, he = async (r) => {
410
+ a.current = !1, b({ name: "processing" }), await fe();
408
411
  try {
409
- if (C.prepare && C.convertPrepared) {
410
- const l = await C.prepare(r);
411
- if (le(l), K("auto"), Q(null), D({}), Ye(l.analysis)) {
412
- f({ name: "sources", prepared: l });
412
+ if (i.prepare && i.convertPrepared) {
413
+ const l = await i.prepare(r);
414
+ if (Q(l), q("auto"), V(null), I({}), Je(l.analysis)) {
415
+ b({ name: "sources", prepared: l });
413
416
  return;
414
417
  }
415
- await xe();
416
- const y = await C.convertPrepared(
418
+ await fe();
419
+ const N = await i.convertPrepared(
417
420
  l,
418
- $()
421
+ R()
419
422
  );
420
- f(
421
- "pretextError" in y ? { name: "error", message: y.pretextError } : { name: "review", result: y }
423
+ b(
424
+ "pretextError" in N ? { name: "error", message: N.pretextError } : { name: "review", result: N }
422
425
  );
423
426
  return;
424
427
  }
425
- const o = await C.convertFile(r, $());
426
- "pretextError" in o ? f({ name: "error", message: o.pretextError }) : f({ name: "review", result: o });
428
+ const o = await i.convertFile(r, R());
429
+ "pretextError" in o ? b({ name: "error", message: o.pretextError }) : b({ name: "review", result: o });
427
430
  } catch (o) {
428
- if (I.current)
431
+ if (a.current)
429
432
  return;
430
- f({
433
+ b({
431
434
  name: "error",
432
435
  message: o instanceof Error ? o.message : "An unexpected error occurred."
433
436
  });
434
437
  }
435
- }, te = () => {
436
- f({ name: "upload" }), S("converted"), ne(!1), H(/* @__PURE__ */ new Set()), L(/* @__PURE__ */ new Set()), k(null), le(null);
438
+ }, xe = () => {
439
+ b({ name: "upload" }), ne(j), K(!1), Z(/* @__PURE__ */ new Set()), g(/* @__PURE__ */ new Set()), C(null), Q(null);
437
440
  };
438
- function pe(r, o) {
439
- return [...r].sort((l, y) => l === o ? -1 : y === o ? 1 : l.localeCompare(y));
441
+ function be(r, o) {
442
+ return [...r].sort((l, N) => l === o ? -1 : N === o ? 1 : l.localeCompare(N));
440
443
  }
441
- function fe(r, o) {
442
- const l = he(r, o), y = o === "converted" ? r.projectLayout.mainSourcePath : r.sourcePath, i = pe(Object.keys(l), y)[0];
443
- H(i ? /* @__PURE__ */ new Set([i]) : /* @__PURE__ */ new Set());
444
+ function ge(r, o) {
445
+ const l = je(r, o), N = o === "converted" ? r.projectLayout.mainSourcePath : r.sourcePath, c = be(Object.keys(l), N)[0];
446
+ Z(c ? /* @__PURE__ */ new Set([c]) : /* @__PURE__ */ new Set());
444
447
  }
445
- function Ee(r) {
446
- H((o) => {
448
+ function Pe(r) {
449
+ Z((o) => {
447
450
  const l = new Set(o);
448
451
  return l.has(r) ? l.delete(r) : l.add(r), l;
449
452
  });
450
453
  }
451
- if (N.name === "processing")
454
+ if (v.name === "processing")
452
455
  return /* @__PURE__ */ e.jsx(
453
- Me,
456
+ qe,
454
457
  {
455
- onCancel: C.cancel ? () => j(z) : void 0
458
+ onCancel: i.cancel ? () => me(z) : void 0
456
459
  }
457
460
  );
458
- if (N.name === "error")
461
+ if (v.name === "error")
459
462
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
460
463
  /* @__PURE__ */ e.jsxs("div", { className: "rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800", children: [
461
464
  /* @__PURE__ */ e.jsx("p", { className: "font-semibold", children: "Import failed" }),
462
- /* @__PURE__ */ e.jsx("p", { className: "mt-1", children: N.message })
465
+ /* @__PURE__ */ e.jsx("p", { className: "mt-1", children: v.message })
463
466
  ] }),
464
467
  /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ e.jsx(
465
468
  "button",
466
469
  {
467
470
  type: "button",
468
- onClick: te,
471
+ onClick: xe,
469
472
  className: "rounded bg-blue-700 px-4 py-2 text-sm font-medium text-white hover:bg-blue-600",
470
473
  children: "Try Another File"
471
474
  }
472
475
  ) })
473
476
  ] });
474
- if (N.name === "sources") {
475
- const r = N.prepared, o = V(r), l = o.manifest, y = o.primary?.path ?? "";
477
+ if (v.name === "sources") {
478
+ const r = v.prepared, o = H(r), l = o.manifest, N = o.primary?.path ?? "";
476
479
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
477
480
  /* @__PURE__ */ e.jsxs("div", { children: [
478
481
  /* @__PURE__ */ e.jsx("h3", { className: "text-sm font-semibold text-slate-700", children: "Choose what to import" }),
@@ -490,7 +493,7 @@ function Ge({
490
493
  /* @__PURE__ */ e.jsxs("p", { className: "mt-1 text-blue-800", children: [
491
494
  "Its publication file, assets, and directory layout will be kept as they are. Targets:",
492
495
  " ",
493
- l.targets.map((i) => i.name).join(", "),
496
+ l.targets.map((c) => c.name).join(", "),
494
497
  "."
495
498
  ] })
496
499
  ] }) : null,
@@ -499,24 +502,24 @@ function Ge({
499
502
  /* @__PURE__ */ e.jsxs(
500
503
  "select",
501
504
  {
502
- value: Y,
503
- onChange: (i) => {
504
- K(i.currentTarget.value), Q(null), D({});
505
+ value: U,
506
+ onChange: (c) => {
507
+ q(c.currentTarget.value), V(null), I({});
505
508
  },
506
509
  className: "rounded border border-slate-300 px-2 py-1 text-sm",
507
510
  children: [
508
511
  /* @__PURE__ */ e.jsxs("option", { value: "auto", children: [
509
512
  "Auto detect",
510
- o.primary ? ` (${ve[o.primary.format]})` : ""
513
+ o.primary ? ` (${we[o.primary.format]})` : ""
511
514
  ] }),
512
- o.formats.map((i) => /* @__PURE__ */ e.jsx("option", { value: i, children: ve[i] }, i))
515
+ o.formats.map((c) => /* @__PURE__ */ e.jsx("option", { value: c, children: we[c] }, c))
513
516
  ]
514
517
  }
515
518
  )
516
519
  ] }) }),
517
520
  o.candidates.length > 1 ? /* @__PURE__ */ e.jsxs("fieldset", { className: "rounded-lg border border-slate-200 p-4", children: [
518
521
  /* @__PURE__ */ e.jsx("legend", { className: "px-1 text-sm font-semibold text-slate-700", children: "Main document" }),
519
- /* @__PURE__ */ e.jsx("div", { className: "mt-2 flex flex-col gap-2", children: o.candidates.map((i) => /* @__PURE__ */ e.jsxs(
522
+ /* @__PURE__ */ e.jsx("div", { className: "mt-2 flex flex-col gap-2", children: o.candidates.map((c) => /* @__PURE__ */ e.jsxs(
520
523
  "label",
521
524
  {
522
525
  className: "flex cursor-pointer items-start gap-3 text-sm",
@@ -526,28 +529,28 @@ function Ge({
526
529
  {
527
530
  type: "radio",
528
531
  name: "main-file",
529
- value: i.path,
530
- checked: y === i.path,
532
+ value: c.path,
533
+ checked: N === c.path,
531
534
  onChange: () => {
532
- Q(i.path), D({});
535
+ V(c.path), I({});
533
536
  },
534
537
  className: "mt-0.5"
535
538
  }
536
539
  ),
537
540
  /* @__PURE__ */ e.jsxs("span", { children: [
538
- /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs text-slate-900", children: i.path }),
539
- /* @__PURE__ */ e.jsx("span", { className: "block text-slate-500", children: ze(i) })
541
+ /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs text-slate-900", children: c.path }),
542
+ /* @__PURE__ */ e.jsx("span", { className: "block text-slate-500", children: Ge(c) })
540
543
  ] })
541
544
  ]
542
545
  },
543
- i.path
546
+ c.path
544
547
  )) })
545
548
  ] }) : null,
546
549
  o.extraRoots.length > 0 ? /* @__PURE__ */ e.jsxs("fieldset", { className: "rounded-lg border border-slate-200 p-4", children: [
547
550
  /* @__PURE__ */ e.jsx("legend", { className: "px-1 text-sm font-semibold text-slate-700", children: "Other documents" }),
548
551
  /* @__PURE__ */ e.jsx("p", { className: "mt-1 text-sm text-slate-500", children: "These files also stand on their own. Attach them to the main document, or leave them out." }),
549
- /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex flex-col gap-2", children: o.extraRoots.map((i) => {
550
- const J = U[i.path], oe = J?.include ?? !0;
552
+ /* @__PURE__ */ e.jsx("div", { className: "mt-3 flex flex-col gap-2", children: o.extraRoots.map((c) => {
553
+ const L = G[c.path], te = L?.include ?? !0;
551
554
  return /* @__PURE__ */ e.jsxs(
552
555
  "div",
553
556
  {
@@ -558,20 +561,20 @@ function Ge({
558
561
  "input",
559
562
  {
560
563
  type: "checkbox",
561
- checked: oe,
562
- onChange: (X) => D((B) => ({
563
- ...B,
564
- [i.path]: {
565
- ...B[i.path],
566
- include: X.currentTarget.checked
564
+ checked: te,
565
+ onChange: (M) => I((Y) => ({
566
+ ...Y,
567
+ [c.path]: {
568
+ ...Y[c.path],
569
+ include: M.currentTarget.checked
567
570
  }
568
571
  }))
569
572
  }
570
573
  ),
571
- /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs text-slate-900", children: i.path }),
572
- i.title ? /* @__PURE__ */ e.jsxs("span", { className: "text-slate-500", children: [
574
+ /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs text-slate-900", children: c.path }),
575
+ c.title ? /* @__PURE__ */ e.jsxs("span", { className: "text-slate-500", children: [
573
576
  "— ",
574
- i.title
577
+ c.title
575
578
  ] }) : null
576
579
  ] }),
577
580
  /* @__PURE__ */ e.jsxs("label", { className: "flex items-center gap-2 text-slate-700", children: [
@@ -579,13 +582,13 @@ function Ge({
579
582
  /* @__PURE__ */ e.jsxs(
580
583
  "select",
581
584
  {
582
- value: J?.level ?? "auto",
583
- disabled: !oe,
584
- onChange: (X) => D((B) => ({
585
- ...B,
586
- [i.path]: {
587
- include: B[i.path]?.include ?? !0,
588
- level: X.currentTarget.value === "auto" ? void 0 : X.currentTarget.value
585
+ value: L?.level ?? "auto",
586
+ disabled: !te,
587
+ onChange: (M) => I((Y) => ({
588
+ ...Y,
589
+ [c.path]: {
590
+ include: Y[c.path]?.include ?? !0,
591
+ level: M.currentTarget.value === "auto" ? void 0 : M.currentTarget.value
589
592
  }
590
593
  })),
591
594
  className: "rounded border border-slate-300 px-2 py-1 text-sm disabled:opacity-50",
@@ -599,7 +602,7 @@ function Ge({
599
602
  ] })
600
603
  ]
601
604
  },
602
- i.path
605
+ c.path
603
606
  );
604
607
  }) })
605
608
  ] }) : null,
@@ -608,7 +611,7 @@ function Ge({
608
611
  "button",
609
612
  {
610
613
  type: "button",
611
- onClick: te,
614
+ onClick: xe,
612
615
  className: "px-4 py-2 text-sm text-slate-600 hover:text-slate-900",
613
616
  children: "Start Over"
614
617
  }
@@ -617,7 +620,7 @@ function Ge({
617
620
  "button",
618
621
  {
619
622
  type: "button",
620
- onClick: () => M(r),
623
+ onClick: () => Se(r),
621
624
  className: "rounded bg-blue-700 px-4 py-2 text-sm font-medium text-white hover:bg-blue-600",
622
625
  children: "Continue"
623
626
  }
@@ -625,18 +628,18 @@ function Ge({
625
628
  ] })
626
629
  ] });
627
630
  }
628
- if (N.name === "review") {
631
+ if (v.name === "review") {
629
632
  let r = function(n) {
630
- S(n), F && fe(l, n);
633
+ ne(n), y?.(n), W && ge(l, n);
631
634
  }, o = function(n) {
632
- L((T) => {
633
- const ie = new Set(T);
634
- return ie.has(n) ? ie.delete(n) : ie.add(n), ie;
635
+ g((T) => {
636
+ const oe = new Set(T);
637
+ return oe.has(n) ? oe.delete(n) : oe.add(n), oe;
635
638
  });
636
639
  };
637
- const l = m ?? N.result, y = l.splitLevel, i = l.detectedSourceFormat === "latex", J = l.warnings.length, oe = Object.keys(l.outputFiles).length, X = he(l, p), B = p === "converted" ? l.projectLayout.mainSourcePath : l.sourcePath, ce = pe(
638
- Object.keys(X),
639
- B
640
+ const l = $ ?? v.result, N = l.splitLevel, c = Xe(l), L = ze(l, de), te = l.detectedSourceFormat === "markdown" ? "Markdown" : "LaTeX", M = l.warnings.length, Y = Object.keys(l.outputFiles).length, pe = je(l, L), _e = L === "converted" ? l.projectLayout.mainSourcePath : l.sourcePath, le = be(
641
+ Object.keys(pe),
642
+ _e
640
643
  );
641
644
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
642
645
  /* @__PURE__ */ e.jsxs("div", { className: "rounded-lg border border-slate-200 bg-slate-50 p-4", children: [
@@ -649,7 +652,7 @@ function Ge({
649
652
  /* @__PURE__ */ e.jsx("dt", { className: "text-slate-500", children: "Document kind" }),
650
653
  /* @__PURE__ */ e.jsx("dd", { className: "font-medium text-slate-900 capitalize", children: l.documentKind }),
651
654
  /* @__PURE__ */ e.jsx("dt", { className: "text-slate-500", children: "Output files" }),
652
- /* @__PURE__ */ e.jsx("dd", { className: "font-medium text-slate-900", children: oe }),
655
+ /* @__PURE__ */ e.jsx("dd", { className: "font-medium text-slate-900", children: Y }),
653
656
  l.projectLayout.preserved ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
654
657
  /* @__PURE__ */ e.jsx("dt", { className: "text-slate-500", children: "Existing project" }),
655
658
  /* @__PURE__ */ e.jsx("dd", { className: "font-medium text-slate-900", children: "Kept publication file, assets, and layout" })
@@ -660,12 +663,12 @@ function Ge({
660
663
  ] }) : null
661
664
  ] })
662
665
  ] }),
663
- J > 0 ? /* @__PURE__ */ e.jsxs("details", { className: "rounded-lg border border-amber-200 bg-amber-50 p-4 text-sm", children: [
666
+ M > 0 ? /* @__PURE__ */ e.jsxs("details", { className: "rounded-lg border border-amber-200 bg-amber-50 p-4 text-sm", children: [
664
667
  /* @__PURE__ */ e.jsxs("summary", { className: "cursor-pointer font-semibold text-amber-800", children: [
665
- J,
668
+ M,
666
669
  " conversion",
667
670
  " ",
668
- J === 1 ? "warning" : "warnings"
671
+ M === 1 ? "warning" : "warnings"
669
672
  ] }),
670
673
  /* @__PURE__ */ e.jsx("ul", { className: "mt-3 space-y-1.5 text-amber-700", children: l.warnings.map((n, T) => /* @__PURE__ */ e.jsxs("li", { children: [
671
674
  /* @__PURE__ */ e.jsx("code", { className: "rounded bg-amber-100 px-1 py-0.5 text-xs", children: n.macro }),
@@ -674,7 +677,7 @@ function Ge({
674
677
  n.occurrences > 1 ? ` (×${n.occurrences})` : null
675
678
  ] }, T)) })
676
679
  ] }) : /* @__PURE__ */ e.jsx("p", { className: "text-sm text-green-700", children: "No conversion warnings." }),
677
- i ? /* @__PURE__ */ e.jsxs("fieldset", { className: "rounded-lg border border-slate-200 p-4", children: [
680
+ c && !d ? /* @__PURE__ */ e.jsxs("fieldset", { className: "rounded-lg border border-slate-200 p-4", children: [
678
681
  /* @__PURE__ */ e.jsx("legend", { className: "px-1 text-sm font-semibold text-slate-700", children: "Import mode" }),
679
682
  /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex flex-col gap-3", children: [
680
683
  /* @__PURE__ */ e.jsxs("label", { className: "flex cursor-pointer items-start gap-3 text-sm", children: [
@@ -684,7 +687,7 @@ function Ge({
684
687
  type: "radio",
685
688
  name: "import-mode",
686
689
  value: "converted",
687
- checked: p === "converted",
690
+ checked: L === "converted",
688
691
  onChange: () => r("converted"),
689
692
  className: "mt-0.5"
690
693
  }
@@ -701,14 +704,21 @@ function Ge({
701
704
  type: "radio",
702
705
  name: "import-mode",
703
706
  value: "native",
704
- checked: p === "native",
707
+ checked: L === "native",
705
708
  onChange: () => r("native"),
706
709
  className: "mt-0.5"
707
710
  }
708
711
  ),
709
712
  /* @__PURE__ */ e.jsxs("span", { children: [
710
- /* @__PURE__ */ e.jsx("span", { className: "font-medium text-slate-900", children: "Keep as LaTeX" }),
711
- /* @__PURE__ */ e.jsx("span", { className: "block text-slate-500", children: "Preserve the original LaTeX source. The conversion will not be applied." })
713
+ /* @__PURE__ */ e.jsxs("span", { className: "font-medium text-slate-900", children: [
714
+ "Keep as ",
715
+ te
716
+ ] }),
717
+ /* @__PURE__ */ e.jsxs("span", { className: "block text-slate-500", children: [
718
+ "Preserve the original ",
719
+ te,
720
+ " source. The conversion will not be applied."
721
+ ] })
712
722
  ] })
713
723
  ] })
714
724
  ] })
@@ -717,36 +727,36 @@ function Ge({
717
727
  /* @__PURE__ */ e.jsx("legend", { className: "px-1 text-sm font-semibold text-slate-700", children: "Split into files" }),
718
728
  /* @__PURE__ */ e.jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: [
719
729
  Array.from(
720
- { length: Pe + 1 },
730
+ { length: Fe + 1 },
721
731
  (n, T) => /* @__PURE__ */ e.jsx(
722
732
  "button",
723
733
  {
724
734
  type: "button",
725
- onClick: () => k(T),
726
- "aria-pressed": y === T,
727
- className: y === T ? "rounded bg-blue-700 px-3 py-1 text-sm font-medium text-white" : "rounded border border-slate-300 px-3 py-1 text-sm text-slate-700 hover:bg-slate-50",
735
+ onClick: () => C(T),
736
+ "aria-pressed": N === T,
737
+ className: N === T ? "rounded bg-blue-700 px-3 py-1 text-sm font-medium text-white" : "rounded border border-slate-300 px-3 py-1 text-sm text-slate-700 hover:bg-slate-50",
728
738
  children: T === 0 ? "One file" : `${T} level${T === 1 ? "" : "s"}`
729
739
  },
730
740
  T
731
741
  )
732
742
  ),
733
743
  /* @__PURE__ */ e.jsxs("span", { className: "ml-2 text-sm text-slate-500", children: [
734
- ce.length,
744
+ le.length,
735
745
  " file",
736
- ce.length === 1 ? "" : "s"
746
+ le.length === 1 ? "" : "s"
737
747
  ] })
738
748
  ] }),
739
- /* @__PURE__ */ e.jsx("ul", { className: "mt-3 max-h-48 overflow-auto font-mono text-xs text-slate-600", children: ce.map((n) => /* @__PURE__ */ e.jsxs("li", { className: "truncate py-0.5", children: [
749
+ /* @__PURE__ */ e.jsx("ul", { className: "mt-3 max-h-48 overflow-auto font-mono text-xs text-slate-600", children: le.map((n) => /* @__PURE__ */ e.jsxs("li", { className: "truncate py-0.5", children: [
740
750
  n,
741
- u.get(n)?.fixCount ? /* @__PURE__ */ e.jsxs("span", { className: "ml-2 text-amber-700", children: [
742
- u.get(n).fixCount,
751
+ m.get(n)?.fixCount ? /* @__PURE__ */ e.jsxs("span", { className: "ml-2 text-amber-700", children: [
752
+ m.get(n).fixCount,
743
753
  " change",
744
- u.get(n).fixCount === 1 ? "" : "s"
754
+ m.get(n).fixCount === 1 ? "" : "s"
745
755
  ] }) : null
746
756
  ] }, n)) })
747
757
  ] }) : null,
748
- F ? /* @__PURE__ */ e.jsx("div", { className: "overflow-hidden rounded-lg border border-slate-200 text-sm", children: ce.map((n) => {
749
- const T = me.has(n);
758
+ W ? /* @__PURE__ */ e.jsx("div", { className: "overflow-hidden rounded-lg border border-slate-200 text-sm", children: le.map((n) => {
759
+ const T = ue.has(n);
750
760
  return /* @__PURE__ */ e.jsxs(
751
761
  "div",
752
762
  {
@@ -756,38 +766,38 @@ function Ge({
756
766
  "button",
757
767
  {
758
768
  type: "button",
759
- onClick: () => Ee(n),
769
+ onClick: () => Pe(n),
760
770
  className: "flex w-full items-center gap-2 bg-slate-100 px-4 py-2 text-left font-mono text-xs text-slate-700 hover:bg-slate-200",
761
771
  children: [
762
772
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-slate-400", children: T ? "▾" : "▸" }),
763
773
  /* @__PURE__ */ e.jsx("span", { className: "flex-1 truncate", children: n }),
764
774
  /* @__PURE__ */ e.jsxs("span", { className: "shrink-0 text-slate-400", children: [
765
- (X[n].length / 1024).toFixed(1),
775
+ (pe[n].length / 1024).toFixed(1),
766
776
  " KB"
767
777
  ] })
768
778
  ]
769
779
  }
770
780
  ),
771
781
  T ? /* @__PURE__ */ e.jsxs("div", { className: "bg-white", children: [
772
- u.get(n)?.hunks.length ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 border-b border-slate-200 px-4 py-2", children: [
782
+ m.get(n)?.hunks.length ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 border-b border-slate-200 px-4 py-2", children: [
773
783
  /* @__PURE__ */ e.jsx(
774
784
  "button",
775
785
  {
776
786
  type: "button",
777
787
  onClick: () => o(n),
778
788
  className: "rounded border border-slate-300 px-2 py-0.5 text-xs text-slate-700 hover:bg-slate-50",
779
- children: A.has(n) ? "Show converted file" : "Show what changed"
789
+ children: X.has(n) ? "Show converted file" : "Show what changed"
780
790
  }
781
791
  ),
782
792
  /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-slate-500", children: [
783
793
  "+",
784
- u.get(n).stats.added,
794
+ m.get(n).stats.added,
785
795
  " −",
786
- u.get(n).stats.removed,
796
+ m.get(n).stats.removed,
787
797
  " in the LaTeX source"
788
798
  ] })
789
799
  ] }) : null,
790
- A.has(n) && u.has(n) ? /* @__PURE__ */ e.jsx(Ue, { hunks: u.get(n).hunks }) : /* @__PURE__ */ e.jsx("pre", { className: "m-0 max-h-72 overflow-auto p-4 font-mono text-xs leading-relaxed text-slate-800", children: X[n] })
800
+ X.has(n) && m.has(n) ? /* @__PURE__ */ e.jsx(He, { hunks: m.get(n).hunks }) : /* @__PURE__ */ e.jsx("pre", { className: "m-0 max-h-72 overflow-auto p-4 font-mono text-xs leading-relaxed text-slate-800", children: pe[n] })
791
801
  ] }) : null
792
802
  ]
793
803
  },
@@ -799,9 +809,9 @@ function Ge({
799
809
  "button",
800
810
  {
801
811
  type: "button",
802
- onClick: d ?? te,
812
+ onClick: u ?? xe,
803
813
  className: "px-4 py-2 text-sm text-slate-600 hover:text-slate-900",
804
- children: d ? "Cancel" : "Start Over"
814
+ children: u ? "Cancel" : "Start Over"
805
815
  }
806
816
  ),
807
817
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
@@ -809,7 +819,7 @@ function Ge({
809
819
  "button",
810
820
  {
811
821
  type: "button",
812
- onClick: () => f({ name: "sources", prepared: z }),
822
+ onClick: () => b({ name: "sources", prepared: z }),
813
823
  className: "rounded border border-slate-300 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50",
814
824
  children: "Change Sources"
815
825
  }
@@ -819,29 +829,29 @@ function Ge({
819
829
  {
820
830
  type: "button",
821
831
  onClick: () => {
822
- F || fe(l, p), ne((n) => !n);
832
+ W || ge(l, L), K((n) => !n);
823
833
  },
824
834
  className: "rounded border border-slate-300 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50",
825
- children: F ? "Hide Preview" : "Preview"
835
+ children: W ? "Hide Preview" : "Preview"
826
836
  }
827
837
  ),
828
838
  /* @__PURE__ */ e.jsxs(
829
839
  "button",
830
840
  {
831
841
  type: "button",
832
- disabled: q,
842
+ disabled: J,
833
843
  onClick: async () => {
834
- ee(!0);
844
+ t(!0);
835
845
  try {
836
- await s(l, p);
846
+ await s(l, L);
837
847
  } finally {
838
- ee(!1);
848
+ t(!1);
839
849
  }
840
850
  },
841
851
  className: "flex items-center gap-2 rounded bg-blue-700 px-4 py-2 text-sm font-medium text-white hover:bg-blue-600 disabled:opacity-60",
842
852
  children: [
843
- q ? /* @__PURE__ */ e.jsx("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-white border-t-transparent" }) : null,
844
- q ? "Importing…" : "Confirm Import"
853
+ J ? /* @__PURE__ */ e.jsx("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-white border-t-transparent" }) : null,
854
+ J ? "Importing…" : "Confirm Import"
845
855
  ]
846
856
  }
847
857
  )
@@ -850,9 +860,9 @@ function Ge({
850
860
  ] });
851
861
  }
852
862
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
853
- c.length > 1 ? /* @__PURE__ */ e.jsxs("fieldset", { className: "rounded-lg border border-slate-200 p-4", children: [
863
+ w.length > 1 ? /* @__PURE__ */ e.jsxs("fieldset", { className: "rounded-lg border border-slate-200 p-4", children: [
854
864
  /* @__PURE__ */ e.jsx("legend", { className: "px-1 text-sm font-semibold text-slate-700", children: "Converter" }),
855
- /* @__PURE__ */ e.jsx("div", { className: "mt-2 flex flex-col gap-3", children: c.map((r) => /* @__PURE__ */ e.jsxs(
865
+ /* @__PURE__ */ e.jsx("div", { className: "mt-2 flex flex-col gap-3", children: w.map((r) => /* @__PURE__ */ e.jsxs(
856
866
  "label",
857
867
  {
858
868
  className: "flex cursor-pointer items-start gap-3 text-sm",
@@ -863,8 +873,8 @@ function Ge({
863
873
  type: "radio",
864
874
  name: "import-engine",
865
875
  value: r.id,
866
- checked: P === r.id,
867
- onChange: () => W(r.id),
876
+ checked: _ === r.id,
877
+ onChange: () => B(r.id),
868
878
  className: "mt-0.5"
869
879
  }
870
880
  ),
@@ -882,8 +892,8 @@ function Ge({
882
892
  /* @__PURE__ */ e.jsxs(
883
893
  "select",
884
894
  {
885
- value: R,
886
- onChange: (r) => O(
895
+ value: k,
896
+ onChange: (r) => A(
887
897
  r.currentTarget.value
888
898
  ),
889
899
  className: "rounded border border-slate-300 px-2 py-1 text-sm",
@@ -900,18 +910,18 @@ function Ge({
900
910
  {
901
911
  role: "button",
902
912
  tabIndex: 0,
903
- onKeyDown: (r) => r.key === "Enter" && v.current?.click(),
904
- onClick: () => v.current?.click(),
913
+ onKeyDown: (r) => r.key === "Enter" && P.current?.click(),
914
+ onClick: () => P.current?.click(),
905
915
  onDragOver: (r) => {
906
- r.preventDefault(), w(!0);
916
+ r.preventDefault(), E(!0);
907
917
  },
908
- onDragLeave: () => w(!1),
918
+ onDragLeave: () => E(!1),
909
919
  onDrop: (r) => {
910
- r.preventDefault(), w(!1);
920
+ r.preventDefault(), E(!1);
911
921
  const o = r.dataTransfer.files?.[0];
912
- o && G(o);
922
+ o && he(o);
913
923
  },
914
- className: `flex cursor-pointer flex-col items-center gap-3 rounded-lg border-2 border-dashed p-10 text-center transition-colors ${_ ? "border-blue-500 bg-blue-50" : "border-slate-300 bg-slate-50 hover:border-slate-400"}`,
924
+ className: `flex cursor-pointer flex-col items-center gap-3 rounded-lg border-2 border-dashed p-10 text-center transition-colors ${D ? "border-blue-500 bg-blue-50" : "border-slate-300 bg-slate-50 hover:border-slate-400"}`,
915
925
  children: [
916
926
  /* @__PURE__ */ e.jsx("p", { className: "text-slate-600", children: "Drop a file here, or click to select." }),
917
927
  /* @__PURE__ */ e.jsx(
@@ -919,7 +929,7 @@ function Ge({
919
929
  {
920
930
  type: "button",
921
931
  onClick: (r) => {
922
- r.stopPropagation(), v.current?.click();
932
+ r.stopPropagation(), P.current?.click();
923
933
  },
924
934
  className: "rounded bg-blue-700 px-4 py-2 text-sm font-medium text-white hover:bg-blue-600",
925
935
  children: "Select File"
@@ -927,18 +937,18 @@ function Ge({
927
937
  ),
928
938
  /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-slate-400", children: [
929
939
  "Supports ",
930
- t.join(", ")
940
+ f.join(", ")
931
941
  ] }),
932
942
  /* @__PURE__ */ e.jsx(
933
943
  "input",
934
944
  {
935
- ref: v,
945
+ ref: P,
936
946
  type: "file",
937
947
  hidden: !0,
938
- accept: t.join(","),
948
+ accept: f.join(","),
939
949
  onChange: (r) => {
940
950
  const o = r.currentTarget.files?.[0];
941
- o && G(o), r.currentTarget.value = "";
951
+ o && he(o), r.currentTarget.value = "";
942
952
  }
943
953
  }
944
954
  )
@@ -947,23 +957,23 @@ function Ge({
947
957
  )
948
958
  ] });
949
959
  }
950
- function Ue({ hunks: s }) {
951
- return s.length === 0 ? /* @__PURE__ */ e.jsx("p", { className: "m-0 px-4 py-3 text-xs text-slate-500", children: "Nothing was changed in this file." }) : /* @__PURE__ */ e.jsx("div", { className: "max-h-72 overflow-auto bg-white font-mono text-xs leading-relaxed", children: s.map((d, x) => /* @__PURE__ */ e.jsxs("div", { className: "border-b border-slate-100 last:border-b-0", children: [
960
+ function He({ hunks: s }) {
961
+ return s.length === 0 ? /* @__PURE__ */ e.jsx("p", { className: "m-0 px-4 py-3 text-xs text-slate-500", children: "Nothing was changed in this file." }) : /* @__PURE__ */ e.jsx("div", { className: "max-h-72 overflow-auto bg-white font-mono text-xs leading-relaxed", children: s.map((u, x) => /* @__PURE__ */ e.jsxs("div", { className: "border-b border-slate-100 last:border-b-0", children: [
952
962
  x > 0 ? /* @__PURE__ */ e.jsx("div", { className: "bg-slate-50 px-4 py-1 text-slate-400", children: "⋯" }) : null,
953
- d.lines.map((b, g) => /* @__PURE__ */ e.jsxs(
963
+ u.lines.map((h, j) => /* @__PURE__ */ e.jsxs(
954
964
  "div",
955
965
  {
956
- className: b.op === "add" ? "bg-green-50 px-4 text-green-900" : b.op === "remove" ? "bg-red-50 px-4 text-red-900" : "px-4 text-slate-600",
966
+ className: h.op === "add" ? "bg-green-50 px-4 text-green-900" : h.op === "remove" ? "bg-red-50 px-4 text-red-900" : "px-4 text-slate-600",
957
967
  children: [
958
- /* @__PURE__ */ e.jsx("span", { className: "mr-2 select-none text-slate-400", children: b.op === "add" ? "+" : b.op === "remove" ? "−" : " " }),
959
- b.text || " "
968
+ /* @__PURE__ */ e.jsx("span", { className: "mr-2 select-none text-slate-400", children: h.op === "add" ? "+" : h.op === "remove" ? "−" : " " }),
969
+ h.text || " "
960
970
  ]
961
971
  },
962
- g
972
+ j
963
973
  ))
964
974
  ] }, x)) });
965
975
  }
966
- const Be = {
976
+ const Ze = {
967
977
  title: "Import Source Content",
968
978
  description: "Paste LaTeX, Markdown, or PreTeXt source to convert into PreTeXt.",
969
979
  sourceLabel: "Source",
@@ -974,58 +984,58 @@ const Be = {
974
984
  successPrefix: "Ready",
975
985
  errorPrefix: "Error"
976
986
  };
977
- function Je({
987
+ function at({
978
988
  initialSource: s = "",
979
- initialSourceFormat: d,
989
+ initialSourceFormat: u,
980
990
  labels: x,
981
- disabled: b = !1,
982
- onImport: g
991
+ disabled: h = !1,
992
+ onImport: j
983
993
  }) {
984
- const c = ae(
985
- () => ({ ...Be, ...x ?? {} }),
994
+ const d = ae(
995
+ () => ({ ...Ze, ...x ?? {} }),
986
996
  [x]
987
- ), [v, N] = h(s), [f, _] = h(
988
- d ?? "auto"
989
- ), [w, R] = h(
997
+ ), [y, S] = p(s), [w, P] = p(
998
+ u ?? "auto"
999
+ ), [v, b] = p(
990
1000
  null
991
- ), O = ae(
992
- () => _e(v),
993
- [v]
994
- ), E = b || !v.trim();
1001
+ ), D = ae(
1002
+ () => De(y),
1003
+ [y]
1004
+ ), E = h || !y.trim();
995
1005
  return /* @__PURE__ */ e.jsx(
996
1006
  "form",
997
1007
  {
998
1008
  onSubmit: (k) => {
999
1009
  k.preventDefault();
1000
- const A = Ae(
1001
- v,
1002
- f === "auto" ? void 0 : f
1010
+ const A = Ie(
1011
+ y,
1012
+ w === "auto" ? void 0 : w
1003
1013
  );
1004
- R(A), g(A);
1014
+ b(A), j(A);
1005
1015
  },
1006
1016
  "aria-label": "Import source form",
1007
- children: /* @__PURE__ */ e.jsxs("fieldset", { disabled: b, children: [
1008
- /* @__PURE__ */ e.jsx("legend", { children: c.title }),
1009
- /* @__PURE__ */ e.jsx("p", { children: c.description }),
1017
+ children: /* @__PURE__ */ e.jsxs("fieldset", { disabled: h, children: [
1018
+ /* @__PURE__ */ e.jsx("legend", { children: d.title }),
1019
+ /* @__PURE__ */ e.jsx("p", { children: d.description }),
1010
1020
  /* @__PURE__ */ e.jsxs("label", { children: [
1011
- c.sourceLabel,
1021
+ d.sourceLabel,
1012
1022
  /* @__PURE__ */ e.jsx(
1013
1023
  "textarea",
1014
1024
  {
1015
- value: v,
1016
- onChange: (k) => N(k.currentTarget.value),
1017
- placeholder: c.sourcePlaceholder,
1025
+ value: y,
1026
+ onChange: (k) => S(k.currentTarget.value),
1027
+ placeholder: d.sourcePlaceholder,
1018
1028
  rows: 12
1019
1029
  }
1020
1030
  )
1021
1031
  ] }),
1022
1032
  /* @__PURE__ */ e.jsxs("label", { children: [
1023
- c.formatLabel,
1033
+ d.formatLabel,
1024
1034
  /* @__PURE__ */ e.jsxs(
1025
1035
  "select",
1026
1036
  {
1027
- value: f,
1028
- onChange: (k) => _(
1037
+ value: w,
1038
+ onChange: (k) => P(
1029
1039
  k.currentTarget.value
1030
1040
  ),
1031
1041
  children: [
@@ -1038,26 +1048,26 @@ function Je({
1038
1048
  )
1039
1049
  ] }),
1040
1050
  /* @__PURE__ */ e.jsxs("p", { children: [
1041
- c.detectedFormatPrefix,
1051
+ d.detectedFormatPrefix,
1042
1052
  ": ",
1043
- /* @__PURE__ */ e.jsx("strong", { children: O })
1053
+ /* @__PURE__ */ e.jsx("strong", { children: D })
1044
1054
  ] }),
1045
- /* @__PURE__ */ e.jsx("button", { type: "submit", disabled: E, children: c.convertButton }),
1046
- w ? "pretextError" in w ? /* @__PURE__ */ e.jsxs("p", { role: "alert", children: [
1047
- c.errorPrefix,
1055
+ /* @__PURE__ */ e.jsx("button", { type: "submit", disabled: E, children: d.convertButton }),
1056
+ v ? "pretextError" in v ? /* @__PURE__ */ e.jsxs("p", { role: "alert", children: [
1057
+ d.errorPrefix,
1048
1058
  ": ",
1049
- w.pretextError
1059
+ v.pretextError
1050
1060
  ] }) : /* @__PURE__ */ e.jsxs("p", { children: [
1051
- c.successPrefix,
1061
+ d.successPrefix,
1052
1062
  ": ",
1053
- w.pretextSource.length,
1063
+ v.pretextSource.length,
1054
1064
  " characters of PreTeXt generated."
1055
1065
  ] }) : null
1056
1066
  ] })
1057
1067
  }
1058
1068
  );
1059
1069
  }
1060
- const We = {
1070
+ const Qe = {
1061
1071
  title: "Upload Source File",
1062
1072
  hint: "Supports .tex, .md, .ptx, .xml, .zip, and .tar.gz files.",
1063
1073
  selectButton: "Select File",
@@ -1065,43 +1075,43 @@ const We = {
1065
1075
  documentKindLabel: "Document kind",
1066
1076
  splitSectionsLabel: "Split each chapter into sections"
1067
1077
  };
1068
- function He({
1078
+ function nt({
1069
1079
  labels: s,
1070
- disabled: d = !1,
1080
+ disabled: u = !1,
1071
1081
  defaultDocumentKind: x = "auto",
1072
- importOptions: b,
1073
- onImport: g
1082
+ importOptions: h,
1083
+ onImport: j
1074
1084
  }) {
1075
- const c = ae(
1076
- () => ({ ...We, ...s ?? {} }),
1085
+ const d = ae(
1086
+ () => ({ ...Qe, ...s ?? {} }),
1077
1087
  [s]
1078
- ), v = ue(null), [N, f] = h(!1), [_, w] = h(!1), [R, O] = h(
1088
+ ), y = ie(null), [S, w] = p(!1), [P, v] = p(!1), [b, D] = p(
1079
1089
  []
1080
- ), [E, k] = h(x), [A, L] = h(!1), P = d || _, W = async (p) => {
1081
- w(!0);
1090
+ ), [E, k] = p(x), [A, F] = p(!1), C = u || P, X = async (g) => {
1091
+ v(!0);
1082
1092
  try {
1083
- const F = await Ne(p, b ?? {
1093
+ const B = await Ee(g, h ?? {
1084
1094
  documentKind: E === "auto" ? void 0 : E,
1085
1095
  splitSections: A
1086
1096
  });
1087
- O(F.statusMessages), g(F);
1097
+ D(B.statusMessages), j(B);
1088
1098
  } finally {
1089
- w(!1);
1099
+ v(!1);
1090
1100
  }
1091
1101
  };
1092
1102
  return /* @__PURE__ */ e.jsxs("section", { "aria-label": "Import upload panel", children: [
1093
- /* @__PURE__ */ e.jsx("h3", { children: c.title }),
1094
- /* @__PURE__ */ e.jsx("p", { children: c.hint }),
1095
- b ? null : /* @__PURE__ */ e.jsxs("div", { className: "import-options", children: [
1103
+ /* @__PURE__ */ e.jsx("h3", { children: d.title }),
1104
+ /* @__PURE__ */ e.jsx("p", { children: d.hint }),
1105
+ h ? null : /* @__PURE__ */ e.jsxs("div", { className: "import-options", children: [
1096
1106
  /* @__PURE__ */ e.jsxs("label", { children: [
1097
- c.documentKindLabel,
1107
+ d.documentKindLabel,
1098
1108
  /* @__PURE__ */ e.jsxs(
1099
1109
  "select",
1100
1110
  {
1101
1111
  value: E,
1102
- disabled: P,
1103
- onChange: (p) => k(
1104
- p.currentTarget.value
1112
+ disabled: C,
1113
+ onChange: (g) => k(
1114
+ g.currentTarget.value
1105
1115
  ),
1106
1116
  children: [
1107
1117
  /* @__PURE__ */ e.jsx("option", { value: "auto", children: "Auto detect" }),
@@ -1117,72 +1127,72 @@ function He({
1117
1127
  {
1118
1128
  type: "checkbox",
1119
1129
  checked: A,
1120
- disabled: P,
1121
- onChange: (p) => L(p.currentTarget.checked)
1130
+ disabled: C,
1131
+ onChange: (g) => F(g.currentTarget.checked)
1122
1132
  }
1123
1133
  ),
1124
- c.splitSectionsLabel
1134
+ d.splitSectionsLabel
1125
1135
  ] })
1126
1136
  ] }),
1127
1137
  /* @__PURE__ */ e.jsxs(
1128
1138
  "div",
1129
1139
  {
1130
- onDragOver: (p) => {
1131
- p.preventDefault(), P || f(!0);
1140
+ onDragOver: (g) => {
1141
+ g.preventDefault(), C || w(!0);
1132
1142
  },
1133
- onDragLeave: () => f(!1),
1134
- onDrop: (p) => {
1135
- if (p.preventDefault(), f(!1), P)
1143
+ onDragLeave: () => w(!1),
1144
+ onDrop: (g) => {
1145
+ if (g.preventDefault(), w(!1), C)
1136
1146
  return;
1137
- const S = p.dataTransfer.files?.[0];
1138
- S && W(S);
1147
+ const _ = g.dataTransfer.files?.[0];
1148
+ _ && X(_);
1139
1149
  },
1140
1150
  children: [
1141
- /* @__PURE__ */ e.jsx("p", { children: c.dropHint }),
1151
+ /* @__PURE__ */ e.jsx("p", { children: d.dropHint }),
1142
1152
  /* @__PURE__ */ e.jsxs(
1143
1153
  "button",
1144
1154
  {
1145
1155
  type: "button",
1146
- disabled: P,
1147
- onClick: () => v.current?.click(),
1156
+ disabled: C,
1157
+ onClick: () => y.current?.click(),
1148
1158
  className: "inline-flex items-center gap-2",
1149
1159
  children: [
1150
- _ ? /* @__PURE__ */ e.jsx(
1160
+ P ? /* @__PURE__ */ e.jsx(
1151
1161
  "span",
1152
1162
  {
1153
1163
  className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent",
1154
1164
  "aria-hidden": "true"
1155
1165
  }
1156
1166
  ) : null,
1157
- _ ? "Processing…" : c.selectButton
1167
+ P ? "Processing…" : d.selectButton
1158
1168
  ]
1159
1169
  }
1160
1170
  ),
1161
1171
  /* @__PURE__ */ e.jsx(
1162
1172
  "input",
1163
1173
  {
1164
- ref: v,
1174
+ ref: y,
1165
1175
  type: "file",
1166
1176
  hidden: !0,
1167
- disabled: P,
1177
+ disabled: C,
1168
1178
  accept: ".tex,.md,.markdown,.ptx,.xml,.zip,.gz,.tar.gz,.tgz",
1169
- onChange: (p) => {
1170
- const S = p.currentTarget.files?.[0];
1171
- S && W(S), p.currentTarget.value = "";
1179
+ onChange: (g) => {
1180
+ const _ = g.currentTarget.files?.[0];
1181
+ _ && X(_), g.currentTarget.value = "";
1172
1182
  }
1173
1183
  }
1174
1184
  )
1175
1185
  ]
1176
1186
  }
1177
1187
  ),
1178
- _ ? /* @__PURE__ */ e.jsx("p", { role: "status", "aria-live": "polite", children: "Converting your file — this can take a while for a long document." }) : null,
1179
- R.length > 0 ? /* @__PURE__ */ e.jsx("ul", { "aria-live": "polite", children: R.map((p, S) => /* @__PURE__ */ e.jsx("li", { children: p.message }, `${p.type}-${S}`)) }) : null,
1180
- N && !P ? /* @__PURE__ */ e.jsx("p", { children: "Release to upload the file." }) : null
1188
+ P ? /* @__PURE__ */ e.jsx("p", { role: "status", "aria-live": "polite", children: "Converting your file — this can take a while for a long document." }) : null,
1189
+ b.length > 0 ? /* @__PURE__ */ e.jsx("ul", { "aria-live": "polite", children: b.map((g, _) => /* @__PURE__ */ e.jsx("li", { children: g.message }, `${g.type}-${_}`)) }) : null,
1190
+ S && !C ? /* @__PURE__ */ e.jsx("p", { children: "Release to upload the file." }) : null
1181
1191
  ] });
1182
1192
  }
1183
1193
  export {
1184
- Je as ImportSourceForm,
1185
- He as ImportUploadPanel,
1186
- Ge as ImportWizard,
1187
- Me as ProcessingPanel
1194
+ at as ImportSourceForm,
1195
+ nt as ImportUploadPanel,
1196
+ st as ImportWizard,
1197
+ qe as ProcessingPanel
1188
1198
  };